@dialpad/dialtone-vue 2.46.1 → 2.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.common.js +1122 -38
- package/dist/dialtone-vue.umd.js +1122 -38
- package/dist/dialtone-vue.umd.min.js +1 -1
- package/package.json +2 -1
package/dist/dialtone-vue.umd.js
CHANGED
|
@@ -538,6 +538,1012 @@ module.exports = function (i) {
|
|
|
538
538
|
return i[1];
|
|
539
539
|
};
|
|
540
540
|
|
|
541
|
+
/***/ }),
|
|
542
|
+
|
|
543
|
+
/***/ 377:
|
|
544
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
545
|
+
|
|
546
|
+
// A library of seedable RNGs implemented in Javascript.
|
|
547
|
+
//
|
|
548
|
+
// Usage:
|
|
549
|
+
//
|
|
550
|
+
// var seedrandom = require('seedrandom');
|
|
551
|
+
// var random = seedrandom(1); // or any seed.
|
|
552
|
+
// var x = random(); // 0 <= x < 1. Every bit is random.
|
|
553
|
+
// var x = random.quick(); // 0 <= x < 1. 32 bits of randomness.
|
|
554
|
+
|
|
555
|
+
// alea, a 53-bit multiply-with-carry generator by Johannes Baagøe.
|
|
556
|
+
// Period: ~2^116
|
|
557
|
+
// Reported to pass all BigCrush tests.
|
|
558
|
+
var alea = __webpack_require__(832);
|
|
559
|
+
|
|
560
|
+
// xor128, a pure xor-shift generator by George Marsaglia.
|
|
561
|
+
// Period: 2^128-1.
|
|
562
|
+
// Reported to fail: MatrixRank and LinearComp.
|
|
563
|
+
var xor128 = __webpack_require__(652);
|
|
564
|
+
|
|
565
|
+
// xorwow, George Marsaglia's 160-bit xor-shift combined plus weyl.
|
|
566
|
+
// Period: 2^192-2^32
|
|
567
|
+
// Reported to fail: CollisionOver, SimpPoker, and LinearComp.
|
|
568
|
+
var xorwow = __webpack_require__(801);
|
|
569
|
+
|
|
570
|
+
// xorshift7, by François Panneton and Pierre L'ecuyer, takes
|
|
571
|
+
// a different approach: it adds robustness by allowing more shifts
|
|
572
|
+
// than Marsaglia's original three. It is a 7-shift generator
|
|
573
|
+
// with 256 bits, that passes BigCrush with no systmatic failures.
|
|
574
|
+
// Period 2^256-1.
|
|
575
|
+
// No systematic BigCrush failures reported.
|
|
576
|
+
var xorshift7 = __webpack_require__(30);
|
|
577
|
+
|
|
578
|
+
// xor4096, by Richard Brent, is a 4096-bit xor-shift with a
|
|
579
|
+
// very long period that also adds a Weyl generator. It also passes
|
|
580
|
+
// BigCrush with no systematic failures. Its long period may
|
|
581
|
+
// be useful if you have many generators and need to avoid
|
|
582
|
+
// collisions.
|
|
583
|
+
// Period: 2^4128-2^32.
|
|
584
|
+
// No systematic BigCrush failures reported.
|
|
585
|
+
var xor4096 = __webpack_require__(618);
|
|
586
|
+
|
|
587
|
+
// Tyche-i, by Samuel Neves and Filipe Araujo, is a bit-shifting random
|
|
588
|
+
// number generator derived from ChaCha, a modern stream cipher.
|
|
589
|
+
// https://eden.dei.uc.pt/~sneves/pubs/2011-snfa2.pdf
|
|
590
|
+
// Period: ~2^127
|
|
591
|
+
// No systematic BigCrush failures reported.
|
|
592
|
+
var tychei = __webpack_require__(49);
|
|
593
|
+
|
|
594
|
+
// The original ARC4-based prng included in this library.
|
|
595
|
+
// Period: ~2^1600
|
|
596
|
+
var sr = __webpack_require__(971);
|
|
597
|
+
|
|
598
|
+
sr.alea = alea;
|
|
599
|
+
sr.xor128 = xor128;
|
|
600
|
+
sr.xorwow = xorwow;
|
|
601
|
+
sr.xorshift7 = xorshift7;
|
|
602
|
+
sr.xor4096 = xor4096;
|
|
603
|
+
sr.tychei = tychei;
|
|
604
|
+
|
|
605
|
+
module.exports = sr;
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
/***/ }),
|
|
609
|
+
|
|
610
|
+
/***/ 832:
|
|
611
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
612
|
+
|
|
613
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
614
|
+
var __WEBPACK_AMD_DEFINE_RESULT__;// A port of an algorithm by Johannes Baagøe <baagoe@baagoe.com>, 2010
|
|
615
|
+
// http://baagoe.com/en/RandomMusings/javascript/
|
|
616
|
+
// https://github.com/nquinlan/better-random-numbers-for-javascript-mirror
|
|
617
|
+
// Original work is under MIT license -
|
|
618
|
+
|
|
619
|
+
// Copyright (C) 2010 by Johannes Baagøe <baagoe@baagoe.org>
|
|
620
|
+
//
|
|
621
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
622
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
623
|
+
// in the Software without restriction, including without limitation the rights
|
|
624
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
625
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
626
|
+
// furnished to do so, subject to the following conditions:
|
|
627
|
+
//
|
|
628
|
+
// The above copyright notice and this permission notice shall be included in
|
|
629
|
+
// all copies or substantial portions of the Software.
|
|
630
|
+
//
|
|
631
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
632
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
633
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
634
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
635
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
636
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
637
|
+
// THE SOFTWARE.
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
(function(global, module, define) {
|
|
642
|
+
|
|
643
|
+
function Alea(seed) {
|
|
644
|
+
var me = this, mash = Mash();
|
|
645
|
+
|
|
646
|
+
me.next = function() {
|
|
647
|
+
var t = 2091639 * me.s0 + me.c * 2.3283064365386963e-10; // 2^-32
|
|
648
|
+
me.s0 = me.s1;
|
|
649
|
+
me.s1 = me.s2;
|
|
650
|
+
return me.s2 = t - (me.c = t | 0);
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
// Apply the seeding algorithm from Baagoe.
|
|
654
|
+
me.c = 1;
|
|
655
|
+
me.s0 = mash(' ');
|
|
656
|
+
me.s1 = mash(' ');
|
|
657
|
+
me.s2 = mash(' ');
|
|
658
|
+
me.s0 -= mash(seed);
|
|
659
|
+
if (me.s0 < 0) { me.s0 += 1; }
|
|
660
|
+
me.s1 -= mash(seed);
|
|
661
|
+
if (me.s1 < 0) { me.s1 += 1; }
|
|
662
|
+
me.s2 -= mash(seed);
|
|
663
|
+
if (me.s2 < 0) { me.s2 += 1; }
|
|
664
|
+
mash = null;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function copy(f, t) {
|
|
668
|
+
t.c = f.c;
|
|
669
|
+
t.s0 = f.s0;
|
|
670
|
+
t.s1 = f.s1;
|
|
671
|
+
t.s2 = f.s2;
|
|
672
|
+
return t;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
function impl(seed, opts) {
|
|
676
|
+
var xg = new Alea(seed),
|
|
677
|
+
state = opts && opts.state,
|
|
678
|
+
prng = xg.next;
|
|
679
|
+
prng.int32 = function() { return (xg.next() * 0x100000000) | 0; }
|
|
680
|
+
prng.double = function() {
|
|
681
|
+
return prng() + (prng() * 0x200000 | 0) * 1.1102230246251565e-16; // 2^-53
|
|
682
|
+
};
|
|
683
|
+
prng.quick = prng;
|
|
684
|
+
if (state) {
|
|
685
|
+
if (typeof(state) == 'object') copy(state, xg);
|
|
686
|
+
prng.state = function() { return copy(xg, {}); }
|
|
687
|
+
}
|
|
688
|
+
return prng;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
function Mash() {
|
|
692
|
+
var n = 0xefc8249d;
|
|
693
|
+
|
|
694
|
+
var mash = function(data) {
|
|
695
|
+
data = String(data);
|
|
696
|
+
for (var i = 0; i < data.length; i++) {
|
|
697
|
+
n += data.charCodeAt(i);
|
|
698
|
+
var h = 0.02519603282416938 * n;
|
|
699
|
+
n = h >>> 0;
|
|
700
|
+
h -= n;
|
|
701
|
+
h *= n;
|
|
702
|
+
n = h >>> 0;
|
|
703
|
+
h -= n;
|
|
704
|
+
n += h * 0x100000000; // 2^32
|
|
705
|
+
}
|
|
706
|
+
return (n >>> 0) * 2.3283064365386963e-10; // 2^-32
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
return mash;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
if (module && module.exports) {
|
|
714
|
+
module.exports = impl;
|
|
715
|
+
} else if (__webpack_require__.amdD && __webpack_require__.amdO) {
|
|
716
|
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return impl; }).call(exports, __webpack_require__, exports, module),
|
|
717
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
718
|
+
} else {
|
|
719
|
+
this.alea = impl;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
})(
|
|
723
|
+
this,
|
|
724
|
+
true && module, // present in node.js
|
|
725
|
+
__webpack_require__.amdD // present with an AMD loader
|
|
726
|
+
);
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
/***/ }),
|
|
732
|
+
|
|
733
|
+
/***/ 49:
|
|
734
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
735
|
+
|
|
736
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
737
|
+
var __WEBPACK_AMD_DEFINE_RESULT__;// A Javascript implementaion of the "Tyche-i" prng algorithm by
|
|
738
|
+
// Samuel Neves and Filipe Araujo.
|
|
739
|
+
// See https://eden.dei.uc.pt/~sneves/pubs/2011-snfa2.pdf
|
|
740
|
+
|
|
741
|
+
(function(global, module, define) {
|
|
742
|
+
|
|
743
|
+
function XorGen(seed) {
|
|
744
|
+
var me = this, strseed = '';
|
|
745
|
+
|
|
746
|
+
// Set up generator function.
|
|
747
|
+
me.next = function() {
|
|
748
|
+
var b = me.b, c = me.c, d = me.d, a = me.a;
|
|
749
|
+
b = (b << 25) ^ (b >>> 7) ^ c;
|
|
750
|
+
c = (c - d) | 0;
|
|
751
|
+
d = (d << 24) ^ (d >>> 8) ^ a;
|
|
752
|
+
a = (a - b) | 0;
|
|
753
|
+
me.b = b = (b << 20) ^ (b >>> 12) ^ c;
|
|
754
|
+
me.c = c = (c - d) | 0;
|
|
755
|
+
me.d = (d << 16) ^ (c >>> 16) ^ a;
|
|
756
|
+
return me.a = (a - b) | 0;
|
|
757
|
+
};
|
|
758
|
+
|
|
759
|
+
/* The following is non-inverted tyche, which has better internal
|
|
760
|
+
* bit diffusion, but which is about 25% slower than tyche-i in JS.
|
|
761
|
+
me.next = function() {
|
|
762
|
+
var a = me.a, b = me.b, c = me.c, d = me.d;
|
|
763
|
+
a = (me.a + me.b | 0) >>> 0;
|
|
764
|
+
d = me.d ^ a; d = d << 16 ^ d >>> 16;
|
|
765
|
+
c = me.c + d | 0;
|
|
766
|
+
b = me.b ^ c; b = b << 12 ^ d >>> 20;
|
|
767
|
+
me.a = a = a + b | 0;
|
|
768
|
+
d = d ^ a; me.d = d = d << 8 ^ d >>> 24;
|
|
769
|
+
me.c = c = c + d | 0;
|
|
770
|
+
b = b ^ c;
|
|
771
|
+
return me.b = (b << 7 ^ b >>> 25);
|
|
772
|
+
}
|
|
773
|
+
*/
|
|
774
|
+
|
|
775
|
+
me.a = 0;
|
|
776
|
+
me.b = 0;
|
|
777
|
+
me.c = 2654435769 | 0;
|
|
778
|
+
me.d = 1367130551;
|
|
779
|
+
|
|
780
|
+
if (seed === Math.floor(seed)) {
|
|
781
|
+
// Integer seed.
|
|
782
|
+
me.a = (seed / 0x100000000) | 0;
|
|
783
|
+
me.b = seed | 0;
|
|
784
|
+
} else {
|
|
785
|
+
// String seed.
|
|
786
|
+
strseed += seed;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
// Mix in string seed, then discard an initial batch of 64 values.
|
|
790
|
+
for (var k = 0; k < strseed.length + 20; k++) {
|
|
791
|
+
me.b ^= strseed.charCodeAt(k) | 0;
|
|
792
|
+
me.next();
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
function copy(f, t) {
|
|
797
|
+
t.a = f.a;
|
|
798
|
+
t.b = f.b;
|
|
799
|
+
t.c = f.c;
|
|
800
|
+
t.d = f.d;
|
|
801
|
+
return t;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
function impl(seed, opts) {
|
|
805
|
+
var xg = new XorGen(seed),
|
|
806
|
+
state = opts && opts.state,
|
|
807
|
+
prng = function() { return (xg.next() >>> 0) / 0x100000000; };
|
|
808
|
+
prng.double = function() {
|
|
809
|
+
do {
|
|
810
|
+
var top = xg.next() >>> 11,
|
|
811
|
+
bot = (xg.next() >>> 0) / 0x100000000,
|
|
812
|
+
result = (top + bot) / (1 << 21);
|
|
813
|
+
} while (result === 0);
|
|
814
|
+
return result;
|
|
815
|
+
};
|
|
816
|
+
prng.int32 = xg.next;
|
|
817
|
+
prng.quick = prng;
|
|
818
|
+
if (state) {
|
|
819
|
+
if (typeof(state) == 'object') copy(state, xg);
|
|
820
|
+
prng.state = function() { return copy(xg, {}); }
|
|
821
|
+
}
|
|
822
|
+
return prng;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
if (module && module.exports) {
|
|
826
|
+
module.exports = impl;
|
|
827
|
+
} else if (__webpack_require__.amdD && __webpack_require__.amdO) {
|
|
828
|
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return impl; }).call(exports, __webpack_require__, exports, module),
|
|
829
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
830
|
+
} else {
|
|
831
|
+
this.tychei = impl;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
})(
|
|
835
|
+
this,
|
|
836
|
+
true && module, // present in node.js
|
|
837
|
+
__webpack_require__.amdD // present with an AMD loader
|
|
838
|
+
);
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
/***/ }),
|
|
844
|
+
|
|
845
|
+
/***/ 652:
|
|
846
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
847
|
+
|
|
848
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
849
|
+
var __WEBPACK_AMD_DEFINE_RESULT__;// A Javascript implementaion of the "xor128" prng algorithm by
|
|
850
|
+
// George Marsaglia. See http://www.jstatsoft.org/v08/i14/paper
|
|
851
|
+
|
|
852
|
+
(function(global, module, define) {
|
|
853
|
+
|
|
854
|
+
function XorGen(seed) {
|
|
855
|
+
var me = this, strseed = '';
|
|
856
|
+
|
|
857
|
+
me.x = 0;
|
|
858
|
+
me.y = 0;
|
|
859
|
+
me.z = 0;
|
|
860
|
+
me.w = 0;
|
|
861
|
+
|
|
862
|
+
// Set up generator function.
|
|
863
|
+
me.next = function() {
|
|
864
|
+
var t = me.x ^ (me.x << 11);
|
|
865
|
+
me.x = me.y;
|
|
866
|
+
me.y = me.z;
|
|
867
|
+
me.z = me.w;
|
|
868
|
+
return me.w ^= (me.w >>> 19) ^ t ^ (t >>> 8);
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
if (seed === (seed | 0)) {
|
|
872
|
+
// Integer seed.
|
|
873
|
+
me.x = seed;
|
|
874
|
+
} else {
|
|
875
|
+
// String seed.
|
|
876
|
+
strseed += seed;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
// Mix in string seed, then discard an initial batch of 64 values.
|
|
880
|
+
for (var k = 0; k < strseed.length + 64; k++) {
|
|
881
|
+
me.x ^= strseed.charCodeAt(k) | 0;
|
|
882
|
+
me.next();
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
function copy(f, t) {
|
|
887
|
+
t.x = f.x;
|
|
888
|
+
t.y = f.y;
|
|
889
|
+
t.z = f.z;
|
|
890
|
+
t.w = f.w;
|
|
891
|
+
return t;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
function impl(seed, opts) {
|
|
895
|
+
var xg = new XorGen(seed),
|
|
896
|
+
state = opts && opts.state,
|
|
897
|
+
prng = function() { return (xg.next() >>> 0) / 0x100000000; };
|
|
898
|
+
prng.double = function() {
|
|
899
|
+
do {
|
|
900
|
+
var top = xg.next() >>> 11,
|
|
901
|
+
bot = (xg.next() >>> 0) / 0x100000000,
|
|
902
|
+
result = (top + bot) / (1 << 21);
|
|
903
|
+
} while (result === 0);
|
|
904
|
+
return result;
|
|
905
|
+
};
|
|
906
|
+
prng.int32 = xg.next;
|
|
907
|
+
prng.quick = prng;
|
|
908
|
+
if (state) {
|
|
909
|
+
if (typeof(state) == 'object') copy(state, xg);
|
|
910
|
+
prng.state = function() { return copy(xg, {}); }
|
|
911
|
+
}
|
|
912
|
+
return prng;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
if (module && module.exports) {
|
|
916
|
+
module.exports = impl;
|
|
917
|
+
} else if (__webpack_require__.amdD && __webpack_require__.amdO) {
|
|
918
|
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return impl; }).call(exports, __webpack_require__, exports, module),
|
|
919
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
920
|
+
} else {
|
|
921
|
+
this.xor128 = impl;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
})(
|
|
925
|
+
this,
|
|
926
|
+
true && module, // present in node.js
|
|
927
|
+
__webpack_require__.amdD // present with an AMD loader
|
|
928
|
+
);
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
/***/ }),
|
|
934
|
+
|
|
935
|
+
/***/ 618:
|
|
936
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
937
|
+
|
|
938
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
939
|
+
var __WEBPACK_AMD_DEFINE_RESULT__;// A Javascript implementaion of Richard Brent's Xorgens xor4096 algorithm.
|
|
940
|
+
//
|
|
941
|
+
// This fast non-cryptographic random number generator is designed for
|
|
942
|
+
// use in Monte-Carlo algorithms. It combines a long-period xorshift
|
|
943
|
+
// generator with a Weyl generator, and it passes all common batteries
|
|
944
|
+
// of stasticial tests for randomness while consuming only a few nanoseconds
|
|
945
|
+
// for each prng generated. For background on the generator, see Brent's
|
|
946
|
+
// paper: "Some long-period random number generators using shifts and xors."
|
|
947
|
+
// http://arxiv.org/pdf/1004.3115v1.pdf
|
|
948
|
+
//
|
|
949
|
+
// Usage:
|
|
950
|
+
//
|
|
951
|
+
// var xor4096 = require('xor4096');
|
|
952
|
+
// random = xor4096(1); // Seed with int32 or string.
|
|
953
|
+
// assert.equal(random(), 0.1520436450538547); // (0, 1) range, 53 bits.
|
|
954
|
+
// assert.equal(random.int32(), 1806534897); // signed int32, 32 bits.
|
|
955
|
+
//
|
|
956
|
+
// For nonzero numeric keys, this impelementation provides a sequence
|
|
957
|
+
// identical to that by Brent's xorgens 3 implementaion in C. This
|
|
958
|
+
// implementation also provides for initalizing the generator with
|
|
959
|
+
// string seeds, or for saving and restoring the state of the generator.
|
|
960
|
+
//
|
|
961
|
+
// On Chrome, this prng benchmarks about 2.1 times slower than
|
|
962
|
+
// Javascript's built-in Math.random().
|
|
963
|
+
|
|
964
|
+
(function(global, module, define) {
|
|
965
|
+
|
|
966
|
+
function XorGen(seed) {
|
|
967
|
+
var me = this;
|
|
968
|
+
|
|
969
|
+
// Set up generator function.
|
|
970
|
+
me.next = function() {
|
|
971
|
+
var w = me.w,
|
|
972
|
+
X = me.X, i = me.i, t, v;
|
|
973
|
+
// Update Weyl generator.
|
|
974
|
+
me.w = w = (w + 0x61c88647) | 0;
|
|
975
|
+
// Update xor generator.
|
|
976
|
+
v = X[(i + 34) & 127];
|
|
977
|
+
t = X[i = ((i + 1) & 127)];
|
|
978
|
+
v ^= v << 13;
|
|
979
|
+
t ^= t << 17;
|
|
980
|
+
v ^= v >>> 15;
|
|
981
|
+
t ^= t >>> 12;
|
|
982
|
+
// Update Xor generator array state.
|
|
983
|
+
v = X[i] = v ^ t;
|
|
984
|
+
me.i = i;
|
|
985
|
+
// Result is the combination.
|
|
986
|
+
return (v + (w ^ (w >>> 16))) | 0;
|
|
987
|
+
};
|
|
988
|
+
|
|
989
|
+
function init(me, seed) {
|
|
990
|
+
var t, v, i, j, w, X = [], limit = 128;
|
|
991
|
+
if (seed === (seed | 0)) {
|
|
992
|
+
// Numeric seeds initialize v, which is used to generates X.
|
|
993
|
+
v = seed;
|
|
994
|
+
seed = null;
|
|
995
|
+
} else {
|
|
996
|
+
// String seeds are mixed into v and X one character at a time.
|
|
997
|
+
seed = seed + '\0';
|
|
998
|
+
v = 0;
|
|
999
|
+
limit = Math.max(limit, seed.length);
|
|
1000
|
+
}
|
|
1001
|
+
// Initialize circular array and weyl value.
|
|
1002
|
+
for (i = 0, j = -32; j < limit; ++j) {
|
|
1003
|
+
// Put the unicode characters into the array, and shuffle them.
|
|
1004
|
+
if (seed) v ^= seed.charCodeAt((j + 32) % seed.length);
|
|
1005
|
+
// After 32 shuffles, take v as the starting w value.
|
|
1006
|
+
if (j === 0) w = v;
|
|
1007
|
+
v ^= v << 10;
|
|
1008
|
+
v ^= v >>> 15;
|
|
1009
|
+
v ^= v << 4;
|
|
1010
|
+
v ^= v >>> 13;
|
|
1011
|
+
if (j >= 0) {
|
|
1012
|
+
w = (w + 0x61c88647) | 0; // Weyl.
|
|
1013
|
+
t = (X[j & 127] ^= (v + w)); // Combine xor and weyl to init array.
|
|
1014
|
+
i = (0 == t) ? i + 1 : 0; // Count zeroes.
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
// We have detected all zeroes; make the key nonzero.
|
|
1018
|
+
if (i >= 128) {
|
|
1019
|
+
X[(seed && seed.length || 0) & 127] = -1;
|
|
1020
|
+
}
|
|
1021
|
+
// Run the generator 512 times to further mix the state before using it.
|
|
1022
|
+
// Factoring this as a function slows the main generator, so it is just
|
|
1023
|
+
// unrolled here. The weyl generator is not advanced while warming up.
|
|
1024
|
+
i = 127;
|
|
1025
|
+
for (j = 4 * 128; j > 0; --j) {
|
|
1026
|
+
v = X[(i + 34) & 127];
|
|
1027
|
+
t = X[i = ((i + 1) & 127)];
|
|
1028
|
+
v ^= v << 13;
|
|
1029
|
+
t ^= t << 17;
|
|
1030
|
+
v ^= v >>> 15;
|
|
1031
|
+
t ^= t >>> 12;
|
|
1032
|
+
X[i] = v ^ t;
|
|
1033
|
+
}
|
|
1034
|
+
// Storing state as object members is faster than using closure variables.
|
|
1035
|
+
me.w = w;
|
|
1036
|
+
me.X = X;
|
|
1037
|
+
me.i = i;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
init(me, seed);
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
function copy(f, t) {
|
|
1044
|
+
t.i = f.i;
|
|
1045
|
+
t.w = f.w;
|
|
1046
|
+
t.X = f.X.slice();
|
|
1047
|
+
return t;
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
function impl(seed, opts) {
|
|
1051
|
+
if (seed == null) seed = +(new Date);
|
|
1052
|
+
var xg = new XorGen(seed),
|
|
1053
|
+
state = opts && opts.state,
|
|
1054
|
+
prng = function() { return (xg.next() >>> 0) / 0x100000000; };
|
|
1055
|
+
prng.double = function() {
|
|
1056
|
+
do {
|
|
1057
|
+
var top = xg.next() >>> 11,
|
|
1058
|
+
bot = (xg.next() >>> 0) / 0x100000000,
|
|
1059
|
+
result = (top + bot) / (1 << 21);
|
|
1060
|
+
} while (result === 0);
|
|
1061
|
+
return result;
|
|
1062
|
+
};
|
|
1063
|
+
prng.int32 = xg.next;
|
|
1064
|
+
prng.quick = prng;
|
|
1065
|
+
if (state) {
|
|
1066
|
+
if (state.X) copy(state, xg);
|
|
1067
|
+
prng.state = function() { return copy(xg, {}); }
|
|
1068
|
+
}
|
|
1069
|
+
return prng;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
if (module && module.exports) {
|
|
1073
|
+
module.exports = impl;
|
|
1074
|
+
} else if (__webpack_require__.amdD && __webpack_require__.amdO) {
|
|
1075
|
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return impl; }).call(exports, __webpack_require__, exports, module),
|
|
1076
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1077
|
+
} else {
|
|
1078
|
+
this.xor4096 = impl;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
})(
|
|
1082
|
+
this, // window object or global
|
|
1083
|
+
true && module, // present in node.js
|
|
1084
|
+
__webpack_require__.amdD // present with an AMD loader
|
|
1085
|
+
);
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
/***/ }),
|
|
1089
|
+
|
|
1090
|
+
/***/ 30:
|
|
1091
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1092
|
+
|
|
1093
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
1094
|
+
var __WEBPACK_AMD_DEFINE_RESULT__;// A Javascript implementaion of the "xorshift7" algorithm by
|
|
1095
|
+
// François Panneton and Pierre L'ecuyer:
|
|
1096
|
+
// "On the Xorgshift Random Number Generators"
|
|
1097
|
+
// http://saluc.engr.uconn.edu/refs/crypto/rng/panneton05onthexorshift.pdf
|
|
1098
|
+
|
|
1099
|
+
(function(global, module, define) {
|
|
1100
|
+
|
|
1101
|
+
function XorGen(seed) {
|
|
1102
|
+
var me = this;
|
|
1103
|
+
|
|
1104
|
+
// Set up generator function.
|
|
1105
|
+
me.next = function() {
|
|
1106
|
+
// Update xor generator.
|
|
1107
|
+
var X = me.x, i = me.i, t, v, w;
|
|
1108
|
+
t = X[i]; t ^= (t >>> 7); v = t ^ (t << 24);
|
|
1109
|
+
t = X[(i + 1) & 7]; v ^= t ^ (t >>> 10);
|
|
1110
|
+
t = X[(i + 3) & 7]; v ^= t ^ (t >>> 3);
|
|
1111
|
+
t = X[(i + 4) & 7]; v ^= t ^ (t << 7);
|
|
1112
|
+
t = X[(i + 7) & 7]; t = t ^ (t << 13); v ^= t ^ (t << 9);
|
|
1113
|
+
X[i] = v;
|
|
1114
|
+
me.i = (i + 1) & 7;
|
|
1115
|
+
return v;
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
function init(me, seed) {
|
|
1119
|
+
var j, w, X = [];
|
|
1120
|
+
|
|
1121
|
+
if (seed === (seed | 0)) {
|
|
1122
|
+
// Seed state array using a 32-bit integer.
|
|
1123
|
+
w = X[0] = seed;
|
|
1124
|
+
} else {
|
|
1125
|
+
// Seed state using a string.
|
|
1126
|
+
seed = '' + seed;
|
|
1127
|
+
for (j = 0; j < seed.length; ++j) {
|
|
1128
|
+
X[j & 7] = (X[j & 7] << 15) ^
|
|
1129
|
+
(seed.charCodeAt(j) + X[(j + 1) & 7] << 13);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
// Enforce an array length of 8, not all zeroes.
|
|
1133
|
+
while (X.length < 8) X.push(0);
|
|
1134
|
+
for (j = 0; j < 8 && X[j] === 0; ++j);
|
|
1135
|
+
if (j == 8) w = X[7] = -1; else w = X[j];
|
|
1136
|
+
|
|
1137
|
+
me.x = X;
|
|
1138
|
+
me.i = 0;
|
|
1139
|
+
|
|
1140
|
+
// Discard an initial 256 values.
|
|
1141
|
+
for (j = 256; j > 0; --j) {
|
|
1142
|
+
me.next();
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
init(me, seed);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
function copy(f, t) {
|
|
1150
|
+
t.x = f.x.slice();
|
|
1151
|
+
t.i = f.i;
|
|
1152
|
+
return t;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
function impl(seed, opts) {
|
|
1156
|
+
if (seed == null) seed = +(new Date);
|
|
1157
|
+
var xg = new XorGen(seed),
|
|
1158
|
+
state = opts && opts.state,
|
|
1159
|
+
prng = function() { return (xg.next() >>> 0) / 0x100000000; };
|
|
1160
|
+
prng.double = function() {
|
|
1161
|
+
do {
|
|
1162
|
+
var top = xg.next() >>> 11,
|
|
1163
|
+
bot = (xg.next() >>> 0) / 0x100000000,
|
|
1164
|
+
result = (top + bot) / (1 << 21);
|
|
1165
|
+
} while (result === 0);
|
|
1166
|
+
return result;
|
|
1167
|
+
};
|
|
1168
|
+
prng.int32 = xg.next;
|
|
1169
|
+
prng.quick = prng;
|
|
1170
|
+
if (state) {
|
|
1171
|
+
if (state.x) copy(state, xg);
|
|
1172
|
+
prng.state = function() { return copy(xg, {}); }
|
|
1173
|
+
}
|
|
1174
|
+
return prng;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
if (module && module.exports) {
|
|
1178
|
+
module.exports = impl;
|
|
1179
|
+
} else if (__webpack_require__.amdD && __webpack_require__.amdO) {
|
|
1180
|
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return impl; }).call(exports, __webpack_require__, exports, module),
|
|
1181
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1182
|
+
} else {
|
|
1183
|
+
this.xorshift7 = impl;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
})(
|
|
1187
|
+
this,
|
|
1188
|
+
true && module, // present in node.js
|
|
1189
|
+
__webpack_require__.amdD // present with an AMD loader
|
|
1190
|
+
);
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
/***/ }),
|
|
1195
|
+
|
|
1196
|
+
/***/ 801:
|
|
1197
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1198
|
+
|
|
1199
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
1200
|
+
var __WEBPACK_AMD_DEFINE_RESULT__;// A Javascript implementaion of the "xorwow" prng algorithm by
|
|
1201
|
+
// George Marsaglia. See http://www.jstatsoft.org/v08/i14/paper
|
|
1202
|
+
|
|
1203
|
+
(function(global, module, define) {
|
|
1204
|
+
|
|
1205
|
+
function XorGen(seed) {
|
|
1206
|
+
var me = this, strseed = '';
|
|
1207
|
+
|
|
1208
|
+
// Set up generator function.
|
|
1209
|
+
me.next = function() {
|
|
1210
|
+
var t = (me.x ^ (me.x >>> 2));
|
|
1211
|
+
me.x = me.y; me.y = me.z; me.z = me.w; me.w = me.v;
|
|
1212
|
+
return (me.d = (me.d + 362437 | 0)) +
|
|
1213
|
+
(me.v = (me.v ^ (me.v << 4)) ^ (t ^ (t << 1))) | 0;
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
me.x = 0;
|
|
1217
|
+
me.y = 0;
|
|
1218
|
+
me.z = 0;
|
|
1219
|
+
me.w = 0;
|
|
1220
|
+
me.v = 0;
|
|
1221
|
+
|
|
1222
|
+
if (seed === (seed | 0)) {
|
|
1223
|
+
// Integer seed.
|
|
1224
|
+
me.x = seed;
|
|
1225
|
+
} else {
|
|
1226
|
+
// String seed.
|
|
1227
|
+
strseed += seed;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
// Mix in string seed, then discard an initial batch of 64 values.
|
|
1231
|
+
for (var k = 0; k < strseed.length + 64; k++) {
|
|
1232
|
+
me.x ^= strseed.charCodeAt(k) | 0;
|
|
1233
|
+
if (k == strseed.length) {
|
|
1234
|
+
me.d = me.x << 10 ^ me.x >>> 4;
|
|
1235
|
+
}
|
|
1236
|
+
me.next();
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
function copy(f, t) {
|
|
1241
|
+
t.x = f.x;
|
|
1242
|
+
t.y = f.y;
|
|
1243
|
+
t.z = f.z;
|
|
1244
|
+
t.w = f.w;
|
|
1245
|
+
t.v = f.v;
|
|
1246
|
+
t.d = f.d;
|
|
1247
|
+
return t;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
function impl(seed, opts) {
|
|
1251
|
+
var xg = new XorGen(seed),
|
|
1252
|
+
state = opts && opts.state,
|
|
1253
|
+
prng = function() { return (xg.next() >>> 0) / 0x100000000; };
|
|
1254
|
+
prng.double = function() {
|
|
1255
|
+
do {
|
|
1256
|
+
var top = xg.next() >>> 11,
|
|
1257
|
+
bot = (xg.next() >>> 0) / 0x100000000,
|
|
1258
|
+
result = (top + bot) / (1 << 21);
|
|
1259
|
+
} while (result === 0);
|
|
1260
|
+
return result;
|
|
1261
|
+
};
|
|
1262
|
+
prng.int32 = xg.next;
|
|
1263
|
+
prng.quick = prng;
|
|
1264
|
+
if (state) {
|
|
1265
|
+
if (typeof(state) == 'object') copy(state, xg);
|
|
1266
|
+
prng.state = function() { return copy(xg, {}); }
|
|
1267
|
+
}
|
|
1268
|
+
return prng;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
if (module && module.exports) {
|
|
1272
|
+
module.exports = impl;
|
|
1273
|
+
} else if (__webpack_require__.amdD && __webpack_require__.amdO) {
|
|
1274
|
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return impl; }).call(exports, __webpack_require__, exports, module),
|
|
1275
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1276
|
+
} else {
|
|
1277
|
+
this.xorwow = impl;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
})(
|
|
1281
|
+
this,
|
|
1282
|
+
true && module, // present in node.js
|
|
1283
|
+
__webpack_require__.amdD // present with an AMD loader
|
|
1284
|
+
);
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
/***/ }),
|
|
1290
|
+
|
|
1291
|
+
/***/ 971:
|
|
1292
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1293
|
+
|
|
1294
|
+
var __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
1295
|
+
Copyright 2019 David Bau.
|
|
1296
|
+
|
|
1297
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
1298
|
+
a copy of this software and associated documentation files (the
|
|
1299
|
+
"Software"), to deal in the Software without restriction, including
|
|
1300
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
1301
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
1302
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
1303
|
+
the following conditions:
|
|
1304
|
+
|
|
1305
|
+
The above copyright notice and this permission notice shall be
|
|
1306
|
+
included in all copies or substantial portions of the Software.
|
|
1307
|
+
|
|
1308
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
1309
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
1310
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
1311
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
1312
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
1313
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
1314
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1315
|
+
|
|
1316
|
+
*/
|
|
1317
|
+
|
|
1318
|
+
(function (global, pool, math) {
|
|
1319
|
+
//
|
|
1320
|
+
// The following constants are related to IEEE 754 limits.
|
|
1321
|
+
//
|
|
1322
|
+
|
|
1323
|
+
var width = 256, // each RC4 output is 0 <= x < 256
|
|
1324
|
+
chunks = 6, // at least six RC4 outputs for each double
|
|
1325
|
+
digits = 52, // there are 52 significant digits in a double
|
|
1326
|
+
rngname = 'random', // rngname: name for Math.random and Math.seedrandom
|
|
1327
|
+
startdenom = math.pow(width, chunks),
|
|
1328
|
+
significance = math.pow(2, digits),
|
|
1329
|
+
overflow = significance * 2,
|
|
1330
|
+
mask = width - 1,
|
|
1331
|
+
nodecrypto; // node.js crypto module, initialized at the bottom.
|
|
1332
|
+
|
|
1333
|
+
//
|
|
1334
|
+
// seedrandom()
|
|
1335
|
+
// This is the seedrandom function described above.
|
|
1336
|
+
//
|
|
1337
|
+
function seedrandom(seed, options, callback) {
|
|
1338
|
+
var key = [];
|
|
1339
|
+
options = (options == true) ? { entropy: true } : (options || {});
|
|
1340
|
+
|
|
1341
|
+
// Flatten the seed string or build one from local entropy if needed.
|
|
1342
|
+
var shortseed = mixkey(flatten(
|
|
1343
|
+
options.entropy ? [seed, tostring(pool)] :
|
|
1344
|
+
(seed == null) ? autoseed() : seed, 3), key);
|
|
1345
|
+
|
|
1346
|
+
// Use the seed to initialize an ARC4 generator.
|
|
1347
|
+
var arc4 = new ARC4(key);
|
|
1348
|
+
|
|
1349
|
+
// This function returns a random double in [0, 1) that contains
|
|
1350
|
+
// randomness in every bit of the mantissa of the IEEE 754 value.
|
|
1351
|
+
var prng = function() {
|
|
1352
|
+
var n = arc4.g(chunks), // Start with a numerator n < 2 ^ 48
|
|
1353
|
+
d = startdenom, // and denominator d = 2 ^ 48.
|
|
1354
|
+
x = 0; // and no 'extra last byte'.
|
|
1355
|
+
while (n < significance) { // Fill up all significant digits by
|
|
1356
|
+
n = (n + x) * width; // shifting numerator and
|
|
1357
|
+
d *= width; // denominator and generating a
|
|
1358
|
+
x = arc4.g(1); // new least-significant-byte.
|
|
1359
|
+
}
|
|
1360
|
+
while (n >= overflow) { // To avoid rounding up, before adding
|
|
1361
|
+
n /= 2; // last byte, shift everything
|
|
1362
|
+
d /= 2; // right using integer math until
|
|
1363
|
+
x >>>= 1; // we have exactly the desired bits.
|
|
1364
|
+
}
|
|
1365
|
+
return (n + x) / d; // Form the number within [0, 1).
|
|
1366
|
+
};
|
|
1367
|
+
|
|
1368
|
+
prng.int32 = function() { return arc4.g(4) | 0; }
|
|
1369
|
+
prng.quick = function() { return arc4.g(4) / 0x100000000; }
|
|
1370
|
+
prng.double = prng;
|
|
1371
|
+
|
|
1372
|
+
// Mix the randomness into accumulated entropy.
|
|
1373
|
+
mixkey(tostring(arc4.S), pool);
|
|
1374
|
+
|
|
1375
|
+
// Calling convention: what to return as a function of prng, seed, is_math.
|
|
1376
|
+
return (options.pass || callback ||
|
|
1377
|
+
function(prng, seed, is_math_call, state) {
|
|
1378
|
+
if (state) {
|
|
1379
|
+
// Load the arc4 state from the given state if it has an S array.
|
|
1380
|
+
if (state.S) { copy(state, arc4); }
|
|
1381
|
+
// Only provide the .state method if requested via options.state.
|
|
1382
|
+
prng.state = function() { return copy(arc4, {}); }
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
// If called as a method of Math (Math.seedrandom()), mutate
|
|
1386
|
+
// Math.random because that is how seedrandom.js has worked since v1.0.
|
|
1387
|
+
if (is_math_call) { math[rngname] = prng; return seed; }
|
|
1388
|
+
|
|
1389
|
+
// Otherwise, it is a newer calling convention, so return the
|
|
1390
|
+
// prng directly.
|
|
1391
|
+
else return prng;
|
|
1392
|
+
})(
|
|
1393
|
+
prng,
|
|
1394
|
+
shortseed,
|
|
1395
|
+
'global' in options ? options.global : (this == math),
|
|
1396
|
+
options.state);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
//
|
|
1400
|
+
// ARC4
|
|
1401
|
+
//
|
|
1402
|
+
// An ARC4 implementation. The constructor takes a key in the form of
|
|
1403
|
+
// an array of at most (width) integers that should be 0 <= x < (width).
|
|
1404
|
+
//
|
|
1405
|
+
// The g(count) method returns a pseudorandom integer that concatenates
|
|
1406
|
+
// the next (count) outputs from ARC4. Its return value is a number x
|
|
1407
|
+
// that is in the range 0 <= x < (width ^ count).
|
|
1408
|
+
//
|
|
1409
|
+
function ARC4(key) {
|
|
1410
|
+
var t, keylen = key.length,
|
|
1411
|
+
me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
|
|
1412
|
+
|
|
1413
|
+
// The empty key [] is treated as [0].
|
|
1414
|
+
if (!keylen) { key = [keylen++]; }
|
|
1415
|
+
|
|
1416
|
+
// Set up S using the standard key scheduling algorithm.
|
|
1417
|
+
while (i < width) {
|
|
1418
|
+
s[i] = i++;
|
|
1419
|
+
}
|
|
1420
|
+
for (i = 0; i < width; i++) {
|
|
1421
|
+
s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
|
|
1422
|
+
s[j] = t;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
// The "g" method returns the next (count) outputs as one number.
|
|
1426
|
+
(me.g = function(count) {
|
|
1427
|
+
// Using instance members instead of closure state nearly doubles speed.
|
|
1428
|
+
var t, r = 0,
|
|
1429
|
+
i = me.i, j = me.j, s = me.S;
|
|
1430
|
+
while (count--) {
|
|
1431
|
+
t = s[i = mask & (i + 1)];
|
|
1432
|
+
r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
|
|
1433
|
+
}
|
|
1434
|
+
me.i = i; me.j = j;
|
|
1435
|
+
return r;
|
|
1436
|
+
// For robust unpredictability, the function call below automatically
|
|
1437
|
+
// discards an initial batch of values. This is called RC4-drop[256].
|
|
1438
|
+
// See http://google.com/search?q=rsa+fluhrer+response&btnI
|
|
1439
|
+
})(width);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
//
|
|
1443
|
+
// copy()
|
|
1444
|
+
// Copies internal state of ARC4 to or from a plain object.
|
|
1445
|
+
//
|
|
1446
|
+
function copy(f, t) {
|
|
1447
|
+
t.i = f.i;
|
|
1448
|
+
t.j = f.j;
|
|
1449
|
+
t.S = f.S.slice();
|
|
1450
|
+
return t;
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1453
|
+
//
|
|
1454
|
+
// flatten()
|
|
1455
|
+
// Converts an object tree to nested arrays of strings.
|
|
1456
|
+
//
|
|
1457
|
+
function flatten(obj, depth) {
|
|
1458
|
+
var result = [], typ = (typeof obj), prop;
|
|
1459
|
+
if (depth && typ == 'object') {
|
|
1460
|
+
for (prop in obj) {
|
|
1461
|
+
try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
return (result.length ? result : typ == 'string' ? obj : obj + '\0');
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
//
|
|
1468
|
+
// mixkey()
|
|
1469
|
+
// Mixes a string seed into a key that is an array of integers, and
|
|
1470
|
+
// returns a shortened string seed that is equivalent to the result key.
|
|
1471
|
+
//
|
|
1472
|
+
function mixkey(seed, key) {
|
|
1473
|
+
var stringseed = seed + '', smear, j = 0;
|
|
1474
|
+
while (j < stringseed.length) {
|
|
1475
|
+
key[mask & j] =
|
|
1476
|
+
mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
|
|
1477
|
+
}
|
|
1478
|
+
return tostring(key);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
//
|
|
1482
|
+
// autoseed()
|
|
1483
|
+
// Returns an object for autoseeding, using window.crypto and Node crypto
|
|
1484
|
+
// module if available.
|
|
1485
|
+
//
|
|
1486
|
+
function autoseed() {
|
|
1487
|
+
try {
|
|
1488
|
+
var out;
|
|
1489
|
+
if (nodecrypto && (out = nodecrypto.randomBytes)) {
|
|
1490
|
+
// The use of 'out' to remember randomBytes makes tight minified code.
|
|
1491
|
+
out = out(width);
|
|
1492
|
+
} else {
|
|
1493
|
+
out = new Uint8Array(width);
|
|
1494
|
+
(global.crypto || global.msCrypto).getRandomValues(out);
|
|
1495
|
+
}
|
|
1496
|
+
return tostring(out);
|
|
1497
|
+
} catch (e) {
|
|
1498
|
+
var browser = global.navigator,
|
|
1499
|
+
plugins = browser && browser.plugins;
|
|
1500
|
+
return [+new Date, global, plugins, global.screen, tostring(pool)];
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
//
|
|
1505
|
+
// tostring()
|
|
1506
|
+
// Converts an array of charcodes to a string
|
|
1507
|
+
//
|
|
1508
|
+
function tostring(a) {
|
|
1509
|
+
return String.fromCharCode.apply(0, a);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
//
|
|
1513
|
+
// When seedrandom.js is loaded, we immediately mix a few bits
|
|
1514
|
+
// from the built-in RNG into the entropy pool. Because we do
|
|
1515
|
+
// not want to interfere with deterministic PRNG state later,
|
|
1516
|
+
// seedrandom will not call math.random on its own again after
|
|
1517
|
+
// initialization.
|
|
1518
|
+
//
|
|
1519
|
+
mixkey(math.random(), pool);
|
|
1520
|
+
|
|
1521
|
+
//
|
|
1522
|
+
// Nodejs and AMD support: export the implementation as a module using
|
|
1523
|
+
// either convention.
|
|
1524
|
+
//
|
|
1525
|
+
if ( true && module.exports) {
|
|
1526
|
+
module.exports = seedrandom;
|
|
1527
|
+
// When in node.js, try using crypto package for autoseeding.
|
|
1528
|
+
try {
|
|
1529
|
+
nodecrypto = __webpack_require__(42);
|
|
1530
|
+
} catch (ex) {}
|
|
1531
|
+
} else if (true) {
|
|
1532
|
+
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return seedrandom; }).call(exports, __webpack_require__, exports, module),
|
|
1533
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1534
|
+
} else {}
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
// End anonymous scope, and pass initial values.
|
|
1538
|
+
})(
|
|
1539
|
+
// global: `self` in browsers (including strict mode and web workers),
|
|
1540
|
+
// otherwise `this` in Node and other environments
|
|
1541
|
+
(typeof self !== 'undefined') ? self : this,
|
|
1542
|
+
[], // pool: entropy pool starts empty
|
|
1543
|
+
Math // math: package containing random, pow, and seedrandom
|
|
1544
|
+
);
|
|
1545
|
+
|
|
1546
|
+
|
|
541
1547
|
/***/ }),
|
|
542
1548
|
|
|
543
1549
|
/***/ 275:
|
|
@@ -1076,6 +2082,13 @@ function applyToTag (styleElement, obj) {
|
|
|
1076
2082
|
}
|
|
1077
2083
|
|
|
1078
2084
|
|
|
2085
|
+
/***/ }),
|
|
2086
|
+
|
|
2087
|
+
/***/ 42:
|
|
2088
|
+
/***/ (() => {
|
|
2089
|
+
|
|
2090
|
+
/* (ignored) */
|
|
2091
|
+
|
|
1079
2092
|
/***/ })
|
|
1080
2093
|
|
|
1081
2094
|
/******/ });
|
|
@@ -1093,18 +2106,33 @@ function applyToTag (styleElement, obj) {
|
|
|
1093
2106
|
/******/ // Create a new module (and put it into the cache)
|
|
1094
2107
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
1095
2108
|
/******/ id: moduleId,
|
|
1096
|
-
/******/
|
|
2109
|
+
/******/ loaded: false,
|
|
1097
2110
|
/******/ exports: {}
|
|
1098
2111
|
/******/ };
|
|
1099
2112
|
/******/
|
|
1100
2113
|
/******/ // Execute the module function
|
|
1101
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
2114
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
2115
|
+
/******/
|
|
2116
|
+
/******/ // Flag the module as loaded
|
|
2117
|
+
/******/ module.loaded = true;
|
|
1102
2118
|
/******/
|
|
1103
2119
|
/******/ // Return the exports of the module
|
|
1104
2120
|
/******/ return module.exports;
|
|
1105
2121
|
/******/ }
|
|
1106
2122
|
/******/
|
|
1107
2123
|
/************************************************************************/
|
|
2124
|
+
/******/ /* webpack/runtime/amd define */
|
|
2125
|
+
/******/ (() => {
|
|
2126
|
+
/******/ __webpack_require__.amdD = function () {
|
|
2127
|
+
/******/ throw new Error('define cannot be used indirect');
|
|
2128
|
+
/******/ };
|
|
2129
|
+
/******/ })();
|
|
2130
|
+
/******/
|
|
2131
|
+
/******/ /* webpack/runtime/amd options */
|
|
2132
|
+
/******/ (() => {
|
|
2133
|
+
/******/ __webpack_require__.amdO = {};
|
|
2134
|
+
/******/ })();
|
|
2135
|
+
/******/
|
|
1108
2136
|
/******/ /* webpack/runtime/compat get default export */
|
|
1109
2137
|
/******/ (() => {
|
|
1110
2138
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
@@ -1145,6 +2173,15 @@ function applyToTag (styleElement, obj) {
|
|
|
1145
2173
|
/******/ };
|
|
1146
2174
|
/******/ })();
|
|
1147
2175
|
/******/
|
|
2176
|
+
/******/ /* webpack/runtime/node module decorator */
|
|
2177
|
+
/******/ (() => {
|
|
2178
|
+
/******/ __webpack_require__.nmd = (module) => {
|
|
2179
|
+
/******/ module.paths = [];
|
|
2180
|
+
/******/ if (!module.children) module.children = [];
|
|
2181
|
+
/******/ return module;
|
|
2182
|
+
/******/ };
|
|
2183
|
+
/******/ })();
|
|
2184
|
+
/******/
|
|
1148
2185
|
/******/ /* webpack/runtime/publicPath */
|
|
1149
2186
|
/******/ (() => {
|
|
1150
2187
|
/******/ __webpack_require__.p = "";
|
|
@@ -1298,7 +2335,7 @@ if (typeof window !== 'undefined') {
|
|
|
1298
2335
|
// Indicate to webpack that this file can be concatenated
|
|
1299
2336
|
/* harmony default export */ const setPublicPath = (null);
|
|
1300
2337
|
|
|
1301
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/avatar/avatar.vue?vue&type=template&id=
|
|
2338
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/avatar/avatar.vue?vue&type=template&id=4839e656&
|
|
1302
2339
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:[
|
|
1303
2340
|
'd-avatar',
|
|
1304
2341
|
_vm.AVATAR_KIND_MODIFIERS[_vm.kind],
|
|
@@ -1383,6 +2420,9 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
|
|
|
1383
2420
|
;// CONCATENATED MODULE: ./common/utils.js
|
|
1384
2421
|
|
|
1385
2422
|
|
|
2423
|
+
|
|
2424
|
+
const seedrandom = __webpack_require__(377);
|
|
2425
|
+
|
|
1386
2426
|
let UNIQUE_ID_COUNTER = 0; // selector to find focusable not hidden inputs
|
|
1387
2427
|
|
|
1388
2428
|
const FOCUSABLE_SELECTOR_NOT_HIDDEN = 'input:not([type=hidden]):not(:disabled)'; // selector to find focusable not disables elements
|
|
@@ -1399,12 +2439,15 @@ function getUniqueString() {
|
|
|
1399
2439
|
}
|
|
1400
2440
|
/**
|
|
1401
2441
|
* Returns a random element from array
|
|
1402
|
-
* @param array
|
|
1403
|
-
* @
|
|
2442
|
+
* @param array - the array to return a random element from
|
|
2443
|
+
* @param {string} seed - use a string to seed the randomization, so it returns the same element each time
|
|
2444
|
+
* based on that string.
|
|
2445
|
+
* @returns {*} - the random element
|
|
1404
2446
|
*/
|
|
1405
2447
|
|
|
1406
|
-
function getRandomElement(array) {
|
|
1407
|
-
|
|
2448
|
+
function getRandomElement(array, seed) {
|
|
2449
|
+
const rng = seedrandom(seed);
|
|
2450
|
+
return array[Math.floor(rng() * array.length)];
|
|
1408
2451
|
}
|
|
1409
2452
|
function formatMessages(messages) {
|
|
1410
2453
|
if (!messages) {
|
|
@@ -1724,6 +2767,9 @@ var component = normalizeComponent(
|
|
|
1724
2767
|
;// CONCATENATED MODULE: ./components/presence/index.js
|
|
1725
2768
|
|
|
1726
2769
|
|
|
2770
|
+
// EXTERNAL MODULE: ./node_modules/seedrandom/index.js
|
|
2771
|
+
var node_modules_seedrandom = __webpack_require__(377);
|
|
2772
|
+
var seedrandom_default = /*#__PURE__*/__webpack_require__.n(node_modules_seedrandom);
|
|
1727
2773
|
;// CONCATENATED MODULE: ./components/avatar/avatar_constants.js
|
|
1728
2774
|
const AVATAR_KIND_MODIFIERS = {
|
|
1729
2775
|
default: '',
|
|
@@ -1796,6 +2842,7 @@ const MAX_GRADIENT_COLORS_100 = 2;
|
|
|
1796
2842
|
|
|
1797
2843
|
|
|
1798
2844
|
|
|
2845
|
+
|
|
1799
2846
|
/**
|
|
1800
2847
|
* An avatar is a visual representation of a user or object.
|
|
1801
2848
|
* @see https://dialpad.design/components/avatar.html
|
|
@@ -1820,6 +2867,15 @@ const MAX_GRADIENT_COLORS_100 = 2;
|
|
|
1820
2867
|
|
|
1821
2868
|
},
|
|
1822
2869
|
|
|
2870
|
+
/**
|
|
2871
|
+
* Pass in a seed to get the random color generation based on that string. For example if you pass in a
|
|
2872
|
+
* user ID as the string it will return the same randomly generated colors every time for that user.
|
|
2873
|
+
*/
|
|
2874
|
+
seed: {
|
|
2875
|
+
type: String,
|
|
2876
|
+
default: undefined
|
|
2877
|
+
},
|
|
2878
|
+
|
|
1823
2879
|
/**
|
|
1824
2880
|
* The size of the avatar
|
|
1825
2881
|
* @values xs, sm, md, lg, xl
|
|
@@ -1976,21 +3032,29 @@ const MAX_GRADIENT_COLORS_100 = 2;
|
|
|
1976
3032
|
},
|
|
1977
3033
|
|
|
1978
3034
|
randomizeGradientAngle() {
|
|
1979
|
-
return getRandomElement(AVATAR_ANGLES);
|
|
3035
|
+
return getRandomElement(AVATAR_ANGLES, this.seed);
|
|
1980
3036
|
},
|
|
1981
3037
|
|
|
1982
3038
|
randomizeGradientColorStops() {
|
|
1983
|
-
const colors = new Set();
|
|
3039
|
+
const colors = new Set();
|
|
3040
|
+
let count = 0; // get 3 unique colors, 2 from colorsWith100 and one from colorsWith200
|
|
1984
3041
|
|
|
1985
3042
|
while (colors.size < MAX_GRADIENT_COLORS) {
|
|
3043
|
+
// add count to the seed since we are looking for 3 unique colors. If the seed makes it always
|
|
3044
|
+
// return the same color we'll get an infinite loop.
|
|
3045
|
+
const seedForColor = this.seed === undefined ? undefined : this.seed + count.toString();
|
|
3046
|
+
|
|
1986
3047
|
if (colors.size === MAX_GRADIENT_COLORS_100) {
|
|
1987
|
-
colors.add(getRandomElement(GRADIENT_COLORS.with200));
|
|
3048
|
+
colors.add(getRandomElement(GRADIENT_COLORS.with200, seedForColor));
|
|
1988
3049
|
} else {
|
|
1989
|
-
colors.add(getRandomElement(GRADIENT_COLORS.with100));
|
|
3050
|
+
colors.add(getRandomElement(GRADIENT_COLORS.with100, seedForColor));
|
|
1990
3051
|
}
|
|
3052
|
+
|
|
3053
|
+
count++;
|
|
1991
3054
|
}
|
|
1992
3055
|
|
|
1993
|
-
const
|
|
3056
|
+
const rng = seedrandom_default()(this.seed);
|
|
3057
|
+
const shuffledColors = Array.from(colors).sort(() => 0.5 - rng());
|
|
1994
3058
|
return shuffledColors;
|
|
1995
3059
|
},
|
|
1996
3060
|
|
|
@@ -6945,8 +8009,8 @@ return [_c('ul',{ref:"listWrapper",class:_vm.listClasses,attrs:{"id":_vm.listId,
|
|
|
6945
8009
|
var dropdownvue_type_template_id_1b8b46fc_staticRenderFns = []
|
|
6946
8010
|
|
|
6947
8011
|
|
|
6948
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/popover/popover.vue?vue&type=template&id=
|
|
6949
|
-
var
|
|
8012
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/popover/popover.vue?vue&type=template&id=7c55e742&
|
|
8013
|
+
var popovervue_type_template_id_7c55e742_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.modal && _vm.isOpen)?_c('portal',[_c('div',{staticClass:"d-modal--transparent",attrs:{"aria-hidden":_vm.modal && _vm.isOpen ? 'false' : 'true'},on:{"click":function($event){$event.preventDefault();$event.stopPropagation();}}})]):_vm._e(),_c(_vm.elementType,_vm._g({ref:"popover",tag:"component",class:['d-popover', { 'd-popover__anchor--opened': _vm.isOpen }],attrs:{"data-qa":"dt-popover-container"}},_vm.$listeners),[_c('div',{ref:"anchor",attrs:{"id":!_vm.ariaLabelledby && _vm.labelledBy,"data-qa":"dt-popover-anchor","tabindex":_vm.openOnContext ? 0 : undefined},on:{"!click":function($event){return _vm.defaultToggleOpen.apply(null, arguments)},"contextmenu":_vm.onContext,"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.onArrowKeyPress.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.onArrowKeyPress.apply(null, arguments)}],"wheel":function (e) { return (_vm.isOpen && _vm.modal) && e.preventDefault(); },"!keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"escape",undefined,$event.key,undefined)){ return null; }return _vm.closePopover.apply(null, arguments)}}},[_vm._t("anchor",null,{"attrs":{
|
|
6950
8014
|
'aria-expanded': _vm.isOpen.toString(),
|
|
6951
8015
|
'aria-controls': _vm.id,
|
|
6952
8016
|
'aria-haspopup': _vm.role,
|
|
@@ -6957,7 +8021,7 @@ var popovervue_type_template_id_2ecb24a7_render = function () {var _vm=this;var
|
|
|
6957
8021
|
'd-popover__content',
|
|
6958
8022
|
_vm.POPOVER_PADDING_CLASSES[_vm.padding],
|
|
6959
8023
|
_vm.contentClass ],attrs:{"data-qa":"dt-popover-content"}},[_vm._t("content",null,{"close":_vm.closePopover})],2),(_vm.$slots.footerContent)?_c('popover-header-footer',{ref:"popover__footer",class:_vm.POPOVER_HEADER_FOOTER_PADDING_CLASSES[_vm.padding],attrs:{"type":"footer","content-class":_vm.footerClass},scopedSlots:_vm._u([{key:"content",fn:function(){return [_vm._t("footerContent",null,{"close":_vm.closePopover})]},proxy:true}],null,true)}):_vm._e(),(_vm.showVisuallyHiddenClose)?_c('sr-only-close-button',{attrs:{"visually-hidden-close-label":_vm.visuallyHiddenCloseLabel},on:{"close":_vm.closePopover}}):_vm._e()],1)],1)],1)}
|
|
6960
|
-
var
|
|
8024
|
+
var popovervue_type_template_id_7c55e742_staticRenderFns = []
|
|
6961
8025
|
|
|
6962
8026
|
|
|
6963
8027
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
|
|
@@ -11453,6 +12517,7 @@ const POPOVER_HEADER_FOOTER_PADDING_CLASSES = {
|
|
|
11453
12517
|
const POPOVER_ROLES = ['dialog', 'menu', 'listbox', 'tree', 'grid'];
|
|
11454
12518
|
const POPOVER_CONTENT_WIDTHS = [null, 'anchor'];
|
|
11455
12519
|
const POPOVER_INITIAL_FOCUS_STRINGS = ['none', 'dialog', 'first'];
|
|
12520
|
+
const POPOVER_APPEND_TO_VALUES = ['parent'];
|
|
11456
12521
|
const POPOVER_STICKY_VALUES = [...TIPPY_STICKY_VALUES];
|
|
11457
12522
|
const POPOVER_DIRECTIONS = [...BASE_TIPPY_DIRECTIONS];
|
|
11458
12523
|
;// CONCATENATED MODULE: ./node_modules/nanoid/non-secure/index.js
|
|
@@ -12234,6 +13299,18 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
12234
13299
|
openWithArrowKeys: {
|
|
12235
13300
|
type: Boolean,
|
|
12236
13301
|
default: false
|
|
13302
|
+
},
|
|
13303
|
+
|
|
13304
|
+
/**
|
|
13305
|
+
* Sets the element to which the popover is going to append to.
|
|
13306
|
+
* @values 'parent', HTMLElement,
|
|
13307
|
+
*/
|
|
13308
|
+
appendTo: {
|
|
13309
|
+
type: [HTMLElement, String],
|
|
13310
|
+
default: () => document.body,
|
|
13311
|
+
validator: appendTo => {
|
|
13312
|
+
return POPOVER_APPEND_TO_VALUES.includes(appendTo) || appendTo instanceof HTMLElement;
|
|
13313
|
+
}
|
|
12237
13314
|
}
|
|
12238
13315
|
},
|
|
12239
13316
|
emits: [
|
|
@@ -12374,7 +13451,7 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
12374
13451
|
placement: this.placement,
|
|
12375
13452
|
offset: this.offset,
|
|
12376
13453
|
sticky: this.sticky,
|
|
12377
|
-
appendTo:
|
|
13454
|
+
appendTo: this.appendTo,
|
|
12378
13455
|
interactive: true,
|
|
12379
13456
|
trigger: 'manual',
|
|
12380
13457
|
// We have to manage hideOnClick functionality manually to handle
|
|
@@ -12631,8 +13708,8 @@ var popovervue_type_style_index_0_lang_less_ = __webpack_require__(532);
|
|
|
12631
13708
|
|
|
12632
13709
|
var popover_component = normalizeComponent(
|
|
12633
13710
|
popover_popovervue_type_script_lang_js_,
|
|
12634
|
-
|
|
12635
|
-
|
|
13711
|
+
popovervue_type_template_id_7c55e742_render,
|
|
13712
|
+
popovervue_type_template_id_7c55e742_staticRenderFns,
|
|
12636
13713
|
false,
|
|
12637
13714
|
null,
|
|
12638
13715
|
null,
|
|
@@ -17161,9 +18238,9 @@ var checkbox_group_component = normalizeComponent(
|
|
|
17161
18238
|
/* harmony default export */ const checkbox_group = (checkbox_group_component.exports);
|
|
17162
18239
|
;// CONCATENATED MODULE: ./components/checkbox_group/index.js
|
|
17163
18240
|
|
|
17164
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/chip/chip.vue?vue&type=template&id=
|
|
17165
|
-
var
|
|
17166
|
-
var
|
|
18241
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/chip/chip.vue?vue&type=template&id=128cc6e8&
|
|
18242
|
+
var chipvue_type_template_id_128cc6e8_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{class:['d-chip', _vm.parentClass]},[_c(_vm.interactive ? 'button' : 'span',_vm._g({tag:"component",class:_vm.chipClasses(),attrs:{"id":_vm.id,"type":_vm.interactive && 'button',"data-qa":"dt-chip","aria-labelledby":_vm.ariaLabel ? undefined : (_vm.id + "-content"),"aria-label":_vm.ariaLabel}},_vm.chipListeners),[(_vm.$slots.icon)?_c('span',{staticClass:"d-chip__icon",attrs:{"data-qa":"dt-chip-icon"}},[_vm._t("icon")],2):(_vm.$slots.avatar)?_c('span',{attrs:{"data-qa":"dt-chip-avatar"}},[_vm._t("avatar")],2):_vm._e(),(_vm.$slots.default)?_c('span',{class:['d-truncate', 'd-chip__text', _vm.contentClass],attrs:{"id":(_vm.id + "-content"),"data-qa":"dt-chip-label"}},[_vm._t("default")],2):_vm._e()]),(!_vm.hideClose)?_c('dt-button',_vm._b({class:_vm.chipCloseButtonClasses(),attrs:{"data-qa":"dt-chip-close","aria-label":_vm.closeButtonProps.ariaLabel},on:{"click":function($event){return _vm.$emit('close')}},scopedSlots:_vm._u([{key:"icon",fn:function(){return [_c('dt-icon',{attrs:{"name":"close","size":_vm.closeButtonIconSize}})]},proxy:true}],null,false,1192647893)},'dt-button',_vm.closeButtonProps,false)):_vm._e()],1)}
|
|
18243
|
+
var chipvue_type_template_id_128cc6e8_staticRenderFns = []
|
|
17167
18244
|
|
|
17168
18245
|
|
|
17169
18246
|
;// CONCATENATED MODULE: ./components/chip/chip_constants.js
|
|
@@ -17242,7 +18319,6 @@ const CHIP_ICON_SIZES = {
|
|
|
17242
18319
|
//
|
|
17243
18320
|
//
|
|
17244
18321
|
//
|
|
17245
|
-
//
|
|
17246
18322
|
|
|
17247
18323
|
|
|
17248
18324
|
|
|
@@ -17260,7 +18336,6 @@ const CHIP_ICON_SIZES = {
|
|
|
17260
18336
|
DtButton: button_button,
|
|
17261
18337
|
DtIcon: icon
|
|
17262
18338
|
},
|
|
17263
|
-
inheritAttrs: false,
|
|
17264
18339
|
props: {
|
|
17265
18340
|
/**
|
|
17266
18341
|
* A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.
|
|
@@ -17331,6 +18406,14 @@ const CHIP_ICON_SIZES = {
|
|
|
17331
18406
|
contentClass: {
|
|
17332
18407
|
type: [String, Array, Object],
|
|
17333
18408
|
default: ''
|
|
18409
|
+
},
|
|
18410
|
+
|
|
18411
|
+
/**
|
|
18412
|
+
* Additional class name for the span element.
|
|
18413
|
+
*/
|
|
18414
|
+
labelClass: {
|
|
18415
|
+
type: [String, Array, Object],
|
|
18416
|
+
default: ''
|
|
17334
18417
|
}
|
|
17335
18418
|
},
|
|
17336
18419
|
emits: [
|
|
@@ -17386,7 +18469,7 @@ const CHIP_ICON_SIZES = {
|
|
|
17386
18469
|
},
|
|
17387
18470
|
methods: {
|
|
17388
18471
|
chipClasses() {
|
|
17389
|
-
return [this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label', CHIP_SIZE_MODIFIERS[this.size]];
|
|
18472
|
+
return [this.$attrs['grouped-chip'] ? ['d-chip', ...this.labelClass] : 'd-chip__label', CHIP_SIZE_MODIFIERS[this.size]];
|
|
17390
18473
|
},
|
|
17391
18474
|
|
|
17392
18475
|
chipCloseButtonClasses() {
|
|
@@ -17413,8 +18496,8 @@ const CHIP_ICON_SIZES = {
|
|
|
17413
18496
|
;
|
|
17414
18497
|
var chip_component = normalizeComponent(
|
|
17415
18498
|
chip_chipvue_type_script_lang_js_,
|
|
17416
|
-
|
|
17417
|
-
|
|
18499
|
+
chipvue_type_template_id_128cc6e8_render,
|
|
18500
|
+
chipvue_type_template_id_128cc6e8_staticRenderFns,
|
|
17418
18501
|
false,
|
|
17419
18502
|
null,
|
|
17420
18503
|
null,
|
|
@@ -19297,15 +20380,15 @@ var root_layout_component = normalizeComponent(
|
|
|
19297
20380
|
;// CONCATENATED MODULE: ./components/root_layout/index.js
|
|
19298
20381
|
|
|
19299
20382
|
|
|
19300
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue?vue&type=template&id=
|
|
19301
|
-
var
|
|
20383
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue?vue&type=template&id=7d75f1f4&
|
|
20384
|
+
var combobox_with_popovervue_type_template_id_7d75f1f4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-combobox',_vm._g({ref:"combobox",attrs:{"loading":_vm.loading,"label":_vm.label,"label-visible":_vm.labelVisible,"size":_vm.size,"description":_vm.description,"empty-list":_vm.emptyList,"empty-state-message":_vm.emptyStateMessage,"show-list":_vm.isListShown,"on-beginning-of-list":_vm.onBeginningOfList,"on-end-of-list":_vm.onEndOfList,"list-rendered-outside":true,"list-id":_vm.listId,"data-qa":"dt-combobox"},scopedSlots:_vm._u([{key:"input",fn:function(ref){
|
|
19302
20385
|
var inputProps = ref.inputProps;
|
|
19303
20386
|
return [_c('div',{ref:"input",attrs:{"id":_vm.externalAnchor},on:{"focusin":_vm.onFocusIn,"focusout":_vm.onFocusOut,"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }return _vm.openOnArrowKeyPress($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }return _vm.openOnArrowKeyPress($event)}]}},[_vm._t("input",null,{"inputProps":inputProps,"onInput":_vm.handleDisplayList})],2)]}},{key:"list",fn:function(ref){
|
|
19304
20387
|
var opened = ref.opened;
|
|
19305
20388
|
var listProps = ref.listProps;
|
|
19306
20389
|
var clearHighlightIndex = ref.clearHighlightIndex;
|
|
19307
20390
|
return [_c('dt-popover',{ref:"popover",attrs:{"open":_vm.isListShown,"hide-on-click":_vm.showList === null,"max-height":_vm.maxHeight,"max-width":_vm.maxWidth,"offset":_vm.popoverOffset,"sticky":_vm.popoverSticky,"placement":"bottom-start","initial-focus-element":"none","padding":"none","role":"listbox","external-anchor":_vm.externalAnchor,"content-width":_vm.contentWidth,"content-tabindex":null,"modal":false,"auto-focus":false,"visually-hidden-close-label":_vm.visuallyHiddenCloseLabel,"visually-hidden-close":_vm.visuallyHiddenClose},on:{"update:open":function($event){_vm.isListShown=$event},"opened":function($event){return opened($event, arguments[1]);}},scopedSlots:_vm._u([{key:"headerContent",fn:function(){return [(_vm.$slots.header)?_c('div',{ref:"header",on:{"focusout":_vm.onFocusOut}},[_vm._t("header")],2):_vm._e()]},proxy:true},{key:"content",fn:function(){return [_c('div',{ref:"listWrapper",class:[_vm.DROPDOWN_PADDING_CLASSES[_vm.padding], _vm.listClass],on:{"mouseleave":clearHighlightIndex,"focusout":function($event){clearHighlightIndex; _vm.onFocusOut;}}},[(_vm.loading)?_c('combobox-loading-list',_vm._b({},'combobox-loading-list',listProps,false)):(_vm.emptyList && _vm.emptyStateMessage)?_c('combobox-empty-list',_vm._b({attrs:{"message":_vm.emptyStateMessage}},'combobox-empty-list',listProps,false)):_vm._t("list",null,{"listProps":listProps})],2)]},proxy:true},{key:"footerContent",fn:function(){return [(_vm.$slots.footer)?_c('div',{ref:"footer",on:{"focusout":_vm.onFocusOut}},[_vm._t("footer")],2):_vm._e()]},proxy:true}],null,true)})]}}],null,true)},_vm.comboboxListeners))}
|
|
19308
|
-
var
|
|
20391
|
+
var combobox_with_popovervue_type_template_id_7d75f1f4_staticRenderFns = []
|
|
19309
20392
|
|
|
19310
20393
|
|
|
19311
20394
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue?vue&type=script&lang=js&
|
|
@@ -19740,7 +20823,7 @@ var combobox_with_popovervue_type_template_id_dea81786_staticRenderFns = []
|
|
|
19740
20823
|
onFocusOut(e) {
|
|
19741
20824
|
const comboboxRefs = ['input', 'header', 'footer', 'listWrapper']; // Check if the focus change was to another target within the combobox component
|
|
19742
20825
|
|
|
19743
|
-
const isComboboxStillFocused = comboboxRefs.some(ref => {
|
|
20826
|
+
const isComboboxStillFocused = e.relatedTarget === null || comboboxRefs.some(ref => {
|
|
19744
20827
|
var _this$$refs$ref;
|
|
19745
20828
|
|
|
19746
20829
|
return (_this$$refs$ref = this.$refs[ref]) === null || _this$$refs$ref === void 0 ? void 0 : _this$$refs$ref.contains(e.relatedTarget);
|
|
@@ -19773,8 +20856,8 @@ var combobox_with_popovervue_type_template_id_dea81786_staticRenderFns = []
|
|
|
19773
20856
|
;
|
|
19774
20857
|
var combobox_with_popover_component = normalizeComponent(
|
|
19775
20858
|
combobox_with_popover_combobox_with_popovervue_type_script_lang_js_,
|
|
19776
|
-
|
|
19777
|
-
|
|
20859
|
+
combobox_with_popovervue_type_template_id_7d75f1f4_render,
|
|
20860
|
+
combobox_with_popovervue_type_template_id_7d75f1f4_staticRenderFns,
|
|
19778
20861
|
false,
|
|
19779
20862
|
null,
|
|
19780
20863
|
null,
|
|
@@ -19785,11 +20868,11 @@ var combobox_with_popover_component = normalizeComponent(
|
|
|
19785
20868
|
/* harmony default export */ const combobox_with_popover = (combobox_with_popover_component.exports);
|
|
19786
20869
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
|
|
19787
20870
|
|
|
19788
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=
|
|
19789
|
-
var
|
|
20871
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=97461302&
|
|
20872
|
+
var combobox_multi_selectvue_type_template_id_97461302_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-recipe-combobox-with-popover',{ref:"comboboxWithPopover",attrs:{"label":_vm.label,"show-list":_vm.showList,"max-height":_vm.listMaxHeight,"popover-offset":_vm.popoverOffset,"has-suggestion-list":_vm.hasSuggestionList,"visually-hidden-close-label":_vm.visuallyHiddenCloseLabel,"visually-hidden-close":_vm.visuallyHiddenClose,"content-width":"anchor"},on:{"select":_vm.onComboboxSelect},scopedSlots:_vm._u([{key:"input",fn:function(ref){
|
|
19790
20873
|
var onInput = ref.onInput;
|
|
19791
|
-
return [_c('span',{ref:"inputSlotWrapper",staticClass:"d-ps-relative"},[_c('span',{ref:"chipsWrapper",staticClass:"d-ps-absolute d-mx2"},_vm._l((_vm.selectedItems),function(item){return _c('dt-chip',_vm._g({key:item.id,ref:"chips",refInFor:true,
|
|
19792
|
-
var
|
|
20874
|
+
return [_c('span',{ref:"inputSlotWrapper",staticClass:"d-ps-relative d-d-block"},[_c('span',{ref:"chipsWrapper",staticClass:"d-ps-absolute d-mx2"},_vm._l((_vm.selectedItems),function(item){return _c('dt-chip',_vm._g({key:item.id,ref:"chips",refInFor:true,class:['d-mt4', 'd-mx2', 'd-zi-base1'],attrs:{"label-class":['d-chip__label'],"close-button-props":{ ariaLabel: 'close' },"size":_vm.size},on:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"backspace",undefined,$event.key,undefined)){ return null; }return _vm.onChipRemove(item)},"close":function($event){return _vm.onChipRemove(item)}}},_vm.chipListeners),[_vm._v(" "+_vm._s(item)+" ")])}),1),_c('dt-input',_vm._g({ref:"input",staticClass:"d-fl-grow1",attrs:{"aria-label":_vm.label,"label":_vm.labelVisible ? _vm.label : '',"description":_vm.description,"placeholder":_vm.inputPlaceHolder,"show-messages":_vm.showInputMessages,"messages":_vm.inputMessages,"size":_vm.size},on:{"input":onInput},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}},_vm.inputListeners)),_c('dt-validation-messages',{attrs:{"validation-messages":_vm.maxSelectedMessage,"show-messages":_vm.showValidationMessages}})],1)]}},{key:"header",fn:function(){return [(_vm.$slots.header)?_c('div',{ref:"header"},[_vm._t("header")],2):_vm._e()]},proxy:true},{key:"list",fn:function(){return [_c('div',{ref:"list",on:{"mousedown":function($event){$event.preventDefault();}}},[(!_vm.loading)?_vm._t("list"):_c('div',{staticClass:"d-ta-center d-py16"},[_vm._v(" "+_vm._s(_vm.loadingMessage)+" ")])],2)]},proxy:true},{key:"footer",fn:function(){return [(_vm.$slots.footer)?_c('div',{ref:"footer"},[_vm._t("footer")],2):_vm._e()]},proxy:true}],null,true)})}
|
|
20875
|
+
var combobox_multi_selectvue_type_template_id_97461302_staticRenderFns = []
|
|
19793
20876
|
|
|
19794
20877
|
|
|
19795
20878
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
|
|
@@ -19994,6 +21077,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
19994
21077
|
//
|
|
19995
21078
|
//
|
|
19996
21079
|
//
|
|
21080
|
+
//
|
|
19997
21081
|
|
|
19998
21082
|
|
|
19999
21083
|
|
|
@@ -20471,8 +21555,8 @@ const MULTI_SELECT_SIZES = {
|
|
|
20471
21555
|
;
|
|
20472
21556
|
var combobox_multi_select_component = normalizeComponent(
|
|
20473
21557
|
combobox_multi_select_combobox_multi_selectvue_type_script_lang_js_,
|
|
20474
|
-
|
|
20475
|
-
|
|
21558
|
+
combobox_multi_selectvue_type_template_id_97461302_render,
|
|
21559
|
+
combobox_multi_selectvue_type_template_id_97461302_staticRenderFns,
|
|
20476
21560
|
false,
|
|
20477
21561
|
null,
|
|
20478
21562
|
null,
|