@netless/app-slide 0.2.25-beta.2 → 0.2.26
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/main.cjs.js +92 -95
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +524 -579
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +92 -95
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
package/dist/main.es.js
CHANGED
|
@@ -12752,15 +12752,15 @@ var Slide = function(t) {
|
|
|
12752
12752
|
n.r(e), n.d(e, "ErrorType", function() {
|
|
12753
12753
|
return gm;
|
|
12754
12754
|
}), n.d(e, "preloadResource", function() {
|
|
12755
|
-
return
|
|
12755
|
+
return Kb;
|
|
12756
12756
|
}), n.d(e, "delay", function() {
|
|
12757
|
-
return iT;
|
|
12758
|
-
}), n.d(e, "waitUntil", function() {
|
|
12759
12757
|
return rT;
|
|
12760
|
-
}), n.d(e, "
|
|
12758
|
+
}), n.d(e, "waitUntil", function() {
|
|
12761
12759
|
return oT;
|
|
12760
|
+
}), n.d(e, "SLIDE_EVENTS", function() {
|
|
12761
|
+
return sT;
|
|
12762
12762
|
}), n.d(e, "Slide", function() {
|
|
12763
|
-
return
|
|
12763
|
+
return uT;
|
|
12764
12764
|
});
|
|
12765
12765
|
var i = {};
|
|
12766
12766
|
n.r(i), n.d(i, "utils", function() {
|
|
@@ -30799,9 +30799,7 @@ void main(void){
|
|
|
30799
30799
|
if (o2.paths) {
|
|
30800
30800
|
const n3 = Uh.P.create({ width: i2, height: r2, resolution: this.ctx.renderer.resolution }), a2 = new Rh.d();
|
|
30801
30801
|
a2.translate(-t3, -e2), this.ctx.renderer.render(this.textContainer, { renderTexture: n3, transform: a2 });
|
|
30802
|
-
const l2 = this.json.isHorz !== void 0 && !this.json.isHorz
|
|
30803
|
-
this.json.presetTextShape.type;
|
|
30804
|
-
const h2 = function(t4, e3, n4, i3) {
|
|
30802
|
+
const l2 = this.json.isHorz !== void 0 && !this.json.isHorz, h2 = function(t4, e3, n4, i3) {
|
|
30805
30803
|
if (!vv[n4])
|
|
30806
30804
|
return null;
|
|
30807
30805
|
const r3 = vv[n4].top(mv(e3)), o3 = vv[n4].bottom(mv(t4));
|
|
@@ -31228,11 +31226,11 @@ void main(void){
|
|
|
31228
31226
|
const qv = { pivot: { x: 0, y: 0 }, width: 0, height: 0 };
|
|
31229
31227
|
class Zv extends lg {
|
|
31230
31228
|
constructor(t2, e2, n2, i2) {
|
|
31231
|
-
var r2
|
|
31232
|
-
super(t2, e2, n2), this.renderContainer = new wh.b(), this.needCacheAsBitMap = false, this.backgroundGraphics = null, this.effectList = [], this.strokeGraphics = null, this.
|
|
31229
|
+
var r2;
|
|
31230
|
+
super(t2, e2, n2), this.renderContainer = new wh.b(), this.needCacheAsBitMap = false, this.backgroundGraphics = null, this.effectList = [], this.strokeGraphics = null, this.arrowList = [], this.fillColorFilter = new vg(), this.strokeColorFilter = new vg(), this.pptColorFilter = new vg(), this.id = "", this.ppt_c = new eg(this), this.fill = new ng(this), this.stroke = new $m(this), this.effectObject = null, this.effectContainer = new wh.b(), this.effectDisposer = () => {
|
|
31233
31231
|
}, this.json = t2, this.json.fillStyle && this.json.fillStyle.fillType === "groupFill" && i2 && (this.json.fillStyle = i2), this.id = t2.id;
|
|
31234
|
-
const { fillStyle:
|
|
31235
|
-
this.container.sortableChildren = true, this.container.name = t2.id + "_container_[Shape]", this.effectContainer.name = "effect-container", this.effectContainer.zIndex = 1, this.container.addChild(this.effectContainer), this.renderContainer.name = t2.id + "_render_container_[Shape]", this.generateArrowList(), this.backgroundFill = this.createBackgroundFill(), this.backgroundGraphics = this.createBackgroundGraphics(), this.strokeFill = this.createStrokeFill(), this.strokeGraphics = this.createStrokeGraphics(), this.
|
|
31232
|
+
const { fillStyle: o2, lineStyle: s2 } = this.json;
|
|
31233
|
+
this.container.sortableChildren = true, this.container.name = t2.id + "_container_[Shape]", this.effectContainer.name = "effect-container", this.effectContainer.zIndex = 1, this.container.addChild(this.effectContainer), this.renderContainer.name = t2.id + "_render_container_[Shape]", this.generateArrowList(), this.backgroundFill = this.createBackgroundFill(), this.backgroundGraphics = this.createBackgroundGraphics(), this.strokeFill = this.createStrokeFill(), this.strokeGraphics = this.createStrokeGraphics(), this.ctx.timingTargets.addTarget(this.id, this), (o2 == null ? void 0 : o2.fillType) === "solidFill" && (this.fillColorFilter.currentColor = o2.color, this.fillColorFilter.designColor = o2.color), ((r2 = s2 == null ? void 0 : s2.fill) === null || r2 === void 0 ? void 0 : r2.fillType) === "solidFill" && (this.strokeColorFilter.currentColor = s2.fill.color, this.strokeColorFilter.designColor = s2.fill.color), this.updateTransform(this.json), t2.textBody && (this.text = new yv(t2.textBody, this.ctx, t2.textBody.iterateType, { x: this.designGlobalPosition.x, y: this.designGlobalPosition.y }, this.json.rotation || 0)), this.container.hitArea = new Rh.k(1, 1, this.json.width, this.json.height), this.ctx.slideScopeEventHub.once("slide-render", (t3) => {
|
|
31236
31234
|
if (this.ctx.slideIndex === t3 && this.effectObject) {
|
|
31237
31235
|
const t4 = this.getEffectTexture();
|
|
31238
31236
|
if (t4) {
|
|
@@ -31367,10 +31365,10 @@ void main(void){
|
|
|
31367
31365
|
}
|
|
31368
31366
|
render(t2) {
|
|
31369
31367
|
t2.addSubMTask(() => Yv(this, void 0, void 0, function* () {
|
|
31370
|
-
var t3, e2
|
|
31371
|
-
(t3 = this.strokeGraphics) === null || t3 === void 0 || t3.render(), (e2 = this.backgroundGraphics) === null || e2 === void 0 || e2.render(), this.createBackground(), this.subClassRender(), this.createFilledPathMask(), this.createPathFill(), this.createArrow()
|
|
31368
|
+
var t3, e2;
|
|
31369
|
+
(t3 = this.strokeGraphics) === null || t3 === void 0 || t3.render(), (e2 = this.backgroundGraphics) === null || e2 === void 0 || e2.render(), this.createBackground(), this.subClassRender(), this.createFilledPathMask(), this.createPathFill(), this.createArrow();
|
|
31372
31370
|
}), "@ShapeImpl[render]"), this.text && this.text.render(t2), t2.addSubMTask(() => Yv(this, void 0, void 0, function* () {
|
|
31373
|
-
var t3, e2, n2, i2, r2, o2, s2, a2, l2, h2, u2
|
|
31371
|
+
var t3, e2, n2, i2, r2, o2, s2, a2, l2, h2, u2;
|
|
31374
31372
|
if (((t3 = this.json.textBody) === null || t3 === void 0 ? void 0 : t3.iterateType) === "wd" || ((e2 = this.json.textBody) === null || e2 === void 0 ? void 0 : e2.iterateType) === "lt") {
|
|
31375
31373
|
if (this.renderContainer.addChild(this.container), this.text) {
|
|
31376
31374
|
const { x: t4, y: e3 } = (n2 = this.json.scale) !== null && n2 !== void 0 ? n2 : { x: 1, y: 1 };
|
|
@@ -31394,7 +31392,10 @@ void main(void){
|
|
|
31394
31392
|
const t4 = Uh.P.create({ width: this.json.width, height: this.json.height, resolution: Math.ceil(this.ctx.renderer.resolution) });
|
|
31395
31393
|
this.ctx.renderer.render(this.renderContainer, { renderTexture: t4 }), this.ctx.bgTexture = t4;
|
|
31396
31394
|
}
|
|
31397
|
-
this.json.effectList && this.json.effectList.length > 0 && ((l2 = this.ctx.featureList) === null || l2 === void 0 ? void 0 : l2.effect) && !this.ctx.forceCanvas && (this.effectObject = new Wv(this.effectContainer, this.json.effectList, `${this.ctx.taskId}_${this.ctx.slideIndex}_${this.json.id}`, this.ctx, this.json.rotation || 0, new Rh.g(((h2 = this.json.scale) === null || h2 === void 0 ? void 0 : h2.x) || 1, ((u2 = this.json.scale) === null || u2 === void 0 ? void 0 : u2.y) || 1)),
|
|
31395
|
+
this.json.effectList && this.json.effectList.length > 0 && ((l2 = this.ctx.featureList) === null || l2 === void 0 ? void 0 : l2.effect) && !this.ctx.forceCanvas && (this.effectObject = new Wv(this.effectContainer, this.json.effectList, `${this.ctx.taskId}_${this.ctx.slideIndex}_${this.json.id}`, this.ctx, this.json.rotation || 0, new Rh.g(((h2 = this.json.scale) === null || h2 === void 0 ? void 0 : h2.x) || 1, ((u2 = this.json.scale) === null || u2 === void 0 ? void 0 : u2.y) || 1)), function(t4) {
|
|
31396
|
+
var e3, n3, i3;
|
|
31397
|
+
return ((e3 = t4.fillStyle) === null || e3 === void 0 ? void 0 : e3.fillType) === "gifFill" || (((i3 = (n3 = t4.lineStyle) === null || n3 === void 0 ? void 0 : n3.fill) === null || i3 === void 0 ? void 0 : i3.fillType) === "gifFill" || !!t4.picFill && t4.picFill.fillType === "gifFill");
|
|
31398
|
+
}(this.json) && this.effectObject.setFrameCount(-1), this.effectObject.on("ready", () => {
|
|
31398
31399
|
var t4;
|
|
31399
31400
|
this.effectContainer.visible = false, this.effectObject.container.zIndex = 10, this.container.addChild(this.effectObject.container), (t4 = this.effectObject) === null || t4 === void 0 || t4.updateFrame(1);
|
|
31400
31401
|
}));
|
|
@@ -31660,13 +31661,11 @@ void main(void){
|
|
|
31660
31661
|
class n_ extends Ja.a {
|
|
31661
31662
|
constructor(t2) {
|
|
31662
31663
|
var e2, n2;
|
|
31663
|
-
super(), this.type = "video", this.sprite = new Kd(), this.isPlaying = false, this.isGlobalPause = false, this.
|
|
31664
|
-
this.ctx.logger.warn(this.url + ", Failed to fetch data, but trying.", this.ctx.taskId);
|
|
31665
|
-
}, this.updateVolume = (t3) => {
|
|
31664
|
+
super(), this.type = "video", this.sprite = new Kd(), this.isPlaying = false, this.isGlobalPause = false, this.updateVolume = (t3) => {
|
|
31666
31665
|
Uy.RtcAudioClazz ? this.rtcAudio.volume(t3) : this.videoResource.source && (this.videoResource.source.volume = t3);
|
|
31667
31666
|
}, this.id = t2.id, this.start = (e2 = t2.video.cut) === null || e2 === void 0 ? void 0 : e2.start, this.end = (n2 = t2.video.cut) === null || n2 === void 0 ? void 0 : n2.end, this.container = t2.container, this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
|
|
31668
31667
|
let i2 = t2.video.src;
|
|
31669
|
-
this.ctx.loaderDelegate && (i2 = this.ctx.loaderDelegate.redirectMedia(i2), this.ctx.logger.info(`redirect media url from ${t2.video.src} to ${i2} by delegate.`, t2.ctx.taskId)), this.videoResource = new Uh.jb(i2, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true })
|
|
31668
|
+
this.ctx.loaderDelegate && (i2 = this.ctx.loaderDelegate.redirectMedia(i2), this.ctx.logger.info(`redirect media url from ${t2.video.src} to ${i2} by delegate.`, t2.ctx.taskId)), this.videoResource = new Uh.jb(i2, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true });
|
|
31670
31669
|
let r2 = t2.video.src.replace(/4$/, "3");
|
|
31671
31670
|
this.ctx.loaderDelegate && (r2 = this.ctx.loaderDelegate.redirectMedia(r2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${r2} by delegate.`, t2.ctx.taskId)), this.rtcAudio = new t_(r2, t2.ctx.runningAudio);
|
|
31672
31671
|
const { video: o2, width: s2, height: a2, target: l2 } = t2;
|
|
@@ -31730,7 +31729,7 @@ void main(void){
|
|
|
31730
31729
|
}
|
|
31731
31730
|
pause() {
|
|
31732
31731
|
var t2;
|
|
31733
|
-
this.isPlaying = false,
|
|
31732
|
+
this.isPlaying = false, Uy.RtcAudioClazz ? (this.rtcAudio.once("pause", () => {
|
|
31734
31733
|
var t3;
|
|
31735
31734
|
(t3 = this.videoResource.source) === null || t3 === void 0 || t3.pause();
|
|
31736
31735
|
}), this.rtcAudio.pause()) : (t2 = this.videoResource.source) === null || t2 === void 0 || t2.pause();
|
|
@@ -34172,17 +34171,21 @@ void main(void){
|
|
|
34172
34171
|
}
|
|
34173
34172
|
Uy.platform = wy, Uy.RtcAudioClazz = null;
|
|
34174
34173
|
var ky = /* @__PURE__ */ new Map();
|
|
34175
|
-
|
|
34174
|
+
function Gy(t2) {
|
|
34175
|
+
var e2 = ky.get(t2.hookPoint) || [];
|
|
34176
|
+
e2.push(t2), ky.set(t2.hookPoint, e2);
|
|
34177
|
+
}
|
|
34178
|
+
var Hy, jy = n(132), zy = n.n(jy), Vy = n(47), Xy = n.n(Vy), Wy = n(48), Yy = n.n(Wy), qy = [], Zy = "ResizeObserver loop completed with undelivered notifications.";
|
|
34176
34179
|
!function(t2) {
|
|
34177
34180
|
t2.BORDER_BOX = "border-box", t2.CONTENT_BOX = "content-box", t2.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
34178
|
-
}(
|
|
34179
|
-
var
|
|
34181
|
+
}(Hy || (Hy = {}));
|
|
34182
|
+
var Jy, Ky = function(t2) {
|
|
34180
34183
|
return Object.freeze(t2);
|
|
34181
|
-
},
|
|
34182
|
-
this.inlineSize = t2, this.blockSize = e2,
|
|
34183
|
-
},
|
|
34184
|
+
}, Qy = function(t2, e2) {
|
|
34185
|
+
this.inlineSize = t2, this.blockSize = e2, Ky(this);
|
|
34186
|
+
}, $y = function() {
|
|
34184
34187
|
function t2(t3, e2, n2, i2) {
|
|
34185
|
-
return this.x = t3, this.y = e2, this.width = n2, this.height = i2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width,
|
|
34188
|
+
return this.x = t3, this.y = e2, this.width = n2, this.height = i2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, Ky(this);
|
|
34186
34189
|
}
|
|
34187
34190
|
return t2.prototype.toJSON = function() {
|
|
34188
34191
|
var t3 = this;
|
|
@@ -34190,59 +34193,59 @@ void main(void){
|
|
|
34190
34193
|
}, t2.fromRect = function(e2) {
|
|
34191
34194
|
return new t2(e2.x, e2.y, e2.width, e2.height);
|
|
34192
34195
|
}, t2;
|
|
34193
|
-
}(),
|
|
34196
|
+
}(), tx = function(t2) {
|
|
34194
34197
|
return t2 instanceof SVGElement && "getBBox" in t2;
|
|
34195
|
-
},
|
|
34196
|
-
if (
|
|
34198
|
+
}, ex = function(t2) {
|
|
34199
|
+
if (tx(t2)) {
|
|
34197
34200
|
var e2 = t2.getBBox(), n2 = e2.width, i2 = e2.height;
|
|
34198
34201
|
return !n2 && !i2;
|
|
34199
34202
|
}
|
|
34200
34203
|
var r2 = t2, o2 = r2.offsetWidth, s2 = r2.offsetHeight;
|
|
34201
34204
|
return !(o2 || s2 || t2.getClientRects().length);
|
|
34202
|
-
},
|
|
34205
|
+
}, nx = function(t2) {
|
|
34203
34206
|
var e2;
|
|
34204
34207
|
if (t2 instanceof Element)
|
|
34205
34208
|
return true;
|
|
34206
34209
|
var n2 = (e2 = t2 == null ? void 0 : t2.ownerDocument) === null || e2 === void 0 ? void 0 : e2.defaultView;
|
|
34207
34210
|
return !!(n2 && t2 instanceof n2.Element);
|
|
34208
|
-
},
|
|
34211
|
+
}, ix = typeof window != "undefined" ? window : {}, rx = /* @__PURE__ */ new WeakMap(), ox = /auto|scroll/, sx = /^tb|vertical/, ax = /msie|trident/i.test(ix.navigator && ix.navigator.userAgent), lx = function(t2) {
|
|
34209
34212
|
return parseFloat(t2 || "0");
|
|
34210
|
-
},
|
|
34211
|
-
return t2 === void 0 && (t2 = 0), e2 === void 0 && (e2 = 0), n2 === void 0 && (n2 = false), new
|
|
34212
|
-
},
|
|
34213
|
-
if (e2 === void 0 && (e2 = false),
|
|
34214
|
-
return
|
|
34215
|
-
if (
|
|
34216
|
-
return
|
|
34217
|
-
var n2 = getComputedStyle(t2), i2 =
|
|
34218
|
-
return
|
|
34219
|
-
},
|
|
34220
|
-
var i2 =
|
|
34213
|
+
}, hx = function(t2, e2, n2) {
|
|
34214
|
+
return t2 === void 0 && (t2 = 0), e2 === void 0 && (e2 = 0), n2 === void 0 && (n2 = false), new Qy((n2 ? e2 : t2) || 0, (n2 ? t2 : e2) || 0);
|
|
34215
|
+
}, ux = Ky({ devicePixelContentBoxSize: hx(), borderBoxSize: hx(), contentBoxSize: hx(), contentRect: new $y(0, 0, 0, 0) }), cx = function(t2, e2) {
|
|
34216
|
+
if (e2 === void 0 && (e2 = false), rx.has(t2) && !e2)
|
|
34217
|
+
return rx.get(t2);
|
|
34218
|
+
if (ex(t2))
|
|
34219
|
+
return rx.set(t2, ux), ux;
|
|
34220
|
+
var n2 = getComputedStyle(t2), i2 = tx(t2) && t2.ownerSVGElement && t2.getBBox(), r2 = !ax && n2.boxSizing === "border-box", o2 = sx.test(n2.writingMode || ""), s2 = !i2 && ox.test(n2.overflowY || ""), a2 = !i2 && ox.test(n2.overflowX || ""), l2 = i2 ? 0 : lx(n2.paddingTop), h2 = i2 ? 0 : lx(n2.paddingRight), u2 = i2 ? 0 : lx(n2.paddingBottom), c2 = i2 ? 0 : lx(n2.paddingLeft), d2 = i2 ? 0 : lx(n2.borderTopWidth), p2 = i2 ? 0 : lx(n2.borderRightWidth), f2 = i2 ? 0 : lx(n2.borderBottomWidth), m2 = c2 + h2, g2 = l2 + u2, v2 = (i2 ? 0 : lx(n2.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t2.offsetHeight - _2 - t2.clientHeight : 0, x2 = s2 ? t2.offsetWidth - v2 - t2.clientWidth : 0, b2 = r2 ? m2 + v2 : 0, T2 = r2 ? g2 + _2 : 0, E2 = i2 ? i2.width : lx(n2.width) - b2 - x2, S2 = i2 ? i2.height : lx(n2.height) - T2 - y2, w2 = E2 + m2 + x2 + v2, A2 = S2 + g2 + y2 + _2, M2 = Ky({ devicePixelContentBoxSize: hx(Math.round(E2 * devicePixelRatio), Math.round(S2 * devicePixelRatio), o2), borderBoxSize: hx(w2, A2, o2), contentBoxSize: hx(E2, S2, o2), contentRect: new $y(c2, l2, E2, S2) });
|
|
34221
|
+
return rx.set(t2, M2), M2;
|
|
34222
|
+
}, dx = function(t2, e2, n2) {
|
|
34223
|
+
var i2 = cx(t2, n2), r2 = i2.borderBoxSize, o2 = i2.contentBoxSize, s2 = i2.devicePixelContentBoxSize;
|
|
34221
34224
|
switch (e2) {
|
|
34222
|
-
case
|
|
34225
|
+
case Hy.DEVICE_PIXEL_CONTENT_BOX:
|
|
34223
34226
|
return s2;
|
|
34224
|
-
case
|
|
34227
|
+
case Hy.BORDER_BOX:
|
|
34225
34228
|
return r2;
|
|
34226
34229
|
default:
|
|
34227
34230
|
return o2;
|
|
34228
34231
|
}
|
|
34229
|
-
}, dx = function(t2) {
|
|
34230
|
-
var e2 = ux(t2);
|
|
34231
|
-
this.target = t2, this.contentRect = e2.contentRect, this.borderBoxSize = Jy([e2.borderBoxSize]), this.contentBoxSize = Jy([e2.contentBoxSize]), this.devicePixelContentBoxSize = Jy([e2.devicePixelContentBoxSize]);
|
|
34232
34232
|
}, px = function(t2) {
|
|
34233
|
-
|
|
34233
|
+
var e2 = cx(t2);
|
|
34234
|
+
this.target = t2, this.contentRect = e2.contentRect, this.borderBoxSize = Ky([e2.borderBoxSize]), this.contentBoxSize = Ky([e2.contentBoxSize]), this.devicePixelContentBoxSize = Ky([e2.devicePixelContentBoxSize]);
|
|
34235
|
+
}, fx = function(t2) {
|
|
34236
|
+
if (ex(t2))
|
|
34234
34237
|
return 1 / 0;
|
|
34235
34238
|
for (var e2 = 0, n2 = t2.parentNode; n2; )
|
|
34236
34239
|
e2 += 1, n2 = n2.parentNode;
|
|
34237
34240
|
return e2;
|
|
34238
|
-
},
|
|
34241
|
+
}, mx = function() {
|
|
34239
34242
|
var t2 = 1 / 0, e2 = [];
|
|
34240
|
-
|
|
34243
|
+
qy.forEach(function(n3) {
|
|
34241
34244
|
if (n3.activeTargets.length !== 0) {
|
|
34242
34245
|
var i3 = [];
|
|
34243
34246
|
n3.activeTargets.forEach(function(e3) {
|
|
34244
|
-
var n4 = new
|
|
34245
|
-
i3.push(n4), e3.lastReportedSize =
|
|
34247
|
+
var n4 = new px(e3.target), r2 = fx(e3.target);
|
|
34248
|
+
i3.push(n4), e3.lastReportedSize = dx(e3.target, e3.observedBox), r2 < t2 && (t2 = r2);
|
|
34246
34249
|
}), e2.push(function() {
|
|
34247
34250
|
n3.callback.call(n3.observer, i3, n3.observer);
|
|
34248
34251
|
}), n3.activeTargets.splice(0, n3.activeTargets.length);
|
|
@@ -34252,36 +34255,36 @@ void main(void){
|
|
|
34252
34255
|
(0, i2[n2])();
|
|
34253
34256
|
}
|
|
34254
34257
|
return t2;
|
|
34255
|
-
},
|
|
34256
|
-
|
|
34258
|
+
}, gx = function(t2) {
|
|
34259
|
+
qy.forEach(function(e2) {
|
|
34257
34260
|
e2.activeTargets.splice(0, e2.activeTargets.length), e2.skippedTargets.splice(0, e2.skippedTargets.length), e2.observationTargets.forEach(function(n2) {
|
|
34258
|
-
n2.isActive() && (
|
|
34261
|
+
n2.isActive() && (fx(n2.target) > t2 ? e2.activeTargets.push(n2) : e2.skippedTargets.push(n2));
|
|
34259
34262
|
});
|
|
34260
34263
|
});
|
|
34261
|
-
},
|
|
34264
|
+
}, vx = function() {
|
|
34262
34265
|
var t2, e2 = 0;
|
|
34263
|
-
for (
|
|
34266
|
+
for (gx(e2); qy.some(function(t3) {
|
|
34264
34267
|
return t3.activeTargets.length > 0;
|
|
34265
34268
|
}); )
|
|
34266
|
-
e2 =
|
|
34267
|
-
return
|
|
34269
|
+
e2 = mx(), gx(e2);
|
|
34270
|
+
return qy.some(function(t3) {
|
|
34268
34271
|
return t3.skippedTargets.length > 0;
|
|
34269
|
-
}) && (typeof ErrorEvent == "function" ? t2 = new ErrorEvent("error", { message:
|
|
34270
|
-
},
|
|
34271
|
-
if (!
|
|
34272
|
+
}) && (typeof ErrorEvent == "function" ? t2 = new ErrorEvent("error", { message: Zy }) : ((t2 = document.createEvent("Event")).initEvent("error", false, false), t2.message = Zy), window.dispatchEvent(t2)), e2 > 0;
|
|
34273
|
+
}, _x = [], yx = function(t2) {
|
|
34274
|
+
if (!Jy) {
|
|
34272
34275
|
var e2 = 0, n2 = document.createTextNode("");
|
|
34273
34276
|
new MutationObserver(function() {
|
|
34274
|
-
return
|
|
34277
|
+
return _x.splice(0).forEach(function(t3) {
|
|
34275
34278
|
return t3();
|
|
34276
34279
|
});
|
|
34277
|
-
}).observe(n2, { characterData: true }),
|
|
34280
|
+
}).observe(n2, { characterData: true }), Jy = function() {
|
|
34278
34281
|
n2.textContent = "".concat(e2 ? e2-- : e2++);
|
|
34279
34282
|
};
|
|
34280
34283
|
}
|
|
34281
|
-
|
|
34282
|
-
},
|
|
34284
|
+
_x.push(t2), Jy();
|
|
34285
|
+
}, xx = 0, bx = { attributes: true, characterData: true, childList: true, subtree: true }, Tx = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], Ex = function(t2) {
|
|
34283
34286
|
return t2 === void 0 && (t2 = 0), Date.now() + t2;
|
|
34284
|
-
},
|
|
34287
|
+
}, Sx = false, wx = new (function() {
|
|
34285
34288
|
function t2() {
|
|
34286
34289
|
var t3 = this;
|
|
34287
34290
|
this.stopped = true, this.listener = function() {
|
|
@@ -34290,19 +34293,19 @@ void main(void){
|
|
|
34290
34293
|
}
|
|
34291
34294
|
return t2.prototype.run = function(t3) {
|
|
34292
34295
|
var e2 = this;
|
|
34293
|
-
if (t3 === void 0 && (t3 = 250), !
|
|
34294
|
-
|
|
34295
|
-
var n2, i2 =
|
|
34296
|
+
if (t3 === void 0 && (t3 = 250), !Sx) {
|
|
34297
|
+
Sx = true;
|
|
34298
|
+
var n2, i2 = Ex(t3);
|
|
34296
34299
|
n2 = function() {
|
|
34297
34300
|
var n3 = false;
|
|
34298
34301
|
try {
|
|
34299
|
-
n3 =
|
|
34302
|
+
n3 = vx();
|
|
34300
34303
|
} finally {
|
|
34301
|
-
if (
|
|
34304
|
+
if (Sx = false, t3 = i2 - Ex(), !xx)
|
|
34302
34305
|
return;
|
|
34303
34306
|
n3 ? e2.run(1e3) : t3 > 0 ? e2.run(t3) : e2.start();
|
|
34304
34307
|
}
|
|
34305
|
-
},
|
|
34308
|
+
}, yx(function() {
|
|
34306
34309
|
requestAnimationFrame(n2);
|
|
34307
34310
|
});
|
|
34308
34311
|
}
|
|
@@ -34310,29 +34313,29 @@ void main(void){
|
|
|
34310
34313
|
this.stop(), this.run();
|
|
34311
34314
|
}, t2.prototype.observe = function() {
|
|
34312
34315
|
var t3 = this, e2 = function() {
|
|
34313
|
-
return t3.observer && t3.observer.observe(document.body,
|
|
34316
|
+
return t3.observer && t3.observer.observe(document.body, bx);
|
|
34314
34317
|
};
|
|
34315
|
-
document.body ? e2() :
|
|
34318
|
+
document.body ? e2() : ix.addEventListener("DOMContentLoaded", e2);
|
|
34316
34319
|
}, t2.prototype.start = function() {
|
|
34317
34320
|
var t3 = this;
|
|
34318
|
-
this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(),
|
|
34319
|
-
return
|
|
34321
|
+
this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), Tx.forEach(function(e2) {
|
|
34322
|
+
return ix.addEventListener(e2, t3.listener, true);
|
|
34320
34323
|
}));
|
|
34321
34324
|
}, t2.prototype.stop = function() {
|
|
34322
34325
|
var t3 = this;
|
|
34323
|
-
this.stopped || (this.observer && this.observer.disconnect(),
|
|
34324
|
-
return
|
|
34326
|
+
this.stopped || (this.observer && this.observer.disconnect(), Tx.forEach(function(e2) {
|
|
34327
|
+
return ix.removeEventListener(e2, t3.listener, true);
|
|
34325
34328
|
}), this.stopped = true);
|
|
34326
34329
|
}, t2;
|
|
34327
|
-
}())(),
|
|
34328
|
-
!
|
|
34329
|
-
},
|
|
34330
|
+
}())(), Ax = function(t2) {
|
|
34331
|
+
!xx && t2 > 0 && wx.start(), !(xx += t2) && wx.stop();
|
|
34332
|
+
}, Mx = function() {
|
|
34330
34333
|
function t2(t3, e2) {
|
|
34331
|
-
this.target = t3, this.observedBox = e2 ||
|
|
34334
|
+
this.target = t3, this.observedBox = e2 || Hy.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
|
|
34332
34335
|
}
|
|
34333
34336
|
return t2.prototype.isActive = function() {
|
|
34334
|
-
var t3, e2 =
|
|
34335
|
-
return t3 = this.target,
|
|
34337
|
+
var t3, e2 = dx(this.target, this.observedBox, true);
|
|
34338
|
+
return t3 = this.target, tx(t3) || function(t4) {
|
|
34336
34339
|
switch (t4.tagName) {
|
|
34337
34340
|
case "INPUT":
|
|
34338
34341
|
if (t4.type !== "image")
|
|
@@ -34349,57 +34352,57 @@ void main(void){
|
|
|
34349
34352
|
return false;
|
|
34350
34353
|
}(t3) || getComputedStyle(t3).display !== "inline" || (this.lastReportedSize = e2), this.lastReportedSize.inlineSize !== e2.inlineSize || this.lastReportedSize.blockSize !== e2.blockSize;
|
|
34351
34354
|
}, t2;
|
|
34352
|
-
}(),
|
|
34355
|
+
}(), Rx = function(t2, e2) {
|
|
34353
34356
|
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t2, this.callback = e2;
|
|
34354
|
-
},
|
|
34357
|
+
}, Cx = /* @__PURE__ */ new WeakMap(), Px = function(t2, e2) {
|
|
34355
34358
|
for (var n2 = 0; n2 < t2.length; n2 += 1)
|
|
34356
34359
|
if (t2[n2].target === e2)
|
|
34357
34360
|
return n2;
|
|
34358
34361
|
return -1;
|
|
34359
|
-
},
|
|
34362
|
+
}, Ix = function() {
|
|
34360
34363
|
function t2() {
|
|
34361
34364
|
}
|
|
34362
34365
|
return t2.connect = function(t3, e2) {
|
|
34363
|
-
var n2 = new
|
|
34364
|
-
|
|
34366
|
+
var n2 = new Rx(t3, e2);
|
|
34367
|
+
Cx.set(t3, n2);
|
|
34365
34368
|
}, t2.observe = function(t3, e2, n2) {
|
|
34366
|
-
var i2 =
|
|
34367
|
-
|
|
34369
|
+
var i2 = Cx.get(t3), r2 = i2.observationTargets.length === 0;
|
|
34370
|
+
Px(i2.observationTargets, e2) < 0 && (r2 && qy.push(i2), i2.observationTargets.push(new Mx(e2, n2 && n2.box)), Ax(1), wx.schedule());
|
|
34368
34371
|
}, t2.unobserve = function(t3, e2) {
|
|
34369
|
-
var n2 =
|
|
34370
|
-
i2 >= 0 && (r2 &&
|
|
34372
|
+
var n2 = Cx.get(t3), i2 = Px(n2.observationTargets, e2), r2 = n2.observationTargets.length === 1;
|
|
34373
|
+
i2 >= 0 && (r2 && qy.splice(qy.indexOf(n2), 1), n2.observationTargets.splice(i2, 1), Ax(-1));
|
|
34371
34374
|
}, t2.disconnect = function(t3) {
|
|
34372
|
-
var e2 = this, n2 =
|
|
34375
|
+
var e2 = this, n2 = Cx.get(t3);
|
|
34373
34376
|
n2.observationTargets.slice().forEach(function(n3) {
|
|
34374
34377
|
return e2.unobserve(t3, n3.target);
|
|
34375
34378
|
}), n2.activeTargets.splice(0, n2.activeTargets.length);
|
|
34376
34379
|
}, t2;
|
|
34377
|
-
}(),
|
|
34380
|
+
}(), Ox = function() {
|
|
34378
34381
|
function t2(t3) {
|
|
34379
34382
|
if (arguments.length === 0)
|
|
34380
34383
|
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
34381
34384
|
if (typeof t3 != "function")
|
|
34382
34385
|
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
|
34383
|
-
|
|
34386
|
+
Ix.connect(this, t3);
|
|
34384
34387
|
}
|
|
34385
34388
|
return t2.prototype.observe = function(t3, e2) {
|
|
34386
34389
|
if (arguments.length === 0)
|
|
34387
34390
|
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
34388
|
-
if (!
|
|
34391
|
+
if (!nx(t3))
|
|
34389
34392
|
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
34390
|
-
|
|
34393
|
+
Ix.observe(this, t3, e2);
|
|
34391
34394
|
}, t2.prototype.unobserve = function(t3) {
|
|
34392
34395
|
if (arguments.length === 0)
|
|
34393
34396
|
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
34394
|
-
if (!
|
|
34397
|
+
if (!nx(t3))
|
|
34395
34398
|
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
34396
|
-
|
|
34399
|
+
Ix.unobserve(this, t3);
|
|
34397
34400
|
}, t2.prototype.disconnect = function() {
|
|
34398
|
-
|
|
34401
|
+
Ix.disconnect(this);
|
|
34399
34402
|
}, t2.toString = function() {
|
|
34400
34403
|
return "function ResizeObserver () { [polyfill code] }";
|
|
34401
34404
|
}, t2;
|
|
34402
|
-
}(),
|
|
34405
|
+
}(), Nx = function(t2, e2, n2, i2) {
|
|
34403
34406
|
return new (n2 || (n2 = Promise))(function(r2, o2) {
|
|
34404
34407
|
function s2(t3) {
|
|
34405
34408
|
try {
|
|
@@ -34423,7 +34426,7 @@ void main(void){
|
|
|
34423
34426
|
}
|
|
34424
34427
|
l2((i2 = i2.apply(t2, e2 || [])).next());
|
|
34425
34428
|
});
|
|
34426
|
-
},
|
|
34429
|
+
}, Lx = function(t2, e2) {
|
|
34427
34430
|
var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
|
|
34428
34431
|
if (1 & r2[0])
|
|
34429
34432
|
throw r2[1];
|
|
@@ -34486,14 +34489,14 @@ void main(void){
|
|
|
34486
34489
|
}([o3, a3]);
|
|
34487
34490
|
};
|
|
34488
34491
|
}
|
|
34489
|
-
},
|
|
34492
|
+
}, Dx = function() {
|
|
34490
34493
|
function t2(t3, e2, n2, i2, r2) {
|
|
34491
34494
|
this.state = "idle", this.index = -1, this.slideIndex = -1, this.fn = n2, this.index = t3, this.slideIndex = e2, this.eventHub = i2, this.id = r2;
|
|
34492
34495
|
}
|
|
34493
34496
|
return t2.prototype.apply = function() {
|
|
34494
|
-
return
|
|
34497
|
+
return Nx(this, void 0, void 0, function() {
|
|
34495
34498
|
var t3;
|
|
34496
|
-
return
|
|
34499
|
+
return Lx(this, function(e2) {
|
|
34497
34500
|
switch (e2.label) {
|
|
34498
34501
|
case 0:
|
|
34499
34502
|
this.eventHub.emit("task-start", this), e2.label = 1;
|
|
@@ -34509,7 +34512,7 @@ void main(void){
|
|
|
34509
34512
|
});
|
|
34510
34513
|
});
|
|
34511
34514
|
}, t2;
|
|
34512
|
-
}(),
|
|
34515
|
+
}(), Fx = function() {
|
|
34513
34516
|
function t2() {
|
|
34514
34517
|
var t3 = this;
|
|
34515
34518
|
this.eventHub = new Ja.a(), this.tasks = [], this.index = 0, this.eventHub.on("task-end", function(e2) {
|
|
@@ -34531,7 +34534,7 @@ void main(void){
|
|
|
34531
34534
|
e2.tasks.splice(t4, 1);
|
|
34532
34535
|
});
|
|
34533
34536
|
}, t2.prototype.addTask = function(t3, e2, n2) {
|
|
34534
|
-
var i2 = new
|
|
34537
|
+
var i2 = new Dx(this.index++, e2, t3, this.eventHub, n2);
|
|
34535
34538
|
this.tasks.push(i2), this.tasks.sort(function(t4, e3) {
|
|
34536
34539
|
return t4.index - e3.index;
|
|
34537
34540
|
}), this.replaceIdleTask(), this.tasks.length === 1 && i2.apply();
|
|
@@ -34543,7 +34546,7 @@ void main(void){
|
|
|
34543
34546
|
this.eventHub.removeAllListeners();
|
|
34544
34547
|
}, t2;
|
|
34545
34548
|
}();
|
|
34546
|
-
function
|
|
34549
|
+
function Bx(t2, e2) {
|
|
34547
34550
|
var n2 = t2.__state.conversionName.toString(), i2 = Math.round(t2.r), r2 = Math.round(t2.g), o2 = Math.round(t2.b), s2 = t2.a, a2 = Math.round(t2.h), l2 = t2.s.toFixed(1), h2 = t2.v.toFixed(1);
|
|
34548
34551
|
if (e2 || n2 === "THREE_CHAR_HEX" || n2 === "SIX_CHAR_HEX") {
|
|
34549
34552
|
for (var u2 = t2.hex.toString(16); u2.length < 6; )
|
|
@@ -34552,28 +34555,28 @@ void main(void){
|
|
|
34552
34555
|
}
|
|
34553
34556
|
return n2 === "CSS_RGB" ? "rgb(" + i2 + "," + r2 + "," + o2 + ")" : n2 === "CSS_RGBA" ? "rgba(" + i2 + "," + r2 + "," + o2 + "," + s2 + ")" : n2 === "HEX" ? "0x" + t2.hex.toString(16) : n2 === "RGB_ARRAY" ? "[" + i2 + "," + r2 + "," + o2 + "]" : n2 === "RGBA_ARRAY" ? "[" + i2 + "," + r2 + "," + o2 + "," + s2 + "]" : n2 === "RGB_OBJ" ? "{r:" + i2 + ",g:" + r2 + ",b:" + o2 + "}" : n2 === "RGBA_OBJ" ? "{r:" + i2 + ",g:" + r2 + ",b:" + o2 + ",a:" + s2 + "}" : n2 === "HSV_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + h2 + "}" : n2 === "HSVA_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + h2 + ",a:" + s2 + "}" : "unknown format";
|
|
34554
34557
|
}
|
|
34555
|
-
var
|
|
34556
|
-
return this.each(
|
|
34558
|
+
var Ux = Array.prototype.forEach, kx = Array.prototype.slice, Gx = { BREAK: {}, extend: function(t2) {
|
|
34559
|
+
return this.each(kx.call(arguments, 1), function(e2) {
|
|
34557
34560
|
(this.isObject(e2) ? Object.keys(e2) : []).forEach(function(n2) {
|
|
34558
34561
|
this.isUndefined(e2[n2]) || (t2[n2] = e2[n2]);
|
|
34559
34562
|
}.bind(this));
|
|
34560
34563
|
}, this), t2;
|
|
34561
34564
|
}, defaults: function(t2) {
|
|
34562
|
-
return this.each(
|
|
34565
|
+
return this.each(kx.call(arguments, 1), function(e2) {
|
|
34563
34566
|
(this.isObject(e2) ? Object.keys(e2) : []).forEach(function(n2) {
|
|
34564
34567
|
this.isUndefined(t2[n2]) && (t2[n2] = e2[n2]);
|
|
34565
34568
|
}.bind(this));
|
|
34566
34569
|
}, this), t2;
|
|
34567
34570
|
}, compose: function() {
|
|
34568
|
-
var t2 =
|
|
34571
|
+
var t2 = kx.call(arguments);
|
|
34569
34572
|
return function() {
|
|
34570
|
-
for (var e2 =
|
|
34573
|
+
for (var e2 = kx.call(arguments), n2 = t2.length - 1; n2 >= 0; n2--)
|
|
34571
34574
|
e2 = [t2[n2].apply(this, e2)];
|
|
34572
34575
|
return e2[0];
|
|
34573
34576
|
};
|
|
34574
34577
|
}, each: function(t2, e2, n2) {
|
|
34575
34578
|
if (t2) {
|
|
34576
|
-
if (
|
|
34579
|
+
if (Ux && t2.forEach && t2.forEach === Ux)
|
|
34577
34580
|
t2.forEach(e2, n2);
|
|
34578
34581
|
else if (t2.length === t2.length + 0) {
|
|
34579
34582
|
var i2, r2 = void 0;
|
|
@@ -34598,7 +34601,7 @@ void main(void){
|
|
|
34598
34601
|
clearTimeout(i2), i2 = setTimeout(s2, e2), a2 && t2.apply(r2, o2);
|
|
34599
34602
|
};
|
|
34600
34603
|
}, toArray: function(t2) {
|
|
34601
|
-
return t2.toArray ? t2.toArray() :
|
|
34604
|
+
return t2.toArray ? t2.toArray() : kx.call(t2);
|
|
34602
34605
|
}, isUndefined: function(t2) {
|
|
34603
34606
|
return t2 === void 0;
|
|
34604
34607
|
}, isNull: function(t2) {
|
|
@@ -34624,23 +34627,23 @@ void main(void){
|
|
|
34624
34627
|
return t2 === false || t2 === true;
|
|
34625
34628
|
}, isFunction: function(t2) {
|
|
34626
34629
|
return t2 instanceof Function;
|
|
34627
|
-
} },
|
|
34630
|
+
} }, Hx = [{ litmus: Gx.isString, conversions: { THREE_CHAR_HEX: { read: function(t2) {
|
|
34628
34631
|
var e2 = t2.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
|
|
34629
34632
|
return e2 !== null && { space: "HEX", hex: parseInt("0x" + e2[1].toString() + e2[1].toString() + e2[2].toString() + e2[2].toString() + e2[3].toString() + e2[3].toString(), 0) };
|
|
34630
|
-
}, write:
|
|
34633
|
+
}, write: Bx }, SIX_CHAR_HEX: { read: function(t2) {
|
|
34631
34634
|
var e2 = t2.match(/^#([A-F0-9]{6})$/i);
|
|
34632
34635
|
return e2 !== null && { space: "HEX", hex: parseInt("0x" + e2[1].toString(), 0) };
|
|
34633
|
-
}, write:
|
|
34636
|
+
}, write: Bx }, CSS_RGB: { read: function(t2) {
|
|
34634
34637
|
var e2 = t2.match(/^rgb\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);
|
|
34635
34638
|
return e2 !== null && { space: "RGB", r: parseFloat(e2[1]), g: parseFloat(e2[2]), b: parseFloat(e2[3]) };
|
|
34636
|
-
}, write:
|
|
34639
|
+
}, write: Bx }, CSS_RGBA: { read: function(t2) {
|
|
34637
34640
|
var e2 = t2.match(/^rgba\(\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*,\s*(\S+)\s*\)/);
|
|
34638
34641
|
return e2 !== null && { space: "RGB", r: parseFloat(e2[1]), g: parseFloat(e2[2]), b: parseFloat(e2[3]), a: parseFloat(e2[4]) };
|
|
34639
|
-
}, write:
|
|
34642
|
+
}, write: Bx } } }, { litmus: Gx.isNumber, conversions: { HEX: { read: function(t2) {
|
|
34640
34643
|
return { space: "HEX", hex: t2, conversionName: "HEX" };
|
|
34641
34644
|
}, write: function(t2) {
|
|
34642
34645
|
return t2.hex;
|
|
34643
|
-
} } } }, { litmus:
|
|
34646
|
+
} } } }, { litmus: Gx.isArray, conversions: { RGB_ARRAY: { read: function(t2) {
|
|
34644
34647
|
return t2.length === 3 && { space: "RGB", r: t2[0], g: t2[1], b: t2[2] };
|
|
34645
34648
|
}, write: function(t2) {
|
|
34646
34649
|
return [t2.r, t2.g, t2.b];
|
|
@@ -34648,33 +34651,33 @@ void main(void){
|
|
|
34648
34651
|
return t2.length === 4 && { space: "RGB", r: t2[0], g: t2[1], b: t2[2], a: t2[3] };
|
|
34649
34652
|
}, write: function(t2) {
|
|
34650
34653
|
return [t2.r, t2.g, t2.b, t2.a];
|
|
34651
|
-
} } } }, { litmus:
|
|
34652
|
-
return !!(
|
|
34654
|
+
} } } }, { litmus: Gx.isObject, conversions: { RGBA_OBJ: { read: function(t2) {
|
|
34655
|
+
return !!(Gx.isNumber(t2.r) && Gx.isNumber(t2.g) && Gx.isNumber(t2.b) && Gx.isNumber(t2.a)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b, a: t2.a };
|
|
34653
34656
|
}, write: function(t2) {
|
|
34654
34657
|
return { r: t2.r, g: t2.g, b: t2.b, a: t2.a };
|
|
34655
34658
|
} }, RGB_OBJ: { read: function(t2) {
|
|
34656
|
-
return !!(
|
|
34659
|
+
return !!(Gx.isNumber(t2.r) && Gx.isNumber(t2.g) && Gx.isNumber(t2.b)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b };
|
|
34657
34660
|
}, write: function(t2) {
|
|
34658
34661
|
return { r: t2.r, g: t2.g, b: t2.b };
|
|
34659
34662
|
} }, HSVA_OBJ: { read: function(t2) {
|
|
34660
|
-
return !!(
|
|
34663
|
+
return !!(Gx.isNumber(t2.h) && Gx.isNumber(t2.s) && Gx.isNumber(t2.v) && Gx.isNumber(t2.a)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v, a: t2.a };
|
|
34661
34664
|
}, write: function(t2) {
|
|
34662
34665
|
return { h: t2.h, s: t2.s, v: t2.v, a: t2.a };
|
|
34663
34666
|
} }, HSV_OBJ: { read: function(t2) {
|
|
34664
|
-
return !!(
|
|
34667
|
+
return !!(Gx.isNumber(t2.h) && Gx.isNumber(t2.s) && Gx.isNumber(t2.v)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v };
|
|
34665
34668
|
}, write: function(t2) {
|
|
34666
34669
|
return { h: t2.h, s: t2.s, v: t2.v };
|
|
34667
|
-
} } } }],
|
|
34668
|
-
|
|
34669
|
-
var t2 = arguments.length > 1 ?
|
|
34670
|
-
return
|
|
34670
|
+
} } } }], jx = void 0, zx = void 0, Vx = function() {
|
|
34671
|
+
zx = false;
|
|
34672
|
+
var t2 = arguments.length > 1 ? Gx.toArray(arguments) : arguments[0];
|
|
34673
|
+
return Gx.each(Hx, function(e2) {
|
|
34671
34674
|
if (e2.litmus(t2))
|
|
34672
|
-
return
|
|
34673
|
-
if (
|
|
34674
|
-
return
|
|
34675
|
-
}),
|
|
34676
|
-
}),
|
|
34677
|
-
},
|
|
34675
|
+
return Gx.each(e2.conversions, function(e3, n2) {
|
|
34676
|
+
if (jx = e3.read(t2), zx === false && jx !== false)
|
|
34677
|
+
return zx = jx, jx.conversionName = n2, jx.conversion = e3, Gx.BREAK;
|
|
34678
|
+
}), Gx.BREAK;
|
|
34679
|
+
}), zx;
|
|
34680
|
+
}, Xx = void 0, Wx = { hsv_to_rgb: function(t2, e2, n2) {
|
|
34678
34681
|
var i2 = Math.floor(t2 / 60) % 6, r2 = t2 / 60 - Math.floor(t2 / 60), o2 = n2 * (1 - e2), s2 = n2 * (1 - r2 * e2), a2 = n2 * (1 - (1 - r2) * e2), l2 = [[n2, a2, o2], [s2, n2, o2], [o2, n2, a2], [o2, s2, n2], [a2, o2, n2], [n2, o2, s2]][i2];
|
|
34679
34682
|
return { r: 255 * l2[0], g: 255 * l2[1], b: 255 * l2[2] };
|
|
34680
34683
|
}, rgb_to_hsv: function(t2, e2, n2) {
|
|
@@ -34686,15 +34689,15 @@ void main(void){
|
|
|
34686
34689
|
}, component_from_hex: function(t2, e2) {
|
|
34687
34690
|
return t2 >> 8 * e2 & 255;
|
|
34688
34691
|
}, hex_with_component: function(t2, e2, n2) {
|
|
34689
|
-
return n2 << (
|
|
34690
|
-
} },
|
|
34692
|
+
return n2 << (Xx = 8 * e2) | t2 & ~(255 << Xx);
|
|
34693
|
+
} }, Yx = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t2) {
|
|
34691
34694
|
return typeof t2;
|
|
34692
34695
|
} : function(t2) {
|
|
34693
34696
|
return t2 && typeof Symbol == "function" && t2.constructor === Symbol && t2 !== Symbol.prototype ? "symbol" : typeof t2;
|
|
34694
|
-
},
|
|
34697
|
+
}, qx = function(t2, e2) {
|
|
34695
34698
|
if (!(t2 instanceof e2))
|
|
34696
34699
|
throw new TypeError("Cannot call a class as a function");
|
|
34697
|
-
},
|
|
34700
|
+
}, Zx = function() {
|
|
34698
34701
|
function t2(t3, e2) {
|
|
34699
34702
|
for (var n2 = 0; n2 < e2.length; n2++) {
|
|
34700
34703
|
var i2 = e2[n2];
|
|
@@ -34704,7 +34707,7 @@ void main(void){
|
|
|
34704
34707
|
return function(e2, n2, i2) {
|
|
34705
34708
|
return n2 && t2(e2.prototype, n2), i2 && t2(e2, i2), e2;
|
|
34706
34709
|
};
|
|
34707
|
-
}(),
|
|
34710
|
+
}(), Jx = function t2(e2, n2, i2) {
|
|
34708
34711
|
e2 === null && (e2 = Function.prototype);
|
|
34709
34712
|
var r2 = Object.getOwnPropertyDescriptor(e2, n2);
|
|
34710
34713
|
if (r2 === void 0) {
|
|
@@ -34715,67 +34718,67 @@ void main(void){
|
|
|
34715
34718
|
return r2.value;
|
|
34716
34719
|
var s2 = r2.get;
|
|
34717
34720
|
return s2 !== void 0 ? s2.call(i2) : void 0;
|
|
34718
|
-
},
|
|
34721
|
+
}, Kx = function(t2, e2) {
|
|
34719
34722
|
if (typeof e2 != "function" && e2 !== null)
|
|
34720
34723
|
throw new TypeError("Super expression must either be null or a function, not " + typeof e2);
|
|
34721
34724
|
t2.prototype = Object.create(e2 && e2.prototype, { constructor: { value: t2, enumerable: false, writable: true, configurable: true } }), e2 && (Object.setPrototypeOf ? Object.setPrototypeOf(t2, e2) : t2.__proto__ = e2);
|
|
34722
|
-
},
|
|
34725
|
+
}, Qx = function(t2, e2) {
|
|
34723
34726
|
if (!t2)
|
|
34724
34727
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
34725
34728
|
return !e2 || typeof e2 != "object" && typeof e2 != "function" ? t2 : e2;
|
|
34726
|
-
},
|
|
34729
|
+
}, $x = function() {
|
|
34727
34730
|
function t2() {
|
|
34728
|
-
if (
|
|
34731
|
+
if (qx(this, t2), this.__state = Vx.apply(this, arguments), this.__state === false)
|
|
34729
34732
|
throw new Error("Failed to interpret color arguments");
|
|
34730
34733
|
this.__state.a = this.__state.a || 1;
|
|
34731
34734
|
}
|
|
34732
|
-
return
|
|
34733
|
-
return
|
|
34735
|
+
return Zx(t2, [{ key: "toString", value: function() {
|
|
34736
|
+
return Bx(this);
|
|
34734
34737
|
} }, { key: "toHexString", value: function() {
|
|
34735
|
-
return
|
|
34738
|
+
return Bx(this, true);
|
|
34736
34739
|
} }, { key: "toOriginal", value: function() {
|
|
34737
34740
|
return this.__state.conversion.write(this);
|
|
34738
34741
|
} }]), t2;
|
|
34739
34742
|
}();
|
|
34740
|
-
function
|
|
34743
|
+
function tb(t2, e2, n2) {
|
|
34741
34744
|
Object.defineProperty(t2, e2, { get: function() {
|
|
34742
|
-
return this.__state.space === "RGB" ||
|
|
34745
|
+
return this.__state.space === "RGB" || $x.recalculateRGB(this, e2, n2), this.__state[e2];
|
|
34743
34746
|
}, set: function(t3) {
|
|
34744
|
-
this.__state.space !== "RGB" && (
|
|
34747
|
+
this.__state.space !== "RGB" && ($x.recalculateRGB(this, e2, n2), this.__state.space = "RGB"), this.__state[e2] = t3;
|
|
34745
34748
|
} });
|
|
34746
34749
|
}
|
|
34747
|
-
function
|
|
34750
|
+
function eb(t2, e2) {
|
|
34748
34751
|
Object.defineProperty(t2, e2, { get: function() {
|
|
34749
|
-
return this.__state.space === "HSV" ||
|
|
34752
|
+
return this.__state.space === "HSV" || $x.recalculateHSV(this), this.__state[e2];
|
|
34750
34753
|
}, set: function(t3) {
|
|
34751
|
-
this.__state.space !== "HSV" && (
|
|
34754
|
+
this.__state.space !== "HSV" && ($x.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e2] = t3;
|
|
34752
34755
|
} });
|
|
34753
34756
|
}
|
|
34754
|
-
|
|
34757
|
+
$x.recalculateRGB = function(t2, e2, n2) {
|
|
34755
34758
|
if (t2.__state.space === "HEX")
|
|
34756
|
-
t2.__state[e2] =
|
|
34759
|
+
t2.__state[e2] = Wx.component_from_hex(t2.__state.hex, n2);
|
|
34757
34760
|
else {
|
|
34758
34761
|
if (t2.__state.space !== "HSV")
|
|
34759
34762
|
throw new Error("Corrupted color state");
|
|
34760
|
-
|
|
34763
|
+
Gx.extend(t2.__state, Wx.hsv_to_rgb(t2.__state.h, t2.__state.s, t2.__state.v));
|
|
34761
34764
|
}
|
|
34762
|
-
},
|
|
34763
|
-
var e2 =
|
|
34764
|
-
|
|
34765
|
-
},
|
|
34765
|
+
}, $x.recalculateHSV = function(t2) {
|
|
34766
|
+
var e2 = Wx.rgb_to_hsv(t2.r, t2.g, t2.b);
|
|
34767
|
+
Gx.extend(t2.__state, { s: e2.s, v: e2.v }), Gx.isNaN(e2.h) ? Gx.isUndefined(t2.__state.h) && (t2.__state.h = 0) : t2.__state.h = e2.h;
|
|
34768
|
+
}, $x.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], tb($x.prototype, "r", 2), tb($x.prototype, "g", 1), tb($x.prototype, "b", 0), eb($x.prototype, "h"), eb($x.prototype, "s"), eb($x.prototype, "v"), Object.defineProperty($x.prototype, "a", { get: function() {
|
|
34766
34769
|
return this.__state.a;
|
|
34767
34770
|
}, set: function(t2) {
|
|
34768
34771
|
this.__state.a = t2;
|
|
34769
|
-
} }), Object.defineProperty(
|
|
34770
|
-
return this.__state.space !== "HEX" && (this.__state.hex =
|
|
34772
|
+
} }), Object.defineProperty($x.prototype, "hex", { get: function() {
|
|
34773
|
+
return this.__state.space !== "HEX" && (this.__state.hex = Wx.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
|
|
34771
34774
|
}, set: function(t2) {
|
|
34772
34775
|
this.__state.space = "HEX", this.__state.hex = t2;
|
|
34773
34776
|
} });
|
|
34774
|
-
var
|
|
34777
|
+
var nb = function() {
|
|
34775
34778
|
function t2(e2, n2) {
|
|
34776
|
-
|
|
34779
|
+
qx(this, t2), this.initialValue = e2[n2], this.domElement = document.createElement("div"), this.object = e2, this.property = n2, this.__onChange = void 0, this.__onFinishChange = void 0;
|
|
34777
34780
|
}
|
|
34778
|
-
return
|
|
34781
|
+
return Zx(t2, [{ key: "onChange", value: function(t3) {
|
|
34779
34782
|
return this.__onChange = t3, this;
|
|
34780
34783
|
} }, { key: "onFinishChange", value: function(t3) {
|
|
34781
34784
|
return this.__onFinishChange = t3, this;
|
|
@@ -34788,29 +34791,29 @@ void main(void){
|
|
|
34788
34791
|
} }, { key: "isModified", value: function() {
|
|
34789
34792
|
return this.initialValue !== this.getValue();
|
|
34790
34793
|
} }]), t2;
|
|
34791
|
-
}(),
|
|
34792
|
-
|
|
34793
|
-
|
|
34794
|
-
|
|
34794
|
+
}(), ib = {};
|
|
34795
|
+
Gx.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t2, e2) {
|
|
34796
|
+
Gx.each(t2, function(t3) {
|
|
34797
|
+
ib[t3] = e2;
|
|
34795
34798
|
});
|
|
34796
34799
|
});
|
|
34797
|
-
var
|
|
34798
|
-
function
|
|
34799
|
-
if (t2 === "0" ||
|
|
34800
|
+
var rb = /(\d+(\.\d+)?)px/;
|
|
34801
|
+
function ob(t2) {
|
|
34802
|
+
if (t2 === "0" || Gx.isUndefined(t2))
|
|
34800
34803
|
return 0;
|
|
34801
|
-
var e2 = t2.match(
|
|
34802
|
-
return
|
|
34804
|
+
var e2 = t2.match(rb);
|
|
34805
|
+
return Gx.isNull(e2) ? 0 : parseFloat(e2[1]);
|
|
34803
34806
|
}
|
|
34804
|
-
var
|
|
34807
|
+
var sb = { makeSelectable: function(t2, e2) {
|
|
34805
34808
|
t2 !== void 0 && t2.style !== void 0 && (t2.onselectstart = e2 ? function() {
|
|
34806
34809
|
return false;
|
|
34807
34810
|
} : function() {
|
|
34808
34811
|
}, t2.style.MozUserSelect = e2 ? "auto" : "none", t2.style.KhtmlUserSelect = e2 ? "auto" : "none", t2.unselectable = e2 ? "on" : "off");
|
|
34809
34812
|
}, makeFullscreen: function(t2, e2, n2) {
|
|
34810
34813
|
var i2 = n2, r2 = e2;
|
|
34811
|
-
|
|
34814
|
+
Gx.isUndefined(r2) && (r2 = true), Gx.isUndefined(i2) && (i2 = true), t2.style.position = "absolute", r2 && (t2.style.left = 0, t2.style.right = 0), i2 && (t2.style.top = 0, t2.style.bottom = 0);
|
|
34812
34815
|
}, fakeEvent: function(t2, e2, n2, i2) {
|
|
34813
|
-
var r2 = n2 || {}, o2 =
|
|
34816
|
+
var r2 = n2 || {}, o2 = ib[e2];
|
|
34814
34817
|
if (!o2)
|
|
34815
34818
|
throw new Error("Event type " + e2 + " not supported.");
|
|
34816
34819
|
var s2 = document.createEvent(o2);
|
|
@@ -34821,18 +34824,18 @@ void main(void){
|
|
|
34821
34824
|
break;
|
|
34822
34825
|
case "KeyboardEvents":
|
|
34823
34826
|
var h2 = s2.initKeyboardEvent || s2.initKeyEvent;
|
|
34824
|
-
|
|
34827
|
+
Gx.defaults(r2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), h2(e2, r2.bubbles || false, r2.cancelable, window, r2.ctrlKey, r2.altKey, r2.shiftKey, r2.metaKey, r2.keyCode, r2.charCode);
|
|
34825
34828
|
break;
|
|
34826
34829
|
default:
|
|
34827
34830
|
s2.initEvent(e2, r2.bubbles || false, r2.cancelable || true);
|
|
34828
34831
|
}
|
|
34829
|
-
|
|
34832
|
+
Gx.defaults(s2, i2), t2.dispatchEvent(s2);
|
|
34830
34833
|
}, bind: function(t2, e2, n2, i2) {
|
|
34831
34834
|
var r2 = i2 || false;
|
|
34832
|
-
return t2.addEventListener ? t2.addEventListener(e2, n2, r2) : t2.attachEvent && t2.attachEvent("on" + e2, n2),
|
|
34835
|
+
return t2.addEventListener ? t2.addEventListener(e2, n2, r2) : t2.attachEvent && t2.attachEvent("on" + e2, n2), sb;
|
|
34833
34836
|
}, unbind: function(t2, e2, n2, i2) {
|
|
34834
34837
|
var r2 = i2 || false;
|
|
34835
|
-
return t2.removeEventListener ? t2.removeEventListener(e2, n2, r2) : t2.detachEvent && t2.detachEvent("on" + e2, n2),
|
|
34838
|
+
return t2.removeEventListener ? t2.removeEventListener(e2, n2, r2) : t2.detachEvent && t2.detachEvent("on" + e2, n2), sb;
|
|
34836
34839
|
}, addClass: function(t2, e2) {
|
|
34837
34840
|
if (t2.className === void 0)
|
|
34838
34841
|
t2.className = e2;
|
|
@@ -34840,7 +34843,7 @@ void main(void){
|
|
|
34840
34843
|
var n2 = t2.className.split(/ +/);
|
|
34841
34844
|
n2.indexOf(e2) === -1 && (n2.push(e2), t2.className = n2.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
|
|
34842
34845
|
}
|
|
34843
|
-
return
|
|
34846
|
+
return sb;
|
|
34844
34847
|
}, removeClass: function(t2, e2) {
|
|
34845
34848
|
if (e2)
|
|
34846
34849
|
if (t2.className === e2)
|
|
@@ -34851,15 +34854,15 @@ void main(void){
|
|
|
34851
34854
|
}
|
|
34852
34855
|
else
|
|
34853
34856
|
t2.className = void 0;
|
|
34854
|
-
return
|
|
34857
|
+
return sb;
|
|
34855
34858
|
}, hasClass: function(t2, e2) {
|
|
34856
34859
|
return new RegExp("(?:^|\\s+)" + e2 + "(?:\\s+|$)").test(t2.className) || false;
|
|
34857
34860
|
}, getWidth: function(t2) {
|
|
34858
34861
|
var e2 = getComputedStyle(t2);
|
|
34859
|
-
return
|
|
34862
|
+
return ob(e2["border-left-width"]) + ob(e2["border-right-width"]) + ob(e2["padding-left"]) + ob(e2["padding-right"]) + ob(e2.width);
|
|
34860
34863
|
}, getHeight: function(t2) {
|
|
34861
34864
|
var e2 = getComputedStyle(t2);
|
|
34862
|
-
return
|
|
34865
|
+
return ob(e2["border-top-width"]) + ob(e2["border-bottom-width"]) + ob(e2["padding-top"]) + ob(e2["padding-bottom"]) + ob(e2.height);
|
|
34863
34866
|
}, getOffset: function(t2) {
|
|
34864
34867
|
var e2 = t2, n2 = { left: 0, top: 0 };
|
|
34865
34868
|
if (e2.offsetParent)
|
|
@@ -34869,86 +34872,86 @@ void main(void){
|
|
|
34869
34872
|
return n2;
|
|
34870
34873
|
}, isActive: function(t2) {
|
|
34871
34874
|
return t2 === document.activeElement && (t2.type || t2.href);
|
|
34872
|
-
} },
|
|
34875
|
+
} }, ab = function(t2) {
|
|
34873
34876
|
function e2(t3, n2) {
|
|
34874
|
-
|
|
34875
|
-
var i2 =
|
|
34876
|
-
return i2.__prev = i2.getValue(), i2.__checkbox = document.createElement("input"), i2.__checkbox.setAttribute("type", "checkbox"),
|
|
34877
|
+
qx(this, e2);
|
|
34878
|
+
var i2 = Qx(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
|
|
34879
|
+
return i2.__prev = i2.getValue(), i2.__checkbox = document.createElement("input"), i2.__checkbox.setAttribute("type", "checkbox"), sb.bind(i2.__checkbox, "change", function() {
|
|
34877
34880
|
r2.setValue(!r2.__prev);
|
|
34878
34881
|
}, false), i2.domElement.appendChild(i2.__checkbox), i2.updateDisplay(), i2;
|
|
34879
34882
|
}
|
|
34880
|
-
return
|
|
34881
|
-
var n2 =
|
|
34883
|
+
return Kx(e2, t2), Zx(e2, [{ key: "setValue", value: function(t3) {
|
|
34884
|
+
var n2 = Jx(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
|
|
34882
34885
|
return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), n2;
|
|
34883
34886
|
} }, { key: "updateDisplay", value: function() {
|
|
34884
|
-
return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false),
|
|
34887
|
+
return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), Jx(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
|
|
34885
34888
|
} }]), e2;
|
|
34886
|
-
}(
|
|
34889
|
+
}(nb), lb = function(t2) {
|
|
34887
34890
|
function e2(t3, n2, i2) {
|
|
34888
|
-
|
|
34889
|
-
var r2 =
|
|
34890
|
-
if (r2.__select = document.createElement("select"),
|
|
34891
|
+
qx(this, e2);
|
|
34892
|
+
var r2 = Qx(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2, s2 = r2;
|
|
34893
|
+
if (r2.__select = document.createElement("select"), Gx.isArray(o2)) {
|
|
34891
34894
|
var a2 = {};
|
|
34892
|
-
|
|
34895
|
+
Gx.each(o2, function(t4) {
|
|
34893
34896
|
a2[t4] = t4;
|
|
34894
34897
|
}), o2 = a2;
|
|
34895
34898
|
}
|
|
34896
|
-
return
|
|
34899
|
+
return Gx.each(o2, function(t4, e3) {
|
|
34897
34900
|
var n3 = document.createElement("option");
|
|
34898
34901
|
n3.innerHTML = e3, n3.setAttribute("value", t4), s2.__select.appendChild(n3);
|
|
34899
|
-
}), r2.updateDisplay(),
|
|
34902
|
+
}), r2.updateDisplay(), sb.bind(r2.__select, "change", function() {
|
|
34900
34903
|
var t4 = this.options[this.selectedIndex].value;
|
|
34901
34904
|
s2.setValue(t4);
|
|
34902
34905
|
}), r2.domElement.appendChild(r2.__select), r2;
|
|
34903
34906
|
}
|
|
34904
|
-
return
|
|
34905
|
-
var n2 =
|
|
34907
|
+
return Kx(e2, t2), Zx(e2, [{ key: "setValue", value: function(t3) {
|
|
34908
|
+
var n2 = Jx(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
|
|
34906
34909
|
return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), n2;
|
|
34907
34910
|
} }, { key: "updateDisplay", value: function() {
|
|
34908
|
-
return
|
|
34911
|
+
return sb.isActive(this.__select) ? this : (this.__select.value = this.getValue(), Jx(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this));
|
|
34909
34912
|
} }]), e2;
|
|
34910
|
-
}(
|
|
34913
|
+
}(nb), hb = function(t2) {
|
|
34911
34914
|
function e2(t3, n2) {
|
|
34912
|
-
|
|
34913
|
-
var i2 =
|
|
34915
|
+
qx(this, e2);
|
|
34916
|
+
var i2 = Qx(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
|
|
34914
34917
|
function o2() {
|
|
34915
34918
|
r2.setValue(r2.__input.value);
|
|
34916
34919
|
}
|
|
34917
|
-
return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"),
|
|
34920
|
+
return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"), sb.bind(i2.__input, "keyup", o2), sb.bind(i2.__input, "change", o2), sb.bind(i2.__input, "blur", function() {
|
|
34918
34921
|
r2.__onFinishChange && r2.__onFinishChange.call(r2, r2.getValue());
|
|
34919
|
-
}),
|
|
34922
|
+
}), sb.bind(i2.__input, "keydown", function(t4) {
|
|
34920
34923
|
t4.keyCode === 13 && this.blur();
|
|
34921
34924
|
}), i2.updateDisplay(), i2.domElement.appendChild(i2.__input), i2;
|
|
34922
34925
|
}
|
|
34923
|
-
return
|
|
34924
|
-
return
|
|
34926
|
+
return Kx(e2, t2), Zx(e2, [{ key: "updateDisplay", value: function() {
|
|
34927
|
+
return sb.isActive(this.__input) || (this.__input.value = this.getValue()), Jx(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
|
|
34925
34928
|
} }]), e2;
|
|
34926
|
-
}(
|
|
34927
|
-
function
|
|
34929
|
+
}(nb);
|
|
34930
|
+
function ub(t2) {
|
|
34928
34931
|
var e2 = t2.toString();
|
|
34929
34932
|
return e2.indexOf(".") > -1 ? e2.length - e2.indexOf(".") - 1 : 0;
|
|
34930
34933
|
}
|
|
34931
|
-
var
|
|
34934
|
+
var cb = function(t2) {
|
|
34932
34935
|
function e2(t3, n2, i2) {
|
|
34933
|
-
|
|
34934
|
-
var r2 =
|
|
34935
|
-
return r2.__min = o2.min, r2.__max = o2.max, r2.__step = o2.step,
|
|
34936
|
+
qx(this, e2);
|
|
34937
|
+
var r2 = Qx(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2 || {};
|
|
34938
|
+
return r2.__min = o2.min, r2.__max = o2.max, r2.__step = o2.step, Gx.isUndefined(r2.__step) ? r2.initialValue === 0 ? r2.__impliedStep = 1 : r2.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r2.initialValue)) / Math.LN10)) / 10 : r2.__impliedStep = r2.__step, r2.__precision = ub(r2.__impliedStep), r2;
|
|
34936
34939
|
}
|
|
34937
|
-
return
|
|
34940
|
+
return Kx(e2, t2), Zx(e2, [{ key: "setValue", value: function(t3) {
|
|
34938
34941
|
var n2 = t3;
|
|
34939
|
-
return this.__min !== void 0 && n2 < this.__min ? n2 = this.__min : this.__max !== void 0 && n2 > this.__max && (n2 = this.__max), this.__step !== void 0 && n2 % this.__step != 0 && (n2 = Math.round(n2 / this.__step) * this.__step),
|
|
34942
|
+
return this.__min !== void 0 && n2 < this.__min ? n2 = this.__min : this.__max !== void 0 && n2 > this.__max && (n2 = this.__max), this.__step !== void 0 && n2 % this.__step != 0 && (n2 = Math.round(n2 / this.__step) * this.__step), Jx(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, n2);
|
|
34940
34943
|
} }, { key: "min", value: function(t3) {
|
|
34941
34944
|
return this.__min = t3, this;
|
|
34942
34945
|
} }, { key: "max", value: function(t3) {
|
|
34943
34946
|
return this.__max = t3, this;
|
|
34944
34947
|
} }, { key: "step", value: function(t3) {
|
|
34945
|
-
return this.__step = t3, this.__impliedStep = t3, this.__precision =
|
|
34948
|
+
return this.__step = t3, this.__impliedStep = t3, this.__precision = ub(t3), this;
|
|
34946
34949
|
} }]), e2;
|
|
34947
|
-
}(
|
|
34948
|
-
var
|
|
34950
|
+
}(nb);
|
|
34951
|
+
var db = function(t2) {
|
|
34949
34952
|
function e2(t3, n2, i2) {
|
|
34950
|
-
|
|
34951
|
-
var r2 =
|
|
34953
|
+
qx(this, e2);
|
|
34954
|
+
var r2 = Qx(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, i2));
|
|
34952
34955
|
r2.__truncationSuspended = false;
|
|
34953
34956
|
var o2 = r2, s2 = void 0;
|
|
34954
34957
|
function a2() {
|
|
@@ -34959,101 +34962,101 @@ void main(void){
|
|
|
34959
34962
|
o2.setValue(o2.getValue() + e3 * o2.__impliedStep), s2 = t4.clientY;
|
|
34960
34963
|
}
|
|
34961
34964
|
function h2() {
|
|
34962
|
-
|
|
34965
|
+
sb.unbind(window, "mousemove", l2), sb.unbind(window, "mouseup", h2), a2();
|
|
34963
34966
|
}
|
|
34964
|
-
return r2.__input = document.createElement("input"), r2.__input.setAttribute("type", "text"),
|
|
34967
|
+
return r2.__input = document.createElement("input"), r2.__input.setAttribute("type", "text"), sb.bind(r2.__input, "change", function() {
|
|
34965
34968
|
var t4 = parseFloat(o2.__input.value);
|
|
34966
|
-
|
|
34967
|
-
}),
|
|
34969
|
+
Gx.isNaN(t4) || o2.setValue(t4);
|
|
34970
|
+
}), sb.bind(r2.__input, "blur", function() {
|
|
34968
34971
|
a2();
|
|
34969
|
-
}),
|
|
34970
|
-
|
|
34971
|
-
}),
|
|
34972
|
+
}), sb.bind(r2.__input, "mousedown", function(t4) {
|
|
34973
|
+
sb.bind(window, "mousemove", l2), sb.bind(window, "mouseup", h2), s2 = t4.clientY;
|
|
34974
|
+
}), sb.bind(r2.__input, "keydown", function(t4) {
|
|
34972
34975
|
t4.keyCode === 13 && (o2.__truncationSuspended = true, this.blur(), o2.__truncationSuspended = false, a2());
|
|
34973
34976
|
}), r2.updateDisplay(), r2.domElement.appendChild(r2.__input), r2;
|
|
34974
34977
|
}
|
|
34975
|
-
return
|
|
34978
|
+
return Kx(e2, t2), Zx(e2, [{ key: "updateDisplay", value: function() {
|
|
34976
34979
|
var t3, n2, i2;
|
|
34977
|
-
return this.__input.value = this.__truncationSuspended ? this.getValue() : (t3 = this.getValue(), n2 = this.__precision, i2 = Math.pow(10, n2), Math.round(t3 * i2) / i2),
|
|
34980
|
+
return this.__input.value = this.__truncationSuspended ? this.getValue() : (t3 = this.getValue(), n2 = this.__precision, i2 = Math.pow(10, n2), Math.round(t3 * i2) / i2), Jx(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
|
|
34978
34981
|
} }]), e2;
|
|
34979
|
-
}(
|
|
34980
|
-
function
|
|
34982
|
+
}(cb);
|
|
34983
|
+
function pb(t2, e2, n2, i2, r2) {
|
|
34981
34984
|
return i2 + (t2 - e2) / (n2 - e2) * (r2 - i2);
|
|
34982
34985
|
}
|
|
34983
|
-
var
|
|
34986
|
+
var fb = function(t2) {
|
|
34984
34987
|
function e2(t3, n2, i2, r2, o2) {
|
|
34985
|
-
|
|
34986
|
-
var s2 =
|
|
34988
|
+
qx(this, e2);
|
|
34989
|
+
var s2 = Qx(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, { min: i2, max: r2, step: o2 })), a2 = s2;
|
|
34987
34990
|
function l2(t4) {
|
|
34988
34991
|
t4.preventDefault();
|
|
34989
34992
|
var e3 = a2.__background.getBoundingClientRect();
|
|
34990
|
-
return a2.setValue(
|
|
34993
|
+
return a2.setValue(pb(t4.clientX, e3.left, e3.right, a2.__min, a2.__max)), false;
|
|
34991
34994
|
}
|
|
34992
34995
|
function h2() {
|
|
34993
|
-
|
|
34996
|
+
sb.unbind(window, "mousemove", l2), sb.unbind(window, "mouseup", h2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
|
|
34994
34997
|
}
|
|
34995
34998
|
function u2(t4) {
|
|
34996
34999
|
var e3 = t4.touches[0].clientX, n3 = a2.__background.getBoundingClientRect();
|
|
34997
|
-
a2.setValue(
|
|
35000
|
+
a2.setValue(pb(e3, n3.left, n3.right, a2.__min, a2.__max));
|
|
34998
35001
|
}
|
|
34999
35002
|
function c2() {
|
|
35000
|
-
|
|
35003
|
+
sb.unbind(window, "touchmove", u2), sb.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
|
|
35001
35004
|
}
|
|
35002
|
-
return s2.__background = document.createElement("div"), s2.__foreground = document.createElement("div"),
|
|
35003
|
-
document.activeElement.blur(),
|
|
35004
|
-
}),
|
|
35005
|
+
return s2.__background = document.createElement("div"), s2.__foreground = document.createElement("div"), sb.bind(s2.__background, "mousedown", function(t4) {
|
|
35006
|
+
document.activeElement.blur(), sb.bind(window, "mousemove", l2), sb.bind(window, "mouseup", h2), l2(t4);
|
|
35007
|
+
}), sb.bind(s2.__background, "touchstart", function(t4) {
|
|
35005
35008
|
if (t4.touches.length !== 1)
|
|
35006
35009
|
return;
|
|
35007
|
-
|
|
35008
|
-
}),
|
|
35010
|
+
sb.bind(window, "touchmove", u2), sb.bind(window, "touchend", c2), u2(t4);
|
|
35011
|
+
}), sb.addClass(s2.__background, "slider"), sb.addClass(s2.__foreground, "slider-fg"), s2.updateDisplay(), s2.__background.appendChild(s2.__foreground), s2.domElement.appendChild(s2.__background), s2;
|
|
35009
35012
|
}
|
|
35010
|
-
return
|
|
35013
|
+
return Kx(e2, t2), Zx(e2, [{ key: "updateDisplay", value: function() {
|
|
35011
35014
|
var t3 = (this.getValue() - this.__min) / (this.__max - this.__min);
|
|
35012
|
-
return this.__foreground.style.width = 100 * t3 + "%",
|
|
35015
|
+
return this.__foreground.style.width = 100 * t3 + "%", Jx(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
|
|
35013
35016
|
} }]), e2;
|
|
35014
|
-
}(
|
|
35017
|
+
}(cb), mb = function(t2) {
|
|
35015
35018
|
function e2(t3, n2, i2) {
|
|
35016
|
-
|
|
35017
|
-
var r2 =
|
|
35018
|
-
return r2.__button = document.createElement("div"), r2.__button.innerHTML = i2 === void 0 ? "Fire" : i2,
|
|
35019
|
+
qx(this, e2);
|
|
35020
|
+
var r2 = Qx(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = r2;
|
|
35021
|
+
return r2.__button = document.createElement("div"), r2.__button.innerHTML = i2 === void 0 ? "Fire" : i2, sb.bind(r2.__button, "click", function(t4) {
|
|
35019
35022
|
return t4.preventDefault(), o2.fire(), false;
|
|
35020
|
-
}),
|
|
35023
|
+
}), sb.addClass(r2.__button, "button"), r2.domElement.appendChild(r2.__button), r2;
|
|
35021
35024
|
}
|
|
35022
|
-
return
|
|
35025
|
+
return Kx(e2, t2), Zx(e2, [{ key: "fire", value: function() {
|
|
35023
35026
|
this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
|
|
35024
35027
|
} }]), e2;
|
|
35025
|
-
}(
|
|
35028
|
+
}(nb), gb = function(t2) {
|
|
35026
35029
|
function e2(t3, n2) {
|
|
35027
|
-
|
|
35028
|
-
var i2 =
|
|
35029
|
-
i2.__color = new
|
|
35030
|
+
qx(this, e2);
|
|
35031
|
+
var i2 = Qx(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2));
|
|
35032
|
+
i2.__color = new $x(i2.getValue()), i2.__temp = new $x(0);
|
|
35030
35033
|
var r2 = i2;
|
|
35031
|
-
i2.domElement = document.createElement("div"),
|
|
35034
|
+
i2.domElement = document.createElement("div"), sb.makeSelectable(i2.domElement, false), i2.__selector = document.createElement("div"), i2.__selector.className = "selector", i2.__saturation_field = document.createElement("div"), i2.__saturation_field.className = "saturation-field", i2.__field_knob = document.createElement("div"), i2.__field_knob.className = "field-knob", i2.__field_knob_border = "2px solid ", i2.__hue_knob = document.createElement("div"), i2.__hue_knob.className = "hue-knob", i2.__hue_field = document.createElement("div"), i2.__hue_field.className = "hue-field", i2.__input = document.createElement("input"), i2.__input.type = "text", i2.__input_textShadow = "0 1px 1px ", sb.bind(i2.__input, "keydown", function(t4) {
|
|
35032
35035
|
t4.keyCode === 13 && c2.call(this);
|
|
35033
|
-
}),
|
|
35034
|
-
|
|
35035
|
-
|
|
35036
|
+
}), sb.bind(i2.__input, "blur", c2), sb.bind(i2.__selector, "mousedown", function() {
|
|
35037
|
+
sb.addClass(this, "drag").bind(window, "mouseup", function() {
|
|
35038
|
+
sb.removeClass(r2.__selector, "drag");
|
|
35036
35039
|
});
|
|
35037
|
-
}),
|
|
35038
|
-
|
|
35039
|
-
|
|
35040
|
+
}), sb.bind(i2.__selector, "touchstart", function() {
|
|
35041
|
+
sb.addClass(this, "drag").bind(window, "touchend", function() {
|
|
35042
|
+
sb.removeClass(r2.__selector, "drag");
|
|
35040
35043
|
});
|
|
35041
35044
|
});
|
|
35042
35045
|
var o2, s2 = document.createElement("div");
|
|
35043
35046
|
function a2(t4) {
|
|
35044
|
-
p2(t4),
|
|
35047
|
+
p2(t4), sb.bind(window, "mousemove", p2), sb.bind(window, "touchmove", p2), sb.bind(window, "mouseup", h2), sb.bind(window, "touchend", h2);
|
|
35045
35048
|
}
|
|
35046
35049
|
function l2(t4) {
|
|
35047
|
-
f2(t4),
|
|
35050
|
+
f2(t4), sb.bind(window, "mousemove", f2), sb.bind(window, "touchmove", f2), sb.bind(window, "mouseup", u2), sb.bind(window, "touchend", u2);
|
|
35048
35051
|
}
|
|
35049
35052
|
function h2() {
|
|
35050
|
-
|
|
35053
|
+
sb.unbind(window, "mousemove", p2), sb.unbind(window, "touchmove", p2), sb.unbind(window, "mouseup", h2), sb.unbind(window, "touchend", h2), d2();
|
|
35051
35054
|
}
|
|
35052
35055
|
function u2() {
|
|
35053
|
-
|
|
35056
|
+
sb.unbind(window, "mousemove", f2), sb.unbind(window, "touchmove", f2), sb.unbind(window, "mouseup", u2), sb.unbind(window, "touchend", u2), d2();
|
|
35054
35057
|
}
|
|
35055
35058
|
function c2() {
|
|
35056
|
-
var t4 =
|
|
35059
|
+
var t4 = Vx(this.value);
|
|
35057
35060
|
t4 !== false ? (r2.__color.__state = t4, r2.setValue(r2.__color.toOriginal())) : this.value = r2.__color.toString();
|
|
35058
35061
|
}
|
|
35059
35062
|
function d2() {
|
|
@@ -35069,28 +35072,28 @@ void main(void){
|
|
|
35069
35072
|
var e3 = r2.__hue_field.getBoundingClientRect(), n3 = 1 - ((t4.touches && t4.touches[0] || t4).clientY - e3.top) / (e3.bottom - e3.top);
|
|
35070
35073
|
return n3 > 1 ? n3 = 1 : n3 < 0 && (n3 = 0), r2.__color.h = 360 * n3, r2.setValue(r2.__color.toOriginal()), false;
|
|
35071
35074
|
}
|
|
35072
|
-
return
|
|
35075
|
+
return Gx.extend(i2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), Gx.extend(i2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i2.__field_knob_border + (i2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), Gx.extend(i2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), Gx.extend(i2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), Gx.extend(s2.style, { width: "100%", height: "100%", background: "none" }), _b(s2, "top", "rgba(0,0,0,0)", "#000"), Gx.extend(i2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = i2.__hue_field).style.background = "", o2.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o2.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", Gx.extend(i2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i2.__input_textShadow + "rgba(0,0,0,0.7)" }), sb.bind(i2.__saturation_field, "mousedown", a2), sb.bind(i2.__saturation_field, "touchstart", a2), sb.bind(i2.__field_knob, "mousedown", a2), sb.bind(i2.__field_knob, "touchstart", a2), sb.bind(i2.__hue_field, "mousedown", l2), sb.bind(i2.__hue_field, "touchstart", l2), i2.__saturation_field.appendChild(s2), i2.__selector.appendChild(i2.__field_knob), i2.__selector.appendChild(i2.__saturation_field), i2.__selector.appendChild(i2.__hue_field), i2.__hue_field.appendChild(i2.__hue_knob), i2.domElement.appendChild(i2.__input), i2.domElement.appendChild(i2.__selector), i2.updateDisplay(), i2;
|
|
35073
35076
|
}
|
|
35074
|
-
return
|
|
35075
|
-
var t3 =
|
|
35077
|
+
return Kx(e2, t2), Zx(e2, [{ key: "updateDisplay", value: function() {
|
|
35078
|
+
var t3 = Vx(this.getValue());
|
|
35076
35079
|
if (t3 !== false) {
|
|
35077
35080
|
var e3 = false;
|
|
35078
|
-
|
|
35079
|
-
if (!
|
|
35081
|
+
Gx.each($x.COMPONENTS, function(n3) {
|
|
35082
|
+
if (!Gx.isUndefined(t3[n3]) && !Gx.isUndefined(this.__color.__state[n3]) && t3[n3] !== this.__color.__state[n3])
|
|
35080
35083
|
return e3 = true, {};
|
|
35081
|
-
}, this), e3 &&
|
|
35084
|
+
}, this), e3 && Gx.extend(this.__color.__state, t3);
|
|
35082
35085
|
}
|
|
35083
|
-
|
|
35086
|
+
Gx.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
|
|
35084
35087
|
var n2 = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, i2 = 255 - n2;
|
|
35085
|
-
|
|
35088
|
+
Gx.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n2 + "," + n2 + "," + n2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, _b(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), Gx.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n2 + "," + n2 + "," + n2 + ")", textShadow: this.__input_textShadow + "rgba(" + i2 + "," + i2 + "," + i2 + ",.7)" });
|
|
35086
35089
|
} }]), e2;
|
|
35087
|
-
}(
|
|
35088
|
-
function
|
|
35089
|
-
t2.style.background = "",
|
|
35090
|
+
}(nb), vb = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
|
|
35091
|
+
function _b(t2, e2, n2, i2) {
|
|
35092
|
+
t2.style.background = "", Gx.each(vb, function(r2) {
|
|
35090
35093
|
t2.style.cssText += "background: " + r2 + "linear-gradient(" + e2 + ", " + n2 + " 0%, " + i2 + " 100%); ";
|
|
35091
35094
|
});
|
|
35092
35095
|
}
|
|
35093
|
-
var
|
|
35096
|
+
var yb = function(t2, e2) {
|
|
35094
35097
|
var n2 = e2 || document, i2 = document.createElement("style");
|
|
35095
35098
|
i2.type = "text/css", i2.innerHTML = t2;
|
|
35096
35099
|
var r2 = n2.getElementsByTagName("head")[0];
|
|
@@ -35098,7 +35101,7 @@ void main(void){
|
|
|
35098
35101
|
r2.appendChild(i2);
|
|
35099
35102
|
} catch (t3) {
|
|
35100
35103
|
}
|
|
35101
|
-
},
|
|
35104
|
+
}, xb = `<div id="dg-save" class="dg dialogue">
|
|
35102
35105
|
|
|
35103
35106
|
Here's the new load parameter for your <code>GUI</code>'s constructor:
|
|
35104
35107
|
|
|
@@ -35118,50 +35121,50 @@ void main(void){
|
|
|
35118
35121
|
|
|
35119
35122
|
</div>
|
|
35120
35123
|
|
|
35121
|
-
</div>`,
|
|
35124
|
+
</div>`, bb = function(t2, e2) {
|
|
35122
35125
|
var n2 = t2[e2];
|
|
35123
|
-
return
|
|
35126
|
+
return Gx.isArray(arguments[2]) || Gx.isObject(arguments[2]) ? new lb(t2, e2, arguments[2]) : Gx.isNumber(n2) ? Gx.isNumber(arguments[2]) && Gx.isNumber(arguments[3]) ? Gx.isNumber(arguments[4]) ? new fb(t2, e2, arguments[2], arguments[3], arguments[4]) : new fb(t2, e2, arguments[2], arguments[3]) : Gx.isNumber(arguments[4]) ? new db(t2, e2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new db(t2, e2, { min: arguments[2], max: arguments[3] }) : Gx.isString(n2) ? new hb(t2, e2) : Gx.isFunction(n2) ? new mb(t2, e2, "") : Gx.isBoolean(n2) ? new ab(t2, e2) : null;
|
|
35124
35127
|
};
|
|
35125
|
-
var
|
|
35128
|
+
var Tb = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t2) {
|
|
35126
35129
|
setTimeout(t2, 1e3 / 60);
|
|
35127
|
-
},
|
|
35130
|
+
}, Eb = function() {
|
|
35128
35131
|
function t2() {
|
|
35129
|
-
|
|
35132
|
+
qx(this, t2), this.backgroundElement = document.createElement("div"), Gx.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", transition: "opacity 0.2s linear" }), sb.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), Gx.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear", transition: "transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
|
|
35130
35133
|
var e2 = this;
|
|
35131
|
-
|
|
35134
|
+
sb.bind(this.backgroundElement, "click", function() {
|
|
35132
35135
|
e2.hide();
|
|
35133
35136
|
});
|
|
35134
35137
|
}
|
|
35135
|
-
return
|
|
35138
|
+
return Zx(t2, [{ key: "show", value: function() {
|
|
35136
35139
|
var t3 = this;
|
|
35137
|
-
this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(),
|
|
35140
|
+
this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), Gx.defer(function() {
|
|
35138
35141
|
t3.backgroundElement.style.opacity = 1, t3.domElement.style.opacity = 1, t3.domElement.style.webkitTransform = "scale(1)";
|
|
35139
35142
|
});
|
|
35140
35143
|
} }, { key: "hide", value: function() {
|
|
35141
35144
|
var t3 = this, e2 = function e3() {
|
|
35142
|
-
t3.domElement.style.display = "none", t3.backgroundElement.style.display = "none",
|
|
35145
|
+
t3.domElement.style.display = "none", t3.backgroundElement.style.display = "none", sb.unbind(t3.domElement, "webkitTransitionEnd", e3), sb.unbind(t3.domElement, "transitionend", e3), sb.unbind(t3.domElement, "oTransitionEnd", e3);
|
|
35143
35146
|
};
|
|
35144
|
-
|
|
35147
|
+
sb.bind(this.domElement, "webkitTransitionEnd", e2), sb.bind(this.domElement, "transitionend", e2), sb.bind(this.domElement, "oTransitionEnd", e2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
|
|
35145
35148
|
} }, { key: "layout", value: function() {
|
|
35146
|
-
this.domElement.style.left = window.innerWidth / 2 -
|
|
35149
|
+
this.domElement.style.left = window.innerWidth / 2 - sb.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - sb.getHeight(this.domElement) / 2 + "px";
|
|
35147
35150
|
} }]), t2;
|
|
35148
35151
|
}();
|
|
35149
|
-
|
|
35152
|
+
yb(function(t2) {
|
|
35150
35153
|
if (t2 && typeof window != "undefined") {
|
|
35151
35154
|
var e2 = document.createElement("style");
|
|
35152
35155
|
return e2.setAttribute("type", "text/css"), e2.innerHTML = t2, document.head.appendChild(e2), t2;
|
|
35153
35156
|
}
|
|
35154
35157
|
}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));
|
|
35155
|
-
var
|
|
35158
|
+
var Sb = function() {
|
|
35156
35159
|
try {
|
|
35157
35160
|
return !!window.localStorage;
|
|
35158
35161
|
} catch (t2) {
|
|
35159
35162
|
return false;
|
|
35160
35163
|
}
|
|
35161
|
-
}(),
|
|
35164
|
+
}(), wb = void 0, Ab = true, Mb = void 0, Rb = false, Cb = [], Pb = function t2(e2) {
|
|
35162
35165
|
var n2 = this, i2 = e2 || {};
|
|
35163
|
-
this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul),
|
|
35164
|
-
var r2, o2 =
|
|
35166
|
+
this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), sb.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], i2 = Gx.defaults(i2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), i2 = Gx.defaults(i2, { resizable: i2.autoPlace, hideable: i2.autoPlace }), Gx.isUndefined(i2.load) ? i2.load = { preset: "Default" } : i2.preset && (i2.load.preset = i2.preset), Gx.isUndefined(i2.parent) && i2.hideable && Cb.push(this), i2.resizable = Gx.isUndefined(i2.parent) && i2.resizable, i2.autoPlace && Gx.isUndefined(i2.scrollable) && (i2.scrollable = true);
|
|
35167
|
+
var r2, o2 = Sb && localStorage.getItem(Fb(this, "isLocal")) === "true", s2 = void 0, a2 = void 0;
|
|
35165
35168
|
if (Object.defineProperties(this, { parent: { get: function() {
|
|
35166
35169
|
return i2.parent;
|
|
35167
35170
|
} }, scrollable: { get: function() {
|
|
@@ -35180,7 +35183,7 @@ void main(void){
|
|
|
35180
35183
|
} }, width: { get: function() {
|
|
35181
35184
|
return i2.width;
|
|
35182
35185
|
}, set: function(t3) {
|
|
35183
|
-
i2.width = t3,
|
|
35186
|
+
i2.width = t3, Hb(n2, t3);
|
|
35184
35187
|
} }, name: { get: function() {
|
|
35185
35188
|
return i2.name;
|
|
35186
35189
|
}, set: function(t3) {
|
|
@@ -35188,50 +35191,50 @@ void main(void){
|
|
|
35188
35191
|
} }, closed: { get: function() {
|
|
35189
35192
|
return i2.closed;
|
|
35190
35193
|
}, set: function(e3) {
|
|
35191
|
-
i2.closed = e3, i2.closed ?
|
|
35194
|
+
i2.closed = e3, i2.closed ? sb.addClass(n2.__ul, t2.CLASS_CLOSED) : sb.removeClass(n2.__ul, t2.CLASS_CLOSED), this.onResize(), n2.__closeButton && (n2.__closeButton.innerHTML = e3 ? t2.TEXT_OPEN : t2.TEXT_CLOSED);
|
|
35192
35195
|
} }, load: { get: function() {
|
|
35193
35196
|
return i2.load;
|
|
35194
35197
|
} }, useLocalStorage: { get: function() {
|
|
35195
35198
|
return o2;
|
|
35196
35199
|
}, set: function(t3) {
|
|
35197
|
-
|
|
35198
|
-
} } }),
|
|
35199
|
-
if (this.closed = i2.closed || false,
|
|
35200
|
+
Sb && (o2 = t3, t3 ? sb.bind(window, "unload", s2) : sb.unbind(window, "unload", s2), localStorage.setItem(Fb(n2, "isLocal"), t3));
|
|
35201
|
+
} } }), Gx.isUndefined(i2.parent)) {
|
|
35202
|
+
if (this.closed = i2.closed || false, sb.addClass(this.domElement, t2.CLASS_MAIN), sb.makeSelectable(this.domElement, false), Sb && o2) {
|
|
35200
35203
|
n2.useLocalStorage = true;
|
|
35201
|
-
var l2 = localStorage.getItem(
|
|
35204
|
+
var l2 = localStorage.getItem(Fb(this, "gui"));
|
|
35202
35205
|
l2 && (i2.load = JSON.parse(l2));
|
|
35203
35206
|
}
|
|
35204
|
-
this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED,
|
|
35207
|
+
this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED, sb.addClass(this.__closeButton, t2.CLASS_CLOSE_BUTTON), i2.closeOnTop ? (sb.addClass(this.__closeButton, t2.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (sb.addClass(this.__closeButton, t2.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), sb.bind(this.__closeButton, "click", function() {
|
|
35205
35208
|
n2.closed = !n2.closed;
|
|
35206
35209
|
});
|
|
35207
35210
|
} else {
|
|
35208
35211
|
i2.closed === void 0 && (i2.closed = true);
|
|
35209
35212
|
var h2 = document.createTextNode(i2.name);
|
|
35210
|
-
|
|
35211
|
-
|
|
35213
|
+
sb.addClass(h2, "controller-name"), a2 = Ib(n2, h2);
|
|
35214
|
+
sb.addClass(this.__ul, t2.CLASS_CLOSED), sb.addClass(a2, "title"), sb.bind(a2, "click", function(t3) {
|
|
35212
35215
|
return t3.preventDefault(), n2.closed = !n2.closed, false;
|
|
35213
35216
|
}), i2.closed || (this.closed = false);
|
|
35214
35217
|
}
|
|
35215
|
-
i2.autoPlace && (
|
|
35218
|
+
i2.autoPlace && (Gx.isUndefined(i2.parent) && (Ab && (Mb = document.createElement("div"), sb.addClass(Mb, "dg"), sb.addClass(Mb, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(Mb), Ab = false), Mb.appendChild(this.domElement), sb.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || Hb(n2, i2.width)), this.__resizeHandler = function() {
|
|
35216
35219
|
n2.onResizeDebounced();
|
|
35217
|
-
},
|
|
35218
|
-
|
|
35219
|
-
}, this.saveToLocalStorageIfPossible = s2, i2.parent || ((r2 = n2.getRoot()).width += 1,
|
|
35220
|
+
}, sb.bind(window, "resize", this.__resizeHandler), sb.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), sb.bind(this.__ul, "transitionend", this.__resizeHandler), sb.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), i2.resizable && Gb(this), s2 = function() {
|
|
35221
|
+
Sb && localStorage.getItem(Fb(n2, "isLocal")) === "true" && localStorage.setItem(Fb(n2, "gui"), JSON.stringify(n2.getSaveObject()));
|
|
35222
|
+
}, this.saveToLocalStorageIfPossible = s2, i2.parent || ((r2 = n2.getRoot()).width += 1, Gx.defer(function() {
|
|
35220
35223
|
r2.width -= 1;
|
|
35221
35224
|
}));
|
|
35222
35225
|
};
|
|
35223
|
-
function
|
|
35226
|
+
function Ib(t2, e2, n2) {
|
|
35224
35227
|
var i2 = document.createElement("li");
|
|
35225
35228
|
return e2 && i2.appendChild(e2), n2 ? t2.__ul.insertBefore(i2, n2) : t2.__ul.appendChild(i2), t2.onResize(), i2;
|
|
35226
35229
|
}
|
|
35227
|
-
function
|
|
35228
|
-
|
|
35230
|
+
function Ob(t2) {
|
|
35231
|
+
sb.unbind(window, "resize", t2.__resizeHandler), t2.saveToLocalStorageIfPossible && sb.unbind(window, "unload", t2.saveToLocalStorageIfPossible);
|
|
35229
35232
|
}
|
|
35230
|
-
function
|
|
35233
|
+
function Nb(t2, e2) {
|
|
35231
35234
|
var n2 = t2.__preset_select[t2.__preset_select.selectedIndex];
|
|
35232
35235
|
n2.innerHTML = e2 ? n2.value + "*" : n2.value;
|
|
35233
35236
|
}
|
|
35234
|
-
function
|
|
35237
|
+
function Lb(t2, e2) {
|
|
35235
35238
|
var n2 = t2.getRoot(), i2 = n2.__rememberedObjects.indexOf(e2.object);
|
|
35236
35239
|
if (i2 !== -1) {
|
|
35237
35240
|
var r2 = n2.__rememberedObjectIndecesToControllers[i2];
|
|
@@ -35251,31 +35254,31 @@ void main(void){
|
|
|
35251
35254
|
}
|
|
35252
35255
|
}
|
|
35253
35256
|
}
|
|
35254
|
-
function
|
|
35257
|
+
function Db(t2, e2, n2, i2) {
|
|
35255
35258
|
if (e2[n2] === void 0)
|
|
35256
35259
|
throw new Error('Object "' + e2 + '" has no property "' + n2 + '"');
|
|
35257
35260
|
var r2 = void 0;
|
|
35258
35261
|
if (i2.color)
|
|
35259
|
-
r2 = new
|
|
35262
|
+
r2 = new gb(e2, n2);
|
|
35260
35263
|
else {
|
|
35261
35264
|
var o2 = [e2, n2].concat(i2.factoryArgs);
|
|
35262
|
-
r2 =
|
|
35265
|
+
r2 = bb.apply(t2, o2);
|
|
35263
35266
|
}
|
|
35264
|
-
i2.before instanceof
|
|
35267
|
+
i2.before instanceof nb && (i2.before = i2.before.__li), Lb(t2, r2), sb.addClass(r2.domElement, "c");
|
|
35265
35268
|
var s2 = document.createElement("span");
|
|
35266
|
-
|
|
35269
|
+
sb.addClass(s2, "property-name"), s2.innerHTML = r2.property;
|
|
35267
35270
|
var a2 = document.createElement("div");
|
|
35268
35271
|
a2.appendChild(s2), a2.appendChild(r2.domElement);
|
|
35269
|
-
var l2 =
|
|
35270
|
-
return
|
|
35271
|
-
if (n3.__li = e3, n3.__gui = t3,
|
|
35272
|
+
var l2 = Ib(t2, a2, i2.before);
|
|
35273
|
+
return sb.addClass(l2, Pb.CLASS_CONTROLLER_ROW), r2 instanceof gb ? sb.addClass(l2, "color") : sb.addClass(l2, Yx(r2.getValue())), function(t3, e3, n3) {
|
|
35274
|
+
if (n3.__li = e3, n3.__gui = t3, Gx.extend(n3, { options: function(e4) {
|
|
35272
35275
|
if (arguments.length > 1) {
|
|
35273
35276
|
var i4 = n3.__li.nextElementSibling;
|
|
35274
|
-
return n3.remove(),
|
|
35277
|
+
return n3.remove(), Db(t3, n3.object, n3.property, { before: i4, factoryArgs: [Gx.toArray(arguments)] });
|
|
35275
35278
|
}
|
|
35276
|
-
if (
|
|
35279
|
+
if (Gx.isArray(e4) || Gx.isObject(e4)) {
|
|
35277
35280
|
var r4 = n3.__li.nextElementSibling;
|
|
35278
|
-
return n3.remove(),
|
|
35281
|
+
return n3.remove(), Db(t3, n3.object, n3.property, { before: r4, factoryArgs: [e4] });
|
|
35279
35282
|
}
|
|
35280
35283
|
}, name: function(t4) {
|
|
35281
35284
|
return n3.__li.firstElementChild.firstElementChild.innerHTML = t4, n3;
|
|
@@ -35283,157 +35286,157 @@ void main(void){
|
|
|
35283
35286
|
return n3.__gui.listen(n3), n3;
|
|
35284
35287
|
}, remove: function() {
|
|
35285
35288
|
return n3.__gui.remove(n3), n3;
|
|
35286
|
-
} }), n3 instanceof
|
|
35287
|
-
var i3 = new
|
|
35288
|
-
|
|
35289
|
+
} }), n3 instanceof fb) {
|
|
35290
|
+
var i3 = new db(n3.object, n3.property, { min: n3.__min, max: n3.__max, step: n3.__step });
|
|
35291
|
+
Gx.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t4) {
|
|
35289
35292
|
var e4 = n3[t4], r4 = i3[t4];
|
|
35290
35293
|
n3[t4] = i3[t4] = function() {
|
|
35291
35294
|
var t5 = Array.prototype.slice.call(arguments);
|
|
35292
35295
|
return r4.apply(i3, t5), e4.apply(n3, t5);
|
|
35293
35296
|
};
|
|
35294
|
-
}),
|
|
35295
|
-
} else if (n3 instanceof
|
|
35297
|
+
}), sb.addClass(e3, "has-slider"), n3.domElement.insertBefore(i3.domElement, n3.domElement.firstElementChild);
|
|
35298
|
+
} else if (n3 instanceof db) {
|
|
35296
35299
|
var r3 = function(e4) {
|
|
35297
|
-
if (
|
|
35300
|
+
if (Gx.isNumber(n3.__min) && Gx.isNumber(n3.__max)) {
|
|
35298
35301
|
var i4 = n3.__li.firstElementChild.firstElementChild.innerHTML, r4 = n3.__gui.__listening.indexOf(n3) > -1;
|
|
35299
35302
|
n3.remove();
|
|
35300
|
-
var o3 =
|
|
35303
|
+
var o3 = Db(t3, n3.object, n3.property, { before: n3.__li.nextElementSibling, factoryArgs: [n3.__min, n3.__max, n3.__step] });
|
|
35301
35304
|
return o3.name(i4), r4 && o3.listen(), o3;
|
|
35302
35305
|
}
|
|
35303
35306
|
return e4;
|
|
35304
35307
|
};
|
|
35305
|
-
n3.min =
|
|
35308
|
+
n3.min = Gx.compose(r3, n3.min), n3.max = Gx.compose(r3, n3.max);
|
|
35306
35309
|
} else
|
|
35307
|
-
n3 instanceof
|
|
35308
|
-
|
|
35309
|
-
}),
|
|
35310
|
+
n3 instanceof ab ? (sb.bind(e3, "click", function() {
|
|
35311
|
+
sb.fakeEvent(n3.__checkbox, "click");
|
|
35312
|
+
}), sb.bind(n3.__checkbox, "click", function(t4) {
|
|
35310
35313
|
t4.stopPropagation();
|
|
35311
|
-
})) : n3 instanceof
|
|
35312
|
-
|
|
35313
|
-
}),
|
|
35314
|
-
|
|
35315
|
-
}),
|
|
35316
|
-
|
|
35317
|
-
})) : n3 instanceof
|
|
35314
|
+
})) : n3 instanceof mb ? (sb.bind(e3, "click", function() {
|
|
35315
|
+
sb.fakeEvent(n3.__button, "click");
|
|
35316
|
+
}), sb.bind(e3, "mouseover", function() {
|
|
35317
|
+
sb.addClass(n3.__button, "hover");
|
|
35318
|
+
}), sb.bind(e3, "mouseout", function() {
|
|
35319
|
+
sb.removeClass(n3.__button, "hover");
|
|
35320
|
+
})) : n3 instanceof gb && (sb.addClass(e3, "color"), n3.updateDisplay = Gx.compose(function(t4) {
|
|
35318
35321
|
return e3.style.borderLeftColor = n3.__color.toString(), t4;
|
|
35319
35322
|
}, n3.updateDisplay), n3.updateDisplay());
|
|
35320
|
-
n3.setValue =
|
|
35321
|
-
return t3.getRoot().__preset_select && n3.isModified() &&
|
|
35323
|
+
n3.setValue = Gx.compose(function(e4) {
|
|
35324
|
+
return t3.getRoot().__preset_select && n3.isModified() && Nb(t3.getRoot(), true), e4;
|
|
35322
35325
|
}, n3.setValue);
|
|
35323
35326
|
}(t2, l2, r2), t2.__controllers.push(r2), r2;
|
|
35324
35327
|
}
|
|
35325
|
-
function
|
|
35328
|
+
function Fb(t2, e2) {
|
|
35326
35329
|
return document.location.href + "." + e2;
|
|
35327
35330
|
}
|
|
35328
|
-
function
|
|
35331
|
+
function Bb(t2, e2, n2) {
|
|
35329
35332
|
var i2 = document.createElement("option");
|
|
35330
35333
|
i2.innerHTML = e2, i2.value = e2, t2.__preset_select.appendChild(i2), n2 && (t2.__preset_select.selectedIndex = t2.__preset_select.length - 1);
|
|
35331
35334
|
}
|
|
35332
|
-
function
|
|
35335
|
+
function Ub(t2, e2) {
|
|
35333
35336
|
e2.style.display = t2.useLocalStorage ? "block" : "none";
|
|
35334
35337
|
}
|
|
35335
|
-
function
|
|
35338
|
+
function kb(t2) {
|
|
35336
35339
|
var e2 = t2.__save_row = document.createElement("li");
|
|
35337
|
-
|
|
35340
|
+
sb.addClass(t2.domElement, "has-save"), t2.__ul.insertBefore(e2, t2.__ul.firstChild), sb.addClass(e2, "save-row");
|
|
35338
35341
|
var n2 = document.createElement("span");
|
|
35339
|
-
n2.innerHTML = " ",
|
|
35342
|
+
n2.innerHTML = " ", sb.addClass(n2, "button gears");
|
|
35340
35343
|
var i2 = document.createElement("span");
|
|
35341
|
-
i2.innerHTML = "Save",
|
|
35344
|
+
i2.innerHTML = "Save", sb.addClass(i2, "button"), sb.addClass(i2, "save");
|
|
35342
35345
|
var r2 = document.createElement("span");
|
|
35343
|
-
r2.innerHTML = "New",
|
|
35346
|
+
r2.innerHTML = "New", sb.addClass(r2, "button"), sb.addClass(r2, "save-as");
|
|
35344
35347
|
var o2 = document.createElement("span");
|
|
35345
|
-
o2.innerHTML = "Revert",
|
|
35348
|
+
o2.innerHTML = "Revert", sb.addClass(o2, "button"), sb.addClass(o2, "revert");
|
|
35346
35349
|
var s2 = t2.__preset_select = document.createElement("select");
|
|
35347
|
-
if (t2.load && t2.load.remembered ?
|
|
35348
|
-
|
|
35349
|
-
}) :
|
|
35350
|
+
if (t2.load && t2.load.remembered ? Gx.each(t2.load.remembered, function(e3, n3) {
|
|
35351
|
+
Bb(t2, n3, n3 === t2.preset);
|
|
35352
|
+
}) : Bb(t2, "Default", false), sb.bind(s2, "change", function() {
|
|
35350
35353
|
for (var e3 = 0; e3 < t2.__preset_select.length; e3++)
|
|
35351
35354
|
t2.__preset_select[e3].innerHTML = t2.__preset_select[e3].value;
|
|
35352
35355
|
t2.preset = this.value;
|
|
35353
|
-
}), e2.appendChild(s2), e2.appendChild(n2), e2.appendChild(i2), e2.appendChild(r2), e2.appendChild(o2),
|
|
35356
|
+
}), e2.appendChild(s2), e2.appendChild(n2), e2.appendChild(i2), e2.appendChild(r2), e2.appendChild(o2), Sb) {
|
|
35354
35357
|
var a2 = document.getElementById("dg-local-explain"), l2 = document.getElementById("dg-local-storage");
|
|
35355
|
-
document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(
|
|
35356
|
-
t2.useLocalStorage = !t2.useLocalStorage,
|
|
35358
|
+
document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(Fb(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), Ub(t2, a2), sb.bind(l2, "change", function() {
|
|
35359
|
+
t2.useLocalStorage = !t2.useLocalStorage, Ub(t2, a2);
|
|
35357
35360
|
});
|
|
35358
35361
|
}
|
|
35359
35362
|
var h2 = document.getElementById("dg-new-constructor");
|
|
35360
|
-
|
|
35361
|
-
!t3.metaKey || t3.which !== 67 && t3.keyCode !== 67 ||
|
|
35362
|
-
}),
|
|
35363
|
-
h2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2),
|
|
35364
|
-
}),
|
|
35363
|
+
sb.bind(h2, "keydown", function(t3) {
|
|
35364
|
+
!t3.metaKey || t3.which !== 67 && t3.keyCode !== 67 || wb.hide();
|
|
35365
|
+
}), sb.bind(n2, "click", function() {
|
|
35366
|
+
h2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), wb.show(), h2.focus(), h2.select();
|
|
35367
|
+
}), sb.bind(i2, "click", function() {
|
|
35365
35368
|
t2.save();
|
|
35366
|
-
}),
|
|
35369
|
+
}), sb.bind(r2, "click", function() {
|
|
35367
35370
|
var e3 = prompt("Enter a new preset name.");
|
|
35368
35371
|
e3 && t2.saveAs(e3);
|
|
35369
|
-
}),
|
|
35372
|
+
}), sb.bind(o2, "click", function() {
|
|
35370
35373
|
t2.revert();
|
|
35371
35374
|
});
|
|
35372
35375
|
}
|
|
35373
|
-
function
|
|
35376
|
+
function Gb(t2) {
|
|
35374
35377
|
var e2 = void 0;
|
|
35375
35378
|
function n2(n3) {
|
|
35376
35379
|
return n3.preventDefault(), t2.width += e2 - n3.clientX, t2.onResize(), e2 = n3.clientX, false;
|
|
35377
35380
|
}
|
|
35378
35381
|
function i2() {
|
|
35379
|
-
|
|
35382
|
+
sb.removeClass(t2.__closeButton, Pb.CLASS_DRAG), sb.unbind(window, "mousemove", n2), sb.unbind(window, "mouseup", i2);
|
|
35380
35383
|
}
|
|
35381
35384
|
function r2(r3) {
|
|
35382
|
-
return r3.preventDefault(), e2 = r3.clientX,
|
|
35385
|
+
return r3.preventDefault(), e2 = r3.clientX, sb.addClass(t2.__closeButton, Pb.CLASS_DRAG), sb.bind(window, "mousemove", n2), sb.bind(window, "mouseup", i2), false;
|
|
35383
35386
|
}
|
|
35384
|
-
t2.__resize_handle = document.createElement("div"),
|
|
35387
|
+
t2.__resize_handle = document.createElement("div"), Gx.extend(t2.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), sb.bind(t2.__resize_handle, "mousedown", r2), sb.bind(t2.__closeButton, "mousedown", r2), t2.domElement.insertBefore(t2.__resize_handle, t2.domElement.firstElementChild);
|
|
35385
35388
|
}
|
|
35386
|
-
function
|
|
35389
|
+
function Hb(t2, e2) {
|
|
35387
35390
|
t2.domElement.style.width = e2 + "px", t2.__save_row && t2.autoPlace && (t2.__save_row.style.width = e2 + "px"), t2.__closeButton && (t2.__closeButton.style.width = e2 + "px");
|
|
35388
35391
|
}
|
|
35389
|
-
function
|
|
35392
|
+
function jb(t2, e2) {
|
|
35390
35393
|
var n2 = {};
|
|
35391
|
-
return
|
|
35394
|
+
return Gx.each(t2.__rememberedObjects, function(i2, r2) {
|
|
35392
35395
|
var o2 = {}, s2 = t2.__rememberedObjectIndecesToControllers[r2];
|
|
35393
|
-
|
|
35396
|
+
Gx.each(s2, function(t3, n3) {
|
|
35394
35397
|
o2[n3] = e2 ? t3.initialValue : t3.getValue();
|
|
35395
35398
|
}), n2[r2] = o2;
|
|
35396
35399
|
}), n2;
|
|
35397
35400
|
}
|
|
35398
|
-
|
|
35399
|
-
|
|
35400
|
-
t2.domElement.style.display =
|
|
35401
|
+
Pb.toggleHide = function() {
|
|
35402
|
+
Rb = !Rb, Gx.each(Cb, function(t2) {
|
|
35403
|
+
t2.domElement.style.display = Rb ? "none" : "";
|
|
35401
35404
|
});
|
|
35402
|
-
},
|
|
35403
|
-
document.activeElement.type === "text" || t2.which !== 72 && t2.keyCode !== 72 ||
|
|
35404
|
-
},
|
|
35405
|
-
return
|
|
35405
|
+
}, Pb.CLASS_AUTO_PLACE = "a", Pb.CLASS_AUTO_PLACE_CONTAINER = "ac", Pb.CLASS_MAIN = "main", Pb.CLASS_CONTROLLER_ROW = "cr", Pb.CLASS_TOO_TALL = "taller-than-window", Pb.CLASS_CLOSED = "closed", Pb.CLASS_CLOSE_BUTTON = "close-button", Pb.CLASS_CLOSE_TOP = "close-top", Pb.CLASS_CLOSE_BOTTOM = "close-bottom", Pb.CLASS_DRAG = "drag", Pb.DEFAULT_WIDTH = 245, Pb.TEXT_CLOSED = "Close Controls", Pb.TEXT_OPEN = "Open Controls", Pb._keydownHandler = function(t2) {
|
|
35406
|
+
document.activeElement.type === "text" || t2.which !== 72 && t2.keyCode !== 72 || Pb.toggleHide();
|
|
35407
|
+
}, sb.bind(window, "keydown", Pb._keydownHandler, false), Gx.extend(Pb.prototype, { add: function(t2, e2) {
|
|
35408
|
+
return Db(this, t2, e2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
|
|
35406
35409
|
}, addColor: function(t2, e2) {
|
|
35407
|
-
return
|
|
35410
|
+
return Db(this, t2, e2, { color: true });
|
|
35408
35411
|
}, remove: function(t2) {
|
|
35409
35412
|
this.__ul.removeChild(t2.__li), this.__controllers.splice(this.__controllers.indexOf(t2), 1);
|
|
35410
35413
|
var e2 = this;
|
|
35411
|
-
|
|
35414
|
+
Gx.defer(function() {
|
|
35412
35415
|
e2.onResize();
|
|
35413
35416
|
});
|
|
35414
35417
|
}, destroy: function() {
|
|
35415
35418
|
if (this.parent)
|
|
35416
35419
|
throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
|
|
35417
|
-
this.autoPlace &&
|
|
35420
|
+
this.autoPlace && Mb.removeChild(this.domElement);
|
|
35418
35421
|
var t2 = this;
|
|
35419
|
-
|
|
35422
|
+
Gx.each(this.__folders, function(e2) {
|
|
35420
35423
|
t2.removeFolder(e2);
|
|
35421
|
-
}),
|
|
35424
|
+
}), sb.unbind(window, "keydown", Pb._keydownHandler, false), Ob(this);
|
|
35422
35425
|
}, addFolder: function(t2) {
|
|
35423
35426
|
if (this.__folders[t2] !== void 0)
|
|
35424
35427
|
throw new Error('You already have a folder in this GUI by the name "' + t2 + '"');
|
|
35425
35428
|
var e2 = { name: t2, parent: this };
|
|
35426
35429
|
e2.autoPlace = this.autoPlace, this.load && this.load.folders && this.load.folders[t2] && (e2.closed = this.load.folders[t2].closed, e2.load = this.load.folders[t2]);
|
|
35427
|
-
var n2 = new
|
|
35430
|
+
var n2 = new Pb(e2);
|
|
35428
35431
|
this.__folders[t2] = n2;
|
|
35429
|
-
var i2 =
|
|
35430
|
-
return
|
|
35432
|
+
var i2 = Ib(this, n2.domElement);
|
|
35433
|
+
return sb.addClass(i2, "folder"), n2;
|
|
35431
35434
|
}, removeFolder: function(t2) {
|
|
35432
|
-
this.__ul.removeChild(t2.domElement.parentElement), delete this.__folders[t2.name], this.load && this.load.folders && this.load.folders[t2.name] && delete this.load.folders[t2.name],
|
|
35435
|
+
this.__ul.removeChild(t2.domElement.parentElement), delete this.__folders[t2.name], this.load && this.load.folders && this.load.folders[t2.name] && delete this.load.folders[t2.name], Ob(t2);
|
|
35433
35436
|
var e2 = this;
|
|
35434
|
-
|
|
35437
|
+
Gx.each(t2.__folders, function(e3) {
|
|
35435
35438
|
t2.removeFolder(e3);
|
|
35436
|
-
}),
|
|
35439
|
+
}), Gx.defer(function() {
|
|
35437
35440
|
e2.onResize();
|
|
35438
35441
|
});
|
|
35439
35442
|
}, open: function() {
|
|
@@ -35447,60 +35450,60 @@ void main(void){
|
|
|
35447
35450
|
}, onResize: function() {
|
|
35448
35451
|
var t2 = this.getRoot();
|
|
35449
35452
|
if (t2.scrollable) {
|
|
35450
|
-
var e2 =
|
|
35451
|
-
|
|
35452
|
-
t2.autoPlace && e3 === t2.__save_row || (n2 +=
|
|
35453
|
-
}), window.innerHeight - e2 - 20 < n2 ? (
|
|
35453
|
+
var e2 = sb.getOffset(t2.__ul).top, n2 = 0;
|
|
35454
|
+
Gx.each(t2.__ul.childNodes, function(e3) {
|
|
35455
|
+
t2.autoPlace && e3 === t2.__save_row || (n2 += sb.getHeight(e3));
|
|
35456
|
+
}), window.innerHeight - e2 - 20 < n2 ? (sb.addClass(t2.domElement, Pb.CLASS_TOO_TALL), t2.__ul.style.height = window.innerHeight - e2 - 20 + "px") : (sb.removeClass(t2.domElement, Pb.CLASS_TOO_TALL), t2.__ul.style.height = "auto");
|
|
35454
35457
|
}
|
|
35455
|
-
t2.__resize_handle &&
|
|
35458
|
+
t2.__resize_handle && Gx.defer(function() {
|
|
35456
35459
|
t2.__resize_handle.style.height = t2.__ul.offsetHeight + "px";
|
|
35457
35460
|
}), t2.__closeButton && (t2.__closeButton.style.width = t2.width + "px");
|
|
35458
|
-
}, onResizeDebounced:
|
|
35461
|
+
}, onResizeDebounced: Gx.debounce(function() {
|
|
35459
35462
|
this.onResize();
|
|
35460
35463
|
}, 50), remember: function() {
|
|
35461
|
-
if (
|
|
35464
|
+
if (Gx.isUndefined(wb) && ((wb = new Eb()).domElement.innerHTML = xb), this.parent)
|
|
35462
35465
|
throw new Error("You can only call remember on a top level GUI.");
|
|
35463
35466
|
var t2 = this;
|
|
35464
|
-
|
|
35465
|
-
t2.__rememberedObjects.length === 0 &&
|
|
35466
|
-
}), this.autoPlace &&
|
|
35467
|
+
Gx.each(Array.prototype.slice.call(arguments), function(e2) {
|
|
35468
|
+
t2.__rememberedObjects.length === 0 && kb(t2), t2.__rememberedObjects.indexOf(e2) === -1 && t2.__rememberedObjects.push(e2);
|
|
35469
|
+
}), this.autoPlace && Hb(this, this.width);
|
|
35467
35470
|
}, getRoot: function() {
|
|
35468
35471
|
for (var t2 = this; t2.parent; )
|
|
35469
35472
|
t2 = t2.parent;
|
|
35470
35473
|
return t2;
|
|
35471
35474
|
}, getSaveObject: function() {
|
|
35472
35475
|
var t2 = this.load;
|
|
35473
|
-
return t2.closed = this.closed, this.__rememberedObjects.length > 0 && (t2.preset = this.preset, t2.remembered || (t2.remembered = {}), t2.remembered[this.preset] =
|
|
35476
|
+
return t2.closed = this.closed, this.__rememberedObjects.length > 0 && (t2.preset = this.preset, t2.remembered || (t2.remembered = {}), t2.remembered[this.preset] = jb(this)), t2.folders = {}, Gx.each(this.__folders, function(e2, n2) {
|
|
35474
35477
|
t2.folders[n2] = e2.getSaveObject();
|
|
35475
35478
|
}), t2;
|
|
35476
35479
|
}, save: function() {
|
|
35477
|
-
this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] =
|
|
35480
|
+
this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = jb(this), Nb(this, false), this.saveToLocalStorageIfPossible();
|
|
35478
35481
|
}, saveAs: function(t2) {
|
|
35479
|
-
this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default =
|
|
35482
|
+
this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = jb(this, true)), this.load.remembered[t2] = jb(this), this.preset = t2, Bb(this, t2, true), this.saveToLocalStorageIfPossible();
|
|
35480
35483
|
}, revert: function(t2) {
|
|
35481
|
-
|
|
35482
|
-
this.getRoot().load.remembered ?
|
|
35483
|
-
}, this),
|
|
35484
|
+
Gx.each(this.__controllers, function(e2) {
|
|
35485
|
+
this.getRoot().load.remembered ? Lb(t2 || this.getRoot(), e2) : e2.setValue(e2.initialValue), e2.__onFinishChange && e2.__onFinishChange.call(e2, e2.getValue());
|
|
35486
|
+
}, this), Gx.each(this.__folders, function(t3) {
|
|
35484
35487
|
t3.revert(t3);
|
|
35485
|
-
}), t2 ||
|
|
35488
|
+
}), t2 || Nb(this.getRoot(), false);
|
|
35486
35489
|
}, listen: function(t2) {
|
|
35487
35490
|
var e2 = this.__listening.length === 0;
|
|
35488
35491
|
this.__listening.push(t2), e2 && function t3(e3) {
|
|
35489
|
-
e3.length !== 0 &&
|
|
35492
|
+
e3.length !== 0 && Tb.call(window, function() {
|
|
35490
35493
|
t3(e3);
|
|
35491
35494
|
});
|
|
35492
|
-
|
|
35495
|
+
Gx.each(e3, function(t4) {
|
|
35493
35496
|
t4.updateDisplay();
|
|
35494
35497
|
});
|
|
35495
35498
|
}(this.__listening);
|
|
35496
35499
|
}, updateDisplay: function() {
|
|
35497
|
-
|
|
35500
|
+
Gx.each(this.__controllers, function(t2) {
|
|
35498
35501
|
t2.updateDisplay();
|
|
35499
|
-
}),
|
|
35502
|
+
}), Gx.each(this.__folders, function(t2) {
|
|
35500
35503
|
t2.updateDisplay();
|
|
35501
35504
|
});
|
|
35502
35505
|
} });
|
|
35503
|
-
var
|
|
35506
|
+
var zb = Pb, Vb = function() {
|
|
35504
35507
|
function t2(t3) {
|
|
35505
35508
|
this.player = t3;
|
|
35506
35509
|
}
|
|
@@ -35542,10 +35545,10 @@ void main(void){
|
|
|
35542
35545
|
}, set: function(t3) {
|
|
35543
35546
|
this.player.updateConfig({ transactionBgColor: t3 });
|
|
35544
35547
|
}, enumerable: false, configurable: true }), t2;
|
|
35545
|
-
}(),
|
|
35548
|
+
}(), Xb = function() {
|
|
35546
35549
|
function t2(t3, e2) {
|
|
35547
35550
|
var n2;
|
|
35548
|
-
this.config = new
|
|
35551
|
+
this.config = new Vb(t3), this.anchor = e2, n2 = this.createControllerGUI(), this.gui = n2[0], this.controller = n2[1], this.createStats();
|
|
35549
35552
|
}
|
|
35550
35553
|
return t2.prototype.createStats = function() {
|
|
35551
35554
|
var t3 = this;
|
|
@@ -35553,7 +35556,7 @@ void main(void){
|
|
|
35553
35556
|
t3.controller.frameRate.updateDisplay(), t3.controller.size.updateDisplay(), t3.controller.minFPS.updateDisplay(), t3.controller.drawFrames.updateDisplay(), t3.controller.maxFPS.updateDisplay(), t3.controller.resolution.updateDisplay(), t3.controller.autoFps.updateDisplay(), t3.controller.autoResolution.updateDisplay(), t3.controller.drawCall.updateDisplay();
|
|
35554
35557
|
}, 16);
|
|
35555
35558
|
}, t2.prototype.createControllerGUI = function() {
|
|
35556
|
-
var t3 = new
|
|
35559
|
+
var t3 = new zb({ autoPlace: true, closed: true });
|
|
35557
35560
|
t3.domElement.style.opacity = ".6", t3.domElement.style.transformOrigin = "100% 0", t3.domElement.style.transform = "scale(1)", this.anchor.appendChild(t3.domElement), t3.domElement.style.position = "absolute", t3.domElement.style.right = "0", t3.domElement.style.top = "0", t3.domElement.style.zIndex = "2";
|
|
35558
35561
|
var e2 = { frameRate: t3.add(this.config, "frameRate"), drawFrames: t3.add(this.config, "drawFrames"), drawCall: t3.add(this.config, "drawCall"), size: t3.add(this.config, "size"), minFPS: t3.add(this.config, "minFPS", 0, 60), maxFPS: t3.add(this.config, "maxFPS", 0, 60), resolution: t3.add(this.config, "resolution", 0.5, 8, 0.5), autoResolution: t3.add(this.config, "autoResolution"), autoFps: t3.add(this.config, "autoFPS"), transactionBgColor: t3.addColor(this.config, "backgroundColor") };
|
|
35559
35562
|
return [t3, e2];
|
|
@@ -35563,7 +35566,7 @@ void main(void){
|
|
|
35563
35566
|
} catch (t3) {
|
|
35564
35567
|
}
|
|
35565
35568
|
}, t2;
|
|
35566
|
-
}(),
|
|
35569
|
+
}(), Wb = function() {
|
|
35567
35570
|
function t2(t3) {
|
|
35568
35571
|
var e2 = this;
|
|
35569
35572
|
this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
|
|
@@ -35579,7 +35582,7 @@ void main(void){
|
|
|
35579
35582
|
}, t2.prototype.addTask = function(t3) {
|
|
35580
35583
|
this.tasks.push(t3), this.isScheduling || this.schedule();
|
|
35581
35584
|
}, t2;
|
|
35582
|
-
}(),
|
|
35585
|
+
}(), Yb = function() {
|
|
35583
35586
|
function t2(t3) {
|
|
35584
35587
|
this.autoUnlock = /* @__PURE__ */ Object.create(null), this.locks = /* @__PURE__ */ Object.create(null), this.available = false, this.available = t3;
|
|
35585
35588
|
}
|
|
@@ -35593,7 +35596,7 @@ void main(void){
|
|
|
35593
35596
|
}, t2.prototype.isLocked = function(t3) {
|
|
35594
35597
|
return !!this.available && !!this.locks[t3];
|
|
35595
35598
|
}, t2;
|
|
35596
|
-
}(),
|
|
35599
|
+
}(), qb = function() {
|
|
35597
35600
|
function t2() {
|
|
35598
35601
|
var t3 = this;
|
|
35599
35602
|
this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
|
|
@@ -35616,7 +35619,7 @@ void main(void){
|
|
|
35616
35619
|
}, t2.prototype.destroy = function() {
|
|
35617
35620
|
this.isDestroy = true;
|
|
35618
35621
|
}, t2;
|
|
35619
|
-
}(),
|
|
35622
|
+
}(), Zb = function(t2, e2, n2, i2) {
|
|
35620
35623
|
return new (n2 || (n2 = Promise))(function(r2, o2) {
|
|
35621
35624
|
function s2(t3) {
|
|
35622
35625
|
try {
|
|
@@ -35640,7 +35643,7 @@ void main(void){
|
|
|
35640
35643
|
}
|
|
35641
35644
|
l2((i2 = i2.apply(t2, e2 || [])).next());
|
|
35642
35645
|
});
|
|
35643
|
-
},
|
|
35646
|
+
}, Jb = function(t2, e2) {
|
|
35644
35647
|
var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
|
|
35645
35648
|
if (1 & r2[0])
|
|
35646
35649
|
throw r2[1];
|
|
@@ -35704,13 +35707,13 @@ void main(void){
|
|
|
35704
35707
|
};
|
|
35705
35708
|
}
|
|
35706
35709
|
};
|
|
35707
|
-
function
|
|
35708
|
-
return
|
|
35710
|
+
function Kb(t2, e2, n2) {
|
|
35711
|
+
return Zb(this, void 0, void 0, function() {
|
|
35709
35712
|
var i2, r2, o2, s2;
|
|
35710
|
-
return
|
|
35713
|
+
return Jb(this, function(a2) {
|
|
35711
35714
|
switch (a2.label) {
|
|
35712
35715
|
case 0:
|
|
35713
|
-
return i2 = document.createElement("div"), (r2 = new
|
|
35716
|
+
return i2 = document.createElement("div"), (r2 = new uT({ anchor: i2, renderOptions: { minFPS: 1, maxFPS: 1, resolution: 1 }, mode: "local", interactive: false, useLocalCache: true })).setResource(t2, e2), [4, r2.getSlideCountAsync()];
|
|
35714
35717
|
case 1:
|
|
35715
35718
|
o2 = a2.sent(), s2 = 1, a2.label = 2;
|
|
35716
35719
|
case 2:
|
|
@@ -35725,7 +35728,7 @@ void main(void){
|
|
|
35725
35728
|
});
|
|
35726
35729
|
});
|
|
35727
35730
|
}
|
|
35728
|
-
var
|
|
35731
|
+
var Qb = function() {
|
|
35729
35732
|
var t2 = function(e2, n2) {
|
|
35730
35733
|
return (t2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) {
|
|
35731
35734
|
t3.__proto__ = e3;
|
|
@@ -35742,14 +35745,14 @@ void main(void){
|
|
|
35742
35745
|
}
|
|
35743
35746
|
t2(e2, n2), e2.prototype = n2 === null ? Object.create(n2) : (i2.prototype = n2.prototype, new i2());
|
|
35744
35747
|
};
|
|
35745
|
-
}(),
|
|
35746
|
-
return (
|
|
35748
|
+
}(), $b = function() {
|
|
35749
|
+
return ($b = Object.assign || function(t2) {
|
|
35747
35750
|
for (var e2, n2 = 1, i2 = arguments.length; n2 < i2; n2++)
|
|
35748
35751
|
for (var r2 in e2 = arguments[n2])
|
|
35749
35752
|
Object.prototype.hasOwnProperty.call(e2, r2) && (t2[r2] = e2[r2]);
|
|
35750
35753
|
return t2;
|
|
35751
35754
|
}).apply(this, arguments);
|
|
35752
|
-
},
|
|
35755
|
+
}, tT = function(t2, e2, n2, i2) {
|
|
35753
35756
|
var r2, o2 = arguments.length, s2 = o2 < 3 ? e2 : i2 === null ? i2 = Object.getOwnPropertyDescriptor(e2, n2) : i2;
|
|
35754
35757
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
35755
35758
|
s2 = Reflect.decorate(t2, e2, n2, i2);
|
|
@@ -35757,7 +35760,7 @@ void main(void){
|
|
|
35757
35760
|
for (var a2 = t2.length - 1; a2 >= 0; a2--)
|
|
35758
35761
|
(r2 = t2[a2]) && (s2 = (o2 < 3 ? r2(s2) : o2 > 3 ? r2(e2, n2, s2) : r2(e2, n2)) || s2);
|
|
35759
35762
|
return o2 > 3 && s2 && Object.defineProperty(e2, n2, s2), s2;
|
|
35760
|
-
},
|
|
35763
|
+
}, eT = function(t2, e2, n2, i2) {
|
|
35761
35764
|
return new (n2 || (n2 = Promise))(function(r2, o2) {
|
|
35762
35765
|
function s2(t3) {
|
|
35763
35766
|
try {
|
|
@@ -35781,7 +35784,7 @@ void main(void){
|
|
|
35781
35784
|
}
|
|
35782
35785
|
l2((i2 = i2.apply(t2, e2 || [])).next());
|
|
35783
35786
|
});
|
|
35784
|
-
},
|
|
35787
|
+
}, nT = function(t2, e2) {
|
|
35785
35788
|
var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
|
|
35786
35789
|
if (1 & r2[0])
|
|
35787
35790
|
throw r2[1];
|
|
@@ -35844,20 +35847,20 @@ void main(void){
|
|
|
35844
35847
|
}([o3, a3]);
|
|
35845
35848
|
};
|
|
35846
35849
|
}
|
|
35847
|
-
},
|
|
35850
|
+
}, iT = window.ResizeObserver || Ox, rT = function(t2) {
|
|
35848
35851
|
return new Promise(function(e2) {
|
|
35849
35852
|
return setTimeout(e2, t2);
|
|
35850
35853
|
});
|
|
35851
35854
|
};
|
|
35852
|
-
function
|
|
35853
|
-
return
|
|
35855
|
+
function oT(t2, e2) {
|
|
35856
|
+
return eT(this, void 0, void 0, function() {
|
|
35854
35857
|
var n2;
|
|
35855
|
-
return
|
|
35858
|
+
return nT(this, function(i2) {
|
|
35856
35859
|
switch (i2.label) {
|
|
35857
35860
|
case 0:
|
|
35858
35861
|
n2 = Date.now(), i2.label = 1;
|
|
35859
35862
|
case 1:
|
|
35860
|
-
return !t2() && Date.now() - n2 < e2 ? [4,
|
|
35863
|
+
return !t2() && Date.now() - n2 < e2 ? [4, rT(50)] : [3, 3];
|
|
35861
35864
|
case 2:
|
|
35862
35865
|
return i2.sent(), n2 = Date.now(), [3, 1];
|
|
35863
35866
|
case 3:
|
|
@@ -35866,23 +35869,23 @@ void main(void){
|
|
|
35866
35869
|
});
|
|
35867
35870
|
});
|
|
35868
35871
|
}
|
|
35869
|
-
var
|
|
35872
|
+
var sT = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart" }, aT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, lT = "";
|
|
35870
35873
|
try {
|
|
35871
|
-
|
|
35874
|
+
lT = "0.8.6";
|
|
35872
35875
|
} catch (t2) {
|
|
35873
|
-
|
|
35876
|
+
lT = "dev";
|
|
35874
35877
|
}
|
|
35875
|
-
var
|
|
35878
|
+
var hT = null;
|
|
35876
35879
|
try {
|
|
35877
|
-
(
|
|
35880
|
+
(hT = s.createInstance({ name: "__slide_local_log__", driver: s.INDEXEDDB, version: 1 })).ready(function(t2) {
|
|
35878
35881
|
}).catch(function(t2) {
|
|
35879
35882
|
});
|
|
35880
35883
|
} catch (t2) {
|
|
35881
35884
|
}
|
|
35882
|
-
var
|
|
35885
|
+
var uT = function(t2) {
|
|
35883
35886
|
function e2(n3) {
|
|
35884
35887
|
var i3 = t2.call(this) || this;
|
|
35885
|
-
return i3.iosResetCache = [], i3.needClearCacheImage = false, i3.version =
|
|
35888
|
+
return i3.iosResetCache = [], i3.needClearCacheImage = false, i3.version = lT, i3.__slideState = Yy()(aT), i3.userInputTime = 0, i3.isSyncingSlideState = false, i3.frozenTaskManager = new qb(), i3.randomId = o(), i3.resize = false, i3.isAnimating = false, i3.renderingTaskManager = new Fx(), i3.isLoading = false, i3.interactive = true, i3.renderingIndex = 0, i3.frameWidth = 1, i3.frameHeight = 1, i3.frame = document.createElement("div"), i3.canvasContainer = document.createElement("div"), i3.medianController = document.createElement("div"), i3.frameResizeObserver = new iT(function() {
|
|
35886
35889
|
return i3.frameResizeHandler();
|
|
35887
35890
|
}), i3.timestamp = function() {
|
|
35888
35891
|
return Date.now();
|
|
@@ -35913,12 +35916,12 @@ void main(void){
|
|
|
35913
35916
|
}, i3.handleSlideRef = function() {
|
|
35914
35917
|
console.log(i3), window.__slide = i3;
|
|
35915
35918
|
}, i3.receiveSyncHandler = function(t3) {
|
|
35916
|
-
return
|
|
35919
|
+
return eT(i3, void 0, void 0, function() {
|
|
35917
35920
|
var e3, n4, i4, r2, o2 = this;
|
|
35918
|
-
return
|
|
35921
|
+
return nT(this, function(s2) {
|
|
35919
35922
|
switch (s2.label) {
|
|
35920
35923
|
case 0:
|
|
35921
|
-
return zm()(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(
|
|
35924
|
+
return zm()(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(sT.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), t3.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
|
|
35922
35925
|
o2.doNextStep(true, t3.clientId || "");
|
|
35923
35926
|
})) : this.doNextStep(true, t3.clientId || ""), [3, 6]);
|
|
35924
35927
|
case 1:
|
|
@@ -35939,16 +35942,16 @@ void main(void){
|
|
|
35939
35942
|
});
|
|
35940
35943
|
});
|
|
35941
35944
|
}, i3.handlePrevSlide = function(t3) {
|
|
35942
|
-
return t3 === void 0 && (t3 = false),
|
|
35945
|
+
return t3 === void 0 && (t3 = false), eT(i3, void 0, void 0, function() {
|
|
35943
35946
|
var e3;
|
|
35944
|
-
return
|
|
35947
|
+
return nT(this, function(n4) {
|
|
35945
35948
|
return this.player ? ((e3 = this.player.prevSlideIndex) >= 1 && (this.config.navigatorDelegate ? this.config.navigatorDelegate.gotoPage(e3) : t3 ? this.doRenderSlide(e3, false) : this.renderSlide(e3, false)), [2]) : [2];
|
|
35946
35949
|
});
|
|
35947
35950
|
});
|
|
35948
35951
|
}, i3.handleNextSlide = function(t3) {
|
|
35949
|
-
return t3 === void 0 && (t3 = false),
|
|
35952
|
+
return t3 === void 0 && (t3 = false), eT(i3, void 0, void 0, function() {
|
|
35950
35953
|
var e3;
|
|
35951
|
-
return
|
|
35954
|
+
return nT(this, function(n4) {
|
|
35952
35955
|
return this.player ? ((e3 = this.player.nextSlideIndex) <= this.slideCount && (this.config.navigatorDelegate ? this.config.navigatorDelegate.gotoPage(e3) : t3 ? this.doRenderSlide(e3, true) : this.renderSlide(e3, true)), [2]) : [2];
|
|
35953
35956
|
});
|
|
35954
35957
|
});
|
|
@@ -35960,40 +35963,40 @@ void main(void){
|
|
|
35960
35963
|
t3 === -1 && i3.renderSlide(i3.slideCount, true);
|
|
35961
35964
|
}, e2.instances.push(i3), i3.config = i3.initSlideConfig(n3), i3.logger = { info: function(t3, n4) {
|
|
35962
35965
|
var r2;
|
|
35963
|
-
e2.
|
|
35966
|
+
e2._tempLog += "INFO - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + n4 + "] " + t3 + "\n";
|
|
35964
35967
|
var o2 = (r2 = i3.config.logger) === null || r2 === void 0 ? void 0 : r2.info;
|
|
35965
35968
|
o2 && o2("[" + n4 + "] " + t3);
|
|
35966
35969
|
}, warn: function(t3, n4) {
|
|
35967
35970
|
var r2;
|
|
35968
|
-
e2.
|
|
35971
|
+
e2._tempLog += "WARN - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + n4 + "] " + t3 + "\n";
|
|
35969
35972
|
var o2 = (r2 = i3.config.logger) === null || r2 === void 0 ? void 0 : r2.warn;
|
|
35970
35973
|
o2 && o2("[" + n4 + "] " + t3);
|
|
35971
35974
|
}, error: function(t3, n4) {
|
|
35972
35975
|
var r2;
|
|
35973
|
-
e2.
|
|
35976
|
+
e2._tempLog += "ERROR - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + n4 + "] " + t3 + "\n";
|
|
35974
35977
|
var o2 = (r2 = i3.config.logger) === null || r2 === void 0 ? void 0 : r2.error;
|
|
35975
35978
|
o2 && o2("[" + n4 + "] " + t3);
|
|
35976
|
-
} }, i3.logger.info("new slide with clientId: " + i3.config.clientId, i3.taskId), i3.anchor = i3.config.anchor, i3.syncQueue = new
|
|
35979
|
+
} }, i3.logger.info("new slide with clientId: " + i3.config.clientId, i3.taskId), i3.anchor = i3.config.anchor, i3.syncQueue = new Wb(i3.receiveSyncHandler), i3.lock = new Yb(i3.mode === "interactive"), i3.cacheImage.style.position = "absolute", i3.cacheImage.style.zIndex = "100", i3.setMedianControllerAttribute(), i3.canvasContainer.style.position = "relative", i3.canvasContainer.appendChild(i3.medianController), i3.frame.appendChild(i3.canvasContainer), i3.frameResizeObserver.observe(i3.frame), i3.on(sT.syncReceive, function(t3) {
|
|
35977
35980
|
i3.lock.unlock(t3.type, t3.uuid), i3.syncQueue.addTask(t3);
|
|
35978
35981
|
}), i3.renderingTaskManager.eventHub.on("task-error", function(t3) {
|
|
35979
35982
|
var e3 = t3.error, n4 = t3.task, r2 = Tm.transform(e3);
|
|
35980
35983
|
r2.errorType === gm.RuntimeWarn ? i3.logger.warn(r2.message, i3.taskId) : i3.logger.error(r2.message, i3.taskId), i3.isLoading = false, i3.reportError(r2, n4.slideIndex);
|
|
35981
|
-
}), window.addEventListener("__slide_ref__", i3.handleSlideRef), i3.resizeView =
|
|
35984
|
+
}), window.addEventListener("__slide_ref__", i3.handleSlideRef), i3.resizeView = Xy()(i3.resizeView.bind(i3), 50), i3.player = i3.initPlayer(i3.config), i3.config.controller && i3.createController(), i3.player.view && i3.canvasContainer.appendChild(i3.player.view), i3.handleViewClick = Xy()(i3.handleViewClick, 300), i3.player.errorChannel.on("error", function(t3, e3) {
|
|
35982
35985
|
var n4 = Tm.transform(t3);
|
|
35983
35986
|
n4.errorType === gm.RuntimeWarn ? i3.logger.warn(n4.message, i3.taskId) : i3.logger.error(n4.message, i3.taskId), i3.isLoading = false, e3 === i3.renderingIndex && i3.reportError(t3, e3);
|
|
35984
35987
|
}), window.addEventListener("message", i3.recoverHandler), i3;
|
|
35985
35988
|
}
|
|
35986
35989
|
var n2, i2;
|
|
35987
|
-
return
|
|
35988
|
-
return t3 === void 0 && (t3 = false),
|
|
35989
|
-
return
|
|
35990
|
+
return Qb(e2, t2), e2.flushLog = function(t3) {
|
|
35991
|
+
return t3 === void 0 && (t3 = false), eT(this, void 0, void 0, function() {
|
|
35992
|
+
return nT(this, function(n3) {
|
|
35990
35993
|
switch (n3.label) {
|
|
35991
35994
|
case 0:
|
|
35992
35995
|
if (!(e2._tempLog.length > 131072 || t3 && e2._tempLog.length > 0))
|
|
35993
35996
|
return [3, 5];
|
|
35994
35997
|
n3.label = 1;
|
|
35995
35998
|
case 1:
|
|
35996
|
-
return n3.trys.push([1, 3, , 4]), [4,
|
|
35999
|
+
return n3.trys.push([1, 3, , 4]), [4, hT == null ? void 0 : hT.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)];
|
|
35997
36000
|
case 2:
|
|
35998
36001
|
return n3.sent(), [3, 4];
|
|
35999
36002
|
case 3:
|
|
@@ -36005,67 +36008,20 @@ void main(void){
|
|
|
36005
36008
|
}
|
|
36006
36009
|
});
|
|
36007
36010
|
});
|
|
36008
|
-
}, e2.stopRemoteLog = function() {
|
|
36009
|
-
e2.remoteLogAddress = null;
|
|
36010
|
-
}, e2.startRemoteLog = function(t3) {
|
|
36011
|
-
return tT(this, void 0, void 0, function() {
|
|
36012
|
-
var n3, i3, r2, o2, s2;
|
|
36013
|
-
return eT(this, function(a2) {
|
|
36014
|
-
switch (a2.label) {
|
|
36015
|
-
case 0:
|
|
36016
|
-
return e2.remoteLogAddress = t3, [4, e2.flushLog(true)];
|
|
36017
|
-
case 1:
|
|
36018
|
-
if (a2.sent(), !lT)
|
|
36019
|
-
return [3, 13];
|
|
36020
|
-
n3 = [], a2.label = 2;
|
|
36021
|
-
case 2:
|
|
36022
|
-
return a2.trys.push([2, 4, , 5]), [4, lT.keys()];
|
|
36023
|
-
case 3:
|
|
36024
|
-
return n3 = (a2.sent() || []).sort(function(t4, e3) {
|
|
36025
|
-
return parseInt(t4.replace("run_time_log_", "")) - parseInt(e3.replace("run_time_log_", ""));
|
|
36026
|
-
}), [3, 5];
|
|
36027
|
-
case 4:
|
|
36028
|
-
return a2.sent(), [3, 5];
|
|
36029
|
-
case 5:
|
|
36030
|
-
i3 = 0, r2 = n3, a2.label = 6;
|
|
36031
|
-
case 6:
|
|
36032
|
-
if (!(i3 < r2.length))
|
|
36033
|
-
return [3, 13];
|
|
36034
|
-
o2 = r2[i3], o2.replace("run_time_log_", ""), s2 = "", a2.label = 7;
|
|
36035
|
-
case 7:
|
|
36036
|
-
return a2.trys.push([7, 9, , 10]), [4, lT.getItem(o2)];
|
|
36037
|
-
case 8:
|
|
36038
|
-
return s2 = a2.sent() || "", [3, 10];
|
|
36039
|
-
case 9:
|
|
36040
|
-
return a2.sent(), [3, 10];
|
|
36041
|
-
case 10:
|
|
36042
|
-
return [4, fetch(e2.remoteLogAddress + "/logs", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ log: s2 }) })];
|
|
36043
|
-
case 11:
|
|
36044
|
-
a2.sent(), a2.label = 12;
|
|
36045
|
-
case 12:
|
|
36046
|
-
return i3++, [3, 6];
|
|
36047
|
-
case 13:
|
|
36048
|
-
return [2];
|
|
36049
|
-
}
|
|
36050
|
-
});
|
|
36051
|
-
});
|
|
36052
|
-
}, e2.appendLogString = function(t3) {
|
|
36053
|
-
e2._tempLog += t3, e2.remoteLogAddress && fetch(e2.remoteLogAddress + "/logs", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ log: t3 }) }).catch(function() {
|
|
36054
|
-
});
|
|
36055
36011
|
}, Object.defineProperty(e2.prototype, "dispatchIncrId", { get: function() {
|
|
36056
36012
|
return this._dispatchIncrId++;
|
|
36057
36013
|
}, enumerable: false, configurable: true }), e2.prototype.reportError = function(t3, e3) {
|
|
36058
|
-
this.emit(
|
|
36014
|
+
this.emit(sT.renderError, { error: t3, index: e3 }), window.postMessage({ type: "@slide/_error_", errorType: t3.errorType, errorMsg: t3.errorMsg, slideId: this.randomId, slideIndex: e3, customMessage: "@slide/_error_" }, "*");
|
|
36059
36015
|
}, e2.prototype.initSlideConfig = function(t3) {
|
|
36060
36016
|
return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (Uy.RtcAudioClazz = t3.rtcAudio), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !tl()(t3.enableGlobalClick) && t3.enableGlobalClick, this.resize = t3.resize || false, this.interactive = t3.interactive, this.frame.style.cssText = t3.fixedFrameSize ? "width:" + t3.fixedFrameSize.width + "px;height:" + t3.fixedFrameSize.height + "px;" : "width:100%;height:100%", this.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", t3.fixedFrameSize && (this.frameWidth = t3.fixedFrameSize.width, this.frameHeight = t3.fixedFrameSize.height), t3;
|
|
36061
36017
|
}, e2.prototype.initPlayer = function(t3) {
|
|
36062
36018
|
var e3, n3, i3, r2 = this, o2 = new Uy({ mode: this.mode, useLocalCache: !!tl()(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: tl()(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate, volumeAdjuster: this.volumeAdjuster }, t3.renderOptions);
|
|
36063
36019
|
return o2.setInteractive(this.interactive), o2.updateConfig(t3.renderOptions || {}), o2.on(By.renderStart, function(t4) {
|
|
36064
|
-
r2.isLoading = true, r2.emit(
|
|
36020
|
+
r2.isLoading = true, r2.emit(sT.renderStart, t4);
|
|
36065
36021
|
}), o2.on(By.renderEnd, function(t4) {
|
|
36066
|
-
r2.isLoading = false, r2.player && (r2.designHeight = r2.player.designHeight, r2.designWidth = r2.player.designWidth, r2.cacheImage.style.width = r2.player.designWidth + "px", r2.cacheImage.style.height = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(
|
|
36022
|
+
r2.isLoading = false, r2.player && (r2.designHeight = r2.player.designHeight, r2.designWidth = r2.player.designWidth, r2.cacheImage.style.width = r2.player.designWidth + "px", r2.cacheImage.style.height = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(sT.renderEnd, t4);
|
|
36067
36023
|
}), o2.on(By.slideChange, function(t4) {
|
|
36068
|
-
r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(
|
|
36024
|
+
r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(sT.slideChange, t4);
|
|
36069
36025
|
}), o2.on(By.mainSeqStateChange, function(t4) {
|
|
36070
36026
|
r2.__slideState.mainSeqState = t4, r2.emitStateChange();
|
|
36071
36027
|
}), o2.on(By.mainSeqStepChange, function(t4) {
|
|
@@ -36074,16 +36030,16 @@ void main(void){
|
|
|
36074
36030
|
var e4 = t4.id, n4 = t4.state;
|
|
36075
36031
|
r2.__slideState.interactiveSeqState[e4] = n4, r2.emitStateChange();
|
|
36076
36032
|
}), o2.on(By.animateStart, function() {
|
|
36077
|
-
r2.isAnimating !== true && (r2.isAnimating = true, r2.emit(
|
|
36033
|
+
r2.isAnimating !== true && (r2.isAnimating = true, r2.emit(sT.animateStart));
|
|
36078
36034
|
}), o2.on(By.animateEnd, function() {
|
|
36079
|
-
r2.isAnimating !== false && (r2.isAnimating = false, r2.emit(
|
|
36035
|
+
r2.isAnimating !== false && (r2.isAnimating = false, r2.emit(sT.animateEnd));
|
|
36080
36036
|
}), o2.on(By.interactiveSeqAction, function(t4) {
|
|
36081
36037
|
var e4 = t4.action, n4 = t4.seqId;
|
|
36082
36038
|
r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "interactiveAnim", action: e4, seqId: n4 }), r2.emitStateChange();
|
|
36083
36039
|
}), o2.on(By.mainSeqStepStart, function(t4) {
|
|
36084
|
-
r2.emit(
|
|
36040
|
+
r2.emit(sT.mainSeqStepStart, t4);
|
|
36085
36041
|
}), o2.on(By.mainSeqStepEnd, function(t4) {
|
|
36086
|
-
r2.emit(
|
|
36042
|
+
r2.emit(sT.mainSeqStepEnd, t4);
|
|
36087
36043
|
}), o2.on(By.mediaPlay, function(t4) {
|
|
36088
36044
|
var e4 = { type: "play", time: r2.timestamp() - 1e3 * t4.time };
|
|
36089
36045
|
r2.__slideState.mediaState[t4.id] = e4, r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPlay", id: t4.id, state: e4 }), r2.emitStateChange();
|
|
@@ -36103,7 +36059,7 @@ void main(void){
|
|
|
36103
36059
|
r2.config.navigatorDelegate ? r2.config.navigatorDelegate.gotoPage(t4) : r2.handleGotoSlide(t4);
|
|
36104
36060
|
}), (e3 = o2.view) === null || e3 === void 0 || e3.addEventListener("touchend", this.handleViewTouchEnd), (n3 = o2.view) === null || n3 === void 0 || n3.addEventListener("touchstart", this.handleViewTouchStart), (i3 = o2.view) === null || i3 === void 0 || i3.addEventListener("click", this.handleViewClick), o2.on(By.userInput, this.userInputHandle), o2;
|
|
36105
36061
|
}, e2.prototype.createController = function() {
|
|
36106
|
-
this.player && (this.playerController = new
|
|
36062
|
+
this.player && (this.playerController = new Xb(this.player, this.frame));
|
|
36107
36063
|
}, e2.prototype.setMedianControllerAttribute = function() {
|
|
36108
36064
|
this.medianController.className = "median-container", this.medianController.style.position = "absolute", this.medianController.style.left = "0", this.medianController.style.top = "0", this.medianController.style.zIndex = "2";
|
|
36109
36065
|
}, e2.prototype.frameResizeHandler = function() {
|
|
@@ -36123,9 +36079,9 @@ void main(void){
|
|
|
36123
36079
|
}
|
|
36124
36080
|
}, e2.prototype.setSlideState = function(t3) {
|
|
36125
36081
|
var e3, n3, i3;
|
|
36126
|
-
return
|
|
36082
|
+
return eT(this, void 0, void 0, function() {
|
|
36127
36083
|
var r2, o2 = this;
|
|
36128
|
-
return
|
|
36084
|
+
return nT(this, function(s2) {
|
|
36129
36085
|
switch (s2.label) {
|
|
36130
36086
|
case 0:
|
|
36131
36087
|
return this.isSyncingSlideState = true, this.logger.info("stateChange receive " + JSON.stringify(t3), this.taskId), t3.taskId && t3.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t3.taskId, (e3 = this.player) === null || e3 === void 0 || e3.setResourceData(t3.taskId, this.__slideState.url)), t3.url && t3.url !== this.__slideState.url && (this.__slideState.url = t3.url, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(this.__slideState.taskId, t3.url)), Number.isInteger(t3.currentSlideIndex) && t3.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t3.currentSlideIndex, [4, this.doRenderSlide(t3.currentSlideIndex)]) : [3, 2];
|
|
@@ -36165,9 +36121,9 @@ void main(void){
|
|
|
36165
36121
|
}, Object.defineProperty(e2.prototype, "slideCount", { get: function() {
|
|
36166
36122
|
return this._slideCount;
|
|
36167
36123
|
}, enumerable: false, configurable: true }), e2.prototype.getSizeAsync = function() {
|
|
36168
|
-
return
|
|
36124
|
+
return eT(this, void 0, void 0, function() {
|
|
36169
36125
|
var t3;
|
|
36170
|
-
return
|
|
36126
|
+
return nT(this, function(e3) {
|
|
36171
36127
|
switch (e3.label) {
|
|
36172
36128
|
case 0:
|
|
36173
36129
|
if (this.width > 0 && this.height > 0)
|
|
@@ -36187,8 +36143,8 @@ void main(void){
|
|
|
36187
36143
|
});
|
|
36188
36144
|
});
|
|
36189
36145
|
}, e2.prototype.getSlideCountAsync = function() {
|
|
36190
|
-
return
|
|
36191
|
-
return
|
|
36146
|
+
return eT(this, void 0, void 0, function() {
|
|
36147
|
+
return nT(this, function(t3) {
|
|
36192
36148
|
switch (t3.label) {
|
|
36193
36149
|
case 0:
|
|
36194
36150
|
if (this._slideCount > 0)
|
|
@@ -36244,9 +36200,9 @@ void main(void){
|
|
|
36244
36200
|
this.taskId = t3, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(t3, e3), this.__slideState.taskId = t3, this.__slideState.url = e3, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t3, url: e3 });
|
|
36245
36201
|
}, e2.prototype._renderSlide = function(t3) {
|
|
36246
36202
|
var e3;
|
|
36247
|
-
return
|
|
36203
|
+
return eT(this, void 0, void 0, function() {
|
|
36248
36204
|
var n3 = this;
|
|
36249
|
-
return
|
|
36205
|
+
return nT(this, function(i3) {
|
|
36250
36206
|
switch (i3.label) {
|
|
36251
36207
|
case 0:
|
|
36252
36208
|
return this.renderingIndex = t3, this.player && t3 === this.player.currentIndex ? [2] : ((Uy.platform.isIOS() || Uy.platform.isAndroid()) && this.iosResetCache.indexOf(t3) < 0 && this.iosResetCache.push(t3), [4, (e3 = this.player) === null || e3 === void 0 ? void 0 : e3.renderSlide(t3)]);
|
|
@@ -36290,7 +36246,7 @@ void main(void){
|
|
|
36290
36246
|
var t3, e3;
|
|
36291
36247
|
return (e3 = (t3 = this.player) === null || t3 === void 0 ? void 0 : t3.getSnapshot()) !== null && e3 !== void 0 ? e3 : null;
|
|
36292
36248
|
}, e2.prototype.nextStep = function() {
|
|
36293
|
-
!this.isLoading && this.player && this.interactive ? (this.hasNextStep() || this.emit(
|
|
36249
|
+
!this.isLoading && this.player && this.interactive ? (this.hasNextStep() || this.emit(sT.slideStepEnd), this.player.mainSeqHasNextStep() ? this.mode === "interactive" ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() + 1 }) : this.mode === "sync" ? (this.doNextStep(false, ""), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "nextStep", next: this.player.mainSeqStep() })) : this.doNextStep(false, "") : this.handleNextSlide()) : this.logger.info("prevent nextStep. " + this.isLoading + " " + this.player + " " + this.interactive, this.taskId);
|
|
36294
36250
|
}, e2.prototype.doNextStep = function(t3, e3) {
|
|
36295
36251
|
if (this.player) {
|
|
36296
36252
|
var n3 = !this.config.clientId || e3 === this.config.clientId;
|
|
@@ -36299,7 +36255,7 @@ void main(void){
|
|
|
36299
36255
|
this.__slideState.mainSeqStep = i3, this.emitStateChange();
|
|
36300
36256
|
}
|
|
36301
36257
|
}, e2.prototype.prevStep = function() {
|
|
36302
|
-
!this.isLoading && this.player && this.interactive ? (this.hasPrevStep() || this.emit(
|
|
36258
|
+
!this.isLoading && this.player && this.interactive ? (this.hasPrevStep() || this.emit(sT.slideStepStart), this.player.mainSeqHasPrevStep() ? this.mode === "interactive" ? this.emitSyncDispatch({ type: "prevStep", slideIndex: this.__slideState.currentSlideIndex, next: this.player.mainSeqStep() - 1 }) : this.mode === "sync" ? (this.doPrevStep(), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "prevStep", next: this.player.mainSeqStep() })) : this.doPrevStep() : this.handlePrevSlide()) : this.logger.info("prevent nextStep. " + this.isLoading + " " + this.player + " " + this.interactive, this.taskId);
|
|
36303
36259
|
}, e2.prototype.doPrevStep = function(t3) {
|
|
36304
36260
|
if (t3 === void 0 && (t3 = false), this.player) {
|
|
36305
36261
|
this.player.prevStep(t3);
|
|
@@ -36311,14 +36267,14 @@ void main(void){
|
|
|
36311
36267
|
}, e2.prototype.emitStateChange = function() {
|
|
36312
36268
|
if (this.mode !== "local" && !this.isSyncingSlideState) {
|
|
36313
36269
|
var t3 = this.slideState;
|
|
36314
|
-
!
|
|
36270
|
+
!zy()(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(sT.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
|
|
36315
36271
|
}
|
|
36316
36272
|
}, e2.prototype.emitSyncDispatch = function(t3) {
|
|
36317
36273
|
if (!this.lock.isLocked(t3.type)) {
|
|
36318
36274
|
var e3 = Math.random().toString(32).substr(2);
|
|
36319
36275
|
this.lock.addLock(t3.type, e3);
|
|
36320
|
-
var n3 =
|
|
36321
|
-
this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(
|
|
36276
|
+
var n3 = $b($b({}, t3), { uuid: e3, clientId: this.config.clientId });
|
|
36277
|
+
this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(sT.syncDispatch, n3), this.logger.info("sync dispatch " + JSON.stringify(n3), this.taskId);
|
|
36322
36278
|
}
|
|
36323
36279
|
}, e2.prototype.setMainSeqStep = function(t3, e3) {
|
|
36324
36280
|
var n3;
|
|
@@ -36334,9 +36290,9 @@ void main(void){
|
|
|
36334
36290
|
(t3 = this.player) === null || t3 === void 0 || t3.resume();
|
|
36335
36291
|
}, e2.prototype._doFrozen = function() {
|
|
36336
36292
|
var t3;
|
|
36337
|
-
return
|
|
36293
|
+
return eT(this, void 0, void 0, function() {
|
|
36338
36294
|
var e3, n3, i3, r2 = this;
|
|
36339
|
-
return
|
|
36295
|
+
return nT(this, function(o2) {
|
|
36340
36296
|
switch (o2.label) {
|
|
36341
36297
|
case 0:
|
|
36342
36298
|
return this.logger.info("frozen with player[" + !!this.player + "]", this.taskId), this.view && this.player ? [4, this.player.clock.waitUntil(function() {
|
|
@@ -36344,7 +36300,7 @@ void main(void){
|
|
|
36344
36300
|
}, 6e4)] : [3, 2];
|
|
36345
36301
|
case 1:
|
|
36346
36302
|
for (n3 in o2.sent(), e3 = this.player.getSnapshot() || "", this.cacheImage.src = e3, this.frame.appendChild(this.cacheImage), this.player.destroy(), (t3 = this.playerController) === null || t3 === void 0 || t3.destroy(), this.player = void 0, this.__slideState.mediaState)
|
|
36347
|
-
i3 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] =
|
|
36303
|
+
i3 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = $b($b({}, i3), { frozenTime: this.timestamp() });
|
|
36348
36304
|
o2.label = 2;
|
|
36349
36305
|
case 2:
|
|
36350
36306
|
return [2];
|
|
@@ -36358,14 +36314,14 @@ void main(void){
|
|
|
36358
36314
|
});
|
|
36359
36315
|
}, e2.prototype._doRelease = function() {
|
|
36360
36316
|
var t3, e3;
|
|
36361
|
-
return
|
|
36317
|
+
return eT(this, void 0, void 0, function() {
|
|
36362
36318
|
var n3, i3, r2, o2;
|
|
36363
|
-
return
|
|
36319
|
+
return nT(this, function(s2) {
|
|
36364
36320
|
switch (s2.label) {
|
|
36365
36321
|
case 0:
|
|
36366
36322
|
if (this.logger.info("do release slide", this.taskId), this.player)
|
|
36367
36323
|
return [2];
|
|
36368
|
-
for (i3 in this.player = this.initPlayer(this.config), ((t3 = this.config) === null || t3 === void 0 ? void 0 : t3.controller) && this.createController(), this.player.view && (this.canvasContainer.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState =
|
|
36324
|
+
for (i3 in this.player = this.initPlayer(this.config), ((t3 = this.config) === null || t3 === void 0 ? void 0 : t3.controller) && this.createController(), this.player.view && (this.canvasContainer.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = Yy()(aT), n3.mediaState)
|
|
36369
36325
|
(r2 = n3.mediaState[i3]).type === "play" && (o2 = Math.max((e3 = r2.frozenTime) !== null && e3 !== void 0 ? e3 : 0, r2.time), r2.time = this.timestamp() - (o2 - r2.time), r2.frozenTime = void 0);
|
|
36370
36326
|
return [4, this.setSlideState(n3)];
|
|
36371
36327
|
case 1:
|
|
@@ -36403,14 +36359,14 @@ void main(void){
|
|
|
36403
36359
|
} catch (t4) {
|
|
36404
36360
|
}
|
|
36405
36361
|
}, e2.prototype.waitLoadEnd = function() {
|
|
36406
|
-
return
|
|
36362
|
+
return eT(this, void 0, void 0, function() {
|
|
36407
36363
|
var t3;
|
|
36408
|
-
return
|
|
36364
|
+
return nT(this, function(e3) {
|
|
36409
36365
|
switch (e3.label) {
|
|
36410
36366
|
case 0:
|
|
36411
36367
|
t3 = 0, e3.label = 1;
|
|
36412
36368
|
case 1:
|
|
36413
|
-
return this.isLoading && t3 < 10 ? [4,
|
|
36369
|
+
return this.isLoading && t3 < 10 ? [4, rT(100)] : [3, 3];
|
|
36414
36370
|
case 2:
|
|
36415
36371
|
return e3.sent(), t3 += 1, [3, 1];
|
|
36416
36372
|
case 3:
|
|
@@ -36439,14 +36395,14 @@ void main(void){
|
|
|
36439
36395
|
var t3 = this.player.currentIndex === 1, e3 = this.mainSeqLength === 0 || this.mainSeqStep === 0, n3 = this.mainSeqState === "idle" || this.mainSeqState === null;
|
|
36440
36396
|
return !(t3 && e3 && n3);
|
|
36441
36397
|
}, e2.prototype.snapshot = function() {
|
|
36442
|
-
return
|
|
36443
|
-
return
|
|
36398
|
+
return eT(this, void 0, void 0, function() {
|
|
36399
|
+
return nT(this, function(t3) {
|
|
36444
36400
|
return this.player ? [2, this.player.getSnapshot()] : [2, null];
|
|
36445
36401
|
});
|
|
36446
36402
|
});
|
|
36447
36403
|
}, e2.prototype.snapshotWithTimingEnd = function(t3) {
|
|
36448
|
-
return
|
|
36449
|
-
return
|
|
36404
|
+
return eT(this, void 0, void 0, function() {
|
|
36405
|
+
return nT(this, function(e3) {
|
|
36450
36406
|
return this.player ? [2, this.player.snapshotWithTimingEnd(t3)] : [2, null];
|
|
36451
36407
|
});
|
|
36452
36408
|
});
|
|
@@ -36457,18 +36413,7 @@ void main(void){
|
|
|
36457
36413
|
}, e2.clearLocalCache = function() {
|
|
36458
36414
|
Uy.clearLocalCache();
|
|
36459
36415
|
}, e2.disposeLocalCache = function() {
|
|
36460
|
-
}, n2 = e2, e2.instances = [], e2._tempFrozenIds = [], e2._tempLog = "", e2._tempLogIndex = 1, e2.
|
|
36461
|
-
t3.context({ logger: { info: function(t4) {
|
|
36462
|
-
e2.appendLogString("INFO - " + new Date().toISOString() + " - " + t4 + "\n");
|
|
36463
|
-
}, warn: function(t4) {
|
|
36464
|
-
e2.appendLogString("WARN - " + new Date().toISOString() + " - " + t4 + "\n");
|
|
36465
|
-
}, error: function(t4) {
|
|
36466
|
-
e2.appendLogString("ERROR - " + new Date().toISOString() + " - " + t4 + "\n");
|
|
36467
|
-
} } }), function(t4) {
|
|
36468
|
-
var e3 = ky.get(t4.hookPoint) || [];
|
|
36469
|
-
e3.push(t4), ky.set(t4.hookPoint, e3);
|
|
36470
|
-
}(t3);
|
|
36471
|
-
}, e2.handleFrozenAllSlide = function() {
|
|
36416
|
+
}, n2 = e2, e2.instances = [], e2._tempFrozenIds = [], e2._tempLog = "", e2._tempLogIndex = 1, e2.usePlugin = Gy, e2.handleFrozenAllSlide = function() {
|
|
36472
36417
|
e2.instances.forEach(function(t3) {
|
|
36473
36418
|
t3.player && (e2._tempFrozenIds.push(t3.randomId), t3.frozen());
|
|
36474
36419
|
});
|
|
@@ -36480,18 +36425,18 @@ void main(void){
|
|
|
36480
36425
|
n3 && n3.release();
|
|
36481
36426
|
}), e2._tempFrozenIds = [];
|
|
36482
36427
|
}, e2.handleLogReport = function(t3) {
|
|
36483
|
-
return
|
|
36428
|
+
return eT(void 0, void 0, void 0, function() {
|
|
36484
36429
|
var i3, r2, o2, s2, a2, l2;
|
|
36485
|
-
return
|
|
36430
|
+
return nT(n2, function(n3) {
|
|
36486
36431
|
switch (n3.label) {
|
|
36487
36432
|
case 0:
|
|
36488
36433
|
return [4, e2.flushLog(true)];
|
|
36489
36434
|
case 1:
|
|
36490
|
-
if (n3.sent(), !
|
|
36435
|
+
if (n3.sent(), !hT)
|
|
36491
36436
|
return [3, 12];
|
|
36492
36437
|
i3 = [], n3.label = 2;
|
|
36493
36438
|
case 2:
|
|
36494
|
-
return n3.trys.push([2, 4, , 5]), [4,
|
|
36439
|
+
return n3.trys.push([2, 4, , 5]), [4, hT.keys()];
|
|
36495
36440
|
case 3:
|
|
36496
36441
|
return i3 = (n3.sent() || []).sort(function(t4, e3) {
|
|
36497
36442
|
return parseInt(t4.replace("run_time_log_", "")) - parseInt(e3.replace("run_time_log_", ""));
|
|
@@ -36507,7 +36452,7 @@ void main(void){
|
|
|
36507
36452
|
return [3, 12];
|
|
36508
36453
|
s2 = o2[r2], a2 = s2.replace("run_time_log_", ""), l2 = "", n3.label = 7;
|
|
36509
36454
|
case 7:
|
|
36510
|
-
return n3.trys.push([7, 9, , 10]), [4,
|
|
36455
|
+
return n3.trys.push([7, 9, , 10]), [4, hT.getItem(s2)];
|
|
36511
36456
|
case 8:
|
|
36512
36457
|
return l2 = n3.sent() || "", [3, 10];
|
|
36513
36458
|
case 9:
|
|
@@ -36522,20 +36467,20 @@ void main(void){
|
|
|
36522
36467
|
});
|
|
36523
36468
|
});
|
|
36524
36469
|
}, e2.handleLogDownload = function() {
|
|
36525
|
-
return
|
|
36470
|
+
return eT(void 0, void 0, void 0, function() {
|
|
36526
36471
|
var t3, i3, r2, o2, s2, a2, l2;
|
|
36527
|
-
return
|
|
36472
|
+
return nT(n2, function(n3) {
|
|
36528
36473
|
switch (n3.label) {
|
|
36529
36474
|
case 0:
|
|
36530
36475
|
return n3.trys.push([0, 7, , 8]), [4, e2.flushLog(true)];
|
|
36531
36476
|
case 1:
|
|
36532
|
-
return n3.sent(), t3 = "",
|
|
36477
|
+
return n3.sent(), t3 = "", hT ? [4, hT.keys()] : [3, 6];
|
|
36533
36478
|
case 2:
|
|
36534
36479
|
i3 = (n3.sent() || []).sort(function(t4, e3) {
|
|
36535
36480
|
return parseInt(t4.replace("run_time_log_", "")) - parseInt(e3.replace("run_time_log_", ""));
|
|
36536
36481
|
}), r2 = 0, o2 = i3, n3.label = 3;
|
|
36537
36482
|
case 3:
|
|
36538
|
-
return r2 < o2.length ? (s2 = o2[r2], a2 = t3, [4,
|
|
36483
|
+
return r2 < o2.length ? (s2 = o2[r2], a2 = t3, [4, hT.getItem(s2)]) : [3, 6];
|
|
36539
36484
|
case 4:
|
|
36540
36485
|
t3 = a2 + (n3.sent() || ""), n3.label = 5;
|
|
36541
36486
|
case 5:
|
|
@@ -36549,7 +36494,7 @@ void main(void){
|
|
|
36549
36494
|
}
|
|
36550
36495
|
});
|
|
36551
36496
|
});
|
|
36552
|
-
},
|
|
36497
|
+
}, tT([(i2 = "Slide.initConfig", function(t3, e3, n3) {
|
|
36553
36498
|
var r2 = n3.value;
|
|
36554
36499
|
n3.value = function() {
|
|
36555
36500
|
for (var t4 = [], e4 = 0; e4 < arguments.length; e4++)
|
|
@@ -36576,16 +36521,16 @@ void main(void){
|
|
|
36576
36521
|
};
|
|
36577
36522
|
})], e2.prototype, "initSlideConfig", null), e2;
|
|
36578
36523
|
}(Ja.a);
|
|
36579
|
-
|
|
36580
|
-
}), window.addEventListener("__slide_log__",
|
|
36581
|
-
t2.data.type === "@slide/_request_log_" &&
|
|
36524
|
+
hT == null || hT.clear().catch(function() {
|
|
36525
|
+
}), window.addEventListener("__slide_log__", uT.handleLogDownload), window.addEventListener("message", function(t2) {
|
|
36526
|
+
t2.data.type === "@slide/_request_log_" && uT.handleLogReport(t2.data.sessionId).catch(function() {
|
|
36582
36527
|
});
|
|
36583
36528
|
}), window.addEventListener("message", function(t2) {
|
|
36584
|
-
t2.data.type === "@slide/_request_frozen_" &&
|
|
36529
|
+
t2.data.type === "@slide/_request_frozen_" && uT.handleFrozenAllSlide();
|
|
36585
36530
|
}), window.addEventListener("message", function(t2) {
|
|
36586
|
-
t2.data.type === "@slide/_request_release_" &&
|
|
36531
|
+
t2.data.type === "@slide/_request_release_" && uT.handleReleaseAllSlide();
|
|
36587
36532
|
}), window.setInterval(function() {
|
|
36588
|
-
|
|
36533
|
+
uT.flushLog().catch(function() {
|
|
36589
36534
|
});
|
|
36590
36535
|
}, 2e3);
|
|
36591
36536
|
}]);
|
|
@@ -38929,7 +38874,7 @@ class SlidePreviewer {
|
|
|
38929
38874
|
}
|
|
38930
38875
|
}
|
|
38931
38876
|
const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
|
|
38932
|
-
const version = "0.2.
|
|
38877
|
+
const version = "0.2.26";
|
|
38933
38878
|
const SlideApp = {
|
|
38934
38879
|
kind: "Slide",
|
|
38935
38880
|
setup(context) {
|