@pagehub/sdk 0.1.5 → 0.1.7
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/README.md +1 -1
- package/dist/chrome/viewport/Viewport/hooks/usePageLoadIndicator.d.ts +2 -2
- package/dist/chrome/viewport/design-system/hooks/useDesignSystem.d.ts +2 -2
- package/dist/chrome/viewport/design-system/hooks/usePaletteState.d.ts +2 -2
- package/dist/chunks/ActionEditorPanel-9v50QUwu.js +89 -0
- package/dist/chunks/ActionInput-CTt7sOs6.js +929 -0
- package/dist/chunks/ActionsAddPicker-BeTPUUor.js +51 -0
- package/dist/chunks/ActionsInput-D0h-zLYj.js +174 -0
- package/dist/chunks/AnchoredPopover-CckPTxXu.js +2676 -0
- package/dist/chunks/AnimationEditorPanel-CXNmsTqV.js +26 -0
- package/dist/chunks/AnimationsInput-Djyz0uXG.js +292 -0
- package/dist/chunks/AnimationsInputPopover-B2-oNebx.js +71 -0
- package/dist/chunks/AnimationsPanel-DungA9qb.js +25 -0
- package/dist/chunks/Audio.render-CsR69fZ9.js +22 -0
- package/dist/chunks/AudioMainTab-BljM2NMQ.js +70 -0
- package/dist/chunks/BackdropEditorPanel-CA2k-6SR.js +26 -0
- package/dist/chunks/BackgroundImageInputPopover-vB_217Ig.js +94 -0
- package/dist/chunks/BackgroundImagePanel-BvMhF9eU.js +100 -0
- package/dist/chunks/BackgroundMainTab-CI4c5DEF.js +10 -0
- package/dist/chunks/BundleRowPanel-BcYfyfGQ.js +33 -0
- package/dist/chunks/ButtonMainTab-Civy_DoA.js +43 -0
- package/dist/chunks/CSSEditorInput-C1ITwAh3.js +73 -0
- package/dist/chunks/ClassNameInput-Ce0fGQES.js +720 -0
- package/dist/chunks/CodeEditor-axBXmPH8.js +33370 -0
- package/dist/chunks/ColorInput-BSfMNt86.js +187 -0
- package/dist/chunks/ColorPanel-DOLrT-gS.js +562 -0
- package/dist/chunks/ComponentImportExportPanel-DVcnGhGx.js +161 -0
- package/dist/chunks/ComponentImportExportPopover-BY1_oxU8.js +26 -0
- package/dist/chunks/ConditionEditorPanel-DLbqYaSF.js +43 -0
- package/dist/chunks/ConditionsAddPicker-SsHJlc1E.js +54 -0
- package/dist/chunks/ConditionsInput-B_5Nge8o.js +474 -0
- package/dist/chunks/ContainerMainTab-kkktm1Ns.js +1107 -0
- package/dist/chunks/ContainerOverflowSectionPanel-ibKXf-1N.js +120 -0
- package/dist/chunks/ContainerOverflowSectionPopover-CRQ9EPsn.js +24 -0
- package/dist/chunks/ContainerPaddingOverlay-Cd3xOv-S.js +340 -0
- package/dist/chunks/ContainerScrollEffectSection-Dbztqdnr.js +123 -0
- package/dist/chunks/ContainerStateSection-DY_gjBJL.js +478 -0
- package/dist/chunks/ConversionFields-Bpfl-SGP.js +135 -0
- package/dist/chunks/CraftListEditor-_TIy1ogW.js +73 -0
- package/dist/chunks/CreateTokenDialog-DNWtWqJd.js +147 -0
- package/dist/chunks/Data.render-DTmaqSyz.js +10 -0
- package/dist/chunks/DataAttributesPanel-mYhisO_O.js +125 -0
- package/dist/chunks/DataMainTab-Batm515E.js +23 -0
- package/dist/chunks/DataSourceSectionSlot-BKoO6Vxn.js +10 -0
- package/dist/chunks/EditorEmptyLeafHintView-D3E3UN_0.js +78 -0
- package/dist/chunks/EffectRowInputPopover-CYhfjFwJ.js +323 -0
- package/dist/chunks/EffectsClassInput-Yujuchwy.js +315 -0
- package/dist/chunks/Embed.render-BgKpUV8n.js +17 -0
- package/dist/chunks/EmbedMainTab-d_-Bnkug.js +225 -0
- package/dist/chunks/FilterEditorPanel-CRa0IpLr.js +26 -0
- package/dist/chunks/FlexDirectionInput-C5gYjk5W.js +78 -0
- package/dist/chunks/FloatingPanel-DJP5Vhua.js +553 -0
- package/dist/chunks/FontFamilyInput-CVNnVylt.js +111 -0
- package/dist/chunks/Form.render-6GjcmL2u.js +54 -0
- package/dist/chunks/FormElement.render-DWrG-2ID.js +36 -0
- package/dist/chunks/FormElementMainTab-DSbF3F6e.js +470 -0
- package/dist/chunks/FormMainTab-SHny1HxF.js +240 -0
- package/dist/chunks/GradientInputPopover-1K6O9jBq.js +103 -0
- package/dist/chunks/GradientPanel-DSRQKkaB.js +194 -0
- package/dist/chunks/HTMLCodeInput-CCe4Bj5z.js +69 -0
- package/dist/chunks/HandlerEditorPanel-DiOXobsl.js +93 -0
- package/dist/chunks/HandlersAddPicker-DWTgjKgo.js +101 -0
- package/dist/chunks/HandlersInput-p49STTn8.js +132 -0
- package/dist/chunks/IconDialogInput-C-81_L2n.js +105 -0
- package/dist/chunks/IconInput-D2Gy7Hvf.js +182 -0
- package/dist/chunks/IconMainTab-CNrVjDWP.js +26 -0
- package/dist/chunks/IconPickerPanel-BjNOlCh6.js +670 -0
- package/dist/chunks/ImageMainTab-C4O7RjX0.js +66 -0
- package/dist/chunks/ImageSettingsPanel-dvOmGg3C.js +485 -0
- package/dist/chunks/LayoutPresetPanel-CNAVAcvw.js +81 -0
- package/dist/chunks/LayoutPresetSlot-BqMTdE33.js +16 -0
- package/dist/chunks/LinkMainTab-BfFZx0AU.js +13 -0
- package/dist/chunks/ListEditor-mD-CmRNE.js +178 -0
- package/dist/chunks/Map.render-DFkmncHz.js +82 -0
- package/dist/chunks/MapLeaflet-DOfmZ3Pk.js +6588 -0
- package/dist/chunks/MapMainTab-CxI7IS1_.js +165 -0
- package/dist/chunks/MapPoint.render-0OAfCZTp.js +16 -0
- package/dist/chunks/MapPointMainTab-CmLcaSR5.js +60 -0
- package/dist/chunks/MediaInput-DHs3D8TJ.js +672 -0
- package/dist/chunks/MediaManagerModal-Dc5PK3dn.js +240 -0
- package/dist/chunks/MiniPreviewTile-B4zxTj9Y.js +32 -0
- package/dist/chunks/ModifierChipList-CwsWklih.js +33 -0
- package/dist/chunks/ModifiersAddPicker-D-vSYw7O.js +74 -0
- package/dist/chunks/ModifiersPickerPanel-CTefidBx.js +243 -0
- package/dist/chunks/NodeAiContextInputPopover-D5bn5o_T.js +66 -0
- package/dist/chunks/NodeAiContextPanel-Bx4rcjiM.js +81 -0
- package/dist/chunks/NumberSettingsPanel-DASi_l6V.js +56 -0
- package/dist/chunks/PageSettingsModal-D6o450IR.js +2678 -0
- package/dist/chunks/PatternInputPopover-qMWBv_nl.js +100 -0
- package/dist/chunks/PatternPanel-D2fgWDd-.js +352 -0
- package/dist/chunks/PeekTargetButton-ClrJX7zh.js +26 -0
- package/dist/chunks/PermissionsSection-DwobrV40.js +82 -0
- package/dist/chunks/PresetAddChildList-D6a0xdt8.js +35 -0
- package/dist/chunks/PropertiesInput-9O39ngbb.js +125 -0
- package/dist/chunks/PropertiesPanel-DO0RlalO.js +76 -0
- package/dist/chunks/SaveModifierPanel-B6mjKyrT.js +130 -0
- package/dist/chunks/ScrollEffectEditorPanel-CllGUhui.js +26 -0
- package/dist/chunks/SearchInput-DRUztbM0.js +76 -0
- package/dist/chunks/SearchableMenuPopover-DZKVXiEl.js +1251 -0
- package/dist/chunks/SlotRenderer-CaLf_2_C.js +38 -0
- package/dist/chunks/StateBindingEditorPanel-DKdcG5py.js +101 -0
- package/dist/chunks/StateBindingsAddPicker-DxMNAWAD.js +91 -0
- package/dist/chunks/StateBindingsInput-iWiqvAVB.js +103 -0
- package/dist/chunks/TailwindInput-660FZtyK.js +24 -0
- package/dist/chunks/TextEditor-B2O7DlN8.js +22032 -0
- package/dist/chunks/TextMainTab-B5udsXsk.js +260 -0
- package/dist/chunks/TextStyleEditorPanel-GRNPGzUL.js +381 -0
- package/dist/chunks/TextStylePickerPanel-l108SmGQ.js +140 -0
- package/dist/chunks/TextareaSettingsPanel-C1rQuF1O.js +50 -0
- package/dist/chunks/TokenPicker-Q0LToF_p.js +291 -0
- package/dist/chunks/ToolbarDashedButton-DbUxGmDg.js +23 -0
- package/dist/chunks/TransformEditorPanel-BGwyznZ6.js +26 -0
- package/dist/chunks/TransitionEditorPanel-BSvk58Ow.js +26 -0
- package/dist/chunks/TypographyPresetInput-DqnGSgR2.js +296 -0
- package/dist/chunks/ValidationPanel-CmA9SfoF.js +56 -0
- package/dist/chunks/Video.render-Dg6xvis4.js +21 -0
- package/dist/chunks/VideoMainTab-v5UFhUm-.js +174 -0
- package/dist/chunks/YouTube.esm-EbHnLU1Z.js +744 -0
- package/dist/chunks/dialogAtoms-CeQ2G05l.js +59 -0
- package/dist/chunks/extends-hS2Bh-Yp.js +12 -0
- package/dist/chunks/formatStorage-C3o2s3dk.js +22 -0
- package/dist/chunks/googleFonts-Dj4AntNi.js +323 -0
- package/dist/chunks/helpers-Cll72tMn.js +18 -0
- package/dist/chunks/index-B-GJd039.js +2875 -0
- package/dist/chunks/index-C66dAl3Q.js +32177 -0
- package/dist/chunks/index.esm-mqFx3NOs.js +644 -0
- package/dist/chunks/popoverOpenRequestAtom-hBS_siXv.js +22 -0
- package/dist/chunks/propertyRegistry-CMhVNOgl.js +38 -0
- package/dist/chunks/resolveAnchorsViaCraft-Cixm6ZyJ.js +31 -0
- package/dist/chunks/toolboxUtils-DjTMslSn.js +370 -0
- package/dist/chunks/uiPrimitives-BtohldWg.js +15 -0
- package/dist/chunks/use-event-listener-DO3Sk7g0.js +15 -0
- package/dist/chunks/useElementPicker-DoNuXNMQ.js +41 -0
- package/dist/chunks/useLayoutPreset-wOMV5YnO.js +528 -0
- package/dist/chunks/useMediaManager-CmKDbFfw.js +4629 -0
- package/dist/chunks/usePopoverAutoOpen-CxIjt0ez.js +25 -0
- package/dist/chunks/usePopoverPosition-83Vti7Aw.js +15 -0
- package/dist/render/static/index.js +9 -0
- package/dist/theme.css +168 -0
- package/package.json +25 -14
- package/dist/pagehub-viewer.umd.cjs +0 -574
- package/dist/pagehub.umd.cjs +0 -1130
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
import { aW as X } from "./index-C66dAl3Q.js";
|
|
2
|
+
import B from "react";
|
|
3
|
+
var j = { exports: {} }, Q, ne;
|
|
4
|
+
function Ce() {
|
|
5
|
+
if (ne) return Q;
|
|
6
|
+
ne = 1;
|
|
7
|
+
var a = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
8
|
+
return Q = a, Q;
|
|
9
|
+
}
|
|
10
|
+
var W, ae;
|
|
11
|
+
function Re() {
|
|
12
|
+
if (ae) return W;
|
|
13
|
+
ae = 1;
|
|
14
|
+
var a = /* @__PURE__ */ Ce();
|
|
15
|
+
function e() {
|
|
16
|
+
}
|
|
17
|
+
function t() {
|
|
18
|
+
}
|
|
19
|
+
return t.resetWarningCache = e, W = function() {
|
|
20
|
+
function r(d, p, l, n, s, u) {
|
|
21
|
+
if (u !== a) {
|
|
22
|
+
var f = new Error(
|
|
23
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
24
|
+
);
|
|
25
|
+
throw f.name = "Invariant Violation", f;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
r.isRequired = r;
|
|
29
|
+
function i() {
|
|
30
|
+
return r;
|
|
31
|
+
}
|
|
32
|
+
var o = {
|
|
33
|
+
array: r,
|
|
34
|
+
bigint: r,
|
|
35
|
+
bool: r,
|
|
36
|
+
func: r,
|
|
37
|
+
number: r,
|
|
38
|
+
object: r,
|
|
39
|
+
string: r,
|
|
40
|
+
symbol: r,
|
|
41
|
+
any: r,
|
|
42
|
+
arrayOf: i,
|
|
43
|
+
element: r,
|
|
44
|
+
elementType: r,
|
|
45
|
+
instanceOf: i,
|
|
46
|
+
node: r,
|
|
47
|
+
objectOf: i,
|
|
48
|
+
oneOf: i,
|
|
49
|
+
oneOfType: i,
|
|
50
|
+
shape: i,
|
|
51
|
+
exact: i,
|
|
52
|
+
checkPropTypes: t,
|
|
53
|
+
resetWarningCache: e
|
|
54
|
+
};
|
|
55
|
+
return o.PropTypes = o, o;
|
|
56
|
+
}, W;
|
|
57
|
+
}
|
|
58
|
+
var oe;
|
|
59
|
+
function Ae() {
|
|
60
|
+
return oe || (oe = 1, j.exports = /* @__PURE__ */ Re()()), j.exports;
|
|
61
|
+
}
|
|
62
|
+
var Te = /* @__PURE__ */ Ae();
|
|
63
|
+
const y = /* @__PURE__ */ X(Te);
|
|
64
|
+
var G, ie;
|
|
65
|
+
function Oe() {
|
|
66
|
+
return ie || (ie = 1, G = function a(e, t) {
|
|
67
|
+
if (e === t) return !0;
|
|
68
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
69
|
+
if (e.constructor !== t.constructor) return !1;
|
|
70
|
+
var r, i, o;
|
|
71
|
+
if (Array.isArray(e)) {
|
|
72
|
+
if (r = e.length, r != t.length) return !1;
|
|
73
|
+
for (i = r; i-- !== 0; )
|
|
74
|
+
if (!a(e[i], t[i])) return !1;
|
|
75
|
+
return !0;
|
|
76
|
+
}
|
|
77
|
+
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
78
|
+
if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf();
|
|
79
|
+
if (e.toString !== Object.prototype.toString) return e.toString() === t.toString();
|
|
80
|
+
if (o = Object.keys(e), r = o.length, r !== Object.keys(t).length) return !1;
|
|
81
|
+
for (i = r; i-- !== 0; )
|
|
82
|
+
if (!Object.prototype.hasOwnProperty.call(t, o[i])) return !1;
|
|
83
|
+
for (i = r; i-- !== 0; ) {
|
|
84
|
+
var d = o[i];
|
|
85
|
+
if (!a(e[d], t[d])) return !1;
|
|
86
|
+
}
|
|
87
|
+
return !0;
|
|
88
|
+
}
|
|
89
|
+
return e !== e && t !== t;
|
|
90
|
+
}), G;
|
|
91
|
+
}
|
|
92
|
+
var qe = Oe();
|
|
93
|
+
const Ie = /* @__PURE__ */ X(qe);
|
|
94
|
+
var I = { exports: {} }, z, se;
|
|
95
|
+
function Ne() {
|
|
96
|
+
if (se) return z;
|
|
97
|
+
se = 1;
|
|
98
|
+
var a;
|
|
99
|
+
/**
|
|
100
|
+
* @link https://github.com/gajus/sister for the canonical source repository
|
|
101
|
+
* @license https://github.com/gajus/sister/blob/master/LICENSE BSD 3-Clause
|
|
102
|
+
*/
|
|
103
|
+
return a = function() {
|
|
104
|
+
var e = {}, t = {};
|
|
105
|
+
return e.on = function(r, i) {
|
|
106
|
+
var o = { name: r, handler: i };
|
|
107
|
+
return t[r] = t[r] || [], t[r].unshift(o), o;
|
|
108
|
+
}, e.off = function(r) {
|
|
109
|
+
var i = t[r.name].indexOf(r);
|
|
110
|
+
i !== -1 && t[r.name].splice(i, 1);
|
|
111
|
+
}, e.trigger = function(r, i) {
|
|
112
|
+
var o = t[r], d;
|
|
113
|
+
if (o)
|
|
114
|
+
for (d = o.length; d--; )
|
|
115
|
+
o[d].handler(i);
|
|
116
|
+
}, e;
|
|
117
|
+
}, z = a, z;
|
|
118
|
+
}
|
|
119
|
+
var N = { exports: {} }, J, ue;
|
|
120
|
+
function De() {
|
|
121
|
+
if (ue) return J;
|
|
122
|
+
ue = 1, J = function(i, o, d) {
|
|
123
|
+
var p = document.head || document.getElementsByTagName("head")[0], l = document.createElement("script");
|
|
124
|
+
typeof o == "function" && (d = o, o = {}), o = o || {}, d = d || function() {
|
|
125
|
+
}, l.type = o.type || "text/javascript", l.charset = o.charset || "utf8", l.async = "async" in o ? !!o.async : !0, l.src = i, o.attrs && a(l, o.attrs), o.text && (l.text = "" + o.text);
|
|
126
|
+
var n = "onload" in l ? e : t;
|
|
127
|
+
n(l, d), l.onload || e(l, d), p.appendChild(l);
|
|
128
|
+
};
|
|
129
|
+
function a(r, i) {
|
|
130
|
+
for (var o in i)
|
|
131
|
+
r.setAttribute(o, i[o]);
|
|
132
|
+
}
|
|
133
|
+
function e(r, i) {
|
|
134
|
+
r.onload = function() {
|
|
135
|
+
this.onerror = this.onload = null, i(null, r);
|
|
136
|
+
}, r.onerror = function() {
|
|
137
|
+
this.onerror = this.onload = null, i(new Error("Failed to load " + this.src), r);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function t(r, i) {
|
|
141
|
+
r.onreadystatechange = function() {
|
|
142
|
+
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, i(null, r));
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return J;
|
|
146
|
+
}
|
|
147
|
+
var le;
|
|
148
|
+
function Ve() {
|
|
149
|
+
return le || (le = 1, (function(a, e) {
|
|
150
|
+
Object.defineProperty(e, "__esModule", {
|
|
151
|
+
value: !0
|
|
152
|
+
});
|
|
153
|
+
var t = De(), r = i(t);
|
|
154
|
+
function i(o) {
|
|
155
|
+
return o && o.__esModule ? o : { default: o };
|
|
156
|
+
}
|
|
157
|
+
e.default = function(o) {
|
|
158
|
+
var d = new Promise(function(p) {
|
|
159
|
+
if (window.YT && window.YT.Player && window.YT.Player instanceof Function) {
|
|
160
|
+
p(window.YT);
|
|
161
|
+
return;
|
|
162
|
+
} else {
|
|
163
|
+
var l = window.location.protocol === "http:" ? "http:" : "https:";
|
|
164
|
+
(0, r.default)(l + "//www.youtube.com/iframe_api", function(s) {
|
|
165
|
+
s && o.trigger("error", s);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
var n = window.onYouTubeIframeAPIReady;
|
|
169
|
+
window.onYouTubeIframeAPIReady = function() {
|
|
170
|
+
n && n(), p(window.YT);
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
return d;
|
|
174
|
+
}, a.exports = e.default;
|
|
175
|
+
})(N, N.exports)), N.exports;
|
|
176
|
+
}
|
|
177
|
+
var D = { exports: {} }, V = { exports: {} }, M = { exports: {} }, Z, de;
|
|
178
|
+
function Me() {
|
|
179
|
+
if (de) return Z;
|
|
180
|
+
de = 1;
|
|
181
|
+
var a = 1e3, e = a * 60, t = e * 60, r = t * 24, i = r * 365.25;
|
|
182
|
+
Z = function(n, s) {
|
|
183
|
+
s = s || {};
|
|
184
|
+
var u = typeof n;
|
|
185
|
+
if (u === "string" && n.length > 0)
|
|
186
|
+
return o(n);
|
|
187
|
+
if (u === "number" && isNaN(n) === !1)
|
|
188
|
+
return s.long ? p(n) : d(n);
|
|
189
|
+
throw new Error(
|
|
190
|
+
"val is not a non-empty string or a valid number. val=" + JSON.stringify(n)
|
|
191
|
+
);
|
|
192
|
+
};
|
|
193
|
+
function o(n) {
|
|
194
|
+
if (n = String(n), !(n.length > 100)) {
|
|
195
|
+
var s = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
|
|
196
|
+
n
|
|
197
|
+
);
|
|
198
|
+
if (s) {
|
|
199
|
+
var u = parseFloat(s[1]), f = (s[2] || "ms").toLowerCase();
|
|
200
|
+
switch (f) {
|
|
201
|
+
case "years":
|
|
202
|
+
case "year":
|
|
203
|
+
case "yrs":
|
|
204
|
+
case "yr":
|
|
205
|
+
case "y":
|
|
206
|
+
return u * i;
|
|
207
|
+
case "days":
|
|
208
|
+
case "day":
|
|
209
|
+
case "d":
|
|
210
|
+
return u * r;
|
|
211
|
+
case "hours":
|
|
212
|
+
case "hour":
|
|
213
|
+
case "hrs":
|
|
214
|
+
case "hr":
|
|
215
|
+
case "h":
|
|
216
|
+
return u * t;
|
|
217
|
+
case "minutes":
|
|
218
|
+
case "minute":
|
|
219
|
+
case "mins":
|
|
220
|
+
case "min":
|
|
221
|
+
case "m":
|
|
222
|
+
return u * e;
|
|
223
|
+
case "seconds":
|
|
224
|
+
case "second":
|
|
225
|
+
case "secs":
|
|
226
|
+
case "sec":
|
|
227
|
+
case "s":
|
|
228
|
+
return u * a;
|
|
229
|
+
case "milliseconds":
|
|
230
|
+
case "millisecond":
|
|
231
|
+
case "msecs":
|
|
232
|
+
case "msec":
|
|
233
|
+
case "ms":
|
|
234
|
+
return u;
|
|
235
|
+
default:
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function d(n) {
|
|
242
|
+
return n >= r ? Math.round(n / r) + "d" : n >= t ? Math.round(n / t) + "h" : n >= e ? Math.round(n / e) + "m" : n >= a ? Math.round(n / a) + "s" : n + "ms";
|
|
243
|
+
}
|
|
244
|
+
function p(n) {
|
|
245
|
+
return l(n, r, "day") || l(n, t, "hour") || l(n, e, "minute") || l(n, a, "second") || n + " ms";
|
|
246
|
+
}
|
|
247
|
+
function l(n, s, u) {
|
|
248
|
+
if (!(n < s))
|
|
249
|
+
return n < s * 1.5 ? Math.floor(n / s) + " " + u : Math.ceil(n / s) + " " + u + "s";
|
|
250
|
+
}
|
|
251
|
+
return Z;
|
|
252
|
+
}
|
|
253
|
+
var fe;
|
|
254
|
+
function Ye() {
|
|
255
|
+
return fe || (fe = 1, (function(a, e) {
|
|
256
|
+
e = a.exports = i.debug = i.default = i, e.coerce = l, e.disable = d, e.enable = o, e.enabled = p, e.humanize = Me(), e.names = [], e.skips = [], e.formatters = {};
|
|
257
|
+
var t;
|
|
258
|
+
function r(n) {
|
|
259
|
+
var s = 0, u;
|
|
260
|
+
for (u in n)
|
|
261
|
+
s = (s << 5) - s + n.charCodeAt(u), s |= 0;
|
|
262
|
+
return e.colors[Math.abs(s) % e.colors.length];
|
|
263
|
+
}
|
|
264
|
+
function i(n) {
|
|
265
|
+
function s() {
|
|
266
|
+
if (s.enabled) {
|
|
267
|
+
var u = s, f = +/* @__PURE__ */ new Date(), h = f - (t || f);
|
|
268
|
+
u.diff = h, u.prev = t, u.curr = f, t = f;
|
|
269
|
+
for (var c = new Array(arguments.length), g = 0; g < c.length; g++)
|
|
270
|
+
c[g] = arguments[g];
|
|
271
|
+
c[0] = e.coerce(c[0]), typeof c[0] != "string" && c.unshift("%O");
|
|
272
|
+
var v = 0;
|
|
273
|
+
c[0] = c[0].replace(/%([a-zA-Z%])/g, function(m, _) {
|
|
274
|
+
if (m === "%%") return m;
|
|
275
|
+
v++;
|
|
276
|
+
var b = e.formatters[_];
|
|
277
|
+
if (typeof b == "function") {
|
|
278
|
+
var A = c[v];
|
|
279
|
+
m = b.call(u, A), c.splice(v, 1), v--;
|
|
280
|
+
}
|
|
281
|
+
return m;
|
|
282
|
+
}), e.formatArgs.call(u, c);
|
|
283
|
+
var P = s.log || e.log || console.log.bind(console);
|
|
284
|
+
P.apply(u, c);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return s.namespace = n, s.enabled = e.enabled(n), s.useColors = e.useColors(), s.color = r(n), typeof e.init == "function" && e.init(s), s;
|
|
288
|
+
}
|
|
289
|
+
function o(n) {
|
|
290
|
+
e.save(n), e.names = [], e.skips = [];
|
|
291
|
+
for (var s = (typeof n == "string" ? n : "").split(/[\s,]+/), u = s.length, f = 0; f < u; f++)
|
|
292
|
+
s[f] && (n = s[f].replace(/\*/g, ".*?"), n[0] === "-" ? e.skips.push(new RegExp("^" + n.substr(1) + "$")) : e.names.push(new RegExp("^" + n + "$")));
|
|
293
|
+
}
|
|
294
|
+
function d() {
|
|
295
|
+
e.enable("");
|
|
296
|
+
}
|
|
297
|
+
function p(n) {
|
|
298
|
+
var s, u;
|
|
299
|
+
for (s = 0, u = e.skips.length; s < u; s++)
|
|
300
|
+
if (e.skips[s].test(n))
|
|
301
|
+
return !1;
|
|
302
|
+
for (s = 0, u = e.names.length; s < u; s++)
|
|
303
|
+
if (e.names[s].test(n))
|
|
304
|
+
return !0;
|
|
305
|
+
return !1;
|
|
306
|
+
}
|
|
307
|
+
function l(n) {
|
|
308
|
+
return n instanceof Error ? n.stack || n.message : n;
|
|
309
|
+
}
|
|
310
|
+
})(M, M.exports)), M.exports;
|
|
311
|
+
}
|
|
312
|
+
var ce;
|
|
313
|
+
function ke() {
|
|
314
|
+
return ce || (ce = 1, (function(a, e) {
|
|
315
|
+
e = a.exports = Ye(), e.log = i, e.formatArgs = r, e.save = o, e.load = d, e.useColors = t, e.storage = typeof chrome < "u" && typeof chrome.storage < "u" ? chrome.storage.local : p(), e.colors = [
|
|
316
|
+
"lightseagreen",
|
|
317
|
+
"forestgreen",
|
|
318
|
+
"goldenrod",
|
|
319
|
+
"dodgerblue",
|
|
320
|
+
"darkorchid",
|
|
321
|
+
"crimson"
|
|
322
|
+
];
|
|
323
|
+
function t() {
|
|
324
|
+
return typeof window < "u" && window.process && window.process.type === "renderer" ? !0 : typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // is firebug? http://stackoverflow.com/a/398120/376773
|
|
325
|
+
typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // is firefox >= v31?
|
|
326
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
327
|
+
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
|
|
328
|
+
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
329
|
+
}
|
|
330
|
+
e.formatters.j = function(l) {
|
|
331
|
+
try {
|
|
332
|
+
return JSON.stringify(l);
|
|
333
|
+
} catch (n) {
|
|
334
|
+
return "[UnexpectedJSONParseError]: " + n.message;
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
function r(l) {
|
|
338
|
+
var n = this.useColors;
|
|
339
|
+
if (l[0] = (n ? "%c" : "") + this.namespace + (n ? " %c" : " ") + l[0] + (n ? "%c " : " ") + "+" + e.humanize(this.diff), !!n) {
|
|
340
|
+
var s = "color: " + this.color;
|
|
341
|
+
l.splice(1, 0, s, "color: inherit");
|
|
342
|
+
var u = 0, f = 0;
|
|
343
|
+
l[0].replace(/%[a-zA-Z%]/g, function(h) {
|
|
344
|
+
h !== "%%" && (u++, h === "%c" && (f = u));
|
|
345
|
+
}), l.splice(f, 0, s);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
function i() {
|
|
349
|
+
return typeof console == "object" && console.log && Function.prototype.apply.call(console.log, console, arguments);
|
|
350
|
+
}
|
|
351
|
+
function o(l) {
|
|
352
|
+
try {
|
|
353
|
+
l == null ? e.storage.removeItem("debug") : e.storage.debug = l;
|
|
354
|
+
} catch {
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
function d() {
|
|
358
|
+
var l;
|
|
359
|
+
try {
|
|
360
|
+
l = e.storage.debug;
|
|
361
|
+
} catch {
|
|
362
|
+
}
|
|
363
|
+
return !l && typeof process < "u" && "env" in process && (l = process.env.DEBUG), l;
|
|
364
|
+
}
|
|
365
|
+
e.enable(d());
|
|
366
|
+
function p() {
|
|
367
|
+
try {
|
|
368
|
+
return window.localStorage;
|
|
369
|
+
} catch {
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
})(V, V.exports)), V.exports;
|
|
373
|
+
}
|
|
374
|
+
var Y = { exports: {} }, pe;
|
|
375
|
+
function Fe() {
|
|
376
|
+
return pe || (pe = 1, (function(a, e) {
|
|
377
|
+
Object.defineProperty(e, "__esModule", {
|
|
378
|
+
value: !0
|
|
379
|
+
}), e.default = ["cueVideoById", "loadVideoById", "cueVideoByUrl", "loadVideoByUrl", "playVideo", "pauseVideo", "stopVideo", "getVideoLoadedFraction", "cuePlaylist", "loadPlaylist", "nextVideo", "previousVideo", "playVideoAt", "setShuffle", "setLoop", "getPlaylist", "getPlaylistIndex", "setOption", "mute", "unMute", "isMuted", "setVolume", "getVolume", "seekTo", "getPlayerState", "getPlaybackRate", "setPlaybackRate", "getAvailablePlaybackRates", "getPlaybackQuality", "setPlaybackQuality", "getAvailableQualityLevels", "getCurrentTime", "getDuration", "removeEventListener", "getVideoUrl", "getVideoEmbedCode", "getOptions", "getOption", "addEventListener", "destroy", "setSize", "getIframe"], a.exports = e.default;
|
|
380
|
+
})(Y, Y.exports)), Y.exports;
|
|
381
|
+
}
|
|
382
|
+
var k = { exports: {} }, ye;
|
|
383
|
+
function xe() {
|
|
384
|
+
return ye || (ye = 1, (function(a, e) {
|
|
385
|
+
Object.defineProperty(e, "__esModule", {
|
|
386
|
+
value: !0
|
|
387
|
+
}), e.default = ["ready", "stateChange", "playbackQualityChange", "playbackRateChange", "error", "apiChange", "volumeChange"], a.exports = e.default;
|
|
388
|
+
})(k, k.exports)), k.exports;
|
|
389
|
+
}
|
|
390
|
+
var F = { exports: {} }, x = { exports: {} }, he;
|
|
391
|
+
function Le() {
|
|
392
|
+
return he || (he = 1, (function(a, e) {
|
|
393
|
+
Object.defineProperty(e, "__esModule", {
|
|
394
|
+
value: !0
|
|
395
|
+
}), e.default = {
|
|
396
|
+
BUFFERING: 3,
|
|
397
|
+
ENDED: 0,
|
|
398
|
+
PAUSED: 2,
|
|
399
|
+
PLAYING: 1,
|
|
400
|
+
UNSTARTED: -1,
|
|
401
|
+
VIDEO_CUED: 5
|
|
402
|
+
}, a.exports = e.default;
|
|
403
|
+
})(x, x.exports)), x.exports;
|
|
404
|
+
}
|
|
405
|
+
var ve;
|
|
406
|
+
function Ue() {
|
|
407
|
+
return ve || (ve = 1, (function(a, e) {
|
|
408
|
+
Object.defineProperty(e, "__esModule", {
|
|
409
|
+
value: !0
|
|
410
|
+
});
|
|
411
|
+
var t = Le(), r = i(t);
|
|
412
|
+
function i(o) {
|
|
413
|
+
return o && o.__esModule ? o : { default: o };
|
|
414
|
+
}
|
|
415
|
+
e.default = {
|
|
416
|
+
pauseVideo: {
|
|
417
|
+
acceptableStates: [r.default.ENDED, r.default.PAUSED],
|
|
418
|
+
stateChangeRequired: !1
|
|
419
|
+
},
|
|
420
|
+
playVideo: {
|
|
421
|
+
acceptableStates: [r.default.ENDED, r.default.PLAYING],
|
|
422
|
+
stateChangeRequired: !1
|
|
423
|
+
},
|
|
424
|
+
seekTo: {
|
|
425
|
+
acceptableStates: [r.default.ENDED, r.default.PLAYING, r.default.PAUSED],
|
|
426
|
+
stateChangeRequired: !0,
|
|
427
|
+
// TRICKY: `seekTo` may not cause a state change if no buffering is
|
|
428
|
+
// required.
|
|
429
|
+
timeout: 3e3
|
|
430
|
+
}
|
|
431
|
+
}, a.exports = e.default;
|
|
432
|
+
})(F, F.exports)), F.exports;
|
|
433
|
+
}
|
|
434
|
+
var ge;
|
|
435
|
+
function Be() {
|
|
436
|
+
return ge || (ge = 1, (function(a, e) {
|
|
437
|
+
Object.defineProperty(e, "__esModule", {
|
|
438
|
+
value: !0
|
|
439
|
+
});
|
|
440
|
+
var t = ke(), r = s(t), i = Fe(), o = s(i), d = xe(), p = s(d), l = Ue(), n = s(l);
|
|
441
|
+
function s(h) {
|
|
442
|
+
return h && h.__esModule ? h : { default: h };
|
|
443
|
+
}
|
|
444
|
+
var u = (0, r.default)("youtube-player"), f = {};
|
|
445
|
+
f.proxyEvents = function(h) {
|
|
446
|
+
var c = {}, g = function(T) {
|
|
447
|
+
var w = "on" + T.slice(0, 1).toUpperCase() + T.slice(1);
|
|
448
|
+
c[w] = function(C) {
|
|
449
|
+
u('event "%s"', w, C), h.trigger(T, C);
|
|
450
|
+
};
|
|
451
|
+
}, v = !0, P = !1, m = void 0;
|
|
452
|
+
try {
|
|
453
|
+
for (var _ = p.default[Symbol.iterator](), b; !(v = (b = _.next()).done); v = !0) {
|
|
454
|
+
var A = b.value;
|
|
455
|
+
g(A);
|
|
456
|
+
}
|
|
457
|
+
} catch (q) {
|
|
458
|
+
P = !0, m = q;
|
|
459
|
+
} finally {
|
|
460
|
+
try {
|
|
461
|
+
!v && _.return && _.return();
|
|
462
|
+
} finally {
|
|
463
|
+
if (P)
|
|
464
|
+
throw m;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
return c;
|
|
468
|
+
}, f.promisifyPlayer = function(h) {
|
|
469
|
+
var c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, g = {}, v = function(w) {
|
|
470
|
+
c && n.default[w] ? g[w] = function() {
|
|
471
|
+
for (var C = arguments.length, O = Array(C), E = 0; E < C; E++)
|
|
472
|
+
O[E] = arguments[E];
|
|
473
|
+
return h.then(function(S) {
|
|
474
|
+
var R = n.default[w], Se = S.getPlayerState(), $ = S[w].apply(S, O);
|
|
475
|
+
return R.stateChangeRequired || // eslint-disable-next-line no-extra-parens
|
|
476
|
+
Array.isArray(R.acceptableStates) && R.acceptableStates.indexOf(Se) === -1 ? new Promise(function(ee) {
|
|
477
|
+
var we = function te() {
|
|
478
|
+
var Ee = S.getPlayerState(), re = void 0;
|
|
479
|
+
typeof R.timeout == "number" && (re = setTimeout(function() {
|
|
480
|
+
S.removeEventListener("onStateChange", te), ee();
|
|
481
|
+
}, R.timeout)), Array.isArray(R.acceptableStates) && R.acceptableStates.indexOf(Ee) !== -1 && (S.removeEventListener("onStateChange", te), clearTimeout(re), ee());
|
|
482
|
+
};
|
|
483
|
+
S.addEventListener("onStateChange", we);
|
|
484
|
+
}).then(function() {
|
|
485
|
+
return $;
|
|
486
|
+
}) : $;
|
|
487
|
+
});
|
|
488
|
+
} : g[w] = function() {
|
|
489
|
+
for (var C = arguments.length, O = Array(C), E = 0; E < C; E++)
|
|
490
|
+
O[E] = arguments[E];
|
|
491
|
+
return h.then(function(S) {
|
|
492
|
+
return S[w].apply(S, O);
|
|
493
|
+
});
|
|
494
|
+
};
|
|
495
|
+
}, P = !0, m = !1, _ = void 0;
|
|
496
|
+
try {
|
|
497
|
+
for (var b = o.default[Symbol.iterator](), A; !(P = (A = b.next()).done); P = !0) {
|
|
498
|
+
var q = A.value;
|
|
499
|
+
v(q);
|
|
500
|
+
}
|
|
501
|
+
} catch (T) {
|
|
502
|
+
m = !0, _ = T;
|
|
503
|
+
} finally {
|
|
504
|
+
try {
|
|
505
|
+
!P && b.return && b.return();
|
|
506
|
+
} finally {
|
|
507
|
+
if (m)
|
|
508
|
+
throw _;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return g;
|
|
512
|
+
}, e.default = f, a.exports = e.default;
|
|
513
|
+
})(D, D.exports)), D.exports;
|
|
514
|
+
}
|
|
515
|
+
var me;
|
|
516
|
+
function je() {
|
|
517
|
+
return me || (me = 1, (function(a, e) {
|
|
518
|
+
Object.defineProperty(e, "__esModule", {
|
|
519
|
+
value: !0
|
|
520
|
+
});
|
|
521
|
+
var t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(u) {
|
|
522
|
+
return typeof u;
|
|
523
|
+
} : function(u) {
|
|
524
|
+
return u && typeof Symbol == "function" && u.constructor === Symbol && u !== Symbol.prototype ? "symbol" : typeof u;
|
|
525
|
+
}, r = Ne(), i = n(r), o = Ve(), d = n(o), p = Be(), l = n(p);
|
|
526
|
+
function n(u) {
|
|
527
|
+
return u && u.__esModule ? u : { default: u };
|
|
528
|
+
}
|
|
529
|
+
var s = void 0;
|
|
530
|
+
e.default = function(u) {
|
|
531
|
+
var f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, c = (0, i.default)();
|
|
532
|
+
if (s || (s = (0, d.default)(c)), f.events)
|
|
533
|
+
throw new Error("Event handlers cannot be overwritten.");
|
|
534
|
+
if (typeof u == "string" && !document.getElementById(u))
|
|
535
|
+
throw new Error('Element "' + u + '" does not exist.');
|
|
536
|
+
f.events = l.default.proxyEvents(c);
|
|
537
|
+
var g = new Promise(function(P) {
|
|
538
|
+
if ((typeof u > "u" ? "undefined" : t(u)) === "object" && u.playVideo instanceof Function) {
|
|
539
|
+
var m = u;
|
|
540
|
+
P(m);
|
|
541
|
+
} else
|
|
542
|
+
s.then(function(_) {
|
|
543
|
+
var b = new _.Player(u, f);
|
|
544
|
+
return c.on("ready", function() {
|
|
545
|
+
P(b);
|
|
546
|
+
}), null;
|
|
547
|
+
});
|
|
548
|
+
}), v = l.default.promisifyPlayer(g, h);
|
|
549
|
+
return v.on = c.on, v.off = c.off, v;
|
|
550
|
+
}, a.exports = e.default;
|
|
551
|
+
})(I, I.exports)), I.exports;
|
|
552
|
+
}
|
|
553
|
+
var Qe = je();
|
|
554
|
+
const We = /* @__PURE__ */ X(Qe);
|
|
555
|
+
var Ge = Object.defineProperty, ze = Object.defineProperties, Je = Object.getOwnPropertyDescriptors, Pe = Object.getOwnPropertySymbols, Ze = Object.prototype.hasOwnProperty, He = Object.prototype.propertyIsEnumerable, be = (a, e, t) => e in a ? Ge(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, H = (a, e) => {
|
|
556
|
+
for (var t in e || (e = {}))
|
|
557
|
+
Ze.call(e, t) && be(a, t, e[t]);
|
|
558
|
+
if (Pe)
|
|
559
|
+
for (var t of Pe(e))
|
|
560
|
+
He.call(e, t) && be(a, t, e[t]);
|
|
561
|
+
return a;
|
|
562
|
+
}, K = (a, e) => ze(a, Je(e)), Ke = (a, e, t) => new Promise((r, i) => {
|
|
563
|
+
var o = (l) => {
|
|
564
|
+
try {
|
|
565
|
+
p(t.next(l));
|
|
566
|
+
} catch (n) {
|
|
567
|
+
i(n);
|
|
568
|
+
}
|
|
569
|
+
}, d = (l) => {
|
|
570
|
+
try {
|
|
571
|
+
p(t.throw(l));
|
|
572
|
+
} catch (n) {
|
|
573
|
+
i(n);
|
|
574
|
+
}
|
|
575
|
+
}, p = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(o, d);
|
|
576
|
+
p((t = t.apply(a, e)).next());
|
|
577
|
+
});
|
|
578
|
+
function Xe(a, e) {
|
|
579
|
+
var t, r;
|
|
580
|
+
if (a.videoId !== e.videoId)
|
|
581
|
+
return !0;
|
|
582
|
+
const i = ((t = a.opts) == null ? void 0 : t.playerVars) || {}, o = ((r = e.opts) == null ? void 0 : r.playerVars) || {};
|
|
583
|
+
return i.start !== o.start || i.end !== o.end;
|
|
584
|
+
}
|
|
585
|
+
function _e(a = {}) {
|
|
586
|
+
return K(H({}, a), {
|
|
587
|
+
height: 0,
|
|
588
|
+
width: 0,
|
|
589
|
+
playerVars: K(H({}, a.playerVars), {
|
|
590
|
+
autoplay: 0,
|
|
591
|
+
start: 0,
|
|
592
|
+
end: 0
|
|
593
|
+
})
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
function $e(a, e) {
|
|
597
|
+
return a.videoId !== e.videoId || !Ie(_e(a.opts), _e(e.opts));
|
|
598
|
+
}
|
|
599
|
+
function et(a, e) {
|
|
600
|
+
var t, r, i, o;
|
|
601
|
+
return a.id !== e.id || a.className !== e.className || ((t = a.opts) == null ? void 0 : t.width) !== ((r = e.opts) == null ? void 0 : r.width) || ((i = a.opts) == null ? void 0 : i.height) !== ((o = e.opts) == null ? void 0 : o.height) || a.iframeClassName !== e.iframeClassName || a.title !== e.title;
|
|
602
|
+
}
|
|
603
|
+
var tt = {
|
|
604
|
+
videoId: "",
|
|
605
|
+
id: "",
|
|
606
|
+
className: "",
|
|
607
|
+
iframeClassName: "",
|
|
608
|
+
style: {},
|
|
609
|
+
title: "",
|
|
610
|
+
loading: void 0,
|
|
611
|
+
opts: {},
|
|
612
|
+
onReady: () => {
|
|
613
|
+
},
|
|
614
|
+
onError: () => {
|
|
615
|
+
},
|
|
616
|
+
onPlay: () => {
|
|
617
|
+
},
|
|
618
|
+
onPause: () => {
|
|
619
|
+
},
|
|
620
|
+
onEnd: () => {
|
|
621
|
+
},
|
|
622
|
+
onStateChange: () => {
|
|
623
|
+
},
|
|
624
|
+
onPlaybackRateChange: () => {
|
|
625
|
+
},
|
|
626
|
+
onPlaybackQualityChange: () => {
|
|
627
|
+
}
|
|
628
|
+
}, rt = {
|
|
629
|
+
videoId: y.string,
|
|
630
|
+
id: y.string,
|
|
631
|
+
className: y.string,
|
|
632
|
+
iframeClassName: y.string,
|
|
633
|
+
style: y.object,
|
|
634
|
+
title: y.string,
|
|
635
|
+
loading: y.oneOf(["lazy", "eager"]),
|
|
636
|
+
opts: y.objectOf(y.any),
|
|
637
|
+
onReady: y.func,
|
|
638
|
+
onError: y.func,
|
|
639
|
+
onPlay: y.func,
|
|
640
|
+
onPause: y.func,
|
|
641
|
+
onEnd: y.func,
|
|
642
|
+
onStateChange: y.func,
|
|
643
|
+
onPlaybackRateChange: y.func,
|
|
644
|
+
onPlaybackQualityChange: y.func
|
|
645
|
+
}, L = class extends B.Component {
|
|
646
|
+
constructor(a) {
|
|
647
|
+
super(a), this.destroyPlayerPromise = void 0, this.onPlayerReady = (e) => {
|
|
648
|
+
var t, r;
|
|
649
|
+
return (r = (t = this.props).onReady) == null ? void 0 : r.call(t, e);
|
|
650
|
+
}, this.onPlayerError = (e) => {
|
|
651
|
+
var t, r;
|
|
652
|
+
return (r = (t = this.props).onError) == null ? void 0 : r.call(t, e);
|
|
653
|
+
}, this.onPlayerStateChange = (e) => {
|
|
654
|
+
var t, r, i, o, d, p, l, n;
|
|
655
|
+
switch ((r = (t = this.props).onStateChange) == null || r.call(t, e), e.data) {
|
|
656
|
+
case L.PlayerState.ENDED:
|
|
657
|
+
(o = (i = this.props).onEnd) == null || o.call(i, e);
|
|
658
|
+
break;
|
|
659
|
+
case L.PlayerState.PLAYING:
|
|
660
|
+
(p = (d = this.props).onPlay) == null || p.call(d, e);
|
|
661
|
+
break;
|
|
662
|
+
case L.PlayerState.PAUSED:
|
|
663
|
+
(n = (l = this.props).onPause) == null || n.call(l, e);
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
}, this.onPlayerPlaybackRateChange = (e) => {
|
|
667
|
+
var t, r;
|
|
668
|
+
return (r = (t = this.props).onPlaybackRateChange) == null ? void 0 : r.call(t, e);
|
|
669
|
+
}, this.onPlayerPlaybackQualityChange = (e) => {
|
|
670
|
+
var t, r;
|
|
671
|
+
return (r = (t = this.props).onPlaybackQualityChange) == null ? void 0 : r.call(t, e);
|
|
672
|
+
}, this.destroyPlayer = () => this.internalPlayer ? (this.destroyPlayerPromise = this.internalPlayer.destroy().then(() => this.destroyPlayerPromise = void 0), this.destroyPlayerPromise) : Promise.resolve(), this.createPlayer = () => {
|
|
673
|
+
if (typeof document > "u")
|
|
674
|
+
return;
|
|
675
|
+
if (this.destroyPlayerPromise) {
|
|
676
|
+
this.destroyPlayerPromise.then(this.createPlayer);
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
const e = K(H({}, this.props.opts), {
|
|
680
|
+
videoId: this.props.videoId
|
|
681
|
+
});
|
|
682
|
+
this.internalPlayer = We(this.container, e), this.internalPlayer.on("ready", this.onPlayerReady), this.internalPlayer.on("error", this.onPlayerError), this.internalPlayer.on("stateChange", this.onPlayerStateChange), this.internalPlayer.on("playbackRateChange", this.onPlayerPlaybackRateChange), this.internalPlayer.on("playbackQualityChange", this.onPlayerPlaybackQualityChange), (this.props.title || this.props.loading) && this.internalPlayer.getIframe().then((t) => {
|
|
683
|
+
this.props.title && t.setAttribute("title", this.props.title), this.props.loading && t.setAttribute("loading", this.props.loading);
|
|
684
|
+
});
|
|
685
|
+
}, this.resetPlayer = () => this.destroyPlayer().then(this.createPlayer), this.updatePlayer = () => {
|
|
686
|
+
var e;
|
|
687
|
+
(e = this.internalPlayer) == null || e.getIframe().then((t) => {
|
|
688
|
+
this.props.id ? t.setAttribute("id", this.props.id) : t.removeAttribute("id"), this.props.iframeClassName ? t.setAttribute("class", this.props.iframeClassName) : t.removeAttribute("class"), this.props.opts && this.props.opts.width ? t.setAttribute("width", this.props.opts.width.toString()) : t.removeAttribute("width"), this.props.opts && this.props.opts.height ? t.setAttribute("height", this.props.opts.height.toString()) : t.removeAttribute("height"), this.props.title ? t.setAttribute("title", this.props.title) : t.setAttribute("title", "YouTube video player"), this.props.loading ? t.setAttribute("loading", this.props.loading) : t.removeAttribute("loading");
|
|
689
|
+
});
|
|
690
|
+
}, this.getInternalPlayer = () => this.internalPlayer, this.updateVideo = () => {
|
|
691
|
+
var e, t, r, i;
|
|
692
|
+
if (typeof this.props.videoId > "u" || this.props.videoId === null) {
|
|
693
|
+
(e = this.internalPlayer) == null || e.stopVideo();
|
|
694
|
+
return;
|
|
695
|
+
}
|
|
696
|
+
let o = !1;
|
|
697
|
+
const d = {
|
|
698
|
+
videoId: this.props.videoId
|
|
699
|
+
};
|
|
700
|
+
if ((t = this.props.opts) != null && t.playerVars && (o = this.props.opts.playerVars.autoplay === 1, "start" in this.props.opts.playerVars && (d.startSeconds = this.props.opts.playerVars.start), "end" in this.props.opts.playerVars && (d.endSeconds = this.props.opts.playerVars.end)), o) {
|
|
701
|
+
(r = this.internalPlayer) == null || r.loadVideoById(d);
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
(i = this.internalPlayer) == null || i.cueVideoById(d);
|
|
705
|
+
}, this.refContainer = (e) => {
|
|
706
|
+
this.container = e;
|
|
707
|
+
}, this.container = null, this.internalPlayer = null;
|
|
708
|
+
}
|
|
709
|
+
componentDidMount() {
|
|
710
|
+
this.createPlayer();
|
|
711
|
+
}
|
|
712
|
+
componentDidUpdate(a) {
|
|
713
|
+
return Ke(this, null, function* () {
|
|
714
|
+
et(a, this.props) && this.updatePlayer(), $e(a, this.props) && (yield this.resetPlayer()), Xe(a, this.props) && this.updateVideo();
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
componentWillUnmount() {
|
|
718
|
+
this.destroyPlayer();
|
|
719
|
+
}
|
|
720
|
+
render() {
|
|
721
|
+
return /* @__PURE__ */ B.createElement("div", {
|
|
722
|
+
className: this.props.className,
|
|
723
|
+
style: this.props.style
|
|
724
|
+
}, /* @__PURE__ */ B.createElement("div", {
|
|
725
|
+
id: this.props.id,
|
|
726
|
+
className: this.props.iframeClassName,
|
|
727
|
+
ref: this.refContainer
|
|
728
|
+
}));
|
|
729
|
+
}
|
|
730
|
+
}, U = L;
|
|
731
|
+
U.propTypes = rt;
|
|
732
|
+
U.defaultProps = tt;
|
|
733
|
+
U.PlayerState = {
|
|
734
|
+
UNSTARTED: -1,
|
|
735
|
+
ENDED: 0,
|
|
736
|
+
PLAYING: 1,
|
|
737
|
+
PAUSED: 2,
|
|
738
|
+
BUFFERING: 3,
|
|
739
|
+
CUED: 5
|
|
740
|
+
};
|
|
741
|
+
var ot = U;
|
|
742
|
+
export {
|
|
743
|
+
ot as default
|
|
744
|
+
};
|