@d-i-t-a/reader 2.1.3 → 2.1.5
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/esm/index.js +416 -226
- package/dist/esm/index.js.map +3 -3
- package/dist/reader.js +29 -29
- package/dist/reader.js.map +3 -3
- package/dist/types/modules/highlight/TextHighlighter.d.ts +1 -0
- package/dist/types/modules/protection/ContentProtectionModule.d.ts +22 -0
- package/dist/types/reader.d.ts +1 -0
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -30615,8 +30615,37 @@ var require_devtools_detector = __commonJS({
|
|
|
30615
30615
|
return e.d(n2, "a", n2), n2;
|
|
30616
30616
|
}, e.o = function(t2, n2) {
|
|
30617
30617
|
return Object.prototype.hasOwnProperty.call(t2, n2);
|
|
30618
|
-
}, e.p = "", e(e.s =
|
|
30618
|
+
}, e.p = "", e(e.s = 3);
|
|
30619
30619
|
}([function(t, n, e) {
|
|
30620
|
+
"use strict";
|
|
30621
|
+
e.d(n, "j", function() {
|
|
30622
|
+
return s;
|
|
30623
|
+
}), e.d(n, "e", function() {
|
|
30624
|
+
return l;
|
|
30625
|
+
}), e.d(n, "f", function() {
|
|
30626
|
+
return d;
|
|
30627
|
+
}), e.d(n, "d", function() {
|
|
30628
|
+
return h;
|
|
30629
|
+
}), e.d(n, "i", function() {
|
|
30630
|
+
return p;
|
|
30631
|
+
}), e.d(n, "g", function() {
|
|
30632
|
+
return v;
|
|
30633
|
+
}), e.d(n, "c", function() {
|
|
30634
|
+
return b;
|
|
30635
|
+
}), e.d(n, "h", function() {
|
|
30636
|
+
return y;
|
|
30637
|
+
}), n.a = function() {
|
|
30638
|
+
for (var t2, n2 = [], e2 = 0; e2 < arguments.length; e2++)
|
|
30639
|
+
n2[e2] = arguments[e2];
|
|
30640
|
+
if (f === null || f === void 0 ? void 0 : f.document)
|
|
30641
|
+
return (t2 = f.document).createElement.apply(t2, n2);
|
|
30642
|
+
return {};
|
|
30643
|
+
}, e.d(n, "b", function() {
|
|
30644
|
+
return w;
|
|
30645
|
+
});
|
|
30646
|
+
var r, i, o, u, c, a = e(1), f = Object(a.a)(), s = ((r = f === null || f === void 0 ? void 0 : f.navigator) === null || r === void 0 ? void 0 : r.userAgent) || "unknown", l = "InstallTrigger" in ((f === null || f === void 0 ? void 0 : f.window) || {}) || /firefox/i.test(s), d = /trident/i.test(s) || /msie/i.test(s), h = /edge/i.test(s), p = /webkit/i.test(s) && !h, v = /IqiyiApp/.test(s), b = ((i = f === null || f === void 0 ? void 0 : f.window) === null || i === void 0 ? void 0 : i.chrome) !== void 0 || /chrome/i.test(s) || /CriOS/i.test(s), y = (((u = (o = f === null || f === void 0 ? void 0 : f.window) === null || o === void 0 ? void 0 : o.safari) === null || u === void 0 ? void 0 : u.pushNotification) || false).toString() === "[object SafariRemoteNotification]" || /safari/i.test(s) && !b;
|
|
30647
|
+
var w = typeof ((c = f.document) === null || c === void 0 ? void 0 : c.createElement) == "function";
|
|
30648
|
+
}, function(t, n, e) {
|
|
30620
30649
|
"use strict";
|
|
30621
30650
|
(function(t2) {
|
|
30622
30651
|
n.c = function() {
|
|
@@ -30652,24 +30681,8 @@ var require_devtools_detector = __commonJS({
|
|
|
30652
30681
|
return t2;
|
|
30653
30682
|
return this;
|
|
30654
30683
|
};
|
|
30655
|
-
var r = e(
|
|
30656
|
-
}).call(n, e(
|
|
30657
|
-
}, function(t, n, e) {
|
|
30658
|
-
"use strict";
|
|
30659
|
-
e.d(n, "c", function() {
|
|
30660
|
-
return f;
|
|
30661
|
-
}), e.d(n, "d", function() {
|
|
30662
|
-
return s;
|
|
30663
|
-
}), e.d(n, "b", function() {
|
|
30664
|
-
return l;
|
|
30665
|
-
}), e.d(n, "f", function() {
|
|
30666
|
-
return d;
|
|
30667
|
-
}), e.d(n, "a", function() {
|
|
30668
|
-
return h;
|
|
30669
|
-
}), e.d(n, "e", function() {
|
|
30670
|
-
return p;
|
|
30671
|
-
});
|
|
30672
|
-
var r, i, o, u = e(3), c = e(0), a = Object(c.a)(), f = "InstallTrigger" in ((a === null || a === void 0 ? void 0 : a.window) || {}) || /firefox/i.test(u.b), s = /trident/i.test(u.b) || /msie/i.test(u.b), l = /edge/i.test(u.b), d = /webkit/i.test(u.b) && !l, h = ((r = a === null || a === void 0 ? void 0 : a.window) === null || r === void 0 ? void 0 : r.chrome) !== void 0 || /chrome/i.test(u.b) || /CriOS/i.test(u.b), p = (((o = (i = a === null || a === void 0 ? void 0 : a.window) === null || i === void 0 ? void 0 : i.safari) === null || o === void 0 ? void 0 : o.pushNotification) || false).toString() === "[object SafariRemoteNotification]" || /safari/i.test(u.b) && !h;
|
|
30684
|
+
var r = e(8), i = (e.n(r), e(4));
|
|
30685
|
+
}).call(n, e(7));
|
|
30673
30686
|
}, function(t, n, e) {
|
|
30674
30687
|
"use strict";
|
|
30675
30688
|
e.d(n, "b", function() {
|
|
@@ -30679,10 +30692,10 @@ var require_devtools_detector = __commonJS({
|
|
|
30679
30692
|
}), e.d(n, "a", function() {
|
|
30680
30693
|
return c;
|
|
30681
30694
|
});
|
|
30682
|
-
var r = e(
|
|
30695
|
+
var r = e(0);
|
|
30683
30696
|
function i(t2) {
|
|
30684
30697
|
if (console) {
|
|
30685
|
-
if (!r.
|
|
30698
|
+
if (!r.f && !r.d)
|
|
30686
30699
|
return console[t2];
|
|
30687
30700
|
if (t2 === "log" || t2 === "clear")
|
|
30688
30701
|
return function() {
|
|
@@ -30697,59 +30710,54 @@ var require_devtools_detector = __commonJS({
|
|
|
30697
30710
|
};
|
|
30698
30711
|
}
|
|
30699
30712
|
var o = i("log"), u = i("table"), c = i("clear");
|
|
30700
|
-
}, function(t, n, e) {
|
|
30701
|
-
"use strict";
|
|
30702
|
-
n.a = function() {
|
|
30703
|
-
for (var t2, n2 = [], e2 = 0; e2 < arguments.length; e2++)
|
|
30704
|
-
n2[e2] = arguments[e2];
|
|
30705
|
-
if (o === null || o === void 0 ? void 0 : o.document)
|
|
30706
|
-
return (t2 = o.document).createElement.apply(t2, n2);
|
|
30707
|
-
return {};
|
|
30708
|
-
}, e.d(n, "b", function() {
|
|
30709
|
-
return u;
|
|
30710
|
-
});
|
|
30711
|
-
var r, i = e(0), o = Object(i.a)();
|
|
30712
|
-
var u = ((r = o === null || o === void 0 ? void 0 : o.navigator) === null || r === void 0 ? void 0 : r.userAgent) || "xxxxx";
|
|
30713
30713
|
}, function(t, n, e) {
|
|
30714
30714
|
"use strict";
|
|
30715
30715
|
Object.defineProperty(n, "__esModule", { value: true }), n.addListener = function(t2) {
|
|
30716
|
-
|
|
30716
|
+
s.addListener(t2);
|
|
30717
30717
|
}, n.removeListener = function(t2) {
|
|
30718
|
-
|
|
30718
|
+
s.removeListener(t2);
|
|
30719
30719
|
}, n.isLaunch = function() {
|
|
30720
|
-
return
|
|
30720
|
+
return s.isLaunch();
|
|
30721
30721
|
}, n.launch = function() {
|
|
30722
|
-
|
|
30722
|
+
s.launch();
|
|
30723
30723
|
}, n.stop = function() {
|
|
30724
|
-
|
|
30724
|
+
s.stop();
|
|
30725
30725
|
}, n.setDetectDelay = function(t2) {
|
|
30726
|
-
|
|
30726
|
+
s.setDetectDelay(t2);
|
|
30727
30727
|
};
|
|
30728
|
-
var r = e(
|
|
30728
|
+
var r = e(6), i = e(9);
|
|
30729
30729
|
e.d(n, "DevtoolsDetector", function() {
|
|
30730
30730
|
return r.a;
|
|
30731
30731
|
}), e.d(n, "checkers", function() {
|
|
30732
30732
|
return i;
|
|
30733
30733
|
});
|
|
30734
|
-
var o = e(
|
|
30734
|
+
var o = e(1);
|
|
30735
30735
|
e.d(n, "match", function() {
|
|
30736
30736
|
return o.b;
|
|
30737
30737
|
}), e.d(n, "specificVersionMatch", function() {
|
|
30738
30738
|
return o.d;
|
|
30739
30739
|
});
|
|
30740
|
-
var u = e(
|
|
30741
|
-
e.d(n, "
|
|
30742
|
-
return u.
|
|
30740
|
+
var u = e(0);
|
|
30741
|
+
e.d(n, "userAgent", function() {
|
|
30742
|
+
return u.j;
|
|
30743
|
+
}), e.d(n, "isFirefox", function() {
|
|
30744
|
+
return u.e;
|
|
30743
30745
|
}), e.d(n, "isIE", function() {
|
|
30744
|
-
return u.
|
|
30746
|
+
return u.f;
|
|
30745
30747
|
}), e.d(n, "isEdge", function() {
|
|
30746
|
-
return u.
|
|
30748
|
+
return u.d;
|
|
30747
30749
|
}), e.d(n, "isWebkit", function() {
|
|
30748
|
-
return u.
|
|
30750
|
+
return u.i;
|
|
30751
|
+
}), e.d(n, "isIqiyiApp", function() {
|
|
30752
|
+
return u.g;
|
|
30749
30753
|
}), e.d(n, "isChrome", function() {
|
|
30750
|
-
return u.
|
|
30754
|
+
return u.c;
|
|
30751
30755
|
}), e.d(n, "isSafari", function() {
|
|
30752
|
-
return u.
|
|
30756
|
+
return u.h;
|
|
30757
|
+
}), e.d(n, "createElement", function() {
|
|
30758
|
+
return u.a;
|
|
30759
|
+
}), e.d(n, "inBrowser", function() {
|
|
30760
|
+
return u.b;
|
|
30753
30761
|
});
|
|
30754
30762
|
var c = e(2);
|
|
30755
30763
|
e.d(n, "log", function() {
|
|
@@ -30759,34 +30767,30 @@ var require_devtools_detector = __commonJS({
|
|
|
30759
30767
|
}), e.d(n, "clear", function() {
|
|
30760
30768
|
return c.a;
|
|
30761
30769
|
});
|
|
30762
|
-
var a = e(
|
|
30763
|
-
e.d(n, "
|
|
30770
|
+
var a = e(4);
|
|
30771
|
+
e.d(n, "versionMap", function() {
|
|
30764
30772
|
return a.a;
|
|
30765
30773
|
});
|
|
30766
30774
|
var f = e(5);
|
|
30767
|
-
e.d(n, "versionMap", function() {
|
|
30768
|
-
return f.a;
|
|
30769
|
-
});
|
|
30770
|
-
var s = e(6);
|
|
30771
30775
|
e.d(n, "isMac", function() {
|
|
30772
|
-
return
|
|
30776
|
+
return f.d;
|
|
30773
30777
|
}), e.d(n, "isIpad", function() {
|
|
30774
|
-
return
|
|
30778
|
+
return f.b;
|
|
30775
30779
|
}), e.d(n, "isIphone", function() {
|
|
30776
|
-
return
|
|
30780
|
+
return f.c;
|
|
30777
30781
|
}), e.d(n, "isAndroid", function() {
|
|
30778
|
-
return
|
|
30782
|
+
return f.a;
|
|
30779
30783
|
}), e.d(n, "isWindows", function() {
|
|
30780
|
-
return
|
|
30784
|
+
return f.e;
|
|
30781
30785
|
});
|
|
30782
|
-
var
|
|
30783
|
-
n.default =
|
|
30786
|
+
var s = new r.a({ checkers: [i.erudaChecker, i.elementIdChecker, i.regToStringChecker, i.functionToStringChecker, i.depRegToStringChecker, i.dateToStringChecker, i.performanceChecker, i.debuggerChecker] });
|
|
30787
|
+
n.default = s;
|
|
30784
30788
|
}, function(t, n, e) {
|
|
30785
30789
|
"use strict";
|
|
30786
30790
|
e.d(n, "a", function() {
|
|
30787
30791
|
return r;
|
|
30788
30792
|
});
|
|
30789
|
-
for (var r = {}, i = 0, o = (e(
|
|
30793
|
+
for (var r = {}, i = 0, o = (e(0).j || "").match(/\w+\/(\d|\.)+(\s|$)/gi) || []; i < o.length; i++) {
|
|
30790
30794
|
var u = o[i].split("/"), c = u[0], a = u[1];
|
|
30791
30795
|
r[c] = a;
|
|
30792
30796
|
}
|
|
@@ -30803,15 +30807,15 @@ var require_devtools_detector = __commonJS({
|
|
|
30803
30807
|
}), e.d(n, "e", function() {
|
|
30804
30808
|
return a;
|
|
30805
30809
|
});
|
|
30806
|
-
var r = e(
|
|
30810
|
+
var r = e(0), i = /macintosh/i.test(r.j), o = /ipad/i.test(r.j) || i && navigator.maxTouchPoints > 1, u = /iphone/i.test(r.j), c = /android/i.test(r.j), a = /windows/i.test(r.j);
|
|
30807
30811
|
}, function(t, n, e) {
|
|
30808
30812
|
"use strict";
|
|
30809
30813
|
e.d(n, "a", function() {
|
|
30810
|
-
return
|
|
30814
|
+
return u;
|
|
30811
30815
|
});
|
|
30812
|
-
var r = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
30816
|
+
var r = e(0), i = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
30813
30817
|
return new (e2 || (e2 = Promise))(function(i2, o2) {
|
|
30814
|
-
function
|
|
30818
|
+
function u2(t3) {
|
|
30815
30819
|
try {
|
|
30816
30820
|
a(r2.next(t3));
|
|
30817
30821
|
} catch (t4) {
|
|
@@ -30830,12 +30834,12 @@ var require_devtools_detector = __commonJS({
|
|
|
30830
30834
|
return t4 instanceof e2 ? t4 : new e2(function(n3) {
|
|
30831
30835
|
n3(t4);
|
|
30832
30836
|
});
|
|
30833
|
-
}(t3.value).then(
|
|
30837
|
+
}(t3.value).then(u2, c);
|
|
30834
30838
|
}
|
|
30835
30839
|
a((r2 = r2.apply(t2, n2 || [])).next());
|
|
30836
30840
|
});
|
|
30837
|
-
},
|
|
30838
|
-
var e2, r2, i2, o2,
|
|
30841
|
+
}, o = this && this.__generator || function(t2, n2) {
|
|
30842
|
+
var e2, r2, i2, o2, u2 = { label: 0, sent: function() {
|
|
30839
30843
|
if (1 & i2[0])
|
|
30840
30844
|
throw i2[1];
|
|
30841
30845
|
return i2[1];
|
|
@@ -30848,7 +30852,7 @@ var require_devtools_detector = __commonJS({
|
|
|
30848
30852
|
return function(o4) {
|
|
30849
30853
|
if (e2)
|
|
30850
30854
|
throw new TypeError("Generator is already executing.");
|
|
30851
|
-
for (;
|
|
30855
|
+
for (; u2; )
|
|
30852
30856
|
try {
|
|
30853
30857
|
if (e2 = 1, r2 && (i2 = 2 & o4[0] ? r2.return : o4[0] ? r2.throw || ((i2 = r2.return) && i2.call(r2), 0) : r2.next) && !(i2 = i2.call(r2, o4[1])).done)
|
|
30854
30858
|
return i2;
|
|
@@ -30858,34 +30862,34 @@ var require_devtools_detector = __commonJS({
|
|
|
30858
30862
|
i2 = o4;
|
|
30859
30863
|
break;
|
|
30860
30864
|
case 4:
|
|
30861
|
-
return
|
|
30865
|
+
return u2.label++, { value: o4[1], done: false };
|
|
30862
30866
|
case 5:
|
|
30863
|
-
|
|
30867
|
+
u2.label++, r2 = o4[1], o4 = [0];
|
|
30864
30868
|
continue;
|
|
30865
30869
|
case 7:
|
|
30866
|
-
o4 =
|
|
30870
|
+
o4 = u2.ops.pop(), u2.trys.pop();
|
|
30867
30871
|
continue;
|
|
30868
30872
|
default:
|
|
30869
|
-
if (!(i2 = (i2 =
|
|
30870
|
-
|
|
30873
|
+
if (!(i2 = (i2 = u2.trys).length > 0 && i2[i2.length - 1]) && (o4[0] === 6 || o4[0] === 2)) {
|
|
30874
|
+
u2 = 0;
|
|
30871
30875
|
continue;
|
|
30872
30876
|
}
|
|
30873
30877
|
if (o4[0] === 3 && (!i2 || o4[1] > i2[0] && o4[1] < i2[3])) {
|
|
30874
|
-
|
|
30878
|
+
u2.label = o4[1];
|
|
30875
30879
|
break;
|
|
30876
30880
|
}
|
|
30877
|
-
if (o4[0] === 6 &&
|
|
30878
|
-
|
|
30881
|
+
if (o4[0] === 6 && u2.label < i2[1]) {
|
|
30882
|
+
u2.label = i2[1], i2 = o4;
|
|
30879
30883
|
break;
|
|
30880
30884
|
}
|
|
30881
|
-
if (i2 &&
|
|
30882
|
-
|
|
30885
|
+
if (i2 && u2.label < i2[2]) {
|
|
30886
|
+
u2.label = i2[2], u2.ops.push(o4);
|
|
30883
30887
|
break;
|
|
30884
30888
|
}
|
|
30885
|
-
i2[2] &&
|
|
30889
|
+
i2[2] && u2.ops.pop(), u2.trys.pop();
|
|
30886
30890
|
continue;
|
|
30887
30891
|
}
|
|
30888
|
-
o4 = n2.call(t2,
|
|
30892
|
+
o4 = n2.call(t2, u2);
|
|
30889
30893
|
} catch (t3) {
|
|
30890
30894
|
o4 = [6, t3], r2 = 0;
|
|
30891
30895
|
} finally {
|
|
@@ -30897,13 +30901,13 @@ var require_devtools_detector = __commonJS({
|
|
|
30897
30901
|
}([o3, c2]);
|
|
30898
30902
|
};
|
|
30899
30903
|
}
|
|
30900
|
-
},
|
|
30904
|
+
}, u = function() {
|
|
30901
30905
|
function t2(t3) {
|
|
30902
30906
|
var n2 = t3.checkers;
|
|
30903
30907
|
this._listeners = [], this._isOpen = false, this._detectLoopStopped = true, this._detectLoopDelay = 500, this._checkers = n2.slice();
|
|
30904
30908
|
}
|
|
30905
30909
|
return t2.prototype.launch = function() {
|
|
30906
|
-
this._detectLoopDelay <= 0 && this.setDetectDelay(500), this._detectLoopStopped && (this._detectLoopStopped = false, this._detectLoop());
|
|
30910
|
+
r.b && (this._detectLoopDelay <= 0 && this.setDetectDelay(500), this._detectLoopStopped && (this._detectLoopStopped = false, this._detectLoop()));
|
|
30907
30911
|
}, t2.prototype.stop = function() {
|
|
30908
30912
|
this._detectLoopStopped || (this._detectLoopStopped = true, clearTimeout(this._timer));
|
|
30909
30913
|
}, t2.prototype.isLaunch = function() {
|
|
@@ -30925,65 +30929,137 @@ var require_devtools_detector = __commonJS({
|
|
|
30925
30929
|
}
|
|
30926
30930
|
}
|
|
30927
30931
|
}, t2.prototype._detectLoop = function() {
|
|
30928
|
-
return
|
|
30929
|
-
var t3, n2, e2, r2,
|
|
30930
|
-
return
|
|
30931
|
-
switch (
|
|
30932
|
+
return i(this, void 0, void 0, function() {
|
|
30933
|
+
var t3, n2, e2, r2, i2, u2 = this;
|
|
30934
|
+
return o(this, function(o2) {
|
|
30935
|
+
switch (o2.label) {
|
|
30932
30936
|
case 0:
|
|
30933
|
-
t3 = false, n2 = "", e2 = 0, r2 = this._checkers,
|
|
30937
|
+
t3 = false, n2 = "", e2 = 0, r2 = this._checkers, o2.label = 1;
|
|
30934
30938
|
case 1:
|
|
30935
|
-
return e2 < r2.length ? [4, (
|
|
30939
|
+
return e2 < r2.length ? [4, (i2 = r2[e2]).isEnable()] : [3, 6];
|
|
30936
30940
|
case 2:
|
|
30937
|
-
return
|
|
30941
|
+
return o2.sent() ? (n2 = i2.name, [4, i2.isOpen()]) : [3, 4];
|
|
30938
30942
|
case 3:
|
|
30939
|
-
t3 =
|
|
30943
|
+
t3 = o2.sent(), o2.label = 4;
|
|
30940
30944
|
case 4:
|
|
30941
30945
|
if (t3)
|
|
30942
30946
|
return [3, 6];
|
|
30943
|
-
|
|
30947
|
+
o2.label = 5;
|
|
30944
30948
|
case 5:
|
|
30945
30949
|
return e2++, [3, 1];
|
|
30946
30950
|
case 6:
|
|
30947
|
-
return t3 != this._isOpen && (this._isOpen = t3, this._broadcast({ isOpen: t3, checkerName: n2 })), this._detectLoopDelay > 0 ? this._timer = setTimeout(function() {
|
|
30948
|
-
return
|
|
30951
|
+
return t3 != this._isOpen && (this._isOpen = t3, this._broadcast({ isOpen: t3, checkerName: n2 })), this._detectLoopDelay > 0 && !this._detectLoopStopped ? this._timer = setTimeout(function() {
|
|
30952
|
+
return u2._detectLoop();
|
|
30949
30953
|
}, this._detectLoopDelay) : this.stop(), [2];
|
|
30950
30954
|
}
|
|
30951
30955
|
});
|
|
30952
30956
|
});
|
|
30953
30957
|
}, t2;
|
|
30954
30958
|
}();
|
|
30959
|
+
}, function(t, n) {
|
|
30960
|
+
var e;
|
|
30961
|
+
e = function() {
|
|
30962
|
+
return this;
|
|
30963
|
+
}();
|
|
30964
|
+
try {
|
|
30965
|
+
e = e || Function("return this")() || (0, eval)("this");
|
|
30966
|
+
} catch (t2) {
|
|
30967
|
+
typeof window == "object" && (e = window);
|
|
30968
|
+
}
|
|
30969
|
+
t.exports = e;
|
|
30970
|
+
}, function(t, n, e) {
|
|
30971
|
+
var r, i, o;
|
|
30972
|
+
!function(e2, u) {
|
|
30973
|
+
i = [], (o = typeof (r = u) == "function" ? r.apply(n, i) : r) === void 0 || (t.exports = o);
|
|
30974
|
+
}(0, function() {
|
|
30975
|
+
var t2 = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
|
|
30976
|
+
function n2(t3) {
|
|
30977
|
+
var n3 = t3.replace(/^v/, "").replace(/\+.*$/, ""), e3 = function(t4, n4) {
|
|
30978
|
+
return t4.indexOf(n4) === -1 ? t4.length : t4.indexOf(n4);
|
|
30979
|
+
}(n3, "-"), r3 = n3.substring(0, e3).split(".");
|
|
30980
|
+
return r3.push(n3.substring(e3 + 1)), r3;
|
|
30981
|
+
}
|
|
30982
|
+
function e2(t3) {
|
|
30983
|
+
return isNaN(Number(t3)) ? t3 : Number(t3);
|
|
30984
|
+
}
|
|
30985
|
+
function r2(n3) {
|
|
30986
|
+
if (typeof n3 != "string")
|
|
30987
|
+
throw new TypeError("Invalid argument expected string");
|
|
30988
|
+
if (!t2.test(n3))
|
|
30989
|
+
throw new Error("Invalid argument not valid semver ('" + n3 + "' received)");
|
|
30990
|
+
}
|
|
30991
|
+
function i2(t3, i3) {
|
|
30992
|
+
[t3, i3].forEach(r2);
|
|
30993
|
+
for (var o3 = n2(t3), u2 = n2(i3), c = 0; c < Math.max(o3.length - 1, u2.length - 1); c++) {
|
|
30994
|
+
var a = parseInt(o3[c] || 0, 10), f = parseInt(u2[c] || 0, 10);
|
|
30995
|
+
if (a > f)
|
|
30996
|
+
return 1;
|
|
30997
|
+
if (f > a)
|
|
30998
|
+
return -1;
|
|
30999
|
+
}
|
|
31000
|
+
var s = o3[o3.length - 1], l = u2[u2.length - 1];
|
|
31001
|
+
if (s && l) {
|
|
31002
|
+
var d = s.split(".").map(e2), h = l.split(".").map(e2);
|
|
31003
|
+
for (c = 0; c < Math.max(d.length, h.length); c++) {
|
|
31004
|
+
if (d[c] === void 0 || typeof h[c] == "string" && typeof d[c] == "number")
|
|
31005
|
+
return -1;
|
|
31006
|
+
if (h[c] === void 0 || typeof d[c] == "string" && typeof h[c] == "number")
|
|
31007
|
+
return 1;
|
|
31008
|
+
if (d[c] > h[c])
|
|
31009
|
+
return 1;
|
|
31010
|
+
if (h[c] > d[c])
|
|
31011
|
+
return -1;
|
|
31012
|
+
}
|
|
31013
|
+
} else if (s || l)
|
|
31014
|
+
return s ? -1 : 1;
|
|
31015
|
+
return 0;
|
|
31016
|
+
}
|
|
31017
|
+
var o2 = [">", ">=", "=", "<", "<="], u = { ">": [1], ">=": [0, 1], "=": [0], "<=": [-1, 0], "<": [-1] };
|
|
31018
|
+
return i2.validate = function(n3) {
|
|
31019
|
+
return typeof n3 == "string" && t2.test(n3);
|
|
31020
|
+
}, i2.compare = function(t3, n3, e3) {
|
|
31021
|
+
!function(t4) {
|
|
31022
|
+
if (typeof t4 != "string")
|
|
31023
|
+
throw new TypeError("Invalid operator type, expected string but got " + typeof t4);
|
|
31024
|
+
if (o2.indexOf(t4) === -1)
|
|
31025
|
+
throw new TypeError("Invalid operator, expected one of " + o2.join("|"));
|
|
31026
|
+
}(e3);
|
|
31027
|
+
var r3 = i2(t3, n3);
|
|
31028
|
+
return u[e3].indexOf(r3) > -1;
|
|
31029
|
+
}, i2;
|
|
31030
|
+
});
|
|
30955
31031
|
}, function(t, n, e) {
|
|
30956
31032
|
"use strict";
|
|
30957
31033
|
Object.defineProperty(n, "__esModule", { value: true });
|
|
30958
|
-
var r = e(
|
|
31034
|
+
var r = e(10);
|
|
30959
31035
|
e.d(n, "depRegToStringChecker", function() {
|
|
30960
31036
|
return r.a;
|
|
30961
31037
|
});
|
|
30962
|
-
var i = e(
|
|
31038
|
+
var i = e(11);
|
|
30963
31039
|
e.d(n, "elementIdChecker", function() {
|
|
30964
31040
|
return i.a;
|
|
30965
31041
|
});
|
|
30966
|
-
var o = e(
|
|
31042
|
+
var o = e(12);
|
|
30967
31043
|
e.d(n, "functionToStringChecker", function() {
|
|
30968
31044
|
return o.a;
|
|
30969
31045
|
});
|
|
30970
|
-
var u = e(
|
|
31046
|
+
var u = e(13);
|
|
30971
31047
|
e.d(n, "regToStringChecker", function() {
|
|
30972
31048
|
return u.a;
|
|
30973
31049
|
});
|
|
30974
|
-
var c = e(
|
|
31050
|
+
var c = e(14);
|
|
30975
31051
|
e.d(n, "debuggerChecker", function() {
|
|
30976
31052
|
return c.a;
|
|
30977
31053
|
});
|
|
30978
|
-
var a = e(
|
|
31054
|
+
var a = e(15);
|
|
30979
31055
|
e.d(n, "dateToStringChecker", function() {
|
|
30980
31056
|
return a.a;
|
|
30981
31057
|
});
|
|
30982
|
-
var f = e(
|
|
31058
|
+
var f = e(16);
|
|
30983
31059
|
e.d(n, "performanceChecker", function() {
|
|
30984
31060
|
return f.a;
|
|
30985
31061
|
});
|
|
30986
|
-
var s = e(
|
|
31062
|
+
var s = e(17);
|
|
30987
31063
|
e.d(n, "erudaChecker", function() {
|
|
30988
31064
|
return s.a;
|
|
30989
31065
|
});
|
|
@@ -30992,7 +31068,7 @@ var require_devtools_detector = __commonJS({
|
|
|
30992
31068
|
e.d(n, "a", function() {
|
|
30993
31069
|
return s;
|
|
30994
31070
|
});
|
|
30995
|
-
var r = e(
|
|
31071
|
+
var r = e(0), i = e(2), o = e(1), u = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
30996
31072
|
return new (e2 || (e2 = Promise))(function(i2, o2) {
|
|
30997
31073
|
function u2(t3) {
|
|
30998
31074
|
try {
|
|
@@ -31093,88 +31169,16 @@ var require_devtools_detector = __commonJS({
|
|
|
31093
31169
|
}, isEnable: function() {
|
|
31094
31170
|
return u(this, void 0, void 0, function() {
|
|
31095
31171
|
return c(this, function(t2) {
|
|
31096
|
-
return [2, Object(o.b)({ includes: [true], excludes: [r.
|
|
31172
|
+
return [2, Object(o.b)({ includes: [true], excludes: [r.e, r.f] })];
|
|
31097
31173
|
});
|
|
31098
31174
|
});
|
|
31099
31175
|
} };
|
|
31100
|
-
}, function(t, n) {
|
|
31101
|
-
var e;
|
|
31102
|
-
e = function() {
|
|
31103
|
-
return this;
|
|
31104
|
-
}();
|
|
31105
|
-
try {
|
|
31106
|
-
e = e || Function("return this")() || (0, eval)("this");
|
|
31107
|
-
} catch (t2) {
|
|
31108
|
-
typeof window == "object" && (e = window);
|
|
31109
|
-
}
|
|
31110
|
-
t.exports = e;
|
|
31111
|
-
}, function(t, n, e) {
|
|
31112
|
-
var r, i, o;
|
|
31113
|
-
!function(e2, u) {
|
|
31114
|
-
i = [], (o = typeof (r = u) == "function" ? r.apply(n, i) : r) === void 0 || (t.exports = o);
|
|
31115
|
-
}(0, function() {
|
|
31116
|
-
var t2 = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
|
|
31117
|
-
function n2(t3) {
|
|
31118
|
-
var n3 = t3.replace(/^v/, "").replace(/\+.*$/, ""), e3 = function(t4, n4) {
|
|
31119
|
-
return t4.indexOf(n4) === -1 ? t4.length : t4.indexOf(n4);
|
|
31120
|
-
}(n3, "-"), r3 = n3.substring(0, e3).split(".");
|
|
31121
|
-
return r3.push(n3.substring(e3 + 1)), r3;
|
|
31122
|
-
}
|
|
31123
|
-
function e2(t3) {
|
|
31124
|
-
return isNaN(Number(t3)) ? t3 : Number(t3);
|
|
31125
|
-
}
|
|
31126
|
-
function r2(n3) {
|
|
31127
|
-
if (typeof n3 != "string")
|
|
31128
|
-
throw new TypeError("Invalid argument expected string");
|
|
31129
|
-
if (!t2.test(n3))
|
|
31130
|
-
throw new Error("Invalid argument not valid semver ('" + n3 + "' received)");
|
|
31131
|
-
}
|
|
31132
|
-
function i2(t3, i3) {
|
|
31133
|
-
[t3, i3].forEach(r2);
|
|
31134
|
-
for (var o3 = n2(t3), u2 = n2(i3), c = 0; c < Math.max(o3.length - 1, u2.length - 1); c++) {
|
|
31135
|
-
var a = parseInt(o3[c] || 0, 10), f = parseInt(u2[c] || 0, 10);
|
|
31136
|
-
if (a > f)
|
|
31137
|
-
return 1;
|
|
31138
|
-
if (f > a)
|
|
31139
|
-
return -1;
|
|
31140
|
-
}
|
|
31141
|
-
var s = o3[o3.length - 1], l = u2[u2.length - 1];
|
|
31142
|
-
if (s && l) {
|
|
31143
|
-
var d = s.split(".").map(e2), h = l.split(".").map(e2);
|
|
31144
|
-
for (c = 0; c < Math.max(d.length, h.length); c++) {
|
|
31145
|
-
if (d[c] === void 0 || typeof h[c] == "string" && typeof d[c] == "number")
|
|
31146
|
-
return -1;
|
|
31147
|
-
if (h[c] === void 0 || typeof d[c] == "string" && typeof h[c] == "number")
|
|
31148
|
-
return 1;
|
|
31149
|
-
if (d[c] > h[c])
|
|
31150
|
-
return 1;
|
|
31151
|
-
if (h[c] > d[c])
|
|
31152
|
-
return -1;
|
|
31153
|
-
}
|
|
31154
|
-
} else if (s || l)
|
|
31155
|
-
return s ? -1 : 1;
|
|
31156
|
-
return 0;
|
|
31157
|
-
}
|
|
31158
|
-
var o2 = [">", ">=", "=", "<", "<="], u = { ">": [1], ">=": [0, 1], "=": [0], "<=": [-1, 0], "<": [-1] };
|
|
31159
|
-
return i2.validate = function(n3) {
|
|
31160
|
-
return typeof n3 == "string" && t2.test(n3);
|
|
31161
|
-
}, i2.compare = function(t3, n3, e3) {
|
|
31162
|
-
!function(t4) {
|
|
31163
|
-
if (typeof t4 != "string")
|
|
31164
|
-
throw new TypeError("Invalid operator type, expected string but got " + typeof t4);
|
|
31165
|
-
if (o2.indexOf(t4) === -1)
|
|
31166
|
-
throw new TypeError("Invalid operator, expected one of " + o2.join("|"));
|
|
31167
|
-
}(e3);
|
|
31168
|
-
var r3 = i2(t3, n3);
|
|
31169
|
-
return u[e3].indexOf(r3) > -1;
|
|
31170
|
-
}, i2;
|
|
31171
|
-
});
|
|
31172
31176
|
}, function(t, n, e) {
|
|
31173
31177
|
"use strict";
|
|
31174
31178
|
e.d(n, "a", function() {
|
|
31175
|
-
return
|
|
31179
|
+
return s;
|
|
31176
31180
|
});
|
|
31177
|
-
var r = e(
|
|
31181
|
+
var r = e(0), i = e(2), o = e(1), u = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
31178
31182
|
return new (e2 || (e2 = Promise))(function(i2, o2) {
|
|
31179
31183
|
function u2(t3) {
|
|
31180
31184
|
try {
|
|
@@ -31199,7 +31203,7 @@ var require_devtools_detector = __commonJS({
|
|
|
31199
31203
|
}
|
|
31200
31204
|
a2((r2 = r2.apply(t2, n2 || [])).next());
|
|
31201
31205
|
});
|
|
31202
|
-
},
|
|
31206
|
+
}, c = this && this.__generator || function(t2, n2) {
|
|
31203
31207
|
var e2, r2, i2, o2, u2 = { label: 0, sent: function() {
|
|
31204
31208
|
if (1 & i2[0])
|
|
31205
31209
|
throw i2[1];
|
|
@@ -31262,20 +31266,20 @@ var require_devtools_detector = __commonJS({
|
|
|
31262
31266
|
}([o3, c3]);
|
|
31263
31267
|
};
|
|
31264
31268
|
}
|
|
31265
|
-
},
|
|
31266
|
-
Object.defineProperty(
|
|
31267
|
-
return
|
|
31269
|
+
}, a = Object(r.a)("div"), f = false;
|
|
31270
|
+
Object.defineProperty(a, "id", { get: function() {
|
|
31271
|
+
return f = true, s.name;
|
|
31268
31272
|
}, configurable: true });
|
|
31269
|
-
var
|
|
31270
|
-
return
|
|
31271
|
-
return
|
|
31272
|
-
return
|
|
31273
|
+
var s = { name: "element-id", isOpen: function() {
|
|
31274
|
+
return u(this, void 0, void 0, function() {
|
|
31275
|
+
return c(this, function(t2) {
|
|
31276
|
+
return f = false, Object(i.b)(a), Object(i.a)(), [2, f];
|
|
31273
31277
|
});
|
|
31274
31278
|
});
|
|
31275
31279
|
}, isEnable: function() {
|
|
31276
|
-
return
|
|
31277
|
-
return
|
|
31278
|
-
return [2, Object(o.b)({ includes: [true], excludes: [r.
|
|
31280
|
+
return u(this, void 0, void 0, function() {
|
|
31281
|
+
return c(this, function(t2) {
|
|
31282
|
+
return [2, Object(o.b)({ includes: [true], excludes: [r.f, r.d, r.e] })];
|
|
31279
31283
|
});
|
|
31280
31284
|
});
|
|
31281
31285
|
} };
|
|
@@ -31284,7 +31288,7 @@ var require_devtools_detector = __commonJS({
|
|
|
31284
31288
|
e.d(n, "a", function() {
|
|
31285
31289
|
return l;
|
|
31286
31290
|
});
|
|
31287
|
-
var r = e(
|
|
31291
|
+
var r = e(0), i = e(2), o = e(5), u = e(1), c = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
31288
31292
|
return new (e2 || (e2 = Promise))(function(i2, o2) {
|
|
31289
31293
|
function u2(t3) {
|
|
31290
31294
|
try {
|
|
@@ -31388,7 +31392,7 @@ var require_devtools_detector = __commonJS({
|
|
|
31388
31392
|
}, isEnable: function() {
|
|
31389
31393
|
return c(this, void 0, void 0, function() {
|
|
31390
31394
|
return a(this, function(t2) {
|
|
31391
|
-
return [2, Object(u.b)({ includes: [true], excludes: [r.
|
|
31395
|
+
return [2, Object(u.b)({ includes: [true], excludes: [r.g, r.e, (o.b || o.c) && r.c] })];
|
|
31392
31396
|
});
|
|
31393
31397
|
});
|
|
31394
31398
|
} };
|
|
@@ -31397,7 +31401,7 @@ var require_devtools_detector = __commonJS({
|
|
|
31397
31401
|
e.d(n, "a", function() {
|
|
31398
31402
|
return s;
|
|
31399
31403
|
});
|
|
31400
|
-
var r = e(2), i = e(
|
|
31404
|
+
var r = e(2), i = e(0), o = e(1), u = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
31401
31405
|
return new (e2 || (e2 = Promise))(function(i2, o2) {
|
|
31402
31406
|
function u2(t3) {
|
|
31403
31407
|
try {
|
|
@@ -31498,7 +31502,7 @@ var require_devtools_detector = __commonJS({
|
|
|
31498
31502
|
}, isEnable: function() {
|
|
31499
31503
|
return u(this, void 0, void 0, function() {
|
|
31500
31504
|
return c(this, function(t2) {
|
|
31501
|
-
return [2, Object(o.b)({ includes: [true], excludes: [i.
|
|
31505
|
+
return [2, Object(o.b)({ includes: [true], excludes: [i.i] })];
|
|
31502
31506
|
});
|
|
31503
31507
|
});
|
|
31504
31508
|
} };
|
|
@@ -31507,7 +31511,7 @@ var require_devtools_detector = __commonJS({
|
|
|
31507
31511
|
e.d(n, "a", function() {
|
|
31508
31512
|
return u;
|
|
31509
31513
|
});
|
|
31510
|
-
var r = e(
|
|
31514
|
+
var r = e(1), i = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
31511
31515
|
return new (e2 || (e2 = Promise))(function(i2, o2) {
|
|
31512
31516
|
function u2(t3) {
|
|
31513
31517
|
try {
|
|
@@ -31615,7 +31619,7 @@ var require_devtools_detector = __commonJS({
|
|
|
31615
31619
|
e.d(n, "a", function() {
|
|
31616
31620
|
return l;
|
|
31617
31621
|
});
|
|
31618
|
-
var r = e(
|
|
31622
|
+
var r = e(0), i = e(2), o = e(1), u = e(3), c = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
31619
31623
|
return new (e2 || (e2 = Promise))(function(i2, o2) {
|
|
31620
31624
|
function u2(t3) {
|
|
31621
31625
|
try {
|
|
@@ -31716,16 +31720,16 @@ var require_devtools_detector = __commonJS({
|
|
|
31716
31720
|
}, isEnable: function() {
|
|
31717
31721
|
return c(this, void 0, void 0, function() {
|
|
31718
31722
|
return a(this, function(t2) {
|
|
31719
|
-
return [2, Object(o.b)({ includes: [r.
|
|
31723
|
+
return [2, Object(o.b)({ includes: [r.c], excludes: [(u.isIpad || u.isIphone) && r.c] })];
|
|
31720
31724
|
});
|
|
31721
31725
|
});
|
|
31722
31726
|
} };
|
|
31723
31727
|
}, function(t, n, e) {
|
|
31724
31728
|
"use strict";
|
|
31725
31729
|
e.d(n, "a", function() {
|
|
31726
|
-
return
|
|
31730
|
+
return s;
|
|
31727
31731
|
});
|
|
31728
|
-
|
|
31732
|
+
var r = e(0), i = e(2), o = e(1), u = this && this.__awaiter || function(t2, n2, e2, r2) {
|
|
31729
31733
|
return new (e2 || (e2 = Promise))(function(i2, o2) {
|
|
31730
31734
|
function u2(t3) {
|
|
31731
31735
|
try {
|
|
@@ -31813,41 +31817,34 @@ var require_devtools_detector = __commonJS({
|
|
|
31813
31817
|
}([o3, c3]);
|
|
31814
31818
|
};
|
|
31815
31819
|
}
|
|
31816
|
-
}, a = function() {
|
|
31817
|
-
for (var t2 = {}, n2 = 0; n2 < 500; n2++)
|
|
31818
|
-
t2["".concat(n2)] = "".concat(n2);
|
|
31819
|
-
return t2;
|
|
31820
|
-
}(), f = [], s = 0; s < 50; s++)
|
|
31821
|
-
f.push(a);
|
|
31822
|
-
var l = Math.max(h(), 1e-3);
|
|
31823
|
-
Object(i.a)();
|
|
31824
|
-
var d = { name: "performance", isOpen: function() {
|
|
31820
|
+
}, a = null, f = 0, s = { name: "performance", isOpen: function() {
|
|
31825
31821
|
return u(this, void 0, void 0, function() {
|
|
31826
|
-
var t2;
|
|
31827
|
-
return c(this, function(
|
|
31828
|
-
return
|
|
31822
|
+
var t2, n2;
|
|
31823
|
+
return c(this, function(e2) {
|
|
31824
|
+
return a === null && (a = function() {
|
|
31825
|
+
for (var t3 = function() {
|
|
31826
|
+
for (var t4 = {}, n4 = 0; n4 < 500; n4++)
|
|
31827
|
+
t4["".concat(n4)] = "".concat(n4);
|
|
31828
|
+
return t4;
|
|
31829
|
+
}(), n3 = [], e3 = 0; e3 < 50; e3++)
|
|
31830
|
+
n3.push(t3);
|
|
31831
|
+
return n3;
|
|
31832
|
+
}()), t2 = function() {
|
|
31833
|
+
var t3 = Object(o.c)();
|
|
31834
|
+
return Object(i.c)(a), Object(o.c)() - t3;
|
|
31835
|
+
}(), n2 = function() {
|
|
31829
31836
|
var t3 = Object(o.c)();
|
|
31830
|
-
return Object(i.
|
|
31831
|
-
}(),
|
|
31837
|
+
return Object(i.b)(a), Object(o.c)() - t3;
|
|
31838
|
+
}(), f = Math.max(f, n2), Object(i.a)(), t2 === 0 ? [2, false] : f === 0 ? [2, false] : [2, t2 > 10 * f];
|
|
31832
31839
|
});
|
|
31833
31840
|
});
|
|
31834
31841
|
}, isEnable: function() {
|
|
31835
31842
|
return u(this, void 0, void 0, function() {
|
|
31836
31843
|
return c(this, function(t2) {
|
|
31837
|
-
return [2, Object(o.b)({ includes: [r.
|
|
31844
|
+
return [2, Object(o.b)({ includes: [r.c], excludes: [] })];
|
|
31838
31845
|
});
|
|
31839
31846
|
});
|
|
31840
31847
|
} };
|
|
31841
|
-
function h() {
|
|
31842
|
-
var t2 = Object(o.c)();
|
|
31843
|
-
return Object(i.b)(f), Object(o.c)() - t2;
|
|
31844
|
-
}
|
|
31845
|
-
}, function(t, n, e) {
|
|
31846
|
-
"use strict";
|
|
31847
|
-
e.d(n, "a", function() {
|
|
31848
|
-
return i;
|
|
31849
|
-
});
|
|
31850
|
-
var r = e(3), i = /mobile/i.test(r.b);
|
|
31851
31848
|
}, function(t, n, e) {
|
|
31852
31849
|
"use strict";
|
|
31853
31850
|
e.d(n, "a", function() {
|
|
@@ -41973,6 +41970,39 @@ var ContentProtectionModule = class {
|
|
|
41973
41970
|
}
|
|
41974
41971
|
removeEventListenerOptional(window, "cut", this.preventCopy);
|
|
41975
41972
|
removeEventListenerOptional(document, "cut", this.preventCopy);
|
|
41973
|
+
removeEventListenerOptional(this.delegate.mainElement, "keydown", this.preventCopyKey);
|
|
41974
|
+
removeEventListenerOptional(this.delegate.headerMenu, "keydown", this.preventCopyKey);
|
|
41975
|
+
for (const iframe of this.delegate.iframes) {
|
|
41976
|
+
removeEventListenerOptional(iframe.contentDocument, "keydown", this.preventCopyKey);
|
|
41977
|
+
removeEventListenerOptional(iframe.contentWindow, "keydown", this.preventCopyKey);
|
|
41978
|
+
}
|
|
41979
|
+
removeEventListenerOptional(window, "keydown", this.preventCopyKey);
|
|
41980
|
+
removeEventListenerOptional(document, "keydown", this.preventCopyKey);
|
|
41981
|
+
} else if (this.properties?.canCopy) {
|
|
41982
|
+
removeEventListenerOptional(this.delegate.mainElement, "copy", this.restrictCopy);
|
|
41983
|
+
removeEventListenerOptional(this.delegate.headerMenu, "copy", this.restrictCopy);
|
|
41984
|
+
for (const iframe of this.delegate.iframes) {
|
|
41985
|
+
removeEventListenerOptional(iframe.contentDocument, "copy", this.restrictCopy);
|
|
41986
|
+
removeEventListenerOptional(iframe.contentWindow, "copy", this.restrictCopy);
|
|
41987
|
+
}
|
|
41988
|
+
removeEventListenerOptional(window, "copy", this.restrictCopy);
|
|
41989
|
+
removeEventListenerOptional(document, "copy", this.restrictCopy);
|
|
41990
|
+
removeEventListenerOptional(this.delegate.mainElement, "cut", this.restrictCopy);
|
|
41991
|
+
removeEventListenerOptional(this.delegate.headerMenu, "cut", this.restrictCopy);
|
|
41992
|
+
for (const iframe of this.delegate.iframes) {
|
|
41993
|
+
removeEventListenerOptional(iframe.contentDocument, "cut", this.restrictCopy);
|
|
41994
|
+
removeEventListenerOptional(iframe.contentWindow, "cut", this.restrictCopy);
|
|
41995
|
+
}
|
|
41996
|
+
removeEventListenerOptional(window, "cut", this.restrictCopy);
|
|
41997
|
+
removeEventListenerOptional(document, "cut", this.restrictCopy);
|
|
41998
|
+
removeEventListenerOptional(this.delegate.mainElement, "keydown", this.restrictCopyKey);
|
|
41999
|
+
removeEventListenerOptional(this.delegate.headerMenu, "keydown", this.restrictCopyKey);
|
|
42000
|
+
for (const iframe of this.delegate.iframes) {
|
|
42001
|
+
removeEventListenerOptional(iframe.contentDocument, "keydown", this.restrictCopyKey);
|
|
42002
|
+
removeEventListenerOptional(iframe.contentWindow, "keydown", this.restrictCopyKey);
|
|
42003
|
+
}
|
|
42004
|
+
removeEventListenerOptional(window, "keydown", this.restrictCopyKey);
|
|
42005
|
+
removeEventListenerOptional(document, "keydown", this.restrictCopyKey);
|
|
41976
42006
|
}
|
|
41977
42007
|
if (this.properties?.disablePrint) {
|
|
41978
42008
|
removeEventListenerOptional(this.delegate.mainElement, "beforeprint", this.beforePrint.bind(this));
|
|
@@ -42075,6 +42105,51 @@ var ContentProtectionModule = class {
|
|
|
42075
42105
|
}
|
|
42076
42106
|
addEventListenerOptional(window, "cut", this.preventCopy);
|
|
42077
42107
|
addEventListenerOptional(document, "cut", this.preventCopy);
|
|
42108
|
+
addEventListenerOptional(this.delegate.mainElement, "keydown", this.preventCopyKey);
|
|
42109
|
+
addEventListenerOptional(this.delegate.headerMenu, "keydown", this.preventCopyKey);
|
|
42110
|
+
for (const iframe of this.delegate.iframes) {
|
|
42111
|
+
addEventListenerOptional(iframe, "keydown", this.preventCopyKey);
|
|
42112
|
+
addEventListenerOptional(iframe.ownerDocument, "keydown", this.preventCopyKey);
|
|
42113
|
+
addEventListenerOptional(iframe.contentDocument, "keydown", this.preventCopyKey);
|
|
42114
|
+
addEventListenerOptional(iframe.contentWindow, "keydown", this.preventCopyKey);
|
|
42115
|
+
addEventListenerOptional(iframe.contentWindow?.document, "keydown", this.preventCopyKey);
|
|
42116
|
+
}
|
|
42117
|
+
addEventListenerOptional(window, "keydown", this.preventCopyKey);
|
|
42118
|
+
addEventListenerOptional(document, "keydown", this.preventCopyKey);
|
|
42119
|
+
} else if (this.properties?.canCopy) {
|
|
42120
|
+
addEventListenerOptional(this.delegate.mainElement, "copy", this.restrictCopy.bind(this));
|
|
42121
|
+
addEventListenerOptional(this.delegate.headerMenu, "copy", this.restrictCopy.bind(this));
|
|
42122
|
+
for (const iframe of this.delegate.iframes) {
|
|
42123
|
+
addEventListenerOptional(iframe, "copy", this.restrictCopy);
|
|
42124
|
+
addEventListenerOptional(iframe.ownerDocument, "copy", this.restrictCopy.bind(this));
|
|
42125
|
+
addEventListenerOptional(iframe.contentDocument, "copy", this.restrictCopy.bind(this));
|
|
42126
|
+
addEventListenerOptional(iframe.contentWindow, "copy", this.restrictCopy.bind(this));
|
|
42127
|
+
addEventListenerOptional(iframe.contentWindow?.document, "copy", this.restrictCopy.bind(this));
|
|
42128
|
+
}
|
|
42129
|
+
addEventListenerOptional(window, "copy", this.restrictCopy.bind(this));
|
|
42130
|
+
addEventListenerOptional(document, "copy", this.restrictCopy.bind(this));
|
|
42131
|
+
addEventListenerOptional(this.delegate.mainElement, "cut", this.restrictCopy.bind(this));
|
|
42132
|
+
addEventListenerOptional(this.delegate.headerMenu, "cut", this.restrictCopy.bind(this));
|
|
42133
|
+
for (const iframe of this.delegate.iframes) {
|
|
42134
|
+
addEventListenerOptional(iframe, "cut", this.restrictCopy.bind(this));
|
|
42135
|
+
addEventListenerOptional(iframe.ownerDocument, "cut", this.restrictCopy.bind(this));
|
|
42136
|
+
addEventListenerOptional(iframe.contentDocument, "cut", this.restrictCopy.bind(this));
|
|
42137
|
+
addEventListenerOptional(iframe.contentWindow, "cut", this.restrictCopy.bind(this));
|
|
42138
|
+
addEventListenerOptional(iframe.contentWindow?.document, "cut", this.restrictCopy.bind(this));
|
|
42139
|
+
}
|
|
42140
|
+
addEventListenerOptional(window, "cut", this.restrictCopy.bind(this));
|
|
42141
|
+
addEventListenerOptional(document, "cut", this.restrictCopy.bind(this));
|
|
42142
|
+
addEventListenerOptional(this.delegate.mainElement, "keydown", this.restrictCopyKey.bind(this));
|
|
42143
|
+
addEventListenerOptional(this.delegate.headerMenu, "keydown", this.restrictCopyKey.bind(this));
|
|
42144
|
+
for (const iframe of this.delegate.iframes) {
|
|
42145
|
+
addEventListenerOptional(iframe, "keydown", this.restrictCopyKey.bind(this));
|
|
42146
|
+
addEventListenerOptional(iframe.ownerDocument, "keydown", this.restrictCopyKey.bind(this));
|
|
42147
|
+
addEventListenerOptional(iframe.contentDocument, "keydown", this.restrictCopyKey.bind(this));
|
|
42148
|
+
addEventListenerOptional(iframe.contentWindow, "keydown", this.restrictCopyKey.bind(this));
|
|
42149
|
+
addEventListenerOptional(iframe.contentWindow?.document, "keydown", this.restrictCopyKey.bind(this));
|
|
42150
|
+
}
|
|
42151
|
+
addEventListenerOptional(window, "keydown", this.restrictCopyKey.bind(this));
|
|
42152
|
+
addEventListenerOptional(document, "keydown", this.restrictCopyKey.bind(this));
|
|
42078
42153
|
}
|
|
42079
42154
|
if (this.properties?.disablePrint) {
|
|
42080
42155
|
addEventListenerOptional(this.delegate.mainElement, "beforeprint", this.beforePrint);
|
|
@@ -42182,6 +42257,118 @@ var ContentProtectionModule = class {
|
|
|
42182
42257
|
event.preventDefault();
|
|
42183
42258
|
return false;
|
|
42184
42259
|
}
|
|
42260
|
+
preventCopyKey(event) {
|
|
42261
|
+
if (navigator.platform === "MacIntel" || navigator.platform.match("Mac") ? event.metaKey : event.ctrlKey && (event.key === "c" || event.keyCode === 67)) {
|
|
42262
|
+
event.preventDefault();
|
|
42263
|
+
event.stopPropagation();
|
|
42264
|
+
return false;
|
|
42265
|
+
}
|
|
42266
|
+
return true;
|
|
42267
|
+
}
|
|
42268
|
+
restrictCopy(event) {
|
|
42269
|
+
import_loglevel13.default.log("copy action initiated");
|
|
42270
|
+
let win = this.delegate.iframes[0].contentWindow;
|
|
42271
|
+
if (win) {
|
|
42272
|
+
let getCssSelector = function(element) {
|
|
42273
|
+
const options = {
|
|
42274
|
+
className: (str) => {
|
|
42275
|
+
return _blacklistIdClassForCssSelectors.indexOf(str) < 0;
|
|
42276
|
+
},
|
|
42277
|
+
idName: (str) => {
|
|
42278
|
+
return _blacklistIdClassForCssSelectors.indexOf(str) < 0;
|
|
42279
|
+
}
|
|
42280
|
+
};
|
|
42281
|
+
let doc = self2.delegate.iframes[0].contentDocument;
|
|
42282
|
+
if (doc) {
|
|
42283
|
+
return uniqueCssSelector(element, doc, options);
|
|
42284
|
+
} else {
|
|
42285
|
+
return void 0;
|
|
42286
|
+
}
|
|
42287
|
+
};
|
|
42288
|
+
let self2 = this;
|
|
42289
|
+
let selectionInfo = getCurrentSelectionInfo(win, getCssSelector);
|
|
42290
|
+
if (selectionInfo === void 0) {
|
|
42291
|
+
let doc = this.delegate.iframes[0].contentDocument;
|
|
42292
|
+
selectionInfo = this.delegate.annotationModule?.annotator?.getTemporarySelectionInfo(doc);
|
|
42293
|
+
}
|
|
42294
|
+
event.clipboardData.setData("text/plain", selectionInfo?.cleanText?.substring(0, this.properties?.charactersToCopy ?? 0));
|
|
42295
|
+
} else {
|
|
42296
|
+
event.clipboardData.setData("text/plain", "");
|
|
42297
|
+
}
|
|
42298
|
+
event.stopPropagation();
|
|
42299
|
+
event.preventDefault();
|
|
42300
|
+
return false;
|
|
42301
|
+
}
|
|
42302
|
+
restrictCopyKey(event) {
|
|
42303
|
+
if (navigator.platform === "MacIntel" || navigator.platform.match("Mac") ? event.metaKey : event.ctrlKey && (event.key === "c" || event.keyCode === 67)) {
|
|
42304
|
+
let win = this.delegate.iframes[0].contentWindow;
|
|
42305
|
+
if (win) {
|
|
42306
|
+
let getCssSelector = function(element) {
|
|
42307
|
+
const options = {
|
|
42308
|
+
className: (str) => {
|
|
42309
|
+
return _blacklistIdClassForCssSelectors.indexOf(str) < 0;
|
|
42310
|
+
},
|
|
42311
|
+
idName: (str) => {
|
|
42312
|
+
return _blacklistIdClassForCssSelectors.indexOf(str) < 0;
|
|
42313
|
+
}
|
|
42314
|
+
};
|
|
42315
|
+
let doc = self2.delegate.iframes[0].contentDocument;
|
|
42316
|
+
if (doc) {
|
|
42317
|
+
return uniqueCssSelector(element, doc, options);
|
|
42318
|
+
} else {
|
|
42319
|
+
return void 0;
|
|
42320
|
+
}
|
|
42321
|
+
};
|
|
42322
|
+
let self2 = this;
|
|
42323
|
+
let selectionInfo = getCurrentSelectionInfo(win, getCssSelector);
|
|
42324
|
+
if (selectionInfo === void 0) {
|
|
42325
|
+
let doc = this.delegate.iframes[0].contentDocument;
|
|
42326
|
+
selectionInfo = this.delegate.annotationModule?.annotator?.getTemporarySelectionInfo(doc);
|
|
42327
|
+
}
|
|
42328
|
+
this.copyToClipboard(selectionInfo?.cleanText?.substring(0, this.properties?.charactersToCopy ?? 0));
|
|
42329
|
+
} else {
|
|
42330
|
+
this.copyToClipboard("");
|
|
42331
|
+
}
|
|
42332
|
+
event.stopPropagation();
|
|
42333
|
+
event.preventDefault();
|
|
42334
|
+
return false;
|
|
42335
|
+
}
|
|
42336
|
+
return true;
|
|
42337
|
+
}
|
|
42338
|
+
copyToClipboard(textToClipboard) {
|
|
42339
|
+
textToClipboard = textToClipboard.substring(0, this.properties?.charactersToCopy ?? 0);
|
|
42340
|
+
if (window.clipboardData) {
|
|
42341
|
+
window.clipboardData.setData("text/plain", textToClipboard);
|
|
42342
|
+
} else {
|
|
42343
|
+
const forExecElement = this.createElementForExecCommand(textToClipboard);
|
|
42344
|
+
this.selectContent(forExecElement);
|
|
42345
|
+
try {
|
|
42346
|
+
if (window.netscape && netscape.security) {
|
|
42347
|
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
42348
|
+
}
|
|
42349
|
+
document.execCommand("copy", false);
|
|
42350
|
+
} catch (e) {
|
|
42351
|
+
}
|
|
42352
|
+
document.body.removeChild(forExecElement);
|
|
42353
|
+
}
|
|
42354
|
+
}
|
|
42355
|
+
createElementForExecCommand(textToClipboard) {
|
|
42356
|
+
const forExecElement = document.createElement("div");
|
|
42357
|
+
forExecElement.style.position = "absolute";
|
|
42358
|
+
forExecElement.style.left = "-10000px";
|
|
42359
|
+
forExecElement.style.top = "-10000px";
|
|
42360
|
+
forExecElement.innerHTML = textToClipboard;
|
|
42361
|
+
document.body.appendChild(forExecElement);
|
|
42362
|
+
forExecElement.contentEditable = true;
|
|
42363
|
+
return forExecElement;
|
|
42364
|
+
}
|
|
42365
|
+
selectContent(element) {
|
|
42366
|
+
const rangeToSelect = document.createRange();
|
|
42367
|
+
rangeToSelect.selectNodeContents(element);
|
|
42368
|
+
const selection = window.getSelection();
|
|
42369
|
+
selection?.removeAllRanges();
|
|
42370
|
+
selection?.addRange(rangeToSelect);
|
|
42371
|
+
}
|
|
42185
42372
|
beforePrint(event) {
|
|
42186
42373
|
import_loglevel13.default.log("before print");
|
|
42187
42374
|
if (this.delegate && this.delegate.headerMenu) {
|
|
@@ -48471,6 +48658,9 @@ var D2Reader = class {
|
|
|
48471
48658
|
this.goToPage = async (page) => {
|
|
48472
48659
|
await this.navigator.goToPage(page);
|
|
48473
48660
|
};
|
|
48661
|
+
this.copyToClipboard = (text) => {
|
|
48662
|
+
this.contentProtectionModule?.copyToClipboard(text);
|
|
48663
|
+
};
|
|
48474
48664
|
this.nextResource = () => {
|
|
48475
48665
|
this.navigator.nextResource();
|
|
48476
48666
|
};
|