if ( ((function () { 'use strict' function o(e, t) { return typeof e === t } function a(e, t) { return e instanceof t } function s(e) { return e && e.nodeType } function l(e) { return s(e) ? e : a(e, y) ? e[0] : void 0 } function e(e, i, n) { return ( y.each(e, function (e, t) { n = i.call(t, n, e, t) }), n ) } function t(e, t, i) { var n, r, o if (e === t) return !0 if (!e || !t || e.constructor !== t.constructor) return !1 for (n = 0, r = i.length; n < r; n += 1) { if (e[(o = i[n])] && E(e[o].equals) && !e[o].equals(t[o])) return !1 if (e[o] !== t[o]) return !1 } return !0 } function c(e, t, i, n) { ;(this.left = w(e)), (this.top = w(t)), (this.width = w(i)), (this.height = w(n)), (this.right = this.left + this.width), (this.bottom = this.top + this.height) } function h(e, t, i, n) { ;(this.visible = e || 0), (this.viewport = t || 0), (this.possible = i || 0), (this.rects = (n && I({}, n)) || null) } function r(e, t) { ;(this.els = e), (this.viewport = t) } function n(e, t) { return e.val - t.val } function u(e, t) { return t.val - e.val } function d(e) { var t = c.ofContent(e, !0), i = c.ofViewport(e, !0), n = t.width - i.width, r = t.height - i.height ;(this.content = t), (this.viewport = i), (this.width = n <= 0 ? null : i.left / n), (this.height = r <= 0 ? null : i.top / r), (this.left = i.left), (this.top = i.top), (this.right = t.right - i.right), (this.bottom = t.bottom - i.bottom) } function p(e) { this.el = e || window } function f(e, t) { ;(this.context = e), (this.viewport = t), this.init() } function g(e, t, i, n) { ;(this.context = new r(e, t)), (this.property = i), (this.descending = n), this.init() } function m(e) { e && e !== window && e !== document ? ((this.context = e), (this.$autoTarget = y(e))) : (this.context = window), this.init() } var i, v, y = jQuery, A = y(window), C = y(document), I = y.extend, E = y.isFunction, _ = Math.max, b = Math.min, w = Math.round, T = ((i = {}), (v = 1), function (e) { return e ? (i[e] || ((i[e] = v), (v += 1)), i[e]) : 0 }) I(c.prototype, { equals: function (e) { return t(this, e, ['left', 'top', 'width', 'height']) }, area: function () { return this.width * this.height }, relativeTo: function (e) { return new c(this.left - e.left, this.top - e.top, this.width, this.height) }, intersection: function (e) { if (!a(e, c)) return null var t = _(this.left, e.left), i = b(this.right, e.right), n = _(this.top, e.top), r = i - t, o = b(this.bottom, e.bottom) - n return 0 <= r && 0 <= o ? new c(t, n, r, o) : null }, envelope: function (e) { if (!a(e, c)) return this var t = b(this.left, e.left), i = _(this.right, e.right), n = b(this.top, e.top) return new c(t, n, i - t, _(this.bottom, e.bottom) - n) } }), I(c, { ofContent: function (e, t) { return e && e !== document && e !== window ? t ? new c(0, 0, e.scrollWidth, e.scrollHeight) : new c(e.offsetLeft - e.scrollLeft, e.offsetTop - e.scrollTop, e.scrollWidth, e.scrollHeight) : new c(0, 0, C.width(), C.height()) }, ofViewport: function (e, t) { return e && e !== document && e !== window ? t ? new c(e.scrollLeft, e.scrollTop, e.clientWidth, e.clientHeight) : new c(e.offsetLeft, e.offsetTop, e.clientWidth, e.clientHeight) : new c(A.scrollLeft(), A.scrollTop(), A.width(), A.height()) }, ofElement: function (e) { var t = y(e) if (!t.is(':visible')) return null var i = t.offset() return new c(i.left, i.top, t.outerWidth(), t.outerHeight()) } }), I(h.prototype, { equals: function (e) { return this.fracsEqual(e) && this.rectsEqual(e) }, fracsEqual: function (e) { return t(this, e, ['visible', 'viewport', 'possible']) }, rectsEqual: function (e) { return t(this.rects, e.rects, ['document', 'element', 'viewport']) } }), I(h, { of: function (e, t) { var i, n, r return ( (e = (s(e) && c.ofElement(e)) || e), (t = (s(t) && c.ofViewport(t)) || t || c.ofViewport()), e instanceof c && (i = e.intersection(t)) ? ((n = i.area()), (r = b(e.width, t.width) * b(e.height, t.height)), new h(n / e.area(), n / t.area(), n / r, { document: i, element: i.relativeTo(e), viewport: i.relativeTo(t) })) : new h() ) } }) var x = ['width', 'height', 'left', 'right', 'top', 'bottom'], S = ['possible', 'visible', 'viewport'] I(r.prototype, { sorted: function (t, e) { var i = this.viewport return y .map(this.els, function (e) { return { el: e, val: (function (e, t, i) { var n return 0 <= y.inArray(i, x) ? (n = c.ofElement(e)) : 0 <= y.inArray(i, S) && (n = h.of(e, t)), n ? n[i] : 0 })(e, i, t) } }) .sort(e ? u : n) }, best: function (e, t) { return this.els.length ? this.sorted(e, t)[0] : null } }), I(d.prototype, { equals: function (e) { return t(this, e, ['width', 'height', 'left', 'top', 'right', 'bottom', 'content', 'viewport']) } }), I(p.prototype, { equals: function (e) { return t(this, e, ['el']) }, scrollState: function () { return new d(this.el) }, scrollTo: function (e, t, i) { var n = y(this.el === window ? 'html,body' : this.el) ;(e = e || 0), (t = t || 0), (i = isNaN(i) ? 1e3 : i), n.stop(!0).animate( { scrollLeft: e, scrollTop: t }, i ) }, scroll: function (e, t, i) { var n = this.el === window ? A : y(this.el) ;(e = e || 0), (t = t || 0), this.scrollTo(n.scrollLeft() + e, n.scrollTop() + t, i) }, scrollToRect: function (e, t, i, n) { ;(t = t || 0), (i = i || 0), this.scrollTo(e.left - t, e.top - i, n) }, scrollToElement: function (e, t, i, n) { var r = c.ofElement(e).relativeTo(c.ofContent(this.el)) this.scrollToRect(r, t, i, n) } }) var M = { init: function () { ;(this.callbacks = y.Callbacks('memory unique')), (this.currVal = null), (this.prevVal = null), (this.checkProxy = y.proxy(this.check, this)), this.autoCheck() }, bind: function (e) { this.callbacks.add(e) }, unbind: function (e) { e ? this.callbacks.remove(e) : this.callbacks.empty() }, trigger: function () { this.callbacks.fireWith(this.context, [this.currVal, this.prevVal]) }, check: function (e) { var t = this.updatedValue(e) return void 0 !== t && ((this.prevVal = this.currVal), (this.currVal = t), this.trigger(), !0) }, $autoTarget: A, autoEvents: 'load resize scroll', autoCheck: function (e) { this.$autoTarget[!1 === e ? 'off' : 'on'](this.autoEvents, this.checkProxy) } } I(f.prototype, M, { updatedValue: function () { var e = h.of(this.context, this.viewport) return this.currVal && this.currVal.equals(e) ? void 0 : e } }), I(g.prototype, M, { updatedValue: function () { var e = this.context.best(this.property, this.descending) return e && ((e = 0 < e.val ? e.el : null), this.currVal !== e) ? e : void 0 } }), I(m.prototype, M, { updatedValue: function () { var e = new d(this.context) return this.currVal && this.currVal.equals(e) ? void 0 : e } }) var R, P, O, L, D, N, F, B, V, k, U = 'fracs' function H(e, t, i, n) { return (i = N(i) ? i.apply(e, t) : i), N(n[i]) ? n[i].apply(e, t) : void L.error('Method "' + i + '" does not exist on jQuery.' + R) } ;(R = U), (P = { statics: { version: '0.15.0', Rect: c, Fractions: h, Group: r, ScrollState: d, Viewport: p, FracsCallbacks: f, GroupCallbacks: g, ScrollStateCallbacks: m, fracs: function (e, t) { return h.of(e, t) } }, methods: { content: function (e) { return this.length ? c.ofContent(this[0], e) : null }, envelope: function () { return e(this, function (e) { var t = c.ofElement(this) return e ? e.envelope(t) : t }) }, fracs: function (e, i, n) { o(e, 'string') || ((n = i), (i = e), (e = null)), E(i) || ((n = i), (i = null)), (n = l(n)) var r = U + '.fracs.' + T(n) return 'unbind' === e ? this.each(function () { var e = y(this).data(r) e && e.unbind(i) }) : 'check' === e ? this.each(function () { var e = y(this).data(r) e && e.check() }) : E(i) ? this.each(function () { var e = y(this), t = e.data(r) t || ((t = new f(this, n)), e.data(r, t)), t.bind(i) }) : this.length ? h.of(this[0], n) : null }, intersection: function () { return e(this, function (e) { var t = c.ofElement(this) return e ? e.intersection(t) : t }) }, max: function (e, t, i) { return E(t) || ((i = t), (t = null)), (i = l(i)), t ? (new g(this, i, e, !0).bind(t), this) : this.pushStack(new r(this, i).best(e, !0).el) }, min: function (e, t, i) { return E(t) || ((i = t), (t = null)), (i = l(i)), t ? (new g(this, i, e).bind(t), this) : this.pushStack(new r(this, i).best(e).el) }, rect: function () { return this.length ? c.ofElement(this[0]) : null }, scrollState: function (e, i) { var n = U + '.scrollState' return ( o(e, 'string') || ((i = e), (e = null)), 'unbind' === e ? this.each(function () { var e = y(this).data(n) e && e.unbind(i) }) : 'check' === e ? this.each(function () { var e = y(this).data(n) e && e.check() }) : E(i) ? this.each(function () { var e = y(this), t = e.data(n) t || ((t = new m(this)), e.data(n, t)), t.bind(i) }) : this.length ? new d(this[0]) : null ) }, scroll: function (e, t, i) { return this.each(function () { new p(this).scroll(e, t, i) }) }, scrollTo: function (e, t, i, n) { return ( y.isNumeric(e) && ((n = i), (i = t), (t = e), (e = null)), (e = l(e)), this.each(function () { e ? new p(this).scrollToElement(e, t, i, n) : new p(this).scrollTo(t, i, n) }) ) }, scrollToThis: function (e, t, i, n) { return (n = new p(l(n))).scrollToElement(this[0], e, t, i), this }, softLink: function (t, i, n, r) { return ( (r = new p(l(r))), this.filter('a[href^=#]').each(function () { var e = y(this) e.on('click', function () { r.scrollToElement(y(e.attr('href'))[0], t, i, n) }) }) ) }, sort: function (e, t, i) { return ( o(t, 'boolean') || ((i = t), (t = null)), (i = l(i)), this.pushStack( y.map(new r(this, i).sorted(e, !t), function (e) { return e.el }) ) ) }, viewport: function (e) { return this.length ? c.ofViewport(this[0], e) : null } }, defaultStatic: 'fracs', defaultMethod: 'fracs' }), (O = [].slice), (L = jQuery), (D = L.extend), (N = L.isFunction), (F = D({}, P)), (B = function () { return H(this, O.call(arguments), F.defaultStatic, B) }), (V = function (e) { return N(V[e]) ? V[e].apply(this, O.call(arguments, 1)) : H(this, O.call(arguments), F.defaultMethod, V) }), ((k = function (e) { e && (D(B, e.statics), D(V, e.methods)), (B.modplug = k) }).prev = { statics: L[R], methods: L.fn[R] }), k(P), (L[R] = B), (L.fn[R] = V) })(), 'undefined' == typeof jQuery) ) throw new Error("Bootstrap's JavaScript requires jQuery") !(function (m) { 'use strict' function r(e, t) { ;(this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null), this.init('tooltip', e, t) } ;(r.VERSION = '3.2.0'), (r.DEFAULTS = { animation: !0, placement: 'top', selector: !1, template: '', trigger: 'hover focus', title: '', delay: 0, html: !1, container: !1, viewport: { selector: 'body', padding: 0 } }), (r.prototype.init = function (e, t, i) { ;(this.enabled = !0), (this.type = e), (this.$element = m(t)), (this.options = this.getOptions(i)), (this.$viewport = this.options.viewport && m(this.options.viewport.selector || this.options.viewport)) for (var n = this.options.trigger.split(' '), r = n.length; r--; ) { var o = n[r] if ('click' == o) this.$element.on('click.' + this.type, this.options.selector, m.proxy(this.toggle, this)) else if ('manual' != o) { var a = 'hover' == o ? 'mouseenter' : 'focusin', s = 'hover' == o ? 'mouseleave' : 'focusout' this.$element.on(a + '.' + this.type, this.options.selector, m.proxy(this.enter, this)), this.$element.on(s + '.' + this.type, this.options.selector, m.proxy(this.leave, this)) } } this.options.selector ? (this._options = m.extend({}, this.options, { trigger: 'manual', selector: '' })) : this.fixTitle() }), (r.prototype.getDefaults = function () { return r.DEFAULTS }), (r.prototype.getOptions = function (e) { return ( (e = m.extend({}, this.getDefaults(), this.$element.data(), e)).delay && 'number' == typeof e.delay && (e.delay = { show: e.delay, hide: e.delay }), e ) }), (r.prototype.getDelegateOptions = function () { var i = {}, n = this.getDefaults() return ( this._options && m.each(this._options, function (e, t) { n[e] != t && (i[e] = t) }), i ) }), (r.prototype.enter = function (e) { var t = e instanceof this.constructor ? e : m(e.currentTarget).data('bs.' + this.type) return ( t || ((t = new this.constructor(e.currentTarget, this.getDelegateOptions())), m(e.currentTarget).data('bs.' + this.type, t)), clearTimeout(t.timeout), (t.hoverState = 'in'), t.options.delay && t.options.delay.show ? void (t.timeout = setTimeout(function () {}, t.options.delay.show)) : t.show() ) }), (r.prototype.leave = function (e) { var t = e instanceof this.constructor ? e : m(e.currentTarget).data('bs.' + this.type) return ( t || ((t = new this.constructor(e.currentTarget, this.getDelegateOptions())), m(e.currentTarget).data('bs.' + this.type, t)), clearTimeout(t.timeout), (t.hoverState = 'out'), t.options.delay && t.options.delay.hide ? void (t.timeout = setTimeout(function () { 'out' == t.hoverState && t.hide() }, t.options.delay.hide)) : t.hide() ) }), (r.prototype.show = function () { var e = m.Event('show.bs.' + this.type) if (this.hasContent() && this.enabled) { this.$element.trigger(e) var t = m.contains(document.documentElement, this.$element[0]) if (e.isDefaultPrevented() || !t) return var i = this, n = this.tip(), r = this.getUID(this.type) this.setContent(), n.attr('id', r), this.$element.attr('aria-describedby', r), this.options.animation && n.addClass('fade') var o = 'function' == typeof this.options.placement ? this.options.placement.call(this, n[0], this.$element[0]) : this.options.placement, a = /\s?auto?\s?/i, s = a.test(o) s && (o = o.replace(a, '') || 'top'), n .detach() .css({ top: 0, left: 0, display: 'block' }) .addClass(o) .data('bs.' + this.type, this), this.options.container ? n.appendTo(this.options.container) : n.insertAfter(this.$element) var l = this.getPosition(), c = n[0].offsetWidth, h = n[0].offsetHeight if (s) { var u = o, d = this.$element.parent(), p = this.getPosition(d) ;(o = 'bottom' == o && l.top + l.height + h - p.scroll > p.height ? 'top' : 'top' == o && l.top - p.scroll - h < 0 ? 'bottom' : 'right' == o && l.right + c > p.width ? 'left' : 'left' == o && l.left - c < p.left ? 'right' : o), n.removeClass(u).addClass(o) } var f = this.getCalculatedOffset(o, l, c, h) this.applyPlacement(f, o) var g = function () { i.$element.trigger('shown.bs.' + i.type), (i.hoverState = null) } m.support.transition && this.$tip.hasClass('fade') ? n.one('bsTransitionEnd', g).emulateTransitionEnd(150) : g() } }), (r.prototype.applyPlacement = function (e, t) { var i = this.tip(), n = i[0].offsetWidth, r = i[0].offsetHeight, o = parseInt(i.css('margin-top'), 10), a = parseInt(i.css('margin-left'), 10) isNaN(o) && (o = 0), isNaN(a) && (a = 0), (e.top = e.top + o), (e.left = e.left + a), m.offset.setOffset( i[0], m.extend( { using: function (e) { i.css({ top: Math.round(e.top), left: Math.round(e.left) }) } }, e ), 0 ), i.addClass('in') var s = i[0].offsetWidth, l = i[0].offsetHeight 'top' == t && l != r && (e.top = e.top + r - l) var c = this.getViewportAdjustedDelta(t, e, s, l) c.left ? (e.left += c.left) : (e.top += c.top) var h = c.left ? 2 * c.left - n + s : 2 * c.top - r + l, u = c.left ? 'left' : 'top', d = c.left ? 'offsetWidth' : 'offsetHeight' i.offset(e), this.replaceArrow(h, i[0][d], u) }), (r.prototype.replaceArrow = function (e, t, i) { this.arrow().css(i, e ? 50 * (1 - e / t) + '%' : '') }), (r.prototype.setContent = function () { var e = this.tip(), t = this.getTitle() e.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](t), e.removeClass('fade in top bottom left right') }), (r.prototype.hide = function () { function e() { 'in' != t.hoverState && i.detach(), t.$element.trigger('hidden.bs.' + t.type) } var t = this, i = this.tip(), n = m.Event('hide.bs.' + this.type) if ((this.$element.removeAttr('aria-describedby'), this.$element.trigger(n), !n.isDefaultPrevented())) return i.removeClass('in'), m.support.transition && this.$tip.hasClass('fade') ? i.one('bsTransitionEnd', e).emulateTransitionEnd(150) : e(), (this.hoverState = null), this }), (r.prototype.fixTitle = function () { var e = this.$element ;(!e.attr('title') && 'string' == typeof e.attr('data-original-title')) || e.attr('data-original-title', e.attr('title') || '').attr('title', '') }), (r.prototype.hasContent = function () { return this.getTitle() }), (r.prototype.getPosition = function (e) { var t = (e = e || this.$element)[0], i = 'BODY' == t.tagName return m.extend( {}, 'function' == typeof t.getBoundingClientRect ? t.getBoundingClientRect() : null, { scroll: i ? document.documentElement.scrollTop || document.body.scrollTop : e.scrollTop(), width: i ? m(window).width() : e.outerWidth(), height: i ? m(window).height() : e.outerHeight() }, i ? { top: 0, left: 0 } : e.offset() ) }), (r.prototype.getCalculatedOffset = function (e, t, i, n) { return 'bottom' == e ? { top: t.top + t.height, left: t.left + t.width / 2 - i / 2 } : 'top' == e ? { top: t.top - n, left: t.left + t.width / 2 - i / 2 } : 'left' == e ? { top: t.top + t.height / 2 - n / 2, left: t.left - i } : { top: t.top + t.height / 2 - n / 2, left: t.left + t.width } }), (r.prototype.getViewportAdjustedDelta = function (e, t, i, n) { var r = { top: 0, left: 0 } if (!this.$viewport) return r var o = (this.options.viewport && this.options.viewport.padding) || 0, a = this.getPosition(this.$viewport) if (/right|left/.test(e)) { var s = t.top - o - a.scroll, l = t.top + o - a.scroll + n s < a.top ? (r.top = a.top - s) : l > a.top + a.height && (r.top = a.top + a.height - l) } else { var c = t.left - o, h = t.left + o + i c < a.left ? (r.left = a.left - c) : h > a.width && (r.left = a.left + a.width - h) } return r }), (r.prototype.getTitle = function () { var e = this.$element, t = this.options return e.attr('data-original-title') || ('function' == typeof t.title ? t.title.call(e[0]) : t.title) }), (r.prototype.getUID = function (e) { for (; (e += ~~(1e6 * Math.random())), document.getElementById(e); ); return e }), (r.prototype.tip = function () { return (this.$tip = this.$tip || m(this.options.template)) }), (r.prototype.arrow = function () { return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) }), (r.prototype.validate = function () { this.$element[0].parentNode || (this.hide(), (this.$element = null), (this.options = null)) }), (r.prototype.enable = function () { this.enabled = !0 }), (r.prototype.disable = function () { this.enabled = !1 }), (r.prototype.toggleEnabled = function () { this.enabled = !this.enabled }), (r.prototype.toggle = function (e) { var t = this e && ((t = m(e.currentTarget).data('bs.' + this.type)) || ((t = new this.constructor(e.currentTarget, this.getDelegateOptions())), m(e.currentTarget).data('bs.' + this.type, t))), t.tip().hasClass('in') ? t.leave(t) : t.enter(t) }), (r.prototype.destroy = function () { clearTimeout(this.timeout), this.hide() .$element.off('.' + this.type) .removeData('bs.' + this.type) }) var e = m.fn.tooltip ;(m.fn.tooltip = function (n) { return this.each(function () { var e = m(this), t = e.data('bs.tooltip'), i = 'object' == typeof n && n ;(!t && 'destroy' == n) || (t || e.data('bs.tooltip', (t = new r(this, i))), 'string' == typeof n && t[n]()) }) }), (m.fn.tooltip.Constructor = r), (m.fn.tooltip.noConflict = function () { return (m.fn.tooltip = e), this }) })(jQuery), (function (e, t, i) { 'undefined' != typeof module && module.exports ? (module.exports = i()) : 'function' == typeof define && define.amd ? define(i) : (t.Keen = i()) })(0, this, function () { 'use strict' function Keen() { return _init.apply(this, arguments) } function _init(e) { if (_isUndefined(e)) throw new Error('Check out our JavaScript SDK Usage Guide: https://keen.io/docs/clients/javascript/usage-guide/') if (_isUndefined(e.projectId) || 'String' !== _type(e.projectId) || e.projectId.length < 1) throw new Error('Please provide a projectId') this.configure(e) } function _extend(e) { for (var t = 1; t < arguments.length; t++) for (var i in arguments[t]) e[i] = arguments[t][i] return e } function _isUndefined(e) { return void 0 === e } function _type(e) { var t = e && e.constructor ? e.constructor.toString() : void 0 return t ? t.match(/function (.*)\(/)[1] : 'Null' } function _each(e, t, i) { var n if (!e) return 0 if (((i = i || e), 'array' === _type(e))) { for (n = 0; n < e.length; n++) if (!1 === t.call(i, e[n], n, e)) return 0 } else for (n in e) if (e.hasOwnProperty(n) && !1 === t.call(i, e[n], n, e)) return 0 return 1 } function _parse_params(e) { for ( var t, i = {}, n = /\+/g, r = /([^&=]+)=?([^&]*)/g, o = function (e) { return decodeURIComponent(e.replace(n, ' ')) }, a = e.split('?')[1]; (t = r.exec(a)); ) i[o(t[1])] = o(t[2]) return i } function _set_protocol(e) { switch (e) { case 'http': return 'http' case 'auto': return location.protocol.replace(/:/g, '') case 'https': case void 0: default: return 'https' } } function _set_request_type(e) { var t = e || 'jsonp', i = !1 return ('Object' === _type(XMLHttpRequest) || 'Function' === _type(XMLHttpRequest)) && 'withCredentials' in new XMLHttpRequest() && (i = !0), null == t || 'xhr' == t ? (i ? 'xhr' : 'jsonp') : t } function _build_url(e) { return this.client.endpoint + '/projects/' + this.client.projectId + e } function _uploadEvent(e, t, i, n, r) { var o = _build_url.apply(this, ['/events/' + e]), a = {} for (var s in ((i = !1 !== i), this.client.globalProperties && (a = this.client.globalProperties(e)), t)) t.hasOwnProperty(s) && (a[s] = t[s]) switch (this.client.requestType) { case 'xhr': _request.xhr.apply(this, ['POST', o, null, a, this.client.writeKey, i, n, r]) break case 'jsonp': var l = JSON.stringify(a), c = Keen.Base64.encode(l) ;(o = (o = (o = o + '?api_key=' + this.client.writeKey) + '&data=' + c) + '&modified=' + new Date().getTime()), _request.jsonp.apply(this, [o, this.client.writeKey, n, r]) break case 'beacon': ;(l = JSON.stringify(a)), (c = Keen.Base64.encode(l)) ;(o = (o = (o = o + '?api_key=' + encodeURIComponent(this.client.writeKey)) + '&data=' + encodeURIComponent(c)) + '&modified=' + encodeURIComponent(new Date().getTime())), (o += '&c=clv1'), _request.beacon.apply(this, [o, null, n, r]) } } Keen.prototype.configure = function (e) { return ( (e.host = _isUndefined(e.host) ? 'api.keen.io/3.0' : e.host.replace(/.*?:\/\//g, '')), (e.protocol = _set_protocol(e.protocol)), (e.requestType = _set_request_type(e.requestType)), (this.client = { projectId: e.projectId, writeKey: e.writeKey, readKey: e.readKey, globalProperties: null, endpoint: e.protocol + '://' + e.host, requestType: e.requestType }), Keen.trigger('client', this, e), this.trigger('ready'), this ) } var _request = { xhr: function (e, t, i, n, r, o, a, s) { if (!r) return Keen.log('Please provide a writeKey for https://keen.io/project/' + this.client.projectId) var l = new XMLHttpRequest() if ( ((l.onreadystatechange = function () { if (4 == l.readyState) if (200 <= l.status && l.status < 300) { var e try { e = JSON.parse(l.responseText) } catch (e) { Keen.log('Could not JSON parse HTTP response: ' + l.responseText), s && s(l, e) } a && e && a(e) } else Keen.log('HTTP request failed.'), s && s(l, null) }), l.open(e, t, o), r && l.setRequestHeader('Authorization', r), n && l.setRequestHeader('Content-Type', 'application/json'), i) ) for (var c in i) i.hasOwnProperty(c) && l.setRequestHeader(c, i[c]) var h = n ? JSON.stringify(n) : null l.send(h) }, jsonp: function (e, t, i, n) { if (!t) return Keen.log('Please provide a writeKey for https://keen.io/project/' + this.client.projectId) if (t && e.indexOf('api_key') < 0) { var r = 0 < e.indexOf('?') ? '&' : '?' e = e + r + 'api_key=' + t } for (var o = 'keenJSONPCallback' + new Date().getTime(); o in window; ) o += 'a' var a = !1 ;(window[o] = function (e) { ;(a = !0), i && e && i(e), (window[o] = void 0) }), (e = e + '&jsonp=' + o) var s = document.createElement('script') ;(s.id = 'keen-jsonp'), (s.src = e), document.getElementsByTagName('head')[0].appendChild(s), (s.onreadystatechange = function () { !1 === a && 'loaded' === this.readyState && ((a = !0), n && n()) }), (s.onerror = function () { !1 === a && ((a = !0), n && n()) }) }, beacon: function (e, t, i, n) { if (t && e.indexOf('api_key') < 0) { var r = 0 < e.indexOf('?') ? '&' : '?' e = e + r + 'api_key=' + t } var o = document.createElement('img') ;(o.onload = function () { if ((!0, 'naturalHeight' in this)) { if (this.naturalHeight + this.naturalWidth === 0) return void this.onerror() } else if (this.width + this.height === 0) return void this.onerror() i && i({ created: !0 }) }), (o.onerror = function () { !0, n && n() }), (o.src = e) } }, Events = (Keen.Events = { on: function (e, t) { return ( this.listeners || (this.listeners = {}), (this.listeners[e] || (this.listeners[e] = [])).push({ callback: t }), this ) }, off: function (e, t) { if (!e && !t) return (this.listeners = void 0), delete this.listeners, this for (var i = this.listeners[e] || [], n = i.length; n--; ) t && t == i[n].callback && this.listeners[e].splice(n, 1), (t && 0 != i.length) || ((this.listeners[e] = void 0), delete this.listeners[e]) return this }, trigger: function (e) { if (!this.listeners) return this for (var t = Array.prototype.slice.call(arguments, 1), i = this.listeners[e] || [], n = 0; n < i.length; n++) i[n].callback.apply(this, t) return this } }) _extend(Keen.prototype, Events), _extend(Keen, Events), (Keen.loaded = !0), (Keen.utils = { each: _each, extend: _extend, parseParams: _parse_params }), (Keen.ready = function (e) { Keen.loaded ? e() : Keen.on('ready', e) }), (Keen.log = function (e) { 'object' == typeof console && console.log('[Keen IO]', e) }) var Plugins = (Keen.Plugins = {}), Hh, Ih ;(Keen.prototype.addEvent = function () { _uploadEvent.apply(this, arguments) }), (Keen.prototype.addEventSync = function (e, t, i, n) { _uploadEvent.apply(this, [e, t, !1, i, n]) }), (Keen.prototype.trackExternalLink = function (e, t, i, n, r) { var o = e, a = o.metaKey, s = o.target, l = !1, c = function () {} return ( void 0 === n && (n = 500), 'A' === s.nodeName ? (c = function () { a || l || ((l = !0), (window.location = s.href)) }) : 'FORM' === s.nodeName && (c = function () { l || ((l = !0), s.submit()) }), r && (c = function () { l || ((l = !0), r()) }), _uploadEvent.call(this, t, i, c, c), setTimeout(function () { c() }, n), !!a && void 0 ) }), (Keen.prototype.setGlobalProperties = function (e) { if (!this.client) return Keen.log('Check out our JavaScript SDK Usage Guide: https://keen.io/docs/clients/javascript/usage-guide/') if (!e || 'function' != typeof e) throw new Error('Invalid value for global properties: ' + e) this.client.globalProperties = e }), (Keen.Base64 = { map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', encode: function (e) { var t, i, n, r, o, a, s, l = '', c = 0, h = this.map for (e = this.utf8.encode(e); c < e.length; ) (t = e.charCodeAt(c++)), (i = e.charCodeAt(c++)), (n = e.charCodeAt(c++)), (r = t >> 2), (o = ((3 & t) << 4) | (i >> 4)), (a = isNaN(i) ? 64 : ((15 & i) << 2) | (n >> 6)), (s = isNaN(i) || isNaN(n) ? 64 : 63 & n), (l = l + h.charAt(r) + h.charAt(o) + h.charAt(a) + h.charAt(s)) return l }, decode: function (e) { var t, i, n, r, o, a, s = '', l = 0, c = this.map, h = String.fromCharCode for (e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ''); l < e.length; ) (t = c.indexOf(e.charAt(l++))), (o = ((15 & (i = c.indexOf(e.charAt(l++)))) << 4) | ((n = c.indexOf(e.charAt(l++))) >> 2)), (a = ((3 & n) << 6) | (r = c.indexOf(e.charAt(l++)))), (s = s + (h((t << 2) | (i >> 4)) + (64 != n ? h(o) : '')) + (64 != r ? h(a) : '')) return this.utf8.decode(s) }, utf8: { encode: function (e) { for (var t, i = '', n = 0, r = String.fromCharCode; n < e.length; ) i += (t = e.charCodeAt(n++)) < 128 ? r(t) : 127 < t && t < 2048 ? r((t >> 6) | 192) + r((63 & t) | 128) : r((t >> 12) | 224) + r(((t >> 6) & 63) | 128) + r((63 & t) | 128) return i }, decode: function (e) { for (var t, i = '', n = 0, r = String.fromCharCode; n < e.length; ) i += (t = e.charCodeAt(n)) < 128 ? [r(t), n++][0] : 191 < t && t < 224 ? [r(((31 & t) << 6) | (63 & e.charCodeAt(n + 1))), (n += 2)][0] : [r(((15 & t) << 12) | ((63 & e.charCodeAt(n + 1)) << 6) | (63 & (c3 = e.charCodeAt(n + 2)))), (n += 3)][0] return i } } }), 'object' != typeof JSON && (JSON = {}), (function () { function f(e) { return e < 10 ? '0' + e : e } function quote(e) { return ( (escapable.lastIndex = 0), escapable.test(e) ? '"' + e.replace(escapable, function (e) { var t = meta[e] return 'string' == typeof t ? t : '\\u' + ('0000' + e.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + e + '"' ) } function str(e, t) { var i, n, r, o, a, s = gap, l = t[e] switch ((l && 'object' == typeof l && 'function' == typeof l.toJSON && (l = l.toJSON(e)), 'function' == typeof rep && (l = rep.call(t, e, l)), typeof l)) { case 'string': return quote(l) case 'number': return isFinite(l) ? String(l) : 'null' case 'boolean': case 'null': return String(l) case 'object': if (!l) return 'null' if (((gap += indent), (a = []), '[object Array]' === Object.prototype.toString.apply(l))) { for (o = l.length, i = 0; i < o; i += 1) a[i] = str(i, l) || 'null' return (r = 0 === a.length ? '[]' : gap ? '[\n' + gap + a.join(',\n' + gap) + '\n' + s + ']' : '[' + a.join(',') + ']'), (gap = s), r } if (rep && 'object' == typeof rep) for (o = rep.length, i = 0; i < o; i += 1) 'string' == typeof rep[i] && (r = str((n = rep[i]), l)) && a.push(quote(n) + (gap ? ': ' : ':') + r) else for (n in l) Object.prototype.hasOwnProperty.call(l, n) && (r = str(n, l)) && a.push(quote(n) + (gap ? ': ' : ':') + r) return (r = 0 === a.length ? '{}' : gap ? '{\n' + gap + a.join(',\n' + gap) + '\n' + s + '}' : '{' + a.join(',') + '}'), (gap = s), r } } 'function' != typeof Date.prototype.toJSON && ((Date.prototype.toJSON = function () { return isFinite(this.valueOf()) ? this.getUTCFullYear() + '-' + f(this.getUTCMonth() + 1) + '-' + f(this.getUTCDate()) + 'T' + f(this.getUTCHours()) + ':' + f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z' : null }), (String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function () { return this.valueOf() })) var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"': '\\"', '\\': '\\\\' }, rep 'function' != typeof JSON.stringify && (JSON.stringify = function (e, t, i) { var n if (((indent = gap = ''), 'number' == typeof i)) for (n = 0; n < i; n += 1) indent += ' ' else 'string' == typeof i && (indent = i) if ((rep = t) && 'function' != typeof t && ('object' != typeof t || 'number' != typeof t.length)) throw new Error('JSON.stringify') return str('', { '': e }) }), 'function' != typeof JSON.parse && (JSON.parse = function (text, reviver) { function walk(e, t) { var i, n, r = e[t] if (r && 'object' == typeof r) for (i in r) Object.prototype.hasOwnProperty.call(r, i) && (void 0 !== (n = walk(r, i)) ? (r[i] = n) : delete r[i]) return reviver.call(e, t, r) } var j if ( ((text = String(text)), (cx.lastIndex = 0), cx.test(text) && (text = text.replace(cx, function (e) { return '\\u' + ('0000' + e.charCodeAt(0).toString(16)).slice(-4) })), /^[\],:{}\s]*$/.test( text .replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') .replace(/(?:^|:|,)(?:\s*\[)+/g, '') )) ) return ( (j = eval('(' + text + ')')), 'function' == typeof reviver ? walk( { '': j }, '' ) : j ) throw new SyntaxError('JSON.parse') }) })(), (Hh = Keen.utils), (Ih = function (i) { function e(e) { for (u = 1; (e = n.shift()); ) e() } var t, n = [], r = document, o = r.documentElement, a = o.doScroll, s = 'DOMContentLoaded', l = 'addEventListener', c = 'onreadystatechange', h = 'readyState', u = (a ? /^loaded|^c/ : /^loaded|c/).test(r[h]) return ( r[l] && r[l]( s, (t = function () { r.removeEventListener(s, t, !1), e() }), !1 ), a && r.attachEvent( c, (t = function () { ;/^c/.test(r[h]) && (r.detachEvent(c, t), e()) }) ), (i = a ? function (t) { self != top ? u ? t() : n.push(t) : (function () { try { o.doScroll('left') } catch (e) { return setTimeout(function () { i(t) }, 50) } t() })() } : function (e) { u ? e() : n.push(e) }) ) }), 'undefined' != typeof module && module.exports ? (module.exports = Ih()) : 'function' == typeof define && define.amd ? define(Ih) : (Hh.domready = Ih()) var loaded = window.Keen, cached = window._Keen || {}, clients, ready if (loaded && cached) { for (var instance in ((clients = cached.clients || {}), (ready = cached.ready || []), clients)) if (clients.hasOwnProperty(instance)) { var client = clients[instance] for (var method in Keen.prototype) Keen.prototype.hasOwnProperty(method) && (loaded.prototype[method] = Keen.prototype[method]) if ( ((loaded.Query = Keen.Query ? Keen.Query : function () {}), (loaded.Visualization = Keen.Visualization ? Keen.Visualization : function () {}), client._config && (client.configure.call(client, client._config), delete client._config), client._setGlobalProperties) ) { for (var globals = client._setGlobalProperties, i = 0; i < globals.length; i++) client.setGlobalProperties.apply(client, globals[i]) delete client._setGlobalProperties } if (client._addEvent) { for (var queue = client._addEvent || [], i = 0; i < queue.length; i++) client.addEvent.apply(client, queue[i]) delete client._addEvent } var callback = client._on || [] if (client._on) { for (var i = 0; i < callback.length; i++) client.on.apply(client, callback[i]) client.trigger('ready'), delete client._on } } for (var i = 0; i < ready.length; i++) { var callback = ready[i] Keen.on('ready', function () { callback() }) } } return ( Keen.loaded && setTimeout(function () { Keen.utils.domready(function () { Keen.trigger('ready') }) }, 0), Keen ) }), (function () { var i = (window.analytics = window.analytics || []) if (!i.initialize) { if (i.invoked) return window.console && console.error && console.error('Segment snippet included twice.') ;(i.invoked = !0), (i.methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'pageview', 'identify', 'reset', 'group', 'track', 'ready', 'alias', 'debug', 'page', 'once', 'off', 'on']), (i.factory = function (t) { return function () { var e = Array.prototype.slice.call(arguments) return e.unshift(t), i.push(e), i } }) for (var e = 0; e < i.methods.length; e++) { var t = i.methods[e] i[t] = i.factory(t) } ;(i.load = function (e) { var t = document.createElement('script') ;(t.type = 'text/javascript'), (t.async = !0), (t.src = ('https:' === document.location.protocol ? 'https://' : 'http://') + 'cdn.segment.com/analytics.js/v1/' + e + '/analytics.min.js') var i = document.getElementsByTagName('script')[0] i.parentNode.insertBefore(t, i) }), (i.SNIPPET_VERSION = '4.0.0') } })(), (function (i, u) { 'use strict' var d = 'function', p = 'undefined', f = 'object', e = 'major', t = 'model', n = 'name', r = 'type', o = 'vendor', a = 'version', s = 'architecture', l = 'console', c = 'mobile', h = 'tablet', g = { has: function (e, t) { return -1 !== t.toLowerCase().indexOf(e.toLowerCase()) }, lowerize: function (e) { return e.toLowerCase() } }, m = { rgx: function () { for (var e, t, i, n, r, o, a, s = 0, l = arguments; s < l.length; s += 2) { var c = l[s], h = l[s + 1] if (typeof e == p) for (n in ((e = {}), h)) typeof (r = h[n]) == f ? (e[r[0]] = u) : (e[r] = u) for (t = i = 0; t < c.length; t++) if ((o = c[t].exec(this.getUA()))) { for (n = 0; n < h.length; n++) (a = o[++i]), typeof (r = h[n]) == f && 0 < r.length ? 2 == r.length ? typeof r[1] == d ? (e[r[0]] = r[1].call(this, a)) : (e[r[0]] = r[1]) : 3 == r.length ? typeof r[1] != d || (r[1].exec && r[1].test) ? (e[r[0]] = a ? a.replace(r[1], r[2]) : u) : (e[r[0]] = a ? r[1].call(this, a, r[2]) : u) : 4 == r.length && (e[r[0]] = a ? r[3].call(this, a.replace(r[1], r[2])) : u) : (e[r] = a || u) break } if (o) break } return e }, str: function (e, t) { for (var i in t) if (typeof t[i] == f && 0 < t[i].length) { for (var n = 0; n < t[i].length; n++) if (g.has(t[i][n], e)) return '?' === i ? u : i } else if (g.has(t[i], e)) return '?' === i ? u : i return e } }, v = { browser: { oldsafari: { major: { 1: ['/8', '/1', '/3'], 2: '/4', '?': '/' }, version: { '1.0': '/8', 1.2: '/1', 1.3: '/3', '2.0': '/412', '2.0.2': '/416', '2.0.3': '/417', '2.0.4': '/419', '?': '/' } } }, device: { sprint: { model: { 'Evo Shift 4G': '7373KT' }, vendor: { HTC: 'APA', Sprint: 'Sprint' } } }, os: { windows: { version: { ME: '4.90', 'NT 3.11': 'NT3.51', 'NT 4.0': 'NT4.0', 2e3: 'NT 5.0', XP: ['NT 5.1', 'NT 5.2'], Vista: 'NT 6.0', 7: 'NT 6.1', 8: 'NT 6.2', 8.1: 'NT 6.3', RT: 'ARM' } } } }, y = { browser: [ [/(opera\smini)\/((\d+)?[\w\.-]+)/i, /(opera\s[mobiletab]+).+version\/((\d+)?[\w\.-]+)/i, /(opera).+version\/((\d+)?[\w\.]+)/i, /(opera)[\/\s]+((\d+)?[\w\.]+)/i], [n, a, e], [/\s(opr)\/((\d+)?[\w\.]+)/i], [[n, 'Opera'], a, e], [ /(kindle)\/((\d+)?[\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)*/i, /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?((\d+)?[\w\.]*)/i, /(?:ms|\()(ie)\s((\d+)?[\w\.]+)/i, /(rekonq)((?:\/)[\w\.]+)*/i, /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron)\/((\d+)?[\w\.-]+)/i ], [n, a, e], [/(trident).+rv[:\s]((\d+)?[\w\.]+).+like\sgecko/i], [[n, 'IE'], a, e], [/(yabrowser)\/((\d+)?[\w\.]+)/i], [[n, 'Yandex'], a, e], [/(comodo_dragon)\/((\d+)?[\w\.]+)/i], [[n, /_/g, ' '], a, e], [/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?((\d+)?[\w\.]+)/i], [n, a, e], [/(dolfin)\/((\d+)?[\w\.]+)/i], [[n, 'Dolphin'], a, e], [/((?:android.+)crmo|crios)\/((\d+)?[\w\.]+)/i], [[n, 'Chrome'], a, e], [/version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i], [a, e, [n, 'Mobile Safari']], [/version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i], [a, e, n], [/webkit.+?(mobile\s?safari|safari)((\/[\w\.]+))/i], [n, [e, m.str, v.browser.oldsafari.major], [a, m.str, v.browser.oldsafari.version]], [/(konqueror)\/((\d+)?[\w\.]+)/i, /(webkit|khtml)\/((\d+)?[\w\.]+)/i], [n, a, e], [/(navigator|netscape)\/((\d+)?[\w\.-]+)/i], [[n, 'Netscape'], a, e], [ /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?((\d+)?[\w\.\+]+)/i, /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.-]+)/i, /(mozilla)\/((\d+)?[\w\.]+).+rv\:.+gecko\/\d+/i, /(uc\s?browser|polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|qqbrowser)[\/\s]?((\d+)?[\w\.]+)/i, /(links)\s\(((\d+)?[\w\.]+)/i, /(gobrowser)\/?((\d+)?[\w\.]+)*/i, /(ice\s?browser)\/v?((\d+)?[\w\._]+)/i, /(mosaic)[\/\s]((\d+)?[\w\.]+)/i ], [n, a, e], [/(apple(?:coremedia|))\/((\d+)[\w\._]+)/i, /(coremedia) v((\d+)[\w\._]+)/i], [n, a, e], [/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i], [n, a], [/(ares|ossproxy)\s((\d+)[\w\.-]+)/i], [n, a, e], [ /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/((\d+)[\w\.-]+)/i, /(clementine|music player daemon)\s((\d+)[\w\.-]+)/i, /(lg player|nexplayer)\s((\d+)[\d\.]+)/i, /player\/(nexplayer|lg player)\s((\d+)[\w\.-]+)/i ], [n, a, e], [/(nexplayer)\s((\d+)[\w\.-]+)/i], [n, a, e], [/(flrp)\/((\d+)[\w\.-]+)/i], [[n, 'Flip Player'], a, e], [/(fstream|nativehost|queryseekspider|ia-archiver|facebookexternalhit)/i], [n], [/(gstreamer) souphttpsrc (?:\([^\)]+\)){0,1} libsoup\/((\d+)[\w\.-]+)/i], [n, a, e], [/(htc streaming player)\s[\w_]+\s\/\s((\d+)[\d\.]+)/i, /(java|python-urllib|python-requests|wget|libcurl)\/((\d+)[\w\.-_]+)/i, /(lavf)((\d+)[\d\.]+)/i], [n, a, e], [/(htc_one_s)\/((\d+)[\d\.]+)/i], [[n, /_/g, ' '], a, e], [/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+){0,1})/i], [n, a], [/(mplayer)(?:\s|\/)((\d+)[\w\.-]+)/i, /(mplayer) unknown-((\d+)[\w\.\-]+)/i], [n, a, e], [/(mplayer)/i, /(yourmuze)/i, /(media player classic|nero showtime)/i], [n], [/(nero (?:home|scout))\/((\d+)[\w\.-]+)/i], [n, a, e], [/(nokia\d+)\/((\d+)[\w\.-]+)/i], [n, a, e], [/\s(songbird)\/((\d+)[\w\.-]+)/i], [n, a, e], [/(winamp)3 version ((\d+)[\w\.-]+)/i, /(winamp)\s((\d+)[\w\.-]+)/i, /(winamp)mpeg\/((\d+)[\w\.-]+)/i], [n, a, e], [/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i], [n], [/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/((\d+)[\w\.-]+)/i], [n, a, e], [/(smp)((\d+)[\d\.]+)/i], [n, a, e], [/(vlc) media player - version ((\d+)[\w\.]+)/i, /(vlc)\/((\d+)[\w\.-]+)/i, /(xbmc|gvfs|xine|xmms|irapp)\/((\d+)[\w\.-]+)/i, /(foobar2000)\/((\d+)[\d\.]+)/i, /(itunes)\/((\d+)[\d\.]+)/i], [n, a, e], [/(wmplayer)\/((\d+)[\w\.-]+)/i, /(windows-media-player)\/((\d+)[\w\.-]+)/i], [[n, /-/g, ' '], a, e], [/windows\/((\d+)[\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i], [a, e, [n, 'Windows']], [/(com\.riseupradioalarm)\/((\d+)[\d\.]*)/i], [n, a, e], [/(rad.io)\s((\d+)[\d\.]+)/i, /(radio.(?:de|at|fr))\s((\d+)[\d\.]+)/i], [[n, 'rad.io'], a, e] ], cpu: [ [/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i], [[s, 'amd64']], [/(ia32(?=;))/i], [[s, g.lowerize]], [/((?:i[346]|x)86)[;\)]/i], [[s, 'ia32']], [/windows\s(ce|mobile);\sppc;/i], [[s, 'arm']], [/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i], [[s, /ower/, '', g.lowerize]], [/(sun4\w)[;\)]/i], [[s, 'sparc']], [/(ia64(?=;)|68k(?=\))|arm(?=v\d+;)|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i], [s, g.lowerize] ], device: [ [/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i], [t, o, [r, h]], [/applecoremedia\/[\w\.]+ \((ipad)/], [t, [o, 'Apple'], [r, h]], [/(apple\s{0,1}tv)/i], [ [t, 'Apple TV'], [o, 'Apple'] ], [/(hp).+(touchpad)/i, /(kindle)\/([\w\.]+)/i, /\s(nook)[\w\s]+build\/(\w+)/i, /(dell)\s(strea[kpr\s\d]*[\dko])/i], [o, t, [r, h]], [/\((ip[honed|\s\w*]+);.+(apple)/i], [t, o, [r, c]], [/\((ip[honed|\s\w*]+);/i], [t, [o, 'Apple'], [r, c]], [/(blackberry)[\s-]?(\w+)/i, /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola)[\s_-]?([\w-]+)*/i, /(hp)\s([\w\s]+\w)/i, /(asus)-?(\w+)/i], [o, t, [r, c]], [/\((bb10);\s(\w+)/i], [[o, 'BlackBerry'], t, [r, c]], [/android.+((transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+))/i], [[o, 'Asus'], t, [r, h]], [/(sony)\s(tablet\s[ps])/i], [o, t, [r, h]], [/(nintendo)\s([wids3u]+)/i], [o, t, [r, l]], [/((playstation)\s[3portablevi]+)/i], [[o, 'Sony'], t, [r, l]], [/(sprint\s(\w+))/i], [ [o, m.str, v.device.sprint.vendor], [t, m.str, v.device.sprint.model], [r, c] ], [/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i, /(zte)-(\w+)*/i, /(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i], [o, [t, /_/g, ' '], [r, c]], [/\s((milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?))[\w\s]+build\//i, /(mot)[\s-]?(\w+)*/i], [[o, 'Motorola'], t, [r, c]], [/android.+\s((mz60\d|xoom[\s2]{0,2}))\sbuild\//i], [[o, 'Motorola'], t, [r, h]], [/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9))/i], [[o, 'Samsung'], t, [r, h]], [/((s[cgp]h-\w+|gt-\w+|galaxy\snexus))/i, /(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i, /sec-((sgh\w+))/i], [[o, 'Samsung'], t, [r, c]], [/(sie)-(\w+)*/i], [[o, 'Siemens'], t, [r, c]], [/(maemo|nokia).*(n900|lumia\s\d+)/i, /(nokia)[\s_-]?([\w-]+)*/i], [[o, 'Nokia'], t, [r, c]], [/android\s3\.[\s\w-;]{10}((a\d{3}))/i], [[o, 'Acer'], t, [r, h]], [/android\s3\.[\s\w-;]{10}(lg?)-([06cv9]{3,4})/i], [[o, 'LG'], t, [r, h]], [/((nexus\s[45]))/i, /(lg)[e;\s-\/]+(\w+)*/i], [[o, 'LG'], t, [r, c]], [/android.+((ideatab[a-z0-9\-\s]+))/i], [[o, 'Lenovo'], t, [r, h]], [/(lg) netcast\.tv/i], [o, [r, 'smarttv']], [/(mobile|tablet);.+rv\:.+gecko\//i], [r, o, t] ], engine: [ [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i, /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, /(icab)[\/\s]([23]\.[\d\.]+)/i], [n, a], [/rv\:([\w\.]+).*(gecko)/i], [a, n] ], os: [ [/microsoft\s(windows)\s(vista|xp)/i], [n, a], [/(windows)\snt\s6\.2;\s(arm)/i, /(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i], [n, [a, m.str, v.os.windows.version]], [/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i], [ [n, 'Windows'], [a, m.str, v.os.windows.version] ], [/\((bb)(10);/i], [[n, 'BlackBerry'], a], [/(blackberry)\w*\/?([\w\.]+)*/i, /(tizen)\/([\w\.]+)/i, /(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego)[\/\s-]?([\w\.]+)*/i], [n, a], [/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i], [[n, 'Symbian'], a], [/mozilla.+\(mobile;.+gecko.+firefox/i], [[n, 'Firefox OS'], a], [ /(nintendo|playstation)\s([wids3portablevu]+)/i, /(mint)[\/\s\(]?(\w+)*/i, /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)[\/\s-]?([\w\.-]+)*/i, /(hurd|linux)\s?([\w\.]+)*/i, /(gnu)\s?([\w\.]+)*/i ], [n, a], [/(cros)\s[\w]+\s([\w\.]+\w)/i], [[n, 'Chromium OS'], a], [/(sunos)\s?([\w\.]+\d)*/i], [[n, 'Solaris'], a], [/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i], [n, a], [/(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i], [ [n, 'iOS'], [a, /_/g, '.'] ], [/(mac\sos\sx)\s?([\w\s\.]+\w)*/i], [n, [a, /_/g, '.']], [/(haiku)\s(\w+)/i, /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, /(macintosh|mac(?=_powerpc)|plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos)/i, /(unix)\s?([\w\.]+)*/i], [n, a] ] }, A = function (e) { var t = e || (i && i.navigator && i.navigator.userAgent ? i.navigator.userAgent : '') return this instanceof A ? ((this.getBrowser = function () { return m.rgx.apply(this, y.browser) }), (this.getCPU = function () { return m.rgx.apply(this, y.cpu) }), (this.getDevice = function () { return m.rgx.apply(this, y.device) }), (this.getEngine = function () { return m.rgx.apply(this, y.engine) }), (this.getOS = function () { return m.rgx.apply(this, y.os) }), (this.getResult = function () { return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() } }), (this.getUA = function () { return t }), (this.setUA = function (e) { return (t = e), this }), void this.setUA(t)) : new A(e).getResult() } if (typeof exports != p) typeof module != p && module.exports && (exports = module.exports = A), (exports.UAParser = A) else if ( ((i.UAParser = A), typeof define == d && define.amd && define(function () { return A }), typeof i.jQuery != p) ) { var C = i.jQuery, I = new A() ;(C.ua = I.getResult()), (C.ua.get = function () { return I.getUA() }), (C.ua.set = function (e) { I.setUA(e) var t = I.getResult() for (var i in t) C.ua[i] = t[i] }) } })(this), (window.Modernizr = (function (e, t) { function i(e, t) { return typeof e === t } var n, r, o, a = {}, s = t.documentElement, l = t.createElement('modernizr'), c = l.style, h = {}, u = [], d = u.slice, p = {}.hasOwnProperty for (var f in ((r = i(p, 'undefined') || i(p.call, 'undefined') ? function (e, t) { return t in e && i(e.constructor.prototype[t], 'undefined') } : function (e, t) { return p.call(e, t) }), Function.prototype.bind || (Function.prototype.bind = function (n) { var r = this if ('function' != typeof r) throw new TypeError() var o = d.call(arguments, 1), a = function () { if (this instanceof a) { function e() {} e.prototype = r.prototype var t = new e(), i = r.apply(t, o.concat(d.call(arguments))) return Object(i) === i ? i : t } return r.apply(n, o.concat(d.call(arguments))) } return a }), (h.webgl = function () { return !!e.WebGLRenderingContext }), h)) r(h, f) && ((n = f.toLowerCase()), (a[n] = h[f]()), u.push((a[n] ? '' : 'no-') + n)) return ( (a.addTest = function (e, t) { if ('object' == typeof e) for (var i in e) r(e, i) && a.addTest(i, e[i]) else { if (((e = e.toLowerCase()), void 0 !== a[e])) return a ;(t = 'function' == typeof t ? t() : t), 'undefined' != typeof enableClasses && enableClasses && (s.className += ' ' + (t ? '' : 'no-') + e), (a[e] = t) } return a }), (o = ''), (c.cssText = o), (l = null), (a._version = '2.8.2'), a ) })(this, this.document)), (function (xe, e, Se) { 'use strict' function Me(s, e, n) { function a(e) { var t = Q.length if ( ((G.old = xe.extend({}, G)), (H = V ? 0 : k[F.horizontal ? 'width' : 'height']()), (Y = W[F.horizontal ? 'width' : 'height']()), (z = V ? s : U[F.horizontal ? 'outerWidth' : 'outerHeight']()), (Q.length = 0), (G.start = 0), (G.end = nt(z - H, 0)), le) ) { $.length, (J = U.children(F.itemSelector)), ($.length = 0) var h, u = Ne(U, F.horizontal ? 'paddingLeft' : 'paddingTop'), d = Ne(U, F.horizontal ? 'paddingRight' : 'paddingBottom'), i = 'border-box' === xe(J).css('boxSizing'), p = 'none' !== J.css('float'), f = 0, g = J.length - 1 ;(z = 0), J.each(function (e, t) { var i = xe(t), n = t.getBoundingClientRect(), r = it(F.horizontal ? n.width || n.right - n.left : n.height || n.bottom - n.top), o = Ne(i, F.horizontal ? 'marginLeft' : 'marginTop'), a = Ne(i, F.horizontal ? 'marginRight' : 'marginBottom'), s = r + o + a, l = !o || !a, c = {} ;(c.el = t), (c.size = l ? r : s), (c.half = c.size / 2), (c.start = z + (l ? o : 0)), (c.center = c.start - it(H / 2 - c.size / 2)), (c.end = c.start - H + c.size), e || (z += u), (z += s), F.horizontal || p || (a && o && 0 < e && (z -= rt(o, a))), e === g && ((c.end += d), (z += d), (f = l ? a : 0)), $.push(c), (h = c) }), (U[0].style[F.horizontal ? 'width' : 'height'] = (i ? z : z - u - d) + 'px'), (z -= f), $.length ? ((G.start = $[0][ae ? 'center' : 'start']), (G.end = ae ? h.center : H < z ? h.end : G.start)) : (G.start = G.end = 0) } if ( ((G.center = it(G.end / 2 + G.start / 2)), v(), j.length && 0 < Y && (F.dynamicHandle ? ((q = Fe((q = G.start === G.end ? Y : it((Y * H) / z)), F.minHandleSize, Y)), (j[0].style[F.horizontal ? 'width' : 'height'] = q + 'px')) : (q = j[F.horizontal ? 'outerWidth' : 'outerHeight']()), (X.end = Y - q), _e || c()), !V && 0 < H) ) { var n = G.start, r = '' if (le) xe.each($, function (e, t) { ae ? Q.push(t.center) : t.start + t.size > n && n <= G.end && ((n = t.start), Q.push(n), (n += H) > G.end && n < G.end + H && Q.push(G.end)) }) else for (; n - H < G.end; ) Q.push(n), (n += H) if (Z[0] && t !== Q.length) { for (var o = 0; o < Q.length; o++) r += F.pageBuilder.call(B, o) ;(K = Z.html(r).children()).eq(ee.activePage).addClass(F.activeClass) } } if (((ee.slideeSize = z), (ee.frameSize = H), (ee.sbSize = Y), (ee.handleSize = q), le)) { e && null != F.startAt && (m(F.startAt), B[se ? 'toCenter' : 'toStart'](F.startAt)) var a = $[ee.activeItem] l(se && a ? a.center : Fe(G.dest, G.start, G.end)) } else e ? null != F.startAt && l(F.startAt, 1) : l(Fe(G.dest, G.start, G.end)) L('load') } function l(e, t, i) { if (le && Ie.released && !i) { var n = d(e), r = e > G.start && e < G.end se ? (r && (e = $[n.centerItem].center), ae && F.activateMiddle && m(n.centerItem)) : r && (e = $[n.firstItem].start) } Ie.init && Ie.slidee && F.elasticBounds ? (e > G.end ? (e = G.end + (e - G.end) / 6) : e < G.start && (e = G.start + (e - G.start) / 6)) : (e = Fe(e, G.start, G.end)), (Ae.start = +new Date()), (Ae.time = 0), (Ae.from = G.cur), (Ae.to = e), (Ae.delta = e - G.cur), (Ae.tweesing = Ie.tweese || (Ie.init && !Ie.slidee)), (Ae.immediate = !Ae.tweesing && (t || (Ie.init && Ie.slidee) || !F.speed)), (Ie.tweese = 0), e !== G.dest && ((G.dest = e), L('change'), _e || o()), g(), v(), p(), K[0] && ye.page !== ee.activePage && ((ye.page = ee.activePage), K.removeClass(F.activeClass).eq(ee.activePage).addClass(F.activeClass), L('activePage', ye.page)) } function o() { if (B.initialized) { if (!_e) return (_e = Ge(o)), void (Ie.released && L('moveStart')) Ae.immediate ? (G.cur = Ae.to) : Ae.tweesing ? ((Ae.tweeseDelta = Ae.to - G.cur), $e(Ae.tweeseDelta) < 0.1 ? (G.cur = Ae.to) : (G.cur += Ae.tweeseDelta * (Ie.released ? F.swingSpeed : F.syncSpeed))) : ((Ae.time = rt(+new Date() - Ae.start, F.speed)), (G.cur = Ae.from + Ae.delta * xe.easing[F.easing](Ae.time / F.speed, Ae.time, 0, 1, F.speed))), Ae.to === G.cur ? ((G.cur = Ae.to), (Ie.tweese = _e = 0)) : (_e = Ge(o)), L('move'), V || (Ve ? (U[0].style[Ve] = ke + (F.horizontal ? 'translateX' : 'translateY') + '(' + -G.cur + 'px)') : (U[0].style[F.horizontal ? 'left' : 'top'] = -it(G.cur) + 'px')), !_e && Ie.released && L('moveEnd'), c() } } function c() { j.length && ((X.cur = G.start === G.end ? 0 : (((Ie.init && !Ie.slidee ? G.dest : G.cur) - G.start) / (G.end - G.start)) * X.end), (X.cur = Fe(it(X.cur), X.start, X.end)), ye.hPos !== X.cur && ((ye.hPos = X.cur), Ve ? (j[0].style[Ve] = ke + (F.horizontal ? 'translateX' : 'translateY') + '(' + X.cur + 'px)') : (j[0].style[F.horizontal ? 'left' : 'top'] = X.cur + 'px'))) } function t() { ;(Ce.speed && G.cur !== (0 < Ce.speed ? G.end : G.start)) || B.stop(), (Te = Ie.init ? Ge(t) : 0), (Ce.now = +new Date()), (Ce.pos = G.cur + ((Ce.now - Ce.lastTime) / 1e3) * Ce.speed), l(Ie.init ? Ce.pos : it(Ce.pos)), Ie.init || G.cur !== G.dest || L('moveEnd'), (Ce.lastTime = Ce.now) } function i(e, t, i) { if (('boolean' === Re(t) && ((i = t), (t = Se)), t === Se)) l(G[e], i) else { if (se && 'center' !== e) return var n = B.getPos(t) n && l(n[e], i, !se) } } function h(e) { return null != e ? (De(e) ? (0 <= e && e < $.length ? e : -1) : J.index(e)) : -1 } function u(e) { return h(De(e) && e < 0 ? e + $.length : e) } function m(e, t) { var i = h(e) return ( !(!le || i < 0) && ((ye.active === i && !t) || (J.eq(ee.activeItem).removeClass(F.activeClass), J.eq(i).addClass(F.activeClass), (ye.active = ee.activeItem = i), p(), L('active', i)), i) ) } function d(e) { e = Fe(De(e) ? e : G.dest, G.start, G.end) var t = {}, i = ae ? 0 : H / 2 if (!V) for (var n = 0, r = Q.length; n < r; n++) { if (e >= G.end || n === Q.length - 1) { t.activePage = Q.length - 1 break } if (e <= Q[n] + i) { t.activePage = n break } } if (le) { for (var o = !1, a = !1, s = !1, l = 0, c = $.length; l < c; l++) if ((!1 === o && e <= $[l].start + $[l].half && (o = l), !1 === s && e <= $[l].center + $[l].half && (s = l), l === c - 1 || e <= $[l].end + $[l].half)) { a = l break } ;(t.firstItem = De(o) ? o : 0), (t.centerItem = De(s) ? s : t.firstItem), (t.lastItem = De(a) ? a : t.centerItem) } return t } function v(e) { xe.extend(ee, d(e)) } function p() { var e = G.dest <= G.start, t = G.dest >= G.end, i = (e ? 1 : 0) | (t ? 2 : 0) if ( (ye.slideePosState !== i && ((ye.slideePosState = i), ge.is('button,input') && ge.prop('disabled', e), me.is('button,input') && me.prop('disabled', t), ge.add(de)[e ? 'addClass' : 'removeClass'](F.disabledClass), me.add(ue)[t ? 'addClass' : 'removeClass'](F.disabledClass)), ye.fwdbwdState !== i && Ie.released && ((ye.fwdbwdState = i), de.is('button,input') && de.prop('disabled', e), ue.is('button,input') && ue.prop('disabled', t)), le && null != ee.activeItem) ) { var n = 0 === ee.activeItem, r = ee.activeItem >= $.length - 1, o = (n ? 1 : 0) | (r ? 2 : 0) ye.itemsButtonState !== o && ((ye.itemsButtonState = o), pe.is('button,input') && pe.prop('disabled', n), fe.is('button,input') && fe.prop('disabled', r), pe[n ? 'addClass' : 'removeClass'](F.disabledClass), fe[r ? 'addClass' : 'removeClass'](F.disabledClass)) } } function r(e, t, i) { if (((e = u(e)), (t = u(t)), -1 < e && -1 < t && e !== t && (!i || t !== e - 1) && (i || t !== e + 1))) { J.eq(e)[i ? 'insertAfter' : 'insertBefore']($[t].el) var n = e < t ? e : i ? t : t - 1, r = t < e ? e : i ? t + 1 : t, o = t < e null != ee.activeItem && (e === ee.activeItem ? (ye.active = ee.activeItem = i ? (o ? t + 1 : t) : o ? t : t - 1) : ee.activeItem > n && ee.activeItem < r && (ye.active = ee.activeItem += o ? 1 : -1)), a() } } function f(e, t) { for (var i = 0, n = ve[e].length; i < n; i++) if (ve[e][i] === t) return i return -1 } function g() { Ie.released && !B.isPaused && B.resume() } function y(e) { return it((Fe(e, X.start, X.end) / X.end) * (G.end - G.start)) + G.start } function A() { ;(Ie.history[0] = Ie.history[1]), (Ie.history[1] = Ie.history[2]), (Ie.history[2] = Ie.history[3]), (Ie.history[3] = Ie.delta) } function C(e) { ;(Ie.released = 0), (Ie.source = e), (Ie.slidee = 'slidee' === e) } function I(e) { var t = 'touchstart' === e.type, i = e.data.source, n = 'slidee' === i Ie.init || (!t && b(e.target)) || !('handle' !== i || (F.dragHandle && X.start !== X.end)) || (n && !(t ? F.touchDragging : F.mouseDragging && e.which < 2)) || (t || Pe(e), C(i), (Ie.init = 0), (Ie.$source = xe(e.target)), (Ie.touch = t), (Ie.pointer = t ? e.originalEvent.touches[0] : e), (Ie.initX = Ie.pointer.pageX), (Ie.initY = Ie.pointer.pageY), (Ie.initPos = n ? G.cur : X.cur), (Ie.start = +new Date()), (Ie.time = 0), (Ie.path = 0), (Ie.delta = 0), (Ie.locked = 0), (Ie.history = [0, 0, 0, 0]), (Ie.pathToLock = n ? (t ? 30 : 10) : 0), We.on(t ? qe : Ye, E), B.pause(1), (n ? U : j).addClass(F.draggedClass), L('moveStart'), n && (be = setInterval(A, 10))) } function E(e) { if ( ((Ie.released = 'mouseup' === e.type || 'touchend' === e.type), (Ie.pointer = Ie.touch ? e.originalEvent[Ie.released ? 'changedTouches' : 'touches'][0] : e), (Ie.pathX = Ie.pointer.pageX - Ie.initX), (Ie.pathY = Ie.pointer.pageY - Ie.initY), (Ie.path = et(tt(Ie.pathX, 2) + tt(Ie.pathY, 2))), (Ie.delta = F.horizontal ? Ie.pathX : Ie.pathY), Ie.released || !(Ie.path < 1)) ) { if (!Ie.init) { if (!(F.horizontal ? $e(Ie.pathX) > $e(Ie.pathY) : $e(Ie.pathX) < $e(Ie.pathY))) return _() Ie.init = 1 } Pe(e), !Ie.locked && Ie.path > Ie.pathToLock && Ie.slidee && ((Ie.locked = 1), Ie.$source.on(Ze, Oe)), Ie.released && (_(), F.releaseSwing && Ie.slidee && ((Ie.swing = ((Ie.delta - Ie.history[0]) / 40) * 300), (Ie.delta += Ie.swing), (Ie.tweese = 10 < $e(Ie.swing)))), l(Ie.slidee ? it(Ie.initPos - Ie.delta) : y(Ie.initPos + Ie.delta)) } } function _() { clearInterval(be), (Ie.released = !0), We.off(Ie.touch ? qe : Ye, E), (Ie.slidee ? U : j).removeClass(F.draggedClass), setTimeout(function () { Ie.$source.off(Ze, Oe) }), G.cur === G.dest && Ie.init && L('moveEnd'), B.resume(1), (Ie.init = 0) } function b(e) { return ~xe.inArray(e.nodeName, Qe) || xe(e).is(F.interactive) } function w() { B.stop(), We.off('mouseup', w) } function T(e) { switch ((Pe(e), this)) { case ue[0]: case de[0]: B.moveBy(ue.is(this) ? F.moveBy : -F.moveBy), We.on('mouseup', w) break case pe[0]: B.prev() break case fe[0]: B.next() break case ge[0]: B.prevPage() break case me[0]: B.nextPage() } } function x(e) { e.originalEvent[He] = B var t = +new Date() if (ot + F.scrollHijack > t && ce[0] !== document && ce[0] !== window) ot = t else if (F.scrollBy && G.start !== G.end) { var i = (function (e) { return ( (Ee.curDelta = (F.horizontal ? e.deltaY || e.deltaX : e.deltaY) || -e.wheelDelta), (Ee.curDelta /= 1 === e.deltaMode ? 3 : 100), le ? ((Ue = +new Date()), Ee.last < Ue - Ee.resetTime && (Ee.delta = 0), (Ee.last = Ue), (Ee.delta += Ee.curDelta), $e(Ee.delta) < 1 ? (Ee.finalDelta = 0) : ((Ee.finalDelta = it(Ee.delta / 1)), (Ee.delta %= 1)), Ee.finalDelta) : Ee.curDelta ) })(e.originalEvent) ;(F.scrollTrap || (0 < i && G.dest < G.end) || (i < 0 && G.dest > G.start)) && Pe(e, 1), B.slideBy(F.scrollBy * i) } } function S(e) { F.clickBar && e.target === W[0] && (Pe(e), l(y((F.horizontal ? e.pageX - W.offset().left : e.pageY - W.offset().top) - q / 2))) } function M(e) { if (F.keyboardNavBy) switch (e.which) { case F.horizontal ? 37 : 38: Pe(e), B['pages' === F.keyboardNavBy ? 'prevPage' : 'prev']() break case F.horizontal ? 39 : 40: Pe(e), B['pages' === F.keyboardNavBy ? 'nextPage' : 'next']() } } function R(e) { return b(this) ? void (e.originalEvent[He + 'ignore'] = !0) : void (this.parentNode !== U[0] || e.originalEvent[He + 'ignore'] || B.activate(this)) } function P() { this.parentNode === Z[0] && B.activatePage(K.index(this)) } function O(e) { F.pauseOnHover && B['mouseenter' === e.type ? 'pause' : 'resume'](2) } function L(e, t) { if (ve[e]) { for (N = ve[e].length, Je.length = 0, D = 0; D < N; D++) Je.push(ve[e][D]) for (D = 0; D < N; D++) Je[D].call(B, e, t) } } var D, N, F = xe.extend({}, Me.defaults, e), B = this, V = De(s), k = xe(s), U = F.slidee ? xe(F.slidee).eq(0) : k.children().eq(0), H = 0, z = 0, G = { start: 0, center: 0, end: 0, cur: 0, dest: 0 }, W = xe(F.scrollBar).eq(0), j = W.children().eq(0), Y = 0, q = 0, X = { start: 0, end: 0, cur: 0 }, Z = xe(F.pagesBar), K = 0, Q = [], J = 0, $ = [], ee = { firstItem: 0, lastItem: 0, centerItem: 0, activeItem: null, activePage: 0 }, te = new Be(k[0]), ie = new Be(U[0]), ne = new Be(W[0]), re = new Be(j[0]), oe = 'basic' === F.itemNav, ae = 'forceCentered' === F.itemNav, se = 'centered' === F.itemNav || ae, le = !V && (oe || se || ae), ce = F.scrollSource ? xe(F.scrollSource) : k, he = F.dragSource ? xe(F.dragSource) : k, ue = xe(F.forward), de = xe(F.backward), pe = xe(F.prev), fe = xe(F.next), ge = xe(F.prevPage), me = xe(F.nextPage), ve = {}, ye = {}, Ae = {}, Ce = {}, Ie = { released: 1 }, Ee = { last: 0, delta: 0, resetTime: 200 }, _e = 0, be = 0, we = 0, Te = 0 V || (s = k[0]), (B.initialized = 0), (B.frame = s), (B.slidee = U[0]), (B.pos = G), (B.rel = ee), (B.items = $), (B.pages = Q), (B.isPaused = 0), (B.options = F), (B.dragging = Ie), (B.reload = function () { a() }), (B.getPos = function (e) { if (le) { var t = h(e) return -1 !== t && $[t] } var i = U.find(e).eq(0) if (i[0]) { var n = F.horizontal ? i.offset().left - U.offset().left : i.offset().top - U.offset().top, r = i[F.horizontal ? 'outerWidth' : 'outerHeight']() return { start: n, center: n - H / 2 + r / 2, end: n - H + r, size: r } } return !1 }), (B.moveBy = function (e) { ;(Ce.speed = e), !Ie.init && Ce.speed && G.cur !== (0 < Ce.speed ? G.end : G.start) && ((Ce.lastTime = +new Date()), (Ce.startPos = G.cur), C('button'), (Ie.init = 1), L('moveStart'), ze(Te), t()) }), (B.stop = function () { 'button' === Ie.source && ((Ie.init = 0), (Ie.released = 1)) }), (B.prev = function () { B.activate(null == ee.activeItem ? 0 : ee.activeItem - 1) }), (B.next = function () { B.activate(null == ee.activeItem ? 0 : ee.activeItem + 1) }), (B.prevPage = function () { B.activatePage(ee.activePage - 1) }), (B.nextPage = function () { B.activatePage(ee.activePage + 1) }), (B.slideBy = function (e, t) { e && (le ? B[se ? 'toCenter' : 'toStart'](Fe((se ? ee.centerItem : ee.firstItem) + F.scrollBy * e, 0, $.length)) : l(G.dest + e, t)) }), (B.slideTo = function (e, t) { l(e, t) }), (B.toStart = function (e, t) { i('start', e, t) }), (B.toEnd = function (e, t) { i('end', e, t) }), (B.toCenter = function (e, t) { i('center', e, t) }), (B.getIndex = h), (B.activate = function (e, t) { var i = m(e) F.smart && !1 !== i && (se ? B.toCenter(i, t) : i >= ee.lastItem ? B.toStart(i, t) : i <= ee.firstItem ? B.toEnd(i, t) : g()) }), (B.activatePage = function (e, t) { De(e) && l(Q[Fe(e, 0, Q.length - 1)], t) }), (B.resume = function (e) { F.cycleBy && F.cycleInterval && ('items' !== F.cycleBy || ($[0] && null != ee.activeItem)) && !(e < B.isPaused) && ((B.isPaused = 0), we ? (we = clearTimeout(we)) : L('resume'), (we = setTimeout(function () { switch ((L('cycle'), F.cycleBy)) { case 'items': B.activate(ee.activeItem >= $.length - 1 ? 0 : ee.activeItem + 1) break case 'pages': B.activatePage(ee.activePage >= Q.length - 1 ? 0 : ee.activePage + 1) } }, F.cycleInterval))) }), (B.pause = function (e) { e < B.isPaused || ((B.isPaused = e || 100), we && ((we = clearTimeout(we)), L('pause'))) }), (B.toggle = function () { B[we ? 'pause' : 'resume']() }), (B.set = function (e, t) { xe.isPlainObject(e) ? xe.extend(F, e) : F.hasOwnProperty(e) && (F[e] = t) }), (B.add = function (e, t) { var i = xe(e) le ? (null == t || !$[0] || t >= $.length ? i.appendTo(U) : $.length && i.insertBefore($[t].el), null != ee.activeItem && t <= ee.activeItem && (ye.active = ee.activeItem += i.length)) : U.append(i), a() }), (B.remove = function (e) { if (le) { var t = u(e) if (-1 < t) { J.eq(t).remove() var i = t === ee.activeItem null != ee.activeItem && t < ee.activeItem && (ye.active = --ee.activeItem), a(), i && ((ye.active = null), B.activate(ee.activeItem)) } } else xe(e).remove(), a() }), (B.moveAfter = function (e, t) { r(e, t, 1) }), (B.moveBefore = function (e, t) { r(e, t) }), (B.on = function (e, t) { if ('object' === Re(e)) for (var i in e) e.hasOwnProperty(i) && B.on(i, e[i]) else if ('function' === Re(t)) for (var n = e.split(' '), r = 0, o = n.length; r < o; r++) (ve[n[r]] = ve[n[r]] || []), -1 === f(n[r], t) && ve[n[r]].push(t) else if ('array' === Re(t)) for (var a = 0, s = t.length; a < s; a++) B.on(e, t[a]) }), (B.one = function (t, i) { B.on(t, function e() { i.apply(B, arguments), B.off(t, e) }) }), (B.off = function (e, t) { if (t instanceof Array) for (var i = 0, n = t.length; i < n; i++) B.off(e, t[i]) else for (var r = e.split(' '), o = 0, a = r.length; o < a; o++) if (((ve[r[o]] = ve[r[o]] || []), null == t)) ve[r[o]].length = 0 else { var s = f(r[o], t) ;-1 !== s && ve[r[o]].splice(s, 1) } }), (B.destroy = function () { return ( ce .add(j) .add(W) .add(Z) .add(ue) .add(de) .add(pe) .add(fe) .add(ge) .add(me) .off('.' + He), We.off('keydown', M), pe.add(fe).add(ge).add(me).removeClass(F.disabledClass), J && null != ee.activeItem && J.eq(ee.activeItem).removeClass(F.activeClass), Z.empty(), V || (k.off('.' + He), te.restore(), ie.restore(), ne.restore(), re.restore(), xe.removeData(s, He)), ($.length = Q.length = 0), (ye = {}), (B.initialized = 0), B ) }), (B.init = function () { if (!B.initialized) { B.on(n) var e = ['overflow', 'position'], t = ['position', 'webkitTransform', 'msTransform', 'transform', 'left', 'top', 'width', 'height'] te.save.apply(te, e), ne.save.apply(ne, e), ie.save.apply(ie, t), re.save.apply(re, t) var i = j return ( V || ((i = i.add(U)), k.css('overflow', 'hidden'), Ve || 'static' !== k.css('position') || k.css('position', 'relative')), Ve ? ke && i.css(Ve, ke) : ('static' === W.css('position') && W.css('position', 'relative'), i.css({ position: 'absolute' })), F.forward && ue.on(Ke, T), F.backward && de.on(Ke, T), F.prev && pe.on(Ze, T), F.next && fe.on(Ze, T), F.prevPage && ge.on(Ze, T), F.nextPage && me.on(Ze, T), ce.on(Xe, x), W[0] && W.on(Ze, S), le && F.activateOn && k.on(F.activateOn + '.' + He, '*', R), Z[0] && F.activatePageOn && Z.on(F.activatePageOn + '.' + He, '*', P), he.on( je, { source: 'slidee' }, I ), j && j.on( je, { source: 'handle' }, I ), We.on('keydown', M), V || (k.on('mouseenter.' + He + ' mouseleave.' + He, O), k.on('scroll.' + He, Le)), (B.initialized = 1), a(!0), F.cycleBy && !V && B[F.startPaused ? 'pause' : 'resume'](), B ) } }) } function Re(e) { return null == e ? String(e) : 'object' == typeof e || 'function' == typeof e ? Object.prototype.toString .call(e) .match(/\s([a-z]+)/i)[1] .toLowerCase() || 'object' : typeof e } function Pe(e, t) { e.preventDefault(), t && e.stopPropagation() } function Oe(e) { Pe(e, 1), xe(this).off(e.type, Oe) } function Le() { ;(this.scrollLeft = 0), (this.scrollTop = 0) } function De(e) { return !isNaN(parseFloat(e)) && isFinite(e) } function Ne(e, t) { return 0 | it(String(e.css(t)).replace(/[^\-0-9.]/g, '')) } function Fe(e, t, i) { return e < t ? t : i < e ? i : e } function Be(t) { var i = { style: {}, save: function () { if (t && t.nodeType) { for (var e = 0; e < arguments.length; e++) i.style[arguments[e]] = t.style[arguments[e]] return i } }, restore: function () { if (t && t.nodeType) { for (var e in i.style) i.style.hasOwnProperty(e) && (t.style[e] = i.style[e]) return i } } } return i } var Ve, ke, Ue, r, o, He = 'sly', ze = e.cancelAnimationFrame || e.cancelRequestAnimationFrame, Ge = e.requestAnimationFrame, We = xe(document), je = 'touchstart.' + He + ' mousedown.' + He, Ye = 'mousemove.' + He + ' mouseup.' + He, qe = 'touchmove.' + He + ' touchend.' + He, Xe = (document.implementation.hasFeature('Event.wheel', '3.0') ? 'wheel.' : 'mousewheel.') + He, Ze = 'click.' + He, Ke = 'mousedown.' + He, Qe = ['INPUT', 'SELECT', 'BUTTON', 'TEXTAREA'], Je = [], $e = Math.abs, et = Math.sqrt, tt = Math.pow, it = Math.round, nt = Math.max, rt = Math.min, ot = 0 function t(e) { for (var t = 0, i = r.length; t < i; t++) { var n = r[t] ? r[t] + e.charAt(0).toUpperCase() + e.slice(1) : e if (null != o.style[n]) return n } } We.on(Xe, function (e) { var t = e.originalEvent[He], i = +new Date() ;(!t || t.options.scrollHijack < i - ot) && (ot = i) }), (function (t) { Ge = t.requestAnimationFrame || t.webkitRequestAnimationFrame || function (e) { var t = new Date().getTime(), i = Math.max(0, 16 - (t - r)), n = setTimeout(e, i) return (r = t), n } var r = new Date().getTime(), i = t.cancelAnimationFrame || t.webkitCancelAnimationFrame || t.clearTimeout ze = function (e) { i.call(t, e) } })(window), (r = ['', 'webkit', 'moz', 'ms', 'o']), (o = document.createElement('div')), (Ve = t('transform')), (ke = t('perspective') ? 'translateZ(0) ' : ''), (e.Sly = Me), (xe.fn.sly = function (n, r) { var o, a return ( xe.isPlainObject(n) || (('string' !== Re(n) && !1 !== n) || ((o = !1 === n ? 'destroy' : n), (a = Array.prototype.slice.call(arguments, 1))), (n = {})), this.each(function (e, t) { var i = xe.data(t, He) i || o ? i && o && i[o] && i[o].apply(i, a) : (i = xe.data(t, He, new Me(t, n, r).init())) }) ) }), (Me.defaults = { slidee: null, horizontal: !1, itemNav: null, itemSelector: null, smart: !1, activateOn: null, activateMiddle: !1, scrollSource: null, scrollBy: 0, scrollHijack: 300, scrollTrap: !1, dragSource: null, mouseDragging: !1, touchDragging: !1, releaseSwing: !1, swingSpeed: 0.2, elasticBounds: !1, interactive: null, scrollBar: null, dragHandle: !1, dynamicHandle: !1, minHandleSize: 50, clickBar: !1, syncSpeed: 0.5, pagesBar: null, activatePageOn: null, pageBuilder: function (e) { return '
  • ' + (e + 1) + '
  • ' }, forward: null, backward: null, prev: null, next: null, prevPage: null, nextPage: null, cycleBy: null, cycleInterval: 5e3, pauseOnHover: !1, startPaused: !1, moveBy: 300, speed: 0, easing: 'swing', startAt: null, keyboardNavBy: null, draggedClass: 'dragged', activeClass: 'active', disabledClass: 'disabled' }) })(jQuery, window), (function o(a, s, l) { function c(i, e) { if (!s[i]) { if (!a[i]) { var t = 'function' == typeof require && require if (!e && t) return t(i, !0) if (h) return h(i, !0) var n = new Error("Cannot find module '" + i + "'") throw ((n.code = 'MODULE_NOT_FOUND'), n) } var r = (s[i] = { exports: {} }) a[i][0].call( r.exports, function (e) { var t = a[i][1][e] return c(t || e) }, r, r.exports, o, a, s, l ) } return s[i].exports } for (var h = 'function' == typeof require && require, e = 0; e < l.length; e++) c(l[e]) return c })( { 1: [ function (p, f, e) { ;(function (e) { 'use strict' function t(e) { ;(this.player = null), (this.director = null), (this.modelManager = null), (this.container = null), (this.tagManager = null), (this.fadeInSpeed = e), (null !== this.fadeInSpeed && void 0 !== this.fadeInSpeed) || (this.fadeInSpeed = 0) } var r = p('three'), i = p('./util/logger'), n = (p('./util/common'), p('./enum/PlayerEvents')), o = p('./enum/DirectorEvents'), a = p('./settings'), s = p('./enum/Viewmode'), l = (p('./enum/WarpStyle'), p('./enum/BlackoutStyle'), p('./enum/ModelManagerEvents')), c = p('./enum/tagEvents'), h = p('./util/transitions'), u = p('./util/lerp'), d = new i(e) ;(t.prototype.init = function (e, t, i, n, r) { ;((window.app = this).player = t), (this.director = e), (this.modelManager = i), (this.tagManager = n), (this.container = r), this.updateModel(), this.bindEvents() }), (t.prototype.bindEvents = function () { this.modelManager.on(l.ActiveModelChanged, this.updateModel.bind(this)), this.player.on(n.ModeChanging, this.handlePlayerModeChanging.bind(this)), this.player.on(n.ModeChanged, this.handlePlayerModeChanged.bind(this)), this.player.on(n.ClosestPanoChanging, this.handleClosestPanoChanging.bind(this)), this.player.on(n.StartInside, this.handleStartInside.bind(this)), this.player.on(n.StartOutside, this.handleStartOutside.bind(this)), this.player.on(n.WarpStarted, this.handleWarpStarted.bind(this)), this.director.on(o.ActionInterrupted, this.handleActionInterruption.bind(this)), this.tagManager.on(c.TagActivated, this.ontagActivated.bind(this)), this.tagManager.on(c.TagNavigation, this.onNavigationTotag.bind(this)) }), (t.prototype.updateModel = function () { this.model = this.modelManager.getActiveModel() }), (t.prototype.handleWarpStarted = function () { this.hidePlayerReticule() }), (t.prototype.ontagActivated = function () { this.hidePlayerReticule() }), (t.prototype.onNavigationTotag = function () { this.hidePlayerReticule() }), (t.prototype.handlePlayerModeChanging = function (e, t, i) { var n = this.modelManager.getActiveModel(), r = this.player.is360View(t, i) || this.director.tourIsPlaying ? 0 : a[t].markerOpacity n.fadePanoMarkers(r), n.setMode(t) }), (t.prototype.handlePlayerModeChanged = function (e, t) { var i = this.modelManager.getActiveModel(), n = t === s.PANORAMA ? r.DoubleSide : r.FrontSide i.setSide(n), i.setMode(t) }), (t.prototype.handleClosestPanoChanging = function (e, t, i) { i !== s.TRANSITIONING && (e && !this.director.tourIsPlaying && e.hoverOff(i), t && !this.director.tourIsPlaying && t.hoverOn(i)) }), (t.prototype.handleActionInterruption = function () {}), (t.prototype.handleStartInside = function (e) { var t = a[this.player.mode], i = e ? 0 : t.transitionTime * t.skyboxOpacityLength this.fadeIn(this.fadeInSpeed), (this.model.alpha = 0), (this.model.skybox.material.uniforms.opacity.value = 1), this.model.fadePanoMarkers(e ? 0 : t.markerOpacity) var n = this.player.reticule h.start(u.property(n.material, 'opacity', 0), i, null, 0, null, 'retReOpac') }), (t.prototype.handleStartOutside = function (e) { this.fadeIn(e) }), (t.prototype.fadeIn = function (e) { null != e || ((e = 2e3), d.warn('DisplayController.fadeIn -> no transition time specified, defaulting to 2000 ms.')), $(this.container).fadeIn(e) }), (t.prototype.hidePlayerReticule = function () { this.player.reticule.hide() }), (f.exports = t) }).call(this, '/js/DisplayController.js') }, { './enum/BlackoutStyle': 18, './enum/DirectorEvents': 23, './enum/tagEvents': 32, './enum/ModelManagerEvents': 33, './enum/PlayerEvents': 40, './enum/Viewmode': 51, './enum/WarpStyle': 52, './settings': 166, './util/common': 185, './util/lerp': 188, './util/logger': 189, './util/transitions': 195, three: 217 } ], 2: [ function (e, t, i) { 'use strict' function n() { ;(this.baseStartTime = performance.timing.navigationStart), (this.loadingStartTime = null), (this.waitingStartTime = null), (this.appReadyTime = null) } ;(n.prototype.setBaseStartTime = function (e) { this.baseStartTime = e || Date.now() }), (n.prototype.setWaitingStartTime = function (e) { this.waitingStartTime = e || Date.now() }), (n.prototype.setLoadingStartTime = function (e) { this.loadingStartTime = e || Date.now() }), (n.prototype.setAppReadyTime = function (e) { this.appReadyTime = e || Date.now() }), (n.prototype.calcFullLoadingTime = function () { var e = this.appReadyTime - this.baseStartTime return this.waitingStartTime && (e -= this.loadingStartTime - this.waitingStartTime), e }), (t.exports = n) }, {} ], 3: [ function (i, n, e) { ;(function (e) { 'use strict' function a() { return 100 * Math.random() } var t = i('./util/logger'), s = i('./util/browser'), l = new t(e), c = (window.MP_AB_TESTS = window.MP_AB_TESTS || { initialized: !1, init: function (e, t) { if (((t = t || {}), !this.initialized)) { for (var i in ((this.initialized = !0), s.valueFromHash('tilegen') && (t.tilegen = 1 === s.valueFromHash('tilegen', 0)), s.valueFromHash('imgopt') && (t.imgopt = 1 === s.valueFromHash('imgopt', 0)), e)) { var n = i.match('^sc_tilegen_([0-9]+)$') n && (c.tilegen = a() < parseInt(n[1])) var r = i.match('^sc_imgopt_([0-9]+)$') r && (c.imgopt = a() < parseInt(r[1])) } for (var o in t) (c[o] = t[o]), l.debug('A/B override:', o, c[o]) } }, changeIfTileGenerating: function (e) { return c.tilegen && ((e += -1 === e.indexOf('?') ? '?' : '&'), (e += '')), e }, changeIfImageOptimzing: function (e) { if (e.includes('blob:http')) return e //add return c.imgopt && -1 === e.indexOf('imgopt=1') && ((e += -1 === e.indexOf('?') ? '?' : '&'), (e += '')), e }, tilegen: !1, imgopt: !1 }) n.exports = c }).call(this, '/js/ab.js') }, { './util/browser': 182, './util/logger': 189 } ], 4: [ function (u, d, e) { ;(function (e) { 'use strict' function r(n, e, t, i) { function r(e) { a[e.sid] = !0 var t = e.billboard.media && e.billboard.media.type, i = { tag_id: e.sid, tags_visited: Object.keys(a).length, tag_count: Object.keys(n.tags).length, tag_view_count: ++d, has_media: !!t } t && (i.media_type = t), g('tag_opened', i) } var o, a = {}, s = Date.now() - P, l = null i && (l = Date.now() - window.navigationStart) try { o = /* n.data.player_options.highlight_reel && */ 0 < n.heroLocations.length } catch (n) { o = !1 } var c, h = n.supportsVR h || ((c = 'VR disabled at the model/account level'), y.valueFromHash('vr') === w.NONE ? (c = 'VR disabled, using &vr=0') : y.detectAndroid() ? _.isDeviceSupported(b.Android) || (c = 'VR disabled, unsupported Android version') : y.detectIOS() && (_.isDeviceSupported(b.IOS) || (c = 'VR disabled, unsupported iOS version'))), g('model_loaded', { duration: s, duration_from_navigation_start: l, has_hlr: o, has_vr: h, vr_reason: c }) var u = 0 n.panos.forEach(function (e) { e.on('enter', function () { f('pano_viewed', { pano_id: e.id, pano_view_count: ++u, alignment_type: e.alignmentType, interaction_source: R, navigation_source: v }) }) }) var d = 0 for (var p in n.tags) n.tags[p].billboard.on(M.OPENED, r.bind(this, n.tags[p])) e.on('tour_auto', function (e) { v = 'tour_' + e }), e.on('tour_manual', function (e) { ;(R = 'gui-' + e), (v = 'tour_manual') }), t.on(C.InteractionKey, function () { e.mode === A.TRANSITIONING || e.flying || m(C.InteractionKey) }), t.on(C.InteractionDirect, function () { e.mode === A.TRANSITIONING || e.flying || m(C.InteractionDirect) }), (function (t) { I.on(T.OPENED, function () { f('showcase_share_intent', { pano_id: t.currentPano && t.currentPano.id }) }), I.on(T.LINK_CLICKED, function (e) { f('showcase_share_action', { channel: e.channel, pano_id: t.currentPano && t.currentPano.id }) }), E.on(x.ORIGIN_LINK_CLICKED, function () { f('showcase_share_origin_link_clicked') }) })(e), (function () { _.on( S.OPENED, f.bind(this, 'showcase_gui', { gui_action: 'click_vr_button' }) ), _.on(S.LAUNCH, function (e) { f('showcase_gui', { gui_action: 'launch_vr', vr_platform: e.vr_platform, vr_app: e.vr_app }) }), _.on( S.PREV, f.bind(this, 'showcase_gui', { gui_action: 'vr_modal_prev' }) ), _.on(S.NEXT, function (e) { f('showcase_gui', { gui_action: e.nextAction }) }), _.on( S.CLOSED, f.bind(this, 'showcase_gui', { gui_action: 'vr_modal_close' }) ), _.on(S.falseICECHOSEN, function (e) { f('showcase_gui', { gui_action: e.name + ' ' }) }), _.on(S.STORE, function (e) { f('showcase_gui', { gui_action: 'launch_store', store: e }) }) })() } function f(e, t) { if (((t = t || {}), i)) try { window.analytics.track(e, s.extendObject(t, c), { context: { app: { name: 'showcase', version: '2.25.6-0-gd87e5b1' }, screen: { width: window.screen.width, height: window.screen.height, density: window.devicePixelRatio } } }) } catch (t) { console.warn('Failed to send data to segment for ' + e) } } function g(e, t) { f(e, (t = t || {})) } function m(e, t) { ;(R = e === C.InteractionGui ? 'gui-' + t : e), (v = 'self_guided') } var v, o, a = (u('three'), u('./util/ajax'), u('./ab')), y = u('./util/browser'), s = u('./util/common'), t = u('./settings'), A = (u('./localization/localize'), u('./enum/Viewmode')), C = u('./enum/ControlEvents'), I = u('./gui/sharing/modal'), E = u('./gui/title/titleBar'), _ = u('./gui/vr/vrModal'), b = u('./enum/VRPlatforms'), w = u('./enum/VROption'), T = u('./gui/sharing/ShareEvents'), x = u('./gui/title/TitleEvents'), S = u('./gui/vr/vrEvent'), M = u('./tag/Billboard/BillboardEvent'), l = new (u('./util/logger'))(e), R = (u('./enum/PlayerEvents'), 'direct'), i = null, n = !1, P = null, c = null, h = s.uuid4() d.exports = { report: function (e, t, i, n) { !(function (e, t) { if (o) try { o.addEvent( e, s.extendObject( { host: window.location.host, keen: { addons: [ { name: 'keen:ua_parser', input: { ua_string: 'user_agent' }, output: 'parsed_user_agent' } ] }, user_agent: '${keen.user_agent}', referrer: { url: s.normalizeUrl(document.referrer), domain: s.domainFromUrl(document.referrer), url_original: document.referrer }, embedded: y.inIframe(), is_mobile: y.isMobile(), version: '2.25.6-0-gd87e5b1' }, t ) ) } catch (e) { l.warn('analytics.report -> client.addEvent() error (is there blocking software installed?). Error message: ' + e) } })('Session starts', { model: e, status: t, loadtime: Date.now() - (P || Date.now()), loadtime_from_navigation_start: i ? Date.now() - window.navigationStart : null, autoplay: i, quickstart: n, ab_tilegen: a.tilegen, ab_imgopt: a.imgopt }) }, impression: function (e) { g('impression', { visible: void 0 === (e = e || {}).isVisible || e.isVisible, url_params: (void 0 !== e.immediate && e.immediate, window.location.search.substr(1).split('&')) }) }, initKeen: function (e) { return e.token && e.appId ? void (o = new Keen({ projectId: e.appId, writeKey: e.token, readKey: '', requestType: 'xhr' })) : void l.warn('no keen token/appId') }, initSegment: function (e) { return e.token ? ((i = e.token), window.analytics.load(e.token), (c = { model_id: e.model, start_source: e.startSource, autoplay: e.autoplay, quickstart: e.quickstart, language_tag: t.languageTag, is_mobile: y.isMobile(), iframe: y.inIframe(), aspect_ratio: y.aspectRatio(), session_id: h, window: { width: $('#player').width(), height: $('#player').height() }, platform: { browser: { name: $.ua.browser.name, major: $.ua.browser.major, version: $.ua.browser.version }, os: { name: $.ua.os.name, version: $.ua.os.version }, device: { vendor: $.ua.device.vendor, model: $.ua.device.model, type: $.ua.device.type } } }), (n = Math.random() < t.analytics.sessionTrackingRate), l.debug('tracking sample rate = ' + t.analytics.sessionTrackingRate), void l.debug('tracking this session = ' + n)) : void l.warn('no segment token') }, sessionStart: function (e) { l.debug('analytics user_session_start'), f('session_started'), (P = Date.now()), window.addEventListener('unload', function () { !(function (e, t) { if (((t = t || {}), navigator.sendBeacon && i)) try { navigator.sendBeacon( 'https://api.segment.io/v1/t', JSON.stringify({ event: e, anonymousId: window.analytics.user().anonymousId(), properties: s.extendObject(t, c), writeKey: i, sentAt: Date.now(), type: 'track', context: { userAgent: y.userAgent(), library: { name: 'showcase-beacon', version: '2.25.6-0-gd87e5b1' }, app: { name: 'showcase', version: '2.25.6-0-gd87e5b1' } } }) ) } catch (e) { console.warn('Failed to send async segment request') } })('session_ended', { duration: Date.now() - P }) }) }, modelLoaded: function (e, t, i, n) { r(e, t, i, n) }, loadComplete: function (e) { f('load_times', { time_to_app_start: e }) }, track: function (e, t) { n && (l.debug('analytics.track("' + e + '", ' + JSON.stringify(t) + ' )'), f(e, t)) }, trackAlways: function (e, t) { l.debug('analytics.trackAlways("' + e + '", ' + JSON.stringify(t) + ' )'), f(e, t) }, getSessionId: function () { return h }, updateInteraction: m } }).call(this, '/js/analytics.js') }, { './ab': 3, './enum/ControlEvents': 21, './enum/PlayerEvents': 40, './enum/VROption': 47, './enum/VRPlatforms': 49, './enum/Viewmode': 51, './gui/sharing/ShareEvents': 76, './gui/sharing/modal': 77, './gui/title/TitleEvents': 80, './gui/title/titleBar': 82, './gui/vr/vrEvent': 85, './gui/vr/vrModal': 87, './localization/localize': 108, './tag/Billboard/BillboardEvent': 120, './settings': 166, './util/ajax': 181, './util/browser': 182, './util/common': 185, './util/logger': 189, three: 217 } ], 5: [ function (e, t, i) { 'use strict' function n() { r.PerspectiveCamera.call(this, a.clampVFOV(o.dollhouseFOV), $('#player').width() / $('#player').height(), o.dollhouseNear, o.dollhouseFar), (this.controls = null) } var r = e('three'), o = e('../constants'), a = e('../util/cameraLight') ;((n.prototype = Object.create(r.PerspectiveCamera.prototype)).updateAspect = function (e) { ;(this.aspect = e), this.updateProjectionMatrix() }), (t.exports = n) }, { '../constants': 8, '../util/cameraLight': 184, three: 217 } ], 6: [ function (e, t, i) { 'use strict' function n() { var e = $('#player').width() / $('#player').height() r.OrthographicCamera.call(this, -o.orthoBase, o.orthoBase, o.orthoBase / e, -o.orthoBase / e, o.orthoNear, o.orthoFar), (this.controls = null), this.updateAspect(e) } var r = e('three'), o = e('../constants') ;((n.prototype = Object.create(r.OrthographicCamera.prototype)).updateAspect = function (e) { ;(this.aspect = e), (this.top = o.orthoBase / e), (this.bottom = -o.orthoBase / e), this.updateProjectionMatrix() }), (t.exports = n) }, { '../constants': 8, three: 217 } ], 7: [ function (e, t, i) { 'use strict' function n() { r.PerspectiveCamera.call(this, a.clampVFOV(o.insideFOV), $('#player').width() / $('#player').height(), o.insideNear, o.insideFar), (this.controls = null) } var r = e('three'), o = e('../settings'), a = e('../util/cameraLight') ;((n.prototype = Object.create(r.PerspectiveCamera.prototype)).updateAspect = function (e) { ;(this.aspect = e), this.updateProjectionMatrix() }), (t.exports = n) }, { '../settings': 166, '../util/cameraLight': 184, three: 217 } ], 8: [ function (e, t, i) { 'use strict' t.exports = { signedUrlDefaultExpireTime: 24e4, signedUrlCheckInterval: 1e4, signedUrlRefreshBuffer: 15e3, dollhouseFOV: 70, dollhouseNear: 0.1, //1, dollhouseFar: 5e3, insideFOV: 70, insideFOVMax: 120, insideNear: 0.01, //.1, insideFar: 5e3, insideLookSpeed: 0.12, insideLookLimitUp: 40, insideLookLimitDown: -40, orthoNear: 1, orthoFar: 5e3, orthoBase: 10, narrowLandscapeHeight: 290, reallyNarrowLandscapeHeight: 250, visionTilingStartDate: new Date('8/26/2016'), visionTilingStartVersion: '1.1.407.13667', windowHeightHighQualityThreshold: 900, tourStepDelayDefault: 3500, tourStepDelaySlideShow: 5e3, workshopApsect: 9 / 16, highQualityMaxZoom: 2, ultraHighQualityMaxZoom: 3 } }, {} ], 9: [ function (e, t, i) { 'use strict' function n() { ;(this.activeControl = null), (this.controls = {}), (this.cameras = {}) } var a = e('./PanoramaControls'), s = e('./DollhouseControls'), l = e('./FloorplanControls'), c = e('../cameras/PanoramaCamera'), h = e('../cameras/DollhouseCamera'), u = e('../cameras/FloorplanCamera'), r = e('events').EventEmitter, d = e('../enum/ControlEvents'), o = e('../enum/ModelManagerEvents'), p = e('../enum/Viewmode'), f = e('../settings') ;((n.prototype = Object.create(r.prototype)).init = function (e, t) { this.setUpControls(), this.bindEvents(e, t) }), (n.prototype.activateControls = function (e) { this.activeControl && (this.activeControl.reset(), (this.activeControl.enabled = !1)), this.controls[e] && (this.controls[e].enabled = !0), (this.activeControl = this.controls[e]) }), (n.prototype.setUpControls = function () { var i = {}, n = {}, e = [p.PANORAMA, p.DOLLHOUSE, p.FLOORPLAN], r = [c, h, u], o = [a, s, l] e.forEach( function (e, t) { ;(i[e] = new r[t]()), (n[e] = new o[t](i[e])), n[e].on(d.Move, this.emit.bind(this, d.Move)), n[e].on(d.InputStart, this.emit.bind(this, d.InputStart)), n[e].on(d.InteractionDirect, this.emit.bind(this, d.InteractionDirect)), n[e].on(d.InteractionKey, this.emit.bind(this, d.InteractionKey)), n[e].on(d.Pinch, this.emit.bind(this, d.Pinch)), n[e].on(d.Scroll, this.emit.bind(this, d.Scroll)) }.bind(this) ), (this.controls = n), (this.cameras = i) }), (n.prototype.bindEvents = function (e, t) { e.addEventListener('mousemove', this.onMouseMove.bind(this)), e.addEventListener('mousedown', this.onMouseDown.bind(this)), e.addEventListener('mouseup', this.onMouseUp.bind(this)), e.addEventListener('mouseover', this.onMouseOver.bind(this)), f.useWheel && (e.addEventListener('mousewheel', this.onMouseWheel.bind(this), { passive: !1 }), e.addEventListener('DOMMouseScroll', this.onMouseWheel.bind(this))), e.addEventListener('touchstart', this.onTouchStart.bind(this)), e.addEventListener('touchmove', this.onTouchMove.bind(this)), e.addEventListener('touchend', this.onTouchEnd.bind(this)), e.addEventListener('contextmenu', function (e) { e.preventDefault() }), e.addEventListener('pointerdown', this.onPointerDown.bind(this)), e.addEventListener('pointermove', this.onPointerMove.bind(this)), e.addEventListener('pointerup', this.onPointerUp.bind(this)), e.addEventListener('pointerout', this.onPointerCancel.bind(this)), e.addEventListener('pointercancel', this.onPointerCancel.bind(this)), document.addEventListener('keydown', this.onKeyDown.bind(this)), document.addEventListener('keyup', this.onKeyUp.bind(this)), t.on( o.ActiveModelChanged, function (e) { this.setModelForControls(e.model) }.bind(this) ) }), (n.prototype.setModelForControls = function (e) { this.controls[p.DOLLHOUSE].setZoomBounds(e.boundingBox) var t = e.boundingBox.clone().expandByScalar(f.modelBoundsPadding) ;[p.DOLLHOUSE, p.FLOORPLAN].forEach( function (e) { this.controls[e].setBounds(t) }.bind(this) ) }), (n.prototype.onMouseDown = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onMouseDown(e) }), (n.prototype.onMouseMove = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onMouseMove(e) }), (n.prototype.onMouseUp = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onMouseUp(e) }), (n.prototype.onMouseOver = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onMouseOver(e) }), (n.prototype.onMouseWheel = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onMouseWheel(e) }), (n.prototype.onTouchStart = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onTouchStart(e), $('#hotListWrap')[0].classList.remove('hotListActive'), $('#hotListContent ul .active').removeClass('active'), $('#hotList')[0].classList.remove('active') }), (n.prototype.onTouchMove = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onTouchMove(e) }), (n.prototype.onTouchEnd = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onTouchEnd(e) }), (n.prototype.onPointerDown = function (e) { if ((e.preventDefault(), this.activeControl)) switch (e.pointerType) { case 'mouse': this.activeControl.onMouseDown(e) break default: this.activeControl.onPointerDown(e) } }), (n.prototype.onPointerMove = function (e) { if ((e.preventDefault(), this.activeControl)) switch (e.pointerType) { case 'mouse': this.activeControl.onMouseMove(e) break default: this.activeControl.onPointerMove(e) } }), (n.prototype.onPointerUp = function (e) { if ((e.preventDefault(), this.activeControl)) switch (e.pointerType) { case 'mouse': this.activeControl.onMouseUp(e) break default: this.activeControl.onPointerUp(e) } }), (n.prototype.onPointerCancel = function (e) { e.preventDefault(), this.activeControl && 'mouse' !== e.pointerType && this.activeControl.onPointerUp(e) }), (n.prototype.onKeyDown = function (e) { e.metaKey || e.ctrlKey || (e.preventDefault(), this.activeControl && this.activeControl.onKeyDown(e)) }), (n.prototype.onKeyUp = function (e) { e.preventDefault(), this.activeControl && this.activeControl.onKeyUp(e) }), (t.exports = n) }, { '../cameras/DollhouseCamera': 5, '../cameras/FloorplanCamera': 6, '../cameras/PanoramaCamera': 7, '../enum/ControlEvents': 21, '../enum/ModelManagerEvents': 33, '../enum/Viewmode': 51, '../settings': 166, './DollhouseControls': 10, './FloorplanControls': 11, './PanoramaControls': 13, events: 202 } ], 10: [ function (e, t, i) { 'use strict' function n(e) { a.call(this, e), (this.minPolarAngle = o.dollhouseDefault.minPolarAngle), (this.maxPolarAngle = o.dollhouseDefault.maxPolarAngle), (this.minDistance = o.dollhouseDefault.minDistance), (this.maxDistance = o.dollhouseDefault.maxDistance), (this.adjustedMinDistance = this.minDistance), (this.adjustedMaxDistance = this.maxDistance) } var r = e('three'), o = e('../settings'), a = e('./OutsideControls') ;((n.prototype = Object.create(a.prototype)).pan = function (e, t) { this.camera.updateMatrix() var i = this.camera.position.clone().sub(this.target).length() ;(i *= Math.tan(((this.camera.fov / 2) * Math.PI) / 180)), this.panLeft((2 * e * i) / $('#player').height()), this.panUp((-2 * t * i) / $('#player').height()) }), (n.prototype.updateZoom = function () { return this.offset.length() * this.scale }), (n.prototype.setZoomBounds = function (e) { var t = e.min.distanceTo(e.max) ;(this.adjustedMinDistance = Math.max(Math.min(t / 2, o.dollhouseDefault.minDistance), 0)), (this.adjustedMaxDistance = Math.min(Math.max(t, o.dollhouseDefault.maxDistance), o.skyboxRadius)), (this.minDistance = this.adjustedMinDistance), (this.maxDistance = this.adjustedMaxDistance) }), (n.prototype.resetRanges = function (e, t) { e ? ((this.minDistance = Math.min(e, this.minDistance)), (this.maxDistance = Math.max(e, this.maxDistance))) : ((this.minDistance = this.adjustedMinDistance), (this.maxDistance = this.adjustedMaxDistance)), t ? ((this.minPolarAngle = r.Math.degToRad(-15)), (this.maxPolarAngle = r.Math.degToRad(89.9))) : ((this.minPolarAngle = o.dollhouseDefault.minPolarAngle), (this.maxPolarAngle = o.dollhouseDefault.maxPolarAngle)) }), (n.prototype.toJSON = function () { return a.prototype.toJSON.call(this) }), (t.exports = n) }, { '../settings': 166, './OutsideControls': 12, three: 217 } ], 11: [ function (e, t, i) { 'use strict' function n(e) { c.call(this, e), (this.minDistance = 15), (this.maxDistance = 50), (this.noRotateUpDown = !0), (this.minPolarAngle = 0), (this.maxPolarAngle = 0), (this.mouseActions[u.LEFT] = h.PAN), (this.mouseActions[u.MIDDLE] = h.DOLLY), (this.mouseActions[u.RIGHT] = h.ROTATE), (this.touchActions[1] = h.PAN), (this.touchActions[2] = h.ROTATE_DOLLY), (this.absoluteScale = 1), (this.currentScale = 1) } var r, o, a, s = e('three'), l = e('../settings'), c = e('./OutsideControls'), h = e('../enum/ControlActions'), u = e('../enum/MouseButton'), d = e('../util/math'), p = e('../util/browser') ;((n.prototype = Object.create(c.prototype)).zoomToContain = function (e) { this.absoluteScale = this.getDefaultAbsoluteScale(e) this.currentScale = this.absoluteScale }), /* n.prototype.getDefaultAbsoluteScale = function(modelSize) { var t = Math.max(modelSize.x, modelSize.z) , i = Math.min(modelSize.x, modelSize.z) , n = Math.max(t, i * this.camera.aspect) , r = Math.max(i, t * this.camera.aspect); var absoluteScale = (p.aspectRatio() < 1 ? r : n) / 2 / l.orthoBase * 1.2 return absoluteScale }, */ (n.prototype.getDefaultAbsoluteScale = function (modelSize, ratio) { let defaultRatio = 1.2, absoluteScale if (_settings.floorPlanAngle) { //指定了角度的话,就和browser.aspectRatio()无关,总使用纵向 var angle = parseFloat(_settings.floorPlanAngle) /* if(_settings.angleShift2d){ //怎么算都会超出,仔细想了下是无法算准的 angle += THREE.Math.degToRad(_settings.angleShift2d) } */ modelSize = modelSize.clone().applyEuler(new THREE.Euler(0, angle, 0)) var n = Math.max(Math.abs(modelSize.x), Math.abs(modelSize.z) * this.camera.aspect) //视口宽高比 >= 1 情况下,模型所占最大视口尺寸 var screenSize = Math.min($('#player').width(), $('#player').height()) var maxSize = 800 //模型最大占据像素 ratio = ratio != void 0 ? ratio : Math.max((screenSize * defaultRatio) / maxSize, defaultRatio) absoluteScale = (n / 2 / l.orthoBase) * ratio //根据模型所占最大视口尺寸调整缩放 } else { var t = Math.max(modelSize.x, modelSize.z), i = Math.min(modelSize.x, modelSize.z), n = Math.max(t, i * this.camera.aspect), r = Math.max(i, t * this.camera.aspect) absoluteScale = ((p.aspectRatio() < 1 ? r : n) / 2 / l.orthoBase) * defaultRatio } return absoluteScale }), (n.prototype.rotateToView = function (modelSize, direction, type) { let i = 0, n = p.aspectRatio() < 1 //是否模型尺寸显“细长” if (_settings.floorPlanAngle) { //规定了cadImage旋转值的话 (0是无效的,将不设置) i = parseFloat(_settings.floorPlanAngle) } else { let r = modelSize.x < modelSize.z //是否视口为“窄屏” if (n === r) { //“细长” 且 “窄屏”,说明模型尺寸比例与视口比例匹配,相机坐标只需要调转“前”“后” if (direction.z > 0) { //(第一种情况)相机是否位于背面。 注:在默认情况下webgl的相机朝向-z, direction.z > 0 说明相机视野已经偏向+z,说明相机位于模型“背面” i = Math.PI //经度上做180度轨道角位移,使相机移到静止模型的“前面” } //(第二种情况) 不做处理 } else if (direction.x > 0) { i = Math.PI / 2 } else { i = -Math.PI / 2 } } if (_settings.angleShift2d) { i += THREE.Math.degToRad(_settings.angleShift2d) } if (type == 'update') { //若不是update,只能是从其他模式刚转到floorplan i += this.lon } this.rotateLeft(i) this.update(0) }), (n.prototype.updateRotate = function (angle) { //add 在floorplan模式直接旋转 this.rotateToView(player.model.size, player.getDirection(), 'update') }), /* n.prototype.rotateToAngle = function(angle){//add 旋转到特定角度 this.rotateLeft(angle + this.lon); this.update(0); } */ (n.prototype.pan = function (e, t) { this.camera.updateMatrix(), this.panLeft((e * (this.camera.right - this.camera.left)) / $('#player').width()), this.panUp((-t * (this.camera.top - this.camera.bottom)) / $('#player').height()) }), (n.prototype.updateZoom = function () { return ( (this.absoluteScale *= this.scale - 0.03 * this.keyboardZoomSpeed), (this.absoluteScale = Math.max(l.zoomNearLimit, Math.min(this.absoluteScale, l.zoomFarLimit))), (this.currentScale = 0.8 * this.currentScale + 0.2 * this.absoluteScale), (this.camera.left = -l.orthoBase * this.currentScale), (this.camera.right = l.orthoBase * this.currentScale), (this.camera.top = (l.orthoBase * this.currentScale) / this.camera.aspect), (this.camera.bottom = (-l.orthoBase * this.currentScale) / this.camera.aspect), this.camera.updateProjectionMatrix(), this.offset.length() ) }), (n.prototype.toJSON = ((r = new s.Quaternion()), (o = new s.Quaternion().setFromAxisAngle(new s.Vector3(0, 1, 0), s.Math.degToRad(90))), (a = new s.Quaternion()), function () { var e = c.prototype.toJSON.call(this) return ( r.copy(e.camera_quaternion), a.copy(o), a.multiply(r), (e.camera_quaternion.x = d.toPrecision(a.x, 4)), (e.camera_quaternion.y = d.toPrecision(a.y, 4)), (e.camera_quaternion.z = d.toPrecision(a.z, 4)), (e.camera_quaternion.w = d.toPrecision(a.w, 4)), (e.ortho_zoom = d.toPrecision(this.currentScale * this.camera.aspect, 4)), e ) })), (t.exports = n) }, { '../enum/ControlActions': 20, '../enum/MouseButton': 34, '../settings': 166, '../util/browser': 182, '../util/math': 190, './OutsideControls': 12, three: 217 } ], 12: [ function (e, t, i) { 'use strict' function n(e) { ;(this.camera = e), ((this.camera.controls = this).enabled = !1), (this.target = new a.Vector3()), (this.targetBounds = new a.Box3()), (this.zoomSpeed = 2), //编辑时缩放快一些 (this.minDistance = 0), (this.maxDistance = 1 / 0), (this.noRotateUpDown = !1), (this.rotateSpeed = 1), (this.keyboardZoomSpeed = 0), (this.keyPanSpeed = 7), (this.autoRotate = !1), (this.autoRotateSpeed = 2), (this.autoPan = !1), (this.autoPanPosition = new a.Vector3()), (this.minPolarAngle = a.Math.degToRad(25)), (this.maxPolarAngle = a.Math.degToRad(65)), (this.rotationAcceleration = new a.Vector2()), (this.rotationSpeed = new a.Vector2()), (this.panAcceleration = new a.Vector2()), (this.panSpeed = new a.Vector2()), (this.rotateStart = new a.Vector2()), (this.rotateEnd = new a.Vector2()), (this.rotateDelta = new a.Vector2()), (this.panStart = new a.Vector2()), (this.panEnd = new a.Vector2()), (this.panDelta = new a.Vector2()), (this.panOffset = new a.Vector3()), (this.offset = new a.Vector3()), (this.dollyStart = new a.Vector2()), (this.dollyEnd = new a.Vector2()), (this.dollyDelta = new a.Vector2()), (this.phiDelta = 0), (this.thetaDelta = 0), (this.scale = 1), (this.panVector = new a.Vector3()), (this.lastPosition = new a.Vector3()), (this.state = u.NONE), (this.mouseActions = {}), (this.mouseActions[d.LEFT] = u.ROTATE), (this.mouseActions[d.MIDDLE] = u.DOLLY), (this.mouseActions[d.RIGHT] = u.PAN), (this.touchActions = {}), (this.touchActions[1] = u.ROTATE), (this.touchActions[2] = u.PAN_DOLLY), (this.lastMoveTime = 0), (this.pointersLimit = 2), (this.pointers = []) } var r, o, a = e('three'), c = e('../settings'), h = e('../util/common'), s = e('../util/math'), l = e('../enum/Vectors'), u = e('../enum/ControlActions'), d = e('../enum/MouseButton'), p = e('../enum/Keys'), f = e('../enum/ControlEvents'), g = e('events').EventEmitter ;((n.prototype = Object.create(g.prototype)).setBounds = function (e) { this.targetBounds = e }), (n.prototype.isEngaged = function () { return this.state !== u.NONE }), (n.prototype.rotateLeft = function (e) { void 0 === e && (e = this.getAutoRotationAngle()), (this.thetaDelta -= e) }), (n.prototype.rotateUp = function (e) { this.noRotateUpDown || (void 0 === e && (e = this.getAutoRotationAngle()), (this.phiDelta -= e)) }), (n.prototype.panLeft = function (e) { var t = this.camera.matrix.elements this.panOffset.set(t[0], 0, t[2]).normalize(), this.panOffset.multiplyScalar(-e), this.panVector.add(this.panOffset) }), (n.prototype.panUp = function (e) { var t = this.camera.matrix.elements this.panOffset.set(t[4], 0, t[6]).normalize(), this.panOffset.multiplyScalar(-e), this.panVector.add(this.panOffset) }), (n.prototype.startRotating = function (e, t) { e && this.navRotationAcc('x', e), t && this.navRotationAcc('y', t) }), (n.prototype.stopRotating = function (e) { e && (this.rotationSpeed.x = this.rotationSpeed.y = 0), this.navRotationAcc('x', 0), this.navRotationAcc('y', 0) }), (n.prototype.setAutoPanPosition = ((r = new a.Vector3()), (o = new a.Vector3()), function (e, t) { r.copy(this.camera.position), (void 0 === e && null === e) || r.setX(e), (void 0 === t && null === t) || r.setZ(t) var i = this.camera.position.distanceTo(this.target), n = l.FORWARD.clone().applyQuaternion(this.camera.quaternion) ;(this.targetClamped = !1), o.copy(r).addScaledVector(n, i), this.targetBounds.containsPoint(o) || (this.targetBounds.clampPoint(o, o), r.copy(o).addScaledVector(n, -i), (this.targetClamped = !0)), (this.autoPanPosition.x = r.x), (this.autoPanPosition.z = r.z), this.autoPan && this.stopAutoPanning() })), (n.prototype.stopAutoPanning = function () { var e = this.autoPan ;(this.autoPan = !1), this.emit(this.targetClamped ? f.AutoPanClamped : e ? f.AutoPanInterrupt : f.AutoPanComplete) }), (n.prototype.dollyIn = function (e) { void 0 === e && (e = this.getZoomScale()), (this.scale /= e) }), (n.prototype.dollyOut = function (e) { void 0 === e && (e = this.getZoomScale()), (this.scale *= e) }), (n.prototype.updatePan = function (e) { if ((this.panSpeed.multiplyScalar(1 - c.panFriction).addScaledVector(this.panAcceleration, c.panAccelerationOutside * e), this.pan(-this.panSpeed.x, this.panSpeed.y), this.autoPan)) { var t = new a.Vector3().copy(this.autoPanPosition).sub(this.camera.position) t.setY(0).clampLength(0, 50 * e), this.target.add(t), this.camera.position.add(t), this.autoPanPosition.x === this.camera.position.x && this.autoPanPosition.z === this.camera.position.z && ((this.autoPan = !1), this.stopAutoPanning()) } }), (n.prototype.update = function (e) { ;(e = e || 1 / 60), this.rotationSpeed.multiplyScalar(1 - c.rotationFriction).addScaledVector(this.rotationAcceleration, c.rotationAccelerationOutside * e), this.rotateLeft(-this.rotationSpeed.x), this.noRotateUpDown || this.rotateUp(this.rotationSpeed.y), this.updatePan(e) var t = this.camera.position this.offset.copy(t).sub(this.target) var i = Math.atan2(this.offset.x, this.offset.z), n = Math.atan2(Math.sqrt(this.offset.x * this.offset.x + this.offset.z * this.offset.z), this.offset.y) this.autoRotate && this.rotateLeft(this.getAutoRotationAngle()), (i += this.thetaDelta), (n += this.phiDelta), (n = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, n))), (n = Math.max(1e-6, Math.min(Math.PI - 1e-6, n))) ;(this.lon = i), (this.lat = n) //add var r = this.updateZoom() ;(r = Math.max(this.minDistance, Math.min(this.maxDistance, r))), this.target.add(this.panVector), this.targetBounds.clampPoint(this.target, this.target), (this.offset.x = r * Math.sin(n) * Math.sin(i)), (this.offset.y = r * Math.cos(n)), (this.offset.z = r * Math.sin(n) * Math.cos(i)), t.copy(this.target).add(this.offset), this.camera.lookAt(this.target), (this.thetaDelta = 0), (this.phiDelta = 0), (this.scale = 1), this.panVector.set(0, 0, 0), 0 < this.lastPosition.distanceTo(this.camera.position) && this.lastPosition.copy(this.camera.position) }), (n.prototype.getAutoRotationAngle = function () { return ((2 * Math.PI) / 60 / 60) * this.autoRotateSpeed }), (n.prototype.getZoomScale = function () { return Math.pow(0.95, this.zoomSpeed) }), (n.prototype.onMouseDown = function (e) { if (this.enabled) { switch ((e.preventDefault(), this.stopAutoPanning(), (this.mouseDown = !0), (this.state = this.mouseActions[e.button]), this.state)) { case u.ROTATE: this.rotateStart.set(e.clientX, this.noRotateUpDown ? 0 : e.clientY), this.rotationSpeed.set(0, 0) break case u.DOLLY: this.dollyStart.set(e.clientX, e.clientY) break case u.PAN: this.panStart.set(e.clientX, e.clientY) } this.emit(f.InputStart, 'mouse') } }), (n.prototype.onMouseMove = function (e) { if (this.enabled && this.mouseDown && 0 !== e.buttons) { switch ((e.preventDefault(), this.state)) { case u.ROTATE: this.rotateEnd.set(e.clientX, this.noRotateUpDown ? 0 : e.clientY), this.rotateDelta.subVectors(this.rotateEnd, this.rotateStart), this.rotateLeft(((2 * Math.PI * this.rotateDelta.x) / $('#player').width()) * this.rotateSpeed), this.rotateUp(((2 * Math.PI * this.rotateDelta.y) / $('#player').height()) * this.rotateSpeed), this.rotateStart.copy(this.rotateEnd) break case u.DOLLY: this.dollyEnd.set(e.clientX, e.clientY), this.dollyDelta.subVectors(this.dollyEnd, this.dollyStart), (0 < this.dollyDelta.y ? this.dollyIn : this.dollyOut).call(this), this.dollyStart.copy(this.dollyEnd) break case u.PAN: this.panEnd.set(e.clientX, e.clientY), this.panDelta.subVectors(this.panEnd, this.panStart), this.pan(this.panDelta.x, this.panDelta.y), this.panStart.copy(this.panEnd) } this.emit(f.Move, 'mouse'), (this.lastMoveTime = e.timeStamp), this.update() } }), (n.prototype.onMouseUp = function (e) { this.enabled && ((this.mouseDown = !1), (this.state = u.NONE), 'mouseover' !== e.type && (e.timeStamp > this.lastMoveTime + 100 ? (this.rotationSpeed.set(0, 0), this.rotationAcceleration.set(0, 0)) : this.rotationAcceleration.set(-this.rotateDelta.x, this.rotateDelta.y), this.update(), this.rotationAcceleration.set(0, 0), this.rotateDelta.set(0, 0))) }), (n.prototype.onMouseOver = function (e) { ;(0 !== e.which && 0 !== e.buttons) || this.onMouseUp(e) }), (n.prototype.onMouseWheel = function (e) { this.enabled && c.useWheel && (this.emit(f.Move, 'wheel'), (0 < (e.wheelDelta || -e.detail) ? this.dollyOut : this.dollyIn).call(this), this.update()) }), (n.prototype.onKeyDown = function (e) { this.enabled && (e.metaKey || e.ctrlKey || (e.preventDefault(), this.handleKeyDown(e.which))) }), (n.prototype.navRotationAcc = function (e, t) { 'y' === e ? (this.noRotateUpDown ? (this.keyboardZoomSpeed = t) : (this.rotationAcceleration.y = t)) : (this.rotationAcceleration.x = t) }), (n.prototype.navPanAcc = function (e, t) { this.stopAutoPanning(), (this.panAcceleration[e] = t) }), (n.prototype.handleKeyDown = function (e) { var t = !0 switch (e) { case p.UPARROW: case p.I: this.navRotationAcc('y', 1) break case p.DOWNARROW: case p.K: this.navRotationAcc('y', -1) break case p.LEFTARROW: case p.J: this.navRotationAcc('x', -1) break case p.RIGHTARROW: case p.L: this.navRotationAcc('x', 1) break case p.W: this.navPanAcc('y', 1) break case p.S: this.navPanAcc('y', -1) break case p.A: this.navPanAcc('x', -1) break case p.D: this.navPanAcc('x', 1) break default: t = !1 } t && this.emit(f.Move, 'key') }), (n.prototype.onKeyUp = function (e) { this.enabled && (e.preventDefault(), e.stopPropagation(), this.handleKeyUp(e.which)) }), (n.prototype.handleKeyUp = function (e) { switch (e) { case p.I: case p.K: case p.UPARROW: case p.DOWNARROW: ;(this.keyboardZoomSpeed = 0), (this.rotationAcceleration.y = 0) break case p.J: case p.L: case p.LEFTARROW: case p.RIGHTARROW: this.rotationAcceleration.x = 0 break case p.S: case p.W: this.panAcceleration.y = 0 break case p.A: case p.D: this.panAcceleration.x = 0 } }), (n.prototype.onTouchStart = function (i) { if (this.enabled || this.state === u.NONE) { i.preventDefault(), i.stopPropagation(), this.stopAutoPanning() var e = function () { if (2 === i.touches.length) { var e = i.touches[0].pageX - i.touches[1].pageX, t = i.touches[0].pageY - i.touches[1].pageY this.dollyStart.set(e, t) } }.bind(this), t = function () { this.panStart.set(h.average(i.touches, 'pageX'), h.average(i.touches, 'pageY')) }.bind(this), n = function () { this.rotateStart.set(h.average(i.touches, 'pageX'), h.average(i.touches, 'pageY')) }.bind(this) switch (((this.state = this.touchActions[i.touches.length]), this.state)) { case u.PAN_DOLLY: e() case u.PAN: t() break case u.ROTATE_DOLLY: e() case u.ROTATE: n() } this.rotationSpeed.set(0, 0), this.emit(f.InputStart, 'touch') } }), (n.prototype.onTouchMove = function (a) { if (this.enabled && this.state !== u.NONE) { a.preventDefault(), a.stopPropagation() var s = function () { var e = a.touches[0].pageX - a.touches[1].pageX, t = a.touches[0].pageY - a.touches[1].pageY this.dollyEnd.set(e, t) var i = this.dollyStart.length() - this.dollyEnd.length() 0 < i ? this.dollyOut(1 + i / 500) : this.dollyIn(1 - i / 500), this.dollyStart.copy(this.dollyEnd) }.bind(this), e = function () { this.panEnd.set(h.average(a.touches, 'pageX'), h.average(a.touches, 'pageY')), this.panDelta.subVectors(this.panEnd, this.panStart), this.pan(this.panDelta.x, this.panDelta.y), this.panStart.copy(this.panEnd), this.rotateDelta.set(0, 0) }.bind(this), l = function () { this.rotateEnd.set(h.average(a.touches, 'pageX'), h.average(a.touches, 'pageY')), this.rotateDelta.subVectors(this.rotateEnd, this.rotateStart), this.rotateLeft(((2 * Math.PI * this.rotateDelta.x) / $('#player').width()) * this.rotateSpeed), this.rotateUp(((2 * Math.PI * this.rotateDelta.y) / $('#player').height()) * this.rotateSpeed), this.rotateStart.copy(this.rotateEnd) }.bind(this), t = function () { if (2 === a.touches.length) { var e = window.devicePixelRatio || 1, t = a.touches[1].pageX - a.touches[0].pageX, i = a.touches[1].pageY - a.touches[0].pageY, n = Math.sqrt(t * t + i * i) if (Math.abs(this.dollyStart.length() - n) > c.input.touchMoveThreshold * e) (this.state = u.DOLLY), s() else { var r = h.average(a.touches, 'pageX'), o = h.average(a.touches, 'pageY') this.rotateDelta.set(r, o).sub(this.rotateStart).length() > c.input.touchMoveThreshold && ((this.state = u.ROTATE), this.rotateStart.set(r, o), l()) } } }.bind(this) switch (this.state) { case u.PAN_DOLLY: s() case u.PAN: e() break case u.ROTATE_DOLLY: t() break case u.DOLLY: s() break case u.ROTATE: l() break default: this.state = u.NONE } ;(this.lastMoveTime = a.timeStamp), this.emit(f.Move, 'touch') } }), (n.prototype.onTouchEnd = function (e) { this.enabled && (this.state === u.ROTATE && (e.timeStamp > this.lastMoveTime + 100 ? (this.rotationSpeed.set(0, 0), this.rotationAcceleration.set(0, 0)) : this.rotationAcceleration.set(-this.rotateDelta.x, this.rotateDelta.y)), (this.state = u.NONE), this.update(), this.rotationAcceleration.set(0, 0), this.rotateDelta.set(0, 0)) }), (n.prototype.onPointerDown = function (e) { this.enabled && ('touch' === e.pointerType && (this.pointers.length < this.pointersLimit && this.pointers.push({ id: e.pointerId, pageX: e.pageX, pageY: e.pageY }), (e.touches = this.pointers), this.onTouchStart(e)), this.emit(f.InputStart, 'pointer')) }), (n.prototype.onPointerMove = function (t) { this.enabled && 'touch' === t.pointerType && (this.pointers.forEach(function (e) { t.pointerId === e.id && ((e.pageX = t.pageX), (e.pageY = t.pageY)) }), (t.touches = this.pointers), this.onTouchMove(t)) }), (n.prototype.onPointerUp = function (i) { this.enabled && 'touch' === i.pointerType && (this.pointers.forEach( function (e, t) { i.pointerId === e.id && this.pointers.splice(t, 1) }.bind(this) ), (i.touches = this.pointers), this.onTouchEnd(i)) }), (n.prototype.reset = function () { ;(this.state = u.NONE), this.stopAutoPanning(), this.rotationSpeed.set(0, 0), this.rotationAcceleration.set(0, 0), this.panSpeed.set(0, 0), this.panAcceleration.set(0, 0) }), (n.prototype.toJSON = function () { return { camera_position: { x: s.toPrecision(this.camera.position.x, 4), y: s.toPrecision(this.camera.position.y, 4), z: s.toPrecision(this.camera.position.z, 4) }, camera_quaternion: { x: s.toPrecision(this.camera.quaternion.x, 4), y: s.toPrecision(this.camera.quaternion.y, 4), z: s.toPrecision(this.camera.quaternion.z, 4), w: s.toPrecision(this.camera.quaternion.w, 4) } } }), (t.exports = n) }, { '../enum/ControlActions': 20, '../enum/ControlEvents': 21, '../enum/Keys': 30, '../enum/MouseButton': 34, '../enum/Vectors': 50, '../settings': 166, '../util/common': 185, '../util/math': 190, events: 202, three: 217 } ], 13: [ function (u, d, e) { ;(function (e) { 'use strict' function t(e) { ;(this.camera = e), ((this.camera.controls = this).target = new s.Vector3(0, 0, 0)), (this.lookVector = new s.Vector3()), (this.lookSpeed = 0.05), (this.rotationAcc = new s.Vector2()), (this.rotationSpeed = new s.Vector2()), (this.lat = 0), (this.lon = 0), (this.phi = 0), (this.theta = 0), (this.enabled = !1), (this.locked = !1), (this.pointer = new s.Vector2(0, 0)), (this.rotationHistory = []), (this.rotationDifference = new s.Vector2()), (this.pointerDragOn = !1), (this.pointerDragStart = new s.Vector2(0, 0)), (this.pinchDistance = 0), (this.moveStart = new s.Vector2()), (this.moveTolerance = 0.01), (this.pointersLimit = 2), (this.pointers = []) //watch(this, 'enabled', this.enabled) } var s = u('three'), i = u('../util/logger'), n = u('../settings'), r = u('../util/common'), o = u('../util/math'), a = (u('../enum/Vectors'), u('../enum/MouseButton')), l = u('../enum/Keys'), c = u('../enum/ControlEvents'), h = u('events').EventEmitter new i(e), ((t.prototype = Object.create(h.prototype)).usable = function () { return this.enabled && !this.locked }), /* t.prototype.lookAt = function(e) { var t = this.camera.position.clone().sub(e) , i = Math.atan(t.z / t.x); i += t.x < 0 ? Math.PI : 0, i += 0 < t.x && t.z < 0 ? 2 * Math.PI : 0, this.lon = s.Math.radToDeg(i) + 180; var n = Math.sqrt(t.x * t.x + t.z * t.z) , r = Math.atan(t.y / n); this.lat = -s.Math.radToDeg(r) } */ (t.prototype.lookAt = function (aim, dir) { var t = dir || this.camera.position.clone().sub(aim) //aim所指点的笛卡尔坐标系 var i = Math.atan(t.z / t.x) i += t.x < 0 ? Math.PI : 0 i += t.x > 0 && t.z < 0 ? 2 * Math.PI : 0 this.lon = s.Math.radToDeg(i) + 180 var n = Math.sqrt(t.x * t.x + t.z * t.z), o = Math.atan(t.y / n) this.lat = -s.Math.radToDeg(o) }), (t.prototype.startRotationFrom = function (e, t) { o.convertScreenPositionToNDC(e, t, this.pointer), (this.pointerDragOn = !0), this.pointerDragStart.copy(this.pointer), this.moveStart.copy(this.pointer), (this.rotationHistory = []), this.rotationSpeed.set(0, 0) }), (t.prototype.onMouseOver = function (e) { !this.pointerDragOn || (0 !== e.which && 0 !== e.buttons) || this.onMouseUp(e) }), (t.prototype.onTouchStart = function (e) { if (this.usable()) { switch ((e.preventDefault(), e.stopPropagation(), e.touches.length)) { case 1: this.startRotationFrom(e.touches[0].clientX, e.touches[0].clientY) break case 2: var t = (e.touches[0].clientX - e.touches[1].clientX) / $('#player').width(), i = (e.touches[0].clientY - e.touches[1].clientY) / $('#player').height() this.pinchDistance = Math.sqrt(t * t + i * i) } this.emit(c.InputStart, 'touch') } }), (t.prototype.onPointerDown = function (e) { this.usable() && 'touch' === e.pointerType && (this.pointers.length < this.pointersLimit && this.pointers.push({ id: e.pointerId, clientX: e.clientX, clientY: e.clientY }), (e.touches = this.pointers), this.onTouchStart(e), this.emit(c.InputStart, 'pointer')) }), (t.prototype.onMouseDown = function (e) { if (this.usable()) { switch ((e.preventDefault(), e.stopPropagation(), e.button)) { case a.LEFT: this.startRotationFrom(e.clientX, e.clientY) } this.emit(c.InputStart, 'mouse') } }), (t.prototype.updateRotation = function () { if (this.usable() && this.pointerDragOn) { var e = new s.Vector3(this.pointerDragStart.x, this.pointerDragStart.y, -1).unproject(this.camera), t = new s.Vector3(this.pointer.x, this.pointer.y, -1).unproject(this.camera), i = Math.sqrt(e.x * e.x + e.z * e.z), n = Math.sqrt(t.x * t.x + t.z * t.z), r = Math.atan2(e.y, i), o = Math.atan2(t.y, n) ;(this.rotationDifference.y = s.Math.radToDeg(r - o)), (e.y = 0), (t.y = 0) var a = Math.acos(e.dot(t) / e.length() / t.length()) isNaN(a) || ((this.rotationDifference.x = s.Math.radToDeg(a)), this.pointerDragStart.x < this.pointer.x && (this.rotationDifference.x *= -1)), this.pointerDragStart.copy(this.pointer) } }), (t.prototype.onMouseMove = function (e) { this.usable() && (o.convertScreenPositionToNDC(e.clientX, e.clientY, this.pointer), this.pointerDragOn && (Math.abs(this.pointer.x - this.moveStart.x) > this.moveTolerance || Math.abs(this.pointer.y - this.moveStart.y) > this.moveTolerance) && this.emit(c.Move, 'mouse')) }), (t.prototype.onTouchMove = function (e) { if (this.usable()) switch ((this.emit(c.Move, 'touch'), e.touches.length)) { case 1: o.convertScreenPositionToNDC(e.touches[0].clientX, e.touches[0].clientY, this.pointer) break case 2: var t = (e.touches[0].clientX - e.touches[1].clientX) / $('#player').width(), i = (e.touches[0].clientY - e.touches[1].clientY) / $('#player').height(), n = this.pinchDistance - Math.sqrt(t * t + i * i) 0.01 < Math.abs(n) && (this.emit(c.InteractionDirect), this.emit(c.Pinch, n), (this.pinchDistance -= n)) } }), (t.prototype.onPointerMove = function (t) { this.usable() && 'touch' === t.pointerType && (this.pointers.forEach(function (e) { t.pointerId === e.id && ((e.clientX = t.clientX), (e.clientY = t.clientY)) }), (t.touches = this.pointers), this.onTouchMove(t)) }), (t.prototype.endRotation = function () { this.pointerDragOn = !1 var e = r.averageVectors(this.rotationHistory) this.rotationSpeed.set(e.x * n.rotationAfterMoveMultiplier, e.y * n.rotationAfterMoveMultiplier) }), (t.prototype.onTouchEnd = function (e) { this.usable() && (e.preventDefault(), e.stopPropagation(), this.endRotation()) }), (t.prototype.onMouseUp = function (e) { this.usable() && (e.preventDefault(), e.stopPropagation(), this.endRotation()) }), (t.prototype.onPointerUp = function (i) { this.usable() && 'touch' === i.pointerType && (this.pointers.forEach( function (e, t) { i.pointerId === e.id && this.pointers.splice(t, 1) }.bind(this) ), (i.touches = this.pointers), this.onTouchEnd(i)) }), (t.prototype.update = function (e) { for (this.lon, this.lat, this.updateRotation(), this.rotationHistory.push(this.rotationDifference.clone()); this.rotationHistory.length > n.rotationAfterMoveHistoryCount; ) this.rotationHistory.shift() ;(this.lon += this.rotationDifference.x), (this.lat += this.rotationDifference.y), this.rotationDifference.set(0, 0), (this.rotationSpeed.x = this.rotationSpeed.x * (1 - n.rotationFriction) + this.rotationAcc.x * n.rotationAccelerationInside), (this.rotationSpeed.y = this.rotationSpeed.y * (1 - n.rotationFriction) + this.rotationAcc.y * n.rotationAccelerationInside), (this.lon += this.rotationSpeed.x * e), (this.lat += this.rotationSpeed.y * e) let insideLookLimitDown = this.insideLookLimitDown != void 0 ? this.insideLookLimitDown : n.insideLookLimitDown let insideLookLimitUp = this.insideLookLimitUp != void 0 ? this.insideLookLimitUp : n.insideLookLimitUp insideLookLimitDown = insideLookLimitDown - n.insideFOV / 2 + this.camera.fov / 2 insideLookLimitUp = insideLookLimitUp + n.insideFOV / 2 - this.camera.fov / 2 this.lat = Math.max(insideLookLimitDown, Math.min(insideLookLimitUp, this.lat)) //通过预定义的俯仰角最大最小范围(insideLookLimitUp、insideLookLimitDown)来限制俯仰角。 注:这种数学计算很常见,因此API也很常见(clamp),等价于 this.lat = THREE.Math.clamp( this.lat, settings.insideLookLimitDown, settings.insideLookLimitUp ); //this.lat = Math.max(n.insideLookLimitDown, Math.min(n.insideLookLimitUp, this.lat)), ;(this.phi = s.Math.degToRad(90 - this.lat)), (this.theta = s.Math.degToRad(this.lon)), (this.lookVector.x = Math.sin(this.phi) * Math.cos(this.theta)), (this.lookVector.y = Math.cos(this.phi)), (this.lookVector.z = Math.sin(this.phi) * Math.sin(this.theta)), this.target.copy(this.lookVector).add(this.camera.position), this.camera.lookAt(this.target) }), (t.prototype.onMouseWheel = function (e) { if (this.usable()) { var t = e.wheelDelta || -e.detail this.emit(c.InteractionDirect), this.emit(c.Scroll, t) } }), (t.prototype.onKeyDown = function (e) { this.usable() && (e.metaKey || e.ctrlKey || (e.preventDefault(), this.handleKeyDown(e.which))) }), (t.prototype.handleKeyDown = function (e) { var t = function (e, t) { this.rotationAcc[e] = t }.bind(this) this.emit(c.InteractionKey) var i = !0 switch (e) { case l.LEFTARROW: case l.J: t('x', -1) break case l.RIGHTARROW: case l.L: t('x', 1) break case l.I: t('y', 1) break case l.K: t('y', -1) break default: i = !1 } i && this.emit(c.Move, 'key') }), (t.prototype.onKeyUp = function (e) { this.usable() && (e.preventDefault(), e.stopPropagation(), this.handleKeyUp(e.which)) }), (t.prototype.handleKeyUp = function (e) { switch (e) { case l.LEFTARROW: case l.J: case l.RIGHTARROW: case l.L: this.rotationAcc.x = 0 break case l.I: case l.K: this.rotationAcc.y = 0 } }), (t.prototype.startRotating = function (e, t) { e && (this.rotationAcc.x = e), t && (this.rotationAcc.y = t) }), (t.prototype.stopRotating = function (e) { e && (this.rotationSpeed.x = this.rotationSpeed.y = 0), this.rotationAcc.set(0, 0) }), (t.prototype.reset = function () { ;(this.pointerDragOn = !1), this.rotationAcc.set(0, 0), this.rotationSpeed.set(0, 0), (this.pointers = []) }), (t.prototype.toJSON = function () { return { camera_position: { x: o.toPrecision(this.camera.position.x, 4), y: o.toPrecision(this.camera.position.y, 4), z: o.toPrecision(this.camera.position.z, 4) }, camera_quaternion: { x: o.toPrecision(this.camera.quaternion.x, 4), y: o.toPrecision(this.camera.quaternion.y, 4), z: o.toPrecision(this.camera.quaternion.z, 4), w: o.toPrecision(this.camera.quaternion.w, 4) } } }), (t.prototype.setStateFromJSON = function (e) { this.camera.position.copy(e.camera_position), this.camera.quaternion.copy(e.camera_quaternion) }), (d.exports = t) }).call(this, '/js/controls/PanoramaControls.js') }, { '../enum/ControlEvents': 21, '../enum/Keys': 30, '../enum/MouseButton': 34, '../enum/Vectors': 50, '../settings': 166, '../util/common': 185, '../util/logger': 189, '../util/math': 190, events: 202, three: 217 } ], 14: [ function (t, i, e) { ;(function (e) { 'use strict' var c = t('three'), h = t('../enum/Viewmode'), u = new (t('../util/logger'))(e) i.exports = { serialize: function (e) { return encodeURI(JSON.stringify(e)) }, deserialize: function (e) { function t(e) { return e.reduce(function (e, t) { return e && 'number' == typeof t && !isNaN(t) }, !0) } try { var i = JSON.parse(decodeURI(e)), n = { mode: h.fromInt(i.camera_mode), panoId: i.scan_id, position: new c.Vector3().copy(i.camera_position), quaternion: new c.Quaternion().copy(i.camera_quaternion), zoom: i.ortho_zoom, floorVisibility: i.floor_visibility }, r = n.position t([r.x, r.y, r.z]) || n.position.set(0, 0, 0) var o = n.quaternion return t([o.x, o.y, o.z, o.w]) || n.quaternion.set(0, 0, 0, 1), n } catch (i) { u.debug('Not able to parse start location as JSON; falling back to old array style parsing') try { var a = e.split(','), s = { x: parseFloat(a[2]), y: parseFloat(a[3]), z: parseFloat(a[4]) }, l = { x: parseFloat(a[5]), y: parseFloat(a[6]), z: parseFloat(a[7]), w: parseFloat(a[8]) } return ( t([s.x, s.y, s.z]) || ((s.x = 0), (s.y = 0), (s.z = 0)), t([l.x, l.y, l.z, l.w]) || ((l.x = 0), (l.y = 0), (l.z = 0), (l.w = 1)), { mode: h.fromInt(a[0]), panoId: a[1], position: new c.Vector3().copy(s), quaternion: new c.Quaternion().copy(l) } ) } catch (t) { u.warn('Invalid start override, ignoring: "' + e + '"', t.message) } } return null } } }).call(this, '/js/controls/serializer.js') }, { '../enum/Viewmode': 51, '../util/logger': 189, three: 217 } ], 15: [ function (C, I, e) { ;(function (e) { 'use strict' function t() { ;(this.endlessLoop = r.warp.loop), (this.clock = new i.Clock(!0)), (this.model = null), (this.player = null), (this.currentItem = null), (this.destinationItem = null), (this.tourIsPlaying = !1), (this.transitionStage = v.None), (this.nextFunc = null), (this.onTheBus = !1), (this.tourInProgress = !1), (this.reachSource = null), (this.interrupted = !1), (this.nItems = 0), (this.walkingSectionPaused = !1) } var i = C('three'), n = C('./util/logger'), r = C('./settings'), o = C('./util/transitions'), a = C('events').EventEmitter, s = C('./enum/Viewmode'), l = C('./analytics'), c = C('./enum/WarpStyle'), h = ((o = C('./util/transitions')), C('./model/ModelManager'), C('./enum/ModelManagerEvents')), u = C('./enum/DirectorEvents'), d = C('./enum/PlayerEvents'), p = (C('./enum/ControlEvents'), C('./enum/BlackoutStyle')), f = C('./enum/PathDiscardMode'), g = C('./enum/PathDisplayMode'), m = (C('./player'), new n(e)), v = Object.freeze({ None: 0, Moving: 1, Aiming: 2, Interlude: 3 }), y = Object.freeze({ Forward: 1, NoChange: 0, Backwards: -1 }), A = o.getUniqueId() ;((t.prototype = Object.create(a.prototype)).init = function (e, t) { ;(this.player = e), (this.modelManager = t), this.updateModel(), this.resetAll(), this.bindEvents() }), (t.prototype.resetAll = function () { if ( ((this.currentItem = null), (this.destinationItem = null), (this.tourIsPlaying = !1), //this.bgmReplay(), (this.transitionStage = v.None), (this.nextFunc = null), (this.onTheBus = !1), (this.reachSource = null), (this.interrupted = !1), this.model) ) { var e = r.path.typ === c.WALK ? c.WALK : c.STD this.defaultWarpStyle = this.model.data.hasOwnProperty('player_options') && this.model.data.player_options && !1 === this.model.data.player_options.fast_transitions ? e : c.BLACK } else (this.defaultWarpStyle = c.BLACK), m.warn('No model yet, choosing "' + this.defaultWarpStyle + '" transitions') this.resetSpecialTransition() }), (t.prototype.updateModel = function () { ;(this.model = this.modelManager.getActiveModel()), (this.nItems = this.model.heroLocations.length) }), (t.prototype.bindEvents = function () { this.modelManager.on(h.ActiveModelChanged, this.updateModel.bind(this)), this.player.on(d.WarpInterruptedWithFlyTo, this.checkAndHandleWalkingtourInterruption.bind(this)), this.player.on(d.Move, this.handlePlayerMove.bind(this)), this.player.on(d.PanoChosen, this.handlePlayerPanoChosen.bind(this)), this.player.on(d.ModeChanged, this.handlePlayerModeChanged.bind(this)), this.player.on(d.InputStart, this.handlePlayerInputStart.bind(this)), this.player.on(d.FlyingStarted, this.handlePlayerFlyingStarted.bind(this)), this.player.once(d.Move, function () { o.cancelById(A) }) }), (t.prototype.checkAndHandleWalkingtourInterruption = function (e) { //快速停止。 改:去掉判断nextWarpStyle,因为这个属性改乱了,导致点击停止按钮不执行 return /* e === c.WALK && ( */ this.interrupt(p.NONE), this.pauseWalkingSection(), this.player.fastForwardActivePanoFlight(), !0 /* ) */ }), (t.prototype.handlePlayerMove = function (e) { this.transitionStage === v.Interlude && this.interrupt(p.NONE), this.emit('update.controls') }), (t.prototype.handlePlayerPanoChosen = function (e, t) { this.intermediateState() || e.id === t.id || ((this.onTheBus = !1), this.emit('update.controls')) }), (t.prototype.handlePlayerModeChanged = function (e, t) { this.intermediateState() || e === t || ((this.onTheBus = !1), this.emit('update.controls')) }), (t.prototype.handlePlayerInputStart = function (e) { this.transitionStage === v.Interlude && this.interrupt(p.NONE) }), (t.prototype.handlePlayerFlyingStarted = function () { this.clearWalkingSectionPaused() }), (t.prototype.describe = function () { return { nItems: this.nItems, currentItem: this.currentItem, destinationItem: this.destinationItem, tourIsPlaying: this.tourIsPlaying, onTheBus: this.onTheBus, endlessLoop: this.endlessLoop, viewMode: this.player.mode, inTransition: this._inTransition(), transitionStage: this.transitionStage, tourInProgress: this.tourInProgress } }), (t.prototype._inTransition = function () { return this.player.flying || this.player.isWarping() || this.player.isWaitingToWarp() || this.player.mode === s.TRANSITIONING || this.tourIsPlaying }), (t.prototype.bounceable = function () { var e = this.clock.getDelta() return this.isInterrupted() || (e < 0.9 && 0.01 < e) || (this.player.flying && !this.player.isWarping()) }), (t.prototype.itemCompare = function (item1, item2, type) { //add if (type == 'equal') { //== return item1 && item2 && item1[0] == item2[0] && item1[1] == item2[1] } else if (type == 'less') { //< return (item1 && item2 && item1[0] < item2[0]) || (item1[0] == item2[0] && item1[1] < item2[1]) } }) ;(t.prototype.currentMoveDirection = function () { //return null === this.currentItem || void 0 === this.currentItem ? y.Forward : this.destinationItem === this.currentItem ? y.NoChange : this.destinationItem > this.currentItem ? y.Forward : y.Backwards return null === this.currentItem || void 0 === this.currentItem ? y.Forward : this.itemCompare(this.destinationItem, this.currentItem, 'equal') ? y.NoChange : this.itemCompare(this.currentItem, this.destinationItem, 'less') ? y.Forward : y.Backwards }), (t.prototype.clearPath = function () { this._inTransition() || this.player.path.discardPathObject() }), (t.prototype.allFloors = function () { this.model.toggleAllFloors() }), (t.prototype.actionComplete = function (e) { if ( ((this.interrupted = !1), (this.transitionStage = v.None), this.resetSpecialTransition(), null !== this.destinationItem && this.setCurrentItem(this.destinationItem), this.tourIsPlaying || (this.player.disablePreRendering(), this.player.mode === s.PANORAMA && this.player.currentPano.isAligned() && this.model.fadePanoMarkers()), this.emit('update.controls'), this.nextFunc) ) { var t = this.nextFunc ;(this.nextFunc = null), t() } }), (t.prototype.awaitCompletion = function (e, t) { ;(this.nextFunc = t), e() }), (t.prototype.updateSuccessFunction = function (e) { this.nextFunc = e }), (t.prototype.interrupt = function (e, t) { return ( !!this.wouldInterrupt() && (this.tourIsPlaying && (this.player.zoomEnabled = this.wasZoomEnabled), (this.tourIsPlaying = !1), //this.bgmReplay(), (this.interrupted = !0), (this.nextFunc = null), this.emit(u.ActionInterrupted), null != e || (e = p.BEGINNING), this.player.interruptAndFastForward(e, t), !0) ) }), (t.prototype.wouldInterrupt = function () { return this.transitionStage !== v.None }), (t.prototype.intermediateState = function () { return this.transitionStage !== v.None }), (t.prototype.isInterrupted = function () { return this.interrupted }), (t.prototype.pauseWalkingSection = function () { this.walkingSectionPaused = !0 }), (t.prototype.clearWalkingSectionPaused = function () { this.walkingSectionPaused = !1 }), (t.prototype.autoTour = function () { var i = Date.now() this.model.auxDataPromise.then( function () { i = Date.now() - i var e = r.warp.auto, t = this.model.data && this.model.data.player_options /* && this.model.data.player_options.highlight_reel */ 0 <= e && 1 < this.model.heroCount() && t && o.trigger({ duration: Math.max(1e3 * Math.min(300, e) - i, 0), done: function () { this.playTour() }.bind(this), name: '_atr', id: A }) }.bind(this) ) }), (t.prototype.atDestinationPano = function () { if (!this.player.currentPano || null === this.destinationItem) return !1 var e = this.player.currentPano.id if (void 0 === e) return !1 var t = this.model.heroLocations //return null !== this.destinationItem && void 0 !== t[this.destinationItem] && e === t[this.destinationItem].panoId var destination = this.destinationItem && this.model.getHeroDescriptorByIndex(this.destinationItem) return destination && destination.panoId == e }), (t.prototype.redirectToItem = function (e, t) { if (null != e) if (this.wouldInterrupt()) if (this.player.mode !== s.TRANSITIONING) { m.debug('Director.redirectToItem() -> Redirecting to ' + e + ' via ' + t) var i = function () { o.setTimeout( function () { this.setDestinationItem(e), this.goToDestination(!0, p.BEGINNING, r.warp.warpInterruptionRedirectTime, !1) }.bind(this), 0 ) }.bind(this) this.interrupt(p.END, 0), this.updateSuccessFunction(i) } else m.debug('Director.redirectToItem() -> Cannot redirect while transitioning.') else m.warn('Director.redirectToItem() -> Director cannot redirect if there is nothing to interrupt.') else m.warn('Director.redirectToItem() -> Redirecting to null item.') }), (t.prototype.useSpecialTransition = function (e) { void 0 !== e && this.defaultWarpStyle !== c.BLACK && m.debug('useSpecialTransition(): ' + e), (this.nextWarpStyle = c.BLACK) }), (t.prototype.resetSpecialTransition = function () { this.nextWarpStyle = this.defaultWarpStyle }), (t.prototype.arrivedAtDestination = function (e) { if (this.player.flying || this.player.isWarping()) m.warn('Cannot advance to interlude or aiming while player is flying or warping.') else { this.transitionStage = v.Aiming var t = this.tourIsPlaying ? this.tourInterlude.bind(this, this.nextItem(this.currentItem)) : null this.player.model.fadePanoMarkers(0), this.awaitCompletion( function () { this.resetSpecialTransition(), e ? this.player.aimTourCamera(this.destinationItem, g.Retain, g.Slow, this.actionComplete.bind(this)) : this.actionComplete() }.bind(this), t ) } }), (t.prototype.goToDestination = function (e, t, i, n) { //音频 var musicInfo = this.model.heroLocations[this.destinationItem[0]].musicInfo //只有外层有音乐 if (musicInfo && musicInfo.music) { let src = musicInfo.music.includes(g_Prefix.slice(-10)) ? musicInfo.music : g_Prefix + musicInfo.music let audioObj = SoundManager.list.find(e => e.name == 'tour') let audioSrc1 = common.getFileNameFromUrl(audioObj.src) let audioSrc2 = common.getFileNameFromUrl(src) if (audioSrc1 == audioSrc2) { //应该是继续播放该folder if (this.destinationItem[1] == 0) { //从头开始播放 因为可能暂停后然后再点该缩略图播 SoundManager.play('tour', null, 0) // currentTime = 0; } else if (audioObj.audio.paused && audioObj.audio.currentTime < audioObj.audio.duration) { //未播完 SoundManager.play('tour') //继续播。 如果不是< 说明播完了,item[1]不为0应该是继续播放就不需要从头 } } else { //很可能是该folder的起始 SoundManager.play('tour', manage.dealURL(src)) } } if (((this.onTheBus = !0), this.emit('update.controls'), this.player.updateLastView(), n || !this.atDestinationPano())) { if (this.player.flying || this.player.isWarping()) m.warn('Cannot go to new destination while player is flying or warping.') else { var a = this.model.getHeroDescriptorByIndex(this.destinationItem), s = null, l = null if (a.isPano()) { var o1 = e ? 'black' : this.getMomentTour(this.destinationItem) //window.DATA.momentTour || "walk"; ;(l = this.player.warpToPanoByHeroIndex.bind(this.player, this.destinationItem, g.Show, f.Slow, o1, !0, i, this.actionComplete.bind(this))), (s = this.arrivedAtDestination.bind(this, !0)) //add if (o1 == 'black' && a.zoom && a.zoom != this.player.zoomLevel) { this.player.smoothZoomFovTo(null, a.zoom, r.warp.teleportTime) //瞬间过渡的时间 } } else { ;(l = this.player.warpToNonPanoByHeroIndex.bind(this.player, this.destinationItem, this.actionComplete.bind(this))), (s = this.arrivedAtDestination.bind(this, !1)) } ;(this.transitionStage = v.Moving), this.model.fadePanoMarkers(0), this.awaitCompletion( function () { l() }.bind(this), s ), this.emit('update.controls') } } else { //add 原地旋转时, 写到_warpCameraAim里,因那有时间 /* var a = this.model.getHeroDescriptorByIndex(this.destinationItem) if(a.zoom && a.zoom != this.player.zoomLevel){ this.player.smoothZoomFovTo(null, a.zoom, r.warp.teleportTime) //瞬间过渡的时间 } */ this.arrivedAtDestination(!0) } }), (t.prototype.tourInterlude = function () { if ( (l.trackAlways('reach_highlight', { reach_source: this.reachSource }), this.model.fadePanoMarkers(0), this.emit('update.controls'), this.tourIsPlaying) ) return this.atEndOfTour() && !this.endlessLoop ? ((this.tourInProgress = !1), this.stopTour(), this.emit(u.TourEnd), void (this.player.mode === s.PANORAMA && this.model.fadePanoMarkers(r.panorama.markerOpacity))) : void this.awaitCompletion( function () { ;(this.transitionStage = v.Interlude), this.player.tourInterlude(this.nextItem(this.currentItem), this.actionComplete.bind(this)) }.bind(this), this.goNext.bind(this) ) }), (t.prototype.findNearestItem = function (endToStart = true) { //找到离currentPano最近的导览 /* if(this.atDestinationPano(this.player.currentPano)){//在终点直接从头。但有的场景可能不希望如此,就想跳到所属的展区开始。 return [0,0] //2023.7.7发现在点击item后播放会从头开始 } */ //注:没有判断此刻是否在panorama模式,就使用currentPano var result = { item: [0, 0], dis: Infinity } var compare = (location, item) => { if (location.panoId != void 0 && location.panoId != 'outside') { var pano = this.model.panos.index[location.panoId] var dis = pano.position.distanceTo(this.player.currentPano.position) if (dis < result.dis) { ;(result.item = item), (result.dis = dis) } else if (dis == result.dis) { //如果两个位置相同,优先播放在导览条上离激活的最近的那段导览 /* if(this.itemCompare(item, this.currentItem, 'equal')){ result.item = item, result.dis = dis } */ if (this.currentItem && Math.abs(item[0] - this.currentItem[0]) < Math.abs(result.item[0] - this.currentItem[0])) { ;(result.item = item), (result.dis = dis) } } } } this.model.heroLocations.forEach((e, i) => { if (e.heroLocations) { /* e.heroLocations.forEach((a,j)=>{ compare(a, [i,j]) }) */ var location = e.heroLocations.find(e => e.panoId != void 0) location && compare(location, [i, 0]) //跳到此区域开头 } else { compare(e, [i, 0]) } }) if (endToStart && this.atEndOfTour(result.item)) { //如果是最后一个点,直接跳到开头,否则导览开始就在终点的话不会从头开始 return [0, 0] //但注意最后是区域的话result.item是区域开头,除非站在最末最末尾的位置,上面的atDestinationPano直接返回 } return result.item }), (t.prototype.playTour = function () { if (!this.bounceable()) return this.tourIsPlaying ? void m.info('tour is already playing') : void ( this.wouldInterrupt() || (this.player.emit('tour_auto', this.defaultWarpStyle), (this.tourInProgress = !0), (this.reachSource = 'play'), (this.tourIsPlaying = !0), (this.wasZoomEnabled = this.player.zoomEnabled), (this.player.zoomEnabled = !1), this.resetSpecialTransition(), this.emit('update.controls'), this.emit(u.TourStart), this.player.enablePreRendering(), this.walkingSectionPaused ? (this.clearWalkingSectionPaused(), this.goToDestination()) : /* this.goNext() */ this.atEndOfTour() ? this.goNext() : (this.tourAdvance(0), this.goToDestination())) ) //xzw: 不要直接跳到下一个点开始,从当前点开始,否则当一段区域内只有一个导览时播放会立刻跳到下一个缩略图进行。 }), (t.prototype.playTourNearBy = function () { //就近导览 if (!this.bounceable()) { return this.tourIsPlaying ? void m.info('tour is already playing') : void ( this.wouldInterrupt() || (this.player.emit('tour_auto', this.defaultWarpStyle), (this.tourInProgress = !0), (this.reachSource = 'play'), (this.tourIsPlaying = !0), (this.wasZoomEnabled = this.player.zoomEnabled), (this.player.zoomEnabled = !1), this.resetSpecialTransition(), this.emit('update.controls'), this.emit(p.TourStart), this.player.enablePreRendering(), /* this.walkingSectionPaused ? (this.clearWalkingSectionPaused(), this.goToDestination()) : this.goNext())) */ this.setDestinationItem(this.findNearestItem()), this.goToDestination()) ) } }), (t.prototype.stopTour = function (isAutoStop) { //停止导览 isAutoStop 希望仅在飞完结束自动停止时的stopTour不停止tourSound, 这样才能完整播放tourSound. 不过似乎会在倒数第二个片段点击按钮停止导览时也视作自动结束的(执行this.interrupt() )。 this.isInterrupted() || (this.transitionStage === v.Moving && this.checkAndHandleWalkingtourInterruption(this.nextWarpStyle)) || (this.tourIsPlaying && (this.player.zoomEnabled = this.wasZoomEnabled), (this.tourIsPlaying = !1), //(!isAutoStop || g_tourAudio && g_tourAudio.paused )&&this.bgmReplay(),//xzw this.interrupt(), this.clearWalkingSectionPaused(), this.resetSpecialTransition(), this.emit('update.controls')) }), (t.prototype.endTourProgress = function () { ;(this.tourInProgress = !1), this.emit('update.controls'), this.emit(u.TourEnd) }), (t.prototype.goToHighlight = function (e) { if (this.wouldInterrupt()) this.itemCompare(this.destinationItem, e, 'equal') ? this.interrupt() : this.redirectToItem(e, 'goToHighlight') else { if ((m.debug(''), this.isInterrupted())) return this.clearWalkingSectionPaused(), this.setDestinationItem(e), this.useSpecialTransition('Hilight'), this.goToDestination(true), //add true l.trackAlways('reach_highlight', { reach_source: 'thumb' }) } }), (t.prototype.prevHighlight = function () { this.bounceable() || (this.player.emit('tour_manual', 'prev'), this.interrupt(p.BEGINNING) || this.isInterrupted() || (this.clearWalkingSectionPaused(), (this.reachSource = 'prev'), this.goPrev())) }), (t.prototype.nextHighlight = function () { this.bounceable() || (this.player.emit('tour_manual', 'next'), this.interrupt(p.BEGINNING) || this.isInterrupted() || (this.clearWalkingSectionPaused(), (this.reachSource = 'next'), this.goNext())) }), (t.prototype.changeMode = function (e) { var t = $.Deferred(), i = t.resolve.bind(t), n = t.reject.bind(t) if ( (this.emit(u.StartModeChange), !function () { return this.clearWalkingSectionPaused(), !!this.wouldInterrupt() && (this.interrupt(), !0) }.bind(this)()) ) { switch (e) { case s.PANORAMA: this.player.mode === s.PANORAMA ? this.player.currentPano.isAligned() || this.player.goToLastView(!0).done(i).fail(n) : this.player.insideMode(this.player.lastInsideView.pano).done(i).fail(n) break case s.DOLLHOUSE: case s.FLOORPLAN: this.player .flyToNewMode({ mode: e }) .done(i) .fail(n) break case s.OUTDOOR: this.player.model.has360Views && (this.player.mode !== s.PANORAMA || (this.player.mode === s.PANORAMA && this.player.currentPano.isAligned())) && this.player.goToLastView(!1).done(i).fail(n) } return t.promise() } }), (t.prototype.atEndOfTour = function (item) { //return this.currentItem >= this.nItems - 1 var end = this.currentItem && this.currentItem[0] >= this.nItems - 1 if (end) { var heroLocations = this.model.heroLocations[this.nItems - 1].heroLocations if (heroLocations) { end = this.currentItem[1] >= heroLocations.length - 1 } } return end }), (t.prototype.firstDestination = function () { //return 0 < this.nItems ? 0 : null return 0 < this.nItems ? [0, 0] : null }), (t.prototype.finalDestination = function () { //return 0 < this.nItems ? this.nItems - 1 : null return 0 < this.nItems ? [this.nItems - 1, 0] : null }), (t.prototype.goPrev = function () { this.tourAdvance(-1) }), (t.prototype.goNext = function () { this.tourAdvance(1) }), (t.prototype.setDestinationItem = function (e) { ;(this.destinationItem = e), this.emit('update.controls') }), (t.prototype.setCurrentItem = function (e) { ;(this.currentItem = e), this.emit('update.controls') }), (t.prototype.nextItem = function (currentItem) { //return null === e ? this.firstDestination() : e >= this.nItems - 1 ? this.endlessLoop ? this.firstDestination() : null : e + 1 if (currentItem == void 0) return this.firstDestination() var currentLocation = this.model.heroLocations[currentItem[0]] var currentChildNum = currentLocation.heroLocations ? currentLocation.heroLocations.length : 1 var item if (this.currentItem[1] >= currentChildNum - 1) { //子目录中最后一个 item = [currentItem[0] + 1, 0] //结果可能超出nItems } else { item = [currentItem[0], currentItem[1] + 1] } if (item[0] >= this.nItems) { item = this.firstDestination() } return item //暂时不理会endlessLoop,默认为false }), (t.prototype.prevItem = function (currentItem) { //return null === e ? this.firstDestination() : e < 0 ? this.endlessLoop ? this.lastDestination() : null : e - 1 if (currentItem == void 0) return this.firstDestination() //finalDestination? var item var lastLocation = this.model.heroLocations[currentItem[0] - 1] if (!lastLocation) return this.finalDestination() //[-1, 0]//this.setDestinationItem([-1, 0]) //结果小于0 else { var lastChildNum = lastLocation.heroLocations ? lastLocation.heroLocations.length : 1 if (this.currentItem[1] == 0) { //子目录中第一个 return [currentItem[0] - 1, lastChildNum - 1] } else { return [currentItem[0], currentItem[1] - 1] } } }), (t.prototype.tourAdvance = function (e) { //e是1或-1或0 m.debug('tourAdvance(' + e + ')') if (null === this.currentItem || void 0 === this.currentItem) { this.setDestinationItem(this.firstDestination()) } else { var item = this.currentItem if (e == 1) { item = this.nextItem(this.currentItem) } else if (e == -1) { item = this.prevItem(this.currentItem) } this.setDestinationItem(item) } if (this.itemCompare(this.destinationItem, this.finalDestination(), 'equal')[0] < 0) { this.useSpecialTransition('reverse-looping to end') } else if (this.itemCompare(this.destinationItem, this.firstDestination(), 'equal')) { this.useSpecialTransition('looping back to start') } /* if(this.destinationItem[0] < 0 ){ this.setDestinationItem(this.finalDestination()) this.useSpecialTransition("reverse-looping to end") }else{ this.destinationItem[0] >= this.nItems && (this.setDestinationItem(this.firstDestination()), this.useSpecialTransition("looping back to start")) } */ /* var momentTour = this.getMomentTour(this.destinationItem); if ( "black" === momentTour) { // 方奕卓 瞬间过渡, 相机缩放至1 var i = this.player.zoomLevel; this.player.zoomEnabled = !0; var t = function(e, t) { this.player.zoomTo((1 - e) * i, !0) } .bind(this); o.start(t, 1500, function() {}, 0, h.easeOutQuad, "zoom") } */ this.goToDestination() }), (t.prototype.getMomentTour = function (destinationItem) { //add var wholeMomentTour = window.DATA.momentTour || 'walk' //最外层 if (!destinationItem) return wholeMomentTour else { var currentLocation = this.model.getHeroDescriptorByIndex(destinationItem) //最内层。 如果有使用最内层 if (currentLocation.momentTour) return currentLocation.momentTour var currentLocation_ = this.model.heroLocations[destinationItem[0]] return currentLocation_.momentTour || wholeMomentTour //若中间层或最内层有就使用,否则使用最外层 } }), (I.exports = t) }).call(this, '/js/director.js') }, { './analytics': 4, './enum/BlackoutStyle': 18, './enum/ControlEvents': 21, './enum/DirectorEvents': 23, './enum/ModelManagerEvents': 33, './enum/PathDiscardMode': 38, './enum/PathDisplayMode': 39, './enum/PlayerEvents': 40, './enum/Viewmode': 51, './enum/WarpStyle': 52, './model/ModelManager': 140, './player': 155, './settings': 166, './util/logger': 189, './util/transitions': 195, events: 202, three: 217 } ], 16: [ function (e, t, i) { 'use strict' var n = e('three'), r = e('./enum/Viewmode'), o = (e('./settings'), e('./util/transitions')), a = e('./enum/PlayerEvents'), s = new n.ShaderPass(n.HorizontalBlurShader), l = new n.ShaderPass(n.VerticalBlurShader) l.renderToScreen = !0 var c = $('#player').width() / $('#player').height() isNaN(c) && (c = 1) //initTransitionPass(n) var h = { currentBlur: 0, aspect: c, blurStrength: 1, hblurPass: s, vblurPass: l, fastTranMaskPass: new n.TransitionPass(), bindEvents: function (e) { e.on(a.ModeChanged, function (e, t) { e === r.PANORAMA && (o.cancel(h.blur), o.cancel(h.addBlur), o.start(h.removeBlur, 500, null, 0, null, 'deblur')) }) }, blur: function (e) { var t = (h.currentBlur = e) * h.blurStrength ;(l.uniforms.v.value = (t / 512) * h.aspect), (s.uniforms.h.value = t / 512) }, addBlur: function (e) { ;(e = Math.max(e, h.currentBlur)), h.blur(e) }, removeBlur: function (e) { ;(e = Math.min(1 - e, h.currentBlur)), h.blur(e) } } h.blur(0), (t.exports = h) }, { './enum/PlayerEvents': 40, './enum/Viewmode': 51, './settings': 166, './util/transitions': 195, three: 217 } ], 17: [ function (e, t, i) { 'use strict' t.exports = { UNKNOWN: 0, ALIGNED: 1, UNALIGNED: 2, PLACED: 3 } }, {} ], 18: [ function (e, t, i) { 'use strict' t.exports = { NONE: 0, MIDDLE: 1, END: 2, BEGINNING: 3, FADEIN: 4 } }, {} ], 19: [ function (e, t, i) { 'use strict' var r = e('three') t.exports = { newBlue: new r.Color(4967932), altBlue: new r.Color(47355), tagDefault: new r.Color(223357), classicBlue: new r.Color(53759), mpYellow: new r.Color(16502016), mpOrange: new r.Color(16428055), mpBlue: new r.Color(12096), mpLtGrey: new r.Color(13751252), mpDkGrey: new r.Color(10000019), mpRed: new r.Color(12525854), mpOrangeDesat: new r.Color(16764529), mpBlueDesat: new r.Color(4034734), mpRedDesat: new r.Color(14705505), white: new r.Color(16777215), black: new r.Color(0), _desat: function (e, t) { var i = t || 0.3, n = new r.Color().copy(e).getHSL() return new r.Color().setHSL(n.h, n.s * (1 - i), n.l) }, _darken: function (e, t) { var i = t || 0.2, n = e.getHSL() return new r.Color().setHSL(n.h, n.s, n.l * (1 - i)) } } }, { three: 217 } ], 20: [ function (e, t, i) { 'use strict' t.exports = { NONE: -1, ROTATE: 0, DOLLY: 1, PAN: 2, ROTATE_DOLLY: 3, PAN_DOLLY: 4 } }, {} ], 21: [ function (e, t, i) { 'use strict' t.exports = { Move: 'move', InteractionDirect: 'interaction.direct', InteractionKey: 'interaction.key', InteractionGui: 'interaction.gui', FlyInDirection: 'fly.direction', InputStart: 'input.start', Pinch: 'input.pinch', Scroll: 'input.scroll', AutoPanInterrupt: 'autopan.interrupt', AutoPanComplete: 'autopan.complete', AutoPanClamped: 'autopan.clamped', LongTap: 'longtap' } }, {} ], 22: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ FORWARD: 'FORWARD', LEFT: 'LEFT', RIGHT: 'RIGHT', BACK: 'BACK', UP: 'UP', DOWN: 'DOWN' }) }, {} ], 23: [ function (e, t, i) { 'use strict' t.exports = { ActionInterrupted: 'action.interrupted', TourStart: 'tour.start', TourEnd: 'tour.end', StartModeChange: 'mode.startChange' } }, {} ], 24: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ None: 0, Queued: 1, ForceQueued: 2, Downloading: 3, Downloaded: 4, DownloadFailed: 5 }) }, {} ], 25: [ function (e, t, i) { 'use strict' t.exports = { GL_TEXTURE_CUBE_MAP_POSITIVE_X: 0, GL_TEXTURE_CUBE_MAP_NEGATIVE_X: 1, GL_TEXTURE_CUBE_MAP_POSITIVE_Y: 2, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: 3, GL_TEXTURE_CUBE_MAP_POSITIVE_Z: 4, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: 5 } }, {} ], 26: [ function (e, t, i) { 'use strict' t.exports = { Texture2D: 0, TextureCube: 1 } }, {} ], 27: [ function (e, t, i) { 'use strict' t.exports = { SMALL: 'small', LARGE: 'large' } }, {} ], 28: [ function (e, t, i) { 'use strict' var n = e('./Viewmode'), r = { LANDING: {}, NAVIGATION: 'navigation', MORE_HELP: 'moreHelp', TOUR_INTERACTION: {} } ;(r.LANDING[n.PANORAMA] = 'panorama.landing'), (r.LANDING[n.OUTDOOR] = 'outdoor.landing'), (r.LANDING[n.DOLLHOUSE] = 'dollhouse.landing'), (r.LANDING[n.FLOORPLAN] = 'floorplan.landing'), (r.TOUR_INTERACTION.standard = 'standard.tour'), (r.TOUR_INTERACTION[n.OUTDOOR] = 'outdoor.tour'), (r.TOUR_INTERACTION[n.FLOORPLAN] = 'floorplan.tour'), (t.exports = r) }, { './Viewmode': 51 } ], 29: [ function (e, t, i) { 'use strict' var n = { UP: 1, DOWN: -1, LEFT: 'L', RIGHT: 'R', FORWARD: 'F', BACK: 'B', reverse: {}, opposite: function (e) { return this.reverse[e.toString()] } } ;(n.reverse[n.UP] = n.DOWN), (n.reverse[n.DOWN] = n.UP), (n.reverse[n.LEFT] = n.RIGHT), (n.reverse[n.RIGHT] = n.LEFT), (n.reverse[n.FORWARD] = n.BACK), (n.reverse[n.BACK] = n.FORWARD), (t.exports = n) }, {} ], 30: [ function (e, t, i) { 'use strict' var n = { ZERO: 48, ONE: 49, TWO: 50, THREE: 51, FOUR: 52, FIVE: 53, SIX: 54, SEVEN: 55, EIGHT: 56, NINE: 57, LEFTARROW: 37, UPARROW: 38, RIGHTARROW: 39, DOWNARROW: 40, A: 65, B: 66, C: 67, D: 68, E: 69, F: 70, G: 71, H: 72, I: 73, J: 74, K: 75, L: 76, M: 77, N: 78, O: 79, P: 80, Q: 81, R: 82, S: 83, T: 84, U: 85, V: 86, W: 87, X: 88, Y: 89, Z: 90, SPACE: 32, RETURN: 13, SEMICOLON: 186, PLUSEQUALS: 187, DASHUNDERSCORE: 189, OPENBRACKET: 219 } e('../util/browser').detectFirefox() && ((n.SEMICOLON = 59), (n.PLUSEQUALS = 61), (n.DASHUNDERSCORE = 173)), (t.exports = n) }, { '../util/browser': 182 } ], 31: [ function (e, t, i) { 'use strict' t.exports = { EN_US: 'en-US', ES_MX: 'es-MX', FR_FR: 'fr-FR', DE_DE: 'de-DE', RU_RU: 'ru-RU', CN_CN: 'cn-CN', JP_JP: 'jp-JP' } }, {} ], 32: [ function (e, t, i) { 'use strict' t.exports = { TagActivated: 'tag.activated', TagDismissed: 'tag.dismissed', TagNavigation: 'tag.navigation' } }, {} ], 33: [ function (e, t, i) { 'use strict' t.exports = { ModelAdded: 'model-added', ActiveModelChanged: 'active-model-changed' } }, {} ], 34: [ function (e, t, i) { 'use strict' t.exports = { LEFT: 0, MIDDLE: 1, RIGHT: 2 } }, {} ], 35: [ function (e, t, i) { 'use strict' t.exports = { PanoRenderComplete: 'panorama.render.complete', TileRenderFailure: 'panorama.tile.render.failed', TileRenderSuccess: 'panorama.tile.render.success', TileUploadAttempted: 'panorama.tile.upload.attempted', UploadAttemptedForAllTiles: 'panorama.upload.attempted.all.tiles', ZoomLevelRenderStarted: 'panorama.zoom.render.started' } }, {} ], 36: [ function (e, t, i) { 'use strict' t.exports = { BASE: 1, STANDARD: 2, HIGH: 3, ULTRAHIGH: 4 } }, {} ], 37: [ function (e, t, i) { 'use strict' t.exports = { LoadComplete: 'panorama.load.complete', LoadFailed: 'panorama.load.failed', TileLoaded: 'panorama.tile.loaded' } }, {} ], 38: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ Standard: 0, Slow: 1, Retain: 2 }) }, {} ], 39: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ Show: 0, Hide: 1, Retain: 2 }) }, {} ], 40: [ function (e, t, i) { 'use strict' t.exports = { Move: 'move', MoveComplete: 'move.complete', ModeChanged: 'mode.changed', ModeChanging: 'mode.changing', PanoChosen: 'pano.chosen', ClosestPanoChanging: 'closest.pano.changing', WarpStarted: 'warp.started', WarpInterrupted: 'warp.interrupted', WarpEnded: 'warp.ended', FlyinFinished: 'flyin.finished', FlyingStarted: 'flying.started', FlyingInterrupted: 'flying.interrupted', FlyingEnded: 'flying.ended', Ready: 'ready', StartInside: 'start.inside', StartOutside: 'start.outside', ViewChanged: 'view.changed', WarpInterruptedWithFlyTo: 'warp.interrupted.flyto', InputStart: 'input.start' } }, {} ], 41: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ DEFAULT: 0, PANOMARKERS: 1, RETICULE: 2, TAG: 3 }) }, {} ], 42: [ function (e, t, i) { 'use strict' t.exports = { visibleFloor: 1, ghostFloor: 3, boundingSkybox: 1, panoMarker: 2, reticule: 3, tagStem: 4, tagDisc: 5, ribbon: 100 } }, {} ], 43: [ function (e, t, i) { 'use strict' t.exports = { ContextCreated: 'scene-renderer-context-created', AfterRender: 'after-render', MemoryUsageUpdated: 'scene-renderer-memory-usage-updated' } }, {} ], 44: [ function (e, t, i) { 'use strict' t.exports = { IDLE: 'idle', BROWSE: 'browse', EXAMINE: 'examine' } }, {} ], 45: [ function (e, t, i) { 'use strict' t.exports = { TileDownloadSuccess: 'tiledownloader.download.success', TileDownloadFailure: 'tiledownloader.download.failure', PanoDownloadComplete: 'tiledownloader.pano.download.complete' } }, {} ], 46: [ function (e, t, i) { 'use strict' t.exports = { CardboardAndroid: 'googlevr', GearVR: 'gearvr', CardboardIOS: 'googlevrios', Cardboard: 'googlevr' } }, {} ], 47: [ function (e, t, i) { 'use strict' t.exports = { NONE: 0, CONTEXTUAL: 1, ANDROID: 2 } }, {} ], 48: [ function (e, t, i) { 'use strict' var n = { Title: 0, Cardboard: 1 }, r = { Title: 0, Cardboard: 1, Gear: 2 } ;[n, r].forEach(function (e) { e.pageCount = Object.keys(e).length }), (t.exports.ios = n), (t.exports.standard = r) }, {} ], 49: [ function (e, t, i) { 'use strict' t.exports = { Android: 'android', IOS: 'ios', Desktop: 'desktop', UnsupportedAndroid: 'android-unsupported' } }, {} ], 50: [ function (e, t, i) { 'use strict' var n = e('three') t.exports = { UP: new n.Vector3(0, 1, 0), DOWN: new n.Vector3(0, -1, 0), LEFT: new n.Vector3(-1, 0, 0), RIGHT: new n.Vector3(1, 0, 0), FORWARD: new n.Vector3(0, 0, -1), BACK: new n.Vector3(0, 0, 1) } }, { three: 217 } ], 51: [ function (e, t, i) { 'use strict' var n = e('../exception/ViewmodeConvertException'), r = e('./coreViewmodes'), o = { MESH: 'mesh', OUTDOOR: 'outdoor', TRANSITIONING: 'transitioning', toInt: function (e) { switch (e) { case this.PANORAMA: return 1 case this.DOLLHOUSE: return 2 case this.FLOORPLAN: return 3 case this.OUTDOOR: return 4 case this.TRANSITIONING: return -1 } throw new n('No known conversion for Viewmode to int for mode: ' + e) }, fromInt: function (e) { switch (e) { case '1': case 1: return this.PANORAMA case '2': case 2: return this.DOLLHOUSE case '3': case 3: return this.FLOORPLAN case '4': case 4: return this.OUTDOOR } throw new n('No known conversion for int to viewmode for int: ' + e) }, convertWorkshopModeInt: function (e) { switch (e) { case '0': case 0: case void 0: return this.PANORAMA case '1': case 1: return this.FLOORPLAN case '2': case 2: return this.DOLLHOUSE case '3': case 3: return this.MESH } throw new n('No known conversion for Workshop int to viewmode for int: ' + e) } } e('../util/common').extendObject(o, r), (t.exports = o) }, { '../exception/ViewmodeConvertException': 58, '../util/common': 185, './coreViewmodes': 54 } ], 52: [ function (e, t, i) { 'use strict' t.exports = { BLACK: 'black', STD: 'std', WALK: 'walk' } }, {} ], 53: [ function (e, t, i) { 'use strict' t.exports = { ZoomIn: 'zoom.in', ZoomOut: 'zoom.out', ZoomMax: 'zoom.max', ZoomMin: 'zoom.min' } }, {} ], 54: [ function (e, t, i) { 'use strict' t.exports = { PANORAMA: 'panorama', DOLLHOUSE: 'dollhouse', FLOORPLAN: 'floorplan' } }, {} ], 55: [ function (e, t, i) { 'use strict' t.exports = function (e) { this.message = e } }, {} ], 56: [ function (e, t, i) { 'use strict' function n(e) { r.call(this, e) } var r = e('./BasicException') ;(n.prototype = Object.create(r.prototype)), (t.exports = n) }, { './BasicException': 55 } ], 57: [ function (e, t, i) { 'use strict' function n(e) { r.call(this, e) } var r = e('./BasicException') ;(n.prototype = Object.create(r.prototype)), (t.exports = n) }, { './BasicException': 55 } ], 58: [ function (e, t, i) { 'use strict' function n(e) { r.call(this, e) } var r = e('./BasicException') ;(n.prototype = Object.create(r.prototype)), (t.exports = n) }, { './BasicException': 55 } ], 59: [ function (a, s, e) { ;(function (e) { 'use strict' var i = a('./util/ajax'), n = a('./util/showcase'), t = a('./util/logger'), r = new t(e), o = {} s.exports = { loadFeatureFlags: function (e) { var t = $.Deferred() return ( i .get(e.urlBase + '', { responseType: 'json', prefetchFrom: 'user', auth: n.getAuthorizationHeader() }) .done(function (e) { ;(o = (function (e) { var t = {} if (e) { var i = e.flags if (i) for (var n in i) i.hasOwnProperty(n) && (t[i[n]] = !0) return t } return r.debug('Feature flags -> parseFeatureFlags: rawData is null.'), null })(e)) ? t.resolve(o) : t.reject('loading-failed') }) .fail(function () { r.debug('Retrieval of feature flags failed.'), t.reject('loading-failed') }), t.promise() ) }, getFlags: function () { return o }, updateDependentSettings: function (e, t) { ;(e = e || o).labels && (t.labels.enabled = !0), e.zooming && !t.zoom.forceOff && (t.zoom.enabled = !0), e.showcase_sdk && (t.sdkInit = !0), e.mobile_highq_override && (t.tiling.mobileHighQualityOverride = !0), e.showcase_webvr && (t.vr.allowWebVR = !0), e.uhql && (t.tiling.allowUltraHighResolution = !0), e.hide_sc_sharing && (t.share.enabled = !1) } } }).call(this, '/js/featureflags.js') }, { './util/ajax': 181, './util/logger': 189, './util/showcase': 193 } ], 60: [ function (e, t, i) { 'use strict' var n = (e('../util/common'), { status: 0, set: function (e) { if (isNaN(e)) return !1 var t = $('.progressbar') e < 0 && (e = 0), 100 < e && (e = 100) var i = e * (parseInt(t.css('width').replace('px', '')) / 100), n = Math.round(e), r = parseInt(i) - 15 t.find('.bar').css('width', i), t.find('.label').css('left', r), t.find('.perc').text(n + '%'), (this.status = e) }, done: function (e) { return e || this.status ? ((this.status = null), this.set(100)) : this } }) t.exports.circleLoader = n }, { '../util/common': 185 } ], 61: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ CLOSE: 'modal.closer.close' }) }, {} ], 62: [ function (e, t, i) { 'use strict' function n(t, e) { function i() { var e = t.offsetHeight >= $('#player').height() && t.offsetWidth >= $('#player').width() e !== p && ((p = e) ? (t.classList.add('closeByFooter'), c.classList.add('closeByFooter')) : (t.classList.remove('closeByFooter'), c.classList.remove('closeByFooter'))) } e ? setTimeout(i, r.guiAnimationSpeed) : i() } var r = e('../../settings'), o = (e('../../tag/Media/MediaEvent'), e('../../util/browser')), a = e('../../util/common'), s = e('./ModalCloserEvent'), l = e('events').EventEmitter, c = document.getElementsByClassName('footer')[0], h = c.querySelectorAll('.close')[0], u = null, d = null, p = null, f = (o.isMobile(), { open: function (e) { e && (n(e), u && h.removeEventListener('click', u, !0), (u = function (e, t) { t && (t.stopPropagation(), t.preventDefault()), e && this.emit(s.CLOSE, e), f.reset() }.bind(this, e.id)), h.addEventListener('click', u, !0), d && window.removeEventListener('resize', d, !0), (d = n.bind(this, e)), window.addEventListener('resize', d, !0)) }, reset: function () { c.classList.remove('closeByFooter'), h.removeEventListener('click', u, !0), window.removeEventListener('resize', d, !0), (u = d = p = null) } }) a.extendObject(f, l.prototype), (t.exports = f) }, { '../../tag/Media/MediaEvent': 131, '../../settings': 166, '../../util/browser': 182, '../../util/common': 185, './ModalCloserEvent': 61, events: 202 } ], 63: [ function (e, t, i) { 'use strict' var A = e('../lib/dat.gui'), C = e('three'), I = e('../util/easing'), E = e('../enum/Viewmode'), _ = e('../enum/Colors'), b = e('../enum/WarpStyle'), w = e('../settings') e('../tag/tag'), (A.GUI.prototype.removeFolder = function (e) { var t = this.__folders[e] t && (t.close(), this.__ul.removeChild(t.domElement.parentNode), delete this.__folders[e], this.onResize()) }), (t.exports.toggle = function (t, e, i) { var n = new A.GUI({ width: 400 }), r = n.addFolder('Flydown from Dollhouse') r.add(w.flydown, 'movementEasing', Object.keys(I)), r.add(w.flydown, 'movementDelay', 0, 1).step(0.01), r.add(w.flydown, 'rotationEasing', Object.keys(I)), r.add(w.flydown, 'rotationDelay', 0, 1).step(0.01), r.add(w.flydown, 'modelTextureDelay', 0, 1).step(0.01), r.add(w.flydown, 'skyboxDelay', 0, 1).step(0.01), r.add(w.dollhouseDefault, 'minPolarAngle', 0, C.Math.degToRad(50)), r.add(w.dollhouseDefault, 'maxPolarAngle', C.Math.degToRad(50), C.Math.degToRad(170)) var o = n.addFolder('Transition between panos') o.add(w.transition, 'blur', 0, 10).onFinishChange(function () {}), o .add(w.transition, 'flySpeed', 0, 10) .step(0.01) .onFinishChange(function () { ;(w.transition.flyTime = 0), o.__controllers.forEach(function (e) { e.updateDisplay() }) }), o.add(w.transition, 'flyTime', 0, 5e3).onFinishChange(function () { ;(w.transition.flySpeed = 0), o.__controllers.forEach(function (e) { e.updateDisplay() }) }), o.add(w.transition, 'aimTime', 500, 2500).step(50), o.add(w.transition, 'aimSlowFactor', 1, 3).step(0.1), o.add(w.transition, 'movementEasing', Object.keys(I)) var a = n.addFolder('Path Display') a .add(w.path, 'opacity', 0, 1) .step(0.01) .onFinishChange(function () {}), a .add(w.path, 'height', 0, 0.2) .step(0.01) .onFinishChange(function () {}), a .add(w.path, 'outsideHeight', 0, 2) .step(0.01) .onFinishChange(function () {}), a .add(w.path, 'ribbonWidth', 0.01, 0.35) .step(0.01) .onFinishChange(function () {}), a .add(w.path, 'waypointRadius', 0.01, 1.2) .step(0.01) .onFinishChange(function () {}), a .add(w.path, 'waypointPulse', 0, 3600) .step(20) .onFinishChange(function () {}), a .add(w.path, 'waypointIndoorRadius', 0.01, 1.2) .step(0.01) .onFinishChange(function () {}), a .add(w.path, 'fadeInTime', 0, 1200) .step(10) .onFinishChange(function () {}), a .add(w.path, 'fadeOutTime', 0, 1200) .step(10) .onFinishChange(function () {}), a.add(w.path, 'color', Object.keys(_)).onFinishChange(function () { ;(w.path.color = _[w.path.color]), (w.path.colorUp = _._desat(w.path.color)), (w.path.colorDown = _.darken(w.path.color)) }), a.add(w, 'reticuleColor', Object.keys(_)).onFinishChange(function () { w.reticuleColor = _[w.reticuleColor] }) var s = n.addFolder('Warping'), l = s.addFolder('Warp/Teleport') l.add(w.warp, 'softPushDist', 0, 2).onFinishChange(function () {}), l .add(w.warp, 'softPushEnd', 0, 1) .step(0.01) .onFinishChange(function () {}), l.add(w.warp, 'softBendAngle', 0, 45).onFinishChange(function () {}), l.add(w.warp, 'softBendTilt', 0, 45).onFinishChange(function () {}), l .add(w.warp, 'softBendEnd', 0, 1) .step(0.01) .onFinishChange(function () {}), l.add(w.warp, 'burnsAngle', 0, 30).onFinishChange(function () {}), l.add(w.warp, 'minBurnsAngle', 0, 10).onFinishChange(function () {}), l.add(w.warp, 'brakeStrength', 1, 8).onFinishChange(function () {}), l .add(w.warp, 'minBrakeAngle', 0, 5) .step(0.01) .onFinishChange(function () {}), l .add(w.warp, 'maxBrakeAngle', 0, 5) .step(0.01) .onFinishChange(function () {}), l.add(w.path, 'mapGuides').onFinishChange(function () {}), l .add(w.warp, 'teleportTime', 0, 5e3) .step(10) .onFinishChange(function () {}), l .add(w.warp, 'outsideTime', 0, 5e3) .step(10) .onFinishChange(function () {}), l.add(w.path, 'typ', Object.keys(b)).onFinishChange(function () { w.path.typ = b[w.path.typ] }), l .add(w.warp, 'loop') .onChange(function () {}) .onFinishChange(function () { e.endlessLoop = w.warp.loop }), l .add(w.warp, 'walkSlideShowThreshhold', 1, 1e4) .step(1) .onFinishChange(function () {}), l .add(w.warp, 'walkExtraPanosDistance', 0, 3) .step(0.1) .onFinishChange(function () {}), l .add(w.transition, 'fastForwardFactor', 1, 10) .step(1) .onFinishChange(function () {}) var c = s.addFolder('Long Warp Only') c .add(w.warp, 'minWarpTime', 0, 5e3) .step(10) .onFinishChange(function () { ;(w.warp.flySpeed = 0), c.__controllers.forEach(function (e) { e.updateDisplay() }) }), c .add(w.warp, 'timePerMeter', 0, 5e3) .step(10) .onFinishChange(function () {}), c .add(w.warp, 'lookAheadMax', 0.01, 1) .step(0.01) .onFinishChange(function () {}), c .add(w.warp, 'lookAheadDist', 0.01, 4) .step(0.01) .onFinishChange(function () {}), c .add(w.warp, 'maxTurnPerSec', 0, 720) .step(1) .onFinishChange(function () {}), c .add(w.warp, 'maxAimPerSec', 0, 720) .step(1) .onFinishChange(function () {}), c .add(w.warp, 'turnFriction', 0, 1) .step(0.01) .onFinishChange(function () {}), c .add(w.warp, 'walkDelay', 0, 2e3) .step(10) .onFinishChange(function () {}), c .add(w.transition, 'flytimeMaxDistanceThreshold', 0, 25) .step(10) .onFinishChange(function () {}), c .add(w.warp, 'walkMaxDist', 0, 100) .step(1) .onFinishChange(function () {}) var h = n.addFolder('Warp Esoterica') h .add(w.warp, 'nearPanoDist', 0.01, 12) .step(0) .onFinishChange(function () {}), h.add(w.warp, 'blur', 0.01, 1).onFinishChange(function () {}), h .add(w.warp, 'flySpeed', 0, 10) .step(0.01) .onFinishChange(function () { ;(w.warp.minWarpTime = 0), h.__controllers.forEach(function (e) { e.updateDisplay() }) }), h.add(w.warp, 'showBunny').onFinishChange(function () {}), h .add(w.warp, 'fastTime', 0, 2500) .step(10) .onFinishChange(function () {}), h.add(w.warp, 'movementEasing', Object.keys(I)) var u = n.addFolder('Misc') u.add(w, 'dollhouseFOV', 10, 180).onChange(function () { i.cameras[E.DOLLHOUSE].fov = w.dollhouseFOV }), u.add(w, 'insideFOV', 10, 180).onChange(function () { i.cameras[E.PANORAMA].fov = w.insideFOV }), u .add(w, 'insideLookSpeed', 0.01, 0.3) .step(0.01) .onChange(function () {}), u .add(w, 'rotationAccelerationInside', 0.1, 10) .step(0.1) .onChange(function () {}), u .add(w, 'rotationAccelerationOutside', 0.1, 10) .step(0.1) .onChange(function () {}) var d = n.addFolder('Navigation') d.add(w.navigation, 'panoScores').onFinishChange(function () { w.navigation.panoScores || t.panos.forEach(function (e) { e.floor.remove(e.text3d), (e.text3d = null) }) }), d.add(w.navigation, 'mouseDirection'), d.add(w.navigation, 'filterStrictness', 0, 1), d.add(w.navigation, 'angleFactor', -60, 0), d.add(w.navigation, 'directionFactor', 1, 20), d.add(w.navigation, 'distanceFactor', -5, 5), d.add(w.navigation, 'optionalityFactor', 0.1, 10) var p = n.addFolder('tags'), f = p.addFolder('Tag Creation') f.add(w.tags.pole, 'enabled').name('poleEnabled'), f.add(w.tags.pole, 'height', 0, 2.5).step(0.01).name('poleHeight'), f.add(w.tags.pole, 'width', 1, 10).step(1).name('poleWidth'), f.add(w.tags.pole, 'opacity', 0.1, 1).step(0.1).name('poleOpacity') var g = p.addFolder('Visibility') g.add(w.tags.visibility, 'anyDistance'), g.add(w.tags.visibility, 'visibleDistance', 0.1, 30).step(0.1), g.add(w.tags.visibility, 'cameraClearance', 0, 1).step(0.01), g.add(w.tags.visibility, 'hideViaFloor'), g.add(w.tags.visibility, 'hideOffScreenDisc').name('hideEdgeDisc'), g.add(w.tags.visibility, 'hideOffScreenObject').name('hideEdgeObject') var m = p.addFolder('Disc Parameters') m.add(w.tags.disc.scale, 'nearBound', 0.1, 10).step(0.1), m.add(w.tags.disc.scale, 'farBound', 0.1, 20).step(0.1).listen(), m.add(w.tags.disc.scale, 'linkFarBound').onChange(function (e) { e && (w.tags.disc.scale.farBound = w.tags.visibility.visibleDistance * (1 - w.tags.disc.scale.linkPercent / 100)) }), m .add(w.tags.disc.scale, 'linkPercent', 0, 100) .step(1) .onChange(function (e) { w.tags.disc.scale.linkFarBound && (w.tags.disc.scale.farBound = w.tags.visibility.visibleDistance * (1 - e / 100)) }), m.add(w.tags.disc.scale, 'maxSize', 40, 200).step(1), m.add(w.tags.disc.scale, 'minSize', 20, 100).step(1), m.add(w.tags.disc.scale, 'responsiveness', 0, 100).step(1) var v = p.addFolder('Navigate') v.add(w.tags.navigate, 'nearestPano').name('nearestPano'), v.add(w.tags.navigate, 'lineOfSight').name('lineOfSight'), v.add(w.tags.navigate, 'reactivate').name('reactivate'), v.add(w.tags.navigate, 'aimAt', ['disc', 'object', 'pole', 'nothing']).name('aim at'), v.add(w.tags.navigate, 'tiltTolerance', 0, 50).step(1), v.add(w.tags.navigate, 'rotateSpeedFactor', 0, 5).step(0.1) var y = n.addFolder('Debug') y.add(w, 'wireframe').onFinishChange(function () { t.chunks.forEach(function (e) { e.material && (e.wireframeTwin || ((e.wireframeTwin = new C.WireframeHelper(e)), (e.wireframeTwin.material.depthWrite = !1), (e.wireframeTwin.material.depthTest = !1), (e.wireframeTwin.material.opacity = 0.5), (e.wireframeTwin.material.transparent = !0)), w.wireframe ? t.add(e.wireframeTwin) : t.remove(e.wireframeTwin)) }) }), y.add(w, 'skyboxWireframe').onFinishChange(function () { w.skyboxWireframe ? ((t.skybox.wireframe = new C.WireframeHelper(t.skybox)), t.add(t.skybox.wireframe)) : (t.remove(t.skybox.wireframe), (t.skybox.wireframe = null)) }), y.add(w, 'showSweeps').onFinishChange(function () { t.setSweepVisibility(w.showSweeps) }), y.add(w, 'showMesh').onFinishChange(function () { t.chunks.forEach(function (e) { e.visible = w.showMesh }) }), y.add(w, 'showFloors').onFinishChange(function () { t.floors.forEach(function (e) { e.collider.children.forEach(function (e) { e.material.visible = w.showFloors }) }) }), y.add(w, 'showSkyboxes').onFinishChange(function () { t.panos.forEach(function (e) { e.skyboxMesh.visible = w.showSkyboxes }) }), y.add(w, 'showNeighbors').onChange(function () {}), y.add(t, 'alpha', 0, 1) }) }, { '../enum/Colors': 19, '../enum/Viewmode': 51, '../enum/WarpStyle': 52, '../lib/dat.gui': 93, '../tag/tag': 123, '../settings': 166, '../util/easing': 186, three: 217 } ], 64: [ function (c, h, e) { ;(function (e) { 'use strict' function i(e, t, i, n) { $('.gui-error .error-problem-text').text(e), $('.gui-error .error-solution-text').text(t), $('.gui-error .error-explanation').text(i), $('.gui-error .error-actions').html(n), $(window).resize(), $('.gui-error').fadeIn(), $('#bottom-logo').fadeIn() } function n(e) { var t = [ '
    ', '
    ', '', '', '
    ', '
    ', '', '', '
    ', '
    ', '', '', '
    ', '
    ', '', '', '
    ', '
    ' ].join('') i(e, s.ERROR_BROWSER_SOLUTION, s.ERROR_BROWSER_EXPLANATION, t), r.isMobile() || $('[rel=tiletip]').tooltip({ placement: 'bottom', delay: { show: 50, hide: 0 }, trigger: 'hover', viewport: { selector: 'body', padding: 10 } }) } function t() { var e = r.isMobile() ? '' : '' + s.ERROR_GENERIC_ACTIONS_2 + '' + s.ERROR_GENERIC_ACTIONS_3, t = [s.ERROR_GENERIC_ACTIONS_1, e].join('') i(s.ERROR_GENERIC_PROBLEM, s.ERROR_GENERIC_SOLUTION, '', t), r.isMobile() || $('.install-browser').on('click touchstart', function (e) { e.preventDefault(), e.stopPropagation(), n(' ') }) } var r = c('./../util/browser'), o = c('./../analytics'), a = c('./../settings'), s = c('../localization/localize'), l = new (c('./../util/logger'))(e) h.exports.error = function (e) { if ( ($('head title').text(a.pageTitle), $('#gui-message, #gui-loading, #nprogress, #gui-thumb, #bottom-logo').hide(), $('#gui-loading').fadeOut(250), $('#quick-blackout').hide(), o.track('showcase_error', { error_key: e }), s.locale || s.init(), 'webgl-unsupported' === e) ) r.isMobile() ? t() : n(s.ERROR_WEBGL_UNSUPPORTED_PROBLEM) else if ('webgl-ios' === e) i(s.ERROR_WEBGL_IOS_PROBLEM, s.ERROR_WEBGL_IOS_SOLUTION, '', s.ERROR_WEBGL_IOS_ACTIONS_1 + '' + s.ERROR_WEBGL_IOS_ACTIONS_2 + '.') else if ('webgl-safari' === e) i( s.ERROR_WEBGL_SAFARI_PROBLEM, '', '', s.ERROR_WEBGL_SAFARI_ACTIONS_1 + '' + s.ERROR_WEBGL_SAFARI_ACTIONS_2 + '. ' + s.ERROR_WEBGL_SAFARI_ACTIONS_3 + '' + s.ERROR_WEBGL_SAFARI_ACTIONS_4 + '.' ) else if ('webgl-generic' === e) t() else if ('missing-urls' === e) i(s.ERROR_MISSING_URLS_PROBLEM, '', s.ERROR_MISSING_URLS_EXPLANATION) else if ('loading-failed' === e) i( s.ERROR_LOADING_FAILED_PROBLEM, '', '', s.ERROR_LOADING_FAILED_ACTIONS_1 + '' + s.ERROR_LOADING_FAILED_ACTIONS_2 + '.' ) else { if ('loading-failed-maintenance' !== e) return void l.error('Unhandled error: ' + e) i(s.ERROR_MAINTENANCE_PROBLEM, s.ERROR_MAINTENANCE_SOLUTION) } } }).call(this, '/js/gui/error.js') }, { '../localization/localize': 108, './../analytics': 4, './../settings': 166, './../util/browser': 182, './../util/logger': 189 } ], 65: [ function (Oe, Le, e) { ;(function (e) { 'use strict' function c() { for (var e in Ce) if (Ce.hasOwnProperty(e)) { var t = Ce[e] if (!t.visible) for (var i = 0; i < t.elements.length; i++) $(t.elements[i]).hide() } Ce.highlight.visible && $('.pinBottom').addClass('highlightExists'), !1 === Ce.tourControls.visible && $('#drawer').addClass('fullWidth'), (ge = []), Ce.floors.visible && ge.push('.gui-floor', '.gui-floor-title'), ge.push('.hideTarget', '.pinTop.right') } function v(e, t) { var i = !S.isMobile() && M.zoom.enabled && t.mode === ie.PANORAMA && !e.tourIsPlaying $('#gui-zoomin').toggle(i), $('#gui-zoomout').toggle(i) } function l() { n(), $('.pinBottom').toggleClass('open'), $('#drawer').toggleClass('open'), $('.footer').toggleClass('open'), $('#drawer').hasClass('open') ? ($('#pullTab .icon').attr('data-original-title', se.CLOSE_HIGHLIGHTS), _e('highlights')) : ($('#pullTab .icon').attr('data-original-title', se.OPEN_HIGHLIGHTS), O.resetDrawer()), setTimeout( function () { $('#pullTab').toggleClass('opened') }, $('#drawer').hasClass('open') ? 0 : M.highlightAnimationDuration ), $('.pinBottom').hasClass('open') && t($('.vr-popup')) && $('.vr-popup').is(':visible') && X.dismiss() } function t(e) { var t return ( 'none' !== e.css('display') ? (t = e.position().top + e.outerHeight()) : (e.attr('style', 'visibility: hidden'), (t = e.position().top + e.outerHeight()), e.attr('style', 'display: none')), $('#player').outerHeight() - 130 < t + 25 ) } function y(e) { 'touchstart' === e.type && e.preventDefault(), e.stopPropagation() } function n() { w && (w.reload(), w.init()) } function r() { $('#gui-spinner').stop(!0, !0), $('#gui-spinner').fadeOut(1e3), !(Ae = !0) } function A(e, t) { var i = e.mode, n = t || e.currentPano $('#gui-modes-dollhouse').toggleClass('active', i === ie.DOLLHOUSE), $('#gui-modes-floorplan').toggleClass('active', i === ie.FLOORPLAN), $('#gui-modes-inside').toggleClass('active', i === ie.PANORAMA), i === ie.PANORAMA ? ($('#view-controllers').slideUp(500), M.show360Views.enabled && !n.isAligned() ? ($('.gui-floor').addClass('hidden'), $('#gui-modes-outside').addClass('desktop-only')) : ($('.gui-floor').removeClass('hidden'), $('#gui-modes-outside').removeClass('desktop-only')), $('#gui-modes-outside').removeClass('hidden')) : i !== ie.TRANSITIONING && (r(), (pe = i), $('#gui-modes-outside').addClass('hidden'), e.model.has360Views && $('.gui-floor').removeClass('hidden'), $('#view-controllers').is(':visible') || $('#view-controllers').slideDown(M.guiAnimationSpeed)) } function C(t, i) { function e() { document.getElementById('vr').classList.remove('hidden'), M.vr.allowWebVR ? S.getVRDisplay().then( function (e) { S.supportsFullscreen() ? (function (e) { ue.info(e.displayName + ' detected, VR button activates WebVR experience'), Q.init(t.data, i, e, x), Q.on(J.OPENED, _e.bind(gui, 'vr')), Q.on(J.SHOW_TERMS, W.show.bind(W)) })(e) : (ue.warn('Unable to use WebVR when full screen is not supported'), $('.improper-embed').toggleClass('hidden', !1), n()) }, function (e) { n() } ) : n() } function n() { var e ue.info('WebVR support not found, VR button activates native app VR modal'), X.init(t.data, x), X.on( Z.OPENED, ((e = document.getElementById('vr-modal')), function () { _e('vr'), V.open(e) }) ), X.on(Z.CLOSED, V.reset) } if (M.vr.enabled && t.supportsVR && !S.valueFromHash('mls', 0)) switch (M.vr.option) { case le.CONTEXTUAL: e() break case le.ANDROID: S.detectAndroid() && e() break case le.NONE: } } function h(e, i) { for (var n = $('.gui-floor'), t = 0; t < e.floors.length; t++) if ('372' !== getQueryVariable('m')) { var r = $('
    ').text(e.floors.get(t).name) $('.gui-floor').find('.container').prepend(r) } n.find('.container').prepend(''), n.on('click', function (e) { y(e), _e('floor'), n.toggleClass('open') }), $('.floorChoice').on('click', function (e) { y(e) var t = $(this).data('index') 'all' !== t ? (R.updateInteraction(oe.InteractionGui, 'floor-control'), i.player.gotoFloor(t), R.track('showcase_gui', { gui_action: 'click_floor_select_button', interaction_source: 'gui' })) : (R.updateInteraction(oe.InteractionGui, 'floor-control'), _e('move'), i.allFloors(), R.track('showcase_gui', { gui_action: 'click_toggle_all_floors_button', interaction_source: 'gui' })), n.removeClass('open') }) } function I(e, t) { e && (t === ie.DOLLHOUSE || t === ie.FLOORPLAN ? ($('.allFloorBtn').show(), $('.gui-floor-icon').hide(), $('.gui-floor-title').show()) : ($('.allFloorBtn').hide(), $('.gui-floor-icon').show(), $('.gui-floor-title').hide()), e.model.allFloorsVisible ? ($('.gui-floor-title').text(se.FLOOR_ALL), $('.gui-floor-number').text(se.FLOOR_ALL), $('.floorChoice').removeClass('active'), $('.floorChoice[data-index="all"]').addClass('active')) : ($('.gui-floor-title').text(e.name), $('.gui-floor-number').text(' ' + (e.floorIndex + 1)), $('.floorChoice').removeClass('active'), $('.floorChoice[data-index=' + e.floorIndex + ']').addClass('active'))) } function E() { var e = $('#player').width() - 20, t = $('#scroller'), i = $('#drawer'), n = $('.pinBottom') $('#player').width() < 488 || $('#player').height() < 488 ? (t.addClass('hidden'), i.addClass('noScroll'), n.addClass('noScroll')) : e < T != !i.hasClass('noScroll') && (t.toggleClass('hidden'), i.toggleClass('noScroll'), n.toggleClass('noScroll')) } function _(e) { e.waitQueue.length <= 0 ? r() : ye || (function (e) { ;(e = e || 0), (Ae = !1), window.setTimeout( function () { Ae || (!0, $('#gui-spinner').stop(!0, !0).show()) }.bind(this), e ) })(M.modelComponentLoadSpinnerDelay) } function b(e, t) { for (var i = []; e; ) i.push(e), (e = e.parentNode) for (; t && -1 === i.indexOf(t); ) t = t.parentNode return t } var w, T, o, a, x, i, s, u, d, p, f, g, S = (Oe('three'), Oe('../util/ajax'), Oe('../util/browser')), M = Oe('../settings'), R = Oe('../analytics'), m = (Oe('../util/transitions'), Oe('../util/camera'), Oe('../util/logger')), P = (Oe('../objects/Snapshot'), Oe('./helpManager')), O = Oe('./immersiveMode'), L = Oe('./loadingScreen'), D = Oe('./landingScreen'), N = Oe('./playButton'), F = Oe('./populateModal'), B = Oe('./memoryUsage'), V = Oe('./closer/modalCloser'), k = Oe('./closer/ModalCloserEvent'), U = Oe('./help/help'), H = Oe('./help/HelpEvent'), z = Oe('./title/titleBar'), G = Oe('./title/TitleEvents'), W = Oe('./terms/terms'), j = Oe('./terms/TermsEvent'), Y = Oe('./title/tagToggle'), q = Oe('./tourInteraction'), X = Oe('./vr/vrModal'), Z = Oe('./vr/vrEvent'), K = Oe('./sharing/modal'), Q = Oe('./webvr/webVRgui'), J = Oe('./webvr/WebVrEvent'), ee = Oe('../controls/serializer'), te = Oe('../enum/Keys'), ie = Oe('../enum/Viewmode'), ne = (Oe('../enum/BlackoutStyle'), Oe('../tag/Media/MediaEvent')), re = (Oe('../enum/PathDiscardMode'), Oe('../enum/PathDisplayMode'), Oe('../enum/DirectorEvents'), Oe('../enum/PlayerEvents')), oe = Oe('../enum/ControlEvents'), ae = Oe('./sharing/ShareEvents'), se = Oe('../localization/localize'), le = (Oe('../enum/Vectors'), Oe('../enum/WarpStyle'), Oe('../enum/AlignmentType'), Oe('../enum/VROption')), ce = Oe('./konami'), he = Oe('../lib/dat.gui'), ue = new m(e), de = (Oe('../util/showcase'), Oe('../enum/ZoomEvents')), pe = ie.DOLLHOUSE, fe = 0, ge = ['.hideTarget'], me = null, ve = null, ye = !1, Ae = !1, Ce = { coBrand: { visible: !0, elements: ['.co-brand', '#loaderCoBrand'] }, help: { visible: !0, elements: ['.nav-help', '#nav-help'] }, tourControls: { visible: !0, elements: ['.next', '.previous', '#play'] }, highlight: { visible: !0, elements: ['#drawer', '#pullTab'] }, share: { visible: !0, elements: ['.socialButton', '#share'] }, fullScreen: { visible: !0, elements: ['#gui-fullscreen'] }, floors: { visible: !0, elements: ['.gui-floor'] } }, Ie = ((g = document.getElementById('drawer')), function () { $('#player').height() < 400 && g.classList.contains('open') && l() }), Ee = ((f = document.getElementById('meta-info')), function () { $('#player').height() < 400 && f.classList.contains('expand') && z.toggleMeta(!0) }), _e = ((i = document.getElementById('meta-info')), (s = document.getElementById('interaction-modal')), (u = $('#drawer').eq(0)), (d = $('.gui-floor').eq(0)), (p = $('.vr-popup').eq(0)), function (e) { switch (e) { case 'info': we(), Te(), Ie(), Me(), Re(), xe(), Pe() break case 'terms': be(), Te(), Se(), Me(), Re(), xe(), Pe() break case 'help': be(), we(), Me(), Re(), xe(), Pe() break case 'vr': be(), we(), Me(), Re(), Te(), Pe(), t(p) && Se() break case 'highlights': Ee(), we(), Me(), Re() break case 'share': be(), we(), Te(), Re(), xe(), Pe() break case 'floor': we(), Me(), xe() break case 'view': Re(), Me(), we(), xe() break case 'tour': case 'move': we(), Me(), Re(), xe() break case 'resize': be(), Ie(), Re() break case 'tag': we(), Te(), Me(), Re(), xe() } }) function be() { i.classList.contains('expand') && z.toggleMeta(!0) } function we() { W.hide() } function Te() { U.close() } function xe() { X.dismiss() } function Se() { u.hasClass('open') && l() } function Me() { K.hide() } function Re() { d.hasClass('open') && d.removeClass('open') } function Pe() { s.classList.contains('fadeIn') && (s.classList.contains('landing') ? D.dismissModal() : s.classList.contains('tour') && q.dismissModal()) } $(document).on('fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange', function (e) { $('#gui-fullscreen').toggle(!S.isFullscreen()), $('#gui-fullscreen-exit').toggle(!!S.isFullscreen()), setTimeout(function () { $('.icon:visible').hide().show(0) }, 100) }), $('#gui-fullscreen') .find('a') .on('click', function (e) { y(e), S.requestFullscreen($('body')[0]), R.track('showcase_gui', { gui_action: 'click_enter_fullscreen', interaction_source: 'gui' }) }), $('#gui-fullscreen-exit') .find('a') .on('click', function (e) { y(e), S.exitFullscreen(), R.track('showcase_gui', { gui_action: 'click_exit_fullscreen', interaction_source: 'gui' }) }), $(window) .on('resize', function (e) { var t = e.target.innerHeight, i = e.target.innerWidth ;(t === o && i === a) || (Ce.highlight.visible && E(), _e('resize'), $('.pinTop.right').removeClass('hideUnderMeta'), n(), (o = t), (a = i)) }) .resize(), S.supportsFullscreen() || $('#gui-fullscreen').hide(), $('#pullTab').on('click', function (e) { y(e), $('#drawer').hasClass('open') ? (R.trackAlways('showcase_gui', { gui_action: 'hide_highlight_reel' }), $(this).addClass('open').children('img').attr('src', 'images/auto.png')) : (R.trackAlways('showcase_gui', { gui_action: 'show_highlight_reel' }), $(this).removeClass('open').children('img').attr('src', 'images/auto-suspend.png')), l() }), window.DATA.showHotListSta && ($('#hotList').css('display', ''), $('#hotList').on('click', function (e) { y(e) var t = $('#hotListWrap')[0] t.classList.contains('hotListActive') ? (t.classList.remove('hotListActive'), this.classList.remove('active')) : (t.classList.add('hotListActive'), this.classList.add('active')) }), $('#hotListContent ul').on('mouseover', function (e) { y(e) var t = e.target, i = document.getElementById('hotListWrap') if ('SPAN' === t.tagName) { var n = t.parentElement.parentElement t.offsetWidth + 116 >= n.clientWidth ? (i.style.width = t.offsetWidth + 116 + 'px') : (i.style.width = '') } else if ('LI' === t.tagName) { n = t.parentElement t.children[0].offsetWidth + 116 >= n.clientWidth ? (i.style.width = t.children[0].offsetWidth + 116 + 'px') : (i.style.width = '') } else i.style.width = '' }), $('#hotListContent ul').on('click', function (e) { y(e), this.preElem && this.preElem.classList.remove('active'), 'SPAN' === e.target.tagName ? (e.target.parentElement.classList.add('active'), e.target.parentElement.hot && e.target.parentElement.hot.examine(!0), (this.preElem = e.target.parentElement)) : (e.target.classList.add('active'), e.target.hot && e.target.hot.examine(!0), (this.preElem = e.target)) }), $('#hotListClose').on('click', function (e) { y(e), $('#hotListWrap')[0].classList.remove('hotListActive'), $('#hotListContent ul .active').removeClass('active'), $('#hotList')[0].classList.remove('active') })), 'true' === window.DATA.supportsVR && $('#vr').css('display', ''), $('#more-menu-button').on('click', function (e) { y(e), $('#more-menu').toggleClass('open') }), (Le.exports.init = function (s, l, c, e, t, i, n) { var r ;(x = n), s.outsideAllowed() || $('#gui-modes-outside').addClass('invisible'), s.supportedModes[ie.PANORAMA] || $('#gui-modes-inside').addClass('invisible'), F.init(), D.init(s, i), ce.init(s, l, e), $('.icon').on('mouseover', function () { l.player && l.player.reticule.hide() }), (function (e, t) { var i = t.player $('#gui-modes-inside').on('mousedown touchstart', function (e) { y(e), R.updateInteraction(oe.InteractionGui, 'inside-button'), R.track('USER', { event_type: 'showcase_gui', gui_action: 'click_inside_mode_button' }), t.changeMode(ie.PANORAMA) }), $('#gui-modes-outside') .find('a') .on('click', function (e) { y(e), R.track('showcase_gui', { gui_action: 'click_outside_mode_button' }), t.changeMode(pe) }), $('#gui-modes-floorplan').on('click', function (e) { y(e), i.mode !== ie.FLOORPLAN && (R.track('showcase_gui', { gui_action: 'click_floorplan_mode_button' }), t.changeMode(ie.FLOORPLAN)) }), $('#gui-modes-dollhouse').on('click', function (e) { y(e), i.mode !== ie.DOLLHOUSE && (R.track('showcase_gui', { gui_action: 'click_dollhouse_mode_button' }), t.changeMode(ie.DOLLHOUSE)) }) })(0, l), (function (e, t) { $('#play').on('mousedown touchstart', function (e) { y(e), _e('tour'), q.play(), R.trackAlways('showcase_gui', { gui_action: 'play_highlights' }) }), (window.startAndPlay = function (e) { _e('tour'), q.play(), R.trackAlways('showcase_gui', { gui_action: 'play_highlights' }) }), $('#pause').on('mousedown touchstart', function (e) { y(e), q.pause(), R.trackAlways('showcase_gui', { gui_action: 'pause_highlights' }) }), $('#gui-zoomin') .find('a') .on('click', function (e) { y(e), t.player.zoomInIncrementally() }), $('#gui-zoomout') .find('a') .on('click', function (e) { y(e), t.player.zoomOutIncrementally() }) })(0, l), s.data.enable_social_sharing && s.data.is_public && M.share.enabled && (K.init(DATA.name /* s.data.name */), K.on( ae.OPENED, ((r = document.getElementById('share-modal')), function () { _e('share'), V.open(r) }) ), K.on(ae.CLOSED, V.reset)), 0 < s.heroLocations.length ? (function (e, i, t) { var n = 100 / (fe = e.heroLocations.length) + '%', r = $('#thumb-container'), o = $('#progressBar') $('#status').find('.totalSteps').text(fe) for (var a = 0; a < fe; a++) { var s = e.heroLocations[a], l = $('
  • ') if (s.heroLocations) { //有子项,选第一张截图 var tmp = s.heroLocations[0].thumbUrl.replace('https://', '').replace('http://', '') } else { var tmp = s.thumbUrl.replace('https://', '').replace('http://', '') } if ( (l.attr('data-index', a), //Ce.highlight.visible && l.find("img").attr("src",'https://'+tmp), Ce.highlight.visible && l.find('img').attr('src', 'http://' + tmp), // xzw改 导览图片 https在某些服务器打不开 s.name) ) { var c = $('
    ').text(s.name) l.prepend(c) } if (e.has360Views && s.cameraMode === ie.PANORAMA) { var h = e.panos.get(s.panoId), u = h && !h.isAligned() ? '
    ' : '
    ' l.prepend(u) } r.append(l), o.append('
    ') } ;(T = 144 * fe), 111 * fe, $('.thumbImg').on('mouseover', function () { !(function (e) { return e.describe().inTransition })(i) && t.showPathToHeroLocation([$(this).data('index'), 0]) //改 }), $('.thumbImg').on('mouseout', function () { i.clearPath() }), $('.thumbImg').on('click', function (e) { y(e) var t = $(this) R.updateInteraction(oe.InteractionGui, 'thumbnail'), R.trackAlways('showcase_gui', { gui_action: 'click_highlight' }), i.goToHighlight([t.data('index'), 0]) //改 }), $('.previous') .find('a') .on('click', function (e) { y(e), R.trackAlways('showcase_gui', { gui_action: 'prev_highlight' }), i.prevHighlight() }), $('.next') .find('a') .on('click', function (e) { y(e), R.trackAlways('showcase_gui', { gui_action: 'next_highlight' }), i.nextHighlight() }), $('#drawer').on('mouseleave', function (t) { var i y(t) try { i = new MouseEvent('mouseup', { clientX: t.clientX, clientY: t.clientY, screenX: t.screenX, screenY: t.screenY }) } catch (e) { ;(i = document.createEvent('MouseEvents')).initMouseEvent( 'mouseup', t.bubbles, t.cancelable, t.view, t.detail, t.screenX, t.screenY, t.clientX, t.clientY, t.ctrlKey, t.altKey, t.shiftKey, t.metaKey, t.button, t.relatedTarget ) } document.dispatchEvent(i) }), (w = new Sly($('#scrollFrame'), { horizontal: !0, itemNav: 'centered', smart: !0, scrollTrap: !0, scrollBy: 1, mouseDragging: !0, touchDragging: !0, speed: 300, dragHandle: !0, dynamicHandle: !0, clickBar: !0, scrollBar: $('#scroller'), activateOn: null }).init()).on('active', function (e, t) { t, _e('tour'), $('.step').removeClass('active'), $('#status') .find('.curIdx') .text(t + 1) for (var i = 0; i <= t; i++) $('#progressBar') .find("[data-idx='" + i + "']") .addClass('active') }), E() //add : let scrollFrame = $(w.frame) scrollFrame.on('wheel.sly', function () { lastMoveScrollTime = Date.now() }) let dragstart /* scrollFrame.on("pointerdown", function() { dragstart = true }) scrollFrame.on("pointerup", function() { dragstart = false }) */ scrollFrame.on('pointermove', function () { //if(dragstart){ lastMoveScrollTime = Date.now() //} }) })(s, l, c) : ((Ce.highlight.visible = !1), (Ce.tourControls.visible = !1)), z.on(G.OPEN_INFO, _e.bind(this, 'info')), (function () { var n document.body.addEventListener( 'mousedown', function (e) { n = 0 === e.button || 1 === e.which ? e.target : null }, !0 ), document.body.addEventListener( 'mouseup', function (t) { n !== t.target && (n = b(n, t.target)) var e = document.getElementById('gui-parent') if ((b(e, n) !== e && (n = null), n)) { var i try { i = new MouseEvent('click', t) } catch (e) { ;(i = document.createEvent('MouseEvents')).initMouseEvent( 'click', t.bubbles, t.cancelable, t.view, t.detail, t.screenX, t.screenY, t.clientX, t.clientY, t.ctrlKey, t.altKey, t.shiftKey, t.metaKey, t.button, t.relatedTarget ) } ;(i.syntheticClick = !0), n.dispatchEvent(i), (n = null) } }, !0 ), document.getElementById('gui-parent').addEventListener( 'click', function (e) { e.syntheticClick || (e.stopPropagation(), 'A' === e.target.nodeName && e.preventDefault()) }, !0 ) })(), A(c), C(s, t), s.on('floor.changed', I), s.on( 'waiting', function (e) { _(e) }.bind(this, s) ), s.on( 'waiting-done', function (e) { _(e) }.bind(this, s) ), c.on(re.ModeChanged, function (e, t) { A(c), v(l, c), t === ie.PANORAMA && c.currentPano && !c.currentPano.isAligned() && (t = ie.OUTDOOR), U.updateMode(t) }), e.on(oe.Move, _e.bind(this, 'move')), c.on(re.Ready, function () { O.init(e, c, c.tagManager, l), c.on(re.ModeChanged, function (e, t) { e !== t && $('.vr-popup').is(':visible') && X.dismiss() }) }), c.on(re.PanoChosen, function (e, t) { A(c, t), U.updateMode(t && !t.isAligned() ? ie.OUTDOOR : ie.PANORAMA) }), V.on(k.CLOSE, function (e) { switch (e) { case 'vr-modal': X.dismiss() break case 'share-modal': K.hide() break case 'terms-modal': W.hide() } }) var lastMoveScrollTime = 0 //add var o, h = $('#play').eq(0), u = $('#pause').eq(0), d = $('.pinBottom').toArray(), p = $('#drawer').eq(0), f = $('#playHead').eq(0), a = $('#progressBar').eq(0), g = $('#thumb-container').eq(0).children(), m = a.children() l.on('update.controls', function () { var e, t, i, n = l.describe() if ( (n.tourIsPlaying || c.isWarping() ? (Ce.tourControls.visible && (h.hide(), u.show()), n.tourInProgress && (d.forEach(function (e) { e.classList.add('playing') }), p.addClass('playing'), f.addClass('playing'))) : (Ce.tourControls.visible && (h.show(), u.hide()), n.tourInProgress || (q.stopTour(), d.forEach(function (e) { e.classList.remove('playing') }), p.removeClass('playing'), f.removeClass('playing'))), null !== n.currentItem) ) { var r, o $('#status') .find('.curIdx') .text(n.currentItem[0] + 1), n.onTheBus ? ((r = 'active'), (o = 'recent')) : ((o = 'active'), (r = 'recent')) var a = null === n.destinationItem || n.currentItem[0] === n.destinationItem[0] for (e = 0; e < s.heroLocations.length; e += 1) (i = g.eq(e)), (t = m.eq(e)), i.removeClass(o), t.removeClass(o), n.onTheBus && e === n.destinationItem[0] ? (i.addClass(r), t.addClass(r), // 如果一段时间内用户不拖拽滚动scroll,才focus回这个item Date.now() - lastMoveScrollTime > 2000 && w.activate(e)) : n.onTheBus && a && e === n.currentItem[0] ? (i.addClass(r), t.addClass(r)) : (i.removeClass(r), t.removeClass(r)) } else for (e = 0; e < s.heroLocations.length; e += 1) (i = g.eq(e)), (t = m.eq(e)), i.removeClass('active recent'), t.removeClass('active recent') v(l, c) }), document.addEventListener( 'keydown', function (e) { switch ((R.updateInteraction(oe.InteractionKey), e.which)) { case te.ZERO: M.debug && s.toggleAlpha() break case te.NINE: M.debug && B.toggle() break case te.ONE: c.isInMode(ie.TRANSITIONING) || l.changeMode(ie.PANORAMA) break case te.TWO: s.outsideAllowed() && !c.isInMode(ie.DOLLHOUSE, ie.TRANSITIONING) && l.changeMode(ie.DOLLHOUSE) break case te.THREE: s.outsideAllowed() && !c.isInMode(ie.FLOORPLAN, ie.TRANSITIONING) && l.changeMode(ie.FLOORPLAN) break case te.FOUR: c.isInMode(ie.TRANSITIONING) || l.changeMode(ie.OUTDOOR) break case te.SPACE: Ce.tourControls.visible && ($('#playHead').hasClass('playing') || _e('tour')) break case te.RETURN: M.debug && s.toggleExplodeUp() break case te.P: !(function (e) { me.gui || (me.gui = (function (e) { var t = new he.GUI() return ( t .add(M, 'showSweeps') .name('Show sweeps') .onFinishChange(function () { e.setSweepVisibility(M.showSweeps) }), t.add(M, 'rotationAccelerationInside', 0.1, 10).name('Rotation speed').step(0.1), t .add(M.transition, 'flyTime', 0, 5e3) .name('Transition time') .onFinishChange(function () { ;(M.transition.flySpeed = 0), t.__controllers.forEach(function (e) { e.updateDisplay() }) }), t.add(M.path, 'opacity', 0, 1).name('Path opacity'), $(t.__closeButton).hide(), t ) })(me.model)), (me.visible = e) ? $(me.gui.domElement).show() : $(me.gui.domElement).hide() })(!me.visible) break case te.U: !(function (e) { ve.gui || (ve.gui = (function (t, i) { function e() { var e = i.toJSON() ;(n.linkToLocation = window.location.protocol + '//' + window.location.host + window.location.pathname + '?m=' + t.sid + '&start=' + ee.serialize(e)), i.tagManager.activeTag && (n.linkToLocation += '&tag=' + i.tagManager.activeTag.sid) } var n = {}, r = new he.GUI({ autoPlace: !0, width: '60%' }) return ( e(), i.on(re.ViewChanged, e), r.add(n, 'linkToLocation').name(se.LINK_TO_LOCATION).listen(), (r.domElement.id = 'datLinks'), [].slice.call(r.domElement.querySelectorAll('.property-name')).forEach(function (e) { if (!S.detectSafari()) { var t = document.createElement('button') t.classList.add('btn-deep-link'), (t.innerText = se.MENU_COPY), e.nextSibling.appendChild(t) var n = function () { alert(se.LINK_ALERT_COPY), t.hide() } t.addEventListener('click', function (e) { try { var t = e.target.parentNode.childNodes[0] t.select() var i = document.execCommand('copy') t.blur(), i || n() } catch (e) { n() } }) } }), $(r.__closeButton).hide(), r ) })(ve.model, ve.player)), (ve.visible = e) ? $(ve.gui.domElement).show() : $(ve.gui.domElement).hide() })(!ve.visible) break case te.X: M.debug && s.toggleExplode() break case te.PLUSEQUALS: l.player.activatePersistentZooming(!0), O.hideUi() break case te.DASHUNDERSCORE: l.player.activatePersistentZooming(!1), O.hideUi() break case te.SEVEN: ue.info('Zoom level: ' + l.player.zoomLevel + ', FOV: ' + l.player.zoomFov) break case te.EIGHT: l.player.decreaseZoomSpeed() break case te.NINE: l.player.increaseZoomSpeed() } return c && c.reticule.hide(), !0 }.bind(this) ), document.addEventListener( 'keyup', function (e) { switch (e.which) { case te.PLUSEQUALS: l.player.deactivatePersistentZooming() break case te.DASHUNDERSCORE: l.player.deactivatePersistentZooming() } }.bind(this) ), (function (e) { me = { gui: null, visible: !1, model: e } })(s), (function (e, t) { ve = { gui: null, visible: !1, model: e, player: t } })(s, l.player), (function (e) { function t(e, i) { $(e) .find('a') .each(function (e, t) { i ? $(t).removeClass('buttonZoomDisabled').addClass('buttonZoomEnabled') : $(t).addClass('buttonZoomDisabled').removeClass('buttonZoomEnabled'), (t.style.pointerEvents = i ? 'auto' : 'none') }) } e.on(de.ZoomMax, function () { t('#gui-zoomin', !1), t('#gui-zoomout', !0) }), e.on(de.ZoomMin, function () { t('#gui-zoomin', !0), t('#gui-zoomout', !1) }), e.on(de.ZoomIn, function () { t('#gui-zoomout', !0) }), e.on(de.ZoomOut, function () { t('#gui-zoomin', !0) }), e.zoomLevel >= M.zoom.max ? t('#gui-zoomin', !1) : t('#gui-zoomin', !0), e.zoomLevel <= M.zoom.min ? t('#gui-zoomout', !1) : t('#gui-zoomout', !0) })(c), P.setAutoPlay(s.heroCount()), U.init(c, i.mode), U.on(H.OPENED, _e.bind(this, 'help')), W.init(), W.on( j.OPENED, ((o = document.getElementById('terms-modal')), function () { _e('terms'), V.open(o) }) ), W.on(j.CLOSED, V.reset), M.quickstart.enabled || D.delayLanding(i.mode).then(D.showMessage.bind(this, c, l, Ce.coBrand.visible)), (M.quickstart.enabled || c.model.outsideAllowed()) && O.init(e, c, c.tagManager, l), M.profiling.enabled && B.show(), q.init(l) }), (Le.exports.startLoading = function (e, t, i, n, r, o) { function a() { o.setLoadingStartTime(), (function () { function e(e) { e.target === t || $.contains(t, e.target) || e.target === i || $.contains(i, e.target) || e.target === n || $.contains(n, e.target) } $('body').css('touch-action', 'none'), $('#gui-parent') .find('*:not(#tag-billboards)') .on('touchmove', function (e) {}) var t = document.getElementById('terms-text'), i = document.getElementById('more-help-wrapper'), n = (document.getElementById('navigation-help-wrapper'), document.getElementById('help-dialog'), document.getElementById('tag-billboards')) M.useWheel && (document.body.addEventListener('mousewheel', e, { passive: !1 }), document.body.addEventListener('DOMMouseScroll', e)), $('#terms-text, #more-help-wrapper, #navigation-help-wrapper') .off('touchmove') .on('touchmove', function (e) { e.stopPropagation() }) })(), r ? (D.showMessage(t, i, Ce.coBrand.visible), l()) : (function (e) { L.show(e), c() })(l) } var s = $.Deferred(), l = s.resolve.bind(s) ;(ye = !0), _(e) e.data.player_options && (function (e) { Ce.tourControls.visible = true //e.tour_buttons && S.valueFromHash("gt", 1), ;(Ce.coBrand.visible = e.presented_by && 1 !== M.specialEdition && M.brand && !S.valueFromHash('mls', !1)), (Ce.highlight.visible = /* e.highlight_reel && */ 1 !== M.specialEdition && M.showHighlights) })(e.data.player_options), 1 === M.specialEdition && $('body').addClass('specialEdition') se.localizeGUI() !(function (i) { function e(e, t) { return !!i.player_options[e] && i[t || e] } $('.model-title').text(i.name) var t = M.pageTitle 2 !== S.valueFromHash('mls', 0) && i.name && (t = i.name), (document.title = t), S.isMobile() ? $('#gui-fullscreen').css('display', 'none') : ($('[rel=tooltip]').tooltip({ delay: { show: 50, hide: 0 }, trigger: 'hover', html: !1, viewport: { selector: 'body', padding: 10 } }), S.inIframe() && document.getElementsByClassName('pinBottom-container')[0].classList.add('embed')), z.populate({ name: e('model_name', 'name'), coBrand: e('presented_by'), description: e('model_summary', 'summary') || '暂无内容', contactName: e('contact_name'), address: e('address'), phone: e('contact_phone'), formattedPhone: i.formatted_contact_phone, email: e('contact_email'), url: e('external_url'), socialSharing: i.enable_social_sharing && i.is_public }) })(e.data) r || $('.quick').addClass('hidden') n ? (R.impression(), a()) : (o.setWaitingStartTime(), N.show(r, a)) return s }), (Le.exports.endLoading = function (e, t, i) { var n = t.player function r() { i.dismissExaminedTag(), i.disableHovering() } $('#gui-thumb').fadeOut(2500), L.hide(function () { ye = !1 }), Y.init(e, i), z.finishSetup(Object.keys(e.tags).length), i.on(ne.IMAGE_OPENED, _e.bind(this, 'tag')), X.on(Z.OPENED, r), K.on(ae.OPENED, r), U.on(H.OPENED, r), W.on(j.OPENED, r) var o = i.enableHovering.bind(i) if ( (X.on(Z.CLOSED, o), K.on(ae.CLOSED, o), U.on(H.CLOSED, o), W.on(j.CLOSED, o), M.labels.enabled && Object.keys(e.labels).length, e.floors.length <= 1 || !Ce.floors.visible ? (Ce.floors.visible = !1) : (h(e, t), I(e.currentFloor, n.mode)), '372' === getQueryVariable('m') && ((Ce.floors.visible = 1), h(e, t)), c(), v(t, t.player), $('#gui').fadeIn(1500), Ce.highlight.visible && (2 !== M.startHighlights || e.has360Views) && setTimeout(function () { l(), ((!e.has360Views && 1 !== M.startHighlights) || (e.has360Views && 0 === M.startHighlights)) && setTimeout(l, 2e3) }, 2e3), !S.isMobile()) ) for (var a = ['a', '#title-toggle', '.next-button', '.prev-button', '.gui-floor', '.meta-toggle', '.thumbImg', 'logo-button'], s = 0; s < a.length; s++) $(a[s]).addClass('hasHover') _(e), z.setupToggling(), window.editHotPanel && editHotPanel(), (function () { var i = $('#pullTab'), e = { bottom: { 'border-bottom-left-radius': '10px', 'border-bottom-right-radius': '10px' }, top: { 'border-top-left-radius': '10px', 'border-top-right-radius': '10px' } }, t = { bottom: { 'border-top-right-radius': '10px', 'border-bottom-right-radius': '10px' }, top: { 'border-bottom-left-radius': '10px', 'border-top-left-radius': '10px' } } function n(e, t) { $('#gui-modes-map > div:visible:last').css(e), i.is(':visible') ? $('.viewContainer > div:visible:first').css(t) : $('#gui-modes-map > div:visible:first').css(t) } ;/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) ? n(e.bottom, e.top) : n(t.bottom, t.top) ;(window.DATA.model.special || 'true' === window.DATA.special) && window.specialScene && specialScene.special().afterImplement() })() $('.toolRight a').removeClass('hasHover') }), (Le.exports.onProgress = function (e) { L.progress(e) }) }).call(this, '/js/gui/gui.js') }, { '../analytics': 4, '../controls/serializer': 14, '../enum/AlignmentType': 17, '../enum/BlackoutStyle': 18, '../enum/ControlEvents': 21, '../enum/DirectorEvents': 23, '../enum/Keys': 30, '../enum/PathDiscardMode': 38, '../enum/PathDisplayMode': 39, '../enum/PlayerEvents': 40, '../enum/VROption': 47, '../enum/Vectors': 50, '../enum/Viewmode': 51, '../enum/WarpStyle': 52, '../enum/ZoomEvents': 53, '../lib/dat.gui': 93, '../localization/localize': 108, '../tag/Media/MediaEvent': 131, '../objects/Snapshot': 153, '../settings': 166, '../util/ajax': 181, '../util/browser': 182, '../util/camera': 183, '../util/logger': 189, '../util/showcase': 193, '../util/transitions': 195, './closer/ModalCloserEvent': 61, './closer/modalCloser': 62, './help/HelpEvent': 66, './help/help': 67, './helpManager': 68, './immersiveMode': 69, './konami': 70, './landingScreen': 71, './loadingScreen': 72, './memoryUsage': 73, './playButton': 74, './populateModal': 75, './sharing/ShareEvents': 76, './sharing/modal': 77, './terms/TermsEvent': 78, './terms/terms': 79, './title/TitleEvents': 80, './title/tagToggle': 81, './title/titleBar': 82, './tourInteraction': 84, './vr/vrEvent': 85, './vr/vrModal': 87, './webvr/WebVrEvent': 88, './webvr/webVRgui': 89, three: 217 } ], 66: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ OPENED: 'help.opened', CLOSED: 'help.closed' }) }, {} ], 67: [ function (e, t, i) { 'use strict' function n() { p.on('click', function (e) { T && T !== a.TRANSITIONING && (0 < window.getComputedStyle(v).getPropertyValue('opacity') && !x ? S.close() : T && T !== a.TRANSITIONING && ((x = !0), setTimeout(function () { x = !1 }, h.help.modalStayDuration), S.emit(l.OPENED), f.addClass('open ' + T), p.addClass('open'), o(), r(), v.style.removeProperty ? v.style.removeProperty('display') : v.style.removeAttribute('display'), v.classList.add('fadeIn'))) }), E.on('click', function (e) { S.close() }), C.on('click', function (e) { T && T !== a.TRANSITIONING && (o(), r()) }), I.on('click', function (e) { o(), I.addClass('underline-tab'), c.fill(b, s.MORE_HELP), f.addClass('more-help') }) } function r() { C.addClass('underline-tab'), c.fill(_, s.NAVIGATION, T), f.addClass(T) } function o() { f.removeClass('more-help ' + a.PANORAMA + ' ' + a.DOLLHOUSE + ' ' + a.FLOORPLAN + ' ' + a.OUTDOOR), A.forEach(function (e) { e.classList.remove('underline-tab') }) } var a = e('../../enum/Viewmode'), s = e('../../enum/HelpModalType'), l = e('./HelpEvent'), c = (e('../helpManager'), e('./../populateModal')), h = e('../../settings'), u = e('../../util/common'), d = e('events').EventEmitter, p = $('.footer-help').eq(0), f = $('#help-dialog').eq(0), g = document.querySelector('#quick-logo'), m = document.querySelector('#loaderCoBrand'), v = document.querySelector('#help-dialog'), y = document.querySelector('.footer'), A = $('.help-tabs').children().toArray(), C = $('.navigation-tab').eq(0), I = $('.more-help-tab').eq(0), E = ($('#interaction-modal').eq(0).find('.interaction').toArray(), f.find('.close').eq(0)), _ = f.find('.interactions').toArray(), b = f.find('.ui-instructions').toArray(), w = a.PANORAMA, T = a.PANORAMA, x = !1, S = { init: function (e, t) { ;(w = T = t), [v, m, g, y].forEach(function (e) { e.classList.add(c.deviceType) }), n() }, close: function () { if (f.hasClass('open') && (this.emit(l.CLOSED), p.removeClass('open'), f.removeClass('open'), v.classList.contains('fadeIn'))) { v.classList.remove('fadeIn') var e = T === a.TRANSITIONING ? w : T c.clear(_, s.NAVIGATION, e) } }, updateMode: function (e) { ;(w = T), (T = e) } } u.extendObject(S, d.prototype), (t.exports = S) }, { '../../enum/HelpModalType': 28, '../../enum/Viewmode': 51, '../../settings': 166, '../../util/common': 185, '../helpManager': 68, './../populateModal': 75, './HelpEvent': 66, events: 202 } ], 68: [ function (s, l, e) { ;(function (e) { 'use strict' var t = s('../util/browser'), i = s('./../util/logger'), n = s('./../settings'), r = new i(e), o = (function () { var t try { return (t = window.localStorage.getItem('visitCount') || '0'), (t = (parseFloat(t) + 1).toString()), window.localStorage.setItem('visitCount', t), r.debug('visitCount = ' + t), t } catch (e) { ;(t = '1'), r.debug("couldn't set local storage") } })(), a = !1 l.exports = { isHelpDisabled: function () { return '0' === t.valueFromHash('help', null) || a }, isLargeHelpEnabled: function () { return ('1' === o || '1' === t.valueFromHash('help', null)) && !this.isHelpDisabled() }, isSmallHelpEnabled: function () { return '2' === t.valueFromHash('help', null) && !this.isHelpDisabled() }, isHelpEnabled: function () { return this.isLargeHelpEnabled() || this.isSmallHelpEnabled() }, setAutoPlay: function (e) { a = 0 <= n.warp.auto && 1 < e } } }).call(this, '/js/gui/helpManager.js') }, { '../util/browser': 182, './../settings': 166, './../util/logger': 189 } ], 69: [ function (e, t, i) { 'use strict' function r(e) { M || (n(e) && C.hasClass('playing')) || (clearTimeout(x), (T = !0), h.close(), (function (e) { !n(e) && S ? v.forEach(function (e) { e.classList.remove('drawerOpen'), e.classList.add('duringTour') }) : C.hasClass('open') ? v.forEach(function (e) { e.classList.remove('duringTour'), e.classList.add('drawerOpen') }) : P || R === g.FLOORPLAN || R === g.DOLLHOUSE || v.forEach(function (e) { e.classList.add('fadeOut') }) })(e), R !== g.DOLLHOUSE && R !== g.FLOORPLAN && ((E.hasClass('expand') && !_.hasClass('closed')) || l.valueFromHash('title', 1), C.hasClass('playing') || (y.forEach(function (e) { e.classList.add('detectHover') }), (x = setTimeout(a, c.immersive.timeToShowAgain))))) } function o() { C.hasClass('playing') || (clearTimeout(x), (x = setTimeout(a, c.immersive.timeToShowAgain))) } function a() { clearTimeout(x), (T = !1), m.forEach(function (e) { e.classList.remove('drawerOpen') }), S || v.forEach(function (e) { e.classList.remove('duringTour') }), y.forEach(function (e) { e.classList.remove('detectHover') }) } function s() { T ? a() : r(), (M = !0), setTimeout(function () { M = !1 }, c.immersive.uiStayDuration) } function n(e) { return 'mouse' === e || 'touch' === e || 'key' === e || 'gui' === e } var l = e('../util/browser'), c = e('../settings'), h = e('./help/help'), u = e('../enum/tagEvents'), d = e('../enum/ControlEvents'), p = e('../enum/PlayerEvents'), f = e('../enum/DirectorEvents'), g = ((p = e('../enum/PlayerEvents')), e('../enum/Viewmode')), m = $('.pinTop.left, .pinBottom-container, #drawer-container, #drawer, .footer').toArray(), v = $('.pinBottom-container, #drawer-container, .footer').toArray(), y = $('#hover-bottom, #hover-top').toArray(), A = ($('#pullTab').eq(0), $('#playHead').eq(0), $('.pinBottom-container').eq(0)), C = $('#drawer').eq(0), I = $('#drawer-container').eq(0), E = $('#meta-info').eq(0), _ = $('.pinTop.left').eq(0), b = $('#player').eq(0), w = document.getElementById('pullTab'), T = !1, x = null, S = !1, M = !1, R = null, P = !1 ;(t.exports.init = function (e, t, i, n) { ;(function (t, i, e, n) { ;[g.PANORAMA, g.DOLLHOUSE, g.FLOORPLAN].forEach(function (e) { t.controls[e].on(d.Move, r), t.controls[e].on(d.LongTap, s) }), b.on('mousewheel DOMMouseScroll', r), e.on(u.TagActivated, r), e.on(u.TagNavigation, r), i.on(p.FlyingEnded, o), i.on(p.ModeChanging, function (e, t) { P = t !== g.PANORAMA && e !== g.PANORAMA }), i.on(p.ModeChanged, function (e, t) { ;(R = i.mode), t !== g.TRANSITIONING ? a() : r('modeChange') }), n.on(f.TourStart, function () { ;(S = !0), r() }), n.on(f.TourEnd, function () { ;(S = !1), a() }), n.on(f.ActionInterrupted, function () { S = !1 }), w.addEventListener( 'touchend', function () { $('#pullTab').hasClass('opened') && !S && a() }, !0 ) })(e, t, i, n), l.isMobile() ? (y.forEach(function (e) { e.classList.add('mobile') }), A.click(a)) : (y.forEach(function (e) { e.addEventListener( 'mouseleave', function () { !b.is(':hover') && y[0].classList.contains('detectHover') && a() }, !0 ) }), b.mouseleave(function () { y[0].classList.contains('detectHover') && a() })), (R = t.mode) }), (t.exports.hideUi = r), (t.exports.resetDrawer = function () { I.hasClass('duringTour') || ((S = !1), r('gui'), a()) }) }, { '../enum/ControlEvents': 21, '../enum/DirectorEvents': 23, '../enum/tagEvents': 32, '../enum/PlayerEvents': 40, '../enum/Viewmode': 51, '../settings': 166, '../util/browser': 182, './help/help': 67 } ], 70: [ function (i, n, e) { ;(function (e) { 'use strict' var t = i('./../util/logger'), o = i('./../settings'), a = i('./debug'), s = i('./../util/common'), l = (i('./gui'), new t(e)) o.console && $('body').append('
    '), (n.exports.init = function (i, n, r) { l.debug('konami has the modelInstance') var t = [] $(window).on('keydown', function (e) { t.push(e.which), t.length > o.secretPanelWord.length && t.shift(), s.equalLists(t, o.secretPanelWord) && (l.debug('Developer mode active.'), (o.debug = !0)) }), $(window).on('keydown', function e(t) { o.debug && 72 === t.which && (i && r ? (a.toggle(i, n, r), $(window).off('keydown', e)) : console.warn("sorry we're not ready yet")) }) }) }).call(this, '/js/gui/konami.js') }, { './../settings': 166, './../util/common': 185, './../util/logger': 189, './debug': 63, './gui': 65 } ], 71: [ function (e, t, i) { 'use strict' function r() { s.clear(m, l.LANDING[v]), g.removeClass('fadeIn') } var o = e('../settings'), a = (e('./help/help'), e('./helpManager')), s = e('./populateModal'), l = e('../enum/HelpModalType'), n = e('../enum/Viewmode'), c = e('../enum/DirectorEvents'), h = e('../enum/PlayerEvents'), u = $('#quick-blackout').eq(0), d = $('#quick-logo').eq(0), p = $('.quick-brand').toArray(), f = $('#loaderCoBrand').eq(0), g = $('#interaction-modal').eq(0), m = g.find('.interaction').toArray(), v = ($('#model-title, .pinBottom-container, #drawer-container, #drawer, .footer').toArray(), '') ;(t.exports.delayLanding = function (e) { var t = $.Deferred() e || t.resolve() var i = o.startupFlyinDelay return e === n.PANORAMA && (i += o.dollhouse.transitionTime), setTimeout(t.resolve.bind(t), i), t }), (t.exports.showMessage = function (e, t, i) { var n = 0 o.quickstart.enabled && ((function (e) { /* e && (f.addClass("quick-brand"), //quick-brand样式有问题 会遮住屏幕 d.before(f), p = $(".quick-brand").toArray()), */ u.addClass('fadeOut') /* setTimeout(function() { p.forEach(function(e) { e.classList.add("fadeIn") }) }, o.quickstart.showTextDelay), setTimeout(function() { p.forEach(function(e) { e.classList.add("fadeOut") }) }, o.quickstart.fadeOutDelay) */ })(i), (n = o.quickstart.showTextDelay + o.quickstart.fadeOutDelay)), (function (e, t) { setTimeout(function () { if (a.isHelpEnabled()) { if ((t(), s.init(), g.addClass('fadeIn landing ' + s.deviceType), a.isSmallHelpEnabled())) return void g.addClass('small') s.fill(m, l.LANDING[v]), g.addClass(v) } }, e) var i = { pc: ['images/pc_step1.png', 'images/pc_step2.png', 'images/pc_step3.png'], mobile: ['images/phone_step1.png', 'images/phone_step2.png', 'images/phone_step3.png'] }, n = $('.nav-icon .icon') ;/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) && n.attr('src', i.mobile[0]) function r(e) { e.on('click', function () { var e = null if (((e = 'plus' == $(this).attr('data-id') ? +n.attr('data-page') + 1 : +n.attr('data-page') - 1), i.length < e || e < 1)) return !1 ;/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) ? n.attr({ 'data-page': e, src: i.mobile[e - 1] }) : n.attr({ 'data-page': e, src: i.pc[e - 1] }) }) } r($('.next-button')), r($('.prev-button')) })(n, function () { e.once(h.Move, r), t.once(c.TourStart, r) }) }), (t.exports.init = function (e, t) { v = t.mode === n.PANORAMA && t.pano && !t.pano.isAligned() ? n.OUTDOOR : t.mode }), (t.exports.dismissModal = r) }, { '../enum/DirectorEvents': 23, '../enum/HelpModalType': 28, '../enum/PlayerEvents': 40, '../enum/Viewmode': 51, '../settings': 166, './help/help': 67, './helpManager': 68, './populateModal': 75 } ], 72: [ function (e, t, i) { 'use strict' var n = e('./circleLoader').circleLoader t.exports = { element: $('#gui-loading'), hide: function (e) { n.done(), this.element.fadeOut(1500, e) }, show: function (e) { this.element.fadeIn( 500, function () { this.element.css('display', 'table'), e && e() }.bind(this) ) }, progress: function (e) { n.set(e) } } }, { './circleLoader': 60 } ], 73: [ function (e, t, i) { 'use strict' var n = e('../settings'), r = $('#memory-info'), o = r.find('#memory-gpu'), a = !1 t.exports = { show: function () { n.profiling.enabled && (r.show(), (a = !0)) }, hide: function () { r.hide(), (a = !1) }, toggle: function () { a ? this.hide() : this.show() }, update: function (e) { n.profiling.enabled && o.text(Math.floor(e / 1e6) + 'MB') } } }, { '../settings': 166 } ], 74: [ function (e, t, i) { 'use strict' e('../util/browser'), e('../analytics') e('../settings'), (t.exports = { show: function (e, t) { $('#gui-message').fadeOut(500, function () { t() }) } }) }, { '../analytics': 4, '../settings': 166, '../util/browser': 182 } ], 75: [ function (e, t, i) { 'use strict' function n(e, t, i, n) { i ? this.assets[t][i][this.deviceType] : this.assets[t][this.deviceType] } var r = e('../util/browser'), o = e('../localization/localize'), a = e('../enum/HelpModalType'), s = (e('../enum/HelpModalSize'), e('../enum/Viewmode')) t.exports = { init: function () { if (!this.hasInitialized) { ;(this.hasInitialized = !0), (this.deviceType = r.isMobile() ? 'mobile' : 'desktop'), (this.assets = {}), (this.assets[a.LANDING[s.PANORAMA]] = { desktop: { left: { 'top-info': o.ROTATE, 'big-image': 'images/nav_help_mouse_drag_left.png', keyboard: 'images/nav_help_keyboard_left_right.png' }, middle: { 'top-info': o.MOVE, 'big-image': 'images/nav_help_mouse_click.png', keyboard: 'images/nav_help_keyboard_up_down.png' }, right: { 'top-info': o.ZOOM, 'big-image': 'images/nav_help_mouse_zoom.png', keyboard: 'images/nav_help_zoom_keys.png' } }, mobile: { left: { 'top-info': o.ROTATE, 'big-image': 'images/nav_help_gesture_drag.png' }, middle: { 'top-info': o.MOVE, 'big-image': 'images/nav_help_gesture_tap.png' }, right: { 'top-info': o.ZOOM, 'big-image': 'images/nav_help_gesture_pinch.png' } } }), (this.assets[a.LANDING[s.OUTDOOR]] = JSON.parse(JSON.stringify(this.assets[a.LANDING[s.PANORAMA]]))), (this.assets[a.LANDING[s.DOLLHOUSE]] = { desktop: { left: { 'top-info': o.ROTATE, 'big-image': 'images/nav_help_mouse_drag_left.png', keyboard: 'images/nav_help_keyboard_left_right.png' }, middle: { 'top-info': o.MOVE, 'big-image': 'images/nav_help_mouse_position_right.png' } }, mobile: { left: { 'top-info': o.ROTATE, 'big-image': 'images/nav_help_gesture_drag.png' }, middle: { 'top-info': o.MOVE, 'big-image': 'images/nav_help_gesture_position_two_finger.png' } } }), (this.assets[a.LANDING[s.FLOORPLAN]] = { desktop: { left: { 'top-info': o.MOVE, 'big-image': 'images/nav_help_mouse_position_left.png' }, middle: { 'top-info': o.ROTATE, 'big-image': 'images/nav_help_mouse_drag_right.png', keyboard: 'images/nav_help_keyboard_left_right.png' } }, mobile: { left: { 'top-info': o.MOVE, 'big-image': 'images/nav_help_gesture_position.png' }, middle: { 'top-info': o.ROTATE, 'big-image': 'images/nav_help_gesture_drag_two_finger.png' } } }) var e = { 'top-info': o.INSIDE, 'big-image': 'images/nav_help_click_inside.png', keyboard: 'images/nav_help_inside_key.png' } ;(this.assets[a.LANDING[s.OUTDOOR]].desktop.middle = e), (this.assets[a.LANDING[s.DOLLHOUSE]].desktop.right = e), (this.assets[a.LANDING[s.FLOORPLAN]].desktop.right = e) var t = { 'top-info': o.INSIDE, 'big-image': 'images/nav_help_tap_inside.png' } ;(this.assets[a.LANDING[s.OUTDOOR]].mobile.middle = t), (this.assets[a.LANDING[s.DOLLHOUSE]].mobile.right = t), (this.assets[a.LANDING[s.FLOORPLAN]].mobile.right = t), (this.assets[a.NAVIGATION] = {}), (this.assets[a.NAVIGATION][s.PANORAMA] = { desktop: { left: { 'top-info': o.HELP_DESKTOP_PANORAMA_1A, 'bottom-info': o.HELP_DESKTOP_PANORAMA_1B, 'big-image': 'images/nav_help_mouse_drag_left.png', keyboard: 'images/nav_help_keyboard_left_right.png' }, middle: { 'top-info': o.HELP_DESKTOP_PANORAMA_2A, 'bottom-info': o.HELP_DESKTOP_PANORAMA_2B, 'big-image': 'images/nav_help_mouse_click.png', keyboard: 'images/nav_help_keyboard_up_down.png' }, right: { 'top-info': o.HELP_DESKTOP_PANORAMA_3A, 'bottom-info': o.HELP_DESKTOP_PANORAMA_3B, 'big-image': 'images/nav_help_mouse_zoom.png', keyboard: 'images/nav_help_zoom_keys.png' } }, mobile: { left: { 'top-info': o.HELP_MOBILE_PANORAMA_1, 'big-image': 'images/nav_help_gesture_drag.png' }, middle: { 'top-info': o.HELP_MOBILE_PANORAMA_2, 'big-image': 'images/nav_help_gesture_tap.png' }, right: { 'top-info': o.HELP_MOBILE_3, 'big-image': 'images/nav_help_gesture_pinch.png' } } }), (this.assets[a.NAVIGATION][s.DOLLHOUSE] = { desktop: { left: { 'top-info': o.HELP_DESKTOP_DOLLHOUSE_1A, 'bottom-info': o.HELP_DESKTOP_DOLLHOUSE_1B, 'big-image': 'images/nav_help_mouse_drag_left.png', keyboard: 'images/nav_help_keyboard_all.png' }, middle: { 'top-info': o.HELP_DESKTOP_DOLLHOUSE_2A, 'big-image': 'images/nav_help_mouse_position_right.png' }, right: { 'top-info': o.HELP_DESKTOP_DOLLHOUSE_3A, 'big-image': 'images/nav_help_mouse_zoom.png' } }, mobile: { left: { 'top-info': o.HELP_MOBILE_DOLLHOUSE_1, 'big-image': 'images/nav_help_gesture_drag.png' }, middle: { 'top-info': o.HELP_MOBILE_DOLLHOUSE_2, 'big-image': 'images/nav_help_gesture_position_two_finger.png' }, right: { 'top-info': o.HELP_MOBILE_3, 'big-image': 'images/nav_help_gesture_pinch.png' } } }), (this.assets[a.NAVIGATION][s.FLOORPLAN] = { desktop: { left: { 'top-info': o.HELP_DESKTOP_FLOORPLAN_1A, 'big-image': 'images/nav_help_mouse_position_left.png' }, middle: { 'top-info': o.HELP_DESKTOP_FLOORPLAN_2A, 'bottom-info': o.HELP_DESKTOP_FLOORPLAN_2B, 'big-image': 'images/nav_help_mouse_drag_right.png', keyboard: 'images/nav_help_keyboard_left_right.png' }, right: { 'top-info': o.HELP_DESKTOP_FLOORPLAN_3A, 'bottom-info': o.HELP_DESKTOP_FLOORPLAN_3B, 'big-image': 'images/nav_help_mouse_zoom.png', keyboard: 'images/nav_help_keyboard_up_down.png' } }, mobile: { left: { 'top-info': o.HELP_MOBILE_FLOORPLAN_1, 'big-image': 'images/nav_help_gesture_position.png' }, middle: { 'top-info': o.HELP_MOBILE_FLOORPLAN_2, 'big-image': 'images/nav_help_gesture_drag_two_finger.png' }, right: { 'top-info': o.HELP_MOBILE_3, 'big-image': 'images/nav_help_gesture_pinch.png' } } }), (this.assets[a.NAVIGATION][s.OUTDOOR] = JSON.parse(JSON.stringify(this.assets[a.NAVIGATION][s.PANORAMA]))), (this.assets[a.NAVIGATION][s.OUTDOOR].desktop.middle = { 'top-info': o.HELP_DESKTOP_360_2A, 'bottom-info': o.HELP_DESKTOP_360_2B, 'big-image': 'images/nav_help_click_inside.png', keyboard: 'images/nav_help_inside_key.png' }), (this.assets[a.NAVIGATION][s.OUTDOOR].mobile.middle = { 'top-info': o.HELP_MOBILE_360_2, 'big-image': 'images/nav_help_tap_inside.png' }), (this.assets[a.MORE_HELP] = { desktop: { 'more-help-hlr': { 'top-info': o.HELP_MORE_HLR_A, 'big-image': 'images/nav_help_expand.svg', 'bottom-info': o.HELP_DESKTOP_MORE_HLR_B }, 'more-help-dollhouse': { 'top-info': o.HELP_MORE_DOLLHOUSE_A, 'big-image': 'images/nav_help_dollhouse.svg', 'bottom-info': o.HELP_DESKTOP_MORE_DOLLHOUSE_B }, 'more-help-floors': { 'top-info': o.HELP_MORE_FLOORS_A, 'big-image': 'images/nav_help_floor picker.svg', 'bottom-info': o.HELP_DESKTOP_MORE_FLOORS_B }, 'more-help-tag': { 'top-info': o.HELP_MORE_TAG_A, 'big-image': 'images/nav_help_tag.svg', 'bottom-info': o.HELP_DESKTOP_MORE_TAG_B }, 'more-help-zoom': { 'top-info': o.HELP_MORE_ZOOM_A, 'big-image': 'images/nav_help_zoom.svg', 'bottom-info': o.HELP_DESKTOP_MORE_ZOOM_B }, 'more-help-tour': { 'top-info': o.HELP_MORE_TOUR_A, 'big-image': 'images/nav_help_play.png', 'bottom-info': o.HELP_DESKTOP_MORE_TOUR_B }, 'more-help-inside': { 'top-info': o.HELP_MORE_INSIDE_A, 'big-image': 'images/nav_help_inside.svg', 'bottom-info': o.HELP_DESKTOP_MORE_INSIDE_B }, 'more-help-vr': { 'top-info': o.HELP_MORE_VR_A, 'big-image': 'images/nav_help_vr.svg', 'bottom-info': o.HELP_DESKTOP_MORE_VR_B }, 'more-help-360': { 'top-info': o.HELP_MORE_360_A, 'big-image': 'images/nav_help_360.svg', 'bottom-info': o.HELP_DESKTOP_MORE_360_B }, 'more-help-fullscreen': { 'top-info': o.HELP_MORE_FULLSCREEN_A, 'big-image': 'images/nav_help_fullscreen.svg', 'bottom-info': o.HELP_DESKTOP_MORE_FULLSCREEN_B } }, mobile: { 'more-help-hlr': { 'top-info': o.HELP_MORE_HLR_A, 'big-image': 'images/nav_help_expand.svg', 'bottom-info': o.HELP_DESKTOP_MORE_HLR_B }, 'more-help-dollhouse': { 'top-info': o.HELP_MORE_DOLLHOUSE_A, 'big-image': 'images/nav_help_dollhouse.svg', 'bottom-info': o.HELP_MOBILE_MORE_DOLLHOUSE_B }, 'more-help-floors': { 'top-info': o.HELP_MORE_FLOORS_A, 'big-image': 'images/nav_help_floor picker.svg', 'bottom-info': o.HELP_DESKTOP_MORE_FLOORS_B }, 'more-help-tag': { 'top-info': o.HELP_MORE_TAG_A, 'big-image': 'images/nav_help_tag.svg', 'bottom-info': o.HELP_MOBILE_MORE_TAG_B }, 'more-help-tour': { 'top-info': o.HELP_MORE_TOUR_A, 'big-image': 'images/nav_help_play.png', 'bottom-info': o.HELP_DESKTOP_MORE_TOUR_B }, 'more-help-inside': { 'top-info': o.HELP_MORE_INSIDE_A, 'big-image': 'images/nav_help_inside.svg', 'bottom-info': o.HELP_MOBILE_MORE_INSIDE_B }, 'more-help-vr': { 'top-info': o.HELP_MORE_VR_A, 'big-image': 'images/webvr.svg', 'bottom-info': o.HELP_MOBILE_MORE_VR_B }, 'more-help-360': { 'top-info': o.HELP_MORE_360_A, 'big-image': 'images/nav_help_360.svg', 'bottom-info': o.HELP_MOBILE_MORE_360_B } } }), (this.assets[a.TOUR_INTERACTION[s.PANORAMA]] = { desktop: { left: { 'top-info': o.ROTATE, 'big-image': 'images/nav_help_mouse_drag_left.png', keyboard: 'images/nav_help_keyboard_left_right.png' }, middle: { 'top-info': o.MOVE, 'big-image': 'images/nav_help_mouse_click.png', keyboard: 'images/nav_help_keyboard_up_down.png' }, right: { 'top-info': o.PLAY, 'big-image': 'images/Desktop-help-play-button.svg', keyboard: 'images/Desktop-help-spacebar-2.svg' } }, mobile: { left: { 'top-info': o.ROTATE, 'big-image': 'images/nav_help_gesture_drag.png' }, middle: { 'top-info': o.MOVE, 'big-image': 'images/nav_help_gesture_tap.png' }, right: { 'top-info': o.PLAY, 'big-image': 'images/mobile-help-play-button.svg' } } }), (this.assets[a.TOUR_INTERACTION[s.OUTDOOR]] = JSON.parse(JSON.stringify(this.assets[a.TOUR_INTERACTION[s.PANORAMA]]))), (this.assets[a.TOUR_INTERACTION[s.OUTDOOR]].desktop.middle = this.assets[a.LANDING[s.OUTDOOR]].desktop.middle), (this.assets[a.TOUR_INTERACTION[s.OUTDOOR]].mobile.middle = this.assets[a.LANDING[s.OUTDOOR]].mobile.middle), (this.assets[a.TOUR_INTERACTION[s.FLOORPLAN]] = JSON.parse(JSON.stringify(this.assets[a.TOUR_INTERACTION[s.OUTDOOR]]))), (this.assets[a.TOUR_INTERACTION[s.FLOORPLAN]].desktop.left = this.assets[a.LANDING[s.FLOORPLAN]].desktop.left), (this.assets[a.TOUR_INTERACTION[s.FLOORPLAN]].mobile.left = this.assets[a.LANDING[s.FLOORPLAN]].mobile.left) } }, fill: function (e, t, i) { n.call(this, e, t, i, !0) }, clear: function (e, t, i) { n.call(this, e, t, i, !1) } } }, { '../enum/HelpModalSize': 27, '../enum/HelpModalType': 28, '../enum/Viewmode': 51, '../localization/localize': 108, '../util/browser': 182 } ], 76: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ OPENED: 'share.open', CLOSED: 'share.closed', LINK_CLICKED: 'share.linked' }) }, {} ], 77: [ function (e, t, i) { 'use strict' function n(n) { function e(e, t) { var i = 'top=' + (window.screenY + ($('#player').height() - t) / 2) + ',left=' + (window.screenX + ($('#player').width() - e) / 2) + ',width=' + e + ',height=' + t I.emit(l.LINK_CLICKED, { channel: n }), window.open(C[n], 'shareWindow', i) } switch (n) { case A.FACEBOOK: e(580, 420) break case A.TWITTER: e(550, 440) break case A.MAIL: I.emit(l.LINK_CLICKED, { channel: 'email' }), window.open(C[n], '_blank') break case A.LINKEDIN: } } function r(e) { I.emit(l.LINK_CLICKED, { channel: 'copylink' }) var t = document.createRange() t.selectNodeContents(v) var i = window.getSelection() i.removeAllRanges(), i.addRange(t), document.execCommand('copy'), y.classList.remove('hidden'), v.classList.add('highlighted') } function o(e) { ;(e && (e.stopPropagation(), e.target === v)) || (window.getSelection().removeAllRanges(), v.classList.remove('highlighted'), y.classList.add('hidden')) } var a = e('../../util/browser'), s = e('../../localization/localize'), l = e('./ShareEvents'), c = e('../../util/common'), h = e('events').EventEmitter, u = document.getElementById('sharing'), d = document.getElementById('share-modal'), p = document.getElementById('share-close'), f = document.getElementById('facebook-share'), g = document.getElementById('twitter-share'), m = document.getElementById('mail-share'), v = document.getElementById('share-url-text'), y = document.getElementById('copy-success'), A = Object.freeze({ FACEBOOK: 'facebook', TWITTER: 'twitter', MAIL: 'mail', LINKEDIN: 'linkedin' }), C = {} ;(C[A.FACEBOOK] = 'http://www.facebook.com/sharer.php?u=' + encodeURIComponent(window.location.href + '&utm_source=1') + '&t='), (C[A.TWITTER] = 'http://twitter.com/intent/tweet?text='), (C[A.MAIL] = 'mailto:?subject=') var I = { init: function (e) { var t = encodeURIComponent(s.SHARE_EXPLORE + e + ' ' + s.SHARE_AT + ' ') ;(C[A.FACEBOOK] += t + encodeURIComponent(window.location.href + '&utm_source=1')), (C[A.TWITTER] += t + encodeURIComponent(window.location.href + '&utm_source=2 ' + s.SHARE_WITH + ' #port')), (C[A.MAIL] += encodeURIComponent(s.SHARE_EXPLORE + e + s.SHARE_3D) + '&body=' + t + encodeURIComponent(window.location.href + '&utm_source=3')), u.addEventListener('click', this.toggle.bind(this)), p.addEventListener('click', this.hide.bind(this)), v.addEventListener('click', r), d.addEventListener('click', o), f.addEventListener('click', n.bind(this, A.FACEBOOK)), g.addEventListener('click', n.bind(this, A.TWITTER)), m.addEventListener('click', n.bind(this, A.MAIL)), (v.textContent = window.location.href + '&utm_source=4'), d.classList.add(a.isMobile() ? 'mobile' : 'desktop'), u.classList.remove('hidden') }, show: function () { this.emit(l.OPENED), d.classList.add('fadeIn') }, hide: function () { d.classList.contains('fadeIn') && (this.emit(l.CLOSED), document.selection && document.selection.empty(), window.getSelection().removeAllRanges(), o(), d.classList.remove('fadeIn')) }, toggle: function () { d.classList.contains('fadeIn') ? this.hide() : this.show() } } c.extendObject(I, h.prototype), (t.exports = I) }, { '../../localization/localize': 108, '../../util/browser': 182, '../../util/common': 185, './ShareEvents': 76, events: 202 } ], 78: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ OPENED: 'terms.opened', CLOSED: 'terms.closed' }) }, {} ], 79: [ function (e, t, i) { 'use strict' var n = e('./TermsEvent'), r = e('../../localization/localize'), o = e('../../analytics'), a = e('../../util/ajax'), s = e('../../util/common'), l = e('events').EventEmitter, c = document.getElementById('terms-modal'), h = { init: function () { $('.footer-terms').on( 'click', function (e) { e.preventDefault(), this.show() }.bind(this) ), $('#terms-modal .close').on('click', this.hide.bind(this)) }, show: function () { this.emit(n.OPENED), a .get('static/' + r.TERMS_TEXT_FILE) .done(function (e) { var t = $('#terms-text').html(e) o.track('showcase_gui', { gui_action: 'click_terms_button', interaction_source: 'gui' }), t.find('a').attr('target', '_blank') }) .fail(function () { $('#terms-text').html('

    ' + r.TERMS_OF_USE + '

    ' + r.TERMS_FAIL) }), c.classList.add('fadeIn') }, hide: function (e) { e && e.preventDefault(), c.classList.contains('fadeIn') && this.emit(n.CLOSED), c.classList.remove('fadeIn') } } s.extendObject(h, l.prototype), (t.exports = h) }, { '../../analytics': 4, '../../localization/localize': 108, '../../util/ajax': 181, '../../util/common': 185, './TermsEvent': 78, events: 202 } ], 80: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ OPEN_INFO: 'title.open.info', CLOSE_INFO: 'title.close.info', SHOW_INFO: 'title.show.info', HIDE_INFO: 'title.hide.info', LINK_CLICKED: 'title.link.click', CONTACT_LINK_CLICKED: 'title.contact.click', ORIGIN_LINK_CLICKED: 'title.origin.click' }) }, {} ], 81: [ function (e, t, i) { 'use strict' var o = e('../../settings') t.exports.init = function (e, t) { o.tags.enabled && 0 !== Object.keys(e.tags).length && (function (t, i) { function e(e) { ;(t.shouldShowtags = 'show' === this.value), t.shouldShowtags ? i.showAlltags(o.tags.startup.fadeInDuration) : i.hideAlltags(o.tags.startup.fadeInDuration) } document.getElementById('tag-toggles').classList.remove('hidden'), (document.getElementById('radio-tag-show').checked = !0) for (var n = document.getElementById('tag-inputs').querySelectorAll('input'), r = 0; r < n.length; r++) n[r].addEventListener('change', e) })(e, t) } }, { '../../settings': 166 } ], 82: [ function (S, M, e) { ;(function (e) { 'use strict' function i(e) { return !( !e || (l.inIframe() && document.referrer === e) || (E.classList.remove('hidden'), (_.innerHTML = r.WEBVR_LEARN_MORE + ': '), _.appendChild( (function (e) { var t = document.createElement('a') return (t.id = 'url'), (t.target = '_blank'), (t.href = e), (t.innerText = e), t.addEventListener('click', x.emit.bind(x, a.ORIGIN_LINK_CLICKED)), t })(e) ), b.forEach(function (e) { e.classList.add('share-link') }), 0) ) } function s(e, t) { var i = e, n = t return function (e, t) { i.push(t || n, e) } } var l = S('../../util/browser'), t = S('../../util/common'), n = S('../../util/logger'), r = S('../../localization/localize'), o = S('./titleBarSettings'), c = S('../../settings'), a = S('./TitleEvents'), h = S('events').EventEmitter, u = new n(e), d = document.querySelector('.pinTop.left'), p = document.getElementsByClassName('title-container')[0], f = document.getElementById('title-toggle').querySelector('i'), g = document.getElementById('meta-info-wrapper'), m = document.getElementById('meta-info'), v = document.getElementById('meta-description'), y = document.getElementsByClassName('contact-info')[0], A = document.getElementById('contact-data'), C = document.getElementById('addressTxt'), I = document.getElementById('tag-toggles'), E = document.getElementById('share-origin'), _ = document.getElementById('share-link-wrapper'), b = [m, g, p], w = !1, T = !1, x = { populate: function (e) { if ( (function (e, t) { return e && l.valueFromHash('title', 1) && 2 !== l.valueFromHash('mls', 0) ? ((document.getElementsByClassName('titleText')[0].innerText = e), (g_weixinObj.title = e).length > o.minTooltipCharacters && p.parentElement.setAttribute('data-original-title', e), t && 1 !== c.specialEdition && c.brand && !c.mls ? (document.getElementById('cobrandTitle').innerText = t) : (document.getElementsByClassName('co-brand')[0].classList.add('hidden'), document.getElementById('gui-name').classList.add('noCoBrand'), document.getElementById('cobrandTitle').classList.add('hidden')), !0) : (document.getElementById('model-title').classList.add('hidden'), !1) })(DATA.name, e.coBrand) ) { if ( ((function (e) { e ? ((w = !0), (v.innerHTML = e)) : v.classList.add('hidden') })(e.description), (function (e, t, i, n) { if ((e || t || i) && c.brand && !l.valueFromHash('mls', !1)) { w = !0 var r = [], o = s(r, '
    ') if ((e && o('' + e + ''), t)) { var a = n || t o(l.isMobile() ? '' + a + '' : '' + a + '') } i && o('' + i + ''), (r[0] = ''), (A.innerHTML = r.join('')) } else y.classList.add('hidden') })(e.contactName, e.phone, e.email, e.formatted_contact_phone), (function (e) { if ('string' == typeof e) try { e = JSON.parse(e) } catch (e) { return u.warn('Unable to parse address data'), C.parentElement.classList.add('hidden') } if (e && (e.address_1 || e.address_2 || e.city || e.state || e.zip)) { w = !0 var t = [], i = s(t, ' ') e.address_1 && i(e.address_1), e.address_2 && i(e.address_2), e.city && i(e.city, ', '), e.state && i(e.state, ', '), e.zip && i(e.zip, e.state ? ' ' : ', '), (t[0] = ''), (C.innerText = t.join('')) } else C.parentElement.classList.add('hidden') })(e.address), w) ) { var t = document.createElement('br') I.insertBefore(t, I.firstElementChild) } e.socialSharing && c.share.enabled && (T = i(e.url)) } }, finishSetup: function (e) { ;(w = w || !!e), document.getElementById('title-toggle').addEventListener('click', x.toggleTitle.bind(x)), w && p.addEventListener('click', x.toggleMeta.bind(x, !1)), [].slice.call(v.querySelectorAll('a')).forEach(function (e) { e.addEventListener('click', x.emit.bind(x, a.LINK_CLICKED)) }), [].slice.call(y.querySelectorAll('a')).forEach(function (e) { e.addEventListener( 'click', x.emit.bind(x, a.CONTACT_LINK_CLICKED, { contact_type: e.getAttribute('id') }) ) }), w || (T ? p.classList.add('share-only') : p.classList.add('no-meta')) }, toggleMeta: function (e, t) { var i = document.getElementById('model-title') t && t.preventDefault() var n = m.classList.contains('expand') ;(e && !n) || (n ? (b.forEach(function (e) { e.classList.remove('expand') }), this.emit(a.CLOSE_INFO), i.classList.remove('expand')) : (b.forEach(function (e) { e.classList.add('expand') }), i.classList.add('expand'), this.emit(a.OPEN_INFO))) }, setupToggling: function () { ;(g.style.height = m.offsetHeight + 'px'), m.addEventListener('transitionend', function () { g.style.height = m.offsetHeight + 'px' }) }, toggleTitle: function (e) { e && e.preventDefault(), d.classList.contains('closed') ? (d.classList.add('open'), f.classList.remove('icon-dpad-right'), f.classList.add('icon-dpad-left'), this.emit(a.SHOW_INFO), setTimeout(function () { d.classList.remove('closed'), d.classList.remove('open') }, o.removeAnimationClasses)) : (d.classList.add('closed'), f.classList.remove('icon-dpad-left'), f.classList.add('icon-dpad-right'), this.emit(a.HIDE_INFO)) } } t.extendObject(x, h.prototype), (M.exports = x) }).call(this, '/js/gui/title/titleBar.js') }, { '../../localization/localize': 108, '../../settings': 166, '../../util/browser': 182, '../../util/common': 185, '../../util/logger': 189, './TitleEvents': 80, './titleBarSettings': 83, events: 202 } ], 83: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ minTooltipCharacters: 19, removeAnimationClasses: 500 }) }, {} ], 84: [ function (e, t, i) { 'use strict' function n() { settings.playTourNearBy ? v.playTourNearBy() : v.playTour() y && clearTimeout(y), c(), E.removeClass('fadeIn') } function r() { A.classList.contains('playing') && (v.stopTour(), E.addClass('fadeIn'), setTimeout(function () { E.removeClass('fadeIn') }, h.tourInteraction.showPauseButton), M || (clearTimeout(y), (y = setTimeout(s, h.tourInteraction.showModal))), setTimeout(function () { A.classList.remove('playing') }, h.tourInteraction.allowNextClick)) } function o() { v.tourInProgress && (v.stopTour(), v.endTourProgress(), A.classList.remove('playing')) } function a() { _.is(':visible') ? n() : r() } function s() { //去掉导览结束时的提示 /* if (!h.tourInteraction.disabled) { T.removeClass("small landing " + d.FLOORPLAN + " " + d.OUTDOOR + " " + d.PANORAMA), T.addClass("fadeIn tour " + p.deviceType); var e, t = h.tourInteraction.smallModal ? m.SMALL : m.LARGE; if (!h.tourInteraction.smallModal) e = v.player.mode === d.PANORAMA && !v.player.currentPano.isAligned() || v.player.mode === d.DOLLHOUSE ? d.OUTDOOR : v.player.mode === d.FLOORPLAN ? d.FLOORPLAN : d.PANORAMA, p.fill(x, g.TOUR_INTERACTION[e]), T.addClass(e); T.addClass(t) } */ } function l(e, t) { if (t) { if ($.contains($('.toolRight')[0], t.target)) return //add 防止编辑时input 空格开始导览 var i = 'keydown' === t.type, n = t.which === u.SPACE || v.tourIsPlaying ;(i && n) || e || (M = !0), v.atEndOfTour() && c(), !v.tourIsPlaying && v.tourInProgress && (E.removeClass('fadeIn'), c(), t.which !== u.SPACE && o()), i && n && a() } } function c() { T.removeClass('fadeIn') } var h = (e('../util/browser'), e('../settings')), u = e('../enum/Keys'), d = e('../enum/Viewmode'), p = (e('./helpManager'), e('./populateModal')), f = e('../enum/DirectorEvents'), g = e('../enum/HelpModalType'), m = e('../enum/HelpModalSize'), v = null, y = null, A = document.getElementById('pause-overlay'), C = document.getElementById('player'), I = document.getElementById('gui'), E = $('#pause-icon').eq(0), _ = $('#play').eq(0), b = $('#playHead').eq(0), w = $('.rightViewContainer, #previous, #next, #gui-modes-inside, #gui-modes-outside, #gui-modes-dollhouse, #gui-modes-floorplan').toArray(), T = $('#interaction-modal').eq(0), x = $('#interaction-modal .interaction').toArray(), S = ['touchstart', 'mousedown', 'pointerdown'], M = !1 ;(t.exports.init = function (e) { ;(v = e), S.forEach(function (t) { C.addEventListener(t, l.bind(this, !1), !0), I.addEventListener(t, l.bind(this, !0), !0), A.addEventListener(t, r, !0), w.forEach(function (e) { e.addEventListener(t, o, !0) }), $('#drawer img').on(t, o) }), document.addEventListener('keydown', l.bind(this, !1), !0), v.on(f.TourStart, function () { A.classList.add('playing') }) }), (t.exports.play = n), (t.exports.pause = r), (t.exports.pauseWithoutCTA = o), (t.exports.togglePlay = a), (t.exports.stopTour = function () { b.hasClass('playing') && (clearTimeout(y), v.atEndOfTour() ? (A.classList.remove('playing'), s()) : E.removeClass('fadeIn')) }), (t.exports.dismissModal = c) }, { '../enum/DirectorEvents': 23, '../enum/HelpModalSize': 27, '../enum/HelpModalType': 28, '../enum/Keys': 30, '../enum/Viewmode': 51, '../settings': 166, '../util/browser': 182, './helpManager': 68, './populateModal': 75 } ], 85: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ OPENED: 'vr.modal.opened', LAUNCH: 'vr.modal.launch', CLOSED: 'vr.modal.closed', NEXT: 'vr.modal.next', PREV: 'vr.modal.prev', STORE: 'vr.modal.store', falseICECHOSEN: 'vr.modal.device' }) }, {} ], 86: [ function (e, t, i) { 'use strict' var h = e('../../util/browser'), u = e('../../enum/VRApps'), n = e('../../enum/VRPlatforms'), d = e('../../util/ajax'), p = e('../../settings'), r = {} for (var o in ((r[u.CardboardAndroid] = 'https://play.google.com/store/apps/details?id=com.port.mpvrcardboard&redirect_uri='), (r[u.CardboardIOS] = 'https://itunes.apple.com/us/app/port-vr/id1168808473&redirect_uri='), (r[u.GearVR] = 'https://www.oculus.com/experiences/gear-vr/811670972252145/?redirect_uri='), u)) { var a = u[o] r[a] += encodeURIComponent(document.referrer + '&display=' + a) } var s, f = {}, g = (-1 === (s = window.location.host).indexOf('.port.com') && -1 === s.indexOf('localhost') && (s = 'my.port.com'), 'https://' + s) ;(t.exports.init = function (e, t, o) { function a(e, t, i, n) { function r() { return '&utm_medium=' + (h.inIframe() ? 'embed' : 'direct') + ('&utm_source=' + s) + ('&utm_showcase_session_id=' + o) } return h.valueFromHash('vrcoll', !1) ? l + '&sids=' + t + '&lsid=' + t + '&ln=' + encodeURIComponent(i) + '&ld=' + encodeURIComponent(n) + '&display=' + e + r() : c + '&m=' + t + '&display=' + e + r() } var s = h.inIframe() ? encodeURIComponent(document.referrer) : encodeURIComponent(window.location.href), l = g + '/vr/dlist/?ret=' + s, c = g + '/vr/show/?ret=' + s switch (e) { case n.IOS: !(function (t, e, i, n) { var r = a(t, e, i, n), o = { responseType: 'json', data: { branch_key: p.appConfig.branch_key, data: { m: e, full_url: r, $desktop_url: '', $og_app_id: '331853976762864119', $og_title: i, $og_description: n, $og_image_url: location.origin + '/api/v1/player/models/' + e + '/thumb', $canonical_url: window.location.href } } } d.post('https://api.branch.io/v1/url', o) .done(function (e) { f[t] = e.url }) .fail( function (e) { f[t] = e }.bind(this, r) ) })(u.CardboardIOS, t.sid, t.name, t.summary) break default: !(function (e, t, i) { for (var n in u) { var r = u[n], o = a(r, e, t, i) f[r] = o } })(t.sid, t.name, t.summary) } }), (t.exports.launch = function (e) { var t = f[e] window.open(t, '_blank') }), (t.exports.launchStore = function (e) { var t = r[e] window.open(t, '_blank') }) }, { '../../enum/VRApps': 46, '../../enum/VRPlatforms': 49, '../../settings': 166, '../../util/ajax': 181, '../../util/browser': 182 } ], 87: [ function (e, t, i) { 'use strict' function c(e) { var t switch (e) { case y.IOS: return 9 < (t = g.iosVersion()).major || (9 === t.major && 1 <= t.minor) case y.Android: return 4 < (t = g.androidVersion()).major || (4 === t.major && 4 < t.minor) || (4 === t.major && 4 === t.minor && 4 <= t.patch) } return !1 } function h(e) { switch (e) { case y.Android: x.filter('.cardboard').off().on('click', q.cardboardAndroid), x.filter('.gearvr').off().on('click', q.gear), n(k, U, 'logo-button', 'same-line') break case y.UnsupportedAndroid: n('', H, '', '') break case y.IOS: x.filter('.cardboard').off().on('click', q.cardboardIOS), n(k, '', 'logo-button', '') break case y.Desktop: x.filter('.cardboard').off().on('click', r.bind(this, null, N, B)), x.filter('.gearvr').off().on('click', r.bind(this, U, F, null)), n(k, U, 'logo-button', 'same-line'), Q.cardboard() } } function u(e) { $('.p1, .p2, .p3').hide(), l.insertAfter(T), w.removeClass('front-page'), w.removeClass('details-page'), w.removeClass('lastPage'), x.removeClass('logo-button'), x.removeClass('same-line'), T.removeClass('headsetOptions'), S.attr('src', ''), S.filter('.second').removeClass('gear'), S.css('display', 'inline-block'), S.off(), M.filter('.second').css('display', ''), O.css('display', 'none'), $('.p' + (e + 1) + _).show(), S.filter('.third').insertBefore(M.filter('.third')) } function n(e, t, i, n) { w.addClass('front-page'), S.filter('.first').attr('src', e), S.filter('.second').attr('src', t), x.filter('.first').addClass(i), x.filter('.second').addClass(i), x.addClass(n), '.show-desktop' === _ && T.insertAfter(l) } function r(e, t, i) { T.addClass('headsetOptions'), x.off(), S.filter('.second').attr('src', t), O.css('display', 'block'), M.filter('.second').css('display', 'none'), O.on('click', function () { u(b.Title), h(y.Desktop) }), e && (X.emit(C.falseICECHOSEN, { name: v.GearVR }), S.filter('.first').attr('src', e), S.filter('.second').addClass('gear'), S.filter('.second').on('click', m.launchStore.bind(this, v.GearVR)), Q.gearvr()), i && (X.emit(C.falseICECHOSEN, { name: v.Cardboard }), S.filter('.third').attr('src', i), S.filter('.third').show(), S.filter('.third').insertAfter(S.filter('.second')), S.filter('.third').addClass('link'), S.filter('.second').addClass('link'), S.filter('.second').on('click', m.launchStore.bind(this, v.CardboardIOS)), S.filter('.third').on('click', m.launchStore.bind(this, v.CardboardAndroid)), Q.cardboard()) } function d(e, t) { switch (t) { case y.IOS: ;(j = W), (Y = G) break case y.Desktop: e === b.Cardboard ? ((j = N), (Y = B), S.filter('.second').on('click', m.launchStore.bind(this, v.CardboardIOS)), S.filter('.third').on('click', m.launchStore.bind(this, v.CardboardAndroid))) : ((j = F), S.filter('.second').on('click', m.launchStore.bind(this, v.GearVR)), (Y = '')) break default: Y = e === b.Cardboard ? ((j = H), G) : ((j = V), z) } } function p(e, t, i) { w.find('.inner').addClass('details-page'), w.addClass('details-page'), S.filter('.first').attr('src', e), S.filter('.second').attr('src', t), S.filter('.third').attr('src', i) } function f() { var e = 1 < g.aspectRatio() && g.isMobile() w.toggleClass('landscape', e).toggleClass('portrait', !e), w.toggleClass('tiny', $('#player').height() <= o.narrowLandscapeHeight), w.toggleClass('tinier', $('#player').height() <= o.reallyNarrowLandscapeHeight) } var g = e('../../util/browser'), m = e('./vrLink'), v = e('../../enum/VRApps'), y = e('../../enum/VRPlatforms'), A = e('../../enum/VRPages'), C = e('./vrEvent'), o = (e('../../settings'), e('../../constants')), I = e('../../localization/localize'), a = e('../../util/common'), s = e('events').EventEmitter, E = 0, _ = null, b = A.standard, w = $('.vr-popup'), l = w.find('.vr-popup-body'), T = w.find('.vr-images'), x = w.find('.img-container'), S = w.find('.vr-sm-image'), M = x.find('.vr-img-caption'), R = $('.vr-buttons').find('.prev-button'), P = $('.vr-buttons').find('.next-button'), O = T.find('.front-close'), L = $('.vr-page'), D = w.find('img'), N = 'images/apple-store.png', F = 'images/badge-oculus.png', B = 'images/badge-cardboard.png', V = 'images/logo-samsung.png', k = 'images/headset-cardboard.png', U = 'images/headset-gearvr.png', H = 'images/ico-android-robot.png', z = 'images/ico-gearvr.png', G = 'images/ico-vr.png', W = 'images/apple-logo-white.svg', j = null, Y = null, q = {}, X = { init: function (e, t) { function i(e) { X.emit(C.STORE, { type: e }), m.launchStore(e) } function n(e) { switch ((e !== b.pageCount && (u(e), L.text(e + 1 + ' / ' + b.pageCount)), e)) { case b.Title: R.css('display', 'none'), P.text(a[e]), h(r) break case b.Cardboard: R.css('display', 'block'), P.text(a[e]), x.filter('.cardboard').off(), x.filter('.gearvr').off(), d(e, r), p(k, j, Y) break case b.Gear: P.text(a[e]), d(e, r), w.addClass('lastPage'), p(U, j, Y) break case b.pageCount: w.removeClass('fadeIn'), X.emit(C.CLOSED) } D.filter("[src='']").hide() } var r = g.detectAndroid() ? g.detectAndroidMobile() && c(y.Android) ? (w.addClass('supported'), (_ = '.show-supported'), y.Android) : (w.addClass('unsupported'), (_ = '.show-unsupported'), y.UnsupportedAndroid) : g.detectIPhone() || g.detectIPod() ? (w.addClass('ios'), (_ = '.show-ios'), (b = A.ios), y.IOS) : (w.addClass('desktop'), (_ = '.show-desktop'), y.Desktop) function o(e) { X.emit(C.LAUNCH, { vr_platform: r, vr_app: e }), m.launch(e) } m.init(r, e, t), r !== y.Desktop && w.addClass('mobile'), (q.cardboardAndroid = o.bind(this, v.CardboardAndroid)), (q.gear = o.bind(this, v.GearVR)), (q.cardboardIOS = o.bind(this, v.CardboardIOS)), f(), $('.show-supported, .show-unsupported, .show-ios, .show-desktop').hide(), $(_).show() var a = [I.VR_LEARN_MORE_CAPS, I.VR_NEXT_CAPS, I.VR_GOT_IT_CAPS], s = ['vr_modal_learn_more', 'vr_modal_next', 'vr_modal_done'] r === y.IOS && (a.splice(1, 1), s.splice(1, 1)), $('#vr').on('click', function (e) { e.preventDefault(), window.vrEnabled || ((window.vrEnabled = !0), this.classList.add('active'), $('#gui div').not('#vrOff').addClass('vrHide'), $('#vrOffImg').css({ display: 'inline-block' })) }), $('#vrOff').on('click', function () { ;(window.vrEnabled = !1), $('#gui div').not('#vrOff').removeClass('vrHide'), $('#vrOffImg').css({ display: 'none' }), $('#player canvas').css({ width: '', height: '' }), $('#vr').removeClass('active') }) var l = 'https://my.port.com/vr/show/?m=' + e.sid r === y.IOS ? $('.cardboardLink').on('click', i.bind(this, v.CardboardIOS)) : $('.cardboardLink').on('click', i.bind(this, v.CardboardAndroid)), $('.gearLink').on('click', i.bind(this, v.GearVR)), $('span.modelLink').text(l), R.on('click', function (e) { X.emit(C.PREV), n(--E) }), P.on('click', function (e) { P.text(), X.emit(C.NEXT, { nextAction: s[E] }), n(++E) }), w.find('.close').on('click', X.dismiss) }, dismiss: function () { w.hasClass('fadeIn') && (w.removeClass('fadeIn'), X.emit(C.CLOSED)) }, isDeviceSupported: c } a.extendObject(X, s.prototype), $(window).resize(f) var Z, K, Q = ((Z = M.filter('.first').find('.cardboard')), (K = M.filter('.first').find('.gearvr')), { cardboard: function () { K.addClass('hidden'), Z.removeClass('hidden') }, gearvr: function () { Z.addClass('hidden'), K.removeClass('hidden') } }) t.exports = X }, { '../../constants': 8, '../../enum/VRApps': 46, '../../enum/VRPages': 48, '../../enum/VRPlatforms': 49, '../../localization/localize': 108, '../../settings': 166, '../../util/browser': 182, '../../util/common': 185, './vrEvent': 85, './vrLink': 86, events: 202 } ], 88: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ OPENED: 'webvr.modal.opened', SHOW_TERMS: 'webvr.footer.show.terms' }) }, {} ], 89: [ function (B, V, e) { ;(function (e) { 'use strict' function a() { function t() { p.isPresenting || (r.info('exiting webVR'), c('webvr_exit_app'), -1 === window.location.search.indexOf('&qs=1') ? (window.location = window.location + '&qs=1') : (window.location = window.location), window.removeEventListener('vrdisplaypresentchange', t)) } r.info('Headset mounted'), u.suspend() var e = document.createElement('canvas') for (e.getContext('webgl'), e.className = 'webvr-canvas', document.bgColor = '#000', document.body.style.backgroundColor = '#000'; document.body.firstChild; ) document.body.removeChild(document.body.firstChild) document.body.appendChild(e), c('webvr_enter_app'), p .requestPresent([ { source: e, predistorted: !0 } ]) .catch(function (e) { r.error('Failed to present: ' + e), c('webvr_exit_calibrate'), t() }), d.then(function () { window.dispatchEvent(new Event('vrapp-start')) }), window.addEventListener('vrdisplaypresentchange', t) } function s() { c('webvr_modal_close'), _.find('.enter-button').off('click', a), E.fadeOut(g.guiAnimationSpeed, function () { _.toggleClass('hidden', !1), b.toggleClass('hidden', !0), f.exitFullscreen() }), I.fadeIn(g.guiAnimationSpeed) } function t() { M.toggleClass('hidden', !0), S.toggleClass('hidden', !1) } function l() { _.toggleClass('hidden'), b.toggleClass('hidden') } function c(e) { var t = f.isLandscape() ? 'landscape' : 'portrait' i.trackAlways('showcase_gui', { gui_action: e, orientation: t }) } function h() { var e = f.isLandscape() E.toggleClass('landscape', e).toggleClass('portrait', !e) } var u, d, p, f = B('../../util/browser'), g = B('../../settings'), m = (B('./../gui'), B('../../enum/VRPlatforms')), v = B('../../enum/VRApps'), y = B('./../vr/vrLink'), A = B('./WebVrEvent'), i = B('../../analytics'), C = (B('../../constants'), B('../../localization/localize')), n = B('../../util/common'), r = new (B('../../util/logger'))(e), o = B('events').EventEmitter, I = $('#gui'), E = $('.webvr-popup'), _ = $('.webvr-popup .page.p1'), b = $('.webvr-popup .page.p2'), w = E.find('.image'), T = $('.webvr-popup .detail.headset'), x = $('.webvr-popup .detail.phone'), S = $('.webvr-popup .tab-content.webvr'), M = $('.webvr-popup .tab-content.native'), R = 'images/headset-cardboard.png', P = 'https://madeby.google.com/vr/', O = 'webvr_daydream_link', L = P, D = O, N = { init: function (e, t, i, n) { function r(e) { e.preventDefault(), o(e.currentTarget.id) } function o(i) { F[i](), Object.keys(F).map(function (e, t) { $('#' + e).toggleClass('tabs-underlined', e === i) }) } ;(p = i), (u = t), y.init(m.Android, e, n), h(), new RegExp('daydream', 'i').test(p.displayName) ? (o('tabdaydream'), w.filter('.device-headset-side').attr('src', 'images/device-daydream-side.png'), _.find('.title').text(C.localizeText('WEBVR_FOR_DAYDREAM'))) : (o('tabcardboard'), w.filter('.device-headset-side').attr('src', R), _.find('.title').text(C.localizeText('WEBVR_FOR_CARDBOARD'))), $('#vr').on('click', function (e) { e.preventDefault(), c('click_webvr_button'), E.is(':hidden') && (N.emit(A.OPENED), I.fadeOut(g.guiAnimationSpeed), E.fadeIn(g.guiAnimationSpeed), (function () { if (!d) { var n = 'https://static.port.com/webvr/' + (f.valueFromHash('webvr') || g.appConfig.webvr_version) + '/js/main.js' d = new Promise(function (e, t) { var i = document.createElement('script') ;(i.type = 'text/javascript'), (i.src = n), (i.onload = e), document.head.appendChild(i) }) } _.find('.enter-button').on('click', a) })()) }), $('.webvr-popup .close').on('click', function (e) { e.preventDefault(), _.hasClass('hidden') ? (c('webvr_help_close'), l()) : s() }), $('#tabcardboard').on('click', r), $('#tabdaydream').on('click', r), $('#tabnative').on('click', r), $('.webvr-popup .open-with-app').on('click', function (e) { e.preventDefault(), c('webvr_learn_more'), o('tabnative'), l() }), $('.webvr-popup .help').on('click', function (e) { e.preventDefault(), c(_.hasClass('hidden') ? 'webvr_help_close' : 'webvr_help_show'), l() }), $('.webvr-popup .terms').on('click', function (e) { e.preventDefault(), c('webvr_click_terms'), s(), N.emit(A.SHOW_TERMS) }), T.on('click', function (e) { e.preventDefault(), c(D), window.open(L, '_blank') }), x.on('click', function (e) { e.preventDefault(), c('webvr_phone_link'), window.open('https://vr.google.com/daydream/phones/', '_blank') }), $('.webvr-popup .badge-cardboard').on('click', function (e) { e.preventDefault(), c('webvr_cardboard_link'), y.launch(v.CardboardAndroid) }), $('.webvr-popup .badge-oculus').on('click', function (e) { e.preventDefault(), c('webvr_oculus_link'), y.launch(v.GearVR) }) } }, F = { tabcardboard: function () { w.filter('.device-headset').attr('src', R), w.filter('.device-phone').attr('src', 'images/ico-android-robot.png'), (L = 'https://vr.google.com/cardboard/get-cardboard/'), (D = 'webvr_cardboard_link'), T.text(C.localizeText('VR_GOOGLE_CARDBOARD')), x.text(C.localizeText('VR_COMPATIBLE_ANDROID_LONG')), $('.webvr-popup .detail.daydream-label').toggleClass('hidden', !0), t() }, tabdaydream: function () { w.filter('.device-headset').attr('src', 'images/device-daydream.png'), w.filter('.device-phone').attr('src', 'images/device-pixel.png'), (L = P), (D = O), T.text(C.localizeText('WEBVR_DAYDREAM_VIEW')), x.text(C.localizeText('VR_NEED_DAYDREAM_PHONE')), $('.webvr-popup .detail.daydream-label').toggleClass('hidden', !1), t() }, tabnative: function () { w.filter('.badge-cardboard').attr('src', 'images/badge-cardboard.png'), w.filter('.badge-oculus').attr('src', 'images/badge-oculus.png'), M.toggleClass('hidden', !1), S.toggleClass('hidden', !0) } } n.extendObject(N, o.prototype), $(window).resize(h), (V.exports = N) }).call(this, '/js/gui/webvr/webVRgui.js') }, { '../../analytics': 4, '../../constants': 8, '../../enum/VRApps': 46, '../../enum/VRPlatforms': 49, '../../localization/localize': 108, '../../settings': 166, '../../util/browser': 182, '../../util/common': 185, '../../util/logger': 189, './../gui': 65, './../vr/vrLink': 86, './WebVrEvent': 88, events: 202 } ], 90: [ function (e, t, i) { 'use strict' function n(e, t, i, n, r) { ;(this.floorId = n || 0 === n ? n : -1), (this.roomId = r || ''), (this.labelId = e), (this.position = new o.Vector3().copy(t)), (this.text = i) } var o = e('three'), r = e('../util/browser') ;(n.prototype.build = function () { var e = window.document.createElement('div') r.isMobile() ? e.setAttribute('class', 'gui-floorplan-label gui-floorplan-label-mobile') : e.setAttribute('class', 'gui-floorplan-label') var t = window.document.createElement('div') t.setAttribute('class', 'gui-floorplan-label-text') var i = window.document.createTextNode(this.text) t.appendChild(i), e.appendChild(t), window.document.body.appendChild(e), (this.labelGui = e), (this.textBlock = t), $(this.labelGui).hide() var n = window.getComputedStyle(this.labelGui) this.initialTransform = n.transform || n.webkitTransform }), (t.exports = n) }, { '../util/browser': 182, three: 217 } ], 91: [ function (e, t, i) { 'use strict' function n() { ;(this.player = null), (this.modelManager = null), (this.container = null) } var c, o, r = e('three'), a = (e('../util/common'), e('../enum/PlayerEvents')), s = (e('../enum/DirectorEvents'), e('../enum/ModelManagerEvents')), l = e('../settings'), h = e('../enum/Viewmode'), u = (e('../enum/WarpStyle'), e('../util/transitions'), e('../util/lerp'), e('../util/browser')) ;(n.prototype.init = function (e, t, i) { ;(this.player = e), (this.modelManager = t), (this.container = i), this.updateModel(), this.bindEvents() }), (n.prototype.bindEvents = function () { this.modelManager.on(s.ActiveModelChanged, this.updateModel.bind(this)), this.player.on(a.ViewChanged, this.handlePlayerViewChanged.bind(this)), this.player.on(a.ModeChanged, this.handlePlayerViewChanged.bind(this)), this.player.on(a.StartInside, this.handleStartInside.bind(this)), this.player.on(a.StartOutside, this.handleStartOutside.bind(this)) }), (n.prototype.updateModel = function () { this.model = this.modelManager.getActiveModel() }), (n.prototype.handlePlayerViewChanged = function () { this.updateLabelVisibility(), this.updateLabelDisplay() }), (n.prototype.getLabelsForFloor = function (t, i) { return ( ((i = i || []).length = 0), this.model.labels.forEach( function (e) { this.labelVisibleForFloor(e, t) && i.push(e) }.bind(this) ), i ) }), (n.prototype.getLabelsForCurrentFloor = function (e) { return this.getLabelsForFloor(this.model.currentFloor.floorIndex, e) }), (n.prototype.labelVisibleForFloor = function (e, t) { var i = (u.isMobile() && this.player.getLabelScaleFactor() < l.labels.zoomHideThreshhold.mobile) || (!u.isMobile() && this.player.getLabelScaleFactor() < l.labels.zoomHideThreshhold.desktop) if (!this.model.showingLabels || !e.labelGui || !i) return !1 var n = e.floorId === this.model.floors.size() - 1 return this.model.allFloorsVisible ? n : e.floorId === t }), (n.prototype.updateLabelVisibility = function (e) { this.model.labels.forEach( function (e) { this.supportedMode() && this.labelVisibleForFloor(e, this.model.currentFloor.floorIndex) ? this.showLabel(e, l.labels.fadeInDelay, l.labels.fadeInDuration) : this.hideLabel(e, l.labels.fadeOutDelay, l.labels.fadeOutDuration) }.bind(this) ) }), (n.prototype.showAllLabels = function (t, i) { this.model.labels.forEach( function (e) { this.showLabel(e, t, i) }.bind(this) ) }), (n.prototype.hideAllLabels = function (t, i) { this.model.labels.forEach( function (e) { this.hideLabel(e, t, i) }.bind(this) ) }), (n.prototype.showLabel = function (e, t, i) { this.model.showingLabels && (e.visible || ((e.visible = !0), (e.labelGui.style.display = 'block'), (e.labelGui.style.opacity = 0), $(e.labelGui).delay(t).fadeTo(i, 1))) }), (n.prototype.hideLabel = function (e, t, i) { e.visible && ((e.visible = !1), u.isMobile() ? $(e.labelGui).hide() : $(e.labelGui).delay(t).fadeOut(i)) }), (n.prototype.supportedMode = function () { return this.player.mode === h.FLOORPLAN }), (n.prototype.updateLabelDisplay = (new r.Vector3(), new r.Vector3(), (o = []), function () { var e = this.player.getLabelScaleFactor(), t = 1.2 * (1 - e) + 0.6, i = u.isMobile() ? l.labels.zoomTruncateThreshhold.mobile : l.labels.zoomTruncateThreshhold.desktop this.getLabelsForCurrentFloor(o) for (var n = 0; n < o.length; n++) { var r = o[n] this.supportedMode() && r.labelGui && (this.updateProjectedGuiElement(r.labelGui, r.textBlock, r.position, t, t), i <= e && r.text.length >= l.labels.minLengthForTruncate ? (r.textBlock.innerText = r.text.substring(0, l.labels.truncateLength) + l.labels.truncateSuffix) : (r.textBlock.innerText = r.text)) } })), (n.prototype.updateProjectedGuiElement = ((c = new r.Vector3()), new r.Vector3(), function (e, t, i, n, r) { t.style.fontSize = 100 * r + '%' var o = 0.5 * $('#player').width(), a = 0.5 * $('#player').height() c.copy(i), c.project(this.player.camera) var s = c.x * o + o, l = -c.y * a + a ;(s -= e.offsetWidth / 2), (l -= e.offsetHeight / 2), (e.style.left = s + 'px'), (e.style.top = l + 'px') })), (n.prototype.handleStartInside = function (e) { this.updateLabelVisibility() }), (n.prototype.handleStartOutside = function () { this.updateLabelVisibility() }), (t.exports = n) }, { '../enum/DirectorEvents': 23, '../enum/ModelManagerEvents': 33, '../enum/PlayerEvents': 40, '../enum/Viewmode': 51, '../enum/WarpStyle': 52, '../settings': 166, '../util/browser': 182, '../util/common': 185, '../util/lerp': 188, '../util/transitions': 195, three: 217 } ], 92: [ function (e, t, i) { 'use strict' Array.prototype.findIndex || (Array.prototype.findIndex = function (e) { if (null == this) throw new TypeError('Array.prototype.findIndex called on null or undefined') if ('function' != typeof e) throw new TypeError('predicate must be a function') for (var t, i = Object(this), n = i.length >>> 0, r = arguments[1], o = 0; o < n; o++) if (((t = i[o]), e.call(r, t, o, i))) return o return -1 }), Array.prototype.find || Object.defineProperty(Array.prototype, 'find', { value: function (e) { if (null == this) throw new TypeError('"this" is null or not defined') var t = Object(this), i = t.length >>> 0 if ('function' != typeof e) throw new TypeError('predicate must be a function') for (var n = arguments[1], r = 0; r < i; ) { var o = t[r] if (e.call(n, o, r, t)) return o r++ } } }) }, {} ], 93: [ function (e, t, i) { 'use strict' var n, r, o, a, s, l, c, h, u, d, p, f, g, m, v, y, A, C, I, E, _, b, w, T, x, S, M, R, P, O, L, D, N, F, B, V, k, U, H, z, G, W, j, Y, q, X, Z, K, Q, J, ee = ee || {} function te() { ;(this.backgroundElement = document.createElement('div')), r.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' }), n.makeFullscreen(this.backgroundElement), (this.backgroundElement.style.position = 'fixed'), (this.domElement = document.createElement('div')), r.extend(this.domElement.style, { position: 'fixed', display: 'none', zIndex: '1001', opacity: 0, WebkitTransition: '-webkit-transform 0.2s ease-out, opacity 0.2s linear' }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement) var e = this n.bind(this.backgroundElement, 'click', function () { e.hide() }) } function ie(e, t, i) { Object.defineProperty(e, t, { get: function () { return 'RGB' === this.__state.space || re(this, t, i), this.__state[t] }, set: function (e) { 'RGB' !== this.__state.space && (re(this, t, i), (this.__state.space = 'RGB')), (this.__state[t] = e) } }) } function ne(e, t) { Object.defineProperty(e, t, { get: function () { return 'HSV' === this.__state.space || oe(this), this.__state[t] }, set: function (e) { 'HSV' !== this.__state.space && (oe(this), (this.__state.space = 'HSV')), (this.__state[t] = e) } }) } function re(e, t, i) { if ('HEX' === e.__state.space) e.__state[t] = a.component_from_hex(e.__state.hex, i) else { if ('HSV' !== e.__state.space) throw 'Corrupted color state' l.extend(e.__state, a.hsv_to_rgb(e.__state.h, e.__state.s, e.__state.v)) } } function oe(e) { var t = a.rgb_to_hsv(e.r, e.g, e.b) l.extend(e.__state, { s: t.s, v: t.v }), l.isNaN(t.h) ? l.isUndefined(e.__state.h) && (e.__state.h = 0) : (e.__state.h = t.h) } function ae() { if (((this.__state = o.apply(this, arguments)), !1 === this.__state)) throw 'Failed to interpret color arguments' this.__state.a = this.__state.a || 1 } function se(e) { return -1 < (e = e.toString()).indexOf('.') ? e.length - e.indexOf('.') - 1 : 0 } function le(e, t) { ;(this.initialValue = e[t]), (this.domElement = document.createElement('div')), (this.object = e), (this.property = t), (this.__onChange = void 0), (this.__onFinishChange = void 0) } ;((t.exports = ee).gui = ee.gui || {}), (ee.utils = ee.utils || {}), (ee.controllers = ee.controllers || {}), (ee.dom = ee.dom || {}), (ee.color = ee.color || {}), (ee.utils.css = { load: function (e, t) { var i = (t = t || document).createElement('link') ;(i.type = 'text/css'), (i.rel = 'stylesheet'), (i.href = e), t.getElementsByTagName('head')[0].appendChild(i) }, inject: function (e, t) { t = t || document var i = document.createElement('style') ;(i.type = 'text/css'), (i.innerHTML = e), t.getElementsByTagName('head')[0].appendChild(i) } }), (ee.utils.common = ((Q = Array.prototype.forEach), (J = Array.prototype.slice), { BREAK: {}, extend: function (i) { return ( this.each( J.call(arguments, 1), function (e) { for (var t in e) this.isUndefined(e[t]) || (i[t] = e[t]) }, this ), i ) }, defaults: function (i) { return ( this.each( J.call(arguments, 1), function (e) { for (var t in e) this.isUndefined(i[t]) && (i[t] = e[t]) }, this ), i ) }, compose: function () { var i = J.call(arguments) return function () { for (var e = J.call(arguments), t = i.length - 1; 0 <= t; t--) e = [i[t].apply(this, e)] return e[0] } }, each: function (e, t, i) { if (e) if (Q && e.forEach && e.forEach === Q) e.forEach(t, i) else if (e.length === e.length + 0) { for (var n = 0, r = e.length; n < r; n++) if (n in e && t.call(i, e[n], n) === this.BREAK) return } else for (var n in e) if (t.call(i, e[n], n) === this.BREAK) return }, defer: function (e) { setTimeout(e, 0) }, toArray: function (e) { return e.toArray ? e.toArray() : J.call(e) }, isUndefined: function (e) { return void 0 === e }, isNull: function (e) { return null === e }, isNaN: function (e) { return e != e }, isArray: Array.isArray || function (e) { return e.constructor === Array }, isObject: function (e) { return e === Object(e) }, isNumber: function (e) { return e === e + 0 }, isString: function (e) { return e === e + '' }, isBoolean: function (e) { return !1 === e || !0 === e }, isFunction: function (e) { return '[object Function]' === Object.prototype.toString.call(e) } })), (ee.controllers.Controller = (ee.utils.common.extend(le.prototype, { onChange: function (e) { return (this.__onChange = e), this }, onFinishChange: function (e) { return (this.__onFinishChange = e), this }, setValue: function (e) { return (this.object[this.property] = e), this.__onChange && this.__onChange.call(this, e), this.updateDisplay(), this }, getValue: function () { return this.object[this.property] }, updateDisplay: function () { return this }, isModified: function () { return this.initialValue !== this.getValue() } }), le)), (ee.dom.dom = (function (c) { function i(e) { if ('0' === e || c.isUndefined(e)) return 0 var t = e.match(n) return c.isNull(t) ? 0 : parseFloat(t[1]) } var h = {} c.each( { HTMLEvents: ['change'], MouseEvents: ['click', 'mousemove', 'mousedown', 'mouseup', 'mouseover'], KeyboardEvents: ['keydown'] }, function (e, t) { c.each(e, function (e) { h[e] = t }) } ) var n = /(\d+(\.\d+)?)px/, r = { makeSelectable: function (e, t) { void 0 !== e && void 0 !== e.style && ((e.onselectstart = t ? function () { return !1 } : function () {}), (e.style.MozUserSelect = t ? 'auto' : 'none'), (e.style.KhtmlUserSelect = t ? 'auto' : 'none'), (e.unselectable = t ? 'on' : 'off')) }, makeFullscreen: function (e, t, i) { c.isUndefined(t) && (t = !0), c.isUndefined(i) && (i = !0), (e.style.position = 'absolute'), t && ((e.style.left = 0), (e.style.right = 0)), i && ((e.style.top = 0), (e.style.bottom = 0)) }, fakeEvent: function (e, t, i, n) { i = i || {} var r = h[t] if (!r) throw new Error('Event type ' + t + ' not supported.') var o = document.createEvent(r) switch (r) { case 'MouseEvents': var a = i.x || i.clientX || 0, s = i.y || i.clientY || 0 o.initMouseEvent(t, i.bubbles || !1, i.cancelable || !0, window, i.clickCount || 1, 0, 0, a, s, !1, !1, !1, !1, 0, null) break case 'KeyboardEvents': var l = o.initKeyboardEvent || o.initKeyEvent c.defaults(i, { cancelable: !0, ctrlKey: !1, altKey: !1, shiftKey: !1, metaKey: !1, keyCode: void 0, charCode: void 0 }), l(t, i.bubbles || !1, i.cancelable, window, i.ctrlKey, i.altKey, i.shiftKey, i.metaKey, i.keyCode, i.charCode) break default: o.initEvent(t, i.bubbles || !1, i.cancelable || !0) } c.defaults(o, n), e.dispatchEvent(o) }, bind: function (e, t, i, n) { return (n = n || !1), e.addEventListener ? e.addEventListener(t, i, n) : e.attachEvent && e.attachEvent('on' + t, i), r }, unbind: function (e, t, i, n) { return (n = n || !1), e.removeEventListener ? e.removeEventListener(t, i, n) : e.detachEvent && e.detachEvent('on' + t, i), r }, addClass: function (e, t) { if (void 0 === e.className) e.className = t else if (e.className !== t) { var i = e.className.split(/ +/) ;-1 == i.indexOf(t) && (i.push(t), (e.className = i.join(' ').replace(/^\s+/, '').replace(/\s+$/, ''))) } return r }, removeClass: function (e, t) { if (t) if (void 0 === e.className); else if (e.className === t) e.removeAttribute('class') else { var i = e.className.split(/ +/), n = i.indexOf(t) ;-1 != n && (i.splice(n, 1), (e.className = i.join(' '))) } else e.className = void 0 return r }, hasClass: function (e, t) { return new RegExp('(?:^|\\s+)' + t + '(?:\\s+|$)').test(e.className) || !1 }, getWidth: function (e) { var t = getComputedStyle(e) return i(t['border-left-width']) + i(t['border-right-width']) + i(t['padding-left']) + i(t['padding-right']) + i(t.width) }, getHeight: function (e) { var t = getComputedStyle(e) return i(t['border-top-width']) + i(t['border-bottom-width']) + i(t['padding-top']) + i(t['padding-bottom']) + i(t.height) }, getOffset: function (e) { var t = { left: 0, top: 0 } if (e.offsetParent) for (; (t.left += e.offsetLeft), (t.top += e.offsetTop), (e = e.offsetParent); ); return t }, isActive: function (e) { return e === document.activeElement && (e.type || e.href) } } return r })(ee.utils.common)), (ee.controllers.OptionController = ((q = ee.controllers.Controller), (X = ee.dom.dom), (Z = ee.utils.common), ((K = function (e, t, i) { K.superclass.call(this, e, t) var n = this if (((this.__select = document.createElement('select')), Z.isArray(i))) { var r = {} Z.each(i, function (e) { r[e] = e }), (i = r) } Z.each(i, function (e, t) { var i = document.createElement('option') ;(i.innerHTML = t), i.setAttribute('value', e), n.__select.appendChild(i) }), this.updateDisplay(), X.bind(this.__select, 'change', function () { var e = this.options[this.selectedIndex].value n.setValue(e) }), this.domElement.appendChild(this.__select) }).superclass = q), Z.extend(K.prototype, q.prototype, { setValue: function (e) { var t = K.superclass.prototype.setValue.call(this, e) return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), t }, updateDisplay: function () { return (this.__select.value = this.getValue()), K.superclass.prototype.updateDisplay.call(this) } }), K)), (ee.controllers.NumberController = ((W = ee.controllers.Controller), (j = ee.utils.common), ((Y = function (e, t, i) { Y.superclass.call(this, e, t), (i = i || {}), (this.__min = i.min), (this.__max = i.max), (this.__step = i.step), j.isUndefined(this.__step) ? 0 == this.initialValue ? (this.__impliedStep = 1) : (this.__impliedStep = Math.pow(10, Math.floor(Math.log(this.initialValue) / Math.LN10)) / 10) : (this.__impliedStep = this.__step), (this.__precision = se(this.__impliedStep)) }).superclass = W), j.extend(Y.prototype, W.prototype, { setValue: function (e) { return ( void 0 !== this.__min && e < this.__min ? (e = this.__min) : void 0 !== this.__max && e > this.__max && (e = this.__max), void 0 !== this.__step && e % this.__step != 0 && (e = Math.round(e / this.__step) * this.__step), Y.superclass.prototype.setValue.call(this, e) ) }, min: function (e) { return (this.__min = e), this }, max: function (e) { return (this.__max = e), this }, step: function (e) { return (this.__step = e), (this.__impliedStep = e), (this.__precision = se(e)), this } }), Y)), (ee.controllers.NumberControllerBox = ((U = ee.controllers.NumberController), (H = ee.dom.dom), (z = ee.utils.common), ((G = function (e, t, i) { function n() { var e = parseFloat(s.__input.value) z.isNaN(e) || s.setValue(e) } function r(e) { var t = a - e.clientY s.setValue(s.getValue() + t * s.__impliedStep), (a = e.clientY) } function o() { H.unbind(window, 'mousemove', r), H.unbind(window, 'mouseup', o) } ;(this.__truncationSuspended = !1), G.superclass.call(this, e, t, i) var a, s = this ;(this.__input = document.createElement('input')), this.__input.setAttribute('type', 'text'), H.bind(this.__input, 'change', n), H.bind(this.__input, 'blur', function () { n(), s.__onFinishChange && s.__onFinishChange.call(s, s.getValue()) }), H.bind(this.__input, 'mousedown', function (e) { H.bind(window, 'mousemove', r), H.bind(window, 'mouseup', o), (a = e.clientY) }), H.bind(this.__input, 'keydown', function (e) { 13 === e.keyCode && ((s.__truncationSuspended = !0), this.blur(), (s.__truncationSuspended = !1)) }), this.updateDisplay(), this.domElement.appendChild(this.__input) }).superclass = U), z.extend(G.prototype, U.prototype, { updateDisplay: function () { return ( (this.__input.value = this.__truncationSuspended ? this.getValue() : (function (e, t) { var i = Math.pow(10, t) return Math.round(e * i) / i })(this.getValue(), this.__precision)), G.superclass.prototype.updateDisplay.call(this) ) } }), G)), (ee.controllers.NumberControllerSlider = ((N = ee.controllers.NumberController), (F = ee.dom.dom), (B = ee.utils.css), (V = ee.utils.common), ((k = function (e, t, i, n, r) { function o(e) { e.preventDefault() var t = F.getOffset(s.__background), i = F.getWidth(s.__background) return ( s.setValue( (function (e, t, i, n, r) { return n + ((e - t) / (i - t)) * (r - n) })(e.clientX, t.left, t.left + i, s.__min, s.__max) ), !1 ) } function a() { F.unbind(window, 'mousemove', o), F.unbind(window, 'mouseup', a), s.__onFinishChange && s.__onFinishChange.call(s, s.getValue()) } k.superclass.call(this, e, t, { min: i, max: n, step: r }) var s = this ;(this.__background = document.createElement('div')), (this.__foreground = document.createElement('div')), F.bind(this.__background, 'mousedown', function (e) { F.bind(window, 'mousemove', o), F.bind(window, 'mouseup', a), o(e) }), F.addClass(this.__background, 'slider'), F.addClass(this.__foreground, 'slider-fg'), this.updateDisplay(), this.__background.appendChild(this.__foreground), this.domElement.appendChild(this.__background) }).superclass = N), (k.useDefaultStyles = function () { B.inject( '/**\n * dat-gui JavaScript Controller Library\n * http://code.google.com/p/dat-gui\n *\n * Copyright 2011 Data Arts Team, Google Creative Lab\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\n.slider {\n box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);\n height: 1em;\n border-radius: 1em;\n background-color: #eee;\n padding: 0 0.5em;\n overflow: hidden;\n}\n\n.slider-fg {\n padding: 1px 0 2px 0;\n background-color: #aaa;\n height: 1em;\n margin-left: -0.5em;\n padding-right: 0.5em;\n border-radius: 1em 0 0 1em;\n}\n\n.slider-fg:after {\n display: inline-block;\n border-radius: 1em;\n background-color: #fff;\n border: 1px solid #aaa;\n content: \'\';\n float: right;\n margin-right: -1em;\n margin-top: -1px;\n height: 0.9em;\n width: 0.9em;\n}' ) }), V.extend(k.prototype, N.prototype, { updateDisplay: function () { var e = (this.getValue() - this.__min) / (this.__max - this.__min) return (this.__foreground.style.width = 100 * e + '%'), k.superclass.prototype.updateDisplay.call(this) } }), k)), (ee.controllers.FunctionController = ((P = ee.controllers.Controller), (O = ee.dom.dom), (L = ee.utils.common), ((D = function (e, t, i) { D.superclass.call(this, e, t) var n = this ;(this.__button = document.createElement('div')), (this.__button.innerHTML = void 0 === i ? 'Fire' : i), O.bind(this.__button, 'click', function (e) { return e.preventDefault(), n.fire(), !1 }), O.addClass(this.__button, 'button'), this.domElement.appendChild(this.__button) }).superclass = P), L.extend(D.prototype, P.prototype, { fire: function () { this.__onChange && this.__onChange.call(this), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.getValue().call(this.object) } }), D)), (ee.controllers.BooleanController = ((x = ee.controllers.Controller), (S = ee.dom.dom), (M = ee.utils.common), ((R = function (e, t) { R.superclass.call(this, e, t) var i = this ;(this.__prev = this.getValue()), (this.__checkbox = document.createElement('input')), this.__checkbox.setAttribute('type', 'checkbox'), S.bind( this.__checkbox, 'change', function () { i.setValue(!i.__prev) }, !1 ), this.domElement.appendChild(this.__checkbox), this.updateDisplay() }).superclass = x), M.extend(R.prototype, x.prototype, { setValue: function (e) { var t = R.superclass.prototype.setValue.call(this, e) return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), (this.__prev = this.getValue()), t }, updateDisplay: function () { return ( !0 === this.getValue() ? (this.__checkbox.setAttribute('checked', 'checked'), (this.__checkbox.checked = !0)) : (this.__checkbox.checked = !1), R.superclass.prototype.updateDisplay.call(this) ) } }), R)), (ee.color.toString = ((T = ee.utils.common), function (e) { if (1 == e.a || T.isUndefined(e.a)) { for (var t = e.hex.toString(16); t.length < 6; ) t = '0' + t return '#' + t } return 'rgba(' + Math.round(e.r) + ',' + Math.round(e.g) + ',' + Math.round(e.b) + ',' + e.a + ')' })), (ee.color.interpret = ((I = ee.color.toString), (E = ee.utils.common), (w = [ { litmus: E.isString, conversions: { THREE_CHAR_HEX: { read: function (e) { var t = e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i) return ( null !== t && { space: 'HEX', hex: parseInt('0x' + t[1].toString() + t[1].toString() + t[2].toString() + t[2].toString() + t[3].toString() + t[3].toString()) } ) }, write: I }, SIX_CHAR_HEX: { read: function (e) { var t = e.match(/^#([A-F0-9]{6})$/i) return ( null !== t && { space: 'HEX', hex: parseInt('0x' + t[1].toString()) } ) }, write: I }, CSS_RGB: { read: function (e) { var t = e.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/) return ( null !== t && { space: 'RGB', r: parseFloat(t[1]), g: parseFloat(t[2]), b: parseFloat(t[3]) } ) }, write: I }, CSS_RGBA: { read: function (e) { var t = e.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\,\s*(.+)\s*\)/) return ( null !== t && { space: 'RGB', r: parseFloat(t[1]), g: parseFloat(t[2]), b: parseFloat(t[3]), a: parseFloat(t[4]) } ) }, write: I } } }, { litmus: E.isNumber, conversions: { HEX: { read: function (e) { return { space: 'HEX', hex: e, conversionName: 'HEX' } }, write: function (e) { return e.hex } } } }, { litmus: E.isArray, conversions: { RGB_ARRAY: { read: function (e) { return ( 3 == e.length && { space: 'RGB', r: e[0], g: e[1], b: e[2] } ) }, write: function (e) { return [e.r, e.g, e.b] } }, RGBA_ARRAY: { read: function (e) { return ( 4 == e.length && { space: 'RGB', r: e[0], g: e[1], b: e[2], a: e[3] } ) }, write: function (e) { return [e.r, e.g, e.b, e.a] } } } }, { litmus: E.isObject, conversions: { RGBA_OBJ: { read: function (e) { return ( !!(E.isNumber(e.r) && E.isNumber(e.g) && E.isNumber(e.b) && E.isNumber(e.a)) && { space: 'RGB', r: e.r, g: e.g, b: e.b, a: e.a } ) }, write: function (e) { return { r: e.r, g: e.g, b: e.b, a: e.a } } }, RGB_OBJ: { read: function (e) { return ( !!(E.isNumber(e.r) && E.isNumber(e.g) && E.isNumber(e.b)) && { space: 'RGB', r: e.r, g: e.g, b: e.b } ) }, write: function (e) { return { r: e.r, g: e.g, b: e.b } } }, HSVA_OBJ: { read: function (e) { return ( !!(E.isNumber(e.h) && E.isNumber(e.s) && E.isNumber(e.v) && E.isNumber(e.a)) && { space: 'HSV', h: e.h, s: e.s, v: e.v, a: e.a } ) }, write: function (e) { return { h: e.h, s: e.s, v: e.v, a: e.a } } }, HSV_OBJ: { read: function (e) { return ( !!(E.isNumber(e.h) && E.isNumber(e.s) && E.isNumber(e.v)) && { space: 'HSV', h: e.h, s: e.s, v: e.v } ) }, write: function (e) { return { h: e.h, s: e.s, v: e.v } } } } } ]), function () { b = !1 var i = 1 < arguments.length ? E.toArray(arguments) : arguments[0] return ( E.each(w, function (e) { if (e.litmus(i)) return ( E.each(e.conversions, function (e, t) { if (((_ = e.read(i)), !1 === b && !1 !== _)) return ((b = _).conversionName = t), (_.conversion = e), E.BREAK }), E.BREAK ) }), b ) })), (ee.GUI = ee.gui.GUI = (function (e, t, i, c, h, u, d, p, f, n, g, r, o, m, v) { function y(e, t, i, n) { if (void 0 === t[i]) throw new Error('Object ' + t + ' has no property "' + i + '"') var r if (n.color) r = new g(t, i) else { var o = [t, i].concat(n.factoryArgs) r = c.apply(e, o) } n.before instanceof h && (n.before = n.before.__li), C(e, r), m.addClass(r.domElement, 'c') var a = document.createElement('span') m.addClass(a, 'property-name'), (a.innerHTML = r.property) var s = document.createElement('div') s.appendChild(a), s.appendChild(r.domElement) var l = A(e, s, n.before) return ( m.addClass(l, R.CLASS_CONTROLLER_ROW), m.addClass(l, typeof r.getValue()), (function (t, i, n) { if ( ((n.__li = i), (n.__gui = t), v.extend(n, { options: function (e) { return 1 < arguments.length ? (n.remove(), y(t, n.object, n.property, { before: n.__li.nextElementSibling, factoryArgs: [v.toArray(arguments)] })) : v.isArray(e) || v.isObject(e) ? (n.remove(), y(t, n.object, n.property, { before: n.__li.nextElementSibling, factoryArgs: [e] })) : void 0 }, name: function (e) { return (n.__li.firstElementChild.firstElementChild.innerHTML = e), n }, listen: function () { return n.__gui.listen(n), n }, remove: function () { return n.__gui.remove(n), n } }), n instanceof f) ) { var r = new p(n.object, n.property, { min: n.__min, max: n.__max, step: n.__step }) v.each(['updateDisplay', 'onChange', 'onFinishChange'], function (e) { var t = n[e], i = r[e] n[e] = r[e] = function () { var e = Array.prototype.slice.call(arguments) return t.apply(n, e), i.apply(r, e) } }), m.addClass(i, 'has-slider'), n.domElement.insertBefore(r.domElement, n.domElement.firstElementChild) } else if (n instanceof p) { var e = function (e) { return v.isNumber(n.__min) && v.isNumber(n.__max) ? (n.remove(), y(t, n.object, n.property, { before: n.__li.nextElementSibling, factoryArgs: [n.__min, n.__max, n.__step] })) : e } ;(n.min = v.compose(e, n.min)), (n.max = v.compose(e, n.max)) } else n instanceof u ? (m.bind(i, 'click', function () { m.fakeEvent(n.__checkbox, 'click') }), m.bind(n.__checkbox, 'click', function (e) { e.stopPropagation() })) : n instanceof d ? (m.bind(i, 'click', function () { m.fakeEvent(n.__button, 'click') }), m.bind(i, 'mouseover', function () { m.addClass(n.__button, 'hover') }), m.bind(i, 'mouseout', function () { m.removeClass(n.__button, 'hover') })) : n instanceof g && (m.addClass(i, 'color'), (n.updateDisplay = v.compose(function (e) { return (i.style.borderLeftColor = n.__color.toString()), e }, n.updateDisplay)), n.updateDisplay()) n.setValue = v.compose(function (e) { return t.getRoot().__preset_select && n.isModified() && _(t.getRoot(), !0), e }, n.setValue) })(e, l, r), e.__controllers.push(r), r ) } function A(e, t, i) { var n = document.createElement('li') return t && n.appendChild(t), i ? e.__ul.insertBefore(n, params.before) : e.__ul.appendChild(n), e.onResize(), n } function C(e, t) { var i = e.getRoot(), n = i.__rememberedObjects.indexOf(t.object) if (-1 != n) { var r = i.__rememberedObjectIndecesToControllers[n] if ((void 0 === r && ((r = {}), (i.__rememberedObjectIndecesToControllers[n] = r)), (r[t.property] = t), i.load && i.load.remembered)) { var o, a = i.load.remembered if (a[e.preset]) o = a[e.preset] else { if (!a[T]) return o = a[T] } if (o[n] && void 0 !== o[n][t.property]) { var s = o[n][t.property] ;(t.initialValue = s), t.setValue(s) } } } } function I(e, t) { return document.location.href + '.' + t } function l(e, t) { ;(e.domElement.style.width = t + 'px'), e.__save_row && e.autoPlace && (e.__save_row.style.width = t + 'px'), e.__closeButton && (e.__closeButton.style.width = t + 'px') } function a(r, o) { var a = {} return ( v.each(r.__rememberedObjects, function (e, t) { var i = {}, n = r.__rememberedObjectIndecesToControllers[t] v.each(n, function (e, t) { i[t] = o ? e.initialValue : e.getValue() }), (a[t] = i) }), a ) } function E(e, t, i) { var n = document.createElement('option') ;(n.innerHTML = t), (n.value = t), e.__preset_select.appendChild(n), i && (e.__preset_select.selectedIndex = e.__preset_select.length - 1) } function _(e, t) { var i = e.__preset_select[e.__preset_select.selectedIndex] i.innerHTML = t ? i.value + '*' : i.value } e.inject( ".dg {\n /** Clear list styles */\n /* Auto-place container */\n /* Auto-placed GUI's */\n /* Line items that don't contain folders. */\n /** Folder names */\n /** Hides closed items */\n /** Controller row */\n /** Name-half (left) */\n /** Controller-half (right) */\n /** Controller placement */\n /** Shorter number boxes when slider is present. */\n /** Ensure the entire boolean and function row shows a hand */ }\n .dg ul {\n list-style: none;\n margin: 0;\n padding: 0;\n width: 100%;\n clear: both; }\n .dg.ac {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n z-index: 0; }\n .dg:not(.ac) .main {\n /** Exclude mains in ac so that we don't hide close button */\n overflow: hidden; }\n .dg.main {\n -webkit-transition: opacity 0.1s linear;\n -o-transition: opacity 0.1s linear;\n -moz-transition: opacity 0.1s linear;\n transition: opacity 0.1s linear; }\n .dg.main.taller-than-window {\n overflow-y: auto; }\n .dg.main.taller-than-window .close-button {\n opacity: 1;\n /* TODO, these are style notes */\n margin-top: -1px;\n border-top: 1px solid #2c2c2c; }\n .dg.main ul.closed .close-button {\n opacity: 1 !important; }\n .dg.main:hover .close-button,\n .dg.main .close-button.drag {\n opacity: 1; }\n .dg.main .close-button {\n /*opacity: 0;*/\n -webkit-transition: opacity 0.1s linear;\n -o-transition: opacity 0.1s linear;\n -moz-transition: opacity 0.1s linear;\n transition: opacity 0.1s linear;\n border: 0;\n position: absolute;\n line-height: 19px;\n height: 20px;\n /* TODO, these are style notes */\n cursor: pointer;\n text-align: center;\n background-color: #000; }\n .dg.main .close-button:hover {\n background-color: #111; }\n .dg.a {\n float: right;\n margin-right: 15px;\n overflow-x: hidden; }\n .dg.a.has-save > ul {\n margin-top: 27px; }\n .dg.a.has-save > ul.closed {\n margin-top: 0; }\n .dg.a .save-row {\n position: fixed;\n top: 0;\n z-index: 1002; }\n .dg li {\n -webkit-transition: height 0.1s ease-out;\n -o-transition: height 0.1s ease-out;\n -moz-transition: height 0.1s ease-out;\n transition: height 0.1s ease-out; }\n .dg li:not(.folder) {\n cursor: auto;\n height: 27px;\n line-height: 27px;\n overflow: hidden;\n padding: 0 4px 0 5px; }\n .dg li.folder {\n padding: 0;\n border-left: 4px solid rgba(0, 0, 0, 0); }\n .dg li.title {\n cursor: pointer;\n margin-left: -4px; }\n .dg .closed li:not(.title),\n .dg .closed ul li,\n .dg .closed ul li > * {\n height: 0;\n overflow: hidden;\n border: 0; }\n .dg .cr {\n clear: both;\n padding-left: 3px;\n height: 27px; }\n .dg .property-name {\n cursor: default;\n float: left;\n clear: left;\n width: 40%;\n overflow: hidden;\n text-overflow: ellipsis; }\n .dg .c {\n float: left;\n width: 60%; }\n .dg .c input[type=text] {\n border: 0;\n margin-top: 4px;\n padding: 3px;\n width: 100%;\n float: right; }\n .dg .has-slider input[type=text] {\n width: 30%;\n /*display: none;*/\n margin-left: 0; }\n .dg .slider {\n float: left;\n width: 66%;\n margin-left: -5px;\n margin-right: 0;\n height: 19px;\n margin-top: 4px; }\n .dg .slider-fg {\n height: 100%; }\n .dg .c input[type=checkbox] {\n margin-top: 9px; }\n .dg .c select {\n margin-top: 5px; }\n .dg .cr.function,\n .dg .cr.function .property-name,\n .dg .cr.function *,\n .dg .cr.boolean,\n .dg .cr.boolean * {\n cursor: pointer; }\n .dg .selector {\n display: none;\n position: absolute;\n margin-left: -9px;\n margin-top: 23px;\n z-index: 10; }\n .dg .c:hover .selector,\n .dg .selector.drag {\n display: block; }\n .dg li.save-row {\n padding: 0; }\n .dg li.save-row .button {\n display: inline-block;\n padding: 0px 6px; }\n .dg.dialogue {\n background-color: #222;\n width: 460px;\n padding: 15px;\n font-size: 13px;\n line-height: 15px; }\n\n/* TODO Separate style and structure */\n#dg-new-constructor {\n padding: 10px;\n color: #222;\n font-family: Monaco, monospace;\n font-size: 10px;\n border: 0;\n resize: none;\n box-shadow: inset 1px 1px 1px #888;\n word-wrap: break-word;\n margin: 12px 0;\n display: block;\n width: 440px;\n overflow-y: scroll;\n height: 100px;\n position: relative; }\n\n#dg-local-explain {\n display: none;\n font-size: 11px;\n line-height: 17px;\n border-radius: 3px;\n background-color: #333;\n padding: 8px;\n margin-top: 10px; }\n #dg-local-explain code {\n font-size: 10px; }\n\n#dat-gui-save-locally {\n display: none; }\n\n/** Main type */\n.dg {\n color: #eee;\n font: 11px 'Lucida Grande', sans-serif;\n text-shadow: 0 -1px 0 #111;\n /** Auto place */\n /* Controller row,

  • */\n /** Controllers */ }\n .dg.main {\n /** Scrollbar */ }\n .dg.main::-webkit-scrollbar {\n width: 5px;\n background: #1a1a1a; }\n .dg.main::-webkit-scrollbar-corner {\n height: 0;\n display: none; }\n .dg.main::-webkit-scrollbar-thumb {\n border-radius: 5px;\n background: #676767; }\n .dg li:not(.folder) {\n background: #1a1a1a;\n border-bottom: 1px solid #2c2c2c; }\n .dg li.save-row {\n line-height: 25px;\n background: #dad5cb;\n border: 0; }\n .dg li.save-row select {\n margin-left: 5px;\n width: 108px; }\n .dg li.save-row .button {\n margin-left: 5px;\n margin-top: 1px;\n border-radius: 2px;\n font-size: 9px;\n line-height: 7px;\n padding: 4px 4px 5px 4px;\n background: #c5bdad;\n color: #fff;\n text-shadow: 0 1px 0 #b0a58f;\n box-shadow: 0 -1px 0 #b0a58f;\n cursor: pointer; }\n .dg li.save-row .button.gears {\n 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;\n height: 7px;\n width: 8px; }\n .dg li.save-row .button:hover {\n background-color: #bab19e;\n box-shadow: 0 -1px 0 #b0a58f; }\n .dg li.folder {\n border-bottom: 0; }\n .dg li.title {\n padding-left: 16px;\n background: black url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;\n cursor: pointer;\n border-bottom: 1px solid rgba(255, 255, 255, 0.2); }\n .dg .closed li.title {\n background-image: url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==); }\n .dg .cr.boolean {\n border-left: 3px solid #806787; }\n .dg .cr.function {\n border-left: 3px solid #e61d5f; }\n .dg .cr.number {\n border-left: 3px solid #2fa1d6; }\n .dg .cr.number input[type=text] {\n color: #2fa1d6; }\n .dg .cr.string {\n border-left: 3px solid #1ed36f; }\n .dg .cr.string input[type=text] {\n color: #1ed36f; }\n .dg .cr.function:hover, .dg .cr.boolean:hover {\n background: #111; }\n .dg .c input[type=text] {\n background: #303030;\n outline: none; }\n .dg .c input[type=text]:hover {\n background: #3c3c3c; }\n .dg .c input[type=text]:focus {\n background: #494949;\n color: #fff; }\n .dg .c .slider {\n background: #303030;\n cursor: ew-resize; }\n .dg .c .slider-fg {\n background: #2fa1d6; }\n .dg .c .slider:hover {\n background: #3c3c3c; }\n .dg .c .slider:hover .slider-fg {\n background: #44abda; }\n" ) var b, w, T = 'Default', x = (function () { try { return 'localStorage' in window && null !== window.localStorage } catch (e) { return !1 } })(), S = !0, s = !1, M = [], R = function (t) { var i = this ;(this.domElement = document.createElement('div')), (this.__ul = document.createElement('ul')), this.domElement.appendChild(this.__ul), m.addClass(this.domElement, 'dg'), (this.__folders = {}), (this.__controllers = []), (this.__rememberedObjects = []), (this.__rememberedObjectIndecesToControllers = []), (this.__listening = []), (t = t || {}), (t = v.defaults(t, { autoPlace: !0, width: R.DEFAULT_WIDTH })), (t = v.defaults(t, { resizable: t.autoPlace, hideable: t.autoPlace })), v.isUndefined(t.load) ? (t.load = { preset: T }) : t.preset && (t.load.preset = t.preset), v.isUndefined(t.parent) && t.hideable && M.push(this), (t.resizable = v.isUndefined(t.parent) && t.resizable), t.autoPlace && v.isUndefined(t.scrollable) && (t.scrollable = !0) var n, e, r = x && 'true' === localStorage.getItem(I(0, 'isLocal')) if ( (Object.defineProperties(this, { parent: { get: function () { return t.parent } }, scrollable: { get: function () { return t.scrollable } }, autoPlace: { get: function () { return t.autoPlace } }, preset: { get: function () { return i.parent ? i.getRoot().preset : t.load.preset }, set: function (e) { i.parent ? (i.getRoot().preset = e) : (t.load.preset = e), (function (e) { for (var t = 0; t < e.__preset_select.length; t++) e.__preset_select[t].value == e.preset && (e.__preset_select.selectedIndex = t) })(this), i.revert() } }, width: { get: function () { return t.width }, set: function (e) { ;(t.width = e), l(i, e) } }, name: { get: function () { return t.name }, set: function (e) { ;(t.name = e), a && (a.innerHTML = t.name) } }, closed: { get: function () { return t.closed }, set: function (e) { ;(t.closed = e), t.closed ? m.addClass(i.__ul, R.CLASS_CLOSED) : m.removeClass(i.__ul, R.CLASS_CLOSED), this.onResize(), i.__closeButton && (i.__closeButton.innerHTML = e ? R.TEXT_OPEN : R.TEXT_CLOSED) } }, load: { get: function () { return t.load } }, useLocalStorage: { get: function () { return r }, set: function (e) { x && ((r = e) ? m.bind(window, 'unload', n) : m.unbind(window, 'unload', n), localStorage.setItem(I(0, 'isLocal'), e)) } } }), v.isUndefined(t.parent)) ) { if (((t.closed = !1), m.addClass(this.domElement, R.CLASS_MAIN), m.makeSelectable(this.domElement, !1), x && r)) { i.useLocalStorage = !0 var o = localStorage.getItem(I(0, 'gui')) o && (t.load = JSON.parse(o)) } ;(this.__closeButton = document.createElement('div')), (this.__closeButton.innerHTML = R.TEXT_CLOSED), m.addClass(this.__closeButton, R.CLASS_CLOSE_BUTTON), this.domElement.appendChild(this.__closeButton), m.bind(this.__closeButton, 'click', function () { i.closed = !i.closed }) } else { void 0 === t.closed && (t.closed = !0) var a = document.createTextNode(t.name) m.addClass(a, 'controller-name') var s = A(i, a) m.addClass(this.__ul, R.CLASS_CLOSED), m.addClass(s, 'title'), m.bind(s, 'click', function (e) { return e.preventDefault(), (i.closed = !i.closed), !1 }), t.closed || (this.closed = !1) } t.autoPlace && (v.isUndefined(t.parent) && (S && ((w = document.createElement('div')), m.addClass(w, 'dg'), m.addClass(w, R.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(w), (S = !1)), w.appendChild(this.domElement), m.addClass(this.domElement, R.CLASS_AUTO_PLACE)), this.parent || l(i, t.width)), m.bind(window, 'resize', function () { i.onResize() }), m.bind(this.__ul, 'webkitTransitionEnd', function () { i.onResize() }), m.bind(this.__ul, 'transitionend', function () { i.onResize() }), m.bind(this.__ul, 'oTransitionEnd', function () { i.onResize() }), this.onResize(), t.resizable && (function (t) { function e(e) { return e.preventDefault(), (r = e.clientX), m.addClass(t.__closeButton, R.CLASS_DRAG), m.bind(window, 'mousemove', i), m.bind(window, 'mouseup', n), !1 } function i(e) { return e.preventDefault(), (t.width += r - e.clientX), t.onResize(), (r = e.clientX), !1 } function n() { m.removeClass(t.__closeButton, R.CLASS_DRAG), m.unbind(window, 'mousemove', i), m.unbind(window, 'mouseup', n) } var r ;(t.__resize_handle = document.createElement('div')), v.extend(t.__resize_handle.style, { width: '6px', marginLeft: '-3px', height: '200px', cursor: 'ew-resize', position: 'absolute' }), m.bind(t.__resize_handle, 'mousedown', e), m.bind(t.__closeButton, 'mousedown', e), t.domElement.insertBefore(t.__resize_handle, t.domElement.firstElementChild) })(this), (n = function () { x && 'true' === localStorage.getItem(I(0, 'isLocal')) && localStorage.setItem(I(0, 'gui'), JSON.stringify(i.getSaveObject())) }), (this.saveToLocalStorageIfPossible = n), i.getRoot(), t.parent || (((e = i.getRoot()).width += 1), v.defer(function () { e.width -= 1 })) } return ( (R.toggleHide = function () { ;(s = !s), v.each(M, function (e) { ;(e.domElement.style.zIndex = s ? -999 : 999), (e.domElement.style.opacity = s ? 0 : 1) }) }), (R.CLASS_AUTO_PLACE = 'a'), (R.CLASS_AUTO_PLACE_CONTAINER = 'ac'), (R.CLASS_MAIN = 'main'), (R.CLASS_CONTROLLER_ROW = 'cr'), (R.CLASS_TOO_TALL = 'taller-than-window'), (R.CLASS_CLOSED = 'closed'), (R.CLASS_CLOSE_BUTTON = 'close-button'), (R.CLASS_DRAG = 'drag'), (R.DEFAULT_WIDTH = 245), (R.TEXT_CLOSED = 'Close Controls'), (R.TEXT_OPEN = 'Open Controls'), m.bind( window, 'keydown', function (e) { 'text' === document.activeElement.type || (72 !== e.which && 72 != e.keyCode) || R.toggleHide() }, !1 ), v.extend(R.prototype, { add: function (e, t) { return y(this, e, t, { factoryArgs: Array.prototype.slice.call(arguments, 2) }) }, addColor: function (e, t) { return y(this, e, t, { color: !0 }) }, remove: function (e) { this.__ul.removeChild(e.__li), this.__controllers.slice(this.__controllers.indexOf(e), 1) var t = this v.defer(function () { t.onResize() }) }, destroy: function () { this.autoPlace && w.removeChild(this.domElement) }, addFolder: function (e) { if (void 0 !== this.__folders[e]) throw new Error('You already have a folder in this GUI by the name "' + e + '"') var t = { name: e, parent: this } ;(t.autoPlace = this.autoPlace), this.load && this.load.folders && this.load.folders[e] && ((t.closed = this.load.folders[e].closed), (t.load = this.load.folders[e])) var i = new R(t) this.__folders[e] = i var n = A(this, i.domElement) return m.addClass(n, 'folder'), i }, open: function () { this.closed = !1 }, close: function () { this.closed = !0 }, onResize: function () { var t = this.getRoot() if (t.scrollable) { var e = m.getOffset(t.__ul).top, i = 0 v.each(t.__ul.childNodes, function (e) { ;(t.autoPlace && e === t.__save_row) || (i += m.getHeight(e)) }), $('#player').height() - e - 20 < i ? (m.addClass(t.domElement, R.CLASS_TOO_TALL), (t.__ul.style.height = $('#player').height() - e - 20 + 'px')) : (m.removeClass(t.domElement, R.CLASS_TOO_TALL), (t.__ul.style.height = 'auto')) } t.__resize_handle && v.defer(function () { t.__resize_handle.style.height = t.__ul.offsetHeight + 'px' }), t.__closeButton && (t.__closeButton.style.width = t.width + 'px') }, remember: function () { if ( (v.isUndefined(b) && ((b = new o()).domElement.innerHTML = '
    \n\n Here\'s the new load parameter for your GUI\'s constructor:\n\n \n\n
    \n\n Automatically save\n values to localStorage on exit.\n\n
    The values saved to localStorage will\n override those passed to dat.GUI\'s constructor. This makes it\n easier to work incrementally, but localStorage is fragile,\n and your friends may not see the same values you do.\n \n
    \n \n
    \n\n
    '), this.parent) ) throw new Error('You can only call remember on a top level GUI.') var t = this v.each(Array.prototype.slice.call(arguments), function (e) { 0 == t.__rememberedObjects.length && (function (i) { var e = (i.__save_row = document.createElement('li')) m.addClass(i.domElement, 'has-save'), i.__ul.insertBefore(e, i.__ul.firstChild), m.addClass(e, 'save-row') var t = document.createElement('span') ;(t.innerHTML = ' '), m.addClass(t, 'button gears') var n = document.createElement('span') ;(n.innerHTML = 'Save'), m.addClass(n, 'button'), m.addClass(n, 'save') var r = document.createElement('span') ;(r.innerHTML = 'New'), m.addClass(r, 'button'), m.addClass(r, 'save-as') var o = document.createElement('span') ;(o.innerHTML = 'Revert'), m.addClass(o, 'button'), m.addClass(o, 'revert') var a = (i.__preset_select = document.createElement('select')) if ( (i.load && i.load.remembered ? v.each(i.load.remembered, function (e, t) { E(i, t, t == i.preset) }) : E(i, T, !1), m.bind(a, 'change', function () { for (var e = 0; e < i.__preset_select.length; e++) i.__preset_select[e].innerHTML = i.__preset_select[e].value i.preset = this.value }), e.appendChild(a), e.appendChild(t), e.appendChild(n), e.appendChild(r), e.appendChild(o), x) ) { var s = document.getElementById('dg-save-locally'), l = document.getElementById('dg-local-explain') s.style.display = 'block' var c = document.getElementById('dg-local-storage') 'true' === localStorage.getItem(I(0, 'isLocal')) && c.setAttribute('checked', 'checked') var h = function () { l.style.display = i.useLocalStorage ? 'block' : 'none' } h(), m.bind(c, 'change', function () { ;(i.useLocalStorage = !i.useLocalStorage), h() }) } var u = document.getElementById('dg-new-constructor') m.bind(u, 'keydown', function (e) { !e.metaKey || (67 !== e.which && 67 != e.keyCode) || b.hide() }), m.bind(t, 'click', function () { ;(u.innerHTML = JSON.stringify(i.getSaveObject(), void 0, 2)), b.show(), u.focus(), u.select() }), m.bind(n, 'click', function () { i.save() }), m.bind(r, 'click', function () { var e = prompt('Enter a new preset name.') e && i.saveAs(e) }), m.bind(o, 'click', function () { i.revert() }) })(t), -1 == t.__rememberedObjects.indexOf(e) && t.__rememberedObjects.push(e) }), this.autoPlace && l(this, this.width) }, getRoot: function () { for (var e = this; e.parent; ) e = e.parent return e }, getSaveObject: function () { var i = this.load return ( (i.closed = this.closed), 0 < this.__rememberedObjects.length && ((i.preset = this.preset), i.remembered || (i.remembered = {}), (i.remembered[this.preset] = a(this))), (i.folders = {}), v.each(this.__folders, function (e, t) { i.folders[t] = e.getSaveObject() }), i ) }, save: function () { this.load.remembered || (this.load.remembered = {}), (this.load.remembered[this.preset] = a(this)), _(this, !1), this.saveToLocalStorageIfPossible() }, saveAs: function (e) { this.load.remembered || ((this.load.remembered = {}), (this.load.remembered[T] = a(this, !0))), (this.load.remembered[e] = a(this)), (this.preset = e), E(this, e, !0), this.saveToLocalStorageIfPossible() }, revert: function (t) { v.each( this.__controllers, function (e) { this.getRoot().load.remembered ? C(t || this.getRoot(), e) : e.setValue(e.initialValue) }, this ), v.each(this.__folders, function (e) { e.revert(e) }), t || _(this.getRoot(), !1) }, listen: function (e) { var t = 0 == this.__listening.length this.__listening.push(e), t && (function e(t) { 0 != t.length && r(function () { e(t) }), v.each(t, function (e) { e.updateDisplay() }) })(this.__listening) } }), R ) })( ee.utils.css, 0, 0, (ee.controllers.factory = ((h = ee.controllers.OptionController), (u = ee.controllers.NumberControllerBox), (d = ee.controllers.NumberControllerSlider), (p = ee.controllers.StringController = ((v = ee.controllers.Controller), (y = ee.dom.dom), (A = ee.utils.common), ((C = function (e, t) { function i() { n.setValue(n.__input.value) } C.superclass.call(this, e, t) var n = this ;(this.__input = document.createElement('input')), this.__input.setAttribute('type', 'text'), y.bind(this.__input, 'keyup', i), y.bind(this.__input, 'change', i), y.bind(this.__input, 'blur', function () { n.__onFinishChange && n.__onFinishChange.call(n, n.getValue()) }), y.bind(this.__input, 'keydown', function (e) { 13 === e.keyCode && this.blur() }), this.updateDisplay(), this.domElement.appendChild(this.__input) }).superclass = v), A.extend(C.prototype, v.prototype, { updateDisplay: function () { return y.isActive(this.__input) || (this.__input.value = this.getValue()), C.superclass.prototype.updateDisplay.call(this) } }), C)), (f = ee.controllers.FunctionController), (g = ee.controllers.BooleanController), (m = ee.utils.common), function (e, t) { var i = e[t] return m.isArray(arguments[2]) || m.isObject(arguments[2]) ? new h(e, t, arguments[2]) : m.isNumber(i) ? m.isNumber(arguments[2]) && m.isNumber(arguments[3]) ? new d(e, t, arguments[2], arguments[3]) : new u(e, t, { min: arguments[2], max: arguments[3] }) : m.isString(i) ? new p(e, t) : m.isFunction(i) ? new f(e, t, '') : m.isBoolean(i) ? new g(e, t) : void 0 })), ee.controllers.Controller, ee.controllers.BooleanController, ee.controllers.FunctionController, ee.controllers.NumberControllerBox, ee.controllers.NumberControllerSlider, ee.controllers.OptionController, (ee.controllers.ColorController = (function (e, h, u, d, p) { function f(t, i, n, r) { ;(t.style.background = ''), p.each(o, function (e) { t.style.cssText += 'background: ' + e + 'linear-gradient(' + i + ', ' + n + ' 0%, ' + r + ' 100%); ' }) } var g = function (e, t) { function i(e) { a(e), h.bind(window, 'mousemove', a), h.bind(window, 'mouseup', n) } function n() { h.unbind(window, 'mousemove', a), h.unbind(window, 'mouseup', n) } function r() { var e = d(this.value) !1 !== e ? ((l.__color.__state = e), l.setValue(l.__color.toOriginal())) : (this.value = l.__color.toString()) } function o() { h.unbind(window, 'mousemove', s), h.unbind(window, 'mouseup', o) } function a(e) { e.preventDefault() var t = h.getWidth(l.__saturation_field), i = h.getOffset(l.__saturation_field), n = (e.clientX - i.left + document.body.scrollLeft) / t, r = 1 - (e.clientY - i.top + document.body.scrollTop) / t return 1 < r ? (r = 1) : r < 0 && (r = 0), 1 < n ? (n = 1) : n < 0 && (n = 0), (l.__color.v = r), (l.__color.s = n), l.setValue(l.__color.toOriginal()), !1 } function s(e) { e.preventDefault() var t = h.getHeight(l.__hue_field), i = h.getOffset(l.__hue_field), n = 1 - (e.clientY - i.top + document.body.scrollTop) / t return 1 < n ? (n = 1) : n < 0 && (n = 0), (l.__color.h = 360 * n), l.setValue(l.__color.toOriginal()), !1 } g.superclass.call(this, e, t), (this.__color = new u(this.getValue())), (this.__temp = new u(0)) var l = this ;(this.domElement = document.createElement('div')), h.makeSelectable(this.domElement, !1), (this.__selector = document.createElement('div')), (this.__selector.className = 'selector'), (this.__saturation_field = document.createElement('div')), (this.__saturation_field.className = 'saturation-field'), (this.__field_knob = document.createElement('div')), (this.__field_knob.className = 'field-knob'), (this.__field_knob_border = '2px solid '), (this.__hue_knob = document.createElement('div')), (this.__hue_knob.className = 'hue-knob'), (this.__hue_field = document.createElement('div')), (this.__hue_field.className = 'hue-field'), (this.__input = document.createElement('input')), (this.__input.type = 'text'), (this.__input_textShadow = '0 1px 1px '), h.bind(this.__input, 'keydown', function (e) { 13 === e.keyCode && r.call(this) }), h.bind(this.__input, 'blur', r), h.bind(this.__selector, 'mousedown', function (e) { h.addClass(this, 'drag').bind(window, 'mouseup', function (e) { h.removeClass(l.__selector, 'drag') }) }) var c = document.createElement('div') p.extend(this.__selector.style, { width: '122px', height: '102px', padding: '3px', backgroundColor: '#222', boxShadow: '0px 1px 3px rgba(0,0,0,0.3)' }), p.extend(this.__field_knob.style, { position: 'absolute', width: '12px', height: '12px', border: this.__field_knob_border + (this.__color.v < 0.5 ? '#fff' : '#000'), boxShadow: '0px 1px 3px rgba(0,0,0,0.5)', borderRadius: '12px', zIndex: 1 }), p.extend(this.__hue_knob.style, { position: 'absolute', width: '15px', height: '2px', borderRight: '4px solid #fff', zIndex: 1 }), p.extend(this.__saturation_field.style, { width: '100px', height: '100px', border: '1px solid #555', marginRight: '3px', display: 'inline-block', cursor: 'pointer' }), p.extend(c.style, { width: '100%', height: '100%', background: 'none' }), f(c, 'top', 'rgba(0,0,0,0)', '#000'), p.extend(this.__hue_field.style, { width: '15px', height: '100px', display: 'inline-block', border: '1px solid #555', cursor: 'ns-resize' }), (function (e) { ;(e.style.background = ''), (e.style.cssText += 'background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);'), (e.style.cssText += 'background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);'), (e.style.cssText += 'background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);'), (e.style.cssText += 'background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);'), (e.style.cssText += 'background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);') })(this.__hue_field), p.extend(this.__input.style, { outline: 'none', textAlign: 'center', color: '#fff', border: 0, fontWeight: 'bold', textShadow: this.__input_textShadow + 'rgba(0,0,0,0.7)' }), h.bind(this.__saturation_field, 'mousedown', i), h.bind(this.__field_knob, 'mousedown', i), h.bind(this.__hue_field, 'mousedown', function (e) { s(e), h.bind(window, 'mousemove', s), h.bind(window, 'mouseup', o) }), this.__saturation_field.appendChild(c), this.__selector.appendChild(this.__field_knob), this.__selector.appendChild(this.__saturation_field), this.__selector.appendChild(this.__hue_field), this.__hue_field.appendChild(this.__hue_knob), this.domElement.appendChild(this.__input), this.domElement.appendChild(this.__selector), this.updateDisplay() } ;(g.superclass = e), p.extend(g.prototype, e.prototype, { updateDisplay: function () { var t = d(this.getValue()) if (!1 !== t) { var i = !1 p.each( u.COMPONENTS, function (e) { if (!p.isUndefined(t[e]) && !p.isUndefined(this.__color.__state[e]) && t[e] !== this.__color.__state[e]) return (i = !0), {} }, this ), i && p.extend(this.__color.__state, t) } p.extend(this.__temp.__state, this.__color.__state), (this.__temp.a = 1) var e = this.__color.v < 0.5 || 0.5 < this.__color.s ? 255 : 0, n = 255 - e p.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + 'px', marginTop: 100 * (1 - this.__color.v) - 7 + 'px', backgroundColor: this.__temp.toString(), border: this.__field_knob_border + 'rgb(' + e + ',' + e + ',' + e + ')' }), (this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + 'px'), (this.__temp.s = 1), (this.__temp.v = 1), f(this.__saturation_field, 'left', '#fff', this.__temp.toString()), p.extend(this.__input.style, { backgroundColor: (this.__input.value = this.__color.toString()), color: 'rgb(' + e + ',' + e + ',' + e + ')', textShadow: this.__input_textShadow + 'rgba(' + n + ',' + n + ',' + n + ',.7)' }) } }) var o = ['-moz-', '-o-', '-webkit-', '-ms-', ''] return g })( ee.controllers.Controller, ee.dom.dom, (ee.color.Color = ((o = ee.color.interpret), (a = ee.color.math = { hsv_to_rgb: function (e, t, i) { var n = Math.floor(e / 60) % 6, r = e / 60 - Math.floor(e / 60), o = i * (1 - t), a = i * (1 - r * t), s = i * (1 - (1 - r) * t), l = [ [i, s, o], [a, i, o], [o, i, s], [o, a, i], [s, o, i], [i, o, a] ][n] return { r: 255 * l[0], g: 255 * l[1], b: 255 * l[2] } }, rgb_to_hsv: function (e, t, i) { var n, r = Math.min(e, t, i), o = Math.max(e, t, i), a = o - r return 0 == o ? { h: NaN, s: 0, v: 0 } : ((n = e == o ? (t - i) / a : t == o ? 2 + (i - e) / a : 4 + (e - t) / a), (n /= 6) < 0 && (n += 1), { h: 360 * n, s: a / o, v: o / 255 }) }, rgb_to_hex: function (e, t, i) { var n = this.hex_with_component(0, 2, e) return (n = this.hex_with_component(n, 1, t)), this.hex_with_component(n, 0, i) }, component_from_hex: function (e, t) { return (e >> (8 * t)) & 255 }, hex_with_component: function (e, t, i) { return (i << (c = 8 * t)) | (e & ~(255 << c)) } }), (s = ee.color.toString), (l = ee.utils.common), (ae.COMPONENTS = ['r', 'g', 'b', 'h', 's', 'v', 'hex', 'a']), l.extend(ae.prototype, { toString: function () { return s(this) }, toOriginal: function () { return this.__state.conversion.write(this) } }), ie(ae.prototype, 'r', 2), ie(ae.prototype, 'g', 1), ie(ae.prototype, 'b', 0), ne(ae.prototype, 'h'), ne(ae.prototype, 's'), ne(ae.prototype, 'v'), Object.defineProperty(ae.prototype, 'a', { get: function () { return this.__state.a }, set: function (e) { this.__state.a = e } }), Object.defineProperty(ae.prototype, 'hex', { get: function () { return 'HEX' !== !this.__state.space && (this.__state.hex = a.rgb_to_hex(this.r, this.g, this.b)), this.__state.hex }, set: function (e) { ;(this.__state.space = 'HEX'), (this.__state.hex = e) } }), ae)), ee.color.interpret, ee.utils.common )), (ee.utils.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e, t) { window.setTimeout(e, 1e3 / 60) }), (ee.dom.CenteredDiv = ((n = ee.dom.dom), (r = ee.utils.common), (te.prototype.show = function () { var e = this ;(this.backgroundElement.style.display = 'block'), (this.domElement.style.display = 'block'), (this.domElement.style.opacity = 0), (this.domElement.style.webkitTransform = 'scale(1.1)'), this.layout(), r.defer(function () { ;(e.backgroundElement.style.opacity = 1), (e.domElement.style.opacity = 1), (e.domElement.style.webkitTransform = 'scale(1)') }) }), (te.prototype.hide = function () { var e = this, t = function () { ;(e.domElement.style.display = 'none'), (e.backgroundElement.style.display = 'none'), n.unbind(e.domElement, 'webkitTransitionEnd', t), n.unbind(e.domElement, 'transitionend', t), n.unbind(e.domElement, 'oTransitionEnd', t) } n.bind(this.domElement, 'webkitTransitionEnd', t), n.bind(this.domElement, 'transitionend', t), n.bind(this.domElement, 'oTransitionEnd', t), (this.backgroundElement.style.opacity = 0), (this.domElement.style.opacity = 0), (this.domElement.style.webkitTransform = 'scale(1.1)') }), (te.prototype.layout = function () { ;(this.domElement.style.left = $('#player').width() / 2 - n.getWidth(this.domElement) / 2 + 'px'), (this.domElement.style.top = $('#player').height() / 2 - n.getHeight(this.domElement) / 2 + 'px') }), te)), ee.dom.dom, ee.utils.common )) }, {} ], 94: [ function (e, t, i) { ;(function (J) { 'use strict' function i(e) { function t(e, t) { for (var i = 0, n = 0, r = new Array(), o = 1; o <= 16; o++) { for (var a = 1; a <= e[o]; a++) (r[t[n]] = []), (r[t[n]][0] = i), (r[t[n]][1] = o), n++, i++ i *= 2 } return r } function _(e) { for (var t = e[0], i = e[1] - 1; 0 <= i; ) t & (1 << i) && (B |= 1 << V), i--, --V < 0 && (255 == B ? (b(255), b(0)) : b(B), (V = 7), (B = 0)) } function b(e) { F.push(e) } function w(e) { b((e >> 8) & 255), b(255 & e) } function T(e, t, i, n, r) { for ( var o, a = r[0], s = r[240], l = (function (e, t) { var i, n, r, o, a, s, l, c, h, u, d = 0 for (h = 0; h < 8; ++h) { ;(i = e[d]), (n = e[d + 1]), (r = e[d + 2]), (o = e[d + 3]), (a = e[d + 4]), (s = e[d + 5]), (l = e[d + 6]) var p = i + (c = e[d + 7]), f = i - c, g = n + l, m = n - l, v = r + s, y = r - s, A = o + a, C = o - a, I = p + A, E = p - A, _ = g + v, b = g - v ;(e[d] = I + _), (e[d + 4] = I - _) var w = 0.707106781 * (b + E) ;(e[d + 2] = E + w), (e[d + 6] = E - w) var T = 0.382683433 * ((I = C + y) - (b = m + f)), x = 0.5411961 * I + T, S = 1.306562965 * b + T, M = 0.707106781 * (_ = y + m), R = f + M, P = f - M ;(e[d + 5] = P + x), (e[d + 3] = P - x), (e[d + 1] = R + S), (e[d + 7] = R - S), (d += 8) } for (h = d = 0; h < 8; ++h) { ;(i = e[d]), (n = e[d + 8]), (r = e[d + 16]), (o = e[d + 24]), (a = e[d + 32]), (s = e[d + 40]), (l = e[d + 48]) var O = i + (c = e[d + 56]), L = i - c, D = n + l, N = n - l, F = r + s, B = r - s, V = o + a, k = o - a, U = O + V, H = O - V, z = D + F, G = D - F ;(e[d] = U + z), (e[d + 32] = U - z) var W = 0.707106781 * (G + H) ;(e[d + 16] = H + W), (e[d + 48] = H - W) var j = 0.382683433 * ((U = k + B) - (G = N + L)), Y = 0.5411961 * U + j, q = 1.306562965 * G + j, X = 0.707106781 * (z = B + N), Z = L + X, K = L - X ;(e[d + 40] = K + Y), (e[d + 24] = K - Y), (e[d + 8] = Z + q), (e[d + 56] = Z - q), d++ } for (h = 0; h < 64; ++h) (u = e[h] * t[h]), (Q[h] = 0 < u ? (0.5 + u) | 0 : (u - 0.5) | 0) return Q })(e, t), c = 0; c < 64; ++c ) A[C[c]] = l[c] var h = A[0] - i ;(i = A[0]), 0 == h ? _(n[0]) : (_(n[y[(o = 32767 + h)]]), _(v[o])) for (var u = 63; 0 < u && 0 == A[u]; u--); if (0 == u) return _(a), i for (var d, p = 1; p <= u; ) { for (var f = p; 0 == A[p] && p <= u; ++p); var g = p - f if (16 <= g) { d = g >> 4 for (var m = 1; m <= d; ++m) _(s) g &= 15 } ;(o = 32767 + A[p]), _(r[(g << 4) + y[o]]), _(v[o]), p++ } return 63 != u && _(a), i } function x(e) { if ((e <= 0 && (e = 1), 100 < e && (e = 100), i != e)) { ;(function (e) { for ( var t = [ 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99 ], i = 0; i < 64; i++ ) { var n = u((t[i] * e + 50) / 100) n < 1 ? (n = 1) : 255 < n && (n = 255), (O[C[i]] = n) } for ( var r = [ 17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 ], o = 0; o < 64; o++ ) { var a = u((r[o] * e + 50) / 100) a < 1 ? (a = 1) : 255 < a && (a = 255), (L[C[o]] = a) } for (var s = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379], l = 0, c = 0; c < 8; c++) for (var h = 0; h < 8; h++) (D[l] = 1 / (O[C[l]] * s[c] * s[h] * 8)), (N[l] = 1 / (L[C[l]] * s[c] * s[h] * 8)), l++ })(e < 50 ? Math.floor(5e3 / e) : Math.floor(200 - 2 * e)), (i = e) } } var S, M, R, P, i, u = (Math.round, Math.floor), O = new Array(64), L = new Array(64), D = new Array(64), N = new Array(64), v = new Array(65535), y = new Array(65535), Q = new Array(64), A = new Array(64), F = [], B = 0, V = 7, k = new Array(64), U = new Array(64), H = new Array(64), n = new Array(256), z = new Array(2048), C = [ 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63 ], G = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], W = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], j = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125], Y = [ 1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250 ], q = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], X = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], Z = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119], K = [ 0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250 ] ;(this.encode = function (e, t) { var i = (new Date().getTime(), t.quality) i && x(i), (F = new Array()), (B = 0), (V = 7), w(65496), w(65504), w(16), b(74), b(70), b(73), b(70), b(0), b(1), b(1), b(0), w(1), w(1), b(0), b(0), (function () { w(65499), w(132), b(0) for (var e = 0; e < 64; e++) b(O[e]) b(1) for (var t = 0; t < 64; t++) b(L[t]) })(), (function (e, t) { w(65472), w(17), b(8), w(t), w(e), b(3), b(1), b(17), b(0), b(2), b(17), b(1), b(3), b(17), b(1) })(e.width, e.height), (function () { w(65476), w(418), b(0) for (var e = 0; e < 16; e++) b(G[e + 1]) for (var t = 0; t <= 11; t++) b(W[t]) b(16) for (var i = 0; i < 16; i++) b(j[i + 1]) for (var n = 0; n <= 161; n++) b(Y[n]) b(1) for (var r = 0; r < 16; r++) b(q[r + 1]) for (var o = 0; o <= 11; o++) b(X[o]) b(17) for (var a = 0; a < 16; a++) b(Z[a + 1]) for (var s = 0; s <= 161; s++) b(K[s]) })(), w(65498), w(12), b(3), b(1), b(0), b(2), b(17), b(3), b(17), b(0), b(63), b(0) var n = 0, r = 0, o = 0 ;(B = 0), (V = 7), (this.encode.displayName = '_encode_') for (var a, s, l, c, h, u, d, p, f, g = e.data, m = e.width, v = e.height, y = t.flipY, A = 4 * m, C = y ? v : 0, I = y ? -8 : 8; (y && 0 < C) || (!y && C < v); ) { for (a = 0; a < A; ) { for (u = h = A * C + a, d = -1, f = p = 0; f < 64; f++) (u = h + (p = (y ? 63 - f : f) >> 3) * A + (d = 4 * (7 & f))), v <= C + p && (u -= A * (C + 1 + p - v)), A <= a + d && (u -= a + d - A + 4), (s = g[u++]), (l = g[u++]), (c = g[u++]), (k[f] = ((z[s] + z[(l + 256) >> 0] + z[(c + 512) >> 0]) >> 16) - 128), (U[f] = ((z[(s + 768) >> 0] + z[(l + 1024) >> 0] + z[(c + 1280) >> 0]) >> 16) - 128), (H[f] = ((z[(s + 1280) >> 0] + z[(l + 1536) >> 0] + z[(c + 1792) >> 0]) >> 16) - 128) ;(n = T(k, D, n, S, R)), (r = T(U, N, r, M, P)), (o = T(H, N, o, M, P)), (a += 32) } C += I } if (0 <= V) { var E = [] ;(E[1] = V + 1), (E[0] = (1 << (V + 1)) - 1), _(E) } return w(65497), new J(F) }), new Date().getTime(), (e = e || 50), (function () { for (var e = String.fromCharCode, t = 0; t < 256; t++) n[t] = e(t) })(), (S = t(G, W)), (M = t(q, X)), (R = t(j, Y)), (P = t(Z, K)), (function () { for (var e = 1, t = 2, i = 1; i <= 15; i++) { for (var n = e; n < t; n++) (y[32767 + n] = i), (v[32767 + n] = []), (v[32767 + n][1] = i), (v[32767 + n][0] = n) for (var r = -(t - 1); r <= -e; r++) (y[32767 + r] = i), (v[32767 + r] = []), (v[32767 + r][1] = i), (v[32767 + r][0] = t - 1 + r) ;(e <<= 1), (t <<= 1) } })(), (function () { for (var e = 0; e < 256; e++) (z[e] = 19595 * e), (z[(e + 256) >> 0] = 38470 * e), (z[(e + 512) >> 0] = 7471 * e + 32768), (z[(e + 768) >> 0] = -11059 * e), (z[(e + 1024) >> 0] = -21709 * e), (z[(e + 1280) >> 0] = 32768 * e + 8421375), (z[(e + 1536) >> 0] = -27439 * e), (z[(e + 1792) >> 0] = -5329 * e) })(), x(e), new Date().getTime() } t.exports.encode = function (e, t) { return ( ((t = t || {}).quality = t.quality || 50), { data: new i(t.quality).encode(e, t), width: e.width, height: e.height } ) } }).call(this, e('buffer').Buffer) }, { buffer: 198 } ], 95: [ function (e, t, i) { 'use strict' !(function () { if ( ('performance' in window == 0 && (window.performance = {}), (Date.now = Date.now || function () { return new Date().getTime() }), 'now' in window.performance == 0) ) { var e = Date.now() performance.timing && performance.timing.navigationStart && (e = performance.timing.navigationStart), (window.performance.now = function () { return Date.now() - e }) } })() }, {} ], 96: [ function (e, t, i) { 'use strict' var a = e('three') ;(a.EffectComposer = function (e, t) { if (((this.renderer = e), void 0 === t)) { var i = { minFilter: a.LinearFilter, magFilter: a.LinearFilter, format: a.RGBAFormat, stencilBuffer: !1 }, n = e.getSize() t = new a.WebGLRenderTarget(n.width, n.height, i) } ;(this.renderTarget1 = t), (this.renderTarget2 = t.clone()), (this.writeBuffer = this.renderTarget1), (this.readBuffer = this.renderTarget2), (this.passes = []), void 0 === a.CopyShader && console.error('THREE.EffectComposer relies on THREE.CopyShader'), (this.copyPass = new a.ShaderPass(a.CopyShader)) }), (a.EffectComposer.prototype = { swapBuffers: function () { var e = this.readBuffer ;(this.readBuffer = this.writeBuffer), (this.writeBuffer = e) }, addPass: function (e) { this.passes.push(e) }, insertPass: function (e, t) { this.passes.splice(t, 0, e) }, render: function (e) { ;(this.writeBuffer = this.renderTarget1), (this.readBuffer = this.renderTarget2) var t, i, n = !1, r = this.passes.length for (i = 0; i < r; i++) if ((t = this.passes[i]).enabled) { if ((t.render(this.renderer, this.writeBuffer, this.readBuffer, e, n), t.needsSwap)) { if (n) { var o = this.renderer.context o.stencilFunc(o.NOTEQUAL, 1, 4294967295), this.copyPass.render(this.renderer, this.writeBuffer, this.readBuffer, e), o.stencilFunc(o.EQUAL, 1, 4294967295) } this.swapBuffers() } t instanceof a.MaskPass ? (n = !0) : t instanceof a.ClearMaskPass && (n = !1) } }, reset: function (e) { if (void 0 === e) { var t = this.renderer.getSize() ;(e = this.renderTarget1.clone()).setSize(t.width, t.height) } this.renderTarget1.dispose(), this.renderTarget2.dispose(), (this.renderTarget1 = e), (this.renderTarget2 = e.clone()), (this.writeBuffer = this.renderTarget1), (this.readBuffer = this.renderTarget2) }, setSize: function (e, t) { this.renderTarget1.setSize(e, t), this.renderTarget2.setSize(e, t) this.passes.forEach(a => { //add for TransitionPass a.setSize && a.setSize(e, t) }) } }) }, { three: 217 } ], 97: [ function (e, t, i) { 'use strict' var n = e('three') ;(n.MaskPass = function (e, t) { ;(this.scene = e), (this.camera = t), (this.enabled = !0), (this.clear = !0), (this.needsSwap = !1), (this.inverse = !1) }), (n.MaskPass.prototype = { render: function (e, t, i, n) { var r, o, a = e.context a.colorMask(!1, !1, !1, !1), a.depthMask(!1), (o = this.inverse ? ((r = 0), 1) : ((r = 1), 0)), a.enable(a.STENCIL_TEST), a.stencilOp(a.REPLACE, a.REPLACE, a.REPLACE), a.stencilFunc(a.ALWAYS, r, 4294967295), a.clearStencil(o), e.render(this.scene, this.camera, i, this.clear), e.render(this.scene, this.camera, t, this.clear), a.colorMask(!0, !0, !0, !0), a.depthMask(!0), a.stencilFunc(a.EQUAL, 1, 4294967295), a.stencilOp(a.KEEP, a.KEEP, a.KEEP) } }), (n.ClearMaskPass = function () { this.enabled = !0 }), (n.ClearMaskPass.prototype = { render: function (e, t, i, n) { var r = e.context r.disable(r.STENCIL_TEST) } }) }, { three: 217 } ], 98: [ function (e, t, i) { 'use strict' var o = e('three') ;(o.RenderPass = function (e, t, i, n, r) { ;(this.scene = e), (this.camera = t), (this.overrideMaterial = i), (this.clearColor = n), (this.clearAlpha = void 0 !== r ? r : 1), (this.oldClearColor = new o.Color()), (this.oldClearAlpha = 1), (this.enabled = !0), (this.clear = !0), (this.needsSwap = !1) }), (o.RenderPass.prototype = { render: function (e, t, i, n) { ;(this.scene.overrideMaterial = this.overrideMaterial), this.clearColor && (this.oldClearColor.copy(e.getClearColor()), (this.oldClearAlpha = e.getClearAlpha()), e.setClearColor(this.clearColor, this.clearAlpha)), e.render(this.scene, this.camera, i, this.clear), this.clearColor && e.setClearColor(this.oldClearColor, this.oldClearAlpha), (this.scene.overrideMaterial = null) } }) }, { three: 217 } ], 99: [ function (e, t, i) { 'use strict' var n = e('three') ;(n.ShaderPass = function (e, t) { ;(this.textureID = void 0 !== t ? t : 'tDiffuse'), e instanceof n.ShaderMaterial ? ((this.uniforms = e.uniforms), (this.material = e)) : e && ((this.uniforms = n.UniformsUtils.clone(e.uniforms)), (this.material = new n.ShaderMaterial({ defines: e.defines || {}, uniforms: this.uniforms, vertexShader: e.vertexShader, fragmentShader: e.fragmentShader }))), (this.renderToScreen = !1), (this.enabled = !0), (this.needsSwap = !0), (this.clear = !1), (this.camera = new n.OrthographicCamera(-1, 1, 1, -1, 0, 1)), (this.scene = new n.Scene()), (this.quad = new n.Mesh(new n.PlaneBufferGeometry(2, 2), null)), this.scene.add(this.quad) }), (n.ShaderPass.prototype = { render: function (e, t, i, n) { this.uniforms[this.textureID] && (this.uniforms[this.textureID].value = i), (this.quad.material = this.material), this.renderToScreen ? e.render(this.scene, this.camera) : e.render(this.scene, this.camera, t, this.clear) } }) }, { three: 217 } ], 100: [ function (e, t, i) { 'use strict' e('three').CopyShader = { uniforms: { tDiffuse: { type: 't', value: null }, opacity: { type: 'f', value: 1 } }, vertexShader: ['varying vec2 vUv;', 'void main() {', 'vUv = uv;', 'gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );', '}'].join('\n'), fragmentShader: [ 'uniform float opacity;', 'uniform sampler2D tDiffuse;', 'varying vec2 vUv;', 'void main() {', 'vec4 texel = texture2D( tDiffuse, vUv );', 'gl_FragColor = opacity * texel;', '}' ].join('\n') } }, { three: 217 } ], 101: [ function (e, t, i) { 'use strict' e('three').HorizontalBlurShader = { uniforms: { tDiffuse: { type: 't', value: null }, h: { type: 'f', value: 1 / 512 } }, vertexShader: ['varying vec2 vUv;', 'void main() {', 'vUv = uv;', 'gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );', '}'].join('\n'), fragmentShader: [ 'uniform sampler2D tDiffuse;', 'uniform float h;', 'varying vec2 vUv;', 'void main() {', 'vec4 sum = vec4( 0.0 );', 'sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;', 'sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;', 'sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;', 'sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;', 'sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;', 'sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;', 'sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;', 'sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;', 'gl_FragColor = sum;', '}' ].join('\n') } }, { three: 217 } ], 102: [ function (e, t, i) { 'use strict' e('three').VerticalBlurShader = { uniforms: { tDiffuse: { type: 't', value: null }, v: { type: 'f', value: 1 / 512 } }, vertexShader: ['varying vec2 vUv;', 'void main() {', 'vUv = uv;', 'gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );', '}'].join('\n'), fragmentShader: [ 'uniform sampler2D tDiffuse;', 'uniform float v;', 'varying vec2 vUv;', 'void main() {', 'vec4 sum = vec4( 0.0 );', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;', 'sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;', 'gl_FragColor = sum;', '}' ].join('\n') } }, { three: 217 } ], 103: [ function (e, t, i) { 'use strict' var z = e('three') !(function () { if (('performance' in window == 0 && (window.performance = {}), 'now' in window.performance == 0)) { var e = Date.now() performance.timing && performance.timing.navigationStart && (e = performance.timing.navigationStart), (window.performance.now = function () { return Date.now() - e }) } })(), (z.WebGLRenderer.prototype.paramThreeToGL = function (e) { var t, i = this.extensions, n = this.context if (e === z.RepeatWrapping) return n.REPEAT if (e === z.ClampToEdgeWrapping) return n.CLAMP_TO_EDGE if (e === z.MirroredRepeatWrapping) return n.MIRRORED_REPEAT if (e === z.NearestFilter) return n.NEAREST if (e === z.NearestMipMapNearestFilter) return n.NEAREST_MIPMAP_NEAREST if (e === z.NearestMipMapLinearFilter) return n.NEAREST_MIPMAP_LINEAR if (e === z.LinearFilter) return n.LINEAR if (e === z.LinearMipMapNearestFilter) return n.LINEAR_MIPMAP_NEAREST if (e === z.LinearMipMapLinearFilter) return n.LINEAR_MIPMAP_LINEAR if (e === z.UnsignedByteType) return n.UNSIGNED_BYTE if (e === z.UnsignedShort4444Type) return n.UNSIGNED_SHORT_4_4_4_4 if (e === z.UnsignedShort5551Type) return n.UNSIGNED_SHORT_5_5_5_1 if (e === z.UnsignedShort565Type) return n.UNSIGNED_SHORT_5_6_5 if (e === z.ByteType) return n.BYTE if (e === z.ShortType) return n.SHORT if (e === z.UnsignedShortType) return n.UNSIGNED_SHORT if (e === z.IntType) return n.INT if (e === z.UnsignedIntType) return n.UNSIGNED_INT if (e === z.FloatType) return n.FLOAT if (null !== (t = i.get('OES_texture_half_float')) && e === z.HalfFloatType) return t.HALF_FLOAT_OES if (e === z.AlphaFormat) return n.ALPHA if (e === z.RGBFormat) return n.RGB if (e === z.RGBAFormat) return n.RGBA if (e === z.LuminanceFormat) return n.LUMINANCE if (e === z.LuminanceAlphaFormat) return n.LUMINANCE_ALPHA if (e === z.AddEquation) return n.FUNC_ADD if (e === z.SubtractEquation) return n.FUNC_SUBTRACT if (e === z.ReverseSubtractEquation) return n.FUNC_REVERSE_SUBTRACT if (e === z.ZeroFactor) return n.ZERO if (e === z.OneFactor) return n.ONE if (e === z.SrcColorFactor) return n.SRC_COLOR if (e === z.OneMinusSrcColorFactor) return n.ONE_MINUS_SRC_COLOR if (e === z.SrcAlphaFactor) return n.SRC_ALPHA if (e === z.OneMinusSrcAlphaFactor) return n.ONE_MINUS_SRC_ALPHA if (e === z.DstAlphaFactor) return n.DST_ALPHA if (e === z.OneMinusDstAlphaFactor) return n.ONE_MINUS_DST_ALPHA if (e === z.DstColorFactor) return n.DST_COLOR if (e === z.OneMinusDstColorFactor) return n.ONE_MINUS_DST_COLOR if (e === z.SrcAlphaSaturateFactor) return n.SRC_ALPHA_SATURATE if (null !== (t = i.get('WEBGL_compressed_texture_s3tc'))) { if (e === z.RGB_S3TC_DXT1_Format) return t.COMPRESSED_RGB_S3TC_DXT1_EXT if (e === z.RGBA_S3TC_DXT1_Format) return t.COMPRESSED_RGBA_S3TC_DXT1_EXT if (e === z.RGBA_S3TC_DXT3_Format) return t.COMPRESSED_RGBA_S3TC_DXT3_EXT if (e === z.RGBA_S3TC_DXT5_Format) return t.COMPRESSED_RGBA_S3TC_DXT5_EXT } if (null !== (t = i.get('WEBGL_compressed_texture_pvrtc'))) { if (e === z.RGB_PVRTC_4BPPV1_Format) return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG if (e === z.RGB_PVRTC_2BPPV1_Format) return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG if (e === z.RGBA_PVRTC_4BPPV1_Format) return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG if (e === z.RGBA_PVRTC_2BPPV1_Format) return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG } if (null !== (t = i.get('WEBGL_compressed_texture_etc1')) && e === z.RGB_ETC1_Format) return t.COMPRESSED_RGB_ETC1_WEBGL if (null !== (t = i.get('EXT_blend_minmax'))) { if (e === z.MinEquation) return t.MIN_EXT if (e === z.MaxEquation) return t.MAX_EXT } return 0 }), (z.WebGLState = function (l, i, c) { var n = this, r = new z.Vector4(), e = l.getParameter(l.MAX_VERTEX_ATTRIBS), o = new Uint8Array(e), a = new Uint8Array(e), s = new Uint8Array(e), t = {}, h = null, u = null, d = null, p = null, f = null, g = null, m = null, v = null, y = !1, A = null, C = null, I = null, E = null, _ = null, b = null, w = null, T = null, x = null, S = null, M = null, R = null, P = null, O = null, L = null, D = l.getParameter(l.MAX_TEXTURE_IMAGE_UNITS), N = void 0, F = {}, B = new z.Vector4(), V = null, k = null, U = new z.Vector4(), H = new z.Vector4() ;(this.init = function () { this.clearColor(0, 0, 0, 1), this.clearDepth(1), this.clearStencil(0), this.enable(l.DEPTH_TEST), l.depthFunc(l.LEQUAL), l.frontFace(l.CCW), l.cullFace(l.BACK), this.enable(l.CULL_FACE), this.enable(l.BLEND), l.blendEquation(l.FUNC_ADD), l.blendFunc(l.SRC_ALPHA, l.ONE_MINUS_SRC_ALPHA) }), (this.initAttributes = function () { for (var e = 0, t = o.length; e < t; e++) o[e] = 0 }), (this.enableAttribute = function (e) { ;(o[e] = 1), 0 === a[e] && (l.enableVertexAttribArray(e), (a[e] = 1)), 0 !== s[e] && (i.get('ANGLE_instanced_arrays').vertexAttribDivisorANGLE(e, 0), (s[e] = 0)) }), (this.enableAttributeAndDivisor = function (e, t, i) { ;(o[e] = 1), 0 === a[e] && (l.enableVertexAttribArray(e), (a[e] = 1)), s[e] !== t && (i.vertexAttribDivisorANGLE(e, t), (s[e] = t)) }), (this.disableUnusedAttributes = function () { for (var e = 0, t = a.length; e < t; e++) a[e] !== o[e] && (l.disableVertexAttribArray(e), (a[e] = 0)) }), (this.enable = function (e) { !0 !== t[e] && (l.enable(e), (t[e] = !0)) }), (this.disable = function (e) { !1 !== t[e] && (l.disable(e), (t[e] = !1)) }), (this.getCompressedTextureFormats = function () { if (null === h && ((h = []), i.get('WEBGL_compressed_texture_pvrtc') || i.get('WEBGL_compressed_texture_s3tc') || i.get('WEBGL_compressed_texture_etc1'))) for (var e = l.getParameter(l.COMPRESSED_TEXTURE_FORMATS), t = 0; t < e.length; t++) h.push(e[t]) return h }), (this.setBlending = function (e, t, i, n, r, o, a, s) { e === z.NoBlending ? this.disable(l.BLEND) : this.enable(l.BLEND), (e === u && s === y) || (e === z.AdditiveBlending ? s ? (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.ONE, l.ONE, l.ONE, l.ONE)) : (l.blendEquation(l.FUNC_ADD), l.blendFunc(l.SRC_ALPHA, l.ONE)) : e === z.SubtractiveBlending ? s ? (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.ZERO, l.ZERO, l.ONE_MINUS_SRC_COLOR, l.ONE_MINUS_SRC_ALPHA)) : (l.blendEquation(l.FUNC_ADD), l.blendFunc(l.ZERO, l.ONE_MINUS_SRC_COLOR)) : e === z.MultiplyBlending ? s ? (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.ZERO, l.ZERO, l.SRC_COLOR, l.SRC_ALPHA)) : (l.blendEquation(l.FUNC_ADD), l.blendFunc(l.ZERO, l.SRC_COLOR)) : s ? (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.ONE, l.ONE_MINUS_SRC_ALPHA, l.ONE, l.ONE_MINUS_SRC_ALPHA)) : (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.SRC_ALPHA, l.ONE_MINUS_SRC_ALPHA, l.ONE, l.ONE_MINUS_SRC_ALPHA)), (u = e), (y = s)), e === z.CustomBlending ? ((r = r || t), (o = o || i), (a = a || n), (t === d && r === g) || (l.blendEquationSeparate(c(t), c(r)), (d = t), (g = r)), (i === p && n === f && o === m && a === v) || (l.blendFuncSeparate(c(i), c(n), c(o), c(a)), (p = i), (f = n), (m = o), (v = a))) : (v = m = g = f = p = d = null) }), (this.setDepthFunc = function (e) { if (A !== e) { if (e) switch (e) { case z.NeverDepth: l.depthFunc(l.NEVER) break case z.AlwaysDepth: l.depthFunc(l.ALWAYS) break case z.LessDepth: l.depthFunc(l.LESS) break case z.LessEqualDepth: l.depthFunc(l.LEQUAL) break case z.EqualDepth: l.depthFunc(l.EQUAL) break case z.GreaterEqualDepth: l.depthFunc(l.GEQUAL) break case z.GreaterDepth: l.depthFunc(l.GREATER) break case z.NotEqualDepth: l.depthFunc(l.NOTEQUAL) break default: l.depthFunc(l.LEQUAL) } else l.depthFunc(l.LEQUAL) A = e } }), (this.setDepthTest = function (e) { e ? this.enable(l.DEPTH_TEST) : this.disable(l.DEPTH_TEST) }), (this.setDepthWrite = function (e) { C !== e && (l.depthMask(e), (C = e)) }), (this.setColorWrite = function (e) { I !== e && (l.colorMask(e, e, e, e), (I = e)) }), (this.setStencilFunc = function (e, t, i) { ;(_ === e && b === t && w === i) || (l.stencilFunc(e, t, i), (_ = e), (b = t), (w = i)) }), (this.setStencilOp = function (e, t, i) { ;(T === e && x === t && S === i) || (l.stencilOp(e, t, i), (T = e), (x = t), (S = i)) }), (this.setStencilTest = function (e) { e ? this.enable(l.STENCIL_TEST) : this.disable(l.STENCIL_TEST) }), (this.setStencilWrite = function (e) { E !== e && (l.stencilMask(e), (E = e)) }), (this.setFlipSided = function (e) { M !== e && (e ? l.frontFace(l.CW) : l.frontFace(l.CCW), (M = e)) }), (this.setLineWidth = function (e) { e !== R && (l.lineWidth(e), (R = e)) }), (this.setPolygonOffset = function (e, t, i) { e ? this.enable(l.POLYGON_OFFSET_FILL) : this.disable(l.POLYGON_OFFSET_FILL), !e || (P === t && O === i) || (l.polygonOffset(t, i), (P = t), (O = i)) }), (this.getScissorTest = function () { return L }), (this.setScissorTest = function (e) { ;(L = e) ? this.enable(l.SCISSOR_TEST) : this.disable(l.SCISSOR_TEST) }), (this.activeTexture = function (e) { void 0 === e && (e = l.TEXTURE0 + D - 1), N !== e && (l.activeTexture(e), (N = e)) }), (this.bindTexture = function (e, t) { void 0 === N && n.activeTexture() var i = F[N] void 0 === i && ((i = { type: void 0, texture: void 0 }), (F[N] = i)), (i.type === e && i.texture === t) || (l.bindTexture(e, t), (i.type = e), (i.texture = t)) }), (this.compressedTexImage2D = function () { try { l.compressedTexImage2D.apply(l, arguments) } catch (e) { console.error(e) } }), (this.texImage2D = function () { try { l.texImage2D.apply(l, arguments) } catch (e) { console.error(e) } }), (this.clearColor = function (e, t, i, n) { r.set(e, t, i, n), !1 === B.equals(r) && (l.clearColor(e, t, i, n), B.copy(r)) }), (this.clearDepth = function (e) { V !== e && (l.clearDepth(e), (V = e)) }), (this.clearStencil = function (e) { k !== e && (l.clearStencil(e), (k = e)) }), (this.scissor = function (e) { !1 === U.equals(e) && (l.scissor(e.x, e.y, e.z, e.w), U.copy(e)) }), (this.viewport = function (e) { !1 === H.equals(e) && (l.viewport(e.x, e.y, e.z, e.w), H.copy(e)) }), (this.reset = function () { for (var e = 0; e < a.length; e++) 1 === a[e] && (l.disableVertexAttribArray(e), (a[e] = 0)) ;(t = {}), (N = void 0), (F = {}), (M = E = C = I = u = h = null) }) }) }, { three: 217 } ], 104: [ function (a, h, e) { ;(function (i, e) { 'use strict' function t(e) { this.urls = e var t = i( 'bWVzc2FnZSBiaW5hcnlfbWVzaCB7CglyZXBlYXRlZCBjaHVua19zaW1wbGUgY2h1bmsgPSAxOwoJcmVwZWF0ZWQgY2h1bmtfcXVhbnRpemVkIHF1YW50aXplZF9jaHVuayA9IDI7Cn0KCi8vIERlZmluaXRpb24gb2YgdmVydGljZXM6IDNEIGNvb3JkaW5hdGVzLCBhbmQgMkQgdGV4dHVyZSBjb29yZGluYXRlcy4KbWVzc2FnZSB2ZXJ0aWNlc19zaW1wbGUgewoJcmVwZWF0ZWQgZmxvYXQgeHl6ID0gMSBbcGFja2VkPXRydWVdOyAgLy8geF8wLHlfMCx6XzAsIHhfMSx5XzEsel8xLCAuLi4KCXJlcGVhdGVkIGZsb2F0IHV2ID0gMiBbcGFja2VkPXRydWVdOyAgLy8gdV8wLHZfMCwgdV8xLHZfMSwgLi4uCn0KCi8vIEluZGV4ZXMgb2YgdmVydGljZXMgb2YgZmFjZXMKbWVzc2FnZSBmYWNlc19zaW1wbGUgewoJcmVwZWF0ZWQgdWludDMyIGZhY2VzID0gMSBbcGFja2VkPXRydWVdOyAvLyBpMDAsaTAxLGkwMiwgaTEwLGkxMSxpMTIsIC4uLgp9CgovLyBBIHNpbXBseSBlbmNvZGVkIGNodW5rLgovLyBUT0RPOiBhZGQgY2h1bmsgcHJvcGVyaXRlcyAoc3VjaCBhcyAicmVmbGVjdGl2ZSIpCm1lc3NhZ2UgY2h1bmtfc2ltcGxlIHsKCW9wdGlvbmFsIHZlcnRpY2VzX3NpbXBsZSB2ZXJ0aWNlcyA9IDE7CglvcHRpb25hbCBmYWNlc19zaW1wbGUgZmFjZXMgPSAyOwoJb3B0aW9uYWwgc3RyaW5nIGNodW5rX25hbWUgPSAzOwoJb3B0aW9uYWwgc3RyaW5nIG1hdGVyaWFsX25hbWUgPSA0Owp9CgovLyBRdWFudGl6ZWQgdmVyc2lvbnMgZm9sbG93OgptZXNzYWdlIHZlcnRpY2VzX3F1YW50aXplZCB7CglvcHRpb25hbCBmbG9hdCBxdWFudGl6YXRpb24gPSAxOwoJcmVwZWF0ZWQgZmxvYXQgdHJhbnNsYXRpb24gPSAyOwoJcmVwZWF0ZWQgc2ludDMyIHggPSAzIFtwYWNrZWQ9dHJ1ZV07CglyZXBlYXRlZCBzaW50MzIgeSA9IDQgW3BhY2tlZD10cnVlXTsKCXJlcGVhdGVkIHNpbnQzMiB6ID0gNSBbcGFja2VkPXRydWVdOwp9CgptZXNzYWdlIHV2X3F1YW50aXplZCB7CglvcHRpb25hbCBzdHJpbmcgbmFtZSA9IDE7CglvcHRpb25hbCBmbG9hdCBxdWFudGl6YXRpb24gPSAyOwoJcmVwZWF0ZWQgc2ludDMyIHUgPSAzIFtwYWNrZWQ9dHJ1ZV07CglyZXBlYXRlZCBzaW50MzIgdiA9IDQgW3BhY2tlZD10cnVlXTsKfQoKLy8gSW5kZXhlcyBvZiB2ZXJ0aWNlcyBvZiBmYWNlcwptZXNzYWdlIGZhY2VzX2NvbXByZXNzZWQgewoJcmVwZWF0ZWQgc2ludDMyIGZhY2VzID0gMSBbcGFja2VkPXRydWVdOyAvLyBpMDAsaTAxLGkwMiwgaTEwLGkxMSxpMTIsIC4uLgp9CgptZXNzYWdlIGNodW5rX3F1YW50aXplZCB7CglvcHRpb25hbCBzdHJpbmcgY2h1bmtfbmFtZSA9IDE7CglvcHRpb25hbCBzdHJpbmcgbWF0ZXJpYWxfbmFtZSA9IDI7CglvcHRpb25hbCB2ZXJ0aWNlc19xdWFudGl6ZWQgdmVydGljZXMgPSAzOwoJcmVwZWF0ZWQgdXZfcXVhbnRpemVkIHV2cyA9IDQ7CglvcHRpb25hbCBmYWNlc19zaW1wbGUgZmFjZXMgPSA1Owp9Cg==', 'base64' ) ;(this.builder = n.loadProto(t)), (this.decoder = this.builder.build('binary_mesh')) } var s = a('three'), n = a('protobufjs'), r = a('../util/logger'), o = (a('../util/common'), a('../util/ajax')), l = a('../objects/Chunk'), c = new r(e) ;(t.prototype = { constructor: t, load: function (t, i, n, r) { return ( c.time('download'), o .get(t, { responseType: 'arraybuffer' }) .done( function (e) { c.timeEnd('download'), this.parse(e, t, i, n, r) }.bind(this) ) .fail(r) ) }, parse: function (e, t, i, n, r) { var o = this.readProtobuf(e) if (!o) return r() try { c.time('convert to webgl'), this.convertProtobufToSceneObject(o, t, i, n, r), c.timeEnd('convert to webgl') } catch (e) { return c.error('failed parsing .dam'), c.error(e.message), r() } }, readProtobuf: function (e) { var t try { c.time('parse proto'), (t = this.decoder.decode(e)), c.timeEnd('parse proto') } catch (e) { return c.error('failed parsing proto for .dam'), c.error(e.message), null } return t }, convertProtobufToSceneObject: function (e, i, t, n, r) { if (0 === e.chunk.length) return c.warn('No chunks in damfile...'), t([]) var o = new s.Matrix4() o.set(1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1) var a = e.chunk.map(function (e) { var t = new s.BufferGeometry() return ( t.addAttribute('position', new s.BufferAttribute(new Float32Array(e.vertices.xyz, 0, 3), 3)), 0 < e.vertices.uv.length && t.addAttribute('uv', new s.BufferAttribute(new Float32Array(e.vertices.uv, 0, 2), 2)), t.setIndex(new s.BufferAttribute(new Uint32Array(e.faces.faces, 0, 1), 1)), t.applyMatrix(o), t.computeBoundingBox(), new l({ geometry: t, textureName: e.material_name, name: e.chunk_name, meshUrl: i }) ) }) return a ? t(a) : (c.error('.dam protobuf came out with no chunks...'), r()) } }), (h.exports = t) }).call(this, a('buffer').Buffer, '/js/loaders/DamLoader.js') }, { '../objects/Chunk': 144, '../util/ajax': 181, '../util/common': 185, '../util/logger': 189, buffer: 198, protobufjs: 214, three: 217 } ], 105: [ function (n, r, e) { ;(function (e) { 'use strict' var t = (n('three'), n('../settings'), n('../util/browser'), n('./DamLoader')), i = n('../util/logger'), u = (n('../ab'), new i(e)) r.exports = { getLoaders: function () { return [ ['_50k', '.dam', t], ['', '.dam', t] ] }, load: function (e, t, i, n, r, o) { var a = this.getLoaders()[(o = o || 0)] if (a) { var s = a[0], l = a[1], c = new a[2](t), h = t.get(e + s + l) h ? (u.debug('Trying ' + s + l), c.load( h, i, n, function () { this.load(e, t, i, n, r, ++o) }.bind(this) )) : (u.debug('Skipping ' + l + ', not available'), this.load(e, t, i, n, r, ++o)) } else r && r('No suitable model file found...') } } }).call(this, '/js/loaders/ModelLoader.js') }, { '../ab': 3, '../settings': 166, '../util/browser': 182, '../util/logger': 189, './DamLoader': 104, three: 217 } ], 106: [ function (i, n, e) { ;(function (e) { 'use strict' var l = i('../util/common'), c = i('../util/texture'), h = i('../util/browser'), t = i('../util/logger'), u = i('../settings'), d = new t(e) n.exports = { load: function (i, n) { if (!i.chunks[0] || !i.chunks[0].meshUrl) return $.when() var r = l.countUnique( i.chunks.map(function (e) { return e.textureName }) ), e = -1 !== i.chunks[0].meshUrl.indexOf('_50k') ? '_50k' : '', t = '_50k' == e ? 'high' : 'low' u.minimalMemoryMode && 'high' === t && (h.detectSamsungS6() ? (d.warn('Galaxy S6 cannot handle large textures, turning down quality.'), (t = 'low')) : r > u.maxMobileTextures && (d.warn('Model probably too large for mobile, turning down quality.'), (t = 'low'))) var o = i.data.job.uuid + e + '_texture_jpg_' + t + '/', a = $.Deferred(), s = 0 return ( i.chunks.forEach(function (e) { if (!e.material.map && e.textureName) { var t = i.urls.get(o + e.textureName) e.setTextureMap( c.load( t, function (e, t) { e || (n.push(t), s++, a.notify(s, r), s === r && a.resolve()) }.bind(this, c.isLoaded(t)) ) ) } }), a.promise() ) } } }).call(this, '/js/loaders/ModelTextureLoader.js') }, { '../settings': 166, '../util/browser': 182, '../util/common': 185, '../util/logger': 189, '../util/texture': 194 } ], 107: [ function (s, l, e) { ;(function (n, e) { 'use strict' function t(e) { ;(this.model = e), (this.modelDataPath = this.model.urls.get('vision.modeldata') + '?m=' + new Date().getTime()), (this.sweepLocationsPath = this.model.urls.get('sweep_locations.csv')) var t = n( 'Ly8gUHJvdG9jb2wgQnVmZmVyIGZvciBwdWNrIHZpc2liaWxpdHkgYW5kIHJlbGF0ZWQgZGF0YQovLwovLyBUbyBkdW1wIG91dCBhIGJpbnJheSBtYW5pZmVzdCBpbiB0ZXh0IGZvcm1hdCwgeW91IGNhbiB1c2UgcHJvdG9jIGRpcmVjdGx5OgovLyAgIHByb3RvYyAtLXByb3RvX3BhdGggfi9kZXYvbXBfdmlzaW9uLyAgLS1kZWNvZGU9ZW9zLnN0b3JhZ2UuVmlzaW9uTW9kZWxkYXRhIH4vZGV2L21wX3Zpc2lvbi9lb3Mvc3RvcmFnZS92aXNpb25fbW9kZWxkYXRhLnByb3RvIDwgdmlzaW9uLm1vZGVsZGF0YQoKLy8gcGFja2FnZSBlb3Muc3RvcmFnZTsKCi8vIGltcG9ydCAiZW9zL2luZnJhL2NvbW1vbi5wcm90byI7Ci8vIFRoZSBmb2xsb3dpbmcgd2VyZSBtYW51YWxseSBleHRyYWN0ZWQgaGVyZSwgSlMgZG9lcyBub3QgbGlrZSBwcm90b2J1ZiBpbXBvcnRzCgptZXNzYWdlIEFmZmluZTNmIHsKCW9wdGlvbmFsIFF1YXRlcm5pb25mIHJvdGF0aW9uID0gMTsKCW9wdGlvbmFsIFZlY3RvcjNmIHRyYW5zbGF0aW9uID0gMjsKfQoKbWVzc2FnZSBRdWF0ZXJuaW9uZiB7CglvcHRpb25hbCBmbG9hdCB3ID0gMTsKCW9wdGlvbmFsIGZsb2F0IHggPSAyOwoJb3B0aW9uYWwgZmxvYXQgeSA9IDM7CglvcHRpb25hbCBmbG9hdCB6ID0gNDsKfQoKbWVzc2FnZSBWZWN0b3IzZiB7CglvcHRpb25hbCBmbG9hdCB4ID0gMTsKCW9wdGlvbmFsIGZsb2F0IHkgPSAyOwoJb3B0aW9uYWwgZmxvYXQgeiA9IDM7Cn0KCi8vCi8vIE9uZSBzd2VlcCAvIHBhbm8KLy8KbWVzc2FnZSBTd2VlcExvY2F0aW9uIHsKCW9wdGlvbmFsIGJ5dGVzIHV1aWQgPSAxOyAgLyogdXVpZCAqLwoJb3B0aW9uYWwgQWZmaW5lM2YgcG9zZSA9IDI7ICAvKiBjYW1lcmEgcG9zZSAoeCwgeSx6KSBpbiBtZXRlciBhbmQgYSBxdWF0ZXJuaW9uKi8KCW9wdGlvbmFsIFZlY3RvcjNmIHB1Y2sgPSAzOyAgLyogcHVjayBsb2NhdGlvbiAtIHggYW55IGlzIGdlbmVyYWxseSB0aGUgc2FtZSBhcyBwb3NlLCB6IGlzIHRoZSBoZWlnaHQgb2YgdGhlIGNsb3Nlc3QgZmxvb3IgdW5kZXIgdGhlIGNhbWVyYSAqLwoJb3B0aW9uYWwgaW50MzIgZ3JvdXAgPSA0OyAgLyogZmxvb3IgaW5kZXggKi8KCW9wdGlvbmFsIGludDMyIHN1Ymdyb3VwID0gNTsgIC8qIHJvb20gaW5kZXggKi8KCXJlcGVhdGVkIGludDMyIHZpc2libGVzID0gNjsgIC8qIGxpc3Qgb2YgaW5kaWNlcyB0byBhbGwgcHVja3MgdmlzaWJsZSBmcm9tIHRoaXMgcHVjayAqLwoJcmVwZWF0ZWQgZmxvYXQgc2NvcmVzID0gNzsgLyogdXNlZCBhcyBwYXJ0IG9mIHNjb3JpbmcgZnVuY3Rpb24gZm9yIGRldGVybWluaW5nIHdoaWNoIHB1Y2sgdG8gZ28gdG8gbmV4dCAqLwogIG9wdGlvbmFsIHN0cmluZyBzd2VlcF9uYW1lID0gODsKCiAgLy8gV2l0aCBvdXRkb29yIHBhbm9zLCB3ZSBoYXZlIGEgY291cGxlIG9mIGRpZmZlcmVudCBzaXR1YXRpb25zIGZvciBhbGlnbm1lbnQuIFRoZSBjb21tb24KICAvLyBjYXNlIGlzIHRoYXQgdGhlIHBhbm8gYWxpZ25lZCBub3JtYWxseS4gSXQgY291bGQgYWxzbyBoYXZlIGJlZW4gcGxhY2VkIG1hbnVhbGx5IGluCiAgLy8gQ2FwdHVyZUFwcCBvciBXb3Jrc2hvcCwgb3IgbGVmdCB1bmFsaWduZWQgZm9yIGhpZ2hsaWdodC1yZWVsIHZpZXdpbmcuCiAgZW51bSBBbGlnbm1lbnRUeXBlCiAgewogICAgICBVTktOT1dOID0gMDsKICAgICAgQUxJR05FRCA9IDE7CiAgICAgIFVOQUxJR05FRCA9IDI7CiAgICAgIE1BTlVBTExZX1BMQUNFRCA9IDM7CiAgfQogIG9wdGlvbmFsIEFsaWdubWVudFR5cGUgYWxpZ25tZW50X3R5cGUgPSA5IFtkZWZhdWx0ID0gQUxJR05FRF07Cn0KCm1lc3NhZ2UgU3ViZ3JvdXBJbmZvIHsKCW9wdGlvbmFsIGludDMyIHN1Ymdyb3VwID0gMTsKCW9wdGlvbmFsIGZsb2F0IGFyZWEgPSAyOyAvKiBmbG9vciBhcmVhIGluIG1eMiAoc3F1YXJlIG1ldGVyYWdlKSAqLwp9CgovKiBBbGwgcHVja3MgaW4gYSBtb2RlbC4gUHVja3MgYXJlIHN0b3JlZCBpbiBzY2FubmluZyBvcmRlci4gKi8KbWVzc2FnZSBWaXNpb25Nb2RlbGRhdGEgewoJcmVwZWF0ZWQgU3dlZXBMb2NhdGlvbiBzd2VlcExvY2F0aW9ucyA9IDE7CglyZXBlYXRlZCBTdWJncm91cEluZm8gc3ViZ3JvdXBJbmZvcyA9IDI7Cn0K', 'base64' ), i = r.loadProto(t) this.decoder = i.build('VisionModeldata') } var r = s('protobufjs'), i = s('../util/ajax'), o = (s('../util/common'), s('../util/math')), a = new (s('../util/logger'))(e) ;(t.prototype.load = function () { return this.modelDataPath ? (a.info('Using vision.modeldata'), this.loadVisionModelData()) : this.sweepLocationsPath ? (a.warn('Using sweep_locations.csv'), this.loadSweepLocationsCSV()) : (a.warn('No sweep file found'), $.when([])) }), (t.prototype.loadVisionModelData = function () { return i .get(this.modelDataPath, { responseType: 'arraybuffer' }) .then( function (e) { var t try { t = this.decoder.decode(e) } catch (e) { return a.warn('Could not decode vision.modeldata, trying sweep_locations.csv'), this.loadSweepLocationsCSV() } var i = t.sweepLocations .map(function (e) { return { uuid: e.uuid.toUTF8().replace(/-/g, ''), position: { x: e.pose.translation.x, y: e.pose.translation.y, z: e.pose.translation.z }, quaternion: { x: e.pose.rotation.x, y: e.pose.rotation.y, z: e.pose.rotation.z, w: e.pose.rotation.w }, puck: { x: e.puck.x, y: e.puck.y, z: e.puck.z }, floor: window.sceneFrom == 'kankan' ? e.subgroup : e.group, neighbours: e.visibles, alignmentType: e.alignment_type } }) .map(function (e) { return (e.position = o.convertVisionVector(e.position)), (e.quaternion = o.convertVisionQuaternion(e.quaternion)), (e.puck = o.convertVisionVector(e.puck)), e }) return ( i.forEach(function (e) { /* if(e.neighbours.find(a=>a==-1)){ console.log('%c neighbours 存在-1 ' +e.uuid ,"color:#f00") } */ e.neighbours = e.neighbours.filter(e => i[e]) e.neighbours = e.neighbours.map(function (e) { return i[e].uuid }) }), i ) }.bind(this), function () { return a.warn('Could not load vision.modeldata, trying sweep_locations.csv'), this.loadSweepLocationsCSV() }.bind(this) ) }), (t.prototype.loadSweepLocationsCSV = function () { return i .get(this.sweepLocationsPath) .then(function (e) { return e .split('\n') .map(function (e) { return e.split(', ') }) .filter(function (e) { return 1 < e.length }) .map(function (e) { return { uuid: e[0], position: { x: parseFloat(e[1]), y: parseFloat(e[2]), z: parseFloat(e[3]) }, quaternion: { x: parseFloat(e[4]), y: parseFloat(e[5]), z: parseFloat(e[6]), w: parseFloat(e[7]) } } }) .map(function (e) { return (e.position = o.convertVisionVector(e.position)), (e.quaternion = o.convertVisionQuaternion(e.quaternion)), e }) }) .fail(function () { a.warn('Could not load sweep_locations.csv, no sweeps loaded.') }) }), (l.exports = t) }).call(this, s('buffer').Buffer, '/js/loaders/SweepDataLoader.js') }, { '../util/ajax': 181, '../util/common': 185, '../util/logger': 189, '../util/math': 190, buffer: 198, protobufjs: 214 } ], 108: [ function (s, l, e) { ;(function (e) { 'use strict' function t() { this.locale = null } var i = s('../settings'), n = s('../util/common'), r = s('../util/logger'), o = s('../enum/Locale'), a = new r(e) ;(t.prototype.init = function () { var e switch (i.languageTag) { case null: case 'en': case o.EN_US: ;(this.locale = o.EN_US), (e = s('./strings-en-US')) break case 'es': case o.ES_MX: ;(this.locale = o.ES_MX), (e = s('./strings-es-MX')) break case 'fr': case o.FR_FR: ;(this.locale = o.FR_FR), (e = s('./strings-fr-FR')) break case 'de': case o.DE_DE: ;(this.locale = o.DE_DE), (e = s('./strings-de-DE')) break case 'ru': case o.RU_RU: ;(this.locale = o.RU_RU), (e = s('./strings-ru-RU')) break case 'cn': case o.CN_CN: ;(this.locale = o.CN_CN), (e = s('./strings-cn-CN')) break case 'jp': case o.JP_JP: ;(this.locale = o.JP_JP), (e = s('./strings-jp-JP')) break default: a.info("Unsupported language tag, defaulting to 'en-US'"), (this.locale = o.EN_US), (e = s('./strings-en-US')) } a.info("Using locale '" + this.locale + "'"), n.extendObject(this, e) }), (t.prototype.localizeGUI = function () { var e = document.querySelector('#gui-parent') this.localizeTree(e), this.localizeLoadingText() }), (t.prototype.localizeLoadingText = function () { document.querySelector('#help-dialog').classList.add(this.locale), document.querySelector('#interaction-modal').classList.add(this.locale), document.querySelector('#gui').classList.add(this.locale) }), (t.prototype.localizeTree = function (e) { var t, i, n = /{\[{ ?(\w+) ?}\]}/ if (e.nodeType === Node.TEXT_NODE) (t = e.data.match(n)) && ((i = t[1]), (e.data = this.localizeText(i) || i)) else if (e.nodeType === Node.ELEMENT_NODE) { var r = e.getAttribute('title') r && (t = r.match(n)) && ((i = t[1]), e.setAttribute('title', this.localizeText(i) || i)) } for (e = e.firstChild; e; ) this.localizeTree(e), (e = e.nextSibling) }), (t.prototype.localizeText = function (e) { var t = this[e] return ( t || this.locale === o.EN_US || (a.warn("Localization key '" + e + "' not available for locale '" + this.locale + "', defaulting to English."), (t = s('./strings-en-US')[e])), t || a.warn("Localization key '" + e + "' not available for locale 'en-US'"), t ) }), (l.exports = new t()) }).call(this, '/js/localization/localize.js') }, { '../enum/Locale': 31, '../settings': 166, '../util/common': 185, '../util/logger': 189, './strings-cn-CN': 109, './strings-de-DE': 110, './strings-en-US': 111, './strings-es-MX': 112, './strings-fr-FR': 113, './strings-jp-JP': 114, './strings-ru-RU': 115 } ], 109: [ function (e, t, i) { 'use strict' t.exports = { PAGE_TITLE: '', LOADING: '正在加载', PRESENTED_BY_CAPS: '呈现者:', POWERED_BY: '技术支持:', POWERED_BY_CAPS: '技术支持:', DESKTOP_SHORT_CTA: '点击一次以探索这个 3D 空间。', MOBILE_SHORT_CTA: '点击一次以探索这个 3D 空间。', PRESENTED_BY: '呈现者:', MORE: '更多 ', LESS: '更少 ', TAG_CONTENT: 'tag™ 内容', SHOW: '显示', HIDE: '隐藏', DOLLHOUSE: '场景屋', FLOOR_PLAN: '楼层平面图', OPEN_HIGHLIGHTS: '打开精彩片段', CLOSE_HIGHLIGHTS: '关闭', PREVIOUS: '上一个', PLAY: '播放', PAUSE: '暂停', NEXT: '下一个', EXPLORE_3D_SPACE: '探索 3D 空间', VIEW_DOLLHOUSE: '观看场景屋', SOCIAL_SHARING: '分享这个空间', VIEW_IN_VR: '以 VR 观看', VIEW_FULLSCREEN: '全屏观看', EXIT_FULLSCREEN: ' 退出全屏', ZOOM_IN: '放大', ZOOM_OUT: '缩小', FLOOR_NAME: '楼层', FLOOR_ALL: 'ALL', FLOOR_Lang: ['Floor', ''], TERMS: '条款', PORT_TERMS: 'port 条款', TERMS_OF_USE: '使用条款', CLOSE_TERMS: '关闭', TERMS_TEXT_FILE: 'terms-cn-CN.html', TERMS_FAIL: '无法获取条款。请确保您有互联网连接以查看使用条款。', WEBVR_FOR_DAYDREAM: '用于 Daydream 视图', WEBVR_ENTER_WEBVR: '进入 VR', WEBVR_DIFFERENT_HEADSET: '有其他耳机吗?', WEBVR_LEARN_MORE: '了解更多', WEBVR_VIEW_SPACE: '在 VR 中观看空间', WEBVR_DAYDREAM_VIEW: 'Daydream 视图', WEBVR_DAYDREAM_PHONE: '支持 Daydream 的手机', WEBVR_FOR_CARDBOARD: '用于 Google Cardboard', WEBVR_VIEW_CARDBOARD: '或在 Google Cardboard 上观看', VR_VIEW_SPACE: '在虚拟现实中观看空间', VR_LEARN_MORE_CAPS: '了解更多', VR_PREVIOUS_CAPS: '上一个’,', VR_NEXT_CAPS: '下一个', VR_GOT_IT_CAPS: '明白了', VR_SHOW_SUPPORTED: '点击以使用 VR 观看空间', VR_SHOW_UNSUPPORTED: '很遗憾,您的设备不符合在 VR 中观看空间的最低要求。', VR_SHOW_IOS_1: '点击以使用 VR 观看空间', VR_SHOW_IOS_2: '需要有 port VR 应用程序和兼容的 iPhone 才能观看', VR_WHAT_YOU_NEED: '关于...您需要什么', VR_NEED_CARDBOARD: '您使用 Google Cardboard 时需要什么', VR_NEED_SAMSUNG: '您使用 Samsung Gear VR 时需要什么', VR_NEED_DAYDREAM: '需要事先与 DAYDREAM VIEW 配对', VR_NEED_DAYDREAM_PHONE: '支持 Daydream 的手机', VR_GOOGLE_CARDBOARD: 'Google Cardboard', VR_GOOGLE_DAYDREAM: 'Google Daydream', VR_APP: 'port VR 应用程序', VR_SAMSUNG_GEAR_VR: 'Samsung Gear VR', VR_COMPATIBLE_IPHONES_1: 'iPhones', VR_COMPATIBLE_IPHONES_2: 'iPhone 5s 和更高版本,运行 iOS 9.1 和更高版本', VR_COMPATIBLE_IPHONES_3: '兼容的 iPhone', VR_COMPATIBLE_ANDROID: '兼容的 Android 设备', VR_COMPATIBLE_ANDROID_LONG: '4.5-5.5 英寸、运行 Android OS 4.4.4 和更高版本的兼容型 Android 设备显示屏', VR_ANDROID_DETAIL: '4.5 至 5.5 英寸、运行 Android OS 4.4.4 和更高版本的显示屏', VR_ANDROID_DVICES: 'Android 设备', VR_COMPATIBLE_SAMSUNG: '兼容的 Samsung 设备', VR_SAMSUNG_DETAIL: 'Galaxy S6 和更高版本', VR_APP_FOR_CARDBOARD: '用于 Google Cardboard 的 port VR 应用程序', VR_APP_FOR_SAMSUNG: '用于 Gear VR 的 port VR 应用程序', VR_APP_FOR_ANDROID: '用于 Android 手机的 port VR 应用程序', VR_APP_OPEN: '请使用 port VR 应用程序打开', VR_DOWNLOAD_HERE: '在此下载', VR_REQUIRE_HEADSET: '需要一副 VR 耳机并安装用于 Android 的 port VR 应用程序', VR_REDIRECT_TO_STORE: '如果未安装应用程序,您将跳转到应用程序商店。', VR_IMPROPER_EMBED: 'port 空间未正确嵌入,无法在您的 Web 浏览器支持 VR。', VR_OPEN_ANDROID_LINK: '在您的手机上打开链接', VR_ANDROID_OPTIONS: '可用的 VR 耳机选项', SHARE_TO: '分享到', SHARE_LINK: '直接链接', SHARE_EXPLORE: '探索', SHARE_AT: '在', SHARE_WITH: '使用', SHARE_3D: '以 3D', SHARE_COPIED: '已复制!', ERROR_BROWSER_SOLUTION: '安装更新的浏览器以探索 3D。', ERROR_BROWSER_EXPLANATION: 'WebGL 需要现代的浏览器。', ERROR_GENERIC_PROBLEM: '糟糕,出现问题。', ERROR_GENERIC_SOLUTION: '重新启动您的浏览器。', ERROR_GENERIC_ACTIONS_1: '如果问题仍然存在,', ERROR_GENERIC_ACTIONS_2: '请安装支持的浏览器', ERROR_GENERIC_ACTIONS_3: ' 或', ERROR_GENERIC_ACTIONS_4: '查看我们的故障排除指南', ERROR_WEBGL_UNSUPPORTED_PROBLEM: '浏览器不受支持。', ERROR_WEBGL_IOS_PROBLEM: 'iOS 版本不受支持。', ERROR_WEBGL_IOS_SOLUTION: '升级到 iOS 8 或更高版本以在 3D 中探索。', ERROR_WEBGL_IOS_ACTIONS_1: '点击 ', ERROR_WEBGL_IOS_ACTIONS_2: '设置 > 通用 > 软件更新', ERROR_WEBGL_SAFARI_PROBLEM: '启用 WebGL 以在 3D 中探索。', ERROR_WEBGL_SAFARI_ACTIONS_1: '单击', ERROR_WEBGL_SAFARI_ACTIONS_2: '菜单栏中的首选项 > 高级 > 显示开发菜单', ERROR_WEBGL_SAFARI_ACTIONS_3: '然后单击', ERROR_WEBGL_SAFARI_ACTIONS_4: '开发 > 启用 WebGL', ERROR_MISSING_URLS_PROBLEM: '糟糕,没有此模型的全景。', ERROR_MISSING_URLS_EXPLANATION: '这是较早的模型。网站所有者可能正在开发一种新模型。', ERROR_LOADING_FAILED_PROBLEM: '糟糕,模式不可用。', ERROR_LOADING_FAILED_ACTIONS_1: '如果问题仍然存在,', ERROR_LOADING_FAILED_ACTIONS_2: '查看我们的故障排除指南', ERROR_MAINTENANCE_PROBLEM: '正在进行维护', ERROR_MAINTENANCE_SOLUTION: '请过几分钟再来。', LINK_TO_LOCATION: '地点链接', MENU_COPY: '复制', LINK_ALERT_COPY: '请使用 CTRL/CMD + C 复制。', ROTATE: '旋转', MOVE: '移动', INSIDE: '内部', ZOOM: '缩放', HELP: '小帮手', HELP_NAVIGATION_TAB: '导航', HELP_MORE_HELP_TAB: '更多帮助', HELP_DESKTOP_PANORAMA_1A: '单击并拖动以环顾空间。', HELP_DESKTOP_PANORAMA_2A: '单击整个空间内的圆环以四处移动。', HELP_DESKTOP_PANORAMA_3A: '使用鼠标滚轮来放大和缩小。', HELP_DESKTOP_PANORAMA_1B: '或者,使用箭头键向左向右转。', HELP_DESKTOP_PANORAMA_2B: '或者,使用箭头键向前移动和向后移动。', HELP_DESKTOP_PANORAMA_3B: '或者,使用加号和减号键来放大和缩小。', HELP_DESKTOP_360_2A: '单击内部视图图标以进入空间。', HELP_DESKTOP_360_2B: '或者,按 1 号键进入内部视图。 ', HELP_DESKTOP_DOLLHOUSE_1A: '左键单击并向左、向右、向上和向下拖动以旋转场景屋。', HELP_DESKTOP_DOLLHOUSE_2A: '右键单击并向左、向右、向上和向下拖动以改变场景屋在屏幕上的位置。', HELP_DESKTOP_DOLLHOUSE_3A: '使用鼠标滚轮来放大和缩小。', HELP_DESKTOP_DOLLHOUSE_1B: '或者,使用箭头键来旋转场景屋。', HELP_DESKTOP_FLOORPLAN_1A: '左键单击并向左、向右、向上和向下拖动以改变楼层平面图在屏幕上的位置。', HELP_DESKTOP_FLOORPLAN_2A: '右键单击并向左或向右拖动以旋转楼层平面图。', HELP_DESKTOP_FLOORPLAN_3A: '使用鼠标滚轮来放大和缩小。', HELP_DESKTOP_FLOORPLAN_2B: '或者,使用箭头键以向左或向右旋转。', HELP_DESKTOP_FLOORPLAN_3B: '或者,使用箭头键来放大和缩小。', HELP_MOBILE_PANORAMA_1: '触摸并拖动以环顾空间。', HELP_MOBILE_PANORAMA_2: '点击整个空间内的圆环以四处移动。', HELP_MOBILE_3: '使用捏合手势来放大和缩小。', HELP_MOBILE_360_2: '点击内部视图图标以进入空间。', HELP_MOBILE_DOLLHOUSE_1: '触摸并向上、向下、向左和向右拖动以旋转场景屋。', HELP_MOBILE_DOLLHOUSE_2: '用两指触摸并拖动以定位场景屋。', HELP_MOBILE_FLOORPLAN_1: '触摸并拖动以定位楼层平面图。', HELP_MOBILE_FLOORPLAN_2: '用两指触摸并拖动以旋转楼层平面图。', HELP_MORE_HLR_A: '精彩片段集锦', HELP_DESKTOP_MORE_HLR_B: '打开以使用缩略图图像在空间中流览。', HELP_MORE_DOLLHOUSE_A: '场景屋', HELP_DESKTOP_MORE_DOLLHOUSE_B: '单击以查看和旋转 3D 内整个空间的俯视图。', HELP_MOBILE_MORE_DOLLHOUSE_B: '点击以查看和旋转 3D 内整个空间的俯视图。', HELP_MORE_FLOORS_A: '楼层选择器', HELP_DESKTOP_MORE_FLOORS_B: '在空间中的楼层之间切换。', HELP_MORE_TAG_A: 'tag™ 贴文', HELP_DESKTOP_MORE_TAG_B: '单击或悬停鼠标以查看空间中的功能信息。', HELP_MOBILE_MORE_TAG_B: '点击以查看空间中的功能信息。', HELP_MORE_ZOOM_A: '缩放控件', HELP_DESKTOP_MORE_ZOOM_B: '使用这些控件来放大和缩小或使用滚轮。', HELP_MORE_TOUR_A: '导览控件', HELP_DESKTOP_MORE_TOUR_B: '通过导览播放、暂停以及向前和向后流览。', HELP_MORE_INSIDE_A: '内部视图', HELP_DESKTOP_MORE_INSIDE_B: '单击以探索空间内部。', HELP_MOBILE_MORE_INSIDE_B: '点击以探索空间内部。', HELP_MORE_VR_A: 'VR 模式', HELP_DESKTOP_MORE_VR_B: '单击以在虚拟现实中启动空间。', HELP_MOBILE_MORE_VR_B: '点击以在虚拟现实中启动空间。', HELP_MORE_360_A: '360° 视图', HELP_DESKTOP_MORE_360_B: '单击精彩片段集锦中的 360 视图中以观看室外场景。', HELP_MOBILE_MORE_360_B: '点击精彩片段集锦中的 360 视图中以观看室外场景。', HELP_MORE_FULLSCREEN_A: '全屏', HELP_DESKTOP_MORE_FULLSCREEN_B: '将 3D Showcase 扩展到全屏。', CLOSE: '关闭' } }, {} ], 110: [ function (e, t, i) { 'use strict' t.exports = { PAGE_TITLE: '', LOADING: 'Lädt', PRESENTED_BY_CAPS: 'PRÄSENTIERT VON', POWERED_BY: 'Angetrieben von', POWERED_BY_CAPS: 'ANGETRIEBEN VON', DESKTOP_SHORT_CTA: 'Sehen sie sich in diesem 3D Raum um.', MOBILE_SHORT_CTA: 'Sehen sie sich in diesem 3D Raum um.', PRESENTED_BY: 'Präsentiert von ', MORE: 'Mehr ', LESS: 'Weniger ', TAG_CONTENT: 'tag™ Inhalt', SHOW: 'Anzeigen', HIDE: 'Verbergen', DOLLHOUSE: 'Puppenhaus', FLOOR_PLAN: 'Grundriss', OPEN_HIGHLIGHTS: 'Highlights anzeigen', CLOSE_HIGHLIGHTS: 'Schließen', PREVIOUS: 'Vorheriges', PLAY: 'Abspielen', PAUSE: 'Pausieren', NEXT: 'Nächstes', EXPLORE_3D_SPACE: 'Innenraum betreten', VIEW_DOLLHOUSE: 'Puppenhaus ansehen', SOCIAL_SHARING: 'Teilen Sie diesen Raum', VIEW_IN_VR: 'In VR ansehen', VIEW_FULLSCREEN: 'Ansicht im Vollbildmodus', EXIT_FULLSCREEN: 'Beenden des Vollbildmodus', ZOOM_IN: 'Vergrößern', ZOOM_OUT: 'Verkleinern', FLOOR_NAME: 'Etage ', FLOOR_ALL: 'Alle', TERMS: 'Bedingungen', PORT_TERMS: 'port Bedingungen', TERMS_OF_USE: 'Nutzungsbedingungen', TERMS_TEXT_FILE: 'terms-de-DE.html', CLOSE_TERMS: 'Schließen', TERMS_FAIL: 'Konnte die Nutzungsbedingungen nicht abrufen. Bitte stellen Sie sicher, dass Sie zum Internet verbunden sind.', HELP: 'Hilfe', HELP_NAVIGATION_TAB: 'Navigation', HELP_MORE_HELP_TAB: 'Hilfe-Details', CLOSE: 'Schließen', HELP_DESKTOP_PANORAMA_1A: 'Klicken und ziehen Sie um sich im Raum umzusehen.', HELP_DESKTOP_PANORAMA_2A: 'Klicken Sie auf die Ringe im Raum um sich zu bewegen.', HELP_DESKTOP_PANORAMA_3A: 'Verwenden Sie das Scrollrad zum Vergrößern und Verkleinern.', HELP_DESKTOP_PANORAMA_1B: 'Oder verwenden Sie die Pfeiltasten um sich nach links und rechts zu bewegen.', HELP_DESKTOP_PANORAMA_2B: 'Oder verwenden Sie die Pfeiltasten um sich vorwärts und rückwärts zubewegen.', HELP_DESKTOP_PANORAMA_3B: 'Oder verwenden Sie die Plus- und Minus-Tasten zum Vergrößern und Verkleinern.', HELP_DESKTOP_360_2A: 'Klicken Sie die Innenansicht ikone, um diesen Raum zu starten .', HELP_DESKTOP_360_2B: 'Oder, drücken Sie die 1-Taste um die Innenraumansicht zu starten.', HELP_DESKTOP_DOLLHOUSE_1A: 'Klicken Sie mit der linken Maustaste und ziehen Sie nach links, rechts, oben und unten um das Puppenhaus zu drehen.', HELP_DESKTOP_DOLLHOUSE_2A: 'Klicken mit der rechten Maustaste und ziehen Sie nach links, rechts, oben und unten um die Position des Puppenhauses zu ändern.', HELP_DESKTOP_DOLLHOUSE_3A: 'Verwenden Sie das Scrollrad zum Vergrößern und Verkleinern.', HELP_DESKTOP_DOLLHOUSE_1B: 'Oder verwenden Sie die Pfeiltasten um das Puppenhaus zu drehen.', HELP_DESKTOP_FLOORPLAN_1A: 'Klicken mit der linken Maustaste und ziehen Sie nach links, rechts, oben und unten um die Position des Grundrisses auf zu ändern.', HELP_DESKTOP_FLOORPLAN_2A: 'Klicken Sie mit der rechten Maustaste und ziehen Sie nach links oder rechts um den Grundriss zu drehen.', HELP_DESKTOP_FLOORPLAN_3A: 'Verwenden Sie das Scrollrad zum Vergrößern und Verkleinern.', HELP_DESKTOP_FLOORPLAN_2B: 'Oder verwenden Sie die Pfeiltasten um das Modell nach links oder rechts zu drehen.', HELP_DESKTOP_FLOORPLAN_3B: 'Oder verwenden Sie die Pfeiltasten zum Vergrößern und Verkleinern.', HELP_MOBILE_PANORAMA_1: 'Berühren und ziehen an dem Raum um sich umzusehen.', HELP_MOBILE_PANORAMA_2: 'Klicken Sie auf die Ringe im Raum, um sich zu bewegen.', HELP_MOBILE_3: 'Benutzen Sie die Zoom-Gäste zum Vergrößern und Verkleinern.', HELP_MOBILE_360_2: 'Tippen Sie die Innenansicht ikone, um diesen Raum zu starten.', HELP_MOBILE_DOLLHOUSE_1: 'Berühren und nach oben, unten, links und rechts ziehen um das Puppenhaus zu drehen.', HELP_MOBILE_DOLLHOUSE_2: 'Berühren und mit zwei Fingern ziehen um das Puppenhaus zu positionieren.', HELP_MOBILE_FLOORPLAN_1: 'Berühren und ziehen, um den Grundriss zu positionieren.', HELP_MOBILE_FLOORPLAN_2: 'Berühren und ziehen mit zwei Fingern, um den Grundriss zu drehen.', HELP_MORE_HLR_A: 'Liste das Highlight', HELP_DESKTOP_MORE_HLR_B: 'Öffnen um durch den Raum mit Vorschau-Bildern zu navigieren.', HELP_MORE_DOLLHOUSE_A: 'Puppenhaus Ansicht', HELP_DESKTOP_MORE_DOLLHOUSE_B: 'Klicken Sie um die von oben nach unten Sicht des gesamten Raumes in 3D anzuzeigen und zu drehen.', HELP_MOBILE_MORE_DOLLHOUSE_B: 'Tippen Sie um die von oben nach unten Sicht des gesamten Raumes in 3D anzuzeigen und zu drehen.', HELP_MORE_FLOORS_A: 'Etage auswählen', HELP_DESKTOP_MORE_FLOORS_B: 'Zwischen den Etagen im Raum wechseln.', HELP_MORE_TAG_A: 'tag™ Posts', HELP_DESKTOP_MORE_TAG_B: 'Klicken Sie auf oder bewegen Sie Ihren Mauszeiger über die Informationen über die Funktionen im Raum.', HELP_MOBILE_MORE_TAG_B: 'Tippen Sie für Informationen über die Funktionen im Raum.', HELP_MORE_ZOOM_A: 'Zoom Steuerung', HELP_DESKTOP_MORE_ZOOM_B: 'Verwenden Sie diese Steuerung oder das Scrollrad zum Vergrößern und Verkleinern.', HELP_MORE_TOUR_A: 'Tour Steuerung', HELP_DESKTOP_MORE_TOUR_B: 'Abspielen, pausieren und vorwärts und rückwärts durch eine geführte Tour navigieren.', HELP_MORE_INSIDE_A: 'Innenansicht', HELP_DESKTOP_MORE_INSIDE_B: 'Klicken Sie hier um sich im Raum umzusehen.', HELP_MOBILE_MORE_INSIDE_B: 'Sehen Sie sich in diesen 3D Raum um.', HELP_MORE_VR_A: 'VR Modus', HELP_DESKTOP_MORE_VR_B: 'Klicken Sie hier, um den Raum in der virtuellen Realität zu starten.', HELP_MOBILE_MORE_VR_B: 'Tippen Sie um den Raum in der virtuellen Realität zu starten.', HELP_MORE_360_A: '360° Views Ansicht ', HELP_DESKTOP_MORE_360_B: 'Klicken Sie die 360° Views Ansicht in das Highlight um Aussen-Szenen zu sehen.', HELP_MOBILE_MORE_360_B: 'Tippen Sie die 360° Views Ansicht in das Highlight um Aussen-Szenen zu sehen.', HELP_MORE_FULLSCREEN_A: 'Vollbild', HELP_DESKTOP_MORE_FULLSCREEN_B: 'Erweitern Sie 3D Showcase im Vollbildmodus.', WEBVR_FOR_CARDBOARD: 'Für Google Cardboard', WEBVR_FOR_DAYDREAM: 'Für Daydream View', WEBVR_ENTER_WEBVR: 'Starten Sie VR', WEBVR_DIFFERENT_HEADSET: 'Haben Sie anderes Headset?', WEBVR_LEARN_MORE: 'Mehr Infos', WEBVR_VIEW_SPACE: 'Ansicht des Raumes in VR', WEBVR_DAYDREAM_VIEW: 'Daydream View', WEBVR_DAYDREAM_PHONE: 'Daydream-fähiges Handy', WEBVR_VIEW_CARDBOARD: 'Oder mit Google Cardboard ansehen', VR_WHAT_YOU_NEED: 'Was Sie dafür brauchen...', VR_NEED_DAYDREAM_PHONE: 'Daydream-fähiges Handy', VR_GOOGLE_DAYDREAM: 'Google Daydream', VR_APP: 'port VR App', VR_APP_OPEN: 'Oder öffnen Sie die port VR App', VR_COMPATIBLE_ANDROID_LONG: 'Kompatibles Android Gerät mit Bildschirmdiagonale von 11,5 bis 14 cm (4,5 - 5,5 Zoll) und Android 4.4.4 und neuer', VR_SAMSUNG_DETAIL: 'Galaxy S6 und neuer', VR_APP_FOR_ANDROID: 'port VR app für Android', VR_NEED_DAYDREAM: "ERFORDERT VOR DER 'PAIRING' MIT DAYDREAM VIEW", VR_VIEW_SPACE: 'Ansicht des Raumes in VR', VR_LEARN_MORE_CAPS: 'MEHR INFOS', VR_PREVIOUS_CAPS: 'ZURÜCK', VR_NEXT_CAPS: 'WEITER', VR_GOT_IT_CAPS: 'VERSTANDEN', VR_SHOW_SUPPORTED: 'Tippen Sie um den Raum in VR zu sehen', VR_SHOW_UNSUPPORTED: 'Schade, aber Ihr Gerät erfüllt nicht die Mindestanforderungen um den Raum in VR zu sehen.', VR_SHOW_IOS_1: 'Tippen Sie um den Raum in VR zu sehen', VR_SHOW_IOS_2: 'port VR App sowie kompatibles iPhone sind von nöten um diesen Raum zu sehen', VR_NEED_CARDBOARD: 'Was Sie dafür brauchen ist Google Cardboard', VR_NEED_SAMSUNG: 'Was Sie dafür brauchen ist Samsung Gear VR', VR_GOOGLE_CARDBOARD: 'Google Cardboard', VR_SAMSUNG_GEAR_VR: 'Samsung Gear VR', VR_COMPATIBLE_IPHONES_1: 'iPhones', VR_COMPATIBLE_IPHONES_2: 'iPhone 5s oder neuer, mit iOS 9.1 und später', VR_COMPATIBLE_IPHONES_3: 'Kompatibles iPhones', VR_COMPATIBLE_ANDROID: 'Kompatibles Android Gerät', VR_ANDROID_DETAIL: 'Bildschirmdiagonale von 11,5 bis 14 cm (4,5 - 5,5 Zoll) und Android 4.4.4 und neuer', VR_ANDROID_DVICES: 'Android Geräte', VR_COMPATIBLE_SAMSUNG: 'Kompatible Samsung Geräte', VR_APP_FOR_CARDBOARD: 'port VR App für Google Cardboard', VR_APP_FOR_SAMSUNG: 'port VR App für Gear VR', VR_DOWNLOAD_HERE: 'Hier runterladen', VR_REQUIRE_HEADSET: 'Benötigt das ein VR-Headset und port VR App für Android installiert wird', VR_REDIRECT_TO_STORE: 'Wenn App nicht installiert ist, werden Sie zum App Store umgeleitet.', VR_IMPROPER_EMBED: 'Der port Raum ist nicht richtig eingebettet um VR in Ihrem Webbrowser zu unterstützen.', VR_OPEN_ANDROID_LINK: 'Öffnen Sie den Link auf Ihrem Handy', VR_ANDROID_OPTIONS: 'VR Headset Optionen', SHARE_TO: 'Teilen auf', SHARE_LINK: 'Direkter Link', SHARE_EXPLORE: 'Umsehen', SHARE_AT: 'auf', SHARE_WITH: 'mit', SHARE_3D: 'in 3D', SHARE_COPIED: 'Kopiert!', ERROR_BROWSER_SOLUTION: 'Installieren Sie einen neueren Browser um sich in 3D umzusehen.', ERROR_BROWSER_EXPLANATION: 'WebGL benötigt einen modernen Browser.', ERROR_GENERIC_PROBLEM: 'Huch, etwas ist schief gelaufen.', ERROR_GENERIC_SOLUTION: 'Starten Sie Ihren Browser neu.', ERROR_GENERIC_ACTIONS_1: 'Wenn das Problem weiterhin besteht, ', ERROR_GENERIC_ACTIONS_2: 'Installieren Sie einen unterstützten Browser', ERROR_GENERIC_ACTIONS_3: ' oder ', ERROR_GENERIC_ACTIONS_4: 'Sehen Sie unseren Leitfaden zur Fehlerbehebung', ERROR_WEBGL_UNSUPPORTED_PROBLEM: 'Browser wird nicht unterstützt.', ERROR_WEBGL_IOS_PROBLEM: 'iOS-Version wird nicht unterstützt.', ERROR_WEBGL_IOS_SOLUTION: 'Aktualisieren Sie auf iOS 8 oder neuer um sich in 3D umzusehen.', ERROR_WEBGL_IOS_ACTIONS_1: 'Tippen ', ERROR_WEBGL_IOS_ACTIONS_2: 'Einstellungen > Allgemein > Softwareaktualisierung', ERROR_WEBGL_SAFARI_PROBLEM: 'Aktivieren Sie WebVR um sich in 3D umzusehen.', ERROR_WEBGL_SAFARI_ACTIONS_1: 'Klicken ', ERROR_WEBGL_SAFARI_ACTIONS_2: 'Präferenzen > Fortgeschrittene > Entwickler-Menü anzeigen', ERROR_WEBGL_SAFARI_ACTIONS_3: 'Klicken Sie dann ', ERROR_WEBGL_SAFARI_ACTIONS_4: 'Entwickler > WebGL Aktivieren', ERROR_MISSING_URLS_PROBLEM: 'Huch, es gibt keine Panoramen für dieses Modell .', ERROR_MISSING_URLS_EXPLANATION: 'Dies ist ein älteres Modell. Der Website-Besitzer hat eventuell ein neues Modell in Arbeit.', ERROR_LOADING_FAILED_PROBLEM: 'Huch, das Modell ist nicht verfügbar.', ERROR_LOADING_FAILED_ACTIONS_1: 'Wenn das Problem weiterhin besteht, ', ERROR_LOADING_FAILED_ACTIONS_2: 'sehen Sie unseren Leitfaden zur Fehlerbehebung', ERROR_MAINTENANCE_PROBLEM: 'Wartung im Gange.', ERROR_MAINTENANCE_SOLUTION: 'Bitte versuchen Sie es in ein paar Minuten nochmal.', LINK_TO_LOCATION: 'Link zu', MENU_COPY: 'Kopieren', LINK_ALERT_COPY: 'Bitte benutzen Sie CTRL/CMD + C zum kopieren.', ROTATE: 'Drehen', INSIDE: 'Drinnen', MOVE: 'Bewegen', ZOOM: 'Vergrößern' } }, {} ], 111: [ function (e, t, i) { 'use strict' t.exports = { PAGE_TITLE: '', LOADING: 'Loading', PRESENTED_BY_CAPS: 'PRESENTED BY', POWERED_BY: 'powered by ', POWERED_BY_CAPS: 'POWERED BY', DESKTOP_SHORT_CTA: 'Click to explore this 3D space.', MOBILE_SHORT_CTA: 'Tap to explore this 3D space.', PRESENTED_BY: 'Presented by ', MORE: 'More ', LESS: 'Less ', TAG_CONTENT: 'tag™ Content', SHOW: 'Show', HIDE: 'Hide', DOLLHOUSE: 'Dollhouse', FLOOR_PLAN: 'Floor plan', OPEN_HIGHLIGHTS: 'Open Highlights', CLOSE_HIGHLIGHTS: 'Close', PREVIOUS: 'Previous', PLAY: 'Play', PAUSE: 'Pause', NEXT: 'Next', EXPLORE_3D_SPACE: 'Explore 3D Space', VIEW_DOLLHOUSE: 'View dollhouse', SOCIAL_SHARING: 'Share this Space', VIEW_IN_VR: 'View in VR', VIEW_FULLSCREEN: '全屏', EXIT_FULLSCREEN: '退出全屏', ZOOM_IN: 'Zoom in', ZOOM_OUT: 'Zoom out', FLOOR_NAME: 'Floor ', FLOOR_ALL: '全部', TERMS: 'Terms', PORT_TERMS: 'port terms', TERMS_OF_USE: 'Terms of Use', TERMS_TEXT_FILE: 'terms-en-US.html', CLOSE_TERMS: 'Close', TERMS_FAIL: 'Could not fetch terms. Please make sure you have an internet connection to view the terms of use.', HELP: 'Help', HELP_NAVIGATION_TAB: 'Navigation', HELP_MORE_HELP_TAB: 'More Help', CLOSE: 'Close', HELP_DESKTOP_PANORAMA_1A: 'Click and Drag to look around the Space.', HELP_DESKTOP_PANORAMA_2A: 'Click on the rings throughout the space to move around.', HELP_DESKTOP_PANORAMA_3A: 'Use the scroll wheel to zoom in and out.', HELP_DESKTOP_PANORAMA_1B: 'Or, use the arrow keys to turn left and right.', HELP_DESKTOP_PANORAMA_2B: 'Or, use the arrow keys to move forward and back.', HELP_DESKTOP_PANORAMA_3B: 'Or, use the plus and minus keys to zoom in and out.', HELP_DESKTOP_360_2A: 'Click the Inside View icon to enter the Space.', HELP_DESKTOP_360_2B: 'Or, press the number 1 key to enter Inside View.', HELP_DESKTOP_DOLLHOUSE_1A: 'Left click and drag left, right, up, and down to rotate the Dollhouse.', HELP_DESKTOP_DOLLHOUSE_2A: 'Right click and drag left, right, up, and down to change the Dollhouse position on screen.', HELP_DESKTOP_DOLLHOUSE_3A: 'Use the scroll wheel to zoom in and out.', HELP_DESKTOP_DOLLHOUSE_1B: 'Or, use the arrow keys to rotate the Dollhouse.', HELP_DESKTOP_FLOORPLAN_1A: 'Left click and drag left, right, up, and down to change the Floorplan position on screen.', HELP_DESKTOP_FLOORPLAN_2A: 'Right click and drag left or right to rotate the Floorplan.', HELP_DESKTOP_FLOORPLAN_3A: 'Use the scroll wheel to zoom in and out.', HELP_DESKTOP_FLOORPLAN_2B: 'Or, use the arrow keys to rotate left or right.', HELP_DESKTOP_FLOORPLAN_3B: 'Or, use the arrow keys to zoom in and out.', HELP_MOBILE_PANORAMA_1: 'Touch and Drag to look around the Space.', HELP_MOBILE_PANORAMA_2: 'Tap on the rings throughout the Space to move around.', HELP_MOBILE_3: 'Use a pinch gesture to zoom in and out.', HELP_MOBILE_360_2: 'Tap the Inside View icon to enter the Space.', HELP_MOBILE_DOLLHOUSE_1: 'Touch and drag up, down, left, and right to rotate the Dollhouse.', HELP_MOBILE_DOLLHOUSE_2: 'Touch and drag with two fingers to position the Dollhouse.', HELP_MOBILE_FLOORPLAN_1: 'Touch and drag to position the Floorplan.', HELP_MOBILE_FLOORPLAN_2: 'Touch and drag with two fingers to rotate the Floorplan.', HELP_MORE_HLR_A: 'Highlight Reel', HELP_DESKTOP_MORE_HLR_B: 'Open to navigate through the Space using thumbnail images.', HELP_MORE_DOLLHOUSE_A: 'Dollhouse View', HELP_DESKTOP_MORE_DOLLHOUSE_B: 'Click to view and rotate a top-down view of the entire Space in 3D.', HELP_MOBILE_MORE_DOLLHOUSE_B: 'Tap to view and rotate a top-down view of the entire Space in 3D.', HELP_MORE_FLOORS_A: 'Floor Selector', HELP_DESKTOP_MORE_FLOORS_B: 'Switch between floors in the Space.', HELP_MORE_TAG_A: 'tag™ Posts', HELP_DESKTOP_MORE_TAG_B: 'Click or hover over for information about features in the Space.', HELP_MOBILE_MORE_TAG_B: 'Tap for information about features in the Space.', HELP_MORE_ZOOM_A: 'Zoom Controls', HELP_DESKTOP_MORE_ZOOM_B: 'Use these controls to zoom in and out or use the scroll wheel.', HELP_MORE_TOUR_A: 'Tour Controls', HELP_DESKTOP_MORE_TOUR_B: 'Play, pause, and navigate forward and backward through a Guided Tour.', HELP_MORE_INSIDE_A: 'Inside View', HELP_DESKTOP_MORE_INSIDE_B: 'Click to explore inside the Space.', HELP_MOBILE_MORE_INSIDE_B: 'Tap to explore inside the Space.', HELP_MORE_VR_A: 'VR Mode', HELP_DESKTOP_MORE_VR_B: 'Click to launch the Space in virtual reality.', HELP_MOBILE_MORE_VR_B: 'Tap to launch the Space in virtual reality.', HELP_MORE_360_A: '360° Views', HELP_DESKTOP_MORE_360_B: 'Click 360 Views in the Highlight Reel to view outdoor scenes.', HELP_MOBILE_MORE_360_B: 'Tap 360 Views in the Highlight Reel to view outdoor scenes.', HELP_MORE_FULLSCREEN_A: 'Full screen', HELP_DESKTOP_MORE_FULLSCREEN_B: 'Expand 3D Showcase to full screen.', WEBVR_FOR_CARDBOARD: 'For Google Cardboard', WEBVR_VIEW_CARDBOARD: 'Or View on Google Cardboard', WEBVR_FOR_DAYDREAM: 'For Daydream View', WEBVR_ENTER_WEBVR: 'ENTER VR', WEBVR_DIFFERENT_HEADSET: 'Have a different headset?', WEBVR_LEARN_MORE: 'Learn more', WEBVR_VIEW_SPACE: 'View Space in VR', WEBVR_DAYDREAM_VIEW: 'Daydream View', WEBVR_DAYDREAM_PHONE: 'Daydream-ready phone', VR_VIEW_SPACE: 'View Space in Virtual Reality', VR_LEARN_MORE_CAPS: 'LEARN MORE', VR_PREVIOUS_CAPS: 'PREVIOUS', VR_NEXT_CAPS: 'NEXT', VR_GOT_IT_CAPS: 'GOT IT', VR_SHOW_SUPPORTED: 'Tap to view the Space in VR with', VR_SHOW_UNSUPPORTED: "Sorry, but your device doesn't meet the minimum requirements to view a space in VR.", VR_SHOW_IOS_1: 'Tap to view the space in VR', VR_SHOW_IOS_2: 'Requires port VR app and compatible iPhone to view', VR_WHAT_YOU_NEED: "What You'll Need For...", VR_NEED_CARDBOARD: "What you'll need with Google Cardboard", VR_NEED_SAMSUNG: "What you'll need with Samsung Gear VR", VR_NEED_DAYDREAM: 'NEEDS PRIOR PAIRING WITH DAYDREAM VIEW', VR_NEED_DAYDREAM_PHONE: 'Daydream-ready phone', VR_GOOGLE_CARDBOARD: 'Google Cardboard', VR_GOOGLE_DAYDREAM: 'Google Daydream', VR_APP: 'port VR App', VR_SAMSUNG_GEAR_VR: 'Samsung Gear VR', VR_COMPATIBLE_IPHONES_1: 'iPhones', VR_COMPATIBLE_IPHONES_2: 'iPhone 5s and newer, running iOS 9.1 and higher', VR_COMPATIBLE_IPHONES_3: 'Compatible iPhones', VR_COMPATIBLE_ANDROID: 'Compatible Android Devices', VR_COMPATIBLE_ANDROID_LONG: 'Compatible Android Devices Displays from 4.5"-5.5" running Android OS 4.4.4 and higher', VR_ANDROID_DETAIL: 'Displays from 4.5"-5.5" running Android OS 4.4.4 and higher', VR_ANDROID_DVICES: 'Android Devices', VR_COMPATIBLE_SAMSUNG: 'Compatible Samsung Devices', VR_SAMSUNG_DETAIL: 'Galaxy S6 and Above', VR_APP_FOR_CARDBOARD: 'port VR app for Google Cardboard', VR_APP_FOR_SAMSUNG: 'port VR app for Gear VR', VR_APP_FOR_ANDROID: 'port VR app for Android Phones', VR_APP_OPEN: 'Open with the port VR app instead', VR_DOWNLOAD_HERE: 'Download here', VR_REQUIRE_HEADSET: 'Requires a VR headset and port VR app for Android to be installed', VR_REDIRECT_TO_STORE: 'If app is not installed, you will be redirected to the app store.', VR_IMPROPER_EMBED: 'The port Space is not embedded properly to support VR in your web browser.', VR_OPEN_ANDROID_LINK: 'Open the Link on Your Mobile Phone', VR_ANDROID_OPTIONS: 'Available VR Headset Options', SHARE_TO: 'Share to', SHARE_LINK: 'Direct Link', SHARE_EXPLORE: 'Explore ', SHARE_AT: 'at', SHARE_WITH: 'with', SHARE_3D: ' in 3D', SHARE_COPIED: 'Copied!', ERROR_BROWSER_SOLUTION: 'Install a new browser to explore in 3D.', ERROR_BROWSER_EXPLANATION: 'WebGL requires a modern browser.', ERROR_GENERIC_PROBLEM: 'Oops, something went wrong.', ERROR_GENERIC_SOLUTION: 'Restart your browser.', ERROR_GENERIC_ACTIONS_1: 'If the problem persists, ', ERROR_GENERIC_ACTIONS_2: 'install a supported browser', ERROR_GENERIC_ACTIONS_3: ' or ', ERROR_GENERIC_ACTIONS_4: 'see our troubleshooting guide', ERROR_WEBGL_UNSUPPORTED_PROBLEM: 'Browser not supported.', ERROR_WEBGL_IOS_PROBLEM: 'iOS version not supported.', ERROR_WEBGL_IOS_SOLUTION: 'Upgrade to iOS 8 or higher to explore in 3D.', ERROR_WEBGL_IOS_ACTIONS_1: 'Tap ', ERROR_WEBGL_IOS_ACTIONS_2: 'Settings > General > Software Update', ERROR_WEBGL_SAFARI_PROBLEM: 'Enable WebGL to explore in 3D.', ERROR_WEBGL_SAFARI_ACTIONS_1: 'Click ', ERROR_WEBGL_SAFARI_ACTIONS_2: 'Preferences > Advanced > Show Develop menu', ERROR_WEBGL_SAFARI_ACTIONS_3: 'Then click ', ERROR_WEBGL_SAFARI_ACTIONS_4: 'Develop > Enable WebGL', ERROR_MISSING_URLS_PROBLEM: 'Oops, there are no panoramas for this model.', ERROR_MISSING_URLS_EXPLANATION: 'This is an older model. The website owner may have a new model on the way.', ERROR_LOADING_FAILED_PROBLEM: '模型不可用.', ERROR_LOADING_FAILED_ACTIONS_1: 'If the problem persists, ', ERROR_LOADING_FAILED_ACTIONS_2: 'see our troubleshooting guide', ERROR_MAINTENANCE_PROBLEM: 'Maintenance in progress.', ERROR_MAINTENANCE_SOLUTION: 'Please come back in a few minutes.', LINK_TO_LOCATION: 'Link to location', MENU_COPY: 'Copy', LINK_ALERT_COPY: 'Please use CTRL/CMD + C to copy.', ROTATE: 'Rotate', INSIDE: 'Inside', MOVE: 'Move', ZOOM: 'Zoom' } }, {} ], 112: [ function (e, t, i) { 'use strict' t.exports = { PAGE_TITLE: '', LOADING: 'Cargando', PRESENTED_BY_CAPS: 'PRESENTADO POR', POWERED_BY: 'potenciando por ', POWERED_BY_CAPS: 'POTENCIADO POR ', DESKTOP_SHORT_CTA: 'Haga clic para explorar este Espacio 3D.', MOBILE_SHORT_CTA: 'Pulse para explorar este Espacio 3D.', PRESENTED_BY: 'Presentado por ', MORE: 'Más ', LESS: 'Menos ', TAG_CONTENT: 'Contenido de tag™', SHOW: 'Mostrar', HIDE: 'Ocultar', DOLLHOUSE: 'Dollhouse', FLOOR_PLAN: 'Planos', OPEN_HIGHLIGHTS: 'Aspectos Destacados', CLOSE_HIGHLIGHTS: 'Cerrar', PREVIOUS: 'Anterior', PLAY: 'Play', PAUSE: 'Pausa', NEXT: 'Siguiente', EXPLORE_3D_SPACE: 'Explorar el Espacio 3D', VIEW_DOLLHOUSE: 'Ver dollhouse', SOCIAL_SHARING: 'Compartir este espacio', VIEW_IN_VR: 'Ver en realidad virtual', VIEW_FULLSCREEN: 'Ver en pantalla completa', EXIT_FULLSCREEN: 'Salir de pantalla completa', ZOOM_IN: 'Acercar', ZOOM_OUT: 'Alejar', FLOOR_NAME: 'Piso ', FLOOR_ALL: 'Todas', TERMS: 'Condiciones', PORT_TERMS: 'port términos de uso', TERMS_OF_USE: 'Términos de uso', TERMS_TEXT_FILE: 'terms-es-MX.html', CLOSE_TERMS: 'Cerrar', TERMS_FAIL: 'No se han podido obtener las condiciones. Asegúrese de tener una conexión a Internet para ver los términos de uso.', HELP: 'Ayuda', HELP_NAVIGATION_TAB: 'Navegación', HELP_MORE_HELP_TAB: 'Más Ayuda', CLOSE: 'Cerrar', HELP_DESKTOP_PANORAMA_1A: 'Haga clic y arrastre para mirar alrededor del espacio.', HELP_DESKTOP_PANORAMA_2A: 'Haga clic en los aros a lo largo del espacio para moverse.', HELP_DESKTOP_PANORAMA_3A: 'Use la rueda de desplazamiento para acercar o alejar.', HELP_DESKTOP_PANORAMA_1B: 'O use las teclas de flecha para girar a la izquierda y a la derecha.', HELP_DESKTOP_PANORAMA_2B: 'O use las teclas de dirección para adelantar o retroceder.', HELP_DESKTOP_PANORAMA_3B: 'O use la tecla más para acercar y la tecla menos para alejar.', HELP_DESKTOP_360_2A: 'Haga clic en el icono Vista Interior para ingresar al Espacio.', HELP_DESKTOP_360_2B: 'O bien, presione la tecla numero 1 para entrar en la Vista Interior.', HELP_DESKTOP_DOLLHOUSE_1A: 'Haga clic izquierdo y arrastre hacia la izquierda, derecha, arriba o abajo para girar la Dollhouse.', HELP_DESKTOP_DOLLHOUSE_2A: 'Haga clic derecho y arrastre hacia la izquierda, derecha, arriba o abajo para cambiar la posición della dollhouse.', HELP_DESKTOP_DOLLHOUSE_3A: 'Use la rueda de desplazamiento para acercar o alejar.', HELP_DESKTOP_DOLLHOUSE_1B: 'O use las teclas de dirección para girar la Dollhouse.', HELP_DESKTOP_FLOORPLAN_1A: 'Haga clic con izquierdo y arrastre hacia la izquierda, derecha, arriba o abajo para cambiar la posición de la planta.', HELP_DESKTOP_FLOORPLAN_2A: 'Haga clic derecho y arrastre hacia la izquierda o derecha para girar la planta.', HELP_DESKTOP_FLOORPLAN_3A: 'Use la rueda de desplazamiento para acercar o alejar.', HELP_DESKTOP_FLOORPLAN_2B: 'O use las teclas para girar hacia la izquierda o derecha.', HELP_DESKTOP_FLOORPLAN_3B: 'O use las teclas de dirección para acercar o alejar.', HELP_MOBILE_PANORAMA_1: 'Toque y arrastre para mirar alrededor del espacio.', HELP_MOBILE_PANORAMA_2: 'Toque en los aros a lo largo del espacio para moverse.', HELP_MOBILE_3: 'Use el gesto de pellizcar para acercar o alejar.', HELP_MOBILE_360_2: 'Toque el ícono Vista Interior para entrar en el Espacio.', HELP_MOBILE_DOLLHOUSE_1: 'Toque y arrastre con dos dedos para cambiar la posición della dollhouse.', HELP_MOBILE_DOLLHOUSE_2: 'Toque y arrastre con dos dedos para cambiar la posición de la vista aérea.', HELP_MOBILE_FLOORPLAN_1: 'Toque y arrastre para cambiar la posición de la planta.', HELP_MOBILE_FLOORPLAN_2: 'Toque y arrastre con dos dedos para girar la planta.', HELP_MORE_HLR_A: 'Galería destacada', HELP_DESKTOP_MORE_HLR_B: 'Abra para navegar a través del espacio utilizando imágenes en miniatura.', HELP_MORE_DOLLHOUSE_A: 'Vista aérea por pisos', HELP_DESKTOP_MORE_DOLLHOUSE_B: 'Haga clic para ver y girar la Dollhouse del espacio completo en 3D.', HELP_MOBILE_MORE_DOLLHOUSE_B: 'Toque para ver y girar la vista Dollhouse del espacio completo en 3D.', HELP_MORE_FLOORS_A: 'Seleccionador de plantas', HELP_DESKTOP_MORE_FLOORS_B: 'Cambie de una planta a otra en el espacio.', HELP_MORE_TAG_A: 'tag™ Posts', HELP_DESKTOP_MORE_TAG_B: 'Haga clic o coloque el cursor para obtener más información acerca de las características del espacio.', HELP_MOBILE_MORE_TAG_B: 'Toque para obtener más información acerca de las características del espacio.', HELP_MORE_ZOOM_A: 'Controles de zoom', HELP_DESKTOP_MORE_ZOOM_B: 'Use estos controles o la rueda de desplazamiento para acercar o alejar.', HELP_MORE_TOUR_A: 'Controles de recorrido', HELP_DESKTOP_MORE_TOUR_B: 'Reproduzca, pause, adelante o retroceda a través de un recorrido guiado.', HELP_MORE_INSIDE_A: 'Vista interior', HELP_DESKTOP_MORE_INSIDE_B: 'Haga clic para explorar el interior del espacio.', HELP_MOBILE_MORE_INSIDE_B: 'Toque para explorar el interior del espacio.', HELP_MORE_VR_A: 'Modo de realidad virtual', HELP_DESKTOP_MORE_VR_B: 'Toque para ver el espacio en realidad virtual.', HELP_MOBILE_MORE_VR_B: 'Toque para ver el espacio en realidad virtual.', HELP_MORE_360_A: '360° Views', HELP_DESKTOP_MORE_360_B: 'Una vez que se encuentre en galería destacada, haga clic en vistas de 360º para ver el exterior.', HELP_MOBILE_MORE_360_B: 'Una vez que se encuentre en galería destacada, toque en vistas de 360º para ver el exterior.', HELP_MORE_FULLSCREEN_A: 'Pantalla completa', HELP_DESKTOP_MORE_FULLSCREEN_B: 'Expanda el escenario 3D para verlo en pantalla completa.', WEBVR_FOR_CARDBOARD: 'Para Google Cardboard', WEBVR_FOR_DAYDREAM: 'Para Daydream View', WEBVR_ENTER_WEBVR: 'ENTRAR VR', WEBVR_DIFFERENT_HEADSET: '¿Tiene un auricular diferente?', WEBVR_LEARN_MORE: 'Más información', WEBVR_VIEW_SPACE: 'Ver Espacio en VR', WEBVR_DAYDREAM_VIEW: 'Daydream View', WEBVR_DAYDREAM_PHONE: 'Daydream Teléfono listos', WEBVR_VIEW_CARDBOARD: 'O Ver en Google Cardboard', VR_NEED_DAYDREAM: 'Necesidades antes de acoplarse con Daydream View', VR_NEED_DAYDREAM_PHONE: 'Teléfono listo para Daydream', VR_GOOGLE_DAYDREAM: 'Daydream de Google', VR_APP: 'port VR App', VR_COMPATIBLE_ANDROID_LONG: 'Compatible con los Dispositivos Android con Pantallas de 4.5"-5.5" operando Android OS 4.4.4 y posteriores', VR_APP_FOR_ANDROID: 'Aplicación port VR para Teléfonos Android', VR_APP_OPEN: 'Abrir con la aplicación port VR en su lugar', VR_VIEW_SPACE: 'Ver Espacio en realidad virtual', VR_LEARN_MORE_CAPS: 'SABER MÁS', VR_PREVIOUS_CAPS: 'ANTERIOR', VR_NEXT_CAPS: 'SIGUIENTE', VR_GOT_IT_CAPS: 'COMPRENDIDO', VR_SHOW_SUPPORTED: 'Pulse para ver el Espacio en realidad virtual con', VR_SHOW_UNSUPPORTED: 'Lo sentimos, pero su dispositivo no cumple los requisitos mínimos para ver un Espacio en realidad virtual.', VR_SHOW_IOS_1: 'Pulse para ver el Espacio en realidad virtual', VR_SHOW_IOS_2: 'Necesita la aplicación port VR y un iPhone compatible para ver', VR_WHAT_YOU_NEED: 'Lo que necesitaras...', VR_NEED_CARDBOARD: 'Lo que necesitaras con Google Cardboard', VR_NEED_SAMSUNG: 'Lo que necesitaras con el Samsung Gear VR', VR_GOOGLE_CARDBOARD: 'Google Cardboard', VR_SAMSUNG_GEAR_VR: 'Samsung Gear VR', VR_COMPATIBLE_IPHONES_1: 'iPhones', VR_COMPATIBLE_IPHONES_2: 'Compatible con iPhone 6S o superior y con iOS 9.1 en adelante', VR_COMPATIBLE_IPHONES_3: 'iPhones compatibles', VR_COMPATIBLE_ANDROID: 'Dispositivos Android compatibles', VR_ANDROID_DETAIL: 'Pantallas de 11.43 cm a 13.97 cm con OS de Android 4.4.4 en adelante', VR_ANDROID_DVICES: 'Dispositivos Android', VR_COMPATIBLE_SAMSUNG: 'Dispositivos compatibles del Samsung', VR_SAMSUNG_DETAIL: 'Galaxy S5 en adelante', VR_APP_FOR_CARDBOARD: 'Aplicación port VR para Google Cardboard', VR_APP_FOR_SAMSUNG: 'Aplicación port VR para Gear VR', VR_DOWNLOAD_HERE: 'Descargar aquí', VR_REQUIRE_HEADSET: 'Necesita un casco de realidad virtual y que se instale la aplicación port VR para Android', VR_REDIRECT_TO_STORE: 'Si la aplicación no está instalada, se le redirigirá a la tienda de aplicaciones.', VR_IMPROPER_EMBED: 'El espacio de port no está incorporado correctamente para apoyar VR en su navegador web.', VR_OPEN_ANDROID_LINK: 'Abre el enlace en tu teléfono móvil', VR_ANDROID_OPTIONS: 'Opciones de auriculares en RV disponibles', SHARE_TO: 'Compartir en', SHARE_LINK: 'Enlace directo', SHARE_EXPLORE: 'Explorar ', SHARE_AT: 'en', SHARE_WITH: 'con', SHARE_3D: ' en 3D', SHARE_COPIED: '¡Copiado!', ERROR_BROWSER_SOLUTION: 'Instale un nuevo navegador para explorar en 3D.', ERROR_BROWSER_EXPLANATION: 'WebGL requiere un navegador moderno.', ERROR_GENERIC_PROBLEM: 'Vaya, algo ha ido mal.', ERROR_GENERIC_SOLUTION: 'Reinicie su navegador.', ERROR_GENERIC_ACTIONS_1: 'Si el problema persiste, ', ERROR_GENERIC_ACTIONS_2: 'instale un navegador compatible', ERROR_GENERIC_ACTIONS_3: ' o ', ERROR_GENERIC_ACTIONS_4: 'consulte nuestra guía de solución de problemas', ERROR_WEBGL_UNSUPPORTED_PROBLEM: 'Navegador no compatible.', ERROR_WEBGL_IOS_PROBLEM: 'Versión de iOS no compatible.', ERROR_WEBGL_IOS_SOLUTION: 'Actualice a iOS 8 o superior para explorar en 3D.', ERROR_WEBGL_IOS_ACTIONS_1: 'Pulse ', ERROR_WEBGL_IOS_ACTIONS_2: 'Ajustes > General > Actualización de software', ERROR_WEBGL_SAFARI_PROBLEM: 'Habilite WebGL para explorar en 3D.', ERROR_WEBGL_SAFARI_ACTIONS_1: 'Haga clic en ', ERROR_WEBGL_SAFARI_ACTIONS_2: 'Preferencias > Avanzado > Mostrar el menú Desarrollar', ERROR_WEBGL_SAFARI_ACTIONS_3: 'Después, haga clic en ', ERROR_WEBGL_SAFARI_ACTIONS_4: 'Desarrollar > Habilitar WebGL', ERROR_MISSING_URLS_PROBLEM: 'Vaya, no hay panoramas para este modelo.', ERROR_MISSING_URLS_EXPLANATION: 'Este es un modelo antiguo. El propietario del sitio web puede tener un nuevo modelo en mente.', ERROR_LOADING_FAILED_PROBLEM: 'Vaya, modelo no disponible.', ERROR_LOADING_FAILED_ACTIONS_1: 'Si el problema persiste, ', ERROR_LOADING_FAILED_ACTIONS_2: 'consulte nuestra guía de solución de problemas', ERROR_MAINTENANCE_PROBLEM: 'Mantenimiento en progreso.', ERROR_MAINTENANCE_SOLUTION: 'Regrese en unos minutos.', LINK_TO_LOCATION: 'Enlace a la ubicación', MENU_COPY: 'Copiar', LINK_ALERT_COPY: 'Utilice CTRL/CMD + C para copiar.', ROTATE: 'Girar', INSIDE: 'Interior', MOVE: 'Moverse', ZOOM: 'Acercar o alejar' } }, {} ], 113: [ function (e, t, i) { 'use strict' t.exports = { PAGE_TITLE: '', LOADING: 'Chargement', PRESENTED_BY_CAPS: 'PRÉSENTÉ PAR', POWERED_BY: 'alimenté par ', POWERED_BY_CAPS: 'ALIMENTÉ PAR', DESKTOP_SHORT_CTA: "Cliquez pour explorer l'Espace 3D.", MOBILE_SHORT_CTA: "Cliquez pour explorer l'Espace 3D.", PRESENTED_BY: 'Présenté par ', MORE: 'Plus ', LESS: 'Moins ', TAG_CONTENT: 'Contenu tag™', SHOW: 'Montrer', HIDE: 'Cacher', DOLLHOUSE: 'Dollhouse', FLOOR_PLAN: 'Plan de sol', OPEN_HIGHLIGHTS: 'Ouvrir les faits saillants', CLOSE_HIGHLIGHTS: 'Fermer', PREVIOUS: 'Précédent', PLAY: 'Lecture', PAUSE: 'Pause', NEXT: 'Suivant', EXPLORE_3D_SPACE: "Explorer l'Espace en 3D", VIEW_DOLLHOUSE: 'Voir dollhouse', SOCIAL_SHARING: 'Partager cet espace', VIEW_IN_VR: 'Voir en VR', VIEW_FULLSCREEN: 'Plein écran', EXIT_FULLSCREEN: 'Fermer plein écran', ZOOM_IN: 'Zoom avant', ZOOM_OUT: 'Zoom arrière', FLOOR_NAME: 'Étage ', FLOOR_ALL: 'Tous', TERMS: 'Mentions légales', PORT_TERMS: 'port mentions légales', TERMS_OF_USE: "Conditions d'utilisation", TERMS_TEXT_FILE: 'terms-fr-FR.html', CLOSE_TERMS: 'Fermer', TERMS_FAIL: "Impossible d'accéder aux mentions légales. Vérifiez que vous avez une connexion Internet pour afficher les conditions d'utilisation.", HELP: 'Aide', HELP_NAVIGATION_TAB: 'Navigation', HELP_MORE_HELP_TAB: 'Aide', CLOSE: 'Fermer', HELP_DESKTOP_PANORAMA_1A: 'Cliquez et faites glisser pour regarder autour de l’espace.', HELP_DESKTOP_PANORAMA_2A: 'Cliquez sur les anneaux pour vous déplacer.', HELP_DESKTOP_PANORAMA_3A: 'Utilisez la molette de votre souris pour zoomer.', HELP_DESKTOP_PANORAMA_1B: 'Ou utilisez les touches pour tourner.', HELP_DESKTOP_PANORAMA_2B: 'Ou utilisez les touches pour avancer et reculer.', HELP_DESKTOP_PANORAMA_3B: 'Ou utilisez les touches plus et moins pour zoomer.', HELP_DESKTOP_360_2A: 'Cliquez sur l’icône Vue Intérieure pour entrer dans l’Espace.', HELP_DESKTOP_360_2B: 'Ou, appuyez sur la touche numéro 1 pour entrer dans la Vue Intérieure.', HELP_DESKTOP_DOLLHOUSE_1A: 'Faites un clic gauche et bougez votre souris pour faire pivoter la vue Dollhouse.', HELP_DESKTOP_DOLLHOUSE_2A: 'Faites un clic droit et bougez votre souris pour changer la position de la vue Dollhouse.', HELP_DESKTOP_DOLLHOUSE_3A: 'Utilisez la molette de votre souris pour zoomer.', HELP_DESKTOP_DOLLHOUSE_1B: 'Ou utilisez les touches pour faire pivoter la vue Dollhouse.', HELP_DESKTOP_FLOORPLAN_1A: 'Faites un clic droit pour changer la position du plan sur l’écran.', HELP_DESKTOP_FLOORPLAN_2A: 'Faites un clic droit et faites glisser à gauche ou à droite pour faire pivoter le plan.', HELP_DESKTOP_FLOORPLAN_3A: 'Utilisez la molette de votre souris pour zoomer.', HELP_DESKTOP_FLOORPLAN_2B: 'Ou utilisez les touches pour faire pivoter à gauche ou à droite.', HELP_DESKTOP_FLOORPLAN_3B: 'Ou utilisez les touches pour effectuer un zoom avant ou arrière.', HELP_MOBILE_PANORAMA_1: 'Touchez et faites glisser pour regarder autour de l’espace.', HELP_MOBILE_PANORAMA_2: 'Tapez sur les anneaux dans tout l’espace pour vous déplacer.', HELP_MOBILE_3: 'Utilisez un geste de pincement pour zoomer avant/arrière.', HELP_MOBILE_360_2: 'Tapez sur l’icône Vue Intérieure pour entrer dans l’Espace.', HELP_MOBILE_DOLLHOUSE_1: 'Touchez et faites glisser vers le haut/bas/gauche/droite pour faire pivoter la vue Dollhouse.', HELP_MOBILE_DOLLHOUSE_2: 'Touchez et faites glisser avec deux doigts pour positionner vue en coupe.', HELP_MOBILE_FLOORPLAN_1: 'Touchez et faites glisser pour positionner le plan.', HELP_MOBILE_FLOORPLAN_2: 'Touchez et faites glisser avec deux doigts pour faire pivoter le plan.', HELP_MORE_HLR_A: 'Carrousel', HELP_DESKTOP_MORE_HLR_B: 'Ouvrez pour naviguer dans l’espace en utilisant les vignettes.', HELP_MORE_DOLLHOUSE_A: 'Vue en coupe', HELP_DESKTOP_MORE_DOLLHOUSE_B: 'Cliquez pour afficher et faire pivoter l’espace entier en 3D.', HELP_MOBILE_MORE_DOLLHOUSE_B: 'Tapez pour afficher et faire pivoter l’espace entier en 3D.', HELP_MORE_FLOORS_A: 'Sélecteur d’étage', HELP_DESKTOP_MORE_FLOORS_B: 'Basculer entre les étages dans l’espace.', HELP_MORE_TAG_A: 'tag™ Posts', HELP_DESKTOP_MORE_TAG_B: 'Cliquez ou survolez pour obtenir des informations sur l’espace.', HELP_MOBILE_MORE_TAG_B: 'Tapez pour obtenir des informations sur l’espace.', HELP_MORE_ZOOM_A: 'Commandes de zoom', HELP_DESKTOP_MORE_ZOOM_B: 'Utilisez votre clavier ou la molette de votre souris pour zoomer.', HELP_MORE_TOUR_A: 'Commandes de la visite', HELP_DESKTOP_MORE_TOUR_B: "Mettez en marche ou en pause, avancez et reculez lors d'une visite guidée.", HELP_MORE_INSIDE_A: 'Vue intérieure', HELP_DESKTOP_MORE_INSIDE_B: 'Cliquez pour explorer l’intérieur de l’espace.', HELP_MOBILE_MORE_INSIDE_B: 'Tapez pour explorer l’intérieur de l’espace.', HELP_MORE_VR_A: 'Mode RV', HELP_DESKTOP_MORE_VR_B: 'Cliquez pour lancer l’espace en réalité virtuelle.', HELP_MOBILE_MORE_VR_B: 'Tapez pour lancer l’espace en réalité virtuelle.', HELP_MORE_360_A: 'Vues 360°', HELP_DESKTOP_MORE_360_B: 'Cliquez sur vues 360°, dans le carrousel pour voir les scènes extérieures.', HELP_MOBILE_MORE_360_B: 'Tapez sur vues 360°, dans le carrousel pour voir les scènes extérieures.', HELP_MORE_FULLSCREEN_A: 'Plein écran', HELP_DESKTOP_MORE_FULLSCREEN_B: 'Voir 3D Showcase en plein écran.', WEBVR_FOR_CARDBOARD: 'Pour Google Cardboard', WEBVR_FOR_DAYDREAM: 'Pour Daydream View', WEBVR_ENTER_WEBVR: 'ENTRER VR', WEBVR_DIFFERENT_HEADSET: 'Avez-vous un casque différent?', WEBVR_LEARN_MORE: 'En savoir plus', WEBVR_VIEW_SPACE: 'Voir Espace en VR', WEBVR_DAYDREAM_VIEW: 'Daydream View', WEBVR_DAYDREAM_PHONE: 'Téléphone compatibles Daydream', WEBVR_VIEW_CARDBOARD: 'Ou Afficher sur Google Cardboard', VR_VIEW_SPACE: "Voir l'Espace en Réalité Virtuelle", VR_LEARN_MORE_CAPS: 'EN SAVOIR PLUS', VR_PREVIOUS_CAPS: 'PRÉCÉDENT', VR_NEXT_CAPS: 'SUIVANT', VR_GOT_IT_CAPS: 'BIEN COMPRIS', VR_SHOW_SUPPORTED: "Taper pour voir l'Espace en VR avec", VR_SHOW_UNSUPPORTED: 'Désolé mais votre appareil ne répond pas aux critères minimaux pour voir cet Espace en mode VR.', VR_SHOW_IOS_1: 'Taper pour voir l’Espace en Realité Virtuelle', VR_SHOW_IOS_2: 'Nécessite l’application port VR et un iPhone compatible pour voir', VR_WHAT_YOU_NEED: 'Ce dont vous aurez besoin pour...', VR_NEED_CARDBOARD: 'Ce dont vous aurez besoin avec Google Cardboard', VR_NEED_SAMSUNG: 'Ce dont vous aurez besoin avec Samsung Gear VR', VR_NEED_DAYDREAM: 'BESOINS AVANT APPARIEMENT AVEC DAYDREAM VIEW', VR_NEED_DAYDREAM_PHONE: 'Téléphone compatible avec Daydream', VR_GOOGLE_CARDBOARD: 'Google Cardboard', VR_GOOGLE_DAYDREAM: 'Google Daydream', VR_APP: 'port VR App', VR_SAMSUNG_GEAR_VR: 'Samsung Gear VR', VR_COMPATIBLE_IPHONES_1: 'iPhones', VR_COMPATIBLE_IPHONES_2: 'iPhone 5s et plus récent, avec iOS 9.1 et plus récent', VR_COMPATIBLE_IPHONES_3: 'iPhones compatibles', VR_COMPATIBLE_ANDROID: 'Appareils Android compatibles', VR_COMPATIBLE_ANDROID_LONG: 'Compatible avec les écrans des appareils Android de 11,5 à 14 cm (4,5 à 5,5 po) fonctionnant sous Android OS 4.4.4 et plus', VR_ANDROID_DETAIL: 'Écrans 4.5" à 5.5" avec Android 4.4.4 ou plus récent', VR_ANDROID_DVICES: 'Appareils Android', VR_COMPATIBLE_SAMSUNG: 'Appareils Samsung Compatibles', VR_SAMSUNG_DETAIL: 'Galaxy S6 et plus récents', VR_APP_FOR_CARDBOARD: 'Application port VR pour Google Cardboard', VR_APP_FOR_SAMSUNG: 'Application port VR pour Gear VR', VR_APP_FOR_ANDROID: 'Application port VR pour téléphones Android', VR_APP_OPEN: 'Ouvrir plutôt avec l’application port VR', VR_DOWNLOAD_HERE: 'Télécharger ici', VR_REQUIRE_HEADSET: "Nécessite un casque VR et l'application port VR pour Android afin d'être installé", VR_REDIRECT_TO_STORE: "Si l'application n'est pas installée, vous serez rediriger vers l'App store.", VR_IMPROPER_EMBED: "L'Espace port n'est pas correctement intégré pour supporter VR dans votre navigateur Web.", VR_OPEN_ANDROID_LINK: 'Ouvrez ce lien avec votre appareil mobile', VR_ANDROID_OPTIONS: 'Options disponibles pour casque VR sous', SHARE_TO: 'Partager sur', SHARE_LINK: 'Lien direct', SHARE_EXPLORE: 'Explorer ', SHARE_AT: 'à', SHARE_WITH: 'avec', SHARE_3D: ' en 3D', SHARE_COPIED: 'Copié!', ERROR_BROWSER_SOLUTION: 'Installer un nouveau navigateur pour explorer en 3D.', ERROR_BROWSER_EXPLANATION: "WebGL a besoin d'un navigateur récent.", ERROR_GENERIC_PROBLEM: 'Il y eu un problème.', ERROR_GENERIC_SOLUTION: 'Redémarrer votre navigateur.', ERROR_GENERIC_ACTIONS_1: 'Si le problème persiste, ', ERROR_GENERIC_ACTIONS_2: 'installez un navigateur plus récent', ERROR_GENERIC_ACTIONS_3: ' ou ', ERROR_GENERIC_ACTIONS_4: 'voir notre guide de dépannage', ERROR_WEBGL_UNSUPPORTED_PROBLEM: 'Navigateur non-supporté.', ERROR_WEBGL_IOS_PROBLEM: 'Version iOS non-supportée.', ERROR_WEBGL_IOS_SOLUTION: "Mettre à jour avec iOS8 au minimum pour voir l'Espace en 3D.", ERROR_WEBGL_IOS_ACTIONS_1: 'Tapez ', ERROR_WEBGL_IOS_ACTIONS_2: 'Paramètres > Général > Mise à jour Software', ERROR_WEBGL_SAFARI_PROBLEM: 'Activez WegGL pour explorer en 3D.', ERROR_WEBGL_SAFARI_ACTIONS_1: 'Cliquez ', ERROR_WEBGL_SAFARI_ACTIONS_2: 'Préferences > Avancés > Voir menu développeur', ERROR_WEBGL_SAFARI_ACTIONS_3: 'Puis cliquez ', ERROR_WEBGL_SAFARI_ACTIONS_4: 'Développe > Activé WebGL', ERROR_MISSING_URLS_PROBLEM: "Il n'y a pas de panoromas pour ce modèle.", ERROR_MISSING_URLS_EXPLANATION: 'Ceci est un ancien modèle. Le propriétaire du site a peut-être un nouveau modèle en cours.', ERROR_LOADING_FAILED_PROBLEM: "Ce modèle n'est pas disponible.", ERROR_LOADING_FAILED_ACTIONS_1: 'Si le problème persiste, ', ERROR_LOADING_FAILED_ACTIONS_2: 'voir notre guide de dépannage', ERROR_MAINTENANCE_PROBLEM: 'Maintenance en cours.', ERROR_MAINTENANCE_SOLUTION: 'Revenez dans quelques instants.', LINK_TO_LOCATION: "Lien vers l'emplacement", MENU_COPY: 'Copie', LINK_ALERT_COPY: 'Utiliser CTRL+CMD C pour copier.', ROTATE: 'Faire pivoter', INSIDE: 'Intérieure', MOVE: 'Se déplacer', ZOOM: 'Zoom' } }, {} ], 114: [ function (e, t, i) { 'use strict' t.exports = { PAGE_TITLE: '', LOADING: '読み込み中', PRESENTED_BY_CAPS: 'PRESENTED BY', POWERED_BY: 'powered by', POWERED_BY_CAPS: 'POWERED BY', DESKTOP_SHORT_CTA: 'クリックしてこの3D Spaceを探索', MOBILE_SHORT_CTA: 'タップしてこの3D Spaceを探索', PRESENTED_BY: 'Presented by ', MORE: '全て表示 ', LESS: '閉じる ', TAG_CONTENT: 'tag™コンテンツ ', SHOW: '表示', HIDE: '非表示', DOLLHOUSE: 'ドールハウス', FLOOR_PLAN: 'フロアプラン', OPEN_HIGHLIGHTS: 'ハイライトを開く', CLOSE_HIGHLIGHTS: '閉じる', PREVIOUS: '前へ', PLAY: '再生', PAUSE: '一時停止', NEXT: '次へ', EXPLORE_3D_SPACE: '3DSpaceの探索', VIEW_DOLLHOUSE: 'ドールハウスの表示', SOCIAL_SHARING: 'このSpaceを共有する', VIEW_IN_VR: 'VRで表示', VIEW_FULLSCREEN: 'フルスクリーン表示', EXIT_FULLSCREEN: 'フルスクリーン表示を終了', ZOOM_IN: 'ズームイン', ZOOM_OUT: 'ズームアウト', FLOOR_NAME: 'フロア ', FLOOR_ALL: 'すべて', TERMS: '規約', PORT_TERMS: 'port規約', TERMS_OF_USE: '利用規約', CLOSE_TERMS: '閉じる', TERMS_TEXT_FILE: 'terms-jp-JP.html', TERMS_FAIL: '規約を取得できませんでした。利用規約を表示するためにインターネットに接続されていることを確認してください。', WEBVR_FOR_DAYDREAM: 'Daydream View用', WEBVR_ENTER_WEBVR: 'VRに入る', WEBVR_DIFFERENT_HEADSET: '別のヘッドセットをお持ちですか?', WEBVR_LEARN_MORE: 'もっと詳しく', WEBVR_VIEW_SPACE: 'VRでSpaceを表示', WEBVR_DAYDREAM_VIEW: 'Daydream View', WEBVR_DAYDREAM_PHONE: 'Daydream対応スマホ', WEBVR_FOR_CARDBOARD: 'Google Cardboard用', WEBVR_VIEW_CARDBOARD: 'またはGoogle Cardboardで表示', VR_VIEW_SPACE: 'バーチャルリアリティでSpaceを表示', VR_LEARN_MORE_CAPS: 'もっと詳しく', VR_PREVIOUS_CAPS: '前へ', VR_NEXT_CAPS: '次へ', VR_GOT_IT_CAPS: '了解', VR_SHOW_SUPPORTED: 'タップして次を使用してVRでSpaceを表示: ', VR_SHOW_UNSUPPORTED: 'お使いのデバイスはVRでSpaceを表示する最低要件を満たしていません', VR_SHOW_IOS_1: 'タップしてVRでSpaceを表示', VR_SHOW_IOS_2: '表示するにはport VRアプリと互換性のあるiPhoneが必要です', VR_WHAT_YOU_NEED: '必要なもの', VR_NEED_CARDBOARD: 'Google Cardboardに必要なもの', VR_NEED_SAMSUNG: 'Samsung Gear VRに必要なもの', VR_NEED_DAYDREAM: '事前にDaydream Viewとのペアリングが必要です', VR_NEED_DAYDREAM_PHONE: 'Daydream対応スマホ', VR_GOOGLE_CARDBOARD: 'Google Cardboard', VR_GOOGLE_DAYDREAM: 'Google Daydream', VR_APP: 'port VRアプリ', VR_SAMSUNG_GEAR_VR: 'Samsung Gear VR', VR_COMPATIBLE_IPHONES_1: 'iPhone', VR_COMPATIBLE_IPHONES_2: 'iOS 9.1以降で動作するiPhone 5s以降のモデル', VR_COMPATIBLE_IPHONES_3: '互換性のあるiPhone', VR_COMPATIBLE_ANDROID: '互換性のあるAndroidデバイス', VR_COMPATIBLE_ANDROID_LONG: 'Android OS 4.4.4以降で動作する互換性のあるAndroidデバイスの4.5~5.5インチディスプレイ', VR_ANDROID_DETAIL: 'Android OS 4.4.4以降で動作する4.5~5.5インチディスプレイ', VR_ANDROID_DVICES: 'Androidデバイス', VR_COMPATIBLE_SAMSUNG: '互換性のあるSamsungデバイス', VR_SAMSUNG_DETAIL: 'Galaxy S5以降のモデル', VR_APP_FOR_CARDBOARD: 'Google Cardboard用のport VRアプリ', VR_APP_FOR_SAMSUNG: 'Gear VR 用のport VRアプリ', VR_APP_FOR_ANDROID: 'Androidフォン用のport VRアプリ', VR_APP_OPEN: 'port VRアプリで開く', VR_DOWNLOAD_HERE: 'ここからダウンロード', VR_REQUIRE_HEADSET: 'Android 用のVRヘッドセットとport VRアプリ をインストールする必要があります', VR_REDIRECT_TO_STORE: 'アプリがインストールされていない場合、App Storeにリダイレクトされます', VR_IMPROPER_EMBED: 'お使いのウェブブラウザでVRがサポートされるようport Spaceが適切に埋め込まれていません。', VR_OPEN_ANDROID_LINK: 'お使いの携帯電話でリンクを開いてください', VR_ANDROID_OPTIONS: '利用可能なVRヘッドセットオプション', SHARE_TO: '共有先', SHARE_LINK: 'ダイレクトリンク', SHARE_EXPLORE: '探索', SHARE_AT: '場所', SHARE_WITH: '使用アプリ', SHARE_3D: '3Dで', SHARE_COPIED: 'コピーされました!', ERROR_BROWSER_SOLUTION: '3D探索するには、新しいバージョンのブラウザをインストールしてください', ERROR_BROWSER_EXPLANATION: 'WebGLにはモダンブラウザが必要です。', ERROR_GENERIC_PROBLEM: '問題が発生しました。', ERROR_GENERIC_SOLUTION: 'ブラウザを再起動してください。', ERROR_GENERIC_ACTIONS_1: '問題が解決しない場合は、', ERROR_GENERIC_ACTIONS_2: 'サポートされているブラウザをインストールしてください', ERROR_GENERIC_ACTIONS_3: 'または', ERROR_GENERIC_ACTIONS_4: 'トラブルシューティングガイドを参照してください', ERROR_WEBGL_UNSUPPORTED_PROBLEM: 'ブラウザがサポートされていません。', ERROR_WEBGL_IOS_PROBLEM: 'サポートされていないiOSバージョンです。', ERROR_WEBGL_IOS_SOLUTION: '3D探索するには、iOS 8以降にアップグレードしてください。', ERROR_WEBGL_IOS_ACTIONS_1: '以下の順にタップします:', ERROR_WEBGL_IOS_ACTIONS_2: '設定 > 全般 > ソフトウェアの更新', ERROR_WEBGL_SAFARI_PROBLEM: 'WebGLを有効にして3Dで探索します。', ERROR_WEBGL_SAFARI_ACTIONS_1: '以下の順にクリックします:', ERROR_WEBGL_SAFARI_ACTIONS_2: '環境設定 > 詳細 > メニューバーに開発メニューを表示', ERROR_WEBGL_SAFARI_ACTIONS_3: 'その後、以下の順にクリックします:', ERROR_WEBGL_SAFARI_ACTIONS_4: '開発 > WebGLを有効にする', ERROR_MISSING_URLS_PROBLEM: 'このモデルではパノラマを使用できません。', ERROR_MISSING_URLS_EXPLANATION: 'これは古いモデルです。ウェブサイト所有者が新しいモデルを開発中かもしれません。', ERROR_LOADING_FAILED_PROBLEM: 'モデルは利用できません。', ERROR_LOADING_FAILED_ACTIONS_1: '問題が解決しない場合は、', ERROR_LOADING_FAILED_ACTIONS_2: 'トラブルシューティングガイドを参照してください', ERROR_MAINTENANCE_PROBLEM: 'メンテナンスは進行中です。', ERROR_MAINTENANCE_SOLUTION: 'しばらくしてからやり直し てください。', LINK_TO_LOCATION: 'ロケーションへのリンク', MENU_COPY: 'コピー', LINK_ALERT_COPY: 'コピーするにはCTRL/CMD + Cを使用してください。', ROTATE: '回転', MOVE: '移動', INSIDE: '内側', ZOOM: 'ズーム', HELP: 'ヘルプ', HELP_NAVIGATION_TAB: 'ナビゲーション', HELP_MORE_HELP_TAB: 'その他のヘルプ', HELP_DESKTOP_PANORAMA_1A: 'Spaceを見回すには、クリックしてドラッグします。', HELP_DESKTOP_PANORAMA_2A: '移動するには、Space全体にあるリングをクリックします。', HELP_DESKTOP_PANORAMA_3A: 'スクロールホイールを使用してズームイン、ズームアウトします。', HELP_DESKTOP_PANORAMA_1B: 'または、矢印キーを使用して左右に向きを変えます。', HELP_DESKTOP_PANORAMA_2B: 'または、矢印キーを使用して前後に向きを変えます。', HELP_DESKTOP_PANORAMA_3B: 'あるいは、プラス(+)キーまたはマイナス(-)キーを使用して、ズームイン、ズームアウトします。', HELP_DESKTOP_360_2A: '内側ビューアイコンをクリックしてSpaceに入ります。', HELP_DESKTOP_360_2B: 'または、数字キー1を押して内側ビューに入ります。', HELP_DESKTOP_DOLLHOUSE_1A: '左クリックと左右、上下のドラッグでドールハウスを回転します。', HELP_DESKTOP_DOLLHOUSE_2A: '右クリックと左右、上下のドラッグでドールハウスの画面上の位置を変更します。', HELP_DESKTOP_DOLLHOUSE_3A: 'スクロールホイールを使用してズームイン、ズームアウトします。', HELP_DESKTOP_DOLLHOUSE_1B: 'または、矢印キーを使用してドールハウスを回転します。', HELP_DESKTOP_FLOORPLAN_1A: '左ボタンを押しながら、上下左右にドラッグしてフロアプランの画面上の位置を変更します。', HELP_DESKTOP_FLOORPLAN_2A: '右ボタンを押しながら左右にドラッグして、フロアプランを回転します。', HELP_DESKTOP_FLOORPLAN_3A: 'スクロールホイールを使用してズームイン、ズームアウトします。', HELP_DESKTOP_FLOORPLAN_2B: 'または、矢印キーを使用して左右に回転します。', HELP_DESKTOP_FLOORPLAN_3B: 'または、矢印キーを使用して、ズームイン、ズームアウトします。', HELP_MOBILE_PANORAMA_1: 'Spaceを見回すには、タッチしてドラッグします。', HELP_MOBILE_PANORAMA_2: '移動するには、Space全体にあるリングをタップします。', HELP_MOBILE_3: 'ピンチジェスチャーを使用してズームイン、ズームアウトします。', HELP_MOBILE_360_2: '内側ビューアイコンをタップしてSpaceに入ります。', HELP_MOBILE_DOLLHOUSE_1: 'タッチして上下左右にドラッグしてドールハウスを回転します。', HELP_MOBILE_DOLLHOUSE_2: 'タッチして、2本指でドラッグしてドールハウスを配置します。', HELP_MOBILE_FLOORPLAN_1: 'タッチ&ドラッグしてフロアプランを配置します。', HELP_MOBILE_FLOORPLAN_2: 'タッチして、2本指でドラッグしてフロアプランを回転します。', HELP_MORE_HLR_A: 'ハイライト', HELP_DESKTOP_MORE_HLR_B: 'サムネイル画像を使用してSpaceを移動するために開きます。', HELP_MORE_DOLLHOUSE_A: 'ドールハウス', HELP_DESKTOP_MORE_DOLLHOUSE_B: 'クリックして3DでSpace全体のトップダウンビューを表示して回転します。', HELP_MOBILE_MORE_DOLLHOUSE_B: 'タップして3DでSpace全体のトップダウンビューを表示して回転します。', HELP_MORE_FLOORS_A: 'フロアセレクター', HELP_DESKTOP_MORE_FLOORS_B: 'Space内のフロアを切り替えます。', HELP_MORE_TAG_A: 'tag™ Posts', HELP_DESKTOP_MORE_TAG_B: 'クリックするか、カーソルを置くとSpace内の機能についての説明が表示されます。', HELP_MOBILE_MORE_TAG_B: 'タップするとSpace内の機能についての説明が表示されます。', HELP_MORE_ZOOM_A: 'ズームコントロール', HELP_DESKTOP_MORE_ZOOM_B: 'これらのコントロールまたはスクロールホイールを使用して、ズームイン、ズームアウトします。', HELP_MORE_TOUR_A: 'ツアーコントロール', HELP_DESKTOP_MORE_TOUR_B: 'ガイド付きツアー中に再生、一時停止、前方・後方に移動します。', HELP_MORE_INSIDE_A: '内側ビュー', HELP_DESKTOP_MORE_INSIDE_B: 'クリックしてSpace内を探索します。', HELP_MOBILE_MORE_INSIDE_B: 'タップしてSpace内を探索します。', HELP_MORE_VR_A: 'VRモード', HELP_DESKTOP_MORE_VR_B: 'クリックしてバーチャルリアリティでSpaceを起動します。', HELP_MOBILE_MORE_VR_B: 'タップしてバーチャルリアリティでSpaceを起動します。', HELP_MORE_360_A: '360° Views', HELP_DESKTOP_MORE_360_B: 'Highlight Reelの360° Viewsをクリックして屋外シーンを表示します。', HELP_MOBILE_MORE_360_B: 'Highlight Reelの360° Viewsをタップして屋外シーンを表示します。', HELP_MORE_FULLSCREEN_A: 'フルスクリーン', HELP_DESKTOP_MORE_FULLSCREEN_B: '3D Showcaseをフルスクリーン表示にします。', CLOSE: '閉じる' } }, {} ], 115: [ function (e, t, i) { 'use strict' t.exports = { PAGE_TITLE: '', LOADING: 'Загрузка', PRESENTED_BY_CAPS: 'ПРЕДСТАВЛЕНО', POWERED_BY: 'разработано на платформе ', POWERED_BY_CAPS: 'РАЗРАБОТАНО НА ПЛАТФОРМЕ', DESKTOP_SHORT_CTA: 'Нажмите для просмотра.', MOBILE_SHORT_CTA: 'Нажмите для просмотра.', PRESENTED_BY: 'Представлено ', MORE: 'Больше ', LESS: 'Меньше ', TAG_CONTENT: 'tag™ Контент', SHOW: 'Показать', HIDE: 'Скрыть', DOLLHOUSE: 'Dollhouse', FLOOR_PLAN: 'Планировка', OPEN_HIGHLIGHTS: 'Открыть Фотоколлаж', CLOSE_HIGHLIGHTS: 'Закрыть', PREVIOUS: 'Предыдущий', PLAY: 'Воспроизвести', PAUSE: 'Пауза', NEXT: 'Следующий', EXPLORE_3D_SPACE: 'Просмотреть 3D модель', VIEW_DOLLHOUSE: 'Посмотреть Dollhouse', SOCIAL_SHARING: 'Поделиться этой моделью', VIEW_IN_VR: 'Посмотреть в VR', VIEW_FULLSCREEN: 'Полный экран', EXIT_FULLSCREEN: 'Выйти из полноэкранного режима', ZOOM_IN: 'Увеличить', ZOOM_OUT: 'Уменьшить', FLOOR_NAME: 'Этаж ', FLOOR_ALL: 'Все', TERMS: 'Условия', PORT_TERMS: 'Правила пользования', TERMS_OF_USE: 'Условия использования', TERMS_TEXT_FILE: 'terms-ru-RU.html', CLOSE_TERMS: 'Закрыть', TERMS_FAIL: 'Не удалось загрузить условия использования. Для просмотра условий использования, пожалуйста, убедитесь, что у Вас есть подключение к Интернету.', HELP: 'Помощь', HELP_NAVIGATION_TAB: 'Навигация', HELP_MORE_HELP_TAB: 'Доп. Помощь', CLOSE: 'Закрыть', HELP_DESKTOP_PANORAMA_1A: 'Нажмите и перетащите, чтобы осмотреть пространство вокруг.', HELP_DESKTOP_PANORAMA_2A: 'Для передвижения по модели нажимайте на круги .', HELP_DESKTOP_PANORAMA_3A: 'Используйте колесо прокрутки для увеличения и уменьшения.', HELP_DESKTOP_PANORAMA_1B: 'Или используйте клавиши со стрелками для поворота влево и вправо.', HELP_DESKTOP_PANORAMA_2B: 'Или используйте стрелки для перемещения вперед и назад.', HELP_DESKTOP_PANORAMA_3B: 'Или используйте клавиши ‘плюс’ и ‘минус’ для увеличения и уменьшения изображения.', HELP_DESKTOP_360_2A: 'Нажмите на значок ‘Вид Изнутри’, чтобы увидеть внутреннюю панораму.', HELP_DESKTOP_360_2B: 'или нажмите 1 на клавиатуре, чтобы увидеть внутреннюю панораму.', HELP_DESKTOP_DOLLHOUSE_1A: 'Нажмите левую кнопку мыши и перетащите влево, вправо, вверх и вниз, чтобы повернуть Dollhouse.', HELP_DESKTOP_DOLLHOUSE_2A: 'Нажмите правую кнопку мыши и перетащите влево, вправо, вверх и вниз, чтобы изменить позицию Dollhouse на экране.', HELP_DESKTOP_DOLLHOUSE_3A: 'Используйте колесо прокрутки чтобы увеличить и уменьшить.', HELP_DESKTOP_DOLLHOUSE_1B: 'Или используйте клавиши со стрелками, чтобы повернуть Dollhouse.', HELP_DESKTOP_FLOORPLAN_1A: 'Нажмите левую кнопку мыши и перетащите влево, вправо, вверх и вниз, чтобы изменить положение Планировки на экране.', HELP_DESKTOP_FLOORPLAN_2A: 'Нажмите правую кнопку мыши и перетащите влево или вправо, чтобы повернуть Планировку.', HELP_DESKTOP_FLOORPLAN_3A: 'Используйте колесо прокрутки чтобы увеличить и уменьшить.', HELP_DESKTOP_FLOORPLAN_2B: 'Или используйте клавиши со стрелками для поворота влево или вправо.', HELP_DESKTOP_FLOORPLAN_3B: 'Или используйте стрелки для увеличения и уменьшения.', HELP_MOBILE_PANORAMA_1: 'Нажмите и перетащите, чтобы осмотреть модель.', HELP_MOBILE_PANORAMA_2: 'Для передвижения по модели нажимайте на круги.', HELP_MOBILE_3: 'Используйте движение двумя пальцами в разные стороны, чтобы увеличить и уменьшить.', HELP_MOBILE_360_2: 'Нажмите на значок ‘Вид Изнутри’, чтобы увидеть внутреннюю панораму.', HELP_MOBILE_DOLLHOUSE_1: 'Нажмите и перетащите вверх, вниз, влево и вправо, чтобы повернуть Dollhouse.', HELP_MOBILE_DOLLHOUSE_2: 'Нажмите и перетащите, чтобы расположить Dollhouse.', HELP_MOBILE_FLOORPLAN_1: 'Нажмите и перетащите, чтобы расположить план здания.', HELP_MOBILE_FLOORPLAN_2: 'Коснитесь и перетащите двумя пальцами, чтобы повернуть план здания.', HELP_MORE_HLR_A: 'Фотоколлаж', HELP_DESKTOP_MORE_HLR_B: 'Откройте для перемещения по модели, используя иконки изображений.', HELP_MORE_DOLLHOUSE_A: 'Dollhouse', HELP_DESKTOP_MORE_DOLLHOUSE_B: 'Нажмите и поверните сверху вниз чтобы просмотреть всю 3D модель.', HELP_MOBILE_MORE_DOLLHOUSE_B: 'Нажмите и поверните сверху вниз чтобы просмотреть всю 3D модель.', HELP_MORE_FLOORS_A: 'Выбор Этажа', HELP_DESKTOP_MORE_FLOORS_B: 'Переключение между этажами.', HELP_MORE_TAG_A: 'tag™ Posts', HELP_DESKTOP_MORE_TAG_B: 'Нажмите или наведите курсор мыши для получения информации о функциях в Пространстве.', HELP_MOBILE_MORE_TAG_B: 'Нажмите для получения информации о функциях.', HELP_MORE_ZOOM_A: 'Масштаб', HELP_DESKTOP_MORE_ZOOM_B: 'Используйте эти кнопки для увеличения и уменьшения изображения или используйте колесо прокрутки.', HELP_MORE_TOUR_A: 'Управление Туром', HELP_DESKTOP_MORE_TOUR_B: 'Используйте кнопки Воспроизвести, Пауза, Вперед и Назад для управления фотоколлажем.', HELP_MORE_INSIDE_A: 'Вид Изнутри', HELP_DESKTOP_MORE_INSIDE_B: 'Нажмите, чтобы просмотреть модель изнутри.', HELP_MOBILE_MORE_INSIDE_B: 'Нажмите, чтобы просмотреть модель изнутри.', HELP_MORE_VR_A: 'Режим VR', HELP_DESKTOP_MORE_VR_B: 'Нажмите, чтобы запустить модель в виртуальной реальности.', HELP_MOBILE_MORE_VR_B: 'Нажмите, чтобы запустить модель в виртуальной реальности.', HELP_MORE_360_A: '360° Views', HELP_DESKTOP_MORE_360_B: 'Нажмите на “360 Views” в фотоколлаже, чтобы просмотреть внешний пейзаж.', HELP_MOBILE_MORE_360_B: 'Нажмите на “360 Views” в фотоколлаже, чтобы просмотреть внешний пейзаж.', HELP_MORE_FULLSCREEN_A: 'Полный экран', HELP_DESKTOP_MORE_FULLSCREEN_B: 'Развернуть 3D Showcase во весь экран.', WEBVR_FOR_CARDBOARD: 'Для Google Cardboard', WEBVR_FOR_DAYDREAM: 'Для просмотра в Daydream', WEBVR_ENTER_WEBVR: 'ВОЙТИ В VR ', WEBVR_DIFFERENT_HEADSET: 'Есть другой VR-шлем?', WEBVR_LEARN_MORE: 'Узнать больше', WEBVR_VIEW_SPACE: 'Запустить модель в VR', WEBVR_DAYDREAM_VIEW: 'Посмотреть в Daydream', WEBVR_DAYDREAM_PHONE: 'Daydream-готовый телефон', WEBVR_VIEW_CARDBOARD: 'Или просмотреть в Google Cardboard', VR_WHAT_YOU_NEED: 'Что Вам потребуется...', VR_NEED_DAYDREAM_PHONE: 'Daydream-готовый телефон', VR_GOOGLE_DAYDREAM: 'Google Daydream', VR_APP: 'port VR App', VR_APP_OPEN: 'Или открыть через приложение port VR', VR_COMPATIBLE_ANDROID_LONG: 'Совместимые Android устройства с диагональю экрана 4.5"-5.5" дюймов и Android версией 4.4.4, и выше', VR_SAMSUNG_DETAIL: 'Galaxy S6 и выше', VR_APP_FOR_ANDROID: 'Приложение port VR для Android', VR_NEED_DAYDREAM: 'Необходимо для соединением с Daydream', VR_VIEW_SPACE: 'Запустить модель в VR', VR_LEARN_MORE_CAPS: 'УЗНАТЬ БОЛЬШЕ', VR_PREVIOUS_CAPS: 'ПРЕДЫДУЩИЙ', VR_NEXT_CAPS: 'СЛЕДУЮЩИЙ', VR_GOT_IT_CAPS: 'ЯСНО', VR_SHOW_SUPPORTED: 'Нажмите, чтобы просмотреть модель в VR с помощью', VR_SHOW_UNSUPPORTED: 'Извините, но Ваше устройство не соответствует минимальным требованиям для просмотра модели в VR.', VR_SHOW_IOS_1: 'Нажмите, чтобы просмотреть модель в VR', VR_SHOW_IOS_2: 'Для просмотра требуется приложение port VR и совместимый iPhone', VR_NEED_CARDBOARD: 'Что Вам потребуется для Google Cardboard', VR_NEED_SAMSUNG: 'Что Вам потребуется для Samsung Gear VR', VR_GOOGLE_CARDBOARD: 'Google Cardboard', VR_SAMSUNG_GEAR_VR: 'Samsung Gear VR', VR_COMPATIBLE_IPHONES_1: 'iPhones', VR_COMPATIBLE_IPHONES_2: 'iPhone 5s или новее с iOS 9.1 и выше', VR_COMPATIBLE_IPHONES_3: 'Совместимые модели iPhone', VR_COMPATIBLE_ANDROID: 'Совместимые Android устройства', VR_ANDROID_DETAIL: 'Экран от 4.5" до 5.5" и Android 4.4.4, и выше', VR_ANDROID_DVICES: 'Android устройства', VR_COMPATIBLE_SAMSUNG: 'Совместимые Samsung устройства', VR_APP_FOR_CARDBOARD: 'Приложение port VR для Google Cardboard', VR_APP_FOR_SAMSUNG: 'Приложение port VR для Gear VR', VR_DOWNLOAD_HERE: 'Скачать здесь', VR_REQUIRE_HEADSET: 'Требуется VR-шлем и установленное приложение port VR для Android', VR_REDIRECT_TO_STORE: 'Если приложение не установлено, Вы будете перенаправлены на страницу магазина приложений.', VR_IMPROPER_EMBED: 'port модель не встроена должным образом для поддержки VR в вашем веб-браузере.', VR_OPEN_ANDROID_LINK: 'Откройте ссылку на Вашем мобильном телефоне', VR_ANDROID_OPTIONS: 'Доступные опции VR-шлемов', SHARE_TO: 'Поделиться', SHARE_LINK: 'Прямая ссылка', SHARE_EXPLORE: 'просмотреть', SHARE_AT: 'на', SHARE_WITH: 'с', SHARE_3D: 'в 3D', SHARE_COPIED: 'Скопировано!', ERROR_BROWSER_SOLUTION: 'установите новый браузер, чтобы просмотреть 3D пространство.', ERROR_BROWSER_EXPLANATION: 'WebGL требует современный браузер.', ERROR_GENERIC_PROBLEM: 'Ой, что-то пошло не так.', ERROR_GENERIC_SOLUTION: 'Перезапустите браузер.', ERROR_GENERIC_ACTIONS_1: 'Если проблема не устранена, ', ERROR_GENERIC_ACTIONS_2: 'установите поддерживаемый браузер', ERROR_GENERIC_ACTIONS_3: ' или ', ERROR_GENERIC_ACTIONS_4: 'смотрите наше руководство по устранению неполадок', ERROR_WEBGL_UNSUPPORTED_PROBLEM: 'Браузер не поддерживается.', ERROR_WEBGL_IOS_PROBLEM: 'iOS-версия не поддерживается.', ERROR_WEBGL_IOS_SOLUTION: 'Обновите до iOS 8 или выше, чтобы просмотреть пространство в 3D.', ERROR_WEBGL_IOS_ACTIONS_1: 'Нажмите ', ERROR_WEBGL_IOS_ACTIONS_2: 'Настройки > Общие > Обновление ПО', ERROR_WEBGL_SAFARI_PROBLEM: 'Включите WebGL для 3D-просмотра.', ERROR_WEBGL_SAFARI_ACTIONS_1: 'Нажмите ', ERROR_WEBGL_SAFARI_ACTIONS_2: 'Настойки > Дополнения > Показывать меню “Разработка” в строке меню', ERROR_WEBGL_SAFARI_ACTIONS_3: 'Затем нажмите ', ERROR_WEBGL_SAFARI_ACTIONS_4: 'Разработка > Разрешить WebGL', ERROR_MISSING_URLS_PROBLEM: 'Ой, для этой модели нет панорамы.', ERROR_MISSING_URLS_EXPLANATION: 'Эта модель устарела. У владельца веб-сайта может быть новая модель.', ERROR_LOADING_FAILED_PROBLEM: 'Ой, модель недоступна.', ERROR_LOADING_FAILED_ACTIONS_1: 'Если проблема не устранена, ', ERROR_LOADING_FAILED_ACTIONS_2: 'посмотрите наше руководство по устранению неполадок', ERROR_MAINTENANCE_PROBLEM: 'Выполняется техническое обслуживание.', ERROR_MAINTENANCE_SOLUTION: 'Пожалуйста, попробуйте снова через несколько минут.', LINK_TO_LOCATION: 'Ссылка на местоположение', MENU_COPY: 'Копировать', LINK_ALERT_COPY: 'Для того, чтобы скопировать, пожалуйста, используйте CTRL/CMD + C.', ROTATE: 'Вращать', MOVE: 'Передвигаться', INSIDE: 'Вид изнутри', ZOOM: 'Масштаб' } }, {} ], 116: [ function (r, e, t) { ;(function (i) { 'use strict' function re(e) { console.log('e1:' + e), (e = Math.round(0.4 * e * 100)), console.log('e2:' + e) var t = $('.progressbar') t.find('.bar').css('width', e + '%'), t.find('.label').css('left', (t.width() * e) / 100 - 15 + 'px'), t.find('.perc').text(e + '%') } $('#gui-loading').fadeIn(200), re(0.1) var e = g_version ? 'modeldata.js' : 'someData.json' $.ajax(g_Prefix + 'data/' + window.number + '/' + e + '?' + randomTime().getTime(), { dataType: 'json' }) .done(function (e) { var t = matcher(e) ;(t.files.templates[0] = g_Prefix + e.files.templates[0].replace('{{number}}', window.number)), (t.user = { is_authenticated: !1, flags: [ 'payment_show_past_due', 'sc_imgopt_100', 'mattertags', 'labels', 'fastly_v2_urls', 'vr', 'uhql', 'sc_segment_100', 'show_segment_metrics', 'content_distribution', 'workshop_webgl', 'show360views', 'showcase_vr', 'ws_zooming', 'model_settings', 'ws_360snapshots', 'img_multi_dl', 'vrworkshop', 'tag_links', 'ws_img_multi_dl', 'mattertag_links', 'billing_tab_hidden', 'static_cloud_ui', 'metrics', 'mattertag_media', 'img_size_download', 'show_360snapshots', 'floorplan', 'sc_tilegen_0', 'showcase_webvr', 'sc_mixpanel_0', 'show_clickbait', 'zooming', 'showcase_tiling', 'list_signed_urls_default_3', 'fastly_image_opto' ] }) try { //处理一下导览数据 t.model.images = t.model.images.filter(e => { if (!e.locations && !e.thumbnail_signed_src) return //旧的曾有导览数据是错误的,将它删除 if (e.locations) e.locations = e.locations.filter(e => e) if (e.locations && e.locations.length == 0) return return e }) } catch (e) { console.log(e) } window.editTool = new EditTools() t.hotIconScale = parseFloat(t.hotIconScale || 1) window.DATA = t settings.playTourNearBy = !DATA.tourFromStart t.model.summary = t.summary t.model.name = t.name for (let i in t) { t[i] == 'false' && (t[i] = false) } re(0.7), (function () { function y(e) { t.update(e) } function A(e, t) { ne.error(t), n.error(t), N.report(e, 'error-' + t) } function C(e, t, i) { try { e.start(t) } catch (e) { throw ( (ne.warn(e.message), (function (e) { var t = O.details() t && 'Safari' === t.name && 500 < t.version && t.version < 600 ? (n.error('webgl-safari'), N.report(e, 'error-webgl-safari')) : (n.error('webgl-generic'), N.report(e, 'error-webgl-generic')) })(i.sid), e) ) } } function I(e) { e.stopPropagation(), e.preventDefault() } window.DATA.hoticon && (g_HotImage = { point: window.DATA.hoticon.default || 'https://super.4dage.com/images/4dagePoint2.png', point2: window.DATA.hoticon.higt || 'https://super.4dage.com/images/4dagePoint.png' }) if (window.DATA.backgroundMusic && window.isLocal) { window.DATA.backgroundMusic = manage.dealURL(window.DATA.backgroundMusic) } else if (g_version === 'one') { window.DATA.backgroundMusic = manage.dealURL(g_Prefix + '/audio/' + 'audio' + window.number + '/background.mp3') } if (window.DATA.backgroundMusic) { SoundManager.setSrc('bgm', window.DATA.backgroundMusic) $('#volume').show() } //隐藏公司logo window.DATA.loadlogo && showLogo() // 隐藏顶部介绍 window.DATA.topText && topTextHide() r('./lib/three75-shim'), r('./lib/array-polyfill'), r('./lib/performance-polyfill'), r('./lib/shaders/CopyShader.js'), r('./lib/shaders/HorizontalBlurShader.js'), r('./lib/shaders/VerticalBlurShader.js'), r('./lib/postprocessing/EffectComposer.js'), r('./lib/postprocessing/RenderPass.js'), r('./lib/postprocessing/MaskPass.js'), r('./lib/postprocessing/ShaderPass.js'), window.Promise || (window.Promise = r('promise-polyfill')) var E = r('three'), _ = r('three'), b = (r('./util/sentry'), r('./player')), w = r('./director'), T = r('./controls/CameraControls'), x = r('./model/ModelManager'), S = r('./DisplayController'), M = r('./label/LabelDisplayController'), R = r('./enum/Viewmode'), e = r('./util/logger'), P = r('./showcase'), O = r('./util/browser'), L = r('./settings'), D = r('./gui/gui'), n = r('./gui/error'), N = r('./analytics'), F = r('./util/transitions'), B = r('./effects'), V = r('./objects/Skybox'), k = (r('./util/common'), r('./util/PanoramaCollection'), r('./util/math'), r('./util/showcase')), U = r('./util/camera'), H = (r('./objects/Panorama'), r('./cameras/PanoramaCamera'), r('./preloaders')), z = r('events').EventEmitter, G = r('./featureflags'), W = (r('./util/lerp'), r('./util/ajax'), r('./ab')), j = r('./sdk/automation.js'), Y = r('./scene/SceneRenderer'), q = r('./scene/QuickstartManager'), X = r('./tile/QualityManager.js'), Z = r('./localization/localize'), K = r('./tag/tagManager'), Q = r('./tile/TileDownloader'), J = r('./tile/PanoRenderer'), ee = (r('./enum/PanoSizeClass'), r('./enum/PanoramaEvents'), r('./enum/SceneRendererEvents')), t = r('./gui/memoryUsage'), te = r('./enum/RenderLayers'), ie = r('./TimingData'), ne = new e(i) ;(e.level = L.logLevel), (e.consoleEnabled = L.console), (function () { var e = window.number //k.getModelIDFromQueryString(); if (!e) return A(null, 'loading-failed') var t = k.parseSidUrl(e), i = O.valueFromHash('play', !1) ? 'autoplay' : O.inIframe() ? 'click' : 'fullpage', n = { panoElementsToLoad: 6, modelElementsToLoad: 0, totalElementsLoaded: 0, totalElementsToLoad: 0, totalPercentageLoaded: 0, progressCallback: null }, r = document.getElementById('player'), o = L.quickstart.enabled, a = null, s = null, l = null, c = null, h = null, u = null, d = null, p = null, f = null, g = null, m = null, v = new ie() !(function (e) { ne.info('Version', '2.25.6-0-gd87e5b1'), (z.defaultMaxListeners = 1e3), (function (e) { e.addEventListener('dragenter', I, !1), e.addEventListener('dragover', I, !1) })(e), O.valueFromHash('title', !0) || $(document).ready(function () { $('.model-title').hide() }) })(r), (function (e) { return G.loadFeatureFlags(e).done(function (e) { G.updateDependentSettings(e, L) }) })({ urlBase: t.urlBase }) .then(function () { return ( Z.init(), (function (e, t) { var i = P.getModel({ url: t, floors: O.valueFromHash('f', !0), autoload: !1 }) return $.when(i, y).then(null, function (e) { return this }) })(0, e) ) }) .then(function (e) { return ( re(0.9), (function (e, t, i, n, r) { ne.info('Model data loaded'), ne.debug('UUID: ' + e.data.job.uuid), W.init(G.getFlags()), i && N.initKeen({ token: i, appId: n }), N.initSegment({ model: e.sid, version: '2.25.6-0-gd87e5b1', startSource: r.startSource, token: t, autoplay: r.autoplay, quickstart: r.quickstart }) })((g = e), L.appConfig.segment_key, L.appConfig.keen_write_key, L.appConfig.keen_project_id, { startSource: i, autoplay: L.autoplay, quickstart: o }), g.urls.init() ) }) .then(function () { return g.loadPanos() }) .then(function () { s = U.getStartCameraOptions(g, g.panos) //初始画面 window.DATA.camera_start && window.DATA.camera_start.thumbImg && (function (e) { $('') .attr('src', e) .on('load', function () { $('#gui-thumb') .css('backgroundImage', 'url(' + e + ')') .fadeIn(500), $(this).remove() $('.screen .shotImg.innerBtn') .removeClass('blank') .css('background-image', 'url(' + e + ')') }) })(window.DATA.camera_start.thumbImg) { //初始化导览时间 if (DATA.tourBlackSpeed == void 0) DATA.tourBlackSpeed = 100 window._settings.warp.teleportTime = (settings.teleportTime / DATA.tourBlackSpeed) * 100 if (DATA.tourWalkSpeed == void 0) DATA.tourWalkSpeed = 100 /* if(DATA.tourWalkSpeed!=void 0){ let r = 100 / DATA.tourWalkSpeed; window._settings.warp.flytimeDistanceMultiplier = settings.flytimeDistanceMultiplier * r window._settings.warp.flyTime = settings.flyTime * r }else{ window._settings.warp.flyTime = settings.flyTime } */ if (DATA.tourRotTime == '' || DATA.tourRotTime == void 0) { DATA.tourRotTime = settings.tourRotTime //默认停留2秒 } } { //其他 _settings.floorPlanAngle = DATA.floorPlanAngle || 0 _settings.angleShift2d = DATA.angleShift2d || 0 if (DATA.insideLookLimit) { _settings.insideLookLimitDown = DATA.insideLookLimit[0] _settings.insideLookLimitUp = DATA.insideLookLimit[1] } } ;(d = (function (e) { var t = new E.PerspectiveCamera() t.layers.enable(te.PANOMARKERS), t.layers.enable(te.RETICULE), t.layers.enable(te.TAG) var o = new E.Scene(), i = new E.AmbientLight(16777215) return ( o.add(i), (o.skybox = new V()), o.add(o.skybox), (o.plane = new E.Mesh( new E.PlaneBufferGeometry(1e5, 1e5), new E.RawShaderMaterial({ side: E.DoubleSide }) )), (o.plane.position.y = 0), o.plane.rotateX(-Math.PI / 2), (o.plane.material.visible = !1), o.add(o.plane), o.updateMatrixWorld(), L.showScreenshotLocations && e.data.images.forEach(function (e) { if (e.metadata && e.metadata.camera_position) { var t = e.metadata.camera_position, i = new E.Mesh(new E.BoxGeometry(0.3, 0.3, 0.3)) ;(i.position = t.clone()), o.add(i) var n = e.metadata.camera_quaternion, r = new E.Vector3(0, 0, -1).applyQuaternion(n) o.add(new E.ArrowHelper(r, t.clone(), 1, 16711680)) } }), L.showAxis && (o.add(new E.ArrowHelper(new E.Vector3(0, 1, 0), new E.Vector3(0, 0, 0), 1, 255)), o.add(new E.ArrowHelper(new E.Vector3(0, 0, 1), new E.Vector3(0, 0, 0), 1, 16711680)), o.add(new E.ArrowHelper(new E.Vector3(1, 0, 0), new E.Vector3(0, 0, 0), 1, 65280))), new Y(o, t, B) ) })(g)), (m = (function (e, t) { var i = e ? 1 : 1e3, n = W.tilegen || W.imgopt ? 6 : 2 n = O.valueFromHash('tileconc', n) var r = new X(), o = new Q({ concurrentDownloads: n }), a = new J(), s = new x(), l = new w(), c = new b(t), h = new T(), u = new S(i), d = new M(), p = new K() return { qualityManager: r, panoRenderer: a, tileDownloader: o, player: c, director: l, modelManager: s, tagManager: p, displayController: u, labelDisplayController: d, controls: h } })(o, s.mode)), (l = m.controls), (c = m.player), (h = m.director), (u = m.tagManager), (p = m.tileDownloader), (f = m.qualityManager), m.panoRenderer, (function (e, t, i, n) { var r = i.controls, o = i.qualityManager, a = i.panoRenderer, s = i.tileDownloader, l = i.modelManager r.init(n, l), j.init(i.director, r, i.player, l, t), o.init(l), s.init(o), a.init(t, s, o), l.init(s, a, o), l.addModel(e), t.addComponent(F) })(g, d, m, r), (c.director = h), g.supportsTiles && p.start(), !o || (s.mode === R.PANORAMA && s.pano) || (ne.warn('Tried to quickstart, but failed as we are not starting in inside mode.'), (o = !1)) var e = null if (o) { ne.warn('Quickstart engaged. Hold on to your knickers.') var t = l.controls[R.PANORAMA] ;(a = new q(f, d.scene, d.camera, t, r)), C(d, r, g), (e = a.load(s).then(function () { d.addComponent(a), d.once(ee.AfterRender, function () { ne.warn('First render after quickstart load finished.') }) })) } return ( (window.flyToFirst = function () { var e = c.model.panos.get('8d778e19657f433fb9cf8947d823bb70'), t = new _.Quaternion(0.7099827027821568, -0.07708150183830938, 0.6958985789714591, 0.07555241737970636), i = new _.Vector3(0, 0, -1).applyQuaternion(t).add(e.position) c.flyToPano({ pano: e, lookAtPoint: i }) }), $.when(e, D.startLoading(g, c, h, L.autoplay, o, v)) ) }) .then(function () { return (function (e, t, i, n, r) { return ( (r.progressCallback = t), N.sessionStart(), e.load(n).progress( function (e, t) { ;(e.modelElementsToLoad = t[1]), (function (e) { e.totalElementsToLoad = e.modelElementsToLoad + e.panoElementsToLoad })(e), (function (e) { e.totalElementsLoaded++, (e.totalPercentageLoaded = e.totalElementsLoaded / e.totalElementsToLoad), isNaN(e.totalPercentageLoaded) && (e.totalPercentageLoaded = 0), (e.totalPercentageLoaded = 0.4 + 0.6 * e.totalPercentageLoaded), console.log('pro:' + e.totalPercentageLoaded), e.progressCallback && e.progressCallback(100 * e.totalPercentageLoaded) })(e) }.bind(this, r) ) ) })(g, D.onProgress, 0, !o, n) }) .then(function () { ;(s.quickstart = o), (function (e, t, i, n) { var r = i.qualityManager, o = i.panoRenderer, a = i.tileDownloader, s = i.modelManager, l = i.player, c = i.director, h = i.tagManager, u = i.displayController, d = i.labelDisplayController, p = i.controls t.scene.add(e), (t.qualityManager = r) var f = { camera: t.camera, director: c, modelManager: s, tileDownloader: a, panoRenderer: o, qualityManager: r, tagManager: h, container: n, controls: p } l.init(f), l.setScene(t.scene), h.init(s, l), c.init(l, s), u.init(c, l, s, h, n), d.init(l, s, n), B.bindEvents(l), t.addComponent(h), t.addComponent(l), t.addComponent(o), (l.sceneRenderer = t) })(g, d, m, r), d.started || C(d, r, g), N.modelLoaded(g, c, l, L.autoplay), (function (e, t, i, n) { return ne.info('Starting player in ' + i.mode), N.report(t.sid, 'started-playing', n, i.quickstart), e.start(i) })(c, g, s, L.autoplay).done(function () { h.autoTour() }), g.supportsTiles || new H(g, c).start() o && (d.removeComponent(a), a.destroy(), s.pano.enter()), D.init(g, h, c, l, d, s, N.getSessionId()), D.endLoading(g, h, u), d.once(ee.AfterRender, function () { v.setAppReadyTime() var e = v.calcFullLoadingTime() ne.warn('Total load time: ' + e / 1e3), N.loadComplete(e), ne.warn('First render after model load finished.') editTool.loadDone('data', window.DATA) }), d.on(ee.MemoryUsageUpdated, y) }) .fail(A.bind(this, e)) })() })() }) .fail(e => { alert('缺少someData文件,请检查场景码是否正确。') }) }).call(this, '/js/main.js') }, { './DisplayController': 1, './TimingData': 2, './ab': 3, './analytics': 4, './cameras/PanoramaCamera': 7, './controls/CameraControls': 9, './director': 15, './effects': 16, './enum/PanoSizeClass': 36, './enum/PanoramaEvents': 37, './enum/RenderLayers': 41, './enum/SceneRendererEvents': 43, './enum/Viewmode': 51, './featureflags': 59, './gui/error': 64, './gui/gui': 65, './gui/memoryUsage': 73, './label/LabelDisplayController': 91, './lib/array-polyfill': 92, './lib/performance-polyfill': 95, './lib/postprocessing/EffectComposer.js': 96, './lib/postprocessing/MaskPass.js': 97, './lib/postprocessing/RenderPass.js': 98, './lib/postprocessing/ShaderPass.js': 99, './lib/shaders/CopyShader.js': 100, './lib/shaders/HorizontalBlurShader.js': 101, './lib/shaders/VerticalBlurShader.js': 102, './lib/three75-shim': 103, './localization/localize': 108, './tag/tagManager': 124, './model/ModelManager': 140, './objects/Panorama': 148, './objects/Skybox': 152, './player': 155, './preloaders': 156, './scene/QuickstartManager': 157, './scene/SceneRenderer': 158, './sdk/automation.js': 164, './settings': 166, './showcase': 168, './tile/PanoRenderer': 169, './tile/QualityManager.js': 170, './tile/TileDownloader': 171, './util/PanoramaCollection': 178, './util/ajax': 181, './util/browser': 182, './util/camera': 183, './util/common': 185, './util/lerp': 188, './util/logger': 189, './util/math': 190, './util/sentry': 192, './util/showcase': 193, './util/transitions': 195, events: 202, 'promise-polyfill': 213, three: 217 } ], 117: [ function (e, t, i) { 'use strict' function n(e) { ;(e = e || {}), r.RawShaderMaterial.call( this, a.extendObject( { fragmentShader: o.cube.fragmentShader, vertexShader: o.cube.vertexShader, uniforms: r.UniformsUtils.clone(o.cube.uniforms), name: 'CubemapMaterial' }, e ) ) } var r = e('three'), o = e('../shaders'), a = e('../util/common') ;((n.prototype = Object.create(r.RawShaderMaterial.prototype)).constructor = n), (t.exports = n) }, { '../shaders': 167, '../util/common': 185, three: 217 } ], 118: [ function (e, t, i) { 'use strict' function n(e) { ;(e = e || {}), r.RawShaderMaterial.call( this, a.extendObject( { fragmentShader: o.model.fragmentShader, vertexShader: o.model.vertexShader, uniforms: r.UniformsUtils.clone(o.model.uniforms), name: 'ModelTextureMaterial' }, e ) ) } var r = e('three'), o = e('../shaders'), a = e('../util/common') ;(((n.prototype = Object.create(r.RawShaderMaterial.prototype)).constructor = n).prototype.setProjectedPanos = function (e, t, i) { i && (this.uniforms.progress.value = 0), e.ensureSkyboxReadyForRender(), (this.uniforms.pano0Map.value = e.getSkyboxTexture()), this.uniforms.pano0Position.value.copy(e.position), this.uniforms.pano0Matrix.value.copy(e.skyboxMesh.matrixWorld), t.ensureSkyboxReadyForRender(), (this.uniforms.pano1Map.value = t.getSkyboxTexture()), this.uniforms.pano1Position.value.copy(t.position), this.uniforms.pano1Matrix.value.copy(t.skyboxMesh.matrixWorld) }), (t.exports = n) }, { '../shaders': 167, '../util/common': 185, three: 217 } ], 119: [ function (m, v, e) { ;(function (e) { 'use strict' function t(e, t, i, n) { ;(this.div = null), (this.body = null), (this.label = e), (this.description = t), (this.parsedDescription = []), (this.media = i || { type: null }), (this.loadingSpinner = null), (this.parser = new r({ supportLinks: !c.valueFromHash('mls'), keepLinkLabels: !0 })), (this.state = g.CLOSED), (this.orientation = ''), (this.initialTransform = ''), (this.hovering = !1), (this.openTransition = null), (this.closeTransition = null), (this.openPromise = null), (this.closePromise = null), (this.animationTransition = null), (this.animationScale = 0) } var r = m('../Parser/DescriptionParser'), i = m('../Media/Link'), n = m('../Media/Image'), o = m('../Media/EmbedlyPlayer'), a = m('../Media/EmbedlyEmbed'), s = m('../../util/transitions'), l = m('../../util/lerp'), c = m('../../util/browser'), b = m('./BillboardEvent'), w = m('../Media/MediaEvent'), h = m('../Parser/DescriptionChunkType'), u = m('events').EventEmitter, d = m('./billboardSettings'), T = m('./overlaySettings'), p = new (m('../../util/logger'))(e), f = document.getElementById('tag-billboards') f.addEventListener('touchend', function (e) { f.style.pointerEvents = 'none' }), f.addEventListener('touchcancel', function (e) { f.style.pointerEvents = 'none' }) var g = { CLOSED: 'closed', OPENING: 'opening', OPEN: 'open', CLOSING: 'closing', ACTIVE: 'active' } ;((t.prototype = Object.create(u.prototype)).build = function (e) { this.parsedDescription = this.parser.parse(this.description) var t = document.createElement('div') ;(t.className = 'tag-container has-hotzone'), (this.div = t), (this.body = document.createElement('div')), (this.body.className = 'tag-body') var i = document.createElement('div') i.classList.add('tag-content') var n = document.createElement('div') n.classList.add('tag-text-content') var r = document.createElement('div') ;(r.className = 'tag-label'), (r.textContent = this.label), n.appendChild(r) var o = document.createElement('div') ;(o.className = 'tag-desc'), n.appendChild(o), i.appendChild(n), this.body.appendChild(i), this.appendDescriptionElements(this.parsedDescription, o), this.appendMedia(), t.appendChild(this.body), f.appendChild(t), this.bindEvents(t, this.body) }), (t.prototype.bindEvents = function (i, e) { function t(n) { return function (e) { if (!this.div.classList.contains('overlay')) { var t, i = document.getElementById('player') try { t = new MouseEvent(n, e) } catch (i) { ;(t = document.createEvent('MouseEvents')).initMouseEvent( n, e.bubbles, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget ) } i.dispatchEvent(t) } } } e.addEventListener('mousedown', function (e) { e.stopPropagation() }), e.addEventListener('mouseup', function (e) { e.stopPropagation() }), i.addEventListener('touchstart', function (e) { f.style.pointerEvents = 'auto' }), i.addEventListener('mousedown', t('mousedown').bind(this)), i.addEventListener('mouseup', t('mouseup').bind(this)), e.addEventListener( 'mouseover', function (e) { this.state === g.OPEN && i.classList.remove('has-hotzone') }.bind(this) ), i.addEventListener( 'mouseenter', function (e) { this.state !== g.CLOSING && ((this.hovering = !0), this.emit(b.ENTER)) }.bind(this) ), i.addEventListener( 'mouseleave', function (e) { ;(this.hovering = !1), this.emit(b.LEAVE) }.bind(this) ), i.addEventListener('gesturestart', function (e) { e.preventDefault() }) var n = i.querySelector('.tag-text-content'), r = 0 n.addEventListener('touchstart', function (e) { r = e.changedTouches[0].clientY }), n.addEventListener('touchmove', function (t) { function e(e) { e && ((0 === e.scrollTop && t.changedTouches[0].clientY > r) || (e.scrollTop + e.clientHeight - e.scrollHeight == 0 && t.changedTouches[0].clientY < r)) && t.preventDefault() } return i.classList.contains('overlay') ? e(this.querySelector('.tag-desc')) : void e(this) }), i.addEventListener('touchmove', function (e) { 0 == (n.compareDocumentPosition(e.target) & Node.DOCUMENT_POSITION_CONTAINED_BY) && e.preventDefault() }) }), (t.prototype.appendDescriptionElements = function (e, i) { 0 < e.length && this.div.classList.add('has-text'), e.forEach( function (e, t) { switch (e.type) { case h.TEXT: i.appendChild(this.createTextElement(e.text)) break case h.LINK: i.appendChild(this.createLinkElement(e.link)) } }.bind(this) ) }), (t.prototype.appendLoadingSpinner = function () { ;(this.loadingSpinner = document.createElement('div')), this.loadingSpinner.classList.add('loading-spinner') var e = document.createElement('div') e.classList.add('gui-spinner-icon'), this.loadingSpinner.appendChild(e), this.body.appendChild(this.loadingSpinner) }), (t.prototype.onMediaLoadFinished = function () { this.loadingSpinner && (this.loadingSpinner.parentNode.removeChild(this.loadingSpinner), this.applyOrientation(this.orientation), (this.loadingSpinner = null)) }), (t.prototype.appendMedia = function () { if (this.media && this.media.type && 'error' !== this.media.type && (!c.valueFromHash('mls', 0) || this.media.type === h.IMAGE)) { this.appendLoadingSpinner() var e = document.createElement('div') e.classList.add('tag-media-content') var t = document.createElement('i') switch ( (['icon', 'icon-close-thin', 'close'].forEach(function (e) { t.classList.add(e) }), this.body.appendChild(t), this.body.appendChild(e), this.media.type) ) { case h.IMAGE: e.appendChild(this.createImageElement(this.media, this.body)) break case h.VIDEO: e.appendChild(this.createVideoElement(this.media, this.body)) break case h.RICH: e.appendChild(this.createEmbedElement(this.media, this.body)) } } }), (t.prototype.createTextElement = function (e) { var t = document.createElement('span') return (t.textContent = e), t }), (t.prototype.createLinkElement = function (e) { var t = new i(e) return t.on(w.LINK_CLICK, this.emit.bind(this, w.LINK_CLICK)), t.createDomElement() }), (t.prototype.createImageElement = function (t, C) { function e() { function e() { p || (E.classList.remove('view-image'), a.classList.add('overlay'), t(), window.addEventListener('resize', A), a.addEventListener('click', i), c.addEventListener('click', r), o.addEventListener('click', n), (p = !0), _.emit(w.IMAGE_OPENED)) } function t() { C.classList.add('show-info'), s.classList.remove('collapsible'), (s.style.height = '') var e = parseFloat(getComputedStyle(v).lineHeight), t = g + e, i = a.clientWidth - 2 * T.boundaryWidth - m, n = a.clientHeight - 2 * T.boundaryHeight - m - t, r = n, o = r * I.aspect i < o && (r = (o = i) / I.aspect), n < r && (o = (r = n) * I.aspect), (o += m), (r += m + t), (C.style.width = o + 'px'), (C.style.height = r + 'px'), (l.style.paddingTop = e + m + 'px'), 0 < _.description.length && (s.classList.add('collapsible'), (s.style.height = s.clientHeight + 12 + 'px'), (y.style.height = 'calc(100% - ' + v.clientHeight + 'px)')) } function i(e) { e.target === a && n() } function n() { p && ((p = !1), E.classList.add('view-image'), a.classList.remove('overlay'), (s.style.height = ''), (l.style.paddingTop = ''), (C.style.width = ''), (C.style.height = ''), window.removeEventListener('resize', A), a.removeEventListener('click', i), c.removeEventListener('click', r), o.removeEventListener('click', n), _.emit(w.IMAGE_CLOSED), _.close(!0)) } function r(e) { C.classList.toggle('show-info') } var a = _.div, s = a.getElementsByClassName('tag-content')[0], l = a.getElementsByClassName('tag-media-content')[0], o = C.getElementsByClassName('close')[0], c = s.getElementsByClassName('tag-label')[0] a.classList.add('has-image'), E.classList.add('view-image'), a.classList.add(1 <= I.aspect ? 'image-landscape' : 'image-portrait'), _.applyOrientation(_.orientation) var h, u, d, p = !1, f = getComputedStyle(s), g = parseFloat(f.paddingTop) + parseFloat(f.paddingBottom), m = 2 * parseFloat(getComputedStyle(l).paddingLeft), v = s.querySelector('.tag-label'), y = s.querySelector('.tag-desc'), A = ((d = 0), function () { clearInterval(h), clearTimeout(u), (h = setInterval(function () { var e = a.clientHeight d !== e && (t(), (d = e)) }, 100)), (u = setTimeout(clearInterval.bind(this, h), 1e3)) }) I.on(w.IMAGE_OPENING, e), _.on(b.ACTIVATE, e), _.on(w.IMAGE_CLOSED, I.onClosed.bind(I)), _.on(b.CLOSING, n) } var I = new n(), E = I.createDomElement() this.once(b.OPENED, function () { I.load(t.src) .then(e) .catch(function (e) { p.warn('Failed to load image:', t.src), p.warn('with error:', e) }) .then(this.onMediaLoadFinished.bind(this)) }) var _ = this return E }), (t.prototype.createVideoElement = function (t, e) { var i = new o({ autoPlay: !0, autoResume: !0, startMuted: !1, loop: !1 }), n = i.createDomElement() return ( this.once( b.OPENED, function () { i.load(t.src) .then( function () { this.div.classList.add('has-video'), (this.state !== g.OPEN && this.state !== g.ACTIVE) || (i.show(), i.play()), this.on(b.OPENING, i.show.bind(i)), this.on(b.OPENED, i.play.bind(i)), this.on(b.CLOSING, i.pause.bind(i)), this.on(b.CLOSED, i.hide.bind(i)) }.bind(this) ) .catch(function (e) { p.warn('Failed to embed video:', t.src), p.warn('with error:', e) }) .then(this.onMediaLoadFinished.bind(this)) }.bind(this) ), n ) }), (t.prototype.createEmbedElement = function (t, e) { var i = new a(), n = i.createDomElement() return ( this.once( b.OPENED, function () { i.load(t.src) .then( function () { this.div.classList.add('has-embed'), (this.state !== g.OPEN && this.state !== g.ACTIVE) || i.show(), this.applyOrientation(this.orientation), this.on(b.OPENING, i.show.bind(i)), this.on(b.CLOSED, i.hide.bind(i)) }.bind(this) ) .catch(function (e) { p.warn('Failed to embed:', t.src), p.warn('with error:', e) }) .then(this.onMediaLoadFinished.bind(this)) }.bind(this) ), n ) }), (t.prototype.open = function (e) { return ( (this.openPromise = $.Deferred()), this.state === g.ACTIVE ? this.openPromise.resolve().promise() : (this.hovering || this.div.classList.add('has-hotzone'), this.openTransition ? e && this.setActiveState() : (this.openTransition = s.setTimeout( function () { this.state !== g.OPEN && (this.emit(b.OPENING), e && this.emit(b.ACTIVATING), (this.state = g.OPENING), this.animateOpen( function () { e && this.setActiveState(), this.openPromise.resolve() }.bind(this) )) }.bind(this), d.animation.openDelay )), s.cancel(this.closeTransition), this.closePromise && this.closePromise.reject(), (this.closeTransition = void 0), this.openPromise.promise()) ) }), (t.prototype.close = function (e) { return ( (this.closePromise = $.Deferred()), !e && this.hovering ? this.closePromise.reject().promise() : (this.closeTransition || (this.closeTransition = s.setTimeout( function () { this.state !== g.CLOSED && (this.emit(b.CLOSING), (this.state = g.CLOSING), this.animateClose()) }.bind(this), d.animation.closeDelay )), s.cancel(this.openTransition), this.openPromise && this.openPromise.reject(), (this.openTransition = void 0), this.closePromise.resolve(), this.closePromise.promise()) ) }), (t.prototype.setActiveState = function () { this.state !== g.CLOSED && ((this.state = g.ACTIVE), this.emit(b.ACTIVATE), this.div.classList.remove('has-hotzone')) }), (t.prototype.animateOpen = function (e) { if (this.state === g.OPENING) { if ((s.cancel(this.animationTransition), c.detectSamsungNative())) return (this.boardOrientation = null), (this.div.style.visibility = 'visible'), this.emit(b.OPENED), (this.state = g.OPEN), void (e && e()) ;(this.div.style.webkitTransform = 'scale(0)'), (this.div.style.transform = 'scale(0)'), (this.div.style.visibility = 'visible'), (this.animationTransition = s.start( l.property(this, 'animationScale', 1), d.animation.openDuration, function () { this.emit(b.OPENED), (this.state = g.OPEN), e && e() }.bind(this) )) } }), (t.prototype.animateClose = function (e) { this.state === g.CLOSING && (s.cancel(this.animationTransition), (this.animationTransition = s.start( l.property(this, 'animationScale', 0), d.animation.closeDuration, function () { this.emit(b.CLOSED), (this.state = g.CLOSED), (this.div.style.visibility = 'hidden'), this.div.classList.contains('has-hotzone') || this.div.classList.add('has-hotzone'), e && e() }.bind(this) ))) }), (t.prototype.needsUpdate = function () { return this.state !== g.CLOSED }), (t.prototype.update = function (e, t) { if (this.needsUpdate()) { var i = (this.updateOrientation(e), this.calcScale(t)), n = { x: ((e.x + 1) * $('#player').width()) / 2, y: ((e.y + 1) * $('#player').height()) / 2 } ;(this.div.screenTransform = this.initialTransform + ' translate(' + n.x + 'px, ' + n.y + 'px) scale(' + i * this.animationScale + ')'), (this.div.style.webkitTransform = this.div.screenTransform), (this.div.style.transform = this.div.screenTransform) } }), (t.prototype.getDimensions = function () { return this.div.getBoundingClientRect() }), (t.prototype.calcScale = function (e) { return Math.sqrt(e / 40) * d.boardToDiscRatio }), (t.prototype.updateOrientation = function (e) { if (this.state !== g.ACTIVE) { var t = e.y < -1 / 3 ? 0 : e.y < 1 / 3 ? 1 : 2, i = e.x < -1 / 3 ? 0 : e.x < 1 / 3 ? 1 : 2, n = '' ;(n += 0 == i ? 'right' : 2 == i ? 'left' : ''), (n += 0 == t ? '-down' : 2 == t ? '-up' : ''), 1 == i && ((n = 0 == t ? 'bottom' : 2 == t ? 'top' : ''), 1 == t && (n = $('#player').width() > $('#player').height() ? (e.x < 0 ? 'right' : 'left') : e.y < 0 ? 'bottom' : 'top')), (1 == i && 1 == t && n === this.orientation) || this.applyOrientation(n) } }), (t.prototype.applyOrientation = function (e) { ;(this.div.style.transform = this.div.style.webkitTransform = ''), this.div.classList.remove('tag-container-' + this.orientation), this.div.classList.add('tag-container-' + e) var t = window.getComputedStyle(this.div) ;(this.initialTransform = t.transform || t.webkitTransform), 'none' === this.initialTransform && (this.initialTransform = '') var i = t.transform.slice(7, -1).split(','), n = -i[4], r = -i[5] ;(this.div.style.webkitTransformOrigin = n + 'px ' + r + 'px'), (this.div.style.transformOrigin = n + 'px ' + r + 'px'), (this.orientation = e) }), (v.exports = t) }).call(this, '/js/tag/Billboard/Billboard.js') }, { '../../util/browser': 182, '../../util/lerp': 188, '../../util/logger': 189, '../../util/transitions': 195, '../Media/EmbedlyEmbed': 125, '../Media/EmbedlyPlayer': 126, '../Media/Image': 128, '../Media/Link': 129, '../Media/MediaEvent': 131, '../Parser/DescriptionChunkType': 133, '../Parser/DescriptionParser': 134, './BillboardEvent': 120, './billboardSettings': 121, './overlaySettings': 122, events: 202 } ], 120: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ ENTER: 'billboard.enter', LEAVE: 'billboard.leave', OPENING: 'billboard.opening', OPENED: 'billboard.open', CLOSING: 'billboard.closing', CLOSED: 'billboard.closed', ACTIVATING: 'billboard.activating', ACTIVATE: 'billboard.activate' }) }, {} ], 121: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ animation: Object.freeze({ hoverOnClosing: !1, openDelay: 100, closeDelay: 50, openDuration: 200, closeDuration: 100 }), boardToDiscRatio: 1.2 }) }, {} ], 122: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ boundaryWidth: 30, boundaryHeight: 0 }) }, {} ], 123: [ function (M, R, e) { ;(function (e) { 'use strict' function d(e, t, i) { var n = i.version || '0' '0' !== n && w.info('tag defined using version ' + n), (this.model = e), (this.sid = t), (this.color = new f.Color().set(i.color || o.tagDefault)), (this.hoverColor = o._darken(this.color, 0.2)), (this.floor = null), (this.floorIndex = i.floor), (this.mode = m.PANORAMA), i.preferred_camera && i.preferred_camera.mode && (this.mode = i.preferred_camera.mode), (this.obj3d = null), (this.disc = null), (this.materials = { disc: null, pole: null }), (this.position = new f.Vector3().copy(i.position)), (this.discPosition = new f.Vector3().copy(i.stem.direction)), (this.discWorldPosition = null), (this.discScale = 0.05), (this.poleEnabled = i.stem.enabled), (this.billboard = new r(i.label, i.description, i.media, this)), (this.visibleTransition = null), (this.hoveringDisc = !1) } var i, l, c, h, u, p, n, f = M('three'), r = M('./Billboard/Billboard'), g = M('../settings'), m = M('../enum/Viewmode'), o = M('../enum/Colors'), a = M('../enum/RenderLayers'), s = M('../enum/RenderOrder'), v = (M('../util/common'), M('../util/math')), t = M('../util/texture'), y = M('../objects/Panorama'), A = M('../shaders'), C = M('../util/transitions'), I = M('../util/lerp'), E = M('../util/easing'), _ = M('./Billboard/BillboardEvent'), b = M('events').EventEmitter, w = new (M('../util/logger'))(e), T = t.loadBase64( 'iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QYPFigDGhCnowAABQFJREFUeNrtXTtyFEEMHXX5FK7iAiYFQ+KAiMyZCQnxRXwVFwkngSKD2BQXEYlNLXaZnZ7RX0/xbrek96RW9/RnWSCthSoaxcys4iwiAgGagN2FFATQe5OBAHpvMhBA700GAvC9iUBVgZd2dmTd9siIAvxOB9/RI9GI3kftf3a0t0YG2OOEaOk0qy2UyWFZKutMthGc09tWiuyQKkuvke2miE6ouOYe1QcE4HsTgSIY2gX4iP4ZHcFn5kt+KpfmFfhK2zXXDMgR/FdE9D3ivNyaqMz8YlmW3x46kIfjNQyxXlnzskG6X8psQJjlVGObJPtLqXj1DSGWvhyZFI70EUVTv3tf3VkEAWmDLwV8xmmehe17+6DIymFHkL6fKaJS2BFk5+8RzUlVwY9qG0ViY2XwLfyzpV2KoEQX4C18NdsmAfzeJBiRDekg3ruGhpCi7wC+eXH4XqI9kc+Rs4wE+DZ+XNPeiKY0MoHtUHCyU6nTLOBnISoz84yuRETP6bqmLdrjiMhOjXw0zJKsx9oaxcC/1j4atizLdaah4GidYEEAbfC9NpVGsmsrVgTwe5PgZEkqUbaSP+iRds9CxuiPeo4ggr2z2A1Efg/dNs0CokV/Bgd7b3mf7X9EWQCpFF2ZhqiZDHDqFf0p79/zXYhajRWt7cgr/Wc/OOrli7U4DmllAb6eDRr4jKhAVDoyHtl/otNAfOrNt9YwIoJX8lr2QDYdYh1xIehN4QB+G46YUtW/2GHF4tfFWPvpGK7RMsCvBsP4F2SAptHv4atVGQDVe9/ZxLEh4AOiP+aMYMLnH48OAUj/fYeBsUBaCwgAAtQYEzvWAcgAEBAA4kwArCHknkkgAyADQEAACAgAAQEgIMC8dH3vJ4JI+B4ZABkAAgI4S8fFpCg2IwMgA0BAgOfT1BVclH6o+S+GR++3wbawmOO/BC5/t4RhLt93DWFUiwxU/ygCIZIEsH4FnJk/FY5+Edsk6zJa82McEI2V/qUKwH8yQNTz6wBfrwAUrwEwm7AFz6wI9GBvpSwQ2X9Dml3RbsWqBL4GPjOvhp2hHsihOzO/1FgH+Dnx2/PuJFDQecanP1ZnhBnlcVl0Dttn8Btahnnfmg3w5YcAzKcLDlVp3wyKNhxkfC1kWRK/GfRgbPVHo7RlbGGedy3wWBdmvnEA/qb0s3GSw4BlpFgQLqIdKgTISgINIrR8OnZFxxeRa4RDsf6/oZ27MCBthlUrmipFv8g6gMeb9wBfLphEnoxh5luQwBz8W4n2TNMNhgMb3820J7YUvAVMZAL/wBHvHJnAF/zZNkkj2rdGdhciaPlnS7ubUzBIkB980RpAaoGicl2wA3y1U9q0E2TWBLNKNtD2w572h6Zh96uoF3vaz5wR9urPzBfaQSZ1no8NouD1sixfk2B/TkTfovtUjACWCkceGiztk+rL/JNpxYMj1jZJ9ueyc7fCjmEvG1zOBko75r44vJXu91C0CjqN9pn51itw1Cps64slJHSLpIuVbmoLQTOXGFjvLKJnxBj4iwhBQlEY7hWBHhLJJ9TRaADvQIAtlXoVIkS2m6I7IzMRMthqfjh0S8F1sDv7LAHoZ1u2knt990h7rq7S4VBPWyi787ycWOVy7DCvh0t8M38kV4JgX0meFIr0mTtkcVV1W1jEYjZ0dY0dQc0JkJkMWaaubebXAL0QASKRIftqJa5lbwQ2BPJE/gA4gL5xbiNHuQAAAABJRU5ErkJggg==' ), x = t.loadBase64( 'iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QYPFgoIKnA4CwAAAkVJREFUeNrt3Uluw0AMRFHTvv+NrSibBAgyILGjodn16gbS/yxyYUOXi0SnZnyodV3XXV5WVREgBHaKFAV6tgwFerYMBXq2DAV8tggFfLYIBXy2CAV8tggFfrYEBXy2CAV+tgQFfrYEBXy2CAV+tgQFfrYEBX62BAV+tgQFfrYEBX62BAV+tgQFfrYEBX62BAV+tgRXry5cHNOf3QIFfrYEBX62BG4AN4DpT26BAj9bAivACjD9yS2gATSA6U9uAQ2gAUx/cgtoAA1g+pNbQAOEhwBWgPpPXgMawAoQK0D9x64BDWAFiBWg/mPXgAawAoQAQgAJPgIdgLmHoAawAoQAQgAhgBBACCAEEAIIAYQAQgAhgBBACCAEEAIIAYQAQgAhgEwQfw1LBe+vYUIAIQAB3rIsy4vXEXwEOgTzDkArQAhgBXyKNZBT/xpACGAFfBNrIKP+NYAQwAr4IdbA/PWvAcR3A5OnXwOIbwcnT78GkN8bQAvMO/1/bgA/FglvAC0w5/Q/JAAJ5oPvCJTHGkALzDX9TwlAgnngPy0ACeaA7waQ5xtAC/Sf/n8LQILe8DcRgAR94W8mAAl6wt9UABL0g7+5ACToBX8XAUjQB/5uApCgB/xdBSDB+PB3F4AEY8M/RAAijAn+cAFIMB78wwUgwVjwTxGACGOAf8/1zAf2a+Nz4Z/aANrgXPBDCZAmwgjghxRgdhFGAj+0ALOJMCL4FgJ0lmFk6C0F6CBDF+jtBfiY+/2+3G63K+ihAhzZEN1hi3zJK04kLKvtOfg1AAAAAElFTkSuQmCC' ), S = new f.PlaneBufferGeometry(1, 1) ;(d.prototype = Object.create(b.prototype)), (d.raycaster = new f.Raycaster()), (d.prototype.bindEvents = function () { this.billboard.on(_.ENTER, this.setHoverState.bind(this)), this.billboard.on(_.LEAVE, this.setFreeState.bind(this)) }), (d.prototype.build = function () { return ( (this.floor = this.model.floors.get(this.floorIndex) || this.model.floors.first()), this.floor && (this.billboard.build(this.model.sid), (this.obj3d = this.buildObject3D()), this.floor.add(this.obj3d)), this ) }), (d.prototype.buildObject3D = function () { var e = new f.Object3D() e.position.copy(this.position) var t = f.UniformsUtils.clone(A.tagDisc.uniforms) ;(t.bg.value = x), (t.mask.value = T), t.color.value.copy(this.color), (this.materials.disc = new f.RawShaderMaterial({ transparent: !0, vertexShader: A.tagDisc.vertexShader, fragmentShader: A.tagDisc.fragmentShader, uniforms: t })), (this.disc = new f.Mesh(S, this.materials.disc)), this.disc.layers.set(a.TAG), this.disc.position.copy(this.discPosition), (this.disc.renderOrder = s.tagDisc) var i = (this.disc.tag = this).buildPole() return i.layers.set(a.TAG), (i.renderOrder = s.tagStem), e.add(i), e.layers.set(a.TAG), e.add(this.disc) }), (d.prototype.buildPole = function () { var e = new f.BufferGeometry(), t = new Float32Array(6) return ( (t[0] = t[1] = t[2] = 0), (t[3] = this.discPosition.x), (t[4] = this.discPosition.y), (t[5] = this.discPosition.z), e.addAttribute('position', new f.BufferAttribute(t, 3)), (this.materials.pole = new f.LineBasicMaterial({ linewidth: g.tags.pole.width, color: g.tags.pole.color, opacity: 0, visible: this.poleEnabled, transparent: !0, depthWrite: !1 })), new f.Line(e, this.materials.pole) ) }), (d.prototype.setFreeState = function (e) { ;(!e && this.hoveringDisc) || this.billboard.close(e).then( function () { this.materials.disc.uniforms.color.value = this.color }.bind(this) ) }), (d.prototype.setHoverState = function (e) { this.billboard.open(e), (this.materials.disc.uniforms.color.value = this.hoverColor) }), (d.prototype.hide = function (e, t) { var i = $.Deferred() if (0 === this.materials.disc.uniforms.opacity.value && !C.isRunning(this.visibleTransition)) return i.resolve().promise() ;(e = e || 0), (t = t || 0), C.cancel(this.visibleTransition) var n, r, o, a = this.materials.disc.uniforms.opacity.value / g.tags.disc.opacity, s = t + e, l = t / s return ( (this.visibleTransition = C.start( ((n = this), (r = I.property(n.materials.disc.uniforms.opacity, 'value', 0)), (o = I.property(n.materials.pole, 'opacity', 0)), function (e) { r(e), n.materials.pole && o(e) }), s * a, function () { i.resolve() }, l, E[g.warp.blendEasing] )), i.promise() ) }), (d.prototype.show = function (e, t) { var i = $.Deferred() if (this.materials.disc.uniforms.opacity.value === g.tags.disc.opacity && !C.isRunning(this.visibleTransition)) return i.resolve().promise() ;(e = e || 0), (t = t || 0), C.cancel(this.visibleTransition) var n, r, o, a = (g.tags.disc.opacity - this.materials.disc.uniforms.opacity.value) / g.tags.disc.opacity, s = t + e, l = t / s return ( (this.visibleTransition = C.start( ((n = this), (r = I.property(n.materials.disc.uniforms.opacity, 'value', g.tags.disc.opacity)), (o = I.property(n.materials.pole, 'opacity', g.tags.pole.opacity)), function (e) { r(e), n.materials.pole && o(e) }), s * a, function () { i.resolve() }, l, E[g.warp.blendEasing] )), i.promise() ) }), (d.prototype.closestPanoTowardTag = function (e, t) { var i = [], n = [], r = this.disc.getWorldPosition() if (e === m.PANORAMA) { var o = t.position.clone().sub(r).normalize() i.push(y.filters.isPanoAligned()), i.push(y.filters.isNeighbourPanoTo(t)), i.push(y.filters.inPanoDirection(r, o, 0.5)), n.push(y.scoreFunctions.direction(r, o)) } var a = new f.Vector3() i.push( function (e) { return Math.abs(e.position.x - r.x) > g.tags.visibility.cameraClearance || Math.abs(e.position.z - r.z) > g.tags.visibility.cameraClearance }, function (e) { a.copy(r).sub(e.position) var t = -f.Math.radToDeg(Math.atan(a.y / Math.sqrt(a.x * a.x + a.z * a.z))), i = g.tags.navigate.tiltTolerance return g.insideLookLimitDown - i < t && t < g.insideLookLimitUp + i } ), n.push(y.scoreFunctions.distanceSquared(this, -2)) var s = this.model.panos.sortByScore(i, n) if (g.tags.navigate.lineOfSight) { for (var l = 0; l < s.length; l++) { var c = s[l].item, h = c.position.distanceTo(r) if (!g.tags.visibility.anyDistance && h > g.tags.visibility.visibleDistance) return null d.raycaster.set(c.position, r.clone().sub(c.position).normalize()) var u = d.raycaster.intersectObjects(this.model.colliders) if (0 === u.length || u[0].distance > h) return c } return null } return 0 < s.length && s[0].pano }), (d.prototype.examine = function (i) { if (!player.currentPano) return var e = i.mode, n = (g.tags.navigate.nearestPano && this.closestPanoTowardTag(e, i.currentPano)) || i.currentPano, t = this.disc.getWorldPosition() this.billboard.setActiveState() var r = function () { var e = this.billboard.getDimensions(), t = new f.Vector3() v.convertScreenPositionToNDC(e.left + e.width / 2, e.top + e.height / 2, t), t.unproject(i.camera), i.flyToPano({ pano: n, lookAtPoint: t }) }.bind(this) if (e === m.PANORAMA) if (n !== i.currentPano) { var o = { pano: n, lookAtPoint: t, duration: null, maxDistanceOverride: null, skipWarpingCheck: !1 } i.flyToPano(o, r) } else setTimeout( function () { this.billboard.open().then(function () { r() }) }.bind(this), 0 ) else { var a = { pano: n } if (t) { var s = new f.Matrix4().lookAt(n.position, t, new f.Vector3(0, 1, 0)) a.quaternion = new f.Quaternion().setFromRotationMatrix(s) } ;(a.callback = r), (a.duration = 1500), (a.mode = m.PANORAMA), i.flyToNewMode(a) } }), (d.prototype.update = ((n = new f.Vector3()), function (e, t) { ;(this.discWorldPosition = this.disc.getWorldPosition()), this.updateDisc(e, t), this.billboard.needsUpdate() && (n.copy(this.discWorldPosition).project(t), n.z < 1 && ((n.y *= -1), this.billboard.update(n, this.getDiscRadius(n, t)))) })), (d.prototype.updateDisc = ((l = new f.Vector3()), (c = new f.Vector3()), (h = new f.Vector3()), (u = new f.Vector3()), (p = new f.Vector3()), function (e, t) { var i = g.tags.visibility, n = g.tags.disc.scale, r = e === m.DOLLHOUSE || e === m.FLOORPLAN ? g.tags.visibility.visibleDistance : t.position.distanceTo(this.discWorldPosition) if ( ((this.obj3d.visible = 0 !== this.disc.material.opacity && (i.anyDistance || r <= i.visibleDistance || e === m.TRANSITIONING) && (!i.hideViaFloor || this.tagVisibleOnCurrentFloor(e)) && (!i.hideOffScreenDisc || !this.offScreen(this.disc, t)) && (!i.hideOffScreenObject || !this.offScreen(this.obj3d, t))), this.obj3d.visible) ) { this.disc.quaternion.copy(t.quaternion) var o = n.maxSize - (n.maxSize - n.minSize) * f.Math.smoothstep(r, n.nearBound, n.farBound) l.copy(this.discWorldPosition).project(t), c.set($('#player').width() / 2, $('#player').height() / 2, 1).multiply(l), h.set(o / 2, 0, 0).add(c), u.set(2 / $('#player').width(), 2 / $('#player').height(), 1).multiply(h), p.copy(u).unproject(t) var a = p.distanceTo(this.discWorldPosition), s = 1 + (g.tags.disc.scale.responsiveness / 100) * (d.viewportScale() - 1) ;(this.discScale = a * s), this.disc.scale.set(this.discScale, this.discScale, this.discScale) } })), (d.prototype.getDiscRadius = ((i = new f.Vector3()), function (e, t) { return ( i .set(-this.discScale / 2, 0, 0) .applyQuaternion(t.quaternion) .add(this.discWorldPosition) .project(t), Math.abs(e.x - i.x) * $('#player').width() ) })), (d.prototype.tagVisibleOnCurrentFloor = function (e) { return !(e === m.DOLLHOUSE || e === m.FLOORPLAN) || this.model.allFloorsVisible || !this.floor.hidden }), (d.prototype.offScreen = function (e, t) { var i = e.getWorldPosition().project(t) return !(-1 < i.x && i.x < 1 && -1 < i.y && i.y < 1) }), (d.viewportScale = function () { return ( (d.viewportWidth === $('#player').width() && d.viewportHeight === $('#player').height()) || ((d.viewportWidth = $('#player').width()), (d.viewportHeight = $('#player').height()), (d.currentViewportScale = Math.sqrt(Math.min(d.viewportWidth, d.viewportHeight) / g.tags.disc.scale.baseViewportSize))), d.currentViewportScale ) }), (R.exports = d) }).call(this, '/js/tag/tag.js') }, { '../enum/Colors': 19, '../enum/RenderLayers': 41, '../enum/RenderOrder': 42, '../enum/Viewmode': 51, '../objects/Panorama': 148, '../settings': 166, '../shaders': 167, '../util/common': 185, '../util/easing': 186, '../util/lerp': 188, '../util/logger': 189, '../util/math': 190, '../util/texture': 194, '../util/transitions': 195, './Billboard/Billboard': 119, './Billboard/BillboardEvent': 120, events: 202, three: 217 } ], 124: [ function (M, R, e) { ;(function (e) { 'use strict' function t() { ;(this.tagState = T.IDLE), (this.intersectTag = null), (this.hoveredTag = null), (this.activeTag = null), (this.tagDiscs = []), (this.raycaster = new i.Raycaster()), (this.modelManager = null), (this.player = null), (this.totaltags = 0), (this.navigatingViaTag = !1), (this.enabled = !1) } var o, h, u, d, p, f, s, l, c, i = M('three'), n = M('../util/logger'), r = M('../util/common'), a = M('../controls/serializer'), g = M('../objects/Snapshot'), m = M('../settings'), v = M('./Billboard/BillboardEvent'), y = M('./Media/MediaEvent'), A = M('./Media/LinkType'), C = M('../enum/Viewmode'), I = M('../enum/WarpStyle'), E = M('../enum/BlackoutStyle'), _ = M('../enum/ModelManagerEvents'), b = M('../enum/tagEvents'), w = M('../enum/PlayerEvents'), T = (M('../util/lerp'), M('../enum/TagStates')), x = M('events').EventEmitter, S = new n(e) r.extend(t, x), (t.prototype.init = function (e, t) { ;(this.modelManager = e), (this.player = t), this.updateModel(), this.bindEvents() }), (t.prototype.update = function (e) { this.updateTags(this.player.mode, this.player.camera, this.player.currentPano, this.player.flying) }), (t.prototype.updateTags = function (e, t, i, n) { for (var r in this.model.tags) this.model.tags[r].update(e, t, i, n) }), (t.prototype.updateModel = function () { ;(this.model = this.modelManager.getActiveModel()), this.gettagsFromModel(), (this.totaltags = Object.keys(this.model.tags).length) }), (t.prototype.gettagsFromModel = function () { for (var e in ((this.tagDiscs = []), this.model.tags)) { var t = this.model.tags[e].disc t && this.tagDiscs.push(t) } }), (t.prototype.bindEvents = function () { function e() { Object.keys(this.model.tags).forEach( function (e) { var t = this.model.tags[e] t.bindEvents(), t.billboard.on( y.LINK_CLICK, function (e) { e.type === A.NAVIGATION && this.navigateViaLink(e.url) }.bind(this) ), t.billboard.on( y.IMAGE_OPENED, function () { ;(this.tagState = T.EXAMINE), this.emit(y.IMAGE_OPENED) }.bind(this) ), t.billboard.on(v.CLOSING, this.dismissExaminedTag.bind(this)) }.bind(this) ) } this.modelManager.on(_.ActiveModelChanged, this.updateModel.bind(this)), this.modelManager.on(_.ActiveModelChanged, e.bind(this)), this.player.on(w.ModeChanging, this.onPlayerModeChanging.bind(this)), this.player.on(w.PanoChosen, this.onPanoChange.bind(this)), this.player.on(w.Ready, this.onPlayerReady.bind(this)), this.player.on(w.FlyingEnded, this.onPlayerFlyingEnded.bind(this)), this.player.on(w.WarpStarted, this.handleWarpStart.bind(this)), this.player.on(w.WarpInterrupted, this.handleWarpInterruption.bind(this)), e.call(this) }), (t.prototype.navigateViaLink = function (e) { var t = a.deserialize(e) if (t) if (t.mode === C.PANORAMA) { try { this.player.model.panos.get(t.panoId) } catch (e) { return void S.warn('Unable to find panorama location', t.panoId) } this.player.warpToPanoById(t.panoId, t.quaternion, null, null, I.BLACK) } else { var i = { cameraMode: t.mode, position: t.position, quaternion: t.quaternion, scanId: t.panoId, orthoZoom: t.zoom, floorVisibility: t.floorVisibility, thumbUrl: null, name: null } this.player.flyToNewMode({ mode: t.mode, duration: m.warp.outsideTime, warpDest: new g(i), force: !0 }) } }), (t.prototype.handleWarpStart = function (e, t, i, n) { this.dismissExaminedTag(), t === I.BLACK && (null != n || (n = m.warp.teleportTime), e && (i = E.END), this.hideShowTagsForBlackoutStyle(i, n)) }), (t.prototype.handleWarpInterruption = function (e, t, i) { null != i || (i = m.warp.teleportTime), this.hideShowTagsForBlackoutStyle(t, i) }), (t.prototype.hideShowTagsForBlackoutStyle = function (e, t) { var i = 0, n = 0, r = t / 2 switch ((null != e || (e = E.MIDDLE), e)) { case E.END: this.hideAlltags(r) break case E.BEGINNING: this.hideAlltags().done(this.showAlltags.bind(this, r)) break case E.NONE: break case E.MIDDLE: ;(n = i = r), this.hideAlltags(n), setTimeout( function () { this.showAlltags(i) }.bind(this), n ) break case E.FADEIN: setTimeout( function () { this.showAlltags(r) }.bind(this), r ) } }), (t.prototype.onPlayerModeChanging = function (e, t) { t !== C.PANORAMA && this.dismissExaminedTag(), t === C.PANORAMA && player.currentPano && !player.currentPano.isAligned() && (t = C.OUTDOOR) var i = t !== C.OUTDOOR i !== this.model.tagsShown && (i ? this.showAlltags(m.tags.startup.fadeInDuration) : this.hideAlltags(m.tags.startup.fadeInDuration)) }), (t.prototype.onPanoChange = function (e, t) { var i = this.navigatingViaTag if (((this.navigatingViaTag = !1), !i)) { this.dismissExaminedTag() var n = e && !e.isAligned() ? C.OUTDOOR : C.PANORAMA, r = t && !t.isAligned() ? C.OUTDOOR : C.PANORAMA n !== r && (r === C.PANORAMA ? this.showAlltags(m.tags.startup.fadeInDuration, null, !0) : this.hideAlltags(m.tags.startup.fadeInDuration)) } }), (t.prototype.onPlayerReady = function (e, t, i) { this.startAlltags(e, t ? i : null) }), (t.prototype.onPlayerFlyingEnded = function (e, t) { this.updateClosestTags(e) }), (t.prototype.dismissExaminedTag = function () { this.activeTag && this.tagState === T.EXAMINE && this.dismissActiveTag(), this.hoveredTag && (this.hoveredTag.setFreeState(!0), (this.hoveredTag = null)) }), (t.prototype.startAlltags = function (e, t) { ;(this.model.shouldShowtags = m.tags.enabled), (this.enabled = !0), e || (this.showAlltags(m.tags.startup.fadeInDuration, m.tags.startup.fadeInDelay), t && setTimeout( function () { this.activateTag(this.model.getTagBySid(t)) }.bind(this), m.tags.startup.fadeInDuration / 2 )) }), (t.prototype.showAlltags = function (e, t, i) { function n() { ++o === this.totaltags && ((this.model.tagsShown = !0), r.resolve()) } var r = $.Deferred() if ((!i && this.player.mode === C.PANORAMA && this.player.currentPano && !this.player.currentPano.isAligned()) || !this.model.shouldShowtags) return r.resolve().promise() var o = 0 for (var a in this.model.tags) { this.model.tags[a].show(e, t).done(n.bind(this)) } return r.promise() }), (t.prototype.hideAlltags = function (e, t) { function i() { ++r === this.totaltags && ((this.model.tagsShown = !1), n.resolve()) } var n = $.Deferred(), r = 0 for (var o in this.model.tags) { var a = this.model.tags[o] a.hide(e, t).done(i.bind(this)), a === this.activeTag && this.dismissActiveTag() } return n.promise() }), (t.prototype.enableHovering = function () { this.enabled = !0 }), (t.prototype.disableHovering = function () { this.enabled = !1 }), (t.prototype.activateTag = function (e, t) { ;(t = t || T.EXAMINE), (this.activeTag = e), (this.activeTag.hoveringDisc = !0), this.activeTag.setHoverState(t === T.EXAMINE), (this.tagState = t), this.emit(b.TagActivated, e) }), (t.prototype.dismissActiveTag = function () { ;(this.activeTag.hoveringDisc = !1), this.activeTag.setFreeState(!0) var e = this.activeTag ;(this.activeTag = null), (this.tagState = T.IDLE), this.emit(b.TagDismissed, e) }), (t.prototype.clickedOnTag = function (e) { var t = function () { ;(this.navigatingViaTag = !0), this.activeTag.examine(this.player), this.emit(b.TagNavigation, this.activeTag) }.bind(this) return this.tagState !== T.EXAMINE ? (this.activateTag(this.intersectTag, T.EXAMINE), (this.activeTag = this.intersectTag), t(), !0) : (this.dismissActiveTag(), !1) }), (t.prototype.intersecttag = ((s = new i.Vector3()), (l = new i.Vector3()), (c = new i.Vector3()), function (e, t, i) { if (!this.enabled) return null var n = null, r = this.tagDiscs.filter(function (e) { return e.parent.visible }) if (0 < r.length) { var o = this.model.floors.reduce(function (e, t) { return t.hidden ? e : e.concat(t.collider.children) }, r) s.set(e.x, e.y, -1).unproject(i), l.set(e.x, e.y, 1).unproject(i), c.copy(l).sub(s).normalize(), this.raycaster.set(s, c) var a = this.raycaster.intersectObjects(o) 0 < a.length && -1 !== r.indexOf(a[0].object) && (n = a[0].object.tag) } return ( (this.intersectTag = n), t && (this.activeTag && n !== this.activeTag && (this.tagState === T.BROWSE || (this.tagState === T.EXAMINE && n)) && this.dismissActiveTag(), n && n !== this.activeTag && (n.listeners(v.ENTER).length < 1 && (n.billboard.on( v.ENTER, function () { this.hoveredTag = n }.bind(this) ), n.billboard.on( v.LEAVE, function () { this.hoveredTag = null }.bind(this) )), this.activateTag(n, T.BROWSE))), n ) })), (t.prototype.rankedtagInDirection = ((h = []), (u = []), (d = new i.Vector3()), (p = new i.Vector3()), (f = new i.Vector3()), function (e, t, i, n) { for (var r = 0, o = (u.length = 0); o < this.closesttags.length; o++) { var a = this.closesttags[o] p.copy(a.position), p.add(a.discPosition), d.copy(t), d.sub(p).negate(), d.normalize() var s = d.dot(n) if (0 <= s && (f.copy(p), f.project(i), this.intersecttag(f, !1, i))) { if (r >= h.length) for (var l = 0; l < 64; l++) h.push({ tag: a, dot: s }) var c = h[r] ;(c.tag = a), (c.dot = s), (c.position = math.projectPositionToCanvas(p, i)), u.push(c), r++ } } return ( u.sort(function (e, t) { return e.dot > t.dot ? -1 : e.dot < t.dot ? 1 : 0 }), e < u.length ? u[e].tag : null ) })), (t.prototype.updateClosestTags = ((o = new i.Vector3()), function (e) { this.closesttags || (this.closesttags = []), (this.closesttags.length = 0) var t = this.model.tags if (t) for (var i in t) if (t.hasOwnProperty(i)) { var n = t[i], r = n.position o.copy(e), o.sub(r).negate(), o.lengthSq() < 30 && this.closesttags.push(n) } })), (R.exports = t) }).call(this, '/js/tag/tagManager.js') }, { '../controls/serializer': 14, '../enum/BlackoutStyle': 18, '../enum/tagEvents': 32, '../enum/ModelManagerEvents': 33, '../enum/PlayerEvents': 40, '../enum/TagStates': 44, '../enum/Viewmode': 51, '../enum/WarpStyle': 52, '../objects/Snapshot': 153, '../settings': 166, '../util/common': 185, '../util/lerp': 188, '../util/logger': 189, './Billboard/BillboardEvent': 120, './Media/LinkType': 130, './Media/MediaEvent': 131, events: 202, three: 217 } ], 125: [ function (r, o, e) { ;(function (e) { 'use strict' function t() { ;(this.embedWrapper = null), (this.embedElement = null) } var i = r('../../util/ajax'), a = r('./mediaSettings'), n = r('../../settings'), s = new (r('../../util/logger'))(e) ;(t.prototype.createDomElement = function () { return (this.embedWrapper = document.createElement('div')), this.embedWrapper.classList.add('tag-embed'), this.embedWrapper.classList.add('hidden'), this.embedWrapper }), (t.prototype.load = function (e) { var t = 'https://api.embedly.com/1/oembed?key=' + n.appConfig.embedly_key + '&url=' + encodeURIComponent(e) + '&maxwidth=' + a.maxEmbedWidth return new Promise( function (r, o) { i.get(t).then( function (e) { if ((e = JSON.parse(e)).html && -1 === e.html.indexOf(' { var r = n.thumbnail_signed_src, o = n.name || '' if (n.metadata && void 0 !== n.metadata.camera_quaternion) { if (!u.show360Views.enabled && n.metadata.scan_id) { var a = panos.get(n.metadata.scan_id) if (a && !a.isAligned()) return } var s = d.convertWorkshopModeInt(n.metadata.camera_mode) if (s === d.MESH) return if (window.isLocal) var src = manage.dealURL(r) else var src = 'one' === g_version ? g_Prefix + r + '?' + randomTime().getTime() : r + '?' + randomTime().getTime() var l = { cameraMode: s, position: n.metadata.camera_position, quaternion: n.metadata.camera_quaternion, zoom: n.metadata.zoom, panoId: n.metadata.scan_id, orthoZoom: n.metadata.ortho_zoom, floorVisibility: void 0 !== n.metadata.floor_visibility ? n.metadata.floor_visibility.slice(0) : [], thumbUrl: src, name: h.filterImageName(o), sid: n.sid } var item = new p(l) item.momentTour = n.momentTour item.dontRot = n.dontRot item.rotTime = n.rotTime container.push(item) return item } } this.list.forEach(image => { if (image.images) { var folder = $.extend({}, image) folder.heroLocations = [] image.images.list.forEach(child => { deal(child, folder.heroLocations) }) folder.musicInfo = folder.musicInfo || {} locations.push(folder) delete folder.images delete folder.locations } else { var item = deal(image, locations) item.musicInfo = image.musicInfo || g_data2.tourAudio[item.sid] || {} //新的music数据统一写在每个info下,如果有musicInfo则覆盖g_data2.tourAudio } }) return locations }), (h.prototype.getIndex = function (e) { return e.sid }), (h.filterImageName = function (e) { return '' === e || e.match(/^[0-9.]+_[0-9.]+$/) ? null : e }), (o.exports = h) }).call(this, '/js/model/ImageCollection.js') }, { '../enum/Viewmode': 51, '../objects/Snapshot': 153, '../settings': 166, '../util/IndexedCollection': 175, '../util/common': 185, '../util/logger': 189, '../util/math': 190 } ], 138: [ function (h, u, e) { ;(function (e) { 'use strict' function n() { c.call(this) } var r = h('../label/Label'), i = h('../settings'), t = h('../util/logger'), o = h('../util/math'), a = h('../util/ajax'), s = h('./RoomCollection'), l = h('../util/common'), c = h('../util/IndexedCollection') new t(e), l.inherit(n, c), (n.prototype.getIndex = function (e) { return e.labelId }), (n.prototype.associateWithRooms = function (e) { this.forEach(function (t) { e.forEach(function (e) { e.roomId === t.roomId && (t.room = e) }) }) }), (n.prototype.createFromLabelData = function (e) { e.forEach( function (e) { var t = n.parseRoomIndexFromWorkshopRoomId(e.roomId) t = s.generateRoomId(e.floorId, t) var i = new r(e.sid, e.position || e.positions[0], e.text, e.floorId, t) ;(i.position = o.convertWorkshopVector(i.position)), this.add(i), i.build() }.bind(this) ) }), (n.prototype.load = function (e, t) { return a .get(e, { responseType: 'json', auth: t ? i.authorizationHeader : null }) .done( function (e) { var t = [] for (var i in e) { var n = e[i] t.push(n) } this.createFromLabelData(t) }.bind(this) ) }), (n.parseRoomIndexFromWorkshopRoomId = function (e) { var t = -1 if (e) { if (typeof e == 'number') { t = parseInt(e) } else { var i = e.split('_') t = parseInt(i[0]) } } return t }), (u.exports = n) }).call(this, '/js/model/LabelCollection.js') }, { '../label/Label': 90, '../settings': 166, '../util/IndexedCollection': 175, '../util/ajax': 181, '../util/common': 185, '../util/logger': 189, '../util/math': 190, './RoomCollection': 141 } ], 139: [ function (P, O, e) { ;(function (e) { 'use strict' function t(e, t) { o.Object3D.call(this), (this.sid = window.number) //t.sid, ;(this.data = t), (this.options = e), (this.urls = new i(e.urlFiles)), (this.isPublic = void 0 !== t.is_public && t.is_public), //创建heroLocations (this.images = new E(this)), this.images.extend(t.images), this.images.forEach(info => { if (info.locations) { info.images = new E(this) info.images.extend(info.locations) } }) this.heroLocations = [] //this.heroImage = this.images.getImage(t.icon), //初始画面沒有用到icon ;(this.outdoorPanoLocations = []), (this.floors = new c(this)), (this.floorsEnabled = void 0 === e.floors || e.floors), (this.changingFloor = !1), (this.chunks = []), (this.panos = new g()), (this.colliders = []), (this.loadPanosPromise = null), (this.loadMeshTexturesPromise = null), (this.auxDataPromise = null), (this.meshTexturesLoaded = !1), (this.meshTextures = []), (this.tags = {}), (this.tagsShown = !1), (this.shouldShowtags = !1), (this.has360Views = !1), (this.showingLabels = u.labels.enabled && t.player_options.labels), (this.supportedModes = {}), (this.supportedModes[s.PANORAMA] = !0), (this.supportedModes[s.DOLLHOUSE] = !t.player_options || (t.player_options.dollhouse && I.valueFromHash('dh', 1))), (this.supportedModes[s.FLOORPLAN] = !t.player_options || (t.player_options.floor_plan && I.valueFromHash('dh', 1))), (this.supportedModes[s.TRANSITIONING] = !0), (this.supportsTiles = this.configureTiling()), (this.supportsVR = window.DATA.supportsVR || false) //!0, ;(this.mode = s.DOLLHOUSE), (this.size = null), (this.center = null), (this.boundingBox = new o.Box3()), (this.currentFloor = null), (this.allFloorsVisible = !0), (this.projectedPano0 = null), (this.projectedPano1 = null), this.floorsEnabled && t.floors && -1 !== t.floors.indexOf(',') && t.floors.split(',').forEach( function (e, t) { this.addFloor(new r(this, t, e.trim())) }.bind(this) ), (this.waitQueue = []), this.on( 'load', function (e) { 0 !== this.waitQueue.length && ((this.waitQueue = this.waitQueue.filter(function (e) { return !e.isLoadedCallback() })), 0 === this.waitQueue.length && this.emit('waiting-done')) }.bind(this) ), this.setupCustomProperties(), (this.hots = {}) } var o = P('three'), a = P('../util/ajax'), i = P('../util/ModelUrls'), n = P('../objects/BoundingTextureSkybox'), s = P('../enum/Viewmode'), l = P('../enum/RenderOrder'), r = (P('../enum/AlignmentType'), P('../objects/Floor')), c = P('./FloorCollection'), h = P('../objects/Chunk'), u = (P('../objects/Room'), P('../objects/Snapshot'), P('../label/Label'), P('../util/math'), P('../settings')), d = P('../shaders'), p = P('../util/logger'), f = (P('../tag/tag'), P('../tag/tagManager'), P('../objects/Panorama')), g = P('../util/PanoramaCollection'), m = P('../loaders/ModelLoader'), v = P('../loaders/ModelTextureLoader'), y = P('../loaders/SweepDataLoader'), A = P('../util/transitions'), C = (P('../util/easing'), P('../util/lerp'), P('../util/common')), I = (P('../util/texture'), P('./../util/browser')), E = P('./ImageCollection'), _ = P('./RoomCollection'), b = P('./LabelCollection'), w = P('./Chunks'), T = P('./../util/showcase'), x = P('../exception/BasicException'), S = (P('../constants'), P('events').EventEmitter), // , M = P("hot") R = new p(e) ;(t.prototype = Object.create(o.Object3D.prototype)), C.extend(t, S), (t.prototype.setupCustomProperties = function () { var t = u.modelAlpha Object.defineProperty(this, 'alpha', { get: function () { return t }, set: function (e) { ;(t = e), this.chunks.forEach(function (e) { e.material && e.material.uniforms.modelAlpha && (e.material.uniforms.modelAlpha.value = t) }) } }) }), (t.prototype.configureTiling = function () { var e = (function () { try { var e = document.createElement('canvas'), t = e.getContext('webgl') return (t = t || e.getContext('experimental-webgl')).getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE) } catch (e) { return 0 } })() if (e < 2048) return !1 R.warn('Max cube texture size: ' + e) for (var t = 0; t < u.tiling.tilingFlagNames.length; t++) { var i = u.tiling.tilingFlagNames[t] if ('1' === I.valueFromHash(i, null)) return !0 if ('0' === I.valueFromHash(i, null)) return !1 } return !!T.modelDataPromisesTiles(this.data) }), (t.prototype.toggleAlpha = function () { this.alpha < 1 ? (this.alpha = 1) : (this.alpha = 0) }), (t.prototype.load = function (e) { var t = this.urls.init().then( function () { return $.when(this.loadPanos(), this.loadMesh()) }.bind(this) ) return ( e ? (t = t.then(this.loadMeshTextures.bind(this))) : t.then(this.loadMeshTextures.bind(this)), (this.auxDataPromise = $.when(this.loadhots(), this.loadLabels())), $.when(t, this.auxDataPromise).done(this.build.bind(this)) ) }), (t.prototype.loadMesh = function () { var n = $.Deferred(), r = this return ( m.load( r.data.job.uuid, r.urls, function (e, t) { if (0 === e.length) { R.warn('No geometry found for model, loading faux geometry, disabling outside mode'), (r.supportedModes[s.DOLLHOUSE] = !1), (r.supportedModes[s.FLOORPLAN] = !1) var i = new h({ geometry: new o.PlaneBufferGeometry(5, 5, 1, 1) }) ;(i.material.visible = !1), i.rotateX(-Math.PI / 2), i.geometry.computeBoundingBox(), (e = [i]) } e.forEach(function (e) { var t = r.floorsEnabled ? w.parseFloor(e.name) : 0 r.addChunk(t, e) }), r.floors.sort(), n.resolve(r) }, function (e, t) { n.notify(e, t) }, function (e) { R.error(e), n.reject('loading-failed') } ), n.promise() ) }), (t.prototype.loadMeshTextures = function () { return ( this.loadTexturesPromise || (this.loadTexturesPromise = v.load(this, this.meshTextures).then( function () { this.meshTexturesLoaded = !0 }.bind(this) )), this.loadTexturesPromise ) }), (t.prototype.loadhots = function () { initHot(this) var r = $.Deferred(), e = g_Prefix + 'data/' + this.sid + '/data2.js?' + randomTime().getTime() return ( a .get(e, { responseType: 'json', auth: this.isPublic ? null : u.authorizationHeader }) .done( function (e) { window.data2 = e this.roomLabels = [] if (!e) { console.error('data2 is null') } else { g_data2 = hotMatcher(e) this.hotsCount = 0 //因为热点保存后在hots里的顺序会被修改,所以使用order来记录顺序,这里要重排序: let create = () => { //alertInfo('开始计算',{dontAutoClose:true, hideCloseBtn:true, name:'getPanoVisibles'}); //暂时没找到很多热点要计算的场景 if (e.hots) { var sids = Object.keys(e.hots).sort((a, b) => { return e.hots[a].order - e.hots[b].order }) sids.forEach(sid => { e.hots[sid].sid = sid if (e.hots[sid].texType == 'photo' && !e.hots[sid].texSrc) return console.error('有photo热点无texSrc', e.hots[sid]) new Hot(e.hots[sid], e.hots[sid].version != 'multi' && 'byHot') }) } if (e.overlays) { e.overlays.forEach(info => { new Hot(info, 'byOverlay') }) } Hot.createHotList() if (DATA.roomLabels) { DATA.roomLabels.forEach(data => { this.roomLabels.push(new RoomLabel(data)) }) } //alertClose('getPanoVisibles'); Hot.startLoad() editTool.loadDone('data2', e) } if (player.currentPano) { create() } else { let f = () => { window.bus.removeEventListener('playerAndModelReady', f) create() } window.bus.addEventListener('playerAndModelReady', f) } e.weixinDesc && (g_weixinObj.desc = e.weixinDesc) } r.resolve() }.bind(this) ) .fail(function () { console.log('没有热点'), editTool.loadDone('data2', null) r.resolve() }), r ) }), (t.prototype.loadPanos = function () { if (this.loadPanosPromise) return this.loadPanosPromise var e = new y(this) return ( (this.loadPanosPromise = e.load().then( function (e) { window.panoListOriData = e.map(a => a.uuid) //包括!enabled的点 return ( this.data.sweeps && 0 < Object.keys(this.data.sweeps).length && (e = e.filter( function (e) { if (this.data.sweeps[e.uuid]) return this.data.sweeps[e.uuid].enabled else console.log(e.uuid) //return this.data.sototype.loadOverlaysweeps[e.uuid].enabled }.bind(this) )), this.panos.extend( e.map( function (e) { return new f(this, e.uuid, e, this.supportsTiles) }.bind(this) ) ), this.panos.forEach( function (i) { i.neighbourUUIDs && (i.neighbourUUIDs.forEach( function (e) { var t = this.panos.get(e) t && this.panos.setNeighbour(i, t, !0) }.bind(this) ), (i.neighbourPanos = this.panos.getNeighbours(i) || this.panos.setNeighbour(i, i, !0))) }.bind(this) ), 0 === this.panos.length && (R.warn('Model has no panos, turning off inside mode'), (this.supportedModes[s.PANORAMA] = !1)), $.when(this) ) }.bind(this) )), this.loadPanosPromise ) }), (t.prototype.loadHighlightReel = function () { var t = $.Deferred(), e = this.options.urlBase + 'data/' + this.sid + '/active_reel.json' return ( a .get(e, { responseType: 'json', auth: this.isPublic ? null : u.authorizationHeader }) .done( function (e) { e.reel ? (R.info('Got highlight reel with ' + e.reel.length + ' items'), this.images.filterByModesAndReel(this.supportedModes, e.reel)) : R.info('No highlight reel found'), t.resolve() }.bind(this) ) .fail(function () { R.warn('Getting highlight reel failed, no highlights available'), t.resolve() }), t ) }), (t.prototype.waitForLoad = function (e, t) { t() || (this.waitQueue.push({ object: e, isLoadedCallback: t }), 1 === this.waitQueue.length && this.emit('waiting')) }), (t.prototype.hide = function () { this.floors.hide() }), (t.prototype.show = function () { this.floors.show() }), (t.prototype.floorNames = function () { return this.floors.names() }), (t.prototype.warpDestFloors = function (e, t) { if (e && this.floors.length === e.length) { var i = e.findIndex( function (e) { return e }.bind(this) ) ;-1 !== i && this.setFloor(this.floors.list[i], null, t) } else this.toggleAllFloors(!0) }), (t.prototype.setFloor = function (e, t, i) { this.allFloorsVisible && this.emit('allfloors.toggled', !1, this.currentFloor), (this.allFloorsVisible = !1), this._setFloor(e, t, i) }), (t.prototype.toggleAllFloors = function (e) { ;(this.allFloorsVisible = void 0 !== e ? e : !this.allFloorsVisible), this.emit('allfloors.toggled', this.allFloorsVisible, this.currentFloor), this._setFloor(this.currentFloor) }), (t.prototype._setFloor = function (e, t, i) { var n if (((t = t || this.mode), this.emit('floor.changed', e, t, this.currentFloor), (this.currentFloor = e), t === s.PANORAMA)) { if ((this.show(), this.shouldShowtags && this.tagsShown)) for (n in this.tags) this.tags[n].show(u.showFloorDuration) } else if ( (t === s.FLOORPLAN || t === s.DOLLHOUSE) && (this.floors.list.forEach( function (e, t) { e.toggle(e === this.currentFloor || this.allFloorsVisible, i || this.allFloorsVisible) }.bind(this) ), this.shouldShowtags && this.tagsShown) ) for (n in this.tags) { var r = this.tags[n] this.allFloorsVisible ? r.show(u.showFloorDuration) : r.floor === this.currentFloor ? r.show(u.showFloorDuration, u.showFloorDelay) : r.hide(u.hideFloorDuration, u.hideFloorDelay) } var o = this, a = e A.start( function () {}, u.showFloorDelay, function () { o.floors.forEach(function (t) { t.chunks.forEach(function (e) { e.renderOrder = t === a ? l.visibleFloor : l.ghostFloor }) }) }.bind(this) ) }), (t.prototype.toggleExplode = function () { this.floors.toggleExplodeHorizontal() }), (t.prototype.toggleExplodeUp = function () { this.floors.toggleExplodeVertical() }), (t.prototype.nextFloor = function (e) { return this.floors.nextFloor(this.currentFloor, e) }), (t.prototype.addFloor = function (e) { this.floors.add(e) }), (t.prototype.getFloorAtPoint = function (e) { return this.floors.getFloorAtPoint(e) }), (t.prototype.getTagBySid = function (e) { return this.tags[e] }), (t.prototype.addChunk = function (e, t) { this.floors.getOrMakeFloor(e).addChunk(t), this.chunks.push(t) }), (t.prototype.setMode = function (t) { if (!this.supportedModes[t]) throw new x('Mode not supported for this model: ' + t) this.mode = t this.skybox.material.transparent = t == 'panorama' ? false : true //xzw add // 如果skybox透明,会让其中其他mesh 如热点的透明出问题 this.chunks.forEach(function (e) { e.setMode(t) }) }), (t.prototype.build = function () { this.heroLocations = this.images.getHeroLocations(this.panos) var e = function () { return ( !!(this.heroImage && this.heroImage.metadata && this.heroImage.metadata.scan_id && this.panos.get(this.heroImage.metadata.scan_id)) && !this.panos.get(this.heroImage.metadata.scan_id).isAligned() ) }.bind(this)() ;(this.has360Views = (u.show360Views.enabled && this.heroLocations.some( function (e) { return e.cameraMode === s.PANORAMA && this.panos.get(e.panoId) && !this.panos.get(e.panoId).isAligned() }.bind(this) )) || e), null === this.heroImage && R.warn('No hero image defined.'), (this.currentFloor = this.floors.last()), this.floors.build(), (this.colliders = this.floors.reduce(function (e, t) { return e.concat(t.collider.children) }, [])), this.panos.forEach( function (e) { e.build1(), e.on( 'enter', function () { e.floor !== this.currentFloor && this.setFloor(e.floor) }.bind(this) ) }.bind(this) ) let downVec = new THREE.Vector3(0, -1, 0) this.panos.forEach(pano => { player.raycaster.set(pano.position, downVec) let collider = pano.floor.collider.children let n = player.raycaster.intersectObjects(collider, true) //add true if (n && n[0]) { if (n[0].point.y - pano.floorPosition.y > 0.03) { //console.error(`${pano.id}, 探测高度${n[0].point.y.toPrecision(5)} 原高度 ${pano.floorPosition.y.toPrecision(5)}, 相差 ${(n[0].point.y - pano.floorPosition.y).toPrecision(5)}`) pano.originFloorY = pano.floorPosition.y pano.floorPosition.y = n[0].point.y } } //是否需要排除一下相差过高的?因为可能探测到的是长椅这样的 }) this.panos.forEach(function (e) { e.build2() }), this.floors.forEach( function (e) { this.boundingBox.union(e.boundingBox) }.bind(this) ), (this.size = this.boundingBox.size()), (this.center = this.boundingBox.center()), this.floors.forEach( function (e) { R.info('Floor ' + e + ': ' + e.children.length + ' chunks, ' + e.panos.length + ' panos.') }.bind(this) ), this.panos.populate_path_graph(), (this.skybox = new n(this.boundingBox)), (this.skybox.matrixWorldNeedsUpdate = !0), this.add(this.skybox) //因为一部分漫游点在模型外 { let bounding = new THREE.Box3() //不包含pano的bound this.floors.list.forEach(floor => { bounding.union(floor.conservativeBoundingBox) }) this.boundWithoutPanos = bounding this.sizeWithoutPanos = bounding.size() this.centerWithoutPanos = bounding.center() /* 如果想居中模型, bound不加pano: this.boundingBox = bounding this.size = bounding.size() this.center = bounding.center() */ } return ( R.debug('Done building model'), 0 < f.raycastsDone && (R.warn('raycasts: ' + f.raycastsDone), R.warn('raycasts skipped: ' + f.raycastsSkipped)), this.buildRooms(), this.labels.associateWithRooms(this.rooms), $.when(this) ) }), (t.prototype.loadLabels = function () { this.labels = new b(this) var e = $.Deferred() window.DATA.showingLabels ? (this.showingLabels = true) : '' if (!this.showingLabels) return e.resolve() var t = g_Prefix + 'data/' + this.sid + '/labels.json' return ( this.labels .load(t, !this.isPublic) .done(e.resolve.bind(e)) .fail(function () { R.warn('Getting labels failed, not displaying labels.'), e.resolve() }), e ) }), (t.prototype.buildRooms = function () { ;(this.rooms = new _(this)), this.rooms.createFromChunks(this.chunks), this.rooms.calcRoomBoundaries() }), (t.prototype.updateProjectedPanos = function () { this.projectedPano0 && this.projectedPano1 && this.setProjectedPanos(this.projectedPano0, this.projectedPano1, !1) }), (t.prototype.setProjectedPanos = function (t, i, n) { null != n || (n = !0), (n = !!n), (this.projectedPano0 = t), (this.projectedPano1 = i), this.skybox.material.setProjectedPanos(t, i, n), this.chunks.forEach(function (e) { e.materialInside.setProjectedPanos(t, i, n) }) }), (t.prototype.setSide = function (t) { this.floors.forEach(function (e) { e.collider.material.side = t }) }), (t.prototype.heroCount = function () { return this.heroLocations ? this.heroLocations.length : 0 }), (t.prototype.getHeroDescriptorByIndex = function (e = []) { //改 因增加了二级目录 if (e[0] < 0) return R.warn('Model.getHeroDescriptorByHeroIndex() -> heroIndex is less than 0.'), null if (this.heroCount() < 1) return R.warn('Model.getHeroDescriptorByIndex() -> No hero locations in this model'), null var t = this.heroLocations[e[0]] if (t.heroLocations && e[1] != void 0) { t = t.heroLocations[e[1]] } return void 0 === t ? (R.warn('Model.getHeroDescriptorByIndex() -> Index ' + e + ' is not a validindex'), null) : t }), (t.prototype.findPanoramicHero = function () { for (var e in this.heroLocations) if (this.heroLocations[e].cameraMode === s.PANORAMA) return this.heroLocations[e] return null }), (t.prototype.listImagePanos = function () { var i = [], n = this return ( this.images.forEach(function (e) { if (e.metadata && e.metadata.scan_id) { var t = n.panos.get(e.metadata.scan_id) t && (n.supportsTiles || t.isLoaded('high') || i.push(t)) } }), i ) }), (t.prototype.fadePanoMarkers = function (/* e, t */ opacity, dur, o = {}) { //改 if (window.DATA.hideFloorMarker) return var currentPano = player.currentPano opacity = void 0 == opacity ? _settings.panorama.markerOpacity : opacity //不传opacity代表显示 var hideWhenFlyOut = () => { var shows = [], hides = [] player.model.panos.forEach(pano => { hides.push(pano) }) this.panos.fadeMarkerOpacity(0, dur, [{ toOp: 0, member: hides }]) } if (opacity == 0) { hideWhenFlyOut() } else { if (player.mode == 'panorama' && currentPano) { var shows = [], hides = [] player.model.panos.forEach(pano => { //是邻近点就显示否则隐藏 if (currentPano.neighbourPanos[pano.id]) { shows.push(pano) } else { hides.push(pano) } }) this.panos.fadeMarkerOpacity(opacity, dur, [ { toOp: opacity, member: shows }, { toOp: 0, member: hides } ]) } else if (player.modeTran.split('-')[1] != 'panorama') { //飞出后marker隐藏 hideWhenFlyOut() } } }), (t.prototype.setSweepVisibility = function (t) { this.panos.forEach(function (e) { e.marker && (e.marker.visible = t) }) }), (t.prototype.outsideAllowed = function () { return this.supportedModes[s.DOLLHOUSE] && this.supportedModes[s.FLOORPLAN] }), (O.exports = t) }).call(this, '/js/model/Model.js') }, { '../constants': 8, '../enum/AlignmentType': 17, '../enum/RenderOrder': 42, '../enum/Viewmode': 51, '../exception/BasicException': 55, '../label/Label': 90, '../loaders/ModelLoader': 105, '../loaders/ModelTextureLoader': 106, '../loaders/SweepDataLoader': 107, '../tag/tag': 123, '../tag/tagManager': 124, '../objects/BoundingTextureSkybox': 143, '../objects/Chunk': 144, '../objects/Floor': 146, '../objects/Panorama': 148, '../objects/Room': 150, '../objects/Snapshot': 153, '../settings': 166, '../shaders': 167, '../util/ModelUrls': 177, '../util/PanoramaCollection': 178, '../util/ajax': 181, '../util/common': 185, '../util/easing': 186, '../util/lerp': 188, '../util/logger': 189, '../util/math': 190, '../util/texture': 194, '../util/transitions': 195, './../util/browser': 182, './../util/showcase': 193, './Chunks': 135, './FloorCollection': 136, './ImageCollection': 137, './LabelCollection': 138, './RoomCollection': 141, events: 202, three: 217 //hot: "hot" } ], 140: [ function (e, t, i) { 'use strict' function n() { ;(this.modelMap = {}), (this.activeModel = null), (this.modelCount = 0), (this.tileDownloader = null), (this.panoRenderer = null) } var r = (e('three'), e('../util/common')), o = e('../exception/BasicException'), a = e('../enum/ModelManagerEvents'), s = e('../enum/PanoRendererEvents'), l = e('events').EventEmitter ;(n.prototype.init = function (e, t, i) { ;(this.tileDownloader = e), (this.panoRenderer = t), (this.qualityManager = i), this.bindEvents() }), (n.prototype.bindEvents = function () { this.panoRenderer.on(s.TileRenderSuccess, this.onTileRendered.bind(this)) }), (n.prototype.onTileRendered = function (e, t, i, n) {}), (n.prototype.addModel = function (e) { ;(this.modelMap[e.sid] = e), 0 === this.modelCount && this.activateModel(e.sid), this.modelCount++, this.emit(a.ModelAdded) }), (n.prototype.getModel = function (e) { return this.modelMap[e] }), (n.prototype.activateModel = function (e) { var t = this.modelMap[e] if (!t) throw new o('Tried to activate invalid model!') var i = this.activeModel ;(this.activeModel = t), this.tileDownloader.setpanoData(t.panos, t.listImagePanos(), t.sid), this.tileDownloader.setUrls(t.urls), t.panos.forEach( function (e) { e.attachToPanoRenderer(this.panoRenderer), (e.tileDownloader = this.tileDownloader), (e.qualityManager = this.qualityManager) }.bind(this) ), this.emit(a.ActiveModelChanged, { oldModel: i, model: t }) }), (n.prototype.getActiveModel = function () { return this.activeModel }), r.extend(n, l), (t.exports = n) }, { '../enum/ModelManagerEvents': 33, '../enum/PanoRendererEvents': 35, '../exception/BasicException': 55, '../util/common': 185, events: 202, three: 217 } ], 141: [ function (r, l, e) { ;(function (e) { 'use strict' function o() { n.call(this) } var a = r('../objects/Room'), t = (r('../settings'), r('../util/logger')), i = (r('../util/transitions'), r('../util/easing'), r('../util/common')), n = r('../util/IndexedCollection'), s = r('./Chunks') new t(e), i.inherit(o, n), (o.prototype.getIndex = function (e) { return e.roomId }), (o.prototype.calcRoomBoundaries = function () { this.forEach(function (e) { e.calcBoundaries() }) }), (o.prototype.createFromChunks = function (e) { var n = { floorId: -1, roomId: -1 }, r = {} e.forEach( function (e) { s.parseIdsFromChunkName(e.name, n) var t = r[n.roomId] if (!t) { var i = o.generateRoomId(n.floorId, n.roomId) ;(t = new a(n.floorId, i)), this.add(t), (r[n.roomId] = t) } t.addChunk(e) }.bind(this) ), this.calcRoomBoundaries() }), (o.generateRoomId = function (e, t) { return e + '_' + t }), (l.exports = o) }).call(this, '/js/model/RoomCollection.js') }, { '../objects/Room': 150, '../settings': 166, '../util/IndexedCollection': 175, '../util/common': 185, '../util/easing': 186, '../util/logger': 189, '../util/transitions': 195, './Chunks': 135 } ], 142: [ function (e, t, i) { 'use strict' function n(e, t, i) { var n = (e = e.clone().expandByScalar(0.01)).size(), r = new o.BoxGeometry(n.x, n.y, n.z) ;(r.boundingBox = e), o.Mesh.call(this, r, t), this.position.copy(e.center()), (this.frustumCulled = !1), i && this.add(new o.WireframeHelper(this)) } var o = e('three') ;((n.prototype = Object.create(o.Mesh.prototype)).constructor = n), (t.exports = n) }, { three: 217 } ], 143: [ function (l, c, e) { ;(function (e) { 'use strict' function t(e) { s.time('Computing a nice bounding cubemap') var t = new r({ side: i.BackSide, transparent: !0 }) ;(t.uniforms.modelAlpha.value = 0), (t.uniforms.opacity.value = 1 - o.modelAlpha), (this.renderOrder = a.boundingSkybox), n.call(this, e, t), s.timeEnd('Computing a nice bounding cubemap') } var i = l('three'), n = (l('../enum/Viewmode'), l('../shaders'), l('./BoundingMesh')), r = l('../materials/ModelTextureMaterial'), o = l('../settings'), a = l('../enum/RenderOrder'), s = new (l('../util/logger'))(e) ;((t.prototype = Object.create(n.prototype)).constructor = t), (c.exports = t) }).call(this, '/js/objects/BoundingTextureSkybox.js') }, { '../enum/RenderOrder': 42, '../enum/Viewmode': 51, '../materials/ModelTextureMaterial': 118, '../settings': 166, '../shaders': 167, '../util/logger': 189, './BoundingMesh': 142, three: 217 } ], 144: [ function (e, t, i) { 'use strict' function n(e) { this.materialInside = new s({ side: r.DoubleSide }) var t = r.UniformsUtils.clone(o.modelOutside.uniforms) ;(this.materialOutside = new r.RawShaderMaterial({ fragmentShader: o.modelOutside.fragmentShader, vertexShader: o.modelOutside.vertexShader, uniforms: t, side: r.FrontSide, name: 'chunkOut' })), r.Mesh.call(this, e.geometry, this.materialInside), (this.name = e.name || ''), (this.textureName = e.textureName), (this.meshUrl = e.meshUrl) } var r = e('three'), o = e('../shaders'), a = e('../enum/Viewmode'), s = e('../materials/ModelTextureMaterial') ;((n.prototype = Object.create(r.Mesh.prototype)).setTextureMap = function (e) { ;(this.materialInside.uniforms.map.value = e), (this.materialOutside.uniforms.map.value = e) }), (n.prototype.setMode = function (e) { var t = e === a.DOLLHOUSE || e === a.FLOORPLAN ? this.materialOutside : this.materialInside ;(t.side = e === a.PANORAMA ? r.DoubleSide : r.FrontSide), (t.transparent = this.material.transparent), (t.uniforms.opacity.value = this.material.uniforms.opacity.value) this.material = t }), (t.exports = n) }, { '../enum/Viewmode': 51, '../materials/ModelTextureMaterial': 118, '../shaders': 167, three: 217 } ], 145: [ function (e, t, i) { 'use strict' function n(e) { ;(this.chunksize = e || 10), (this.chunks = {}), (this.boundingBoxes = {}), (this.children = []), (this.offset = new m.Vector3(0, 0.5, 0)), (this.material = new m.MeshBasicMaterial({ color: 16777215 * Math.random(), side: m.DoubleSide })) } var m = e('three') e('../enum/Viewmode'), (n.prototype.add = function (e) { var t, i, n, r, o, a, s, l, c, h, u = e.attributes u ? ((t = u.position.array), (i = void 0 !== e.index ? e.index.array : void 0)) : ((t = e.vertices), e.faces) var d = new m.Vector3() if (i) for (n = 0, r = i.length; n < r; n += 3) { var p = 3 * i[n], f = 3 * i[n + 1], g = 3 * i[n + 2] ;(o = (t[p] + t[f] + t[g]) / 3), (a = (t[1 + p] + t[1 + f] + t[1 + g]) / 3), (s = (t[2 + p] + t[2 + f] + t[2 + g]) / 3), (c = (l = Math.floor(o / this.chunksize) + '.' + Math.floor(a / this.chunksize) + '.' + Math.floor(s / this.chunksize)) in this.chunks ? ((h = this.chunks[l]), this.boundingBoxes[l]) : ((h = this.chunks[l] = []), (this.boundingBoxes[l] = new m.Box3()))), h.push(t[p], t[1 + p], t[2 + p], t[f], t[1 + f], t[2 + f], t[g], t[1 + g], t[2 + g]), c.expandByPoint(d.set(t[p], t[1 + p], t[2 + p])), c.expandByPoint(d.set(t[f], t[1 + f], t[2 + f])), c.expandByPoint(d.set(t[g], t[1 + g], t[2 + g])) } else for (n = 0, r = t.length; n < r; n += 9) (o = (t[n] + t[n + 3] + t[n + 6]) / 3), (a = (t[n + 1] + t[n + 4] + t[n + 7]) / 3), (s = (t[n + 2] + t[n + 5] + t[n + 8]) / 3), (c = (l = Math.floor(o / this.chunksize) + '.' + Math.floor(a / this.chunksize) + '.' + Math.floor(s / this.chunksize)) in this.chunks ? ((h = this.chunks[l]), this.boundingBoxes[l]) : ((h = this.chunks[l] = []), (this.boundingBoxes[l] = new m.Box3()))), h.push(t[n], t[n + 1], t[n + 2], t[n + 3], t[n + 4], t[n + 5], t[n + 6], t[n + 7], t[n + 8]), c.expandByPoint(d.set(t[n], t[n + 1], t[n + 2])), c.expandByPoint(d.set(t[n + 3], t[n + 4], t[n + 5])), c.expandByPoint(d.set(t[n + 6], t[n + 7], t[n + 8])) }), (n.prototype.build = function () { var e = new m.Object3D() for (var t in ((e.material = this.material), this.chunks)) { var i = this.chunks[t], n = new m.BufferGeometry() n.addAttribute('position', new m.BufferAttribute(new Float32Array(i), 3)), (n.boundingBox = this.boundingBoxes[t]) var r = new m.Mesh(n, this.material) ;(r.material.visible = !1), e.add(r), (this.chunks[t] = []) } return e }), (t.exports = n) }, { '../enum/Viewmode': 51, three: 217 } ], 146: [ function (e, t, i) { 'use strict' var n = e('three'), r = e('../settings'), o = e('../util/common'), a = e('../util/lerp'), s = e('./ChunkedCollider'), l = e('../util/transitions'), c = e('../util/easing'), h = (e('../objects/Panorama'), e('../enum/RenderOrder')) e('../localization/localize') function u(e, t, i) { n.Object3D.call(this), (this.model = e), (this.floorIndex = t), (this.lang = r.languageTag), (this.name = i || 'cn' === r.languageTag ? 'Floor ' + (t + 1) : '第' + (t + 1) + '层'), (this.panos = []), (this.chunks = []), (this.colliderBuilder = new s(3)), (this.collider = null), (this.center = null), (this.boundingBox = new n.Box3()), (this.size = null), (this.hidden = !1), (this.conservativeBoundingBox = new n.Box3()), (this.debugColor = 16777215 * Math.random()), (this.transition = null) } ;((u.prototype = Object.create(n.Object3D.prototype)).enter = function (e) { this.model.setFloor(this, e) }), (u.prototype.hide = function (e) { if (!this.hidden || this.transition) { this.chunks.forEach(function (e) { e.material.transparent = !0 }), l.cancel(this.transition) var t = e ? 0 : r.hideFloorDuration + r.hideFloorDelay, i = e ? 0 : r.hideFloorDelay / t this.transition = l.start( a.allUniforms(this.chunks, 'opacity', 0.08), t, function () { this.hidden = !0 }.bind(this), i, c.easeInOutQuad ) } }), (u.prototype.show = function (e) { if (this.hidden || this.transition) { ;(this.hidden = !1), l.cancel(this.transition) var t = e ? r.showFloorDuration : r.showFloorDuration + r.showFloorDelay, i = e ? 0 : r.showFloorDelay / t this.transition = l.start( a.allUniforms(this.chunks, 'opacity', 1), t, function () { this.hidden || this.chunks.forEach(function (e) { e.material.transparent = !1 }) }.bind(this), i, c.easeInOutQuad ) } }), (u.prototype.toggle = function (e, t) { ;(e = void 0 === e ? this.hidden : e) ? this.show(t) : this.hide(t) }), (u.prototype.containsPoint = function (t) { return this.collider.children.some(function (e) { return e.geometry.boundingBox || e.geometry.computeBoundingBox(), e.geometry.boundingBox.containsPoint(t) }) }), (u.prototype.distanceToPoint = function (i) { var n = null, r = 1 / 0 return ( this.collider.children.forEach(function (e) { e.geometry.boundingBox || e.geometry.computeBoundingBox() var t = e.geometry.boundingBox.distanceToPoint(i) ;(!n || t < r) && ((r = t), (n = e)) }), r ) }), (u.prototype.addChunk = function (e) { ;(e.renderOrder = h.ghostFloor), this.add(e), this.chunks.push(e), this.boundingBox.union(e.geometry.boundingBox), (this.size = this.boundingBox.size()), this.colliderBuilder.add(e.geometry) }), (u.prototype.addPano = function (e) { this.panos.push(e), this.add(e.skyboxMesh), e.marker && this.add(e.marker) if (e.neighbourUUIDs && e.neighbourUUIDs.length) { //add 有相邻点才算入bound 因为拍摄有bug,会出现floorPosition为000,且position位置很偏的点,它们一般都是不可见点。 var t = new n.Vector3(1, 1, 1), i = new n.Box3().setFromCenterAndSize(e.position, t) this.boundingBox.union(i) } }), (u.prototype.build = function () { ;(this.collider = this.colliderBuilder.build(!0)), this.add(this.collider), (this.center = this.boundingBox.center()), this.conservativeBoundingBox.copy(this.boundingBox), (this.conservativeBoundingBox.min.y = o.lowerMedian( this.collider.children.map(function (e) { return e.geometry.boundingBox.min.y }), 5 )), (this.conservativeBoundingBox.max.y = o.lowerMedian( this.collider.children.map(function (e) { return e.geometry.boundingBox.max.y }), 5 )), (this.colliderBuilder = null) }), (u.prototype.toShortString = function () { return o.nth(this.floorIndex + 1) }), (u.prototype.toString = function () { return this.name }), (t.exports = u) }, { '../enum/RenderOrder': 42, '../localization/localize': 108, './strings-cn-CN': 109, '../objects/Panorama': 148, '../settings': 166, '../util/common': 185, '../util/easing': 186, '../util/lerp': 188, '../util/transitions': 195, './ChunkedCollider': 145, three: 217 } ], 147: [ function (e, t, i) { 'use strict' function n(e) { ;(this.player = e), (this.obj3d = null), (this.UP = new u.Vector3(0, 1, 0)) } var u = e('three'), d = e('../settings') ;(n.prototype.prefs = { linewidth: 3, height: 0.07, opacity: 0.45, endScale: 0.05 }), (n.prototype.discard = function () { if (this.obj3d) { var e = this.obj3d.parent e && e.remove(this.obj3d) } this.obj3d = null }), (n.prototype.draw = function () { if ((this.discard(), d.showNeighbors)) { var e = this.player.currentPano.floor this.obj3d = new u.Object3D() var t = this.player.model.panos.getNeighbours(this.player.currentPano), i = this.player.currentPano.floorPosition.clone().sub(this.player.model.position) i.y += this.prefs.height var n = 0.1525, r = new u.Matrix4() for (var o in t) if (t[o]) { var a = this.player.model.panos.get(o), s = (a.position.clone().sub(this.player.model.position), a.position.clone().sub(a.floorPosition)), l = a.floorPosition.clone().sub(this.player.model.position) l.y += this.prefs.height var c = new u.Geometry() c.vertices.push(new u.Vector3(0, -0.0127, 0), new u.Vector3(-0.0127, 0, 0), new u.Vector3(0, 0.0127, 0), new u.Vector3(0.0127, 0, 0), new u.Vector3(0, -0.0127, 0)), c.vertices.push( new u.Vector3(0, -0.255, 0), new u.Vector3(0.255, -0.255, 0), new u.Vector3(0.255, n, 0), new u.Vector3(-n, n, 0), new u.Vector3(-n, 0.127, 0), new u.Vector3(-0.19, 0.1, 0), new u.Vector3(-0.19, -0.2032, 0), new u.Vector3(-n, -0.2286, 0), new u.Vector3(-n, -0.255, 0), new u.Vector3(0, -0.255, 0) ), r.identity().setPosition(s), c.applyMatrix(r), c.vertices.push(new u.Vector3(0, -this.prefs.endScale, 0)), c.vertices.push( new u.Vector3(-this.prefs.endScale, -this.prefs.endScale, 0), new u.Vector3(-this.prefs.endScale, this.prefs.endScale, 0), new u.Vector3(this.prefs.endScale, this.prefs.endScale, 0), new u.Vector3(this.prefs.endScale, -this.prefs.endScale, 0) ), r.lookAt(l, i, this.UP).setPosition(l), c.applyMatrix(r), c.vertices.push(l, i) var h = new u.Line( c, new u.LineBasicMaterial({ color: a.debugColor.getHex(), transparent: !0, opacity: this.prefs.opacity, depthWrite: !1, name: 'sLine' + o, linewidth: this.prefs.linewidth }) ) this.obj3d.add(h) } e.add(this.obj3d) } }), (n.prototype.update = function () { d.showNeighbors && this.obj3d && this.obj3d.updateMatrixWorld() }), (t.exports = n) }, { '../settings': 166, three: 217 } ], 148: [ function (S, M, e) { ;(function (e) { 'use strict' function r(e, t, i, n) { ;(this.model = e), (this.id = t), (this.alignmentType = i.alignmentType || c.ALIGNED), (this.neighbourUUIDs = i.neighbours), (this.neighbourPanos = null), (this.floor = null), (this.floorIndex = i.floor), (this.failedLoadingAt = 0), (this.maxLoadRetries = 4), (this.origin = i.position.clone()), (this.position = this.alignmentType === c.UNALIGNED ? new s.Vector3(0, -5, 0) : i.position.clone()), (this.quaternion = i.quaternion.clone()), (this.skyboxMesh = new s.Mesh(E)), this.skyboxMesh.position.copy(this.position), this.skyboxMesh.quaternion.copy(this.quaternion), (this.skyboxMesh.name = 'skybox'), (this.skyboxMesh.visible = !1), this.skyboxMesh.updateMatrix(), this.skyboxMesh.updateMatrixWorld(), (this.marker = null), (this.showFloorMarker = this.showFloorMarker = !window.DATA.hideFloorMarker) if (this.isAligned()) { ;(this.marker = new s.Mesh( _, new s.MeshBasicMaterial({ map: b, side: s.DoubleSide, opacity: 0, transparent: !0, depthWrite: !1 }) )), (this.marker.visible = false) //改:先不显示,之后根据opacity显示 ;(this.marker.renderOrder = l.panoMarker), (this.marker.name = 'marker'), (this.marker.pano = this).marker.layers.set(v.PANOMARKERS), this.marker.updateMatrixWorld() if (!window.DATA.hideFloorMarker) { //xzw let opa = this.marker.material.opacity Object.defineProperty(this.marker.material, 'opacity', { get: function () { return opa }, set: o => { opa = o //if(o>0)console.log('o>0',this.pano.id) convertTool.updateVisible(this.marker, 'hideWhenZeroOpa', o != 0) } }) } a.colorMarkerOnLoad && this.on('load', function () { this.marker.material.color.set(65280) }) } ;(this.debugColor = new s.Color().setHSL(0.06 + 0.53 * Math.random(), 0.8 + 0.2 * Math.random(), 0.5 + 0.2 * Math.random())), (this.floorPosition = i.puck ? i.puck.clone() : null), (this.tiled = n), this.tiled ? (this.solidSkybox = null) : ((this.solidSkybox = new s.Texture([null, null, null, null, null, null])), (this.solidSkybox.flipY = !1), a.minimalMemoryMode && ((this.solidSkybox.minFilter = s.LinearFilter), (this.solidSkybox.magFilter = s.LinearFilter), (this.solidSkybox.generateMipmaps = !1))), (this.zoomed = !1), (this.panoRenderer = null), (this.qualityManager = null), (this.tileDownloader = null), (this.tiledPanoRenderTarget = null), (this.minimumTiledPanoLoaded = !1), (this.highestPartialTileRenderOpCompleted = 0), (this.highestFullTileRenderOpCompleted = 0), (this.shouldRedrawOnBaseLoaded = !1), (this.lockUntilRenderingComplete = !1), a.colorMarkerOnLoad && this.on('load', function () { this.marker.material.color.set(65280) }), (e = new s.TextureLoader()).setCrossOrigin(!0) var r = e.load('images/texture.jpg') if ( ((this.vrMarker = new s.Mesh( new s.OctahedronGeometry(0.1, 0), new s.MeshLambertMaterial({ color: 16777215, transparent: !0, opacity: 0.75, map: r }) )), (this.vrMarker.boluoType = 'vr'), (this.vrMarker.position.z = 1), (this.vrMarker.enabled = !0), (this.vrMarker.visible = !1), (window.vrMarkers = window.vrMarkers || []), window.vrMarkers.push(this.vrMarker), this.marker && this.marker.add(this.vrMarker), a.showAxis && (this.skyboxMesh.add(new s.ArrowHelper(new s.Vector3(0, 1, 0), new s.Vector3(0, 0, 0), 1, 255)), this.skyboxMesh.add(new s.ArrowHelper(new s.Vector3(0, 0, 1), new s.Vector3(0, 0, 0), 1, 16711680)), this.skyboxMesh.add(new s.ArrowHelper(new s.Vector3(1, 0, 0), new s.Vector3(0, 0, 0), 1, 65280))), this.adjustAngleEnable) ) { ;(i = new s.Quaternion()).setFromAxisAngle(new s.Vector3(1, 0, 0), this.adjustAngleX), this.skyboxMesh.quaternion.multiply(i) var o = new s.Quaternion() o.setFromAxisAngle(new s.Vector3(0, 1, 0), this.adjustAngleY), this.skyboxMesh.quaternion.multiply(o), (n = new s.Quaternion()).setFromAxisAngle(new s.Vector3(0, 0, 1), this.adjustAngleZ), this.skyboxMesh.quaternion.multiply(n), this.skyboxMesh.updateMatrix(), this.skyboxMesh.updateMatrixWorld(), this.model.updateProjectedPanos() } } var i, t, s = S('three'), n = S('../util/logger'), a = S('../settings'), l = (S('../enum/Viewmode'), S('../enum/RenderOrder')), c = S('../enum/AlignmentType'), o = (S('../util/common'), S('../util/transitions')), h = S('../util/lerp'), u = S('../util/ajax'), d = S('../util/texture'), p = S('../util/panorama'), f = (S('../enum/TileDownloaderEvents'), S('../enum/PanoramaEvents')), g = S('../enum/PanoRendererEvents'), m = S('../enum/PanoSizeClass'), v = S('../enum/RenderLayers'), y = (S('../scene/SceneRenderer'), S('../enum/GLCubeFaces'), S('../exception/BasicException')), A = S('../tile/TileUtils'), C = S('events').EventEmitter, I = new n(e), E = new s.SphereBufferGeometry(0.1), _ = new s.PlaneBufferGeometry(0.35, 0.35, 1, 1), b = d.load('images/marker.png') b.anisotropy = 4 //add ;((r.prototype = Object.create(C.prototype)).enter = ((t = null), function () { this.setZoomed(!1), this.emit('enter', { oldPano: t, newPano: this }), (t = this) })), (r.prototype.exit = function () { this.tiled ? (this.clearWaitDeferreds(), (this.minimumTiledPanoLoaded = !1), (this.tiledPanoRenderTarget = null), this.setZoomed(!1), this.panoRenderer.deactivateTiledPano(this), (this.highestPartialTileRenderOpCompleted = 0), (this.highestFullTileRenderOpCompleted = 0)) : (this.solidSkybox.dispose(), (this.solidSkybox.loaded = !1), (this.solidSkybox.version = 0)), this.emit('exit') }), (r.prototype.hoverOn = function (e) { this.marker && (o.start(h.property(this.marker.material, 'opacity', a[e].markerOpacityOnHover), 250), a.navigation.panoScores & a.navigation.mouseDirection && this.addTextSprite('HIT', 12525854)) }), (r.prototype.hoverOff = function (e) { this.marker && o.start(h.property(this.marker.material, 'opacity', a[e].markerOpacity), 250) }), (r.prototype.build1 = function () { ;(this.floor = this.floor || this.model.floors.get(this.floorIndex) || (this.model.floors.list.length == 1 ? this.model.floors.list[0] : this.raycastToFindFloor()) || this.model.getFloorAtPoint(this.position)), //改 this.floor.addPano(this) ;(this.floorPosition = this.floorPosition || this.raycastFloorPosition()), (this.neighbourPanos = this.neighbourPanos || this.findNeighourPanos()), a.colorMarkerByFloor && this.marker && this.marker.material.color.set(this.floor.debugColor) this.neighbourUUIDs = this.neighbourUUIDs || [] //add }), (r.prototype.build2 = function () { ;(this.floorPosition = this.floorPosition || this.interpolateFloorPosition()), (this.height = this.position.distanceTo(this.floorPosition)), this.placeMarker() }), (r.prototype.interpolateFloorPosition = function () { var e = this.model.panos .filter(r.filters.isNeighbourPanoTo(this)) .filter(function (e) { return !!e.floorPosition }) .sort( function (e, t) { return e.position.distanceTo(this.position) - t.position.distanceTo(this.position) }.bind(this) ), t = this.position.clone() return 2 <= e.length ? (t.y = (e[0].floorPosition.y + e[1].floorPosition.y) / 2) : t.add(a.noMeshFloorPositionOffset), t }), (r.prototype.raycastFloorPosition = function () { I.warn('Performance warning: Raycasting to find floor position') var e = new s.Raycaster(this.position, new s.Vector3(0, -1, 0)).intersectObjects(this.model.colliders) return e.length ? e[0].point : null }), (r.prototype.raycastToFindFloor = ((i = [ new s.Vector3(0, -1, 0), new s.Vector3(1, -1, 0), new s.Vector3(0, -1, 1), new s.Vector3(-1, -1, 0), new s.Vector3(0, -1, -1), new s.Vector3(1, 0, 0), new s.Vector3(0, 0, 1), new s.Vector3(-1, 0, 0), new s.Vector3(0, 0, -1) ]), function () { I.warn('Performance warning: Raycasting to find floor index') for (var e = 0; e < i.length; e++) { var t = new s.Raycaster(this.position.clone(), i[e].clone()).intersectObjects(this.model.colliders) if (t.length) return t[0].object.parent.parent } return null })), (r.prototype.placeMarker = function () { this.marker && (this.marker.position.copy(this.floorPosition), (this.marker.position.y += 0.1), //经常有marker比地面低,所以多往上调5cm this.marker.lookAt(new s.Vector3(0, 1, 0).add(this.marker.position))) }), (r.prototype.translate = function (e) { this.position.add(e), this.floorPosition.add(e) }), (r.prototype.findClosestMidtpointPanoTo = function (e) { return new s.Vector3().addVectors(this.position, e.position).divideScalar(2), this.model.panos.find([r.filters.notIn([this, e])], [r.sortFunctions.distanceToPoint(point)]) }), (r.prototype.attachToPanoRenderer = function (e) { ;(this.panoRenderer = e), this.panoRenderer.on(g.TileRenderSuccess, this.onTileRendered.bind(this)), this.panoRenderer.on(g.PanoRenderComplete, this.onPanoRendered.bind(this)), this.panoRenderer.on(g.TileRenderFailure, this.onTileRenderFail.bind(this)), this.panoRenderer.on(g.UploadAttemptedForAllTiles, this.onUploadAttemptedForAllTiles.bind(this)) }) var w, T, x = {} ;(r.prototype.getWaitDeferred = function (e) { var t = x[this.id] t || ((t = {}), (x[this.id] = t)) var i = t[e] return ( i || ((i = { deferred: $.Deferred(), active: !1 }), (t[e] = i)), i ) }), (r.prototype.resetWaitDeferred = function (e) { var t = this.getWaitDeferred(e) ;(t.active = !1), (t.deferred = $.Deferred()) }), (r.prototype.clearWaitDeferreds = function () { var e = x[this.id] for (var t in (e || ((e = {}), (x[this.id] = e)), e)) if (e.hasOwnProperty(t)) { var i = e[t] ;(i.active = !1), (i.deferred = $.Deferred()) } }), (r.prototype.loadTiledPano = (new s.Vector3(), (w = []), (T = []), function (e, t, i, n, r, o) { null != n || (n = !0), null != r || (r = !0) var a = this.getWaitDeferred(e), s = a.deferred, l = null, c = null if ((i && ('number' == typeof i ? (l = i) : ((l = i.hFov), (c = i.vFov))), !this.isLoaded(e))) { if (!a.active) { if (((a.active = !0), i)) { var h = A.matchingTilesInDirection(this, e, t, l, c) ;(w[this.id + ':' + e] = { tileCount: 0, targetTileCount: h }), I.info('Loading partial pano: ' + this.id + ' with ' + h + ' tiles') } T[this.id] || ((T[this.id] = !0), this.on( f.LoadComplete, function (e, t) { var i = this.getWaitDeferred(e).deferred i && 'pending' === i.state() && this.highestPartialTileRenderOpCompleted >= e && (i.resolve(e, t), this.resetWaitDeferred(e)) }.bind(this) ), this.on( f.LoadFailed, function (e) { var t = this.getWaitDeferred(e).deferred t && 'pending' === t.state() && this.highestPartialTileRenderOpCompleted >= e && (t.reject(e), this.resetWaitDeferred(e)) }.bind(this) ), this.on( f.TileLoaded, function (e, t, i) { var n = this.getWaitDeferred(e).deferred if (n && 'pending' === n.state()) { n.notify(e, t, i) var r = w[this.id + ':' + e] r && (r.tileCount++, r.tileCount === r.targetTileCount && (this.onPanoRendered(this.id, e, i, !0), n.resolve(e, i), this.resetWaitDeferred(e))) } }.bind(this) )) } this.tileDownloader.clearForceQueue(), this.tileDownloader.forceQueueTilesForPano(this, e, t, l, c, o), (this.tiledPanoRenderTarget = this.panoRenderer.activateTiledPano(this, this.qualityManager.getMaxNavPanoSize(), n)), this.panoRenderer.renderPanoTiles(this.id, t, r) } return s.promise() })), (r.prototype.onUploadAttemptedForAllTiles = function (e, t, i) { e === this.id && t === this.qualityManager.getPanoSize(m.BASE) && this.shouldRedrawOnBaseLoaded && ((this.shouldRedrawOnBaseLoaded = !1), this.panoRenderer.resetRenderStatus(this.id, !0, !1), this.panoRenderer.renderPanoTiles(this.id, null, !0, !0)) }), (r.prototype.onTileRendered = function (e, t, i, n) { e === this.id && this.emit(f.TileLoaded, t, i, n) }), (r.prototype.onPanoRendered = function (e, t, i, n) { e === this.id && ((this.minimumTiledPanoLoaded = !0), this.updateSkyboxForZoomLevel(), t > this.highestPartialTileRenderOpCompleted && (this.highestPartialTileRenderOpCompleted = t), !n && t > this.highestFullTileRenderOpCompleted && (this.highestFullTileRenderOpCompleted = t), this.emit('load', t), this.model.emit('load', this), this.emit(f.LoadComplete, t, i)) }), (r.prototype.setZoomed = function (e) { ;(this.zoomed = e), this.updateSkyboxForZoomLevel() }), (r.prototype.ensureSkyboxReadyForRender = function () { this.tiled || (this.solidSkybox.loaded || (this.solidSkybox.needsUpdate = !0), (this.solidSkybox.loaded = !0)) }), (r.prototype.updateSkyboxForZoomLevel = function () { this.minimumTiledPanoLoaded && this.model.updateProjectedPanos() }), (r.prototype.getSkyboxTexture = function () { return this.tiled ? (this.minimumTiledPanoLoaded ? (this.zoomed ? this.panoRenderer.zoomRenderTarget.texture : this.tiledPanoRenderTarget.texture) : null) : this.solidSkybox }), (r.prototype.onTileRenderFail = function (e, t, i) { e === this.id && this.emit(f.LoadFailed, t) }), (r.prototype.isLoaded = function (e) { if (this.tiled) { if (e && 'string' == typeof e) throw new y('Wrong panoSize given to Panorama.isLoaded(); a tiled pano uses PanoSizeClass') return !!this.minimumTiledPanoLoaded && (!e || this.highestPartialTileRenderOpCompleted >= e) } if (e && 'number' == typeof e) throw new y('Wrong panoSize given to Panorama.isLoaded(); a non-tiled pano uses high/low.') return !!this.solidSkybox.high || e in this.solidSkybox }), (r.prototype.loadCube = function (a) { if (this.isLoaded(a)) return I.info('Skipping load of pano, already loaded'), $.when() this.emit('loading', a), this.model.emit('loading', this) var n = p.getCubemapUrls(this.model.urls, this.id, a), e = n.filter(function (e) { return !e }) 'low' === a && 0 < e.length && (I.info('Pano', this.id, 'not available in low res, loading high res right away'), (a = 'high'), (n = p.getCubemapUrls(this.model.urls, this.id, a))) var t = 0, i = [0, 1, 2, 3, 4, 5].map( function (e, t, i) { return u.getImage(n[t]) }.bind(this) ) return $.when(i[0], i[1], i[2], i[3], i[4], i[5]).then( function (e, t, i, n, r, o) { return ( (this.solidSkybox[a] = [e, t, i, n, r, o]), ('high' !== a && this.solidSkybox.high) || ((this.solidSkybox.image = this.solidSkybox[a]), (this.solidSkybox.low = null)), (this.solidSkybox.needsUpdate = !0), this.emit('load', a), this.model.emit('load', this), this ) }.bind(this), function () { I.error('Downloading cubemap for pano', this.id, 'failed'), (this.failedLoadingAt = Date.now()) }.bind(this), function () { return $.when(++t, 6) } ) }), (r.raycastsSkipped = 0), (r.raycastsDone = 0), (r.prototype.findNeighourPanos = function () { return ( this.model.panos.setNeighbour(this.id, this.id, !1), this.model.panos.forEach( function (e) { if (e !== this && (!this.model.panos.neighbourMap[this.id] || void 0 === this.model.panos.neighbourMap[this.id][e.id])) { var t = this.position.distanceTo(e.position) if (t > a.panoramaNeighbourMaxDistance) return this.model.panos.setNeighbour(this, e, !1), void r.raycastsSkipped++ var i = e.position.clone().sub(this.position).normalize(), n = new s.Raycaster(this.position, i.clone(), 0, t).intersectObjects(this.model.colliders) r.raycastsDone++, this.model.panos.setNeighbour(this, e, 0 === n.length), a.showNeighbourRaycasts && (n.length ? this.floor.model.add(new s.ArrowHelper(i, this.position, n[0].distance, 16711680)) : this.floor.model.add(new s.ArrowHelper(i, this.position, t, 16777215, 0, 0))) } }.bind(this) ), this.model.panos.neighbourMap[this.id] ) }), (r.prototype.worldPosition = function () { return this.position }), /*r.prototype.addTextSprite = function(text, color, parent, scale=1) { this.removeTextSprite(); var ratio = 16; var i = document.createElement("canvas") , n = i.getContext("2d"); i.width = 1024, i.height = i.width / ratio; n.font = " 30px Arial", n.fillStyle = "white"; var r = n.measureText(e).width; n.fillText(e, (i.width - r) / 2, (i.height + 60) / 2); var o = new s.Texture(i); o.needsUpdate = !0; var a = new s.SpriteMaterial({ map: o, color: color || 16428055, depthTest:false }); this.text3d = new s.Sprite(a) if(parent){ parent.add(this.text3d) }else{ this.text3d.position.copy(this.skyboxMesh.position) this.floor.add(this.text3d) } this.text3d.scale.y = scale/ratio this.text3d.scale.x = scale } r.prototype.removeTextSprite = function() { this.text3d && (this.text3d.parent.remove(this.text3d), this.text3d.material.map.dispose(), this.text3d = null) } */ (r.prototype.addTextSprite = function (text = this.id, color, parent, scale = 1) { this.removeTextSprite() this.label = new TextSprite({ /* sizeInfo: { minSize: 50, maxSize: 300, nearBound: 0.2, farBound: Math.max(20, this.model.size.length() / 3), farBoundPlan: 250, }, */ renderOrder: 8, backgroundColor: { r: 255, g: 255, b: 255, a: 0 }, textColor: { r: 255, g: 255, b: 255, a: 1 }, textshadowColor: '#888', text, fontsize: 20 * scale }) if (color) { this.label.children[0].material.color.set(color) } if (parent) { parent.add(this.label) this.label.position.z = 0.1 } else { let position = this.floorPosition.clone() position.y += 0.4 this.label.position.copy(position) this.floor.add(this.label2) } }), (r.prototype.removeTextSprite = function () { this.label && this.label.dispose() }), (r.prototype.isAligned = function () { return this.alignmentType === c.ALIGNED }), (r.filters = { inDirection: function (t, i, n) { return function (e) { return e.position.clone().sub(t).normalize().dot(i) > n } }, inFloorDirection: function (t, i, n) { return function (e) { return e.floorPosition.clone().sub(t).normalize().dot(i) > n } }, inPanoDirection: function (n, r, o) { return ( (o = a.navigation.panoScores ? a.navigation.filterStrictness : o), function (e) { var t = e.floorPosition.clone().sub(n).normalize(), i = e.position.clone().sub(n).normalize() return t.dot(r) > o || i.dot(r) > o } ) }, atFloor: function (t) { return function (e) { return !t || e.floor === t } }, not: function (t) { return function (e) { return e !== t } }, notIn: function (t) { return function (e) { return -1 === t.indexOf(e) } }, isLoaded: function () { return function (e) { return e.isLoaded() } }, isNotLoaded: function () { return function (e) { return !e.isLoaded() } }, isCloseEnoughTo: function (t, i) { return function (e) { return t.distanceTo(e.floorPosition) < i } }, hasMinimumHeightDifferenceTo: function (t, i) { return function (e) { return Math.abs(e.position.y - t.y) > i } }, isNotBehindNormal: function (t, i) { var n = new s.Vector3() return ( (i = i.clone()), function (e) { return 0 < n.copy(e.position).sub(t).normalize().dot(i) } ) }, isNeighbourPanoTo: function (t) { return function (e) { return !t || !t.neighbourPanos || !!t.neighbourPanos[e.id] } }, isNeighbourOfNeighbourTo: function (n) { return function (i) { return ( !!n.neighbourPanos[i.id] || n.neighbourUUIDs.some(function (e) { var t = n.model.panos.get(e) return !!t && t.neighbourPanos[i.id] }) ) } }, isNotRecentlyFailed: function (t) { return function (e) { return Date.now() - e.failedLoadingAt > t } }, isOnVisibleFloor: function () { return function (e) { return !e.floor.hidden } }, isPanoAligned: function () { return function (e) { return e.isAligned() } } }), (r.sortFunctions = { distanceToPoint: function (i) { return function (e, t) { return e.position.distanceTo(i) - t.position.distanceTo(i) } }, floorDistanceToPoint: function (i) { return function (e, t) { return e.floorPosition.distanceTo(i) - t.floorPosition.distanceTo(i) } }, choose: function (i) { return function (e, t) { return i.id === e.id ? -1 : i.id === t.id ? 1 : 0 } } }), (r.scoreFunctions = { distance: function (t, i) { return ( (i = i || a.navigation.distanceFactor), function (e) { return t ? t.position.distanceTo(e.position) * i : 0 } ) }, distanceSquared: function (t, i) { return ( (i = i || a.navigation.distanceFactor), function (e) { return t ? t.position.distanceToSquared(e.position) * i : 0 } ) }, direction: function (t, i) { return function (e) { return e.position.clone().sub(t).normalize().dot(i) * a.navigation.directionFactor } }, angle: function (t, i) { return function (e) { return e.position.clone().sub(t).normalize().angleTo(i) * a.navigation.angleFactor } }, inFieldOfView: function (t, i) { return function (e) { return 0.75 < e.position.clone().sub(t).normalize().dot(i) ? 10 : -1 } }, optionality: function (t) { return function (e) { return ( e.neighbourUUIDs.filter(function (e) { return !(e in t.neighbourUUIDs) && e !== t.id }).length * a.navigation.optionalityFactor ) } }, penalizeHeightDifferenceUnder: function (t, i) { return function (e) { return t.y - e.position.y < i ? -20 : 0 } } }), (M.exports = r) }).call(this, '/js/objects/Panorama.js') }, { '../enum/AlignmentType': 17, '../enum/GLCubeFaces': 25, '../enum/PanoRendererEvents': 35, '../enum/PanoSizeClass': 36, '../enum/PanoramaEvents': 37, '../enum/RenderLayers': 41, '../enum/RenderOrder': 42, '../enum/TileDownloaderEvents': 45, '../enum/Viewmode': 51, '../exception/BasicException': 55, '../scene/SceneRenderer': 158, '../settings': 166, '../tile/TileUtils': 174, '../util/ajax': 181, '../util/common': 185, '../util/lerp': 188, '../util/logger': 189, '../util/panorama': 191, '../util/texture': 194, '../util/transitions': 195, events: 202, three: 217 } ], 149: [ function (e, t, i) { 'use strict' function n(e) { var t = r.UniformsUtils.clone(c.waypoint.uniforms) ;(t.map.value = d), (t.opacity.value = 0), t.color.value.set(o.reticuleColor), (t.showMouseMarker = !window.DATA.hideMouseMarker) r.Mesh.call( this, new r.PlaneBufferGeometry(0.4, 0.4, 1, 1), new r.RawShaderMaterial({ side: r.DoubleSide, depthWrite: !1, depthTest: !1, transparent: !0, vertexShader: c.waypoint.vertexShader, fragmentShader: c.waypoint.fragmentShader, uniforms: t, name: 'waypoint', opacity: 0, visible: t.showMouseMarker }) ), this.layers.set(h.RETICULE), (this.renderOrder = u.reticule), (this.player = e), (this.direction = new r.Vector3()), (this.hidden = !0), (this.mouseLastMoveTime = Date.now()) } var r = e('three'), o = e('../settings'), a = e('../util/transitions'), s = e('../util/texture'), l = e('../util/lerp'), c = e('../shaders'), h = e('../enum/RenderLayers'), u = e('../enum/RenderOrder'), d = s.load('images/reticule.png') d.anisotropy = 4 //各向异性 ;((n.prototype = Object.create(r.Mesh.prototype)).move = function (e, t, i) { ;(this.hidden = i), (this.mouseLastMoveTime = Date.now()) }), (n.prototype.hide = function () { this.hidden || ((this.hidden = !0), a.start(l.property(this.material.uniforms.opacity, 'value', 0), o.reticuleOpacityTransitionTime)) }), (n.prototype.show = function () { ;(this.hidden = !1), this.material.opacity <= 0 && a.start(l.property(this.material.uniforms.opacity, 'value', o[this.player.mode].reticuleOpacity), o.reticuleOpacityTransitionTime) }), (n.prototype.update = function () { Date.now() - this.mouseLastMoveTime > o.hideReticuleTimeout && !this.hidden && this.hide() }), (n.prototype.updatePosition = function (e, t) { if (!this.hidden) { if (!t) return this.hide() var i = t.point, n = e.distanceTo(i), r = 1 + 0.01 * n n < 1 && (r -= 1 - n), this.show(), this.scale.set(r, r, r), (this.direction = this.direction.multiplyScalar(0.8)), this.direction.add(t.face.normal.clone().multiplyScalar(0.2)), this.position.copy(i).add(t.face.normal.clone().multiplyScalar(0.01)), this.lookAt(this.position.clone().add(this.direction)) } }), (n.prototype.writeAstag = function () { var e = Math.floor(4294967296 * (1 + Math.random())).toString(16) + Math.floor(16 * (1 + Math.random())).toString(16), t = new Date() this.tagCount = void 0 === this.tagCount ? 1 : this.tagCount + 1 var i = { enabled: !0, version: '0', created: t.toISOString(), created_by: 'APITest', position: this.position.clone(), stem: { enabled: o.tags.pole.enabled, direction: this.direction.multiplyScalar(o.tags.pole.height) }, label: 'tag ' + this.tagCount, description: 'Description ' + e, floor: (function (e) { if (e.currentFloor) { var t = e.floors.indexOf(e.currentFloor) return -1 < t ? t : void 0 } })(this.player.model), type: 'info', metadata: { preferred_camera: { mode: this.player.mode } } } console.log('--------------------------'), console.log(JSON.stringify(i)) var n = this.player.model.addtag(e, i).build() n && (n.disc && this.player.tagDiscs.push(n.disc), n.visible || n.show(o.tags.startup.fadeInDuration)) }), (t.exports = n) }, { '../enum/RenderLayers': 41, '../enum/RenderOrder': 42, '../settings': 166, '../shaders': 167, '../util/lerp': 188, '../util/texture': 194, '../util/transitions': 195, three: 217 } ], 150: [ function (e, t, i) { 'use strict' function n(e, t) { ;(this.chunks = []), (this.floorId = e), (this.roomId = t), (this.position = new l.Vector3()) } var l = e('three') ;(n.prototype.addChunk = function (e) { this.chunks.push(e) }), (n.prototype.calcBoundaries = function () { for (var e = new l.Vector3(), t = new l.Vector3(0, 0, 0), i = new l.Vector3(0, 0, 0), n = new l.Vector3(0, 0, 0), r = 0, o = 0; o < this.chunks.length; o++) { var a = this.chunks[o].geometry.attributes.position if (a) for (var s = 0; s < a.array.length; s += 3) e.set(a.array[s], a.array[s + 1], a.array[s + 2]), t.add(e), 0 === s ? (i.copy(e), n.copy(e)) : (i.max(e), n.min(e)), r++ } 0 < r ? (t.multiplyScalar(1 / r), (this.average = t)) : (this.average = null), (this.boundsMax = i), (this.boundsMin = n), (this.center = new l.Vector3()), this.center.copy(i).sub(n).multiplyScalar(0.5).add(n) }), (t.exports = n) }, { three: 217 } ], 151: [ function (o, v, e) { ;(function (e) { 'use strict' function t(e, t, i) { ;(this.obj3d = null), (this.nodes = []), (this.colorHull = []), (this.shortPaths = {}), (this.floorHull = null), (this.cameraHull = null), (this.floorPathDistance = 0), (this.floorCurvePoints = null), (this.floorCurveColors = null), (this.camCurvePoints = null), (this.warpDestHeroLoc = null), (this.warpDestPano = null), (this.warpPathPoints = null), (this.warpPathLengths = [0]), (this.warpLength = 0), (this.closeWarpDistance = 4), (this.UP = U.UP.clone()), (this.longestStep = 0), (this.upcomingTransType = null), (this.burnsDir = 1), (this.prevNextDist = 0), (this.nextI = 0), (this.activeTransType = null), (this.lastTransType = null), (this.bunnyObj = null), (this.director = e), (this.player = t), (this.playerControls = i), (this.modelManager = t.modelManager), this.updateModel(), this.updateDefaultsFromModelData(), this.bindEvents(), (this.warping = !1), (this.waitingToWarp = !1), (this.warpInterrupted = !1), (this.warpInterruptionBlackoutStyle = null), (this.warpInterruptionTravelTime = null) } var c, h, u, d, p, f, a, s, P = o('three'), i = o('../util/logger'), O = o('../enum/Viewmode'), A = o('../enum/RenderOrder'), L = o('../enum/WarpStyle'), D = o('../settings'), N = o('../util/math'), F = o('../util/lerp'), B = o('../util/easing'), V = o('../util/transitions'), l = o('../objects/Snapshot'), k = o('../effects'), C = o('../shaders'), n = (o('../gui/gui'), o('../util/texture')), U = o('../enum/Vectors'), H = (o('../model/ModelManager'), new i(e)), g = o('../enum/PlayerEvents'), z = o('../enum/BlackoutStyle'), r = o('../enum/ModelManagerEvents'), m = o('../constants'), I = { path: n.loadBase64( 'iVBORw0KGgoAAAANSUhEUgAAAIAAAAAgCAYAAADaInAlAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKxGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjarZZnUFP5Gsbfc046CS0hAlJCb4IU6dJrAAXpYCMkIQmEEFJQsKEiruBaEBHBsqIrIAquBZC1IBZsi2DvC7IoqOtiwYbK/cAS7r1z74c7c9+ZM/ObZ97/c57/OV8eAOogRyoVo5oA2RKFLDYskJWcksoi/g54oIEmUMCUw5VLA2JiouA/DwLw4Q4gAAA37TlSqRj+t9Hi8eVcACQGANJ5cm42AHIMAOniSmUKAKwIAMwWKaQKAKwOABiy5JRUAOwkADAE49wNAIz0cf4DABiy+NggAOwTAInK4cgEAFQcALDyuAIFANUcABwlPJEEgBoPAL5cIYcHQC0HgGnZ2Tk8AGo7AFin/5OP4F8801WeHI5AxeN3AQAAUrBILhVz8uH/Pdli5cQ7TAGAKpSFxwKAJQBSl5UTqWJJ+uzoCRbxACZYqAxPmGCuPCh1gnmc4MgJVmYlBEwwRzZ5VqRgx0+wLCdW5c+Xh8Sp/PnsKFUG8WwVZ4hC2RNcIIxPmuA8UeLsCZZnxUVO7gSpdJkyVpU5QxaqumO2fDIblzOZQSGMD5/MlqzKwOMHh6h0SYJqX6oIVHlKxTGqfb44TKXL8+JUZxWyeJWeyYmImfSJUX0fiAchKEECPOCDDNIhB8SgABYEgwjkIAUxcCAfQMFfrAAACMqR5stEAqGCFSCVivkstoTrMI3l7OjkCpCcksoa/+XvmIAAAMK8MqnltgN4lgAggkmNYwZw4hkA/cOkZvYWgLoJ4FQ3VynLG9dwAAB4oIAGMEAPjMAMrMEenMENvMEfQiACoiEeUmABcEEI2SCDRbAUVkIxlMIm2ApVsBv2Qh0cgiPQAifhLFyEq9ANt+Eh9MIAvIRh+ACjCIIQERpCR/QQY8QCsUOcEQ/EFwlBopBYJAVJQwSIBFEiS5HVSClShlQhe5B65BfkBHIWuYz0IPeRPmQIeYt8QTGUijJQQ9QSnY56oAFoJBqPzkcFaC5agBahG9BKtAY9iDajZ9Gr6G20F32JjmCAqWFMzASzxzywICwaS8UyMBm2HCvBKrAarBFrwzqxm1gv9gr7jCPg6DgWzh7njQvHJeC4uFzcctx6XBWuDteMO4+7ievDDeO+42l4A7wd3gvPxifjBfhF+GJ8BX4//jj+Av42fgD/gUAgMAlWBHdCOCGFkElYQlhP2EloIrQTegj9hBEikahHtCP6EKOJHKKCWEzcTjxIPEO8QRwgfiKpkYxJzqRQUipJQlpFqiAdIJ0m3SA9J42SNckWZC9yNJlHzidvJO8jt5GvkwfIoxQtihXFhxJPyaSspFRSGikXKI8o79TU1EzVPNXmqInUCtUq1Q6rXVLrU/tM1abaUoOo86hK6gZqLbWdep/6jkajWdL8aak0BW0DrZ52jvaE9kmdru6gzlbnqa9Qr1ZvVr+h/lqDrGGhEaCxQKNAo0LjqMZ1jVeaZE1LzSBNjuZyzWrNE5p3NUe06FpOWtFa2VrrtQ5oXdYa1CZqW2qHaPO0i7T3ap/T7qdjdDN6EJ1LX03fR79AH2AQGFYMNiOTUco4xOhiDOto68zQSdRZrFOtc0qnl4kxLZlsppi5kXmEeYf5ZYrhlIAp/CnrpjROuTHlo+5UXX9dvm6JbpPubd0veiy9EL0svc16LXqP9XH6tvpz9Bfp79K/oP9qKmOq91Tu1JKpR6Y+MEANbA1iDZYY7DW4ZjBiaGQYZig13G54zvCVEdPI3yjTqNzotNGQMd3Y11hkXG58xvgFS4cVwBKzKlnnWcMmBibhJkqTPSZdJqOmVqYJpqtMm0wfm1HMPMwyzMrNOsyGzY3NZ5kvNW8wf2BBtvCwEFpss+i0+GhpZZlkudayxXLQSteKbVVg1WD1yJpm7Weda11jfcuGYONhk2Wz06bbFrV1tRXaVttet0Pt3OxEdjvteqbhp3lOk0yrmXbXnmofYJ9n32Df58B0iHJY5dDi8Hq6+fTU6Zund07/7ujqKHbc5/jQSdspwmmVU5vTW2dbZ65ztfMtF5pLqMsKl1aXNzPsZvBn7Jpxz5XuOst1rWuH6zc3dzeZW6PbkLu5e5r7Dve7HgyPGI/1Hpc88Z6Bnis8T3p+9nLzUngd8frL2947y/uA9+BMq5n8mftm9vuY+nB89vj0+rJ803x/8u31M/Hj+NX4PfU38+f57/d/HmATkBlwMOB1oGOgLPB44Mcgr6BlQe3BWHBYcElwV4h2SEJIVciTUNNQQWhD6HCYa9iSsPZwfHhk+Obwu2xDNpddzx6OcI9YFnE+khoZF1kV+TTKNkoW1TYLnRUxa8usR7MtZktmt0RDNDt6S/TjGKuY3Jhf5xDmxMypnvMs1il2aWxnHD1uYdyBuA/xgfEb4x8mWCcoEzoSNRLnJdYnfkwKTipL6k2enrws+WqKfooopTWVmJqYuj91ZG7I3K1zB+a5ziued2e+1fzF8y8v0F8gXnBqocZCzsKjafi0pLQDaV850Zwazkg6O31H+jA3iLuN+5LnzyvnDfF9+GX85xk+GWUZgwIfwRbBkNBPWCF8JQoSVYneZIZn7s78mBWdVZs1Jk4SN2WTstOyT0i0JVmS8zlGOYtzeqR20mJpb65X7tbcYVmkbL8ckc+XtyoYCqnimtJauUbZl+ebV533aVHioqOLtRZLFl/Lt81fl/+8ILTg5yW4JdwlHUtNlq5c2rcsYNme5cjy9OUdK8xWFK0YKAwrrFtJWZm18rdVjqvKVr1fnbS6rciwqLCof03YmoZi9WJZ8d213mt3/4D7QfRD1zqXddvXfS/hlVwpdSytKP26nrv+yo9OP1b+OLYhY0PXRreNuzYRNkk23dnst7muTKusoKx/y6wtzeWs8pLy91sXbr1cMaNi9zbKNuW23sqoytbt5ts3bf9aJay6XR1Y3bTDYMe6HR938nbe2OW/q3G34e7S3V9+Ev10b0/YnuYay5qKvYS9eXuf7Uvc1/mzx8/1+/X3l+7/Viup7a2LrTtf715ff8DgwMYGtEHZMHRw3sHuQ8GHWhvtG/c0MZtKD8Nh5eEXv6T9cudI5JGOox5HG49ZHNtxnH68pBlpzm8ebhG29LamtPaciDjR0ebddvxXh19rT5qcrD6lc2rjacrpotNjZwrOjLRL21+dFZzt71jY8fBc8rlb5+ec77oQeeHSxdCL5zoDOs9c8rl08rLX5RNXPK60XHW72nzN9drx31x/O97l1tV83f16a7dnd1vPzJ7TN/xunL0ZfPPiLfatq7dn3+65k3Dn3t15d3vv8e4N3hfff/Mg78How8JH+EcljzUfVzwxeFLzu83vTb1uvaf6gvuuPY17+rCf2//yD/kfXweKntGeVTw3fl4/6Dx4cih0qPvF3BcDL6UvR18V/6n1547X1q+P/eX/17Xh5OGBN7I3Y2/Xv9N7V/t+xvuOkZiRJx+yP4x+LPmk96nus8fnzi9JX56PLvpK/Fr5zeZb2/fI74/GssfGpBwZBwAAMABAMzIA3tYC0FIA6N0AFPXxzvx310cmW/9/4/FeDQAAbgC1/gAJhQBR7QC72gEsCse7dQwAxPsD6uKiev4eeYaL87gXVQaA/zQ29s4QgNgG8E02Nja6c2zs2z4A7D5Ae+54VwcAIGgClFnpWusMd8e8L/z3zvwPWFMLsyHkoksAAD+UaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzA2NyA3OS4xNTc3NDcsIDIwMTUvMDMvMzAtMjM6NDA6NDIgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoTWFjaW50b3NoKTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8eG1wOkNyZWF0ZURhdGU+MjAxNS0wNy0yMVQxODoyMDo1My0wNzowMDwveG1wOkNyZWF0ZURhdGU+CiAgICAgICAgIDx4bXA6TWV0YWRhdGFEYXRlPjIwMTUtMDctMjFUMTg6MjE6MzgtMDc6MDA8L3htcDpNZXRhZGF0YURhdGU+CiAgICAgICAgIDx4bXA6TW9kaWZ5RGF0ZT4yMDE1LTA3LTIxVDE4OjIxOjM4LTA3OjAwPC94bXA6TW9kaWZ5RGF0ZT4KICAgICAgICAgPGRjOmZvcm1hdD5pbWFnZS9wbmc8L2RjOmZvcm1hdD4KICAgICAgICAgPHhtcE1NOkluc3RhbmNlSUQ+eG1wLmlpZDoyYWI5MzcwNS0xYjZjLTQ1ZGMtYTQyNy1jYWQzOGNiZTUxYjM8L3htcE1NOkluc3RhbmNlSUQ+CiAgICAgICAgIDx4bXBNTTpEb2N1bWVudElEPmFkb2JlOmRvY2lkOnBob3Rvc2hvcDpjYjc1NjFhOC03MDlhLTExNzgtOTQ1Zi1kNDlkZmJlYjBjMWE8L3htcE1NOkRvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+eG1wLmRpZDpjZjg0YWIzMi1lNTA2LTRkYzUtOGUxZC01MjgxMjhhN2NlOWM8L3htcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkhpc3Rvcnk+CiAgICAgICAgICAgIDxyZGY6U2VxPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jcmVhdGVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6Y2Y4NGFiMzItZTUwNi00ZGM1LThlMWQtNTI4MTI4YTdjZTljPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE1LTA3LTIxVDE4OjIwOjUzLTA3OjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoTWFjaW50b3NoKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6MWIzNzcxZGMtZGU3Ni00YTQ4LTkzNjEtMGQ4NzdkOWY0ODkwPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE1LTA3LTIxVDE4OjIxOjM4LTA3OjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoTWFjaW50b3NoKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPmNvbnZlcnRlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6cGFyYW1ldGVycz5mcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nPC9zdEV2dDpwYXJhbWV0ZXJzPgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgICAgPHJkZjpsaSByZGY6cGFyc2VUeXBlPSJSZXNvdXJjZSI+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDphY3Rpb24+ZGVyaXZlZDwvc3RFdnQ6YWN0aW9uPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6cGFyYW1ldGVycz5jb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZzwvc3RFdnQ6cGFyYW1ldGVycz4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgICAgIDxyZGY6bGkgcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6YWN0aW9uPnNhdmVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6MmFiOTM3MDUtMWI2Yy00NWRjLWE0MjctY2FkMzhjYmU1MWIzPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE1LTA3LTIxVDE4OjIxOjM4LTA3OjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoTWFjaW50b3NoKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8eG1wTU06RGVyaXZlZEZyb20gcmRmOnBhcnNlVHlwZT0iUmVzb3VyY2UiPgogICAgICAgICAgICA8c3RSZWY6aW5zdGFuY2VJRD54bXAuaWlkOjFiMzc3MWRjLWRlNzYtNGE0OC05MzYxLTBkODc3ZDlmNDg5MDwvc3RSZWY6aW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+eG1wLmRpZDpjZjg0YWIzMi1lNTA2LTRkYzUtOGUxZC01MjgxMjhhN2NlOWM8L3N0UmVmOmRvY3VtZW50SUQ+CiAgICAgICAgICAgIDxzdFJlZjpvcmlnaW5hbERvY3VtZW50SUQ+eG1wLmRpZDpjZjg0YWIzMi1lNTA2LTRkYzUtOGUxZC01MjgxMjhhN2NlOWM8L3N0UmVmOm9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPC94bXBNTTpEZXJpdmVkRnJvbT4KICAgICAgICAgPHBob3Rvc2hvcDpDb2xvck1vZGU+MzwvcGhvdG9zaG9wOkNvbG9yTW9kZT4KICAgICAgICAgPHBob3Rvc2hvcDpJQ0NQcm9maWxlPkRpc3BsYXk8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTI4PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjMyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz6SKsKfAAAAIGNIUk0AAG11AABzoAAA/N0AAINkAABw6AAA7GgAADA+AAAQkOTsmeoAAAOCSURBVHja7FtRi9ZADJxETzkQRf3/P9FTREQ9bXwpUvYyk+x3PiawtPS6/UozmUyyexYROO0OwItzOICX57g7j68u4/U57pfzewDvAXxcjh8AvAPwFsCb83ljuf0G8A3A13N8AvAZwMN5/gDgC4DvAH4s4+d5fATw6xyPAP5cjtfx6JcfjuRl7Lxu5GXjcp8lc7Nnx/hY2rGcW/JNlU+c+Mmyb+/EYdlEBpDKjABkjH8vFWxVAAW5toIgGFquL2FLlDNErUyRzTnGt20LcW7NAFTs/G+uF2hhP+KCKa7zjuQ5wwR7LGDi75mTbbkWimFcUHYkkRwLSNRLZekjRgO0GSAKBr4y7yGeIwOuKwI7uSrIvLhBNwwD8MCCCFBbwGCVCPeGas9yfZYmgoDGyH1jmgGy75h9a1tYg6Vny0Dhzei2BTSWRPmKNicIHOs5nwWlCjQIFo+MNZQIZKVHCJa4vtQxOf9Z9B8b6ZcBKEQpHkwDmEgHVb8gA5VNBXAzC1jBBkyrHYSln1Rj3mwmdOlGiZVhg9t6AJ0G3CHmKuBQAFTlBFP4saA3EqEyVqcAE9VUFdVW9A7QqQKqvn6QFzVRekxLuA+AaDR/lJ+iUVmEEoHsWizAMdK06LDHWG4H8kWfTipQ5XkKHm+gMaOnIDUmGtXD2F4TKDYYuttClhrARPSuVBJCcIAgeVLAfi+ARXrcEHBWlYEg9T2aFAQiTGJRrGO6CjiEAOyIvRDs0C4DoxB1IdgkCmCM5eaLg00wg9Jrnvgy1kDsVgHMwUaYIjufdYB9HRBLjW8bDBJFKvEqBWTNhm6f2gn9T/T3HFh1ZdVyPBORqU7zotbPqAmiCcQ0wUT/bTqAAcFEeraiX1NWAQwMCkms73y93wcEWzoA4Ov+rETMloplC943Kagj8kB+eNLAXjMoim+WNdiOokfwBAzVaiCr7x29JUlLxOCwQC0A15EtrWe7fzos29IAlbiIhgaYrWDPF4HVPUpzKT+VKSCj8o6g6+wDHCDsCUGgXvQxUSGorfo0BWRUrh6OQm3OruD9FACiqyqwOPQ+AroaaM2HZ6jKjtYUk2M5vXvh8Crdtpp83U2h1b8lOZ5uCwv09reN1WW4LeLbGvpKtfFlCsjyjxGVupYfFVCGBfZKwayFfv3G3mQUxhyt/QBRqFRD/m9hPj78byxggnUrMW7Kn38HAONAllI0EmS1AAAAAElFTkSuQmCC' ), pathEnd: n.load('images/End.png'), pathStart: n.loadBase64( 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAM6VJREFUeAHtfQl0HNWZ7r3VXd2SLLEa2xgc2ySGxwOMiSRsC2IsG1vbMCGGsCYsWcibGSAhEEJeFkyIhyRAkknmvXOGJBMggQAhDAlIsjFY4NjCtqSwH55xDjYDAWN2JGvp6q77vr/UMpLcS3V3Lbeqbx3L3V1177989///uvvlTF2BRmBx96uVNbFpsyMiMpcx83Cu8UOh0FQm6FMcyuk7YwcLxivwGWOcxXEvxgSLW7/xH64E7o8I+hRshH5zJobx+R7uvc0Yf4dx8Q5+vy1M+tTeSPHUzv7EnleebJg1hPvqCigCsAV1yY7A0q6uaGVlw9EiwuZzTTueC34UnBsOz+dwzmb4Kb8QbDdk2QVZdgouXham+TxPsWeHhrpferyxMemnbIp3fgRUAMiPkacplnbtrKioObIOBbOQMz4fzjWfcX4sftMbOzAXag4jTIgXERieFUzgj20d7n+t9/HGuVSzUJckCKgA4HNBtGzsP4xVVZ4CRz9F4wyfvBYixXwWyy32CejZZwq2GXpuZoNDmzuX1LzlFjNFNz8CKgDkx8jRFLW9vfoMduKpqDq3oPregrf78Y4yCBoxIZ4HFp3AonM3e2ZTX12dETQVgiyvCgAelN6KTXtn6nH9DDg7nJ4vB8tqD9gGkcWAEOIxNB06jRHjofWnTnk9iEoESWYVAFwqreVbBqbH9djZ6LA7V3B+KoBWWBeANfoM0KcoNuG/e0eMxP2PLap+s4DsKqlNBJRR2gTKTrKm7g8OieiVn8Wb/ly86U9DHs1OPpUmLwImagZPoGZwb8oY+sO6hgPfzZtDJbCFgAoAtmDKnai5x1iqcf5lpFqFtiyNt6vLJQTQX0CjCA8gIvxybb3+uEtsyoasCgBFFvXKzf3TIrGKSzSNfQm1+3lFklHZSkJA7DBN9qtUYvj2R06p2VMSqTLNrAJAgQXftDVxYiSqXY0Zc+fhba8XmF0ldwEB1AoM9LDck0qat65bGHvGBRahJakCgM2ibe4zmiKMXYO3/ek2s6hkviAgHk0xdsvaWn2dL+wDxlQFgFwFdt99kZa5Z16IDr1r8HdCrqTqmVwIoNPwOfzd0rnzwbvYOecgJqgrEwIqAGRCZfVqrbXtW+cyrq2G4x+dKYm6FwwEEAReYsJc3dF+071s9WozGFJ7J6UKABOx5q09SfTkixswlHfcxEfqV6AREOIFIfj1HfXRB6AHphmoixBQASBtB609xgqg8WO88Rco0wgvAqgRPA33v7ajXl8fXi3ta1b2AWDFluF5uh65FSvvzrAPm0oZdASwQvEhw0hdvX5RxY6g61KK/GUbAFq2vHMAix7wXUzguRIAhnX1XSm2UQ55E5hQ9HOW/PDGzkWHflgOCk/WsSwDQOu2xKUsov0Qyk+bDIj6XX4IoENgD0uZ13WcHPtNuWlfVgGgqXv4E5FY5Da08xvLraCVvvkRQP9AVyqRumxdQ8Xf8qcOR4qyCADWllrVp34d1f3V6OirDEfRKS1cQUCwITQLVg8NbPpJOWxpFvoA0NKTOAlv/F/j7yRXDEYRDSUCqA08hb8vdtbHngqlgmmlQr1ctaUv8TXOta3K+cNswu7oRjZDtkM25A4HOaiGsgbQ9pf3DxaVU36DQvy0HDArKYKMAGoCf+JDey9t/9RB7wVZj0yyhy4AtPYmFmIK771QbHYmhdU9hUAxCGCk4BVMKT63oy62tZj8suYJVROgtdf4Ojbh+YtyflnNLbhyjdqU9pdRGwuuHpMlD0UNwNqKK151u5rNN7l41W83EKBZhKmRwUvCsDVZ4ANA81ZjcSTC78Hw3sfcKGxFUyGQEQHB/juVEuetXag/mfF5QG4GuQnAW/uMb2gRvlE5f0CsLUxi4oVDtkc2CLUC+yINpOB0fFbVAUfehSr/qjDZlNIlmAigSfDA4IevXRjEY88CFwBO7333wBiv+TOcf0kwzUVJHUYEEAQ2JkT/Pz5ad8gHQdIvUAGgqXfv4REeWwvnx6GZ6lIIyIUAgsCzKZFoXlc35Q25JMsuTWACwOi6/egjEHhOdnXUE4WAvwhgvsAuw0iuDMo+A4EIAK1bE3UsqnVA2MP8LV7FXSGQHwEEgbdY0mztWBjrzZ/a3xTSjwK09Rin86jWpZzfX0NR3O0jQLZKNku2az+XPymlDgDNPSPnMY23Axp1mq4/9qG4Fo9ANdmuZcPF03A9p7QBoK03cYWmRe4GAmq7LtfNQDFwCYEY2TDZskv0SyYrZR8AJldcj57+1SVrV2YE0PbcixN0X8IqyO3Y1OIljYm3hckGBNf6hSb6IymGT7PfNMx+QzP6d7/yaj9BNGP2rBrd1Gs0XavhplaTijB88houzBqusWqT8anYTOVorIo7BtulHw2jmVJm0JasLkYIVnfU6jeUTMhhAtIFACtacu3nDusZNnKvw9Gfg8Nv50xsT5l8OzeN7Z2Lql7zQtGWLYNHCk0/JqKJYwTjx8CIKDDQyUkzveAfWB7CvLK9LvYLmeSXKgBQe4mqTBBKKrn8LjCrV1mwLixH3WCkzA2yDjFZQ7URbRmWY+OPNaIQ1ajNOONBOQrTTF2wtj5+z7jbvn6VxtGsHtPRDj/V5mfsfVS3n4C9bMBfV0dd/HlYCewnUBdv7R05HrG8EX/L0Cw5DdIfFCgN3BE2wUzR1l6vP+oO+cKoShEAaJyfhk0gevn29gu0zzm73zTFnWvb12wM3Tl2OG+xue3bSzSNX8QFOxs1hJrCTDVUqQdE0myUYZ6A7wEgPcNvMwQpv+qiYCnBxXpmmne+Z+x58MmGWUOhMvMsyizufrXyYH3amUzTEAw4HcmGk9fL60J17i3MGDzF7+acrwFgdG5/vBtCzCmz4n9GCHYnM0fu7ji5end56T5R29ZtAzOYFr+Ac3YRmgonTnwa7l8IArtSYqTBz7UDvgWA9Kq+jWW0sMdEz/0DjIsfttfG+sJt2sVp19aXqGWCX4cRBVrmLe0cleK0y5yLFhBhFeESv1YR+hIA0uv515XDkl686ZOo4v6eJ1I3tS+Ov5jZDNTd8Qi0PTlyrIhFvoVuz/NRM4iOfxbG7wgCG7GfQJMf+wn4EQB4W6/xR0T5z4SxMMfplMD3242k8cNHFlbuHHdffbWJwMqtQ3P1qH4dkl+Cv1CPDiEIPICJQmdDT7QMvLs8DwAtPca16An+kXcqesxJsEFU9W8bMoxbNjRU/d1j7qFkt6x78IhKXb8GL43LUJuqCqWSUApB4FoEgZu91M/TAEAbeNI+aqGt1gn2h6FE4irl+O6YsBUIYrGfIgh81h0O/lKl5qKZEku83GjUswBAW3dHY1OeQuGFcPdescMU7PLOOv0Rf02oPLi39BorNc7+HaMG80KnMXYbTib2nuTVluNe9bTyCPbtD53zj54k+z3zzV0nKOf3zhUJa8IcC56+h3pzuOZO4AVp+YpHcHpSA0DEvhqryW7xSCdP2GCqbnsylbxCdfB5AndWJtRRGI1Ef4Gpxm1ZEwXwAYLbNQh0t7otuusBAKerLuJCo3a/7rYyntAX7E201b7SUR/9kyf8FBNbCLT2JD8NG/sP1DKn28ogeSLYmCG4uaSzNrbFTVFdDQDWKb1V1U+ByWw3lfCKNt76XZi9d0G5z97zCu9C+aRnFd6N2kBjoXllTI/xwFf44MBJbp5K7GofgHVEdzic3xSmuKHj4TWnK+eX0VVGZaKyoTKissIdU15J7UlGL07yIXupi0sFHu5crT2Jq7im/cQd6t5RRVVsNxbsXNhZq2NprrqCgkBLn7EMC43uQrNgRlBkzianycyr0BT4Wbbnpdx3JQA09SY+GWHaluC3+8Vjw8bIhY8tqn6zFJBVXn8QWL5lYHqFHr8Lw4XL/ZHAGa5Wf4AwF3bWx55yhuJHVBxvAizt6opGGP9VkJ0fbS9MyhLXtz+0ZqVy/o+MJWjfqOyoDKksrTINmgJpecmX0K/xa/Itp1VwvAYQ9Km+FG1NkbpIpm2bnC70cqRnbTfHI3cG+cWEzWK+2Vmv/9jJ8nM0ADR1D38iGos+i6GYSieF9JDWADqQVnXU6+s95KlYeYRAa4+xgmv8AbAL5s5TmPSUTCTnr2uo+JtTkDnaBIjEIrcF1flRRXzL2qZJOb9TtiUdHQrsVMZU1tIJZ0cgvFgtH7OT1mYaxwJAS0/iC0Edf4VB7GLJ5Kky7NFms9xUsiIRsMoYZW2VeZE0/MxGPta6LXGpUzI40gRo2fLOAVw/cAeITXNKMK/oYHLPcymWaPJzWyavdFV8PkLA2o6OxdbBoeg8g0BdCF57hPHBvM5Fh35YquDO1ACiB3w3kM7PRPdg/8AS5fylmlHw8lOZU9ljuKc7aNJbvgafc0LukmsAtKtvTI/SvvWB2rGF3vxkAI83Hvy+E0AqGsFEYGnXewdV1VRjrUrgagKJhJE8vtRdhUuuAeh6hFYsBcv5aTdWVPuV8wfTaZ2UmmyAbCGAfQKxtO+VBEdJNYD0sEqgNsFAQb812uFX8VJJyKnMoUKgdevw0Swa3QSHCNT5FBi2XlnKsHUpNQBs6sscnZTggUUNYNOl1o6Fyvk9wDpQLCybgG1A6IFACT7qg0W/yIsOAFh/vQrtpgVBAcuaT02TfBbGeoMis5LTWwTINmgiGNmKt5yL50Y+SL5YLIXiAgDOeePcWnJZLF9P86Haj3JNXVRKVclTgRUz3xAgGyFbIZvxTYgCGVu+CJ8sMJuVvKiqQ2vPyPkcx3gXw9CPPLR3HLZXutEP3opnMBHA2RXfwzbkNwRFeoFjxzvq478vVN7Co8Z992Gxn7a6UEb+pRePdT68Zo1//BXnICLQ/vCaH6AS8FhgZCefJN8s8Cq4BoApvxdpmnZHgXx8SY623O6R5PACtaQ3M/y0XyM9cXvfuczc5b9L+wnEoxVPYwVhIDYVMU3zYuwZcGchyBZcA0Dj/xuFMPAxrUk7+Sjnz14CGtO+Sn/ZU5T3E7IdsiGgEIjtxdAheE2hJVZQAGjuM5rQLjq+UCZ+pEev341qG6/syK/YtHcmakhn0R99z56yvJ+QDZEtBQEFms1o+WgBwhYUANDAKDjCFCCLY0lp996O9jXfd4xgCAnF4rF/Gd1phun0PYQqOqYS2ZK1I7RjFN0jVKiP2u4DaNqaODEa1Z52T3SHKNO+/ebwArV7b3Y86Xj2KTWzXsVErqlWKsHe3tv/6iw/jqfOLqVcT2jLca5VPA3MpD93IJk0F6xbGHvGDoK2awCRqHa1HYJ+p0GV9ivK+XOXwpTqIy7c5/yUFIHAupc7W1k/JZsi2woCCIX4qq0AQL2hmBZxnuzKo5r2sDqxJ38pCY1fOTlVpnuT05T7b7It2Fi79DjAVy2ftSGorQAQi8Qvln4zRdovLZXcz7BtYFBWSTDBpRGLOOZPVpru0bPJ99XviQjQeZCyH0hKvko+O1HyzL9sBQBNY1/KnF2eu9jY4V/VQZ35ywPzW7MO++V6lp9yeaQgGzOZuEl2be36bN4A0NxjLJX/HHaxQ+zZdbPsheK3fHSSLoaKzsgmBz2jNNmeq/tpBPbswipYsUNuPPi8Ud/NLWXeAICJP1/OTcL/p6Zgl3e2zhvxXxK5JYhGo1dAwlxlrqXTyK2Iz9KRrZHN+SxGXvZ2fDfnMGBT9weHROJTXkeieF5ufiUQ7A/tddFz/GIfFL5Lu/ZUV9Uc8hrahwfmkhk93R8M9r975OON04K1Lj6XUi49a+tN3ocRlM+6RL5ksijL4VRi7xHrGg58NxuxXG8DFolVniO58w8OJRJXZVNO3f8Igcrqgy7J5/yUmtJQ2o9yqm/ZELBsT7DBbM/9vo+yrCAfziVHzgAAc8iZORdhT54JcduGhqq/e8Ir2EzQvOdU/bd1pdPmrB3aIhTyRJbtwQblVjO3D2cNANbMJ85Pk1i5xJBh3CKxfNKI1tyTbIFTH21XIEpLeeymL+d0aRtMyIoByvI08uVs8mUNAKj/n4VM2Z9no+jRfQxZ/Ua9/e2BrXGRdegvG4Vi8mSjFeb7ZINkixLrqKV9OaOIWR2cC35uxhwS3ETnRjKZNH4kgSjSi7Cyd+R/oGG/omBBkcfKW3DG8stAtkg2KavmuXw5YwCwlopyfqqsCqHn9fdq0o+90omyyFfRmC+4PU95KK89LuWdyrJF2KSsKAj4crYl3xkDgB7XzyjGaDwCwOSJlPQzsTzCIicbOvUGrv/5nIlyPURei0auNOqZhUDaJqXcOIR8mXw6U1FlDACoMsrbASTEA+2L4y9mUkbdm4hA1QHVX0bhT5l41/4vyks07Oco35SWTcI2pUUgi0/vFwBqe3t19Bwul1WRZADmYUuBnbVBJHdgow/QKGKzSSkw8FoILn7oNUu7/Minybcnp98vAMxgJ1Lbv3pyQjl+i2fW1cX+KocsckvROnfVmXiDzy5VSqJBtEqlUw7522tjfVgjYGsjDh/wqE779gTW+wUA9GZKW/2HbHdOkF79yIoADotwrAPPSVpZBQ7JA5ltNJNv7xcAMH1QzgAgWIqZI4E5jMRPe27dlliAfpxPOSYDaFk0HSMYYkJko2SrEl6ZfHtCAGjZ2H8YDEfKXX+xPfN6tdWXPavimvY1eyntp3KDpn3uwUlpbR0GW5VSYvi25ePjhJsQAFhV5Snjnsn11TRV9d9Giazc3D9NcOe3byOaRNuGCCqJzLY6yccnBgAm5AwAgvW/Z+x5UFlWfgT0eMX/Qsed48u3iSbRzi+BSmHZKmxWTiQm+viEAKBxJmUAwNvn/icbZg3JCag8UtEwj2DcNScl2pmGkuRBQA5JyFbJZuWQZqIUk318XwCgveIxYah2YnI5fpmmUNV/G0UxwzzhXHT0HG4jaVFJiDbxKCpzmWWS12Z57aivjxbIvgBQUXNkHW7FJCyn99e2r9kooVzSiSQi2pVuC+UFD7d18IJ+2mbf94JXgTxiaV+3su0LAGjjLSyQkCfJsQ/7E2z1ainnWHsCgE0mbduMBmztXW8zedHJiAfxKppAuWSEzVq2K6G+4319XADYf694OWQXG+SQQ24pcLCHYxN/8mnqJa98ssj9XE7bHX8uxL4AgCmM82UEMynkBFEmrFq2DB4JeVZ5KNOqNE8PWQaPlby2+5GvWwFgaVdXFBOAjpUNYuy08tYj9fEXZJNLNnl4VKeTfqNeyUW8iKdX/ILKh2yXbFg6+eHrls9DMCsAVFY2HO3G2HHJigvWBRrAUF3ZEFjc/WolqnSeL9klnsQ7m1zqvoUADqyybFgqOMjXyedJKCsAiAiTsvrPhKna/3lM56D49M9h049D8yRz/jF4WrydpxwuipLa8JjPWwEA87ylnP9vpFQAyOcNmtj/pN98eZx67idvp3Rwm46sNjzm81YA0Bj/uNtAFEH/9fWLKnYUka9ssjRvM5b7ungLi0ssGcoG8cIVTdvw64XndDcHNgo9ijiMNgGEmOMuuyKoC/FcEbnKKosWyX7Sr1dAyCCDV7oWzUdKWxZzSR8rAGAK8Bx8l+pCz992qQSSTJiW3uGPoyOuzW+xSAaSxW85ZOYvpy3zOYSZZvUic5b15BBK5MfFmVABIAfwnEXynfSbI7ejj7C+xJLFUaJhIiajLWModwb5vlYTmzZbRrBTJlcBIEvBnLLprRrU2i7N8tiH2/zSUZl8YB0AlrLaMvm+FhERqy0gG47cNFQAyFIoB1YceCki+AFZHnt+m2QhmTxnHBCGstoy+T76AMzDZcMRbaa9nYuqXpNNLknkwQ7P/HJJZNknRlomvu+G+rIPAbJlsul9N6T5Yh6ucY17P4kkDwBcqPZ/Noha+5Lo+OPzsj337z6fNyqbfxJIzVmIl2STj3yfRgGmyiYYdp5R1f8shYIOJc9W/WURIettmWXLKrRnD/j/84yVfUZTNSbkqwEwCaOlfUzdS9myZeR/4u1/unscSqXMTx+VsVQ64cuPRQHyTWqD76MGIKSrAeAginfCZwKla6Tp8p/WGwQZSy+JwingTft24bncziGmYgzXh4UkefTChor9eZKU3eOm7g8Owcqyz0mvOGS0ZJVeUG8FlNGmyfexnoMd4i0UNriZmgoAk2CKxqq+jFV/VZNuy/cTMlqyyieZvxLJadMHUx+A43vIl4o0TgFSAWA8iDidFx2jgdmAw5JVnSg8vgThZvLZNMqpgkYB5AsAKdUEGG89bUetWoXJNrPG35P5O8lKMssso9eyCTltOo6VwPJtBa5FzAGvC0hmfuhBlnboLxtuQZQ5my5O3JfSpuH71Ako3VkApmGqJkDa6tr6ErWYZSfliU25HINkJtlzpSmnZzLaNPk++gDkawIYmqECQNo7BNMC9/Yfc+wgyz6mg1OfUto0fJ/6AKSrAex+5VUVAFAwy7cMTEeUDuxRXCQ76eCUEwWZjqQ2jRqAuqRFIB6J/xOEky5AFwBYLK1DAVlUUi8RoACQ8JKhHV4zZs/Cevfyvo6774UY2tGunfTrFbqkA+niFT9Z+Uhq0wkaBRiRDTTd1Ms+AHxs7rzzUDbBrz5DB0sX2YzMY3mktGn4voZ1ytLVADRdK/sAoGn+bffttG+ESZdisZHRpsn3aRRAuhoAN8s7ADT3Gqdi1V+IhtB47ahOxbpP8PNJadPwfSn7AFIRVtY1gAjzf7tvp10ujDoVgpGkNp3ARCAxXIgiXqTlJi/bALBy2yCm/PLPeIGztzz4Z0Z185arLNxktGnyfaoBvCcLSGNycGGWbQCIRvTL0fmHF2bILuhk6RYyteyqI6lNv0edgO/YVcKrdFxj1V7xkolPbe/rVVg29iWZZHJUFuhm6ego0WAQk9Gm4ftvowbApdupxGRcul2KvDCz6WLq57GSTr79GRxSnnQjHR0iFygycto0fwfzAOTbfkvj/OhAla5TwoZo6C8rJOWgYwblpbRp+D71AUhXAxBCHJMBw1Dfau0xVuCcPWz6Ge6LdCRdw63l/tpJatNva8KUrwaAI6/LrwbAwzf0t78bpO+Uk65jIEho0+T7qAFob4zJKMsnVpFNadkyeKQs8rgtR1P38CcQ9Frd5iMNfehq6SyNQO4KQrZMNu0ul2Koa29oKZ7aWUxWt/MITS+bZoAWi14JA8G/8rhIV9K5PLTFxvuS2jL5vtaf2POKjAUR0cqjH6BlyzsHoBp2iYxl4KZMpDPp7iYPWWjLasvk+9qTDbOGhGC7ZQFrTA7sWFoeNQC95gt495ffxCfSmXQvg0tGWyafJ99HIKZL7LI+JPoP1cTwB4DVqzUutMslgt1TUSzdgYGnTH1gJqctj/p8GnwuXz8A5yf4UFaesmxu+84/YHLMxz1lKhEz0p0wkEgkd0SR0pZHfd4KADi04GV3NC+J6swVW4YlPAa7JJ0mZMbrP7Abfk5QpIQfYccgbcMzS4DIlaxjPj8aAEzzeVe4lEhUj2jLSiQhbfaVPSPHY7us0OpnF3jCgLCwmz5o6WS1YZH2eSsA8BR7VkpgeXgDQJTLf9KvVzYRaiwkteExn7cCwNBQ90tYGSTdzkDoHW+EEaIPJVzX8q0fHgqlLgyXVsVrQ1gQJsVTkDYnZj5bNiyVgOTr5PMklBUAHm9sTDIhXpRKSggDwzgM1cPjZJOrVHnikcrLoFxlqXRCkx9YWJiERqFRRVp70cyDDUunFnzd8nkIZgWAUQG5lM2AaMjayUu7uqIIbf8snVH4LhD/51FsfBfEQQF4o4PEHCT1ka/vCwA4zFHKAABnWeag5r6TqpzScBaGv8pmnYNdwAkTwsZu+mCkk9N2x/v6uADAtsoIKnqJT2MhmiyiRYJ71p/b9hEqbGiSF9muhBf6APb5+r4AMNz/Wi9kle6MAMh0UHPbt5dIiGPBIjVvS9SjRrO44Ixlk4EvHsUo+AqnbfYgCTVJpH3dEm1fAHi8cS52BxZ9EgrMcLDERTLKVahMEU29/fNhFhaM5LVZ0Tfq66MlsS8A0E9TsM35CsiP51ywsxd3vxroXvOm3r2Ho+p1jh/4BYknYURYBUnmybKSrZLNTr4vw+/JPj4hAKB6KmUAwJBZzcH6tDNlALBYGaIs9k/o6NKLzV8u+QgjwirI+lq2Sqsdpbwm+vjEADA4JGcAICA1LbDNgJaOHXHB+VektAcJhSKsCDMJRbMnksy2OsnHJwSAziU1b2FCkJTrArjgK1q3DcywVwJypeLTZ5+PCSHT5JJKXmkIK8JMXgmzS0Y2SraaPYWPT+Dblo+PE2FCAKD72Cigc9xzeb7SaTla/AJ5BCpAEsHLftVfAWiNJg0qZmSjkp7slMm39wsAaIPJGQBgFpAtcM2A1m3GEowHLyjYAco8A2FG2AUNBpltNJNv7xcAdrNnNgH0ATmB5ye29SWCdWx2pIy2+3baaAKG3aht8hOdhsEhegNp355Abr8A0FdXZ+AQg8cmpJLph+DXySROLllaNw/NRnvw07nSqGfZESDsCMPsKSR7IrFtkk+Tb09GbL8AYCUQQtpmANoBq9qeHDl2siIy/hbxaDhP+vUKbLSlLQy94lcCH8smYZslkHA3axafzhgAjBHjIUzIwD8pL03EIt+SUrJxQq1ct3sKJoPLfdIvjfhIOuozBiVhSFiO/Zb1M22TGf3Jb5nJl8mnM8mRUeD1p055nQtBfQFyXoKdv3Lr0Fw5hRuVKnLoIdRhKd1ccPQEv4u//5tKmSe31+kn0B99p3v0TEJMD0pjKaFooyJZtgiblFVA8mXy6UzyZQwAlBCbBt6bKYMM99CbGdWjusx9ATgOnktz8g0cmzZ86UCd7pxXXt5+eEdd9F/WnhzrGStL+k736BmlobRWnrEEPn+mscT0ADkvskWySTmly+3LWUFdvmVgeoVeQVEja5DwWeHE0EjiqA0NVX/3WY792Df3GU0Rxtfu98DrG6jeC87uZKmR33acXF3Q4S/WpKtI/POY034R+l1837QzxUTz2lp9ndcQ5uO3rHvwiMp47GWki+VL69Nzc9gYnvnYouo3M/HP6tyUAT2HT2TKJMm9WKWuXyOJLBPEAKj+TfwR7B1hsv8jkmY9Ve87avWbC3V+UobyUF6iQbSIJmoH70xQ1MMfvmKaQ8+0Dcrq/KjMiSeyOT+plTUAWDoLeZsBlnycX0YR2PouyX+tW4ePxpSlZi/Foeo6CrrdNNlnd728fWZHffTyjoUx2t/BkYtoEU2iTTyIl/dNBN48iq0jKjlCxLI92KAjxNwikseHc7ZbUsbQHyKxKT9D+6bCLflKostZVWUs9lPQkGeZrebhSb+jPfh3jCRHfpsrypeE8bjML5xzXOIFxu7HrfutJmI0/nl8v9iLJgLaqjhJzDpR+PJxIvn61bI92KCvQuRgjiA9TD6cIwltvJv7au1N3oUAIPUcfFOIps46/ZHcmrj/9PTedw+M8wNeA6dq17hRNZyz32P3htvba2NSbOAyOgNOuwRNhPMhm5vbew+MiA+PfLTukA9cw9cm4ZZeYyWGKKXrkxgvPgLA3ejczbn9fO4mAKjBuX45nqiM3zXO/l2G5aMxVvNF4OO486er+A+jHX42VcPba6NXyOL8ZA8kC8lEspGMaCI87FIToTqNsa9mSLZGNuerEDaY2/HdvDUA4tPWZ7yEGtg8Gzx9SwJlv4dawI2+CYBNINv+4Tt/wxtwrlMywJGewySOOxLJkd95UcV3Sm6iQ02EWDT+ORjYxVjYc4JjtAXb2f7wDz6BjWJNx2gWSAhv/+/i7f/9ArN5nFzsaK/V0R+V+7IVAFp6jGuxx9mPcpPy+algQ0bKOO6RhZU7/ZCkpTd5Jt4K/1Uyb1TxYdl3m6jir6uL/bVkehIQaOpNfFJj2iWobtJS2ZKbCNjW6jOdddEH/VCNJv3oEf0F6FHpB3+7PE1TfLOzXv9xvvR5mwBEIJUYvh1Vuv0WEuQj7ulzFEg0Ev2FpzzHMdNY8Sf9WlV8Jh5iKXYWVaNh3FeGxfkJItKFdCLdSEfsS/9QKU2EUrAeV2RFfbVsTHLnJ18ln7WjoK0aABFq7UveicTU6yv1hTbomRiy+pOXQjZvGZkf0SPPFMrTOqBBsDuSI8O/e+SUmj2F5g9y+pWb+6dF4xWfw5v0YhygN79QXVJG6sS1i+KeHmbjWC2vUGULTI9m4287aqM0FT3vZTsANG1NnBiNak/npeh3AsHeFObwgmImvxQreltf8tfI+wVb+QV7G45/N9r3t3fWx56ylSfkiVp6Eiehn+ASBAJqIky1qe5/ouOROl09uaytvrSKpyHfdE8YlsAkmTQXrFsYs/VCstUEIFlGCYpHS5DLm6xUQFr8bq9OE1ra++FUVLlyDpOOVnfFn1OMrdrNnp7ZUad/VTn/R+ZAWBAmhA1hhNnrf87XRCDMCfuPqLj4jU6mIpsKgPMDu0ftOj8hZrsGQImlmeNOwuS5hClu6KjXV+dJVvLjth7j20zjP8hMSDwDOe4QQyO/m7wZY+b06u4YAi0b+w/jlRhF0PjFMNMTx+5P+DTFd9rr9TUT7rnwo7XHWA05rneBtOMkC10zUVAAIGlbe41nHR3WcRyCfQQxa1Ws6KzVN+y74/CX2t5efQZfsAtkZ+4jPVrFvwsTKG7vODkmf5Npn+DyfmndlliAIHsJmggX4pU1/q3/+m7x9JxMO904pU1Ln7EMqxHXg57t2rJTvAulQ8PGqEkV1J9SsFJgckuhgvmUXsOWUnfReLRb/KeLE84G7ZmojtI2an+i4al0Ff9ryvmdQ52whGF/jbAljAlrwpywT5eBc8zGUSLbIRvCrYL9ZBwZ774KcXOhzApWrHPng3ehADAxSP4LU5hnVOjxu1zrD9Aip2G8/ioxOHQEDPRMGpt2820kP+LuSkjYEsaENWFO2DOUgStc0e4n2yEbcoW+w0TJJzt2Pnh3oWQLbgIQg9aekfO5FimYWaHCOZZeiOuxrPX7jtFThEKPQFuv8T0scrohKIoKM3VBR30ca0QKuwquARD5jvab7sVCYywMC8aFo6ZWN/eMnBcMaZWUfiNAtkI247cctvnDFy2ftJ3ho4RF1QAoe2tP8izse3X/R6Tk/ma1GYVow8gAdeioSyGQEQH0+K/Am78dVX89YwIJb9ICLEx++2MxohUdAMCMY0TgrxgRWFAMY5/yDGB3m0YnN8vwSQ/F1gUEWrcm6nhU6wJpx1d0uiCuRRJtf+og/SR+iGJ4FNUESDPChDZ2bTFMfcxTzaJah2w7y/iIh2KdRsCyCdgGfgbG+S3RR32wKOen/KUEAEbVaVrYYQkSkP9Q5TmMRaPrmnr3Hh4QkZWYLiNg2QJswrINl3k5SZ58r9QmbUkBgJQxjNTV+Eg4qZjbtFDQcyIstm5p13sHuc1L0ZcbAbIBsgWyCbkl3U+6RNr39ntQyI2SA8D6RRU7sBnHzwthKkNams1YdUB1uwoCMpSGPzJQ2ZMNBGRm6wSQyOfI9ybcLOJHyQHA4pn88EY0QgK3nBVTSxuqaqo3quZAEZYT8CxU5lT2ZANBU8XyNficE3I7EgA6Fx36IUuZMp/UkxUriv4RHu9WHYNZIQrdAyprKvMgvvmtwoCvWT7nQMmg6ePchWHBDQC10TmK3lFCVH2LJc1WNUToHeZ+cKKhPhoJguEf5gf/Unli2K8Lw37LSqUzlt+RGsAYsVQidRmGBofGfgfpkwyCxoCtiSBBElzJahsBKlsq46A6P/mW5WO2Nc6f0NEAsK6h4m/onFidn620KappFpiaNixt+RQtmFWmKFsQCNY4/ziNybfIx8bdKvmrowGApBka2PQTVFMCu9UVTQHVsNDJWgxCO8GoK9gI0HbtWNhDZRqk6b2TQSefIt+afL/U36gNOX+N7vGmbQ0y4KOoiMeGjZELg7Ynv/MlGkyK1vFltByc8eXB1CBthdZ+E+ZCN7aRc+UNR4IKbgZtmnAGG+HL49GKp2lXmAwP1S2JEaAyo7ILuvMTxORLbjg/0XYlABDhztrYz1Bt8XR7buLr9IVazAzaEor2hXNtYxGnhS5neqjyU1lRmVHZBR0K8iHyJbf0cKUJMCZs21/eP1hUVT8FJrPH7gX5E4XRxcyRC7zccjzIeHktO23dTbv3BnUoejJeGJp+hQ8OnNT+qYPem/zMqd+uBgASsrU3sRAVjb8Evz8gDTmdOyDYV7w+fMSpAg8rHexP8WnY2H9g01DX9oD0ErvRPQ/NT3XUxba6ydf1AEDCY4LQ1xGVb3VTEa9pozbQnkwlr/DrLEKv9ZWVH53VR8d1wb7aZJWxGLlgX1djwo/jvf6TZfEkABDT1j7jz5h3fcZkAQL9GxMzsCTzX8WeXTd3ts4bCbQuAROejujm0+Z8Azb1v/HWl/qgzkKhtZb51ur/WGi+YtK71gk4WZjUyOAlmMn035PvB/o3DA9vnhu16XOew5HRKwOtS4CEJ6wJc8I+bM5PPmL5ikfl4VkNgPRp3mos1iJ8I9pqUY/085aNYH8YSiSu2tBQ9XdvGZcHt2Xdg0dUxmI/hdN/Nowao92fNFNiydqF+pNe6edpACCl0BSgalvec8u9AsBxPoINYsfk24YM4xYVCJxB13J8Xb8G07Qvg/NXOUNVPiqo+l/bUasXfLhHKZp4HgAgLEcQuB9BAIdAhvpKYBjnN8mk8SPVUVhcOVMHnx7VaZn5JfiLFUclGLng/A/A+emkKZiNd5cfAYAt7dpZUXXAkdiGiS/xTlV/OFG1Dm+t3/NE6qb2xfEX/ZEiWFzbnhw5VsQi34IrnB/a5uK4IoHzbxz88LWmxxvnDo+77clXXwIAaXZ677sHxngN7chS0GGGnqDiDhOcVSoeYFz8sL021ucOi2BTbetL1GLe63Wo6lPt0LMOaj9Rg/M/mxD9Sx6tO+QDP+TwLQCQsrQtk7UzC2Nz/FDeP544NlywOzGr8O5yn1WYnr13Ad70F6F1mPkYcP8KylXOqOvvSomRhnV1U95wlVEO4r4GAJJrxZbheboe3QxBArlDSw5s8z8SLCW4WM9M8873jD0PPtkwK5CbqeRXdGKKxd2vVh6sTzuTadpFOH0XJ/GwyMQU4f8F53/LMJKnOLGxZylo+R4ASPggnshSCugZ8wrWLzi73zTFnWvb12zEwiMzY7qg3sQinea2by/RNA6nZ2fD6WuCqooDcktzQpUUAYAAbesxTmeatWNLqHt7bRrP+5gK+gQ6hDckhdjwSH38BeTztHfYppy5kvGVPSPHRTlfhqr9MkzaOQ2J1TkMdIaGKdra6/VHc4Hn1TNpAgApTNs2WTu3wGK8AiAIfKi6CPfvYsLcYKTMDX5XG7NhZjXnItoyxumPNaIQy69Zlw0c3Ec5ChPHeK+tj9+TI5mnj6RztLbexBUwoMAdNOJpqTH2OkYUnoNBbedMbE+ZfDs3je2di6pe80KOli2DRwpNPyaiiWME48fAiI5Bz/0J4D3TC/6B5SHMK9vrYr+QSX7pAgCBg4lC12N4cLVMQAVBFgSEvVyI7XBK/IkdGhNvo1+hn5ka+hdEv0ixfi1iDpiG2W9oRv/uV17tJ71mzJ5Vo5t6jaZrNWZKq+YRVoPOuRqmmfhkNSbjU1Ee8xBsjhHccvgpQcBDKhmFuL69Tv++VDJBGCkDAIFENQHBtX+DgNLKKFthKnnkQ4Cq/VyYX5XtzT+GlNTORX0CES1yB4RVHYNjJaY+g4RAImWmLpapzT8ZPKkDAAmbHh34L3wN7H7uk0FXv8sCgQH09n9Glt7+bIhLHwBI8KAf55QNfHU/nAig2h+YY+YCEQDITNIzBh+BwHPCaTZKqzAgAOffhRl+K2Udqp2McWAWXBCgNG+aFk9MVkL9VgjIgADZJtloUJyfMAtMACBhadEErZwC0Bvpt7oUArIgQDZJtunnwp5isAhUACAFadkkrZ0G4A8Uo7DKoxBwGgGyRbJJv5b0lqJPYPoAMijJW3qwvRjna8ph04gM+qtbPiNAm71gzca3O+utbbzQ/A/eFeQAYKFNG41GIvweTBf6WPDgVxIHFgHavTclzvNyA083sApcE2AyCFQAycTek1ANe2jyM/VbIeAGAmRrZHNBd37CJvA1gHEFzLFf/NcxZ/0mNAn0cffVV4WAIwigym/A+b/VOXpiTyCr/JOBCFMAsHSzziLk2r1QbPZkZdVvhUCxCMDbX8Fi3nPdPquvWPmKzRf4JsBkxamA6ERVdM4E/mjyybqp3/4gQLZENhU25yc0Q1cDGG8irT2Jq7C3wI9Uk2A8Kuq7XQSoyo+3/jc76nEaUUivUAcAKrOWnsRJGCr8Nf5OCmkZKrVcQABv/afw98XO+thTLpCXhmTomgCTkaUCHOzfdDI22/wm9mQqi113J2OgfheAAGyEbIVsJuzOT6iEvgYwvuibuoc/EYlFbkNtoHH8ffVdIUAI4I3flUqkLlvXUPG3ckGkrALAWKGiWfAFrmk3QflpY/fUZ/kigB7+PSxlXtdxcuw35YZC6JsAmQoUVbv/FMYH80whbsHzRKY06l5ZIJAgGyBbKEfnpxIuyxrAeNMe3WcgcismEJ0x/r76Hm4EaDafYaSuDtLSXTdKpOwDwBiorT0GHVH1Y/QPLBi7pz7DhwDa+U+jM/jajnp9ffi0K1wjFQAmYsZbe5KrOBc3YJ/74yY+Ur8CjYAQLwjBr++oj9IycjT71UUIlGUfQI6iFzCQP7Y/vGa+wAkueFu8lCOtehQABKgMqSypTKlsIbJy/nHlpmoA48DY7+t990Va5p55ocb5N1AjOH6/5+qGvAgI8Tw6+G7u3PngXeycc1LyCuqvZCoA2MS/uc9owhnW16Df9HSbWVQyXxAQj8Lbb1lbq6/zhX3AmKoAUGCBNW1NnBiJalejInmeWmNQIHguJbfm7HN2Typp3rpuYewZl9iEkqwKAEUW6/ItA9NjkfjFmsa+hFrBvCLJqGwlISB2mCb7VSI1csdji6rfLIlUmWZWAcCBgm/uMZain+DLGEY8C4DGHSCpSGRBAD14I6h9/RHt+1+urdcfz5JM3baJgAoANoGyk6yp+4NDIrHKc1AjOAfzCU5DHjXKYge4/Gng7+IJdODfl0oM3beu4cB382dRKewgoAKAHZSKSNO6bWAGi8TOwjHb5+JI7VMBtMK6ABzxpsepumIT/ruXpRJ/7Di5encB2VVSmwgoo7QJVCnJVmzaO1OP62dgKLEFNYPloKUOOs0M6ADe9I9hWV6nMWI8tP7UKa9nTqbuOoWACgBOIWmTznH3vRCbc9TRp6DnGsGAtZT9/AKM1wOLTmDRuZs9s6mvrs6wCaVK5gACKgA4AGIpJFo29h/GqipPQY33FI0zfPJa0IuVQlPivFh5KfpMwTZDz81scGhz55KatySWN/SiqQAgWREv7dpZUVFzZB0KZiFWKM6Hw8xHLeFY/A7U6MJob714EY7+LFbe4Y9tHe5/rffxxrnDkkFe1uKoABCA4l/a1RWtrGw4WkTYfGxkcjw6Fo9CYJgL55qDqvMMP1VA9R2dc2IXZNmJDruXhWk+z1Ps2aGh7pceb2xM+imb4p0fARUA8mMkdYrF3a9W1sSmzY6ICAKCeTjX+KEQeCr60PEppqKA6ffBgvEKfMYxFhHDvRjG0qlGMdbUSOD+CN7SCdynDVJGOBP0pn4P996Bc7/NuMAne1uY9Km9keKpnf2JPa882TBL7bMIYIJ6/X8QmpCW0hsGOwAAAABJRU5ErkJggg==' ) } ;(t.prototype.setScene = function (e) { this.createCpm(e), this.createBunnyObj(e) }), (t.prototype.updateModel = function () { this.model = this.modelManager.getActiveModel() }), (t.prototype.bindEvents = function () { this.modelManager.on(r.ActiveModelChanged, this.updateModel.bind(this)) }), (t.prototype.updateDefaultsFromModelData = function () { this.model.data }), (t.prototype.pointPathDistance = function (e) { for (var t = 0, i = 1; i < e.length; i += 1) t += e[i - 1].distanceTo(e[i]) return t }), (t.prototype.pointPathLengths = function (e) { for (var t = [0], i = 1; i < e.length; i += 1) t.push(t[i - 1] + e[i - 1].distanceTo(e[i])) return t }), (t.prototype.interpAlongPath = function (e, t, i) { var n, r = new P.Vector3(), o = t[t.length - 1] if (i < 1) { n = i * o for (var a = 1; a < t.length; a += 1) if (t[a] > n) { var s = (n - t[a - 1]) / (t[a] - t[a - 1]) return r.copy(e[a]), r.sub(e[a - 1]), r.multiplyScalar(s), r.add(e[a - 1]), r } } else r.copy(e[e.length - 1]) return r }), (t.prototype.pathHeight = function () { return this.player.mode !== O.FLOORPLAN ? D.path.height : D.path.outsideHeight }), (t.prototype.createBunnyObj = function (e) { this.bunnyObj || ((this.bunnyObj = new P.AxisHelper(0.1)), (this.bunnyObj.visible = D.warp.showBunny)), this.bunnyObj.parent && this.bunnyObj.parent.remove(bunnyObj), e.add(this.bunnyObj) }), (t.prototype.createCpm = function (e) { if (!this.currentPanoMarker) { var t = this.makeWaypointObj(I.pathEnd, 'Current') ;(t.material.uniforms.opacity.value = 0), (this.currentPanoMarker = { mesh: t, placed: !1 }) } this.currentPanoMarker.mesh.parent && this.currentPanoMarker.mesh.parent.remove(this.currentPanoMarker.mesh), this.placeCpm(), this.currentPanoMarker.mesh.parent || e.add(this.currentPanoMarker.mesh) }), (t.prototype.placeCpm = function () { if (D.path.mapGuides && this.player.currentPano && this.player.currentPano.isAligned()) { var e = this.player.currentPano.floor this.currentPanoMarker.mesh.parent !== this.player.currentPano.floor && (this.currentPanoMarker.mesh.parent && this.currentPanoMarker.mesh.parent.remove(this.currentPanoMarker.mesh), e.add(this.currentPanoMarker.mesh)), this.currentPanoMarker.mesh.position.copy(this.player.currentPano.floorPosition).sub(e.position), (this.currentPanoMarker.mesh.position.y += this.pathHeight()), (this.currentPanoMarker.placed = !0) } else this.popOutCpm() }), (t.prototype.fadeInCpm = function (e) { ;(this.player.mode === O.PANORAMA && this.player.currentPano && !this.player.currentPano.isAligned()) || (D.path.mapGuides && this.currentPanoMarker.placed && V.start(F.property(this.currentPanoMarker.mesh.material.uniforms.opacity, 'value', 1), e)) }), (t.prototype.fadeOutCpm = function (e) { V.start(F.property(this.currentPanoMarker.mesh.material.uniforms.opacity, 'value', 0), e) }), (t.prototype.popInCpm = function () { D.path.mapGuides && this.currentPanoMarker.placed && this.fadeInCpm(2) }), (t.prototype.popOutCpm = function () { this.fadeOutCpm(2) }), (t.prototype.brushPrefs = { linewidth: 7, strokeWidth: 15, cvSegments: 48, paveStep: 0.1, paveWidth: 0.2, lookBlendDist: 3, maxTurn: P.Math.degToRad(2) }), (t.prototype.panoPathDistance = function (e) { var t = this.model.panos if (!e || e.length < 2) return 0 for (var i = [], n = 0; n < e.length; n += 1) i.push(t.get(e[n]).floorPosition) return this.pointPathDistance(i) }), (t.prototype.loadTileTexture = function (t) { var e = n.load( t, function (e) { ;(e.wrapS = P.RepeatWrapping), (e.wrapT = P.RepeatWrapping), (e.needsUpdate = !0), H.debug('path texture "' + t + '" is ready') }, function () { H.error('path texture "' + t + '" failed') } ) return (e.mapping = P.UVMapping), e }), (t.prototype.buildWarpDestinationDescriptor = function (e, t, i, n, r, o) { return new l({ cameraMode: n, position: e, quaternion: t, panoId: i, orthoZoom: o, floorVisibility: r, thumbUrl: null, name: null }) }), (t.prototype.buildWarpDestinationDescriptorFromHero = function (e) { return this.buildWarpDestinationDescriptor(e.position, e.quaternion, this.getHeroId(e), e.cameraMode, e.floorVisibility, e.orthoZoom) }), (t.prototype.setWarpDestination = function (e) { this.warpDestHeroLoc = e }), (t.prototype.setWarpDestinationByHeroIndex = function (e) { var t = this.getHeroDescriptorByHeroIndex(e) return null !== t && (this.setWarpDestination(t), !0) }), (t.prototype.setWarpDestinationByPano = function (e, t) { return !!this.model.panos.get(e.id) && this.setWarpDestinationByPanoId(e.id, t) }), (t.prototype.setWarpDestinationByPanoId = function (e, t) { var i = this.model.panos.get(e) if (i) { t = t || new P.Quaternion() var n = this.buildWarpDestinationDescriptor(i.position, t, i.id, 'panorama', [], -1) return this.setWarpDestination(n), !0 } return !1 }), (t.prototype.getHeroDescriptorByHeroIndex = function (e) { var t = this.model.heroCount() if (null !== this.warpDestHeroLoc && t < 1) return H.info('ShowPath.getHeroDescriptorByHeroIndex() -> Only one hero location is available.'), this.model.getHeroDescriptorByIndex(0) var i = this.model.getHeroDescriptorByIndex(e) if (i) { var n = i.isPano() ? i.panoId : i.cameraMode H.debug('ShowPath.getHeroDescriptorByHeroIndex() -> New brush/warp destination: "' + n + '" out of ' + t + ' choices.') } return i }), (t.prototype.getHeroDescriptorByPano = function (e) { return this.model.panos.get(e.id) ? this.getHeroDescriptorByPanoId(e.id) : null }), (t.prototype.getHeroDescriptorByPanoId = function (e) { var t = this.getHeroIndexFromPanoId(e) return this.getHeroDescriptorByHeroIndex(t) }), (t.prototype.getHeroIndexFromPanoId = function (e) { for (var t = 0; t < this.model.heroLocations.length; t++) { var i = this.model.heroLocations[t], n = this.getHeroId(i) if (n && n === e) return t } return -1 }), (t.prototype.getHeroPano = function (e) { if (null === e) return H.warn('getHeroPano(): no destination'), null var t = this.getHeroId(e), i = this.model.panos.get(t) return void 0 === i && ((i = null), '' !== t && H.debug('unable to find pano "' + t + '"')), i }), (t.prototype.getHeroId = function (e) { return e.panoId }), (t.prototype.setWarpDestPano = function () { return (this.warpDestPano = this.getHeroPano(this.warpDestHeroLoc)), this.warpDestPano }), (t.prototype.brushToWarpPano = function (e, t) { if ((this.discardPathObject(), !this.setWarpDestPano())) return !1 if ((this.warpDestHeroLoc.cameraMode !== O.PANORAMA && H.warn('Can only brush from pano to pano'), !this.warpDestPano)) return H.info('No brush'), !1 if (!this.player.currentPano) return H.debug('No current pano, visibility undefined'), !1 if (!this.warpDestPano) return H.info('No wPano, visibility undefined'), !1 if (!this.warpDestPano.isAligned()) return H.debug('Cannot brush to unaligned pano'), !1 var i = (e === L.STD || e === L.WALK) && D.path.mapGuides, n = !0 if (this.player.currentPano.id === this.warpDestPano.id) H.debug('Already at destination pano') else { ;(this.nodes = this.findShortestPath(this.player.currentPano, this.warpDestPano)), (n = void 0 === this.nodes || null === this.nodes || this.nodes.length < 1), (this.obj3d = new P.Object3D()), H.debug('Brushing from "' + this.player.currentPano.id + '" to "' + this.warpDestPano.id + '" (' + (this.nodes ? this.nodes.length : 0) + ')'), n ? (H.info('No "walkable" route, using fall-back warp style transition'), (e = t)) : (this.setPathHulls(this.nodes), this.setFloorCurves(), i && ('chevron' === D.path.style ? this.obj3d.add(this.drawPathPavement(this.floorCurvePoints)) : 'ribbon' === D.path.style && this.obj3d.add(this.drawPathRibbon(this.floorCurvePoints, this.floorCurveColors)))), this.player.currentPano.floor.add(this.obj3d) var r = this.player.mode === O.DOLLHOUSE || this.player.mode === O.FLOORPLAN, o = e === L.STD if (!n && (i || o)) { if (r) { var a = this.makeStartMarker(this.floorHull[0], this.floorCurvePoints) this.obj3d.add(a) } var s = this.makeEndMarker(this.floorHull[this.floorHull.length - 1]) this.obj3d.add(s) } this.appearSlow() } return (this.upcomingTransType = e), !n }), (t.prototype.findShortestPath = function (e, t) { if (!e || !t) return null var i = D.warp.walkExtraPanosDistance, n = e.id + ':' + t.id + ':' + i if (this.shortPaths.hasOwnProperty(n)) return this.shortPaths[n] ? this.shortPaths[n].slice() : null var r = t.id + ':' + e.id + ':' + i if (this.shortPaths.hasOwnProperty(r)) return this.shortPaths[r] ? this.shortPaths[r].slice().reverse() : null var o = this.model.panos.aStarSearch(e, t) return this.model.panos.includeNodesNearPath(o, i), (this.shortPaths[n] = o ? o.slice() : null), o }), (t.prototype.makePathHulls = function (e) { var t, i, n, r, o, a = 0, s = [], l = [], c = [], h = this.model.panos r = (t = h.get(e[0])).floor.floorIndex for (var u = 0; u < e.length; u += 1) ((i = (t = h.get(e[u])).floorPosition.clone().sub(this.model.position)).y += this.pathHeight()), s.push(i), l.push(t.position.clone()), (n = t.floor.floorIndex), c.push(r < n ? D.path.colorUp : n < r ? D.path.colorDown : D.path.color), 0 < u && a < (o = l[u].distanceTo(l[u - 1])) && (a = o) return ( a > this.longestStep && ((this.longestStep = a), H.debug('path contains ' + a + ' meter segment')), { floor: s, camera: l, color: c } ) }), (t.prototype.makeFloorCurves = function (e, t, i) { var n = this.player.mode === O.PANORAMA ? D.path.waypointIndoorRadius : D.path.waypointRadius, r = this.pointPathDistance(e) - 2 * n, o = e.slice(0), a = o[1].clone().sub(o[0]) ;(a.y = 0), a.normalize().multiplyScalar(n), (o[0] = new P.Vector3().copy(o[0]).add(a)), ((a = o[o.length - 2].clone().sub(o[o.length - 1])).y = 0), a.normalize().multiplyScalar(n), (o[o.length - 1] = new P.Vector3().copy(o[o.length - 1]).add(a)) var s = new P.CatmullRomCurve3(o), l = Math.floor(r / i) ;(l = 4 * Math.floor(l / 4)), (l = Math.max(4, l)) for (var c, h, u = s.getSpacedPoints(l), d = [], p = new P.Vector3(), f = 0; f < u.length; f += 1) { ;(h = 0), (c = u[f].distanceTo(e[0])) for (var g = 1; g < e.length; g += 1) p.copy(u[f]).sub(e[g]), (p.y *= 4), p.length() < c && (h = g) d.push(t[h]) } return { distance: r, points: u, colors: d } }), (t.prototype.makeCameraCurvePoints = function (e, t) { var i = this.pointPathDistance(e) return new P.CatmullRomCurve3(e).getSpacedPoints(Math.max(2, Math.floor(i / t))) }), (t.prototype.makeCameraCurveTangents = function (e, t) { var i = this.pointPathDistance(e), n = new P.CatmullRomCurve3(e), r = Math.max(2, Math.floor(i / t)) r = r || 5 for (var o = [], a = 0; a <= r; a++) o.push(n.getTangentAt(a / r)) return o }), (t.prototype.setPathHulls = function (e) { var t = this.makePathHulls(e) ;(this.floorHull = t.floor), (this.cameraHull = t.camera), (this.colorHull = t.color) }), (t.prototype.setFloorCurves = function () { var e = this.makeFloorCurves(this.floorHull, this.colorHull, this.brushPrefs.paveStep) ;(this.floorPathDistance = e.distance), (this.floorCurvePoints = e.points), (this.floorCurveColors = e.colors) }), (t.prototype.setCameraCurvePoints = function () { this.camCurvePoints = this.makeCameraCurvePoints(this.cameraHull, D.warp.stepFactor * this.brushPrefs.paveStep) }), (t.prototype.chooseWarpPath = function (e) { var t, i, n, r = this.playerControls.cameras[O.PANORAMA] if (this.player.currentPano === this.warpDestPano || !e) return (this.warpPathPoints = null), (this.warpLength = 0), !1 ;(this.nodes = this.findShortestPath(this.player.currentPano, this.warpDestPano)), void 0 === this.nodes || null === this.nodes || this.nodes.length < 1 ? (H.debug('warp path to unreachable node'), (i = (t = this.warpDestPano.position.clone().sub(r.position)).clone().negate()), t.multiplyScalar(0.15).add(r.position), i.multiplyScalar(0.15).add(this.warpDestPano.position), (t.y = r.position.y), (i.y = this.warpDestPano.position.y), (n = new P.CubicBezierCurve3(r.position.clone(), t, i, this.warpDestPano.position.clone())), (this.warpPathPoints = n.getSpacedPoints(this.brushPrefs.cvSegments))) : (H.debug('follow warp path (path distance was ' + this.nodes.length + ' nodes, ' + this.floorPathDistance + ')'), this.setCameraCurvePoints(), (this.warpPathPoints = this.camCurvePoints.slice(0))), (this.warpLength = 0), (this.warpPathLengths = [0]) for ( var o = new P.Vector3(), a = new P.Vector3(), s = Math.cos(P.Math.degToRad(D.warp.minBrakeAngle)), l = Math.cos(P.Math.degToRad(D.warp.maxBrakeAngle)), c = 1; c < this.warpPathPoints.length; c += 1 ) { o.copy(this.warpPathPoints[c - 1]).sub(this.warpPathPoints[c]) var h = o.length() o.y *= D.warp.climbEffort var u = o.length() / h if (1 < c) { o.setY(0).normalize(), a .copy(this.warpPathPoints[c - 2]) .sub(this.warpPathPoints[c - 1]) .setY(0) .normalize() var d = Math.min(1, o.dot(a)), p = 1 + (D.warp.brakeStrength - 1) * (1 - P.Math.smoothstep(d, l, s)) u = Math.max(p, u) } ;(this.warpLength += h * u), (this.warpPathLengths[c] = this.warpLength) } return !0 }), (t.prototype.drawPathRibbon = function (e, t) { /* let map = Texture.load('images/arrow.png') map.anisotropy = 4 map.repeat.set(1, 6) map.wrapS = THREE.RepeatWrapping map.wrapT = THREE.RepeatWrapping map.needsUpdate = true */ this.bunnyObj.visible = D.warp.showBunny for (var i = 0.6 * D.path.ribbonWidth * 0.5, n = new P.Vector3(), r = new P.Vector3(0, this.pathHeight(), 0), o = new P.Geometry(), a = new P.Vector3(), s = 0; s < e.length; s += 1) { a.copy(e[s]), 0 === s ? a.sub(e[s + 1]) : a.sub(e[s - 1]).negate(), a.normalize(), n.crossVectors(a, U.UP), n.multiplyScalar(i) var l = new P.Vector3().copy(e[s]).add(r) l.sub(n), o.vertices.push(l), (l = new P.Vector3().copy(e[s]).add(r)).add(n), o.vertices.push(l) } var c, h, u, d = 0 for (s = 0; s < e.length - 1; s += 1) { var p = 2 * s, f = d, g = (d += e[s + 1].distanceTo(e[s])), m = t[s], v = t[s + 1] ;((c = new P.Face3(p, 1 + p, 2 + p)).vertexColors = [new P.Color(m), new P.Color(m), new P.Color(v)]), o.faces.push(c), o.faceVertexUvs[0].push([new P.Vector2(0, f), new P.Vector2(1, f), new P.Vector2(0, g)]), ((c = new P.Face3(2 + p, 1 + p, 3 + p)).vertexColors = [new P.Color(v), new P.Color(m), new P.Color(v)]), o.faces.push(c), o.faceVertexUvs[0].push([new P.Vector2(0, g), new P.Vector2(1, f), new P.Vector2(1, g)]) } o.computeFaceNormals(), o.computeVertexNormals(), (h = this.player.mode === O.PANORAMA ? (((u = P.UniformsUtils.clone(C.ribbon.uniforms)).map.value = I.path), (u.opacity.value = 0), u.color.value.set(D.path.color), new P.RawShaderMaterial({ side: P.DoubleSide, depthWrite: !1, transparent: !0, vertexShader: C.ribbon.vertexShader, fragmentShader: C.ribbon.fragmentShader, uniforms: u, name: 'ribbonT', opacity: 0 })) : new P.MeshBasicMaterial({ color: 16777215, side: P.DoubleSide, name: 'ribbonOut', vertexColors: P.VertexColors /* transparent:true, map */ })) var y = new P.Mesh(o, h) return (y.name = 'ribbon'), this.player.mode === O.PANORAMA && (y.renderOrder = A.ribbon), y }), (t.prototype.drawPathPavement = function (e) { for (var t, i = new P.Vector3(), n = new P.Geometry(), r = new P.Vector3(), o = 0; o < e.length; o += 1) r.copy(e[o]), 0 === o ? r.sub(e[o + 1]).negate() : r.sub(e[o - 1]), r.normalize(), i.crossVectors(r, U.UP), i.multiplyScalar(this.brushPrefs.paveWidth), (t = new P.Vector3().copy(e[o])).sub(i), n.vertices.push(t), n.vertices.push(new P.Vector3().copy(e[o])), (t = new P.Vector3().copy(e[o])).add(i), n.vertices.push(t) var a, s, l for (o = 0; o < e.length - 1; o += 1) (a = 3 * o + 1), (l = 0.25 + (s = 0.25 * o)), n.faces.push(new P.Face3(a - 1, a, 3 + a)), n.faceVertexUvs[0].push([new P.Vector2(0, s), new P.Vector2(0.5, s), new P.Vector2(0.5, l)]), n.faces.push(new P.Face3(3 + a, 2 + a, a - 1)), n.faceVertexUvs[0].push([new P.Vector2(0.5, l), new P.Vector2(0, l), new P.Vector2(0, s)]), n.faces.push(new P.Face3(3 + a, a, 1 + a)), n.faceVertexUvs[0].push([new P.Vector2(0.5, l), new P.Vector2(0.5, s), new P.Vector2(1, s)]), n.faces.push(new P.Face3(3 + a, 1 + a, 4 + a)), n.faceVertexUvs[0].push([new P.Vector2(0.5, l), new P.Vector2(1, s), new P.Vector2(1, l)]) var c = this.player.mode === O.PANORAMA ? new P.MeshBasicMaterial({ color: D.path.color, side: P.DoubleSide, transparent: !0, depthWrite: !1, opacity: 0, name: 'paveT', map: I.path }) : new P.MeshBasicMaterial({ color: D.path.color, side: P.DoubleSide, transparent: !0, depthWrite: !1, opacity: 1, name: 'paveO', map: I.path }) return new P.Mesh(n, c) }), (t.prototype.hintPrefs = { rad: 0.18, width: 0.0125, depth: 0.0625, setBack: -0.04, markRad: 0.25, markInnerRad: 0.16 }), (t.prototype.makeWaypointObj = function (e, t) { var i = new P.Geometry(), n = this.player.mode === O.PANORAMA ? D.path.waypointIndoorRadius : D.path.waypointRadius, r = this.pathHeight() i.vertices.push(new P.Vector3(-n, r, n), new P.Vector3(-n, r, -n), new P.Vector3(n, r, -n), new P.Vector3(n, r, n)), i.faces.push(new P.Face3(0, 1, 2), new P.Face3(2, 3, 0)), i.faceVertexUvs[0].push([new P.Vector2(0, 0), new P.Vector2(1, 0), new P.Vector2(1, 1)]), i.faceVertexUvs[0].push([new P.Vector2(1, 1), new P.Vector2(0, 1), new P.Vector2(0, 0)]) var o = P.UniformsUtils.clone(C.waypoint.uniforms) ;(o.map.value = e), (o.opacity.value = 0), o.color.value.set(D.path.color) var a = { side: P.DoubleSide, depthWrite: !1, transparent: !0, vertexShader: C.waypoint.vertexShader, fragmentShader: C.waypoint.fragmentShader, uniforms: o, name: 'waypoint', opacity: 0 } this.player.mode !== O.PANORAMA && ((a.depthTest = !1), (a.name = 'wayPtOut')) var s = new P.RawShaderMaterial(a), l = new P.Mesh(i, s) return (l.name = t), l }), (t.prototype.makeStartMarker = function (e, t) { var i = new P.Vector3().copy(t[1]).sub(t[0]) ;(i.y = 0), i.normalize() var n = Math.acos(i.x), r = this.makeWaypointObj(I.pathStart, 'Start') return r.rotateOnAxis(new P.Vector3(0, 1, 0), n), r.position.copy(e), r }), (t.prototype.makeEndMarker = function (e) { var t = this.makeWaypointObj(I.pathEnd, 'End'), i = this.model.panos.get(this.nodes[0]).floor.floorIndex, n = this.model.panos.get(this.nodes[this.nodes.length - 1]).floor.floorIndex return i < n ? t.material.uniforms.color.value.set(D.path.colorUp) : n < i && t.material.uniforms.color.value.set(D.path.colorDown), t.position.copy(e), t }), (t.prototype.pathClean = function (e) { if (e) { for (var t in e.children) this.pathClean(e.children[t]) e.geometry && e.geometry.dispose(), e.material && e.material.dispose() } }), (t.prototype.discardPathObject = function () { if (this.obj3d) { var e = this.obj3d.parent e && e.remove(this.obj3d), this.pathClean(this.obj3d) } ;(this.obj3d = null), this.popInCpm() }), (t.prototype.discardSlow = function () { if (this.obj3d) { if (this.player.mode !== O.PANORAMA) return void this.discardPathObject() for ( var e, t = 0, i = function () { this.discardPathObject() }.bind(this), n = 0; n < this.obj3d.children.length; n += 1 ) void 0 !== (e = this.obj3d.children[n]).material && !0 === e.material.transparent && (void 0 !== e.material.uniforms ? V.start(F.property(e.material.uniforms.opacity, 'value', 0), D.path.fadeOutTime, i, 0, B[D.warp.blendEasing]) : V.start(F.property(e.material, 'opacity', 0), D.path.fadeOutTime, i, 0, B[D.warp.blendEasing]), (t += 1), (i = null)) 0 === t && this.discardPathObject(), this.player.mode !== O.PANORAMA && this.fadeInCpm(D.path.fadeInTime - 3) } }), (t.prototype.appearSlow = function () { var e this.fadeOutCpm(D.path.fadeInTime) for (var t = this.player.mode === O.PANORAMA ? D.path.opacity : 1, i = 0; i < this.obj3d.children.length; i += 1) void 0 !== (e = this.obj3d.children[i]).material && !0 === e.material.transparent && (void 0 !== e.material.uniforms ? V.start(F.property(e.material.uniforms.opacity, 'value', t), D.path.fadeInTime, null, 0, B[D.warp.blendEasing]) : V.start(F.property(e.material, 'opacity', t), D.path.fadeInTime, null, 0, B[D.warp.blendEasing])) }), (t.prototype.update = function () { this.obj3d && this.obj3d.updateMatrixWorld() }), (t.prototype.calcBurnsAmount = function (e) { var n = P.Math.degToRad(D.warp.burnsAngle) if (this.player.mode !== O.PANORAMA) return this.player.mode === O.DOLLHOUSE ? 0.02 * this.burnsDir : this.burnsDir var t = this.burnsDir * n if (this.upcomingTransType === L.BLACK) return t var i = e if (null === i) return H.warn('Transition request for non-highlight'), t var r = this.getHeroDescriptorByHeroIndex(i) if (null === r) return t if (!r.isPano()) return t function o(e) { var t = Math.acos(Math.min(1, e.dot(l))), i = new P.Vector3().crossVectors(l, e) return Math.max(c, Math.min(Math.abs(t), n)) * Math.sign(i.y) } var a = this.getHeroPano(r), s = this.playerControls.cameras[O.PANORAMA], l = U.FORWARD.clone().applyQuaternion(s.quaternion).setY(0).normalize(), c = Math.min(P.Math.degToRad(D.warp.minBurnsAngle), n) if (a === this.player.currentPano) return o(U.FORWARD.clone().applyQuaternion(r.quaternion).setY(0).normalize()) var h = this.findShortestPath(this.player.currentPano, a) if (null == h || h.length < 1) return H.debug('Empty path ahead...'), t var u = this.makePathHulls(h), d = new P.CatmullRomCurve3(u.camera), p = Math.min(0.1, D.warp.lookAheadDist / d.getLength()) return o(d.getPointAt(p).clone().sub(s.position).setY(0).normalize()) }), (t.prototype.waitNextStep = function (e, t, i) { var o = null == i ? D.warp.tourStepDelay : i o = o != void 0 ? o : this.lastTransType === L.BLACK ? m.tourStepDelaySlideShow : m.tourStepDelayDefault var a = new P.Euler(), s = new P.Vector3() H.debug('Starting wait: ' + (void 0 !== t)) var currentLocation = this.model.getHeroDescriptorByIndex(this.director.currentItem) //this.model.heroLocations[this.director.currentItem[0]] var l = currentLocation.dontRot || this.calcBurnsAmount(e), c = function () { this.endWarpState(), this.player.mode === O.DOLLHOUSE && (this.playerControls.cameras[O.DOLLHOUSE].controls.rotationAcceleration.x = 0), t && t() }.bind(this), n = function (e, t) { if (this.warpInterrupted) return c(), !0 var i = t || 1e3 / 60 if (D.warp.doBurns && !currentLocation.dontRot) if (this.player.mode === O.PANORAMA) { var n = this.playerControls.cameras[O.PANORAMA] a.setFromQuaternion(n.quaternion, D.warp.eOrder) var r = o == 0 ? l : (i * l) / o r = Math.sign(r) * Math.max(r, 0.0001) //add 如果音频长的话,使旋转可见,否则以为停住了 ;(a.y += r), s.set(0, 0, -1), s.applyEuler(a), s.add(n.position), n.controls.lookAt(s), n.controls.lookVector.copy(s), n.lookAt(s) } else this.player.mode === O.DOLLHOUSE ? (this.playerControls.controls[O.DOLLHOUSE].rotationAcceleration.x = l) : (this.playerControls.controls[O.FLOORPLAN].absoluteScale *= 0.9996) }.bind(this) this.startWarpState(), V.start(n, o, c, 0, B.easeInOutQuad, 'wait') }), (t.prototype.warpToNonPano = function (e) { if ((this.discardPathObject(), this.warpDestHeroLoc.cameraMode === O.DOLLHOUSE || this.warpDestHeroLoc.cameraMode === O.FLOORPLAN)) { var t = function () { e && e() }.bind(this) this.player.flyToNewMode({ mode: this.warpDestHeroLoc.cameraMode, duration: D.warp.outsideTime, warpDest: this.warpDestHeroLoc, callback: t, force: !0 }) } else H.warn('no warp destination!!!'), e && e() }), (t.prototype._resetWarpShaderParams = function (e) { this.player.mode === O.PANORAMA && (void 0 !== e.material.uniforms.blackout && (e.material.uniforms.blackout.value = 0), void 0 !== e.material.uniforms.modelAlpha && (e.material.uniforms.modelAlpha.value = 0)) }), (t.prototype._clearWarpShading = function () { for (var e = this.model.chunks, t = 0; t < e.length; t += 1) this._resetWarpShaderParams(e[t]), (e[t].visible = !0) this._resetWarpShaderParams(this.model.skybox) }), (t.prototype._warpStopFlying = function () { ;(this.activeTransType = null), this.placeCpm() }), (t.prototype._wrapupTravelOnlyBits = function () { this._warpStopFlying(), this.warpPathPoints && (this.player.currentPano.exit(), this.warpDestPano.enter(), (this.player.currentPano = this.warpDestPano)), this.player.spider.draw(), this.placeCpm() }), (t.prototype._wrapupTravel = function (e) { this._wrapupTravelOnlyBits(), this.warpCameraAim(e) }), (t.prototype._wrapupWarpShading = function (e) { this._clearWarpShading(), this._wrapupTravel(e) }), (t.prototype.wrapupWarpShadingOnly = function (e, t) { t !== z.END && this._clearWarpShading(), this._wrapupTravelOnlyBits(), (this.upcomingTransType = null), e && e() }), (t.prototype._warpCameraAim = function (e, t) { var i = this.warpDestHeroLoc.quaternion, n = this.playerControls.cameras[O.PANORAMA], r = new P.Vector3(0, 0, 1).applyQuaternion(i).normalize(), o = new P.Vector3(0, 0, 1).applyQuaternion(n.quaternion).normalize().dot(r), a = P.Math.radToDeg(Math.acos(o)), s = new P.Euler(0, 0, 0, D.warp.eOrder).setFromQuaternion(i, D.warp.eOrder), l = new P.Euler().setFromQuaternion(n.quaternion, D.warp.eOrder), c = new P.Euler(s.x - l.x, s.y - l.y, s.z - l.z, D.warp.eOrder) ;(c.y = N.constrainedTurn(c.y)), (this.burnsDir = Math.sign(c.y)) var h = new P.Euler(0, 0, 0, D.warp.eOrder), u = new P.Vector3(), d = function (e, t) { return ( !!this.warpInterrupted || ((h.x = l.x + e * c.x), (h.y = l.y + e * c.y), (h.z = l.z + e * c.z), u.set(0, 0, -1), u.applyEuler(h), u.add(n.position), n.controls.lookAt(u), n.controls.lookVector.copy(u), void n.lookAt(u)) ) }.bind(this) /* return a > D.warp.minRotation ? (V.start(d, e, t, 0, B[D.warp.movementEasing]) , (this.warpDestHeroLoc.zoom != this.player.zoomLevel) && //add 原地转向最终方位时 this.player.smoothZoomFovTo(null, this.warpDestHeroLoc.zoom , e) ) : (H.info("Aim angle only is " + a.toPrecision(3) + " degrees, skipping explicit re-aim"), void (t && t())) */ this.warpDestHeroLoc.zoom != this.player.zoomLevel && //add 原地转向最终方位时 this.player.smoothZoomFovTo(null, this.warpDestHeroLoc.zoom, e) return a > D.warp.minRotation ? V.start(d, e, t, 0, B[D.warp.movementEasing]) : /* H.info("Aim angle only is " + a.toPrecision(3) + " degrees, skipping explicit re-aim") ,*/ void (t && t()) }), (t.prototype._warpBendAim = function (e, t, i, n) { var r = n || 0, o = this.playerControls.cameras[O.PANORAMA], a = new P.Euler(0, 0, 0, D.warp.eOrder).setFromQuaternion(this.warpDestHeroLoc.quaternion, D.warp.eOrder), s = new P.Euler().setFromQuaternion(o.quaternion, D.warp.eOrder), l = new P.Euler(a.x - s.x, a.y - s.y, a.z - s.z, D.warp.eOrder) l.y = N.constrainedTurn(l.y) var c = Math.min(P.Math.degToRad(D.warp.softBendTilt), Math.abs(l.x)) ;(l.x = c * Math.sign(l.x)), (c = Math.min(P.Math.degToRad(Math.max(0, D.warp.softBendAngle)), c)), (this.burnsDir = Math.sign(l.y)), (c *= Math.sign(l.y)), (l.y = c) var h = new P.Euler(0, 0, 0, D.warp.eOrder), u = new P.Vector3(), d = function (e, t) { if (e < 0.5) (h.x = s.x + e * l.x), (h.y = s.y + e * l.y), (h.z = s.z + e * l.z) else { var i = (1 - e) * D.warp.softBendEnd ;(h.x = a.x - i * l.x), (h.y = a.y - i * l.y), (h.z = a.z - i * l.z) } u.set(0, 0, -1), u.applyEuler(h), u.add(o.position), o.controls.lookAt(u), o.controls.lookVector.copy(u), o.lookAt(u) }.bind(this) if (window.DATA.momentTourBlackNewType) { d(1) } else return V.start(d, t, i, r, B[D.warp.movementEasing]) }), (t.prototype._warpStepCameraAim = function (e, t, i) { var n = this.playerControls.cameras[O.PANORAMA], r = new P.Euler(0, 0, 0, D.warp.eOrder).setFromQuaternion(this.warpDestHeroLoc.quaternion, D.warp.eOrder), o = new P.Euler().setFromQuaternion(n.quaternion, D.warp.eOrder), a = new P.Euler(r.x - o.x, r.y - o.y, r.z - o.z, D.warp.eOrder) ;(a.y = N.constrainedTurn(a.y)), (this.burnsDir = Math.sign(a.y)) var s = new P.Euler(0, 0, 0, D.warp.eOrder), l = new P.Vector3(), c = function (e, t) { e < 0.5 ? s.copy(o) : s.copy(r), l.set(0, 0, -1), l.applyEuler(s), l.add(n.position), n.controls.lookAt(l), n.controls.lookVector.copy(l), n.lookAt(l) }.bind(this) return V.start(c, t, i, 0, B[D.warp.movementEasing]) }), (t.prototype.setBurnsDir = function () { var e = this.playerControls.cameras[O.PANORAMA], t = new P.Euler(0, 0, 0, D.warp.eOrder).setFromQuaternion(this.warpDestHeroLoc.quaternion, D.warp.eOrder), i = new P.Euler().setFromQuaternion(e.quaternion, D.warp.eOrder), n = new P.Euler(t.x - i.x, t.y - i.y, t.z - i.z, D.warp.eOrder) ;(n.y = N.constrainedTurn(n.y)), (this.burnsDir = Math.sign(n.y)) }), (t.prototype.stepWarpPath = function (firstPos, e) { var i = this.playerControls.cameras[O.PANORAMA] var n = this.warpPathPoints ? this.warpPathPoints[0] : firstPos if (!n) { return i.position.copy(this.warpDestPano.position), !0 } /* if (!this.warpPathPoints) return i.position.copy(this.warpDestPano.position), !0; var n = this.warpPathPoints[0] */ var r = this.warpDestPano.position if (null !== this.nodes && this.cameraHull && this.cameraHull.length > 1) { var o = new P.Vector3() e < 0.5 ? o .copy(this.cameraHull[1]) .sub(n) .normalize() .multiplyScalar(D.warp.softPushDist * e) .add(n) : o .copy(this.cameraHull[this.cameraHull.length - 2]) .sub(r) .normalize() .multiplyScalar(D.warp.softPushDist * D.warp.softPushEnd * (1 - e)) .add(r), i.position.copy(o) } else e < 0.5 ? i.position.copy(n) : i.position.copy(r) }), (t.prototype.interruptAndFastForward = function (e, t) { this.warping && ((this.warpInterrupted = !0), (this.warpInterruptionBlackoutStyle = e), (this.warpInterruptionTravelTime = t), (null !== this.warpInterruptionBlackoutStyle && void 0 !== this.warpInterruptionBlackoutStyle) || (this.warpInterruptionBlackoutStyle = z.MIDDLE), (null !== this.warpInterruptionTravelTime && void 0 !== this.warpInterruptionTravelTime) || (this.warpInterruptionTravelTime = D.minWarpTime)) }), (t.prototype.warpCameraAim = function (e) { var t = D.warp.minWarpTime if (this.upcomingTransType === L.BLACK) t = D.warp.teleportTime else { var i = this.playerControls.cameras[O.PANORAMA], n = new P.Euler(0, 0, 0, D.warp.eOrder).setFromQuaternion(this.warpDestHeroLoc.quaternion, D.warp.eOrder), r = new P.Euler().setFromQuaternion(i.quaternion, D.warp.eOrder), o = new P.Euler(n.x - r.x, n.y - r.y, n.z - r.z, D.warp.eOrder) o.y = N.constrainedTurn(o.y) var a = (1e3 * Math.abs(o.y)) / P.Math.degToRad(D.warp.maxAimPerSec) t = Math.max(t, a) } var s = function () { this._warpStopFlying(), this.discardSlow(), e && e() }.bind(this) this._warpCameraAim(t, s) }), (t.prototype.warpCommonParameters = function (e, t, i, n) { this.model.skybox.material.uniforms.blackout.value = n var r = F.uniform(this.model.skybox, 'progress', 1), o = F.allUniforms(this.model.chunks, 'progress', 1), a = !1, s = function () { if (this.warpInterrupted) return (a = !0) }.bind(this), l = function (e, t) { return i && a ? !(this.model.skybox.material.uniforms.progress.value = 0) : void r(e, t) }.bind(this), c = function (e, t) { return i && a ? (o(0), !0) : void o(e, t) }.bind(this) V.start(s, e, null, t, null, 'safeHaltWatch'), V.start(l, e, null, t, B[D.warp.blendEasing], 'skyboxProgress'), V.start(c, e, null, t, B[D.warp.blendEasing], 'chunkProgress') }), (t.prototype.warpTravel_STD = function (e) { var l, c = Math.min(D.warp.lookAheadMax, D.warp.lookAheadDist / this.warpLength), h = this.playerControls.cameras[O.PANORAMA], i = (Math.min(0.25, 3 / this.warpLength), Math.min(0.35, 7 / this.warpLength)), u = new P.Euler(0, 0, 0, D.warp.eOrder), d = new P.Vector3(), p = new P.Euler().setFromQuaternion(h.quaternion, D.warp.eOrder), f = new P.Euler().copy(p), g = h.position.clone(), m = new P.Matrix4(), v = new P.Euler(), t = D.warp.minWarpTime ;(t += this.warpLength * D.warp.timePerMeter), 0.01 < D.warp.flySpeed && (t = (1e3 * this.warpLength) / D.warp.flySpeed) function n(e) { var t = i return P.Math.smoothstep(e, 0, t) * (1 - P.Math.smoothstep(e, 1 - t, 1)) } var y = !1, r = this.warpDestHeroLoc.quaternion, o = new P.Vector3(0, 0, -1).applyQuaternion(r).normalize(), A = this.warpPathPoints[this.warpPathPoints.length - 1] .clone() .sub(this.warpPathPoints[this.warpPathPoints.length - 2]) .normalize(), a = A.dot(o), C = P.Math.radToDeg(Math.acos(a)), s = function () { return ( m.lookAt(g, l, U.UP), u.setFromRotationMatrix(m, D.warp.eOrder), p.setFromQuaternion(h.quaternion, D.warp.eOrder), v.set(u.x - p.x, u.y - p.y, u.z - p.z, D.warp.eOrder), N.constrainedTurn(v.y) ) }.bind(this), I = function (e, t) { if (this.warpInterrupted) return (y = !0) }.bind(this), E = function (e, t) { return y || !this.warpPathPoints ? (k.blur(0), !0) : void k.blur(e) }.bind(this), _ = F.allUniforms(this.model.chunks, 'modelAlpha', 1), b = function (e, t) { return y || !this.warpPathPoints ? (_(0), !0) : void _(e, t) }.bind(this), w = function (e, t) { if (!this.warpPathPoints) return h.position.copy(this.warpDestPano.position), !0 if (y) return !0 var i = this.interpAlongPath(this.warpPathPoints, this.warpPathLengths, e) h.position.copy(i), (g = this.interpAlongPath(this.warpPathPoints, this.warpPathLengths, 0.99 * e)) }.bind(this), T = function (e, t) { return this.warpPathPoints ? !!y || void (l = this.interpAlongPath(this.warpPathPoints, this.warpPathLengths, Math.min(e + c, 1))) : (H.debug('Lost bunny.'), !0) }.bind(this), x = function (e, t) { if (y) return H.debug('>>>> Walkthrough interupted at t=' + e), !0 if (!this.warpPathPoints) return !0 var i = this.warpLength * e, n = P.Math.smoothstep(i, 0, this.brushPrefs.lookBlendDist), r = P.Math.smoothstep(i, this.warpLength - this.brushPrefs.lookBlendDist, this.warpLength) D.warp.matchCam && (n *= 1 - r), m.lookAt(g, l, U.UP), u.setFromRotationMatrix(m, D.warp.eOrder), p.setFromQuaternion(h.quaternion, D.warp.eOrder), v.set(u.x - p.x, u.y - p.y, u.z - p.z, D.warp.eOrder), (v.y = N.constrainedTurn(v.y)), (u.x = p.x + n * v.x), (u.y = p.y + n * v.y), (u.z = p.z + n * v.z), v.set(u.x - f.x, u.y - f.y, u.z - f.z, D.warp.eOrder), (v.y = N.constrainedTurn(v.y)) var o = (P.Math.degToRad(D.warp.maxTurnPerSec) * t) / 1e3 ;(v.y = Math.sign(v.y) * Math.min(o, Math.abs(v.y))), (f.x = f.x + v.x * D.warp.turnFriction), (f.y = f.y + v.y * D.warp.turnFriction), (f.z = f.z + v.z * D.warp.turnFriction), (f.x = Math.max(P.Math.degToRad(D.warp.minDownAngle), f.x)) var a = l.clone().sub(g).normalize() if (C < D.warp.maxAimRotation && 0 < r) { var s = 1 - r ;(a.x = a.x * s + r * A.x), (a.y = a.y * s + r * A.y), (a.z = a.z * s + r * A.z), a.normalize() } this.bunnyObj.position.copy(h.position).add(a), d.set(0, 0, -1).applyEuler(f).normalize(), d.multiplyScalar(8), d.add(h.position), (1 - c < e && D.warp.matchCam) || (h.controls.lookAt(d), h.controls.lookVector.copy(d), h.lookAt(d)) }.bind(this), S = function () { y ? (this.discardSlow(), (this.upcomingTransType = L.BLACK), this.warpTravel_BLACK(-0.5, this.warpInterruptionTravelTime, z.BEGINNING, e)) : this._wrapupWarpShading(e) }.bind(this) T(0) var M = D.warp.motionLeadTime + (1e3 * Math.abs(s())) / P.Math.degToRad(D.warp.maxTurnPerSec), R = M / (t += M) this.warpCommonParameters(t, R, !0, z.NONE), V.start(I, t, null, 0, null, '_haltWatcher'), 0 < D.warp.blur && ((k.blurStrength = D.warp.blur), V.start(E, t, null, R, n, 'blurring')), V.start(b, t, null, R, n, 'modelAlpha'), V.start(w, t, null, R, B[D.warp.blendEasing], 'followPath'), V.start(T, t, null, R, B[D.warp.blendEasing], 'goBunny'), V.start(x, t, S, 0, B[D.warp.blendEasing], 'lookAtBunny') }), (t.prototype.warpTravel_BLACK = function (e, t, i, n) { var r = e || 0 null != t || (t = D.warp.teleportTime) //add player.model.hotGroup.visible = false let oldPano = this.player.currentPano let toPano = this.player.model.panos.get(this.warpDestHeroLoc.panoId) this.player.emit('pano.chosen', oldPano, toPano) var done = () => { this.player.transitionPos({ type: 'beforeFlytopano', pano: this.player.currentPano, dur: 0, callback: () => { player.model.hotGroup.visible = true Hot.updateVisibles([this.player.currentPano]) //更新热点显示 } }) this.player.emit('flying.ended', toPano.position, oldPano.position, toPano, oldPano) } if (window.DATA.momentTourBlackNewType) { player.sceneRenderer.effects.fastTranMaskPass.start(player.sceneRenderer) var camera = this.playerControls.cameras['panorama'] var end = this.warpDestHeroLoc.position camera.position.copy(end) setTimeout(() => { player.sceneRenderer.effects.fastTranMaskPass.stop() this.wrapupWarpShadingOnly(n, i) done() }, t) } else { var o = function () { this.wrapupWarpShadingOnly(n, i) done() }.bind(this) var firstPos = this.player.position.clone() //add V.start(this.stepWarpPath.bind(this, firstPos), t, o, r, B[D.warp.blendEasing], 'stepMotion') } this.warpCommonParameters(t, r, !1, i) this.model.chunks.concat(this.model.skybox).forEach(function (e) { // 改 if (window.DATA.momentTourBlackNewType) { e.material.uniforms.blackout.value = 5 //i 改 //e.material.defines.newBlack = '' //e.material.needsUpdate = true } else { e.material.uniforms.blackout.value = i } }), this._warpBendAim(null, t, null, r) /* this.warpCommonParameters(t, r, !1, i) this.model.chunks.forEach(function(e) { e.material.uniforms.blackout.value = i }), this._warpBendAim(null, t, null, r); //add var done = ()=>{ Hot.updateVisibles([this.player.currentPano]) //更新热点显示 this.player.transitionPos({type:"beforeFlytopano", pano:this.player.currentPano, dur:100})//add } var o = function() { this.wrapupWarpShadingOnly(n, i) done() } .bind(this); var firstPos = this.player.position.clone()//add V.start(this.stepWarpPath.bind(this, firstPos), t, o, r, B[D.warp.blendEasing], "stepMotion") */ }), (t.prototype.flightStepWalk = ((a = new P.Vector3()), (s = new P.Vector3()), function (e, t, i) { if (this.warpInterrupted) i && i() else if (this.activeTransType !== L.WALK) this._clearWarpShading(), this._warpStopFlying(), this.player.spider.draw(), this.placeCpm(), i && i() else if (this.player.currentPano !== e) { var n = { pano: e, lookAtPoint: t, duration: null, maxDistanceOverride: D.warp.walkMaxDist, skipWarpingCheck: !1, constantMoveSpeed: !0 } if (e == this.warpDestPano) { //到达终点前,放大到终点的zoom n.zoomLevel = this.warpDestHeroLoc.zoom } ;(n.duration = function (e, t) { var i = Math.min(this.player.position.distanceTo(e.position), D.transition.flytimeMaxDistanceThreshold) * D.transition.flytimeDistanceMultiplier + D.transition.flyTime s.copy(U.FORWARD), this.player.getDirection(s), a.copy(t).sub(e.position).normalize() var n = a.dot(s), r = Math.acos(n), o = r / i 0.001 < o && ((i *= o / 0.001), //-----这是什么???? r < 1 && (i *= 1.2)) return (i / DATA.tourWalkSpeed) * 100 }.call(this, e, t)), this.player.nonInterruptingFlyToPano(n, i) } else i && i() })), (t.prototype.makeWalkFlightFunc = function (e, t, i) { return this.flightStepWalk.bind(this, e, t, i) }), (t.prototype.warpTravel_WALK = ((f = []), function (e) { for (var t = this.player.model.panos, i = null, n = !1, r = (f.length = 0); r < this.nodes.length; r++) { var o = this.nodes[r], a = t.get(o) this.nodes.length, (n = i && a.position.distanceTo(i.position) < D.warp.walkMinDist), (i && n) || (f.push(o), (i = a)) } n && 1 < this.nodes.length && (f[f.length - 1] = this.nodes[this.nodes.length - 1]) var s = f.length, l = t.get(f[s - 1]), c = new Array(s + 1) c[c.length - 1] = function () { e && e() }.bind(this) for (var h = s - 1, u = c.length - 1; 0 < u; u -= 1) { var d = f[h] l = t.get(d) var p = new P.Vector3() this.getLookAtForWalkingTourNode(f, h, p), (c[u - 1] = this.makeWalkFlightFunc(l, p, c[u])), h-- } c[0]() })), (t.prototype.getLookAtForWalkingTourNode = ((c = new P.Vector3()), (h = new P.Vector3()), (u = new P.Vector3()), (d = new P.Vector3()), (p = new P.Vector3()), function (e, t, i) { var n = e.length if (n <= t) return !1 var r = 1, o = 1 h.set(0, 0, 0), p.set(0, 0, 0) for (var a = null, s = t; s < t + 3 && !(n <= s); s++) { if (((a = this.player.model.panos.get(e[s])), this.getOrientationForWalkingTourNode(e, s, u), s === t && c.copy(u), d.copy(u), t < s)) { var l = d.dot(c) < 0.65 ;(r *= l ? 0.2 : 0.75), (o *= l ? 0.2 : 0.4) } u.multiplyScalar(r), h.add(u), p.lerp(a.position, o) } return h.normalize(), i.copy(p), i.add(h), !0 })), (t.prototype.getOrientationForWalkingTourNode = function (e, t, i) { var n = e.length if (n <= t) return !1 if (t === n - 1) i.copy(U.FORWARD).applyQuaternion(this.warpDestHeroLoc.quaternion) else { var r = this.player.model.panos.get(e[t]), o = this.player.model.panos.get(e[t + 1]) i.copy(o.position).sub(r.position) } return i.normalize(), !0 }), (t.prototype.warpCameraTravel = function (e, t, i, n) { if (((this.activeTransType = this.upcomingTransType), (this.lastTransType = this.activeTransType), (this.upcomingTransType = null), e)) this.activeTransType === L.BLACK ? this.warpTravel_BLACK(null, i, t, n) : this.activeTransType === L.WALK ? this.warpTravel_WALK( function () { this._clearWarpShading(), this._warpStopFlying(), this.player.spider.draw(), this.placeCpm(), n && n() }.bind(this) ) : this.warpTravel_STD(n) else { var r = function () { this._wrapupTravel(n) }.bind(this), o = { pano: this.warpDestPano, lookAtPoint: null, duration: null, maxDistanceOverride: null, skipWarpingCheck: !1 } this.player.flyToPano(o, r) } }), (t.prototype.startWarpState = function () { ;(this.warping = !0), (this.warpInterrupted = !1), (this.warpInterruptionBlackoutStyle = null), (this.warpInterruptionTravelTime = null) }), (t.prototype.endWarpState = function () { this.warping = !1 }), (t.prototype.warpToPano = function (e, t, i, n) { if (this.warping) H.warn('Cannot warp when already warping') else { if (((this.upcomingTransType = e), (this.activeTransType = null), !this.setWarpDestPano())) return (this.upcomingTransType = null), void this.warpToNonPano(n) if (this.player.mode !== O.PANORAMA) return ( (this.upcomingTransType = null), this.discardSlow(), void this.player.flyToNewMode({ mode: O.PANORAMA, pano: this.warpDestPano, duration: D.warp.outsideTime, warpDest: this.warpDestHeroLoc, callback: n, force: !0 }) ) if (!this.warpDestPano) return H.warn('no warp destination, callback dropped'), void (this.upcomingTransType = null) var r = !( this.model.panos.isNeighbour(this.player.currentPano, this.warpDestPano) && this.warpDestPano !== this.player.currentPano && this.warpDestPano.position.distanceTo(this.player.currentPano.position) < D.warp.nearPanoDist ), o = this.chooseWarpPath(r) if (o && this.upcomingTransType !== L.WALK) { var a = function () { ;(this.waitingToWarp = !1), this.warpToPano(e, t, i, n) }.bind(this) if (this.player.checkAndWaitForPanoLoad(this.warpDestPano, 'high', 'low', this.player.basePanoSize, a)) return void (this.waitingToWarp = !0) } this.player.currentPano || (H.warn('Arrived at a very strange spot!'), (this.player.currentPano = this.warpDestPano), this.placeCpm(), this.fadeOutCpm(D.path.fadeOutTime), this.player.spider.draw()), H.debug('Warping to pano ', this.warpDestPano.position), this.upcomingTransType !== L.WALK && this.player.emit(g.PanoChosen, this.player.currentPano, this.warpDestPano), this.startWarpState() var s = function () { this.endWarpState(), n && n() }.bind(this) o ? this.warpCameraTravel(r, t, i, s) : this.warpCameraAim(s) } }), (v.exports = t) }).call(this, '/js/objects/ShowPath.js') }, { '../constants': 8, '../effects': 16, '../enum/BlackoutStyle': 18, '../enum/ModelManagerEvents': 33, '../enum/PlayerEvents': 40, '../enum/RenderOrder': 42, '../enum/Vectors': 50, '../enum/Viewmode': 51, '../enum/WarpStyle': 52, '../gui/gui': 65, '../model/ModelManager': 140, '../objects/Snapshot': 153, '../settings': 166, '../shaders': 167, '../util/easing': 186, '../util/lerp': 188, '../util/logger': 189, '../util/math': 190, '../util/texture': 194, '../util/transitions': 195, three: 217 } ], 152: [ function (e, t, i) { 'use strict' function n() { var e = new r.SphereBufferGeometry(a.skyboxRadius, 20, 5), t = new r.RawShaderMaterial({ fragmentShader: o.skysphere.fragmentShader, vertexShader: o.skysphere.vertexShader, uniforms: r.UniformsUtils.clone(o.skysphere.uniforms), side: r.BackSide, name: 'skysphere' }) ;(t.uniforms.radius.value = e.parameters.radius), r.Mesh.call(this, e, t) } var r = e('three'), o = e('../shaders'), a = e('../settings') ;((n.prototype = Object.create(r.Mesh.prototype)).constructor = n), (t.exports = n) }, { '../settings': 166, '../shaders': 167, three: 217 } ], 153: [ function (r, o, e) { ;(function (e) { 'use strict' function t(e) { n.call(this, e), (this.sid = e.sid), (this.panoId = e.panoId), (this.orthoZoom = e.orthoZoom), (this.floorVisibility = e.floorVisibility), (this.thumbUrl = e.thumbUrl), (this.name = e.name), (this.zoom = e.zoom) } var i = (r('three'), r('../util/logger')), n = (r('../settings'), r('../enum/Viewmode'), r('../util/common'), r('../util/transitions'), r('../util/lerp'), r('../util/ajax'), r('../util/texture'), r('./View')) r('events').EventEmitter, new i(e), ((t.prototype = Object.create(n.prototype)).isPano = function () { return this.panoId && '' !== this.panoId && this.panoId != 'outside' }), (o.exports = t) }).call(this, '/js/objects/Snapshot.js') }, { '../enum/Viewmode': 51, '../settings': 166, '../util/ajax': 181, '../util/common': 185, '../util/lerp': 188, '../util/logger': 189, '../util/texture': 194, '../util/transitions': 195, './View': 154, events: 202, three: 217 } ], 154: [ function (o, a, e) { ;(function (e) { 'use strict' function t(e) { ;(e = e || {}), (this.position = new i.Vector3()), (this.quaternion = new i.Quaternion()), this.update(e) } var i = o('three'), n = o('../util/logger'), r = (o('../settings'), o('../enum/Viewmode'), o('../util/common'), o('../util/transitions'), o('../util/lerp'), o('../util/ajax'), o('../util/texture'), o('events').EventEmitter) new n(e), ((t.prototype = Object.create(r.prototype)).isValid = function () { return !!this.cameraMode }), (t.prototype.update = function (e) { return ( (this.cameraMode = e.cameraMode || this.cameraMode), (this.pano = e.pano || this.pano), e.position && this.position.copy(e.position), e.quaternion && this.quaternion.copy(e.quaternion), this ) }), (a.exports = t) }).call(this, '/js/objects/View.js') }, { '../enum/Viewmode': 51, '../settings': 166, '../util/ajax': 181, '../util/common': 185, '../util/lerp': 188, '../util/logger': 189, '../util/texture': 194, '../util/transitions': 195, events: 202, three: 217 } ], 155: [ function (J, ee, e) { ;(function (e) { 'use strict' function t(e) { ;(this.currentPano = null), (this.nextPano = null), (this.camera = null), (this.paused = !1), (this.flying = !1), (this.sceneIntersectionPlane = null), (this.target = new B.Vector3()), (this.mouse = new B.Vector3(1.1, 1.1, 0.5)), (this.mouseAtMouseDown = new B.Vector2()), (this.mouseCouldBeClickToMove = !1), (this.mouseLastMoveTime = Date.now()), (this.mouseDown = !1), (this.mouseDownTimer = null), (this.couldBeLongTap = !1), (this.containsMouse = !0), (this.isTouchEvent = !1), (this.isPanoHover = !1), (this.reticule = new n(this)), (this.panoMarkers = []), (this.spider = new s(this)), (this.quaternion = new B.Quaternion()), (this.position = new B.Vector3(15, 10, 15)), (this.previousState = null), (this.lastInsideView = new o()), (this.last360View = new o()), (this.raycaster = new B.Raycaster()), (this.intersect = null), (this.lastChangeTime = Date.now()), (this.history = new h()), (this.cameraControls = null), (this.path = null), (this.model = null), (this.domElement = null), (this.cachedPanoCandidates = null), (this.basePanoSize = 0), (this.standardPanoSize = 0), (this.highPanoSize = 0), (this.ultraHighPanoSize = 0), (this.zoomLevel = 1), (this.zooming = 0), (this.zoomSpeed = 0.5), (this.scrollZoomSpeed = 0.06), (this.zoomSpeedAdjust = 0.05), (this.defaultZoomIncrement = 0.2), (this.baseFov = k.insideFOV), (this.zoomFov = this.baseFov), (this.zoomEnabled = !0), (this.preRenderingEnabled = !1), this.setupCustomProperties(e), (this.zoomStats = new v()), (this.modeTran = '') //'dollhouse-panorama' this.currentCursor = '' window.player = this } var B = J('three'), i = J('./util/logger'), n = J('./objects/Reticule'), a = J('./objects/Panorama'), r = J('./objects/ShowPath'), o = J('./objects/View'), s = (J('./objects/Snapshot'), J('./objects/NSpider')), V = J('./enum/Viewmode'), T = (J('./enum/TagStates'), J('./enum/Vectors')), l = J('./enum/Keys'), k = (J('./enum/AlignmentType'), J('./settings')), x = J('./util/common'), U = (J('./util/browser'), J('./util/math')), H = J('./util/lerp'), z = J('./util/easing'), G = J('./util/transitions'), c = J('events').EventEmitter, h = (J('./shaders'), J('./util/history')), S = (J('./util/camera'), J('./model/ModelManager'), J('./enum/PathDiscardMode')), M = J('./enum/PathDisplayMode'), W = J('./enum/PlayerEvents'), u = J('./enum/ControlEvents'), d = J('./enum/ModelManagerEvents'), R = J('./enum/WarpStyle'), P = J('./enum/BlackoutStyle'), p = J('./exception/BasicException'), f = J('./enum/PanoSizeClass'), g = (J('./tile/TileDownloader'), J('./tile/TilePrioritizer')), m = (J('./enum/PanoramaEvents'), J('./enum/ZoomEvents')), v = J('./util/ZoomStats'), y = J('./constants'), j = J('./util/common'), A = J('./util/cameraLight'), //, C = J("hot") Y = new i(e), q = Object.freeze({ FlyToPano: G.getUniqueId(), FlyToNewMode: G.getUniqueId(), FlyToSameMode: G.getUniqueId(), FlyToViewFloor: G.getUniqueId(), LookTransition: G.getUniqueId(), ZoomTransition: G.getUniqueId() }) function I(e) { for (var t = e.split(','), i = t[0].match(/:(.*?);/)[1], n = atob(t[1]), r = n.length, o = new Uint8Array(r); r--; ) o[r] = n.charCodeAt(r) return new Blob([o], { type: i }) } ;((t.prototype = Object.create(c.prototype)).init = function (e) { ;(this.modelManager = e.modelManager), (this.tileDownloader = e.tileDownloader), (this.panoRenderer = e.panoRenderer), (this.qualityManager = e.qualityManager), (this.domElement = e.container), (this.camera = e.camera), (this.tagManager = e.tagManager), (this.cameraControls = e.controls), (this.path = new r(e.director, this, e.controls)), (this.basePanoSize = this.qualityManager.getPanoSize(f.BASE)), (this.standardPanoSize = this.qualityManager.getPanoSize(f.STANDARD)), (this.highPanoSize = this.qualityManager.getPanoSize(f.HIGH)), (this.ultraHighPanoSize = this.qualityManager.getPanoSize(f.ULTRAHIGH)), (this.tileDownloader.processPriorityQueue = !1), (this.tileDownloader.tilePrioritizer = new g(this.qualityManager, this.basePanoSize, this.standardPanoSize, this.highPanoSize, this.ultraHighPanoSize)), this.bindEvents(e.container), this.updateModel() //add this.raycaster.linePrecision = 0.1 }), (t.prototype.screenShot = function (i) { if (!this.flying && !this.flyingToTag) { var n = this.sceneRenderer n.updateScreenSize(i) this.model.panos.forEach(e => { if (e.marker) { e.marker.forceHide = e.marker.visible e.marker.visible = !1 } }) /* for (var e in this.model.hots) this.model.hots[e].mesh.visible = !1; */ player.model.hotGroup.visible = false ;(this.reticule.visible = !1), (this.reticule.forceUnvisible = !0), (this.path.currentPanoMarker.mesh.visible = !1), setTimeout( function () { n.renderer.clear(!0, !0, !0), n.renderer.render(n.scene, n.camera) var e = n.renderer.domElement.toDataURL(i.type, 0.9) i.f && i.f(e) n.updateScreenSize({ resize: !0 }) this.reticule.visible = !0 player.model.hotGroup.visible = true this.model.panos.forEach(e => { e.marker && (e.marker.visible = e.marker.forceHide) }) ;(this.path.currentPanoMarker.mesh.visible = !0), n.renderer.render(n.scene, n.camera) }.bind(this), 30 ) } }) var E, _, b, w, O, L, D, N, F, X, Z, K, Q = J('scaleImg') t.prototype.getWrapShot = function () { var i = this.getSnapAngleInfo(), n = ',{\r\t' + i, r = arguments[0] this.screenShot({ width: g_snapShotWidth, height: g_snapShotHeight, type: 'image/jpeg', f: function (e) { if (r && r.__callback) return r.__callback(e, i) var t = new Image() ;(t.src = e), (t.onload = function () { var e = (function (r, i) { function n(e, t) { var i = o || r, n = document.createElement('canvas') ;(n.width = i.width), (n.height = i.height), n.getContext('2d').drawImage(i, 0, 0, i.width, i.height), (o = Q(e, n, t)) } function e() { var e = o || r, t = I(e.src) i.maxWeight && t.size > i.maxWeight && (n(i.maxWeight / t.size, 'jpeg'), (t = I(e.src))), ((o = o || new Image()).base64Src = e.src), (o.src = window.URL.createObjectURL(t)) } var o, t = Math.max(r.width, r.height) return ( 'png' != i.toType && ('jpeg' == i.oldType ? (t > i.maxSize && n(i.maxSize / t, 'jpeg'), e()) : 'png' == i.oldType && i.maxWeight && i.weight > i.maxWeight && (n(t > i.maxSize ? i.maxSize / t : 1, 'jpeg'), e())), o || r ) })(this, { maxSize: g_snapShotWidth, oldType: 'jpeg' }) e.src.replace( (function (e) { return 'image/' + (e = e.toLowerCase().replace(/jpg/i, 'jpeg')).match(/png|jpeg|bmp|gif/)[0] })('image/jpeg'), 'image/octet-stream' ) var t = 'snap' + new Date().getTime() !(function (e, t) { var i = document.createElementNS('http://www.w3.org/1999/xhtml', 'a') ;(i.href = e), (i.download = t) var n = document.createEvent('MouseEvents') n.initMouseEvent('click', !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), i.dispatchEvent(n) })(e.src, t + '.jpg'), (n += ',\r\t"thumbnail_signed_src":"' + t + '.jpg",'), (n += '\r\t"sid":"' + t + '",'), (n += '\r\t"name":"' + t + '"\r}'), logData(n) }) } }) } /* , t.prototype.getSnapAngleInfo = function() { var e = {} , t = '"metadata":{' , i = this.camera.quaternion.clone(); switch (this.mode) { case "panorama": e.scan_id = this.currentPano.id, t += '"scan_id":"' + this.currentPano.id + '",'; break; case "floorplan": e.camera_mode = 1, (i = (new B.Quaternion).setFromAxisAngle(new B.Vector3(0,1,0), B.Math.degToRad(90))).multiply(this.camera.quaternion), t += '"camera_mode":1,', t += '"ortho_zoom":' + U.toPrecision(this.cameraControls.activeControl.currentScale, 4) + ","; break; case "dollhouse": e.camera_mode = 2, t += '"camera_mode":2,' } var n = new B.Quaternion(i.x,i.y,i.z,i.w); return n.multiply(new B.Quaternion(Math.sqrt(2) / 2,Math.sqrt(2) / 2,0,0).conjugate()), n.x *= -1, n.w *= -1, e.camera_position = U.toPrecision(this.camera.position.toArray(), 4), e.camera_quaternion = U.toPrecision(n.toArray(), 4), e.zoom = this.zoomLevel, t += '"camera_position":[' + e.camera_position + '],"camera_quaternion":[' + e.camera_quaternion + '], "zoom":' + e.zoom + "}" } , */ ;(t.prototype.getSnapAngleInfo = function () { var info = {} var str = '"metadata":{' var q = this.camera.quaternion.clone() switch (this.mode) { case 'panorama': info.scan_id = this.currentPano.id str += '"scan_id":"' + this.currentPano.id + '",' break case 'floorplan': info.camera_mode = 1 q = new B.Quaternion().setFromAxisAngle(new B.Vector3(0, 1, 0), B.Math.degToRad(90)) q.multiply(this.camera.quaternion) str += '"camera_mode":1,' //str += ('"ortho_zoom":'+m.toPrecision(this.cameraControls.activeControl.currentScale * $("#player").height() / $("#player").width() * D.workshopApsect * 16, 4)+","); str += '"ortho_zoom":' + U.toPrecision(this.cameraControls.activeControl.currentScale, 4) + ',' break case 'dollhouse': info.camera_mode = 2 str += '"camera_mode":2,' break } info.camera_position = U.toPrecision(this.camera.position.toArray(), 4) //console.log(info.camera_position) info.camera_quaternion = U.toPrecision(q.toArray(), 4) /* if(window.screenSta === 'tour'){ // fyz 导览截屏需要做额外的 fyz 对相机截屏的角度进行校对 var out = new B.Quaternion(q.x, q.y, q.z, q.w) out.multiply(new B.Quaternion(Math.sqrt(2) / 2, Math.sqrt(2) / 2, 0, 0).conjugate()) out.x *= -1; out.w *= -1; info.camera_quaternion = U.toPrecision(out.toArray(),4); }else{ info.camera_quaternion = U.toPrecision(q.toArray(),4);; } */ info.zoom = this.zoomLevel //console.log(info.camera_quaternion) // str += ( '"camera_position":['+ info.camera_position + '],"camera_quaternion":['+info.camera_quaternion+"]}"); // fyz 扩展编辑页面, 加上导览点缩放值 str += '"camera_position":[' + info.camera_position + '],"camera_quaternion":[' + info.camera_quaternion + '], "zoom":' + info.zoom + '}' console.log(str) return str }), //------end (t.prototype.setupCustomProperties = function (e) { var i = e || V.PANORAMA Object.defineProperty(this, 'mode', { get: function () { return i }, set: function (e) { var t = i ;(i = e), this.onModeUpdated(t, i) } }) }), (t.prototype.isInMode = function () { for (var e = 0; e < arguments.length; e++) if (this.mode === arguments[e]) return !0 return !1 }), (t.prototype.isOutsideMode = function (e) { return (e = e || this.mode) === V.DOLLHOUSE || e === V.FLOORPLAN }), (t.prototype.is360View = function (e, t) { return e === V.PANORAMA && t && !t.isAligned() }), (t.prototype.setScene = function (e) { ;(this.sceneIntersectionPlane = e.plane), this.path.setScene(e), this.moveReticuleToScene(e) }), (t.prototype.moveReticuleToScene = function (e) { this.reticule.parent && this.reticule.parent.remove(this.reticule), e.add(this.reticule) }), (t.prototype.updateModel = function () { function n(e) { var t = this.cameraControls.cameras[V.DOLLHOUSE], i = this.cameraControls.controls[V.DOLLHOUSE], n = t.position.y + (e - i.target.y), r = k.showFloorDuration + k.showFloorDelay G.start(H.property(i.target, 'y', e), r, null, k.flydown.movementDelay, z[k.flydown.movementEasing], null, q.FlyToViewFloor), G.start(H.property(t.position, 'y', n), r, null, k.flydown.movementDelay, z[k.flydown.movementEasing], null, q.FlyToViewFloor) } ;(this.model = this.modelManager.getActiveModel()), this.model.on( 'floor.changed', function (e, t, i) { this.mode === V.DOLLHOUSE && e !== i && n.call(this, e.center.y) }.bind(this) ), this.model.on( 'allfloors.toggled', function (e, t) { if (this.mode === V.DOLLHOUSE) { var i = e ? this.model.center.y : (i = t.center.y) n.call(this, i) } }.bind(this) ), this.on(W.PanoChosen, this.model.setProjectedPanos.bind(this.model)) var t = this this.model.panos.list.forEach(function (e) { e.vrMarker.addEventListener('click', function () { t.flyToPano({ pano: e }) }) }) }), (t.prototype.updateModelDependentData = function () { this.cameraControls.setModelForControls(this.model), this.getPanoMarkersFromModel(this.model) }), (t.prototype.onModelChanged = function () { this.updateModel(), this.updateModelDependentData() }), (t.prototype.getPanoMarkersFromModel = function (e) { this.panoMarkers = e.panos.list.reduce(function (e, t) { return t.marker ? e.concat(t.marker) : e }, []) }), (t.prototype.handleControlMove = function (e) { this.emit(W.Move, e) }), (t.prototype.handleControlInputStart = function (e) { this.emit(W.InputStart, e) }), (t.prototype.onModeUpdated = function (e, t) { this.cameraControls.activateControls(t), this.emit(W.ModeChanged, e, t) }), (t.prototype.isWarping = function () { return this.path.warping }), (t.prototype.isWaitingToWarp = function () { return this.path.waitingToWarp }), (t.prototype.getLabelScaleFactor = function () { if (this.isOutsideMode()) { return Math.sqrt(this.cameraControls.controls[V.FLOORPLAN].currentScale / 10) } return 0.5 }), (t.prototype.bindEvents = function (e) { e !== document && e.setAttribute('tabindex', -1), e.addEventListener('mousedown', this.onMouseDown.bind(this)), e.addEventListener('mousemove', this.onMouseMove.bind(this)), e.addEventListener('mouseover', this.onMouseOver.bind(this)), e.addEventListener('mouseout', this.onMouseOut.bind(this)), e.addEventListener('mouseup', this.onMouseUp.bind(this)), this.modelManager.on(d.ActiveModelChanged, this.onModelChanged.bind(this)), e.addEventListener('touchstart', this.onTouchStart.bind(this)), e.addEventListener('touchmove', this.onTouchMove.bind(this)), e.addEventListener('touchend', this.onTouchEnd.bind(this)), e.addEventListener('pointerdown', this.onPointerDown.bind(this)), e.addEventListener('pointermove', this.onPointerMove.bind(this)), e.addEventListener('pointerup', this.onPointerUp.bind(this)), document.addEventListener('pointerup', () => { //add window.transformControls && transformControls.onPointerUp() }), e.addEventListener('pointerout', this.onPointerOut.bind(this)), e.addEventListener('pointercancel', this.onPointerCancel.bind(this)), document.addEventListener('keydown', this.onKeyDown.bind(this)), this.cameraControls.on(u.Move, this.handleControlMove.bind(this)), this.cameraControls.on(u.InputStart, this.handleControlInputStart.bind(this)), this.cameraControls.on(u.Pinch, this.handleControlPinch.bind(this)), this.cameraControls.on(u.Scroll, this.handleControlScroll.bind(this)), window.addEventListener('snapshotBegin', this.getWrapShot.bind(this)), //window.addEventListener("tourAudioEnded", this.changeMusic.bind(this)), window.getSeft && getSeft(this) }), (t.prototype.onMouseDown = function (e) { e.currentTarget !== document && e.currentTarget.focus(), 0 === e.button && (this.handleInputStart.call(this, e.clientX, e.clientY, !1), this.updateIntersect()) }), (t.prototype.onMouseMove = function (e) { ;(this.isTouchEvent = !1), this.handleInputMove.call(this, e.clientX, e.clientY, !1) }), (t.prototype.onMouseOver = function (e) { ;(this.containsMouse = !0), !this.mouseDown || (0 !== e.which && 0 !== e.buttons) || (this.mouseDown = !1) }), (t.prototype.onMouseOut = function (e) { this.containsMouse = !1 }), (t.prototype.onMouseUp = function (e) { this.handleInputEnd.call(this, e.clientX, e.clientY, !1) }), (t.prototype.onTouchStart = function (e) { if ((e.currentTarget !== document && e.currentTarget.focus(), !this.mouseDown)) { this.couldBeLongTap = !0 var t = x.average(e.changedTouches, 'clientX'), i = x.average(e.changedTouches, 'clientY') this.handleInputStart.call(this, t, i, !0), (this.mouseDownTimer = setTimeout( function () { this.updateIntersect(), this.handleInputEnd.call(this, t, i, !0) }.bind(this), k.input.longTapThreshold )) } }), (t.prototype.onTouchMove = function (e) { var t = x.average(e.changedTouches, 'clientX'), i = x.average(e.changedTouches, 'clientY') this.handleInputMove.call(this, t, i, !0) }), (t.prototype.onTouchEnd = function (e) { if ((clearTimeout(this.mouseDownTimer), this.mouseDown)) { ;(this.couldBeLongTap = !1), this.updateIntersect() var t = x.average(e.changedTouches, 'clientX'), i = x.average(e.changedTouches, 'clientY') this.handleInputEnd.call(this, t, i, !0) } }), (t.prototype.onPointerDown = function (e) { return ( e.currentTarget !== document && e.currentTarget.focus(), this.mouseDown || 'mouse' === e.pointerType ? this.onMouseDown(e) : ((this.couldBeLongTap = !0), this.handleInputStart.call(this, e.clientX, e.clientY, !0), void (this.mouseDownTimer = setTimeout( function () { this.updateIntersect(), this.handleInputEnd.call(this, e.clientX, e.clientY, !0) }.bind(this), k.input.longTapThreshold ))) ) }), (t.prototype.onPointerMove = function (e) { 'mouse' !== e.pointerType ? this.handleInputMove.call(this, e.clientX, e.clientY, !0) : this.onMouseMove(e) }), (t.prototype.onPointerUp = function (e) { return this.mouseDown && 'mouse' !== e.pointerType ? (clearTimeout(this.mouseDownTimer), (this.couldBeLongTap = !1), this.updateIntersect(), void this.handleInputEnd.call(this, e.clientX, e.clientY, !0)) : this.onMouseUp(e) }), (t.prototype.onPointerOut = function (e) { this.mouseDown = !1 }), (t.prototype.onPointerCancel = function (e) { this.mouseDown = !1 }), (t.prototype.onKeyDown = function (e) { var t = function () { this.cameraControls.activeControl && this.cameraControls.activeControl.emit(u.Move, 'key') }.bind(this), i = e.which switch (i) { case l.F: t(), this.changeFloor(-1) break case l.R: t(), this.changeFloor(1) } if (this.mode === V.PANORAMA) switch (i) { case l.UPARROW: case l.W: this.flyLocalDirection(T.FORWARD.clone()) break case l.DOWNARROW: case l.S: this.flyLocalDirection(T.BACK.clone()) break case l.A: this.flyLocalDirection(T.LEFT.clone()) break case l.D: this.flyLocalDirection(T.RIGHT.clone()) } }), (t.prototype.handleScrollPinchZoom = function (e) { var t = e, i = this.zoomLevel this.zoomBy(t), this.currentPano && this.zoomStats.addZoomAction(i, this.zoomLevel, this.currentPano.id) }), (t.prototype.handleControlPinch = function (e) { k.zoom.enabled ? this.handleScrollPinchZoom(1 - e) : this.flyLocalDirection(new B.Vector3(0, 0, e).normalize()) }), (t.prototype.handleControlScroll = function (e) { k.zoom.enabled ? (0 < e ? (e = 1 + this.scrollZoomSpeed) : e < 0 && (e = 1 - this.scrollZoomSpeed), 0 !== e && this.handleScrollPinchZoom(e)) : this.flyLocalDirection(new B.Vector3(0, 0, -e).normalize()) }), (t.prototype.handleInputStart = function (e, t, i) { var n = this.handelPadding(e, t) ;(e = n.x), (t = n.y), (this.isTouchEvent = i), U.convertScreenPositionToNDC(e, t, this.mouse), U.convertScreenPositionToNDC(e, t, this.mouseAtMouseDown), (this.mouseCouldBeClickToMove = !0), (this.mouseDown = !0) //this.mouseCouldBeClickToMove && window.Hotpoint && (new Hotpoint).state(this, C) this.mouseCouldBeClickToMove && editTool.hotpoint.addHot() window.transformControls && transformControls.onPointerDown() }), (t.prototype.handelPadding = function (e, t) { return ( this.pad || (this.pad = { x: dom.getOffset('left', $('#player')[0]), y: dom.getOffset('top', $('#player')[0]) }), { x: e - this.pad.x, y: t - this.pad.y } ) }), (t.prototype.handleInputMove = function (e, t, i) { var n = this.handelPadding(e, t) ;(e = n.x), (t = n.y), (this.isTouchEvent = i), U.convertScreenPositionToNDC(e, t, this.mouse) var moveToleranceNDC = window.transformControls && transformControls.visible ? 0.0000001 : k.input.moveToleranceNDC this.mouseAtMouseDown.distanceTo(this.mouse) > moveToleranceNDC && ((this.mouseCouldBeClickToMove = !1), (this.couldBeLongTap = !1), clearTimeout(this.mouseDownTimer)), (this.mouseLastMoveTime = Date.now()), this.reticule.move(e, t, i) window.transformControls && transformControls.onPointerMove() }), (t.prototype.handleInputEnd = function (e, t, i) { if (((this.isTouchEvent = i), (this.mouseDown = !1), this.cameraControls.controls[V.PANORAMA].emit('interaction.direct'), !i && this.couldBeLongTap)) return !0 if (this.handleLongTap()) return !0 window.transformControls && transformControls.onPointerUp() if (this.mouseCouldBeClickToMove) { if (this.flying) return this.path.activeTransType === R.WALK && this.emit(W.WarpInterruptedWithFlyTo, this.path.activeTransType), !0 //add---- if (this.checkHotClick()) return !0 if (window.VisiSet && VisiSet.setPanoVisible) { //正在设置漫游可行 this.intersect && this.intersect.object.visible && VisiSet.dealPanoVisible(this.intersect.object.name) return } if (window.VisiSet && VisiSet.setTagVisible) { VisiSet.tagVsetting && this.intersect && this.intersect.object.visible && VisiSet.dealTagVisible(this.intersect.object.name) return } if (window.VisiSet && VisiSet.setPanoLog) { this.intersect && this.intersect.object.visible && VisiSet.dealPanoLogClick(this.intersect.object) return } if (window.VisiSet && VisiSet.setRoute) { this.intersect && this.intersect.object.visible && VisiSet.dealRouteClick(this.intersect.object) return } if (window.VisiSet && VisiSet.setPanoArea) { this.intersect && this.intersect.object.visible && VisiSet.dealPanoAreaClick(this.intersect.object) return } if (this.hoveringPlane) { this.clickOverlay(this.hoveringPlane) return } if (window.EditOverlay && EditOverlay.objCursorType == 'overlay') { return EditOverlay.addPlane({ intersect: this.intersect }) } /* if(objects.mainDesign && objects.mainDesign.editing && objects.mainDesign.handleClickEnd(this)){//许钟文加 if(objects.mainDesign.editType == "wallDesign" && this.mode == "panorama") return !0; else if(objects.mainDesign.editType == "addOverlay")return !0; } */ //---------- if (this.intersect) { // for cad add door etc. let result = {} this.emit('getIntersect', this.intersect, state => { //consume result.consume = true }) if (result.consume) return //有效使用了,就return } if ((this.cameraControls.activeControl && this.cameraControls.activeControl.emit(u.Move, this.isTouchEvent ? 'touch' : 'mouse'), this.history.invalidate(), this.intersect)) return this.flyToPanoClosestToMouse() if (this.mode === V.PANORAMA) { var n = this.closestPanoInDirection(this.getMouseDirection()) return n ? this.flyToPano({ pano: n }) : this.bump(this.getMouseDirection()) } } //this.intersect && this.closestPano && this.closestPano.hoverOff(this.mode) }), (t.prototype.handleLongTap = function () { if (this.couldBeLongTap && (!this.isPanoHover || this.mode !== V.PANORAMA)) return this.cameraControls.activeControl && this.cameraControls.activeControl.emit(u.LongTap, 'touch'), !0 }), (t.prototype.checktagClick = function () { if (this.tagManager.intersectTag) { var e = this.isTouchEvent, t = this.tagManager.clickedOnTag(e, this) return e || t || G.cancelById(q.LookTransition), !0 } if (this.tagManager.activeTag) return this.tagManager.dismissActiveTag(), !1 }), (t.prototype.rankedtagInDirection = function (e, t) { return this.tagManager.rankedtagInDirection(e, this.position, this.camera, t) }), (t.prototype.start = function (e) { $('.toolLeft').removeClass('unable') $('.toolTop').removeClass('unable') //------------------- window.initTransformCtl(B) //this.model.loadOverlays() //window.EditOverlay && window.EditOverlay.init(B); window.VisiSet && VisiSet.init() //------------------- var t = e.mode, i = e.pano, n = e.position, r = e.quaternion, o = e.tag, a = e.quickstart, s = $.Deferred() this.updateModelDependentData(), this.updateFromControls(), this.findDefaultViews() var l = this.is360View(t, i) return ( !this.model.outsideAllowed() || l || a ? this.startInside(i, n, r, o, s) : this.startOutside(e, s), s.done( function (e) { this.emit(W.Ready, l, e, o) }.bind(this) ), s.promise() ) }), (t.prototype.startOutside = function (e, t) { var i = e.mode, n = e.pano, r = e.position, o = e.quaternion, a = e.zoom, s = e.floorVisibility, l = e.tag this.emit(W.StartOutside, k[i].transitionTime), this.isOutsideMode(i) ? (this.model.warpDestFloors(s, !0), G.cancelById(q.FlyToViewFloor), i === V.FLOORPLAN ? this.floorplanMode(r, o, a) : this.dollhouseMode(r, o), t.resolve(!1)) : this.startInsideWithFlyin(n, r, o, l, t) }), (t.prototype.startInside = function (e, t, i, n, r) { r = r || $.Deferred() var o = (this.currentPano = e) && !e.isAligned() window.bus.dispatchEvent({ type: 'playerAndModelReady' }) this.ready = true if (((t = o ? e.position : t || e.position), (i = i || e.quaternion), e)) { var a = this.startInside.bind(this, e, t, i, n, r) if (this.checkAndWaitForPanoLoad(e, 'high', 'low', this.basePanoSize, a)) return } //add this.transitionPos({ type: 'beforeFlytopano', pano: this.currentPano, dur: 0 }) //this.updateHotVisible() //EditOverlay.updatePano() editTool.hotpoint.updatePano() Hot.updateVisibles([this.currentPano]) return ( (this.mode = V.PANORAMA), e.floor.enter(this.mode), this.emit(W.PanoChosen, this.currentPano, this.currentPano), this.switchCameraMode(this.mode, i), this.emit(W.StartInside, o), r.resolve(!0), r ) }), (t.prototype.startInsideWithFlyin = function (i, e, n, t, r) { if (((r = r || $.Deferred()), this.dollhouseMode(), !i)) return Y.warn('Player.startInsideWithFlyin() -> targetPano is invalid.'), r.resolve(!1), r e = e || i.position var o = n || this.cameraControls.activeControl.camera.quaternion, a = i.position return ( this.fitDollhouse(a, e, o), setTimeout( function (e) { this.cameraControls.activeControl && (this.cameraControls.activeControl.maxDistance = e) var t = { mode: V.PANORAMA, pano: i, quaternion: n, callback: function () { this.emit(W.FlyinFinished), r.resolve(!0) }.bind(this) } this.flyToNewMode(t) }.bind(this, this.cameraControls.activeControl.maxDistance), k.startupFlyinDelay ), r ) }), (t.prototype.checkAndWaitForPanoLoad = ((Z = {}), (K = {}), function (t, e, i, n, r, o, a, s, l, c) { if ( (function () { for (var e in Z) if (Z.hasOwnProperty(e) && Z[e] && performance.now() - K[e] < 5e3) return !0 return !1 })() ) return !0 var h = function (e, t, i) { j.delayOneFrame( function () { ;(Z[e] = !1), r && r(t, i) }.bind(this) ) }.bind(this, t.id), u = function (e, t) { j.delayOneFrame( function () { ;(Z[e] = !1), o && o(t) }.bind(this) ) }.bind(this, t.id) try { return ( null != s || (s = !0), this.model.supportsTiles ? (Z[t.id] = this.checkAndWaitForTiledPanoLoad(t, n, h, u, a, s, l, c)) : (Z[t.id] = this.checkAndWaitForWholePanoLoad(t, e, i, h, s)), Z[t.id] && (K[t.id] = performance.now()), Z[t.id] ) } catch (e) { throw ((Z[t.id] = !1), (K[t.id] = performance.now() - 5e3), e) } })), (t.prototype.checkAndWaitForWholePanoLoad = function (e, t, i, n, r) { if (!e) throw new p('Player.checkAndWaitForWholePanoLoad() -> Cannot load texture for null pano.') return ( r && this.model.waitForLoad(e, function () { return e.isLoaded(i) }), !e.isLoaded(t) && (e.loadCube(t).done(n), !0) ) }), (t.prototype.checkAndWaitForTiledPanoLoad = ((X = new B.Vector3()), function (e, t, i, n, r, o, a, s) { if (!e) throw new p('Player.checkAndWaitForTiledPanoLoad() -> Cannot load texture for null pano.') return ( X.copy(T.FORWARD), this.getDirection(X), !e.isLoaded(t) && (o && this.model.waitForLoad(e, function () { return e.isLoaded(t) }), e .loadTiledPano(t, X, null, a, s) .done( function (e, t) { i && i(e, t) }.bind(this) ) .fail( function (e) { n && n(e) }.bind(this) ) .progress( function (e, t, i) { r && r(e, t, i) }.bind(this) ), !0) ) })), (t.prototype.switchCameraMode = function (mode, quaternion, target, position, { currentScale, fitBoundSize } = {}) { var control = this.cameraControls.controls[mode], camera = control.camera if (mode == V.PANORAMA) { camera.position.copy(this.currentPano.position) var r = quaternion ? T.FORWARD.clone().applyQuaternion(quaternion) : this.getDirection().setY(0).normalize() control.lookAt(r.add(camera.position)) } else { if (target) { control.target.copy(target) } if (position) { camera.position.copy(position) } if (mode == V.DOLLHOUSE) { var pos = this.position.clone() if (this.mode === V.PANORAMA) { let vec = new B.Vector3(0, 6, 0).add(this.getDirection().multiplyScalar(-10)) if (target) vec.multiplyScalar(0.15) //编辑热点时飞出不要飞太远,只是飞出来就近观察一下热点 pos.add(vec) } else { pos.add(T.DOWN.clone().applyQuaternion(this.quaternion).multiplyScalar(6)).setY(6) } camera.position.copy(pos) if (!target) target = this.target.clone().setY(this.model.center.y) control.target.copy(target) //for多楼层 且 让模型刚好适应屏幕 /* var box = this.model.boundingBox.clone(); box.applyMatrix4(this.camera.matrixWorld);//将 boundingbox、也就是模型, 转换到当前相机朝向 var boxSize = box.size() //其中boxSize.x是模型在当前相机视角下的横向宽度,当飞出后,该宽度要刚好占满窗口宽度 var fov = A.getHFOVFromVFOV(k.insideFOV, camera.aspect, 1); //获得在当前窗口的横向的fov var distance = Math.abs(boxSize.x) / 2 / Math.tan(THREE.Math.degToRad(fov / 2))//根据上面获得的参数得到target到相机的距离 console.log(boxSize.x,distance, boxSize.length() / 2) distance += boxSize.length() / 2 //由于此时模型从中心向相机的部分由于近大远小仍超出屏幕,所以将target放在靠近模型靠近相机的这一端,故而再加上box的对角线长度的一半, 虽然本该加上Math.sqrt(boxSize.z*boxSize.z +boxSize.y+boxSize.y)/2,但是这样模型显得比较满 if(this.mode === V.PANORAMA){ control.target.copy(this.model.center); var vec = this.getDirection().negate().setY(1).normalize()//获得朝向 }else{ control.target.copy(this.target.clone().setY(this.model.center.y)) var vec = T.DOWN.clone().applyQuaternion(this.quaternion).setY(1).normalize() } vec.multiplyScalar(distance ) camera.position.copy(control.target.clone().add(vec)) */ } if (mode == V.FLOORPLAN) { if (!target) { control.target.copy(this.model.center).setY(0) } if (!position) { camera.position.copy(control.target).setY(k.floorplan.cameraHeight), control.rotateToView(this.model.size, this.getDirection()) } if (currentScale) { control.currentScale = control.absoluteScale = currentScale } else if (fitBoundSize) { control.zoomToContain(fitBoundSize) } else { control.zoomToContain(this.model.size) } } } control.update(0) }), (t.prototype.update = (new B.Vector3(), (N = {}), (F = []), function (e) { this.updatePersistentZooming(e), this.updateFromControls(e), this.getCurrentNodePanos(F) if (this.hasChanged(N)) { ;(this.lastChangeTime = Date.now()), !this.mouseDown && this.containsMouse && this.updateIntersect() this.emit(W.ViewChanged, N) //add: if (N.cameraChanged) { Hot.updateHots() this.mode == 'panorama' && window.cad && cad.setSign({ x: this.position.x, y: this.position.z }, this.cameraControls.controls.panorama.lon) } } this.model.supportsTiles && (this.updateTileDownloader(F), this.updatePanoRenderer(F)), this.updatePreRendering(F), this.reticule.update(), this.path.update(), this.spider.update(), this.cachedPanoCandidates && k.navigation.panoScores && this.model.panos.showPanoScores(this.cachedPanoCandidates), this.updateControlLocks(), this.model.supportsTiles && this.updateZoomPano() })), (t.prototype.updatePersistentZooming = function (e) { 1 === this.zooming ? this.zoomBy(1 + this.zoomSpeed * e) : -1 === this.zooming && this.zoomBy(1 - this.zoomSpeed * e) }), (t.prototype.updateControlLocks = function () { this.currentPano && this.model.supportsTiles && (this.cameraControls.controls[V.PANORAMA].locked = !this.currentPano.highestFullTileRenderOpCompleted && this.currentPano.lockUntilRenderingComplete) }), (t.prototype.updatePanoRenderer = ((D = new B.Vector3()), function (e) { var t = this.nextPano || this.currentPano this.panoRenderer.hasQueuedTiles() && t && (D.copy(T.FORWARD), this.getDirection(D), this.panoRenderer.updateDirection(D)) })), (t.prototype.cleanupInactivePanos = ((O = []), (L = []), function () { ;(O.length = 0), O.push(this.currentPano), this.nextPano && O.push(this.nextPano) for (var e = (L.length = 0); e < this.panoRenderer.activePanos.length; e++) L.push(this.panoRenderer.activePanos[e]) for (var t = 0; t < L.length; t++) { for (var i = L[t], n = !0, r = 0; r < O.length; r++) i.id === O[r].id && (n = !1) n && i.exit() } })), (t.prototype.updatePreRendering = ((w = {}), function (e) { if (1 === k.tiling.preRenderTourPanos && this.preRenderingEnabled) { var t = this.nextPano || this.currentPano if (t && e && 1 < e.length) { var i = e.findIndex(function (e) { if (e.id === t.id) return !0 }) if (0 <= i && i + 1 < e.length) { var n = e[i + 1] n.isLoaded(this.basePanoSize) || w[n.id] || (window.setTimeout( function (e) { this.checkAndWaitForPanoLoad(e, 'high', 'low', this.basePanoSize, null, null, null, !1, !1, !1), window.setTimeout( function (e) { w[e.id] = !1 }.bind(this, e), k.tiling.panoPreRenderRepeatDelay ) }.bind(this, n), k.tiling.panoPreRenderDelay ), (w[n.id] = !0)) } } } })), (t.prototype.enablePreRendering = function () { this.preRenderingEnabled = !0 }), (t.prototype.disablePreRendering = function () { ;(this.preRenderingEnabled = !1), this.cleanupInactivePanos() }), (t.prototype.updateTileDownloader = ((b = new B.Vector3()), function (e) { var t = this.nextPano || this.currentPano t && (b.copy(T.FORWARD), this.getDirection(b), this.tileDownloader.tilePrioritizer.updateCriteria(t, this.position, b, 0 < e.length ? e : null), (this.tileDownloader.processPriorityQueue = !0)) })), (t.prototype.updateFromControls = function (e) { null != e || (e = 0), this.cameraControls.activeControl && (this.cameraControls.activeControl.update(e), this.quaternion.copy(this.cameraControls.activeControl.camera.quaternion), this.position.copy(this.cameraControls.activeControl.camera.position), this.target.copy(this.cameraControls.activeControl.target), this.cameraControls.activeControl.camera.updateProjectionMatrix(), this.camera.projectionMatrix.copy(this.cameraControls.activeControl.camera.projectionMatrix)), this.camera.position.copy(this.position), this.camera.quaternion.copy(this.quaternion), this.camera.updateMatrix(), this.camera.updateMatrixWorld() }), (t.prototype.hasChanged = function (e) { if (!this.previousState) { e.cameraChanged = true return ( (this.previousState = { allFloorsVisible: this.model.allFloorsVisible, position: this.position.clone(), quaternion: this.quaternion.clone(), mouse: this.mouse.clone(), labelScaleFactor: this.getLabelScaleFactor(), currentFloor: this.model.currentFloor, projectionMatrix: this.camera.projectionMatrix.clone(), worldMatrix: this.camera.matrixWorld.clone(), mode: this.mode, modelPosition: this.model.position.clone(), modelCenter: this.model.center.clone(), zoomLevel: this.zoomLevel }), !0 ) } //许钟文改 分成相机是否改变cameraChanged 和其他 var a = this.position.equals(this.previousState.position) && this.quaternion.equals(this.previousState.quaternion) && this.camera.matrixWorld.equals(this.previousState.worldMatrix) && this.camera.projectionMatrix.equals(this.previousState.projectionMatrix) && this.mode === this.previousState.mode && this.zoomLevel === this.previousState.zoomLevel && this.model.center.equals(this.previousState.modelCenter) && this.model.position.equals(this.previousState.modelPosition) var t = a && this.mouse.equals(this.previousState.mouse) && this.model.allFloorsVisible === this.previousState.allFloorsVisible /* && this.getLabelScaleFactor() === this.previousState.labelScaleFactor */ && this.model.currentFloor === this.previousState.currentFloor && null === this.nextPano e.cameraChanged = !a //var t = this.model.allFloorsVisible === this.previousState.allFloorsVisible && this.position.equals(this.previousState.position) && this.quaternion.equals(this.previousState.quaternion) && this.mouse.equals(this.previousState.mouse) && this.getLabelScaleFactor() === this.previousState.labelScaleFactor && this.model.currentFloor === this.previousState.currentFloor && this.camera.projectionMatrix.equals(this.previousState.projectionMatrix) && this.camera.matrixWorld.equals(this.previousState.worldMatrix) && this.mode === this.previousState.mode && this.model.position.equals(this.previousState.modelPosition) && this.model.center.equals(this.previousState.modelCenter) && null === this.nextPano && this.zoomLevel === this.previousState.zoomLevel; return ( (e.allFloorsVisible = this.model.allFloorsVisible !== this.previousState.allFloorsVisible), (e.moved = !this.position.equals(this.previousState.position)), (e.rotated = !this.quaternion.equals(this.previousState.quaternion)), (e.mouseMoved = !this.mouse.equals(this.previousState.mouse)), (e.labelScaleFactor = this.getLabelScaleFactor() !== this.previousState.labelScaleFactor), (e.floorChanged = this.model.currentFloor !== this.previousState.currentFloor), (e.cameraProjectionChanged = !this.camera.projectionMatrix.equals(this.previousState.projectionMatrix)), (e.cameraWorldMatrixChanged = !this.camera.matrixWorld.equals(this.previousState.worldMatrix)), (e.modeChanged = this.mode !== this.previousState.mode), (e.modelPositionChanged = !this.model.position.equals(this.previousState.modelPosition)), (e.modelCenterChanged = !this.model.center.equals(this.previousState.modelCenter)), (e.nextPanoActive = null !== this.nextPano), (e.zoomLevel = this.zoomLevel !== this.previousState.zoomLevel), (this.previousState.allFloorsVisible = this.model.allFloorsVisible), this.previousState.position.copy(this.position), this.previousState.quaternion.copy(this.quaternion), this.previousState.mouse.copy(this.mouse), (this.previousState.labelScaleFactor = this.getLabelScaleFactor()), (this.previousState.currentFloor = this.model.currentFloor), this.previousState.projectionMatrix.copy(this.camera.projectionMatrix), this.previousState.worldMatrix.copy(this.camera.matrixWorld), (this.previousState.mode = this.mode), this.previousState.modelPosition.copy(this.model.position), this.previousState.modelCenter.copy(this.model.center), (this.previousState.zoomLevel = this.zoomLevel), !t ) }), (t.prototype.updateIntersect = function () { var e = this.flying || this.isWarping(), t = this.isOutsideMode() && this.cameraControls.controls[this.mode].isEngaged(), i = G.getById(q.LookTransition) e || t || this.isTouchEvent || (i.length && i[0].running) { //clear: //if(this.intersectHot) this.intersectHot.hideTitle() if (this.intersectHot) this.intersectHot.setHoverState(false) this.intersectHot = null //$("#player").css("cursor", "") CursorDeal.remove('hoverFootIcon') CursorDeal.remove('hoverRouteLine') CursorDeal.remove('hoverHot') $('.toolRight .spotList ul li').removeClass('active') } var deal = () => { if (this.intersect && this.intersect.object.visible) { if ('hotSprite' == this.intersect.object.type) { this.intersectHot = this.intersect.object while (!(this.intersectHot instanceof Hot)) { this.intersectHot = this.intersectHot.parent } $(`.toolRight .spotList ul li[data-spid=${this.intersectHot.sid}]`).addClass('active') this.intersectHot.setHoverState(true) } } } if (window.VisiSet && (VisiSet.setPanoVisible || VisiSet.setTagVisible || VisiSet.setPanoLog || (VisiSet.setPanoArea && VisiSet.editPanoArea) || VisiSet.setRoute)) { let meshes = this.model.hotGroup.children.slice() if (VisiSet.routeInfo?.operation == 'removeLink') { meshes.push(...VisiSet.meshGroup.children.filter(e => e.name.includes('routeLine:'))) } else { VisiSet.footIcons && meshes.push(...VisiSet.footIcons) } this.intersect = this.getMouseIntersect(null, meshes) deal() if (this.intersect) { if (VisiSet.routeInfo?.operation == 'removeLink') { CursorDeal.add('hoverRouteLine') } else { CursorDeal.add('hoverFootIcon') //$("#player").css("cursor", "pointer"); } } if (this.intersectHot) { this.intersect = null } return } else if (g_HotStatus) { //加热点 this.intersect = this.getMouseIntersect(null, this.model.colliders.concat(this.model.skybox)) if (this.intersect) { //$("#player").css("cursor", "cell") CursorDeal.remove('noIntersect') } else { //$("#player").css("cursor", "not-allowed") CursorDeal.add('noIntersect') } return } else { if (this.model.hotGroup) { if (editTool.atPanel == 'hotpoint') { var hots = this.model.hotGroup.children } else { var hots = this.model.hotGroup.children.filter(e => e.info.actionType.examine || e.info.actionType.fastTran || e.info.actionType.openHot || e.info.actionType.playAndPause) } let colliders = this.model.floors.reduce( function (e, t) { return t.hidden ? e : e.concat(t.collider.children) }, this.mode === 'panorama' ? this.panoMarkers : [] ) this.intersect = this.getMouseIntersect(null, hots.concat(colliders)) if (this.intersect) { deal() this.intersectHot && CursorDeal.add('hoverHot') //$("#player").css("cursor", "pointer"); if (this.intersect) { deal() let intersect = this.intersect if (this.intersectHot) { this.intersect = null $('#player').css('cursor', 'pointer') } else { if (intersect.object.parent.parent.hidden) { //楼层已隐藏 this.intersect = null } } } } } else { this.intersect = this.getMouseIntersect() } } this.intersect && this.updateClosestPano(this.intersect), this.closestPano || this.closestPanoInDirection(this.getMouseDirection()) ? (this.reticule.updatePosition(this.position, this.intersect), k.navigation.panoScores && !k.navigation.mouseDirection && this.closestPanoInDirection(this.getDirection())) : this.reticule.hide() }), (t.prototype.checkHotClick = function () { if (this.intersectHot) { if (window.VisiSet && VisiSet.setTagVisible) { VisiSet.SetOneTagVisible(this.intersectHot) //设置这个热点的可见性 return } else if (editTool.atPanel == 'hotpoint') { let f = () => { editTool.hotpoint.editHot(this.intersectHot) } if (editTool.hotpoint.editSpot && this.intersectHot != editTool.hotpoint.editSpot) { editTool.hotpoint.unsaveWarn(f) } else { f() } } else { if (this.intersectHot.texType == 'video' && this.intersectHot.info.actionType.playAndPause) { this.intersectHot.switchPlay(!!this.intersectHot.pausedByUser) } this.intersectHot.examine() } return !0 } }), (t.prototype.getMouseDirection = function (e) { e = e || this.mouse var t = new B.Vector3(e.x, e.y, -1).unproject(this.camera) return new B.Vector3(e.x, e.y, 1).unproject(this.camera).sub(t).normalize() }), /* t.prototype.hoverOverlay = function(mesh){ if(!mesh){ this.hoveringPlane = null; $("#player").css("cursor",this.currentCursor || "" ); }else{ var overlay = mesh.parent; $("#player").css("cursor","pointer"); this.hoveringPlane = overlay; return true; } }, */ (t.prototype.clickOverlay = function (overlay) { if (this.openOverlay && !overlay) return var plane = overlay.plane if (overlay.texType == 'video') { overlay.switchPlay(!!overlay.pausedByUser) } if (window.EditOverlay && EditOverlay.editing) { if (EditOverlay.editPlane && overlay != EditOverlay.editPlane) { var sure = confirm('是否保存当前展览?') if (sure) { $('#overlayProp button.submit').click() } else { EditOverlay.closeOverlayPanel('cancel') } } EditOverlay.beginEdit(overlay) return } }), (t.prototype.getMouseIntersect = function (e, t1) { e = e || this.mouse.clone() var t = t1 || this.model.floors.reduce( function (e, t) { return t.hidden ? e : e.concat(t.collider.children) }, this.mode === V.PANORAMA ? this.panoMarkers : [] ), t = t.slice(0) i = new B.Vector3(e.x, e.y, -1).unproject(this.camera) this.raycaster.set(i, this.getMouseDirection(e)) var n = this.raycaster.intersectObjects(t, true) //add true var o = n[0] if (o) { o.face && ((o.normal = o.face.normal.applyQuaternion(o.object.quaternion)), this.position.clone().sub(o.point).dot(o.normal) < 0 && o.normal.negate(), this.currentPano ? (o.onFloor = o.point.y < this.position.y - 0.5 * this.currentPano.height) : (o.onFloor = o.point.y < this.position.y - 0.5), (o.horizontal = 0.8 < o.normal.y)) return o } }), (t.prototype.updateClosestPano = function (e) { var t = [a.filters.isPanoAligned()] if (this.mode === V.PANORAMA) { if (!this.currentPano) return t.push(a.filters.not(this.currentPano)), t.push(a.filters.isNeighbourPanoTo(this.currentPano)), t.push(a.filters.inFloorDirection(this.currentPano.floorPosition, this.getDirection(), 0.25)), t.push(a.filters.isCloseEnoughTo(e.point, k.panoFloorClickRadius)), t.push(a.filters.isNotBehindNormal(e.point, e.normal)) } else { t.push(a.filters.isOnVisibleFloor()), t.push(this.checkHasNeighbor) //add this.mode !== V.FLOORPLAN && t.push(a.filters.inDirection(this.position, this.getDirection(), 0.25)) } var i = this.model.panos.find(t, [a.sortFunctions.floorDistanceToPoint(e.point)]) i !== this.closestPano ? (i && (this.isPanoHover = !0), this.emit(W.ClosestPanoChanging, this.closestPano, i, this.mode), (this.closestPano = i), this.closestPano && this.mode == 'panorama' ? CursorDeal.add('hoverPano') /*, this.reticule.visible = false */ : CursorDeal.remove('hoverPano') /*, this.reticule.visible = true */) : (this.isPanoHover = !1) }), (t.prototype.dollhouseMode = function (e, t) { this.emit(W.ModeChanging, this.mode, V.DOLLHOUSE), (this.mode = V.DOLLHOUSE), this.cameraControls.controls[V.DOLLHOUSE].reset() var i = new B.Vector3(this.model.center.x, 0, this.model.center.z), n = new B.Vector3(15, 10, 15) if (e && t) { var r = T.FORWARD.clone().applyQuaternion(t), o = this.model.center.clone().sub(e).dot(r) 0 < o ? ((i = r.clone().multiplyScalar(o).add(e)), n.copy(e)) : Y.warn("Tried to initiate dollhouse mode that wasn't looking at the model", e, t) } this.cameraControls.controls[V.DOLLHOUSE].resetRanges(0, !0), this.cameraControls.controls[V.DOLLHOUSE].target.copy(i), this.cameraControls.cameras[V.DOLLHOUSE].position.copy(n), this.updateFromControls(), (this.model.alpha = 1), (this.model.skybox.material.uniforms.opacity.value = 0) }), (t.prototype.insideMode = function (e, t) { var i = $.Deferred(), n = t || null if (this.mode !== V.PANORAMA && this.mode !== V.TRANSITIONING) { var r = [a.filters.isPanoAligned()] this.model.currentFloor && r.push(a.filters.atFloor(this.model.currentFloor)), (e = e || this.currentPano || this.model.panos.find(r, [a.sortFunctions.distanceToPoint(this.cameraControls.activeControl.target)])), this.flyToNewMode({ mode: V.PANORAMA, pano: e, callback: n }) .done(i.resolve.bind(i)) .fail(i.reject.bind(i)) } else { var o = this.mode === V.PANORAMA ? 'Already in panorama mode' : 'Cannot change mode during mode transition' i.reject(o) } return i.promise() }), (t.prototype.fitDollhouse = function (e, t, i) { var maxY = this.model.boundingBox.max.y //add var n = T.FORWARD.clone().applyQuaternion(i) i = n.clone().add(e) this.cameraControls.activeControl.target.copy(i), this.cameraControls.activeControl.camera.position .set(0, maxY * 2.4, 0) .add(e) .add(n.multiplyScalar(-10)) }), (t.prototype.floorplanMode = function (e, t, i) { this.mode = V.FLOORPLAN var n = this.cameraControls.controls[V.FLOORPLAN] n.reset() var r = e || this.model.center if ( (n.target.copy(r).setY(0), n.camera.position.copy(r).setY(k.floorplan.cameraHeight), i ? ((n.currentScale = i / ($('#player').width() / $('#player').height())), (n.absoluteScale = n.currentScale)) : n.zoomToContain(this.model.size), t) ) { var o = T.LEFT.clone().applyQuaternion(t) n.rotateLeft(-Math.atan2(o.x, o.z)) } else n.rotateToView(this.model.size, this.getDirection()) n.update(0) }), (t.prototype.nonInterruptingFlyToPano = function (e, t) { return (e.skipWarpingCheck = !0), this.flyToPano(e, t) }), (t.prototype.updateMarkerVisi = function () { //加 if (this.mode != 'panorama') return this.model.panos.list.forEach(pano => { if (!pano.marker) return pano.marker.material.visible = !!pano.neighbourPanos[this.currentPano.id] }) }), /* t.prototype.updateHotVisible = function(pano){ if (window.VisiSet && (VisiSet.setPanoVisible || VisiSet.setPanoLog))return var hots = this.model.hots; pano = pano || this.currentPano; for (var index in hots){ var visible; if(this.mode != "panorama"){ visible = true; }else{ //hots[index].mesh.material.depthTest = false; visible = !hots[index].visiblePanos || hots[index].visiblePanos.indexOf(pano.id) > -1 } hots[index].mesh.visible = visible; } } */ (t.prototype.flyToPano = function (e, t) { var i, n = e.pano, aim = e.lookAtPoint, aimQua = e.quaternion, //ADD o = e.duration, a = e.aimDuration, s = e.maxDistanceOverride, l = e.skipWarpingCheck, c = e.constantMoveSpeed, h = null, u = null if (aim) { var m = new B.Matrix4().lookAt(n.position, aim, T.UP) aimQua = new B.Quaternion().setFromRotationMatrix(m) } else aimQua = aimQua var zoomLevel = e.zoomLevel || 1 //add if (this.flying) return t && t(e) if ( (window.specialScene && specialScene.special().specifySpot && specialScene.special().specifySpot(n), this.isWarping() && !l && (this.path.activeTransType === R.BLACK || this.path.activeTransType === R.STD)) ) return Y.warn('Player.flyToPano() -> Cannot fly when warping'), t && t(), !1 this.updateLastView() if (this.mode !== V.PANORAMA) return void this.flyToNewMode({ mode: V.PANORAMA, pano: n, duration: o, quaternion: aimQua, callback: t }) if ( !n || ((h = x.deepExtend(e)), (u = function () { j.delayOneFrame( function () { this.flyToPano(h, t) }.bind(this) ) }.bind(this)), !this.checkAndWaitForPanoLoad(n, 'high', 'low', this.basePanoSize, u)) ) { var d = function (e) { t && t(e) }.bind(this) this.currentPano || ((this.currentPano = n), this.path.placeCpm(), this.path.fadeOutCpm(k.path.fadeOutTime), this.spider.draw()) var p = o if ('number' != typeof o) { var f = s || k.transition.flytimeMaxDistanceThreshold p = Math.min(this.currentPano.position.distanceTo(n.position), f) * k.transition.flytimeDistanceMultiplier + k.transition.flyTime } if ((0.01 < k.transition.flySpeed && (p = (1e3 * this.currentPano.position.distanceTo(n.position)) / k.transition.flySpeed), zoomLevel !== this.zoomLevel)) switch (k.zoom.transitionStyle) { case 1: this.smoothZoomFovTo(null, zoomLevel, zoomLevel == 1 ? p / 2 : p) //改 break case 2: return (h = x.deepExtend(e)), (u = this.flyToPano.bind(this, h, t)), void this.smoothZoomFovTo(null, zoomLevel, k.zoom.restoreTime * (this.zoomLevel - 1), u) } if (aimQua) { G.cancelById(q.LookTransition), (p *= k.transition.aimSlowFactor) var g = this.cameraControls.activeControl.camera.quaternion.clone(), y = g.clone(), A = new B.Vector3() if (n === this.currentPano) { var C = T.FORWARD.clone().applyQuaternion(g), I = T.FORWARD.clone().applyQuaternion(aimQua), E = C.angleTo(I) return ( null != a || (a = ((1 * Math.sqrt(E)) / k.tags.navigate.rotateSpeedFactor) * 1e3), void G.start( function (e) { y.copy(g), H.quaternion(y, aimQua)(e), A.copy(T.FORWARD).applyQuaternion(y).add(this.cameraControls.activeControl.camera.position), this.cameraControls.activeControl.lookAt(A) }.bind(this), a, d, 0, z[k.transition.movementEasing], null, q.LookTransition ) ) } } if (n === this.currentPano) return void d() this.flying = !0 var _ = this.position.clone(), b = this.currentPano Y.debug('Flying to pano ', n.position) this.emit(W.PanoChosen, this.currentPano, n) this.emit(W.FlyingStarted, n.position, _, n, b) this.transitionPos({ type: 'beforeFlytopano', pano: n, dur: p }) //add Hot.updateVisibles([this.currentPano, n], 'every') aimQua && G.start( function (e) { y.copy(g), H.quaternion(y, aimQua)(e), A.copy(T.FORWARD).applyQuaternion(y).add(this.cameraControls.activeControl.camera.position), this.cameraControls.activeControl.lookAt(A) }.bind(this), p, null, 0, z[k.transition.movementEasing], null, q.LookTransition ) var w = c ? null : z[k.transition.movementEasing] this.nextPano = n G.start(H.uniform(this.model.skybox, 'progress', 1), p, null, 0, z[k.transition.blendEasing], 'skyFly', q.FlyToPano), G.start(H.allUniforms(this.model.chunks, 'progress', 1), p, null, 0, z[k.transition.blendEasing], 'chunkFly', q.FlyToPano), G.start( H.vector(this.cameraControls.cameras[V.PANORAMA].position, n.position), p, function (e) { ;(this.flying = !1), this.currentPano !== n && this.currentPano.exit(), n.enter(), (this.currentPano = n), (this.nextPano = null), this.path.placeCpm(), this.path.fadeOutCpm(k.path.fadeOutTime), this.spider.draw(), this.emit(W.FlyingEnded, n.position, _, n, b), this.updateMarkerVisi() //add d(e) if (this.mode == 'panorama') { //EditOverlay.updatePano() editTool.hotpoint.updatePano() Hot.updateVisibles([this.currentPano]) this.model.fadePanoMarkers() //add } }.bind(this), 0, w, 'camFly', q.FlyToPano ) } }), (t.prototype.blackToPano = function (o = {}) { //add 瞬间过渡 if (this.flying || this.isWarping()) return let pano = o.pano || this.model.panos.index[o.panoId] if (this.mode != 'panorama') { return this.flyToNewMode({ mode: 'panorama', pano, quaternion: o.quaternion }) } let oldPos = this.position.clone() let oldPano = this.currentPano this.path.warpDestPano = pano var retry = () => { ;(this.waitingToWarp = !1), this.blackToPano(o) } if (this.checkAndWaitForPanoLoad(pano, 'high', 'low', this.basePanoSize, retry)) return void (this.waitingToWarp = !0) console.log('blackToPano') this.flying = true this.nextPano = pano //提前加载高清图片 this.path.warpDestHeroLoc = { panoId: pano.id, position: pano.position, quaternion: o.quaternion || this.quaternion.clone() } this.path.warpTravel_BLACK(null, 1500, 1, () => { pano != this.currentPano && this.currentPano.exit() pano.enter() this.currentPano = pano this.flying = false this.nextPano = null this.updateMarkerVisi() //add console.log('blackToPano end') }) }) window._transitionPosId = 9999 t.prototype.transitionPos = function (o = {}) { //渐变overlay和热点的位置 G.cancelById(_transitionPosId) var begin = function (object, pos, qua, scale) { if (pos) { if (!same(object.position, pos, 0.01)) { G.start( H.vector(object.position, pos), o.dur, e => { object.updateScale() }, 0, z[k.transition.movementEasing], 'transitionPos', _transitionPosId ) } if (qua && !same(object.quaternion, qua, 1e-6)) { G.start(H.quaternion(object.quaternion, qua), o.dur, e => {}, 0, z[k.transition.movementEasing], 'transitionPos', _transitionPosId) } if (scale && !same(object.scale, scale, 0.001)) { G.start(H.vector(object.scale, scale), o.dur, e => {}, 0, z[k.transition.movementEasing], 'transitionPos', _transitionPosId) } } } var same = function (vec1, vec2, diff) { var s = Math.abs(vec1.x - vec2.x) < diff && Math.abs(vec1.y - vec2.y) < diff && Math.abs(vec1.z - vec2.z) < diff if (s && vec1.w) s = Math.abs(vec1.w - vec2.w) < diff return s } var sid = o.pano != void 0 ? o.pano.id : 'outside' for (let i in this.model.hots) { //是否判断visible? var hot = this.model.hots[i] var panoData = hot.info.transformAtPanos[sid] var useCustom = !panoData //if(hot.usingTransformData || !useCustom){ var pos = useCustom ? hot.info.position : panoData.pos var qua = hot.isSprite ? null : useCustom ? hot.info.quaternion : panoData.qua var scale = useCustom ? hot.info.scale : panoData.scale begin(hot, pos, qua, scale) //} //hot.usingTransformData = !useCustom; } if (o.callback) { setTimeout(() => { o.callback() }, o.dur + 16) //姑且这么写 } } window._tranOutsideFocus = 4399 t.prototype.focusPoint = function (o = {}) { //当在外时,聚焦相机到这一点 //console.log("focusPoint") if (this.mode == 'floorplan') { var control = player.cameraControls.controls.floorplan var currentTarget = control.target.clone() if (!o.dontChangeScale) { var modelSize = o.modelSize || new THREE.Vector3(8, 8, 8) //可视范围 var absoluteScale = control.getDefaultAbsoluteScale(modelSize) var currentScale = control.absoluteScale } G.cancelById(window._tranOutsideFocus, true) G.start( function (progress) { o.dontChangeScale || (control.absoluteScale = absoluteScale * progress + currentScale * (1 - progress)) control.target = o.aim .clone() .multiplyScalar(progress) .add(currentTarget.clone().multiplyScalar(1 - progress)) control.camera.position.copy(control.target.clone().add(control.offset)) //维持角度 }.bind(this), o.dur || 600, null /* cancelFuc */, 0, z[k.transition.movementEasing], 'outsideFocus', window._tranOutsideFocus, null /* cancelFuc */ ) } else if (player.mode == 'dollhouse') { var control = player.cameraControls.controls.dollhouse var radius = o.radius || 8 var currentTarget = control.target.clone() var dir = control.offset.clone().normalize() var currentRadius = control.offset.length() G.cancelById(window._tranOutsideFocus, true) G.start( function (progress) { control.target = o.aim .clone() .multiplyScalar(progress) .add(currentTarget.clone().multiplyScalar(1 - progress)) let radius_ = radius * progress + currentRadius * (1 - progress) control.camera.position.copy(control.target.clone().add(dir.clone().multiplyScalar(radius_))) }.bind(this), o.dur || 600, null /* cancelFuc */, 0, z[k.transition.movementEasing], 'outsideFocus', window._tranOutsideFocus, null /* cancelFuc */ ) } else if (this.mode == 'panorama') { this.flyToPano({ lookAtPoint: o.aim.clone(), pano: this.currentPano, aimDuration: o.dur || 600 }) } } ;(t.prototype.fastForwardActivePanoFlight = function (e) { ;(e = e || (k.transition.fastForwardFactor / 10) * 4 + 1), G.adjustSpeed(q.FlyToPano, e), G.adjustSpeed(q.LookTransition, e) }), (t.prototype.flyToPanoClosestToMouse = function () { if ((50 < Date.now() - this.mouseLastMoveTime && ((this.intersect = this.getMouseIntersect()), this.intersect && this.updateClosestPano(this.intersect)), this.closestPano)) return this.flyToPano({ pano: this.closestPano }) var e = this.getMouseDirection() this.flyDirection(e) || this.flyToPano({ pano: this.currentPano }) }), (t.prototype.flyLocalDirection = function (e) { var t = this.getDirection(e), i = 1 === e.z ? 0.4 : 0.75, n = 1 === Math.abs(e.x) return this.flyDirection(t, i, n) }), (t.prototype.flyDirection = function (e, t, i) { Hot.closePopup() //xzw add var n = $.Deferred() this.history.invalidate() var r = this.closestPanoInDirection(e, t, i) return ( r ? this.flyToPano( { pano: r }, n.resolve.bind(n, !0) ) : (this.bump(e), n.resolve(!1)), n.promise() ) }), (t.prototype.closestPanoInDirection = function (e, t, i) { return this.rankedPanoInDirection(0, e, t, i) }), (t.prototype.rankedPanoInDirection = ((_ = { pano: null, candidates: [] }), function (e, t, i, n) { ;(e = e || 0), (i = void 0 !== i ? i : 0.75) var r = n ? 'angle' : 'direction' return ( this.model.panos.findRankedByScore( e, [a.filters.isPanoAligned(), a.filters.not(this.currentPano), a.filters.isNeighbourPanoTo(this.currentPano), a.filters.inPanoDirection(this.position, t, i)], [a.scoreFunctions.distanceSquared(this.currentPano), a.scoreFunctions[r](this.position, t)], _ ), (this.cachedPanoCandidates = _.candidates), _.pano ) })), (t.prototype.bump = function (e) { if (this.mode === V.PANORAMA && !this.flying && !this.isWarping()) { var t, i, n, r = k.transition, o = (r.flytimeMaxDistanceThreshold * r.flytimeDistanceMultiplier + r.flyTime) / 8, a = this.camera.getWorldDirection().dot(e) if (0.5 < Math.abs(a)) (t = function () { G.start(H.property(this.cameraControls.cameras[V.PANORAMA], 'zoom', 0 < a ? 1.04 : 0.96), o, i, 0, z.easeInOutSine, 'bumpZStart') }.bind(this)), (i = function () { G.start(H.property(this.cameraControls.cameras[V.PANORAMA], 'zoom', 1), 5 * o, n, 0, z.easeInOutSine, 'bumpZRelax') }.bind(this)) else { var s = this.camera.position.clone(), l = e.clone() this.raycaster.set(s, l) var c = this.model.floors.reduce(function (e, t) { return e.concat(t.collider.children) }, []), h = this.raycaster.intersectObjects(c), u = 0 < h.length ? h[0].distance / 25 : 0.04, d = s.clone().add(l.multiplyScalar(u)) ;(t = function () { G.start(H.vector(this.cameraControls.cameras[V.PANORAMA].position, d), o, i, 0, z.easeInOutSine, 'bumpTStart') }.bind(this)), (i = function () { G.start(H.vector(this.cameraControls.cameras[V.PANORAMA].position, s), 5 * o, n, 0, z.easeInOutSine, 'bumpTRelax') }.bind(this)) } ;(n = function () { this.flying = !1 }.bind(this)), (this.flying = !0), t() } }), (t.prototype.changeFloor = function (e) { if (!this.is360View(this.mode, this.currentPano)) if (this.mode === V.PANORAMA) { var t = this.history.reversePano(e) t && t.isAligned() ? this.flyToPano({ pano: t }) : this.changeFloorByScore(e) } else this.model.setFloor(this.model.nextFloor(e) || this.model.currentFloor) }), (t.prototype.changeFloorByScore = ((E = { pano: null, candidates: [] }), function (e) { var t = this.model.nextFloor(e) return t ? (this.model.panos.lowestByScore( [a.filters.atFloor(t), a.filters.isPanoAligned()], [ a.scoreFunctions.distance(this.currentPano), a.scoreFunctions.direction(this.position, new B.Vector3(0, e, 0)), a.scoreFunctions.penalizeHeightDifferenceUnder(this.position, 0.5) ], E ), void (E.pano ? ((this.cachedPanoCandidates = E.candidates), this.history.push(e, this.currentPano), this.flyToPano({ pano: E.pano })) : Y.warn('No pano found on selected floor, not moving there.'))) : void Y.debug('player.changeFloor(' + e + '): no such floor') })), (t.prototype.gotoFloor = function (e) { var t = e - this.model.currentFloor.floorIndex this.changeFloor(t) }), (t.prototype.getDirection = function (e) { return (e = e || new B.Vector3().copy(T.FORWARD)).applyQuaternion(this.camera.quaternion) }), (t.prototype.flyToSameMode = function (e, t, i, n, r) { if (((r = r || $.Deferred()), this.mode === V.TRANSITIONING)) return Y.warn('should not be transitioning here'), n && n(!1), r.reject().promise() var o = i || !1, a = i ? i.position : this.position, s = this.position.clone(), l = this.currentPano if ( (Y.debug('New pose in mode ' + this.mode), !e || ((retryCallback = function () { j.delayOneFrame( function () { this.flyToSameMode(e, t, i, n, r) }.bind(this) ) }.bind(this)), !this.checkAndWaitForPanoLoad(e, 'high', 'low', this.basePanoSize, retryCallback))) ) { var c = function () { this.emit(W.FlyingEnded, a, s, e, l), n && n(!0) }.bind(this), h = k[this.mode], u = void 0 !== t ? t : h.transitionTime, d = new B.Vector3(), p = new B.Vector3() if ((this.emit(W.FlyingStarted, a, s, e, l), this.mode === V.PANORAMA)) Y.warn('we should not be here for panorama views') else if (this.mode === V.DOLLHOUSE) if (o) { var f = new B.Vector3(0, 1, 0) this.cameraControls.controls[V.DOLLHOUSE].resetRanges(1, !0), this.model.warpDestFloors(i.floorVisibility), p.copy(i.position) var g = new B.Vector3(0, 0, -1).applyQuaternion(i.quaternion), m = new B.Raycaster(p.clone(), g.clone(), 0, 1 / 0).intersectObjects(this.model.colliders), v = 3 m.length ? (d.copy(m[0].point), (v = 0.75 * p.distanceTo(d))) : (d.copy(g).multiplyScalar(3).add(p), Y.debug('Tried to restore dollhouse mode that did not intersect...', i.position, i.quaternion)) var y = new B.Matrix4().lookAt(p, d, f), A = new B.Euler().setFromRotationMatrix(y, k.warp.eOrder), C = d.distanceTo(p), I = new B.Matrix4().lookAt(this.cameraControls.cameras[V.DOLLHOUSE].position, this.cameraControls.controls[V.DOLLHOUSE].target, f), E = new B.Euler().setFromRotationMatrix(I, k.warp.eOrder), _ = this.cameraControls.cameras[V.DOLLHOUSE].position.distanceTo(this.cameraControls.controls[V.DOLLHOUSE].target) this.cameraControls.controls[V.DOLLHOUSE].resetRanges(Math.min(_, v), !0) var b = new B.Euler(A.x - E.x, A.y - E.y, A.z - E.z, k.warp.eOrder) ;(b.y = b.y > Math.PI ? (b.y -= 2 * Math.PI) : b.y < -Math.PI ? (b.y += 2 * Math.PI) : b.y), (this.path.burnsDir = Math.sign(b.y)) var w = new B.Euler(0, 0, 0, k.warp.eOrder), T = new B.Vector3() G.start(H.vector(this.cameraControls.controls[V.DOLLHOUSE].target, d), u, null, k.flydown.movementDelay, z[k.flydown.movementEasing], null, q.FlyToSameMode), G.start( function (e, t) { ;(w.x = E.x + e * b.x), (w.y = E.y + e * b.y), (w.z = E.z + e * b.z) var i = _ + e * (C - _) T.set(0, 0, i).applyEuler(w).add(this.cameraControls.controls[V.DOLLHOUSE].target), this.cameraControls.cameras[V.DOLLHOUSE].position.copy(T).add(this.model.position) }.bind(this), u, null, k.flydown.movementDelay, z[k.flydown.movementEasing], null, q.FlyToSameMode ), G.start( function (e, t) { this.cameraControls.controls[V.DOLLHOUSE].update(), this.quaternion.copy(this.cameraControls.cameras[V.DOLLHOUSE].quaternion), this.position.copy(this.cameraControls.cameras[V.DOLLHOUSE].position) }.bind(this), u, null, k.flydown.movementDelay, z[k.flydown.movementEasing], null, q.FlyToSameMode ) } else Y.warn('invalid warp destination in flyToSameMode()? ignore it then') else if ((this.path.placeCpm(), this.path.fadeInCpm(k.path.fadeInTime), i)) { this.model.warpDestFloors(i.floorVisibility) var x = this.cameraControls.cameras[V.FLOORPLAN], S = this.cameraControls.controls[V.FLOORPLAN], M = S.target.clone(), R = i.position.clone().sub(M), P = x.position.clone().sub(S.target).length(), O = new B.Vector3(-1, 0, 0).applyQuaternion(i.quaternion).normalize(), L = Math.atan2(S.offset.x, S.offset.z), D = Math.atan2(O.x, O.z), N = S.absoluteScale, F = U.convertWorkshopOrthoZoom(i.orthoZoom) G.start( function (e, t) { S.target.copy(R).multiplyScalar(e).add(M) var i = L + (D - L) * e ;(S.offset.x = P * Math.sin(i)), (S.offset.z = P * Math.cos(i)), x.position.copy(S.target).add(S.offset), (S.absoluteScale = N + e * (F - N)), S.update(), this.quaternion.copy(x.quaternion), this.position.copy(x.position), this.target.copy(S.target), this.camera.projectionMatrix.copy(x.projectionMatrix) }.bind(this), u, null, 0, z[k.flydown.movementEasing], null, q.FlyToSameMode ) } else Y.info('flyToSameMode() funny floorplan view? skipping') return ( G.setTimeout( function (e) { ;(this.mode = e), c(), r.resolve(!0) }.bind(this, this.mode), u, q.FlyToSameMode ), (this.mode = V.TRANSITIONING), r.promise() ) } }), (t.prototype.flyToNewMode = function (e, t) { Hot.closePopup() //xzw add var i = (e = e || {}).mode, n = e.pano, r = e.duration, o = e.warpDest, a = e.callback, s = e.force, l = e.quaternion if (((t = t || $.Deferred()), this.isWarping())) return Y.warn('Player.flyToNewMode() -> Cannot fly when warping'), a && a(!1), t.reject('Cannot change mode during tour transition').promise() if (this.mode === V.TRANSITIONING) return a && a(!1), t.reject('Cannot change mode during mode transition').promise() if (i === this.mode) return s ? (this.flyToSameMode(n, r, o, a).done(t.resolve.bind(t)).fail(t.reject.bind(t)), t.promise()) : (a && a(!1), t.reject('Already in ' + i + ' mode').promise()) var c = o || !1 Y.debug('Switching mode to ' + i) var h = function () { j.delayOneFrame( function () { this.flyToNewMode(e, t) }.bind(this) ) }.bind(this) if (n && this.checkAndWaitForPanoLoad(n, 'low', 'low', this.basePanoSize, h)) return t.promise() if (!this.model.meshTexturesLoaded && this.isOutsideMode(i)) { return ( Y.info('Waiting for model textures to be loaded before going out to dollhouse'), this.model.waitForLoad( this.model, function () { return this.model.meshTexturesLoaded }.bind(this) ), this.model.loadMeshTextures().done(h), t.promise() ) } this.history.invalidate() this.updateLastView() var u = this.mode, d = this.cameraControls.cameras[i] e = x.deepExtend({}, k[i], k[u + '-' + i]) var p = void 0 !== r ? r : e.transitionTime this.emit(W.ModeChanging, u, i, n, p) n && (this.currentPano = n) //----------改---------- let target, position, currentScale, fitBoundSize if (editTool.hotpoint.editSpot) { //focus target = editTool.hotpoint.editSpot.position.clone() let bound = editTool.hotpoint.editSpot.info.modelBound?.bound if (bound) { bound = new THREE.Box3().copy(bound).applyMatrix4(editTool.hotpoint.editSpot.children[0].matrixWorld) fitBoundSize = bound.size() } else { fitBoundSize = new THREE.Vector3(5, 5, 5) } } this.switchCameraMode(i, l, target, position, { currentScale, fitBoundSize }) //---------------------- G.cancelById(q.LookTransition) var f = new B.Vector3().copy(this.position) this.modeTran = this.mode + '-' + i /* if(editTool.atPanel == "screen"){ if(this.mode == "panorama") $(".confirmSnap").addClass("unable") else if(i == "panorama") $(".confirmSnap").removeClass("unable") } */ if (i == 'panorama') { this.transitionPos({ type: 'beforeFlyIn', pano: n, dur: p }) //add } else { this.transitionPos({ type: 'beforeFlyOut', dur: p / 2 }) //add } window.bus.dispatchEvent({ type: 'playerAndModelReady' }) this.ready = true if (i === V.PANORAMA) this.emit(W.PanoChosen, n, n), setTimeout( function () { n.floor.enter(i) }.bind(this), p / 2 ), this.path.fadeOutCpm(k.path.fadeOutTime) else if (i === V.DOLLHOUSE) { if ( (c && (this.model.stayPut = !0), o ? (this.cameraControls.controls[V.DOLLHOUSE].resetRanges(1, !0), this.model.warpDestFloors(o.floorVisibility)) : this.model.toggleAllFloors(!0), this.path.placeCpm(), this.path.fadeInCpm(k.path.fadeInTime), c) ) { var g = new B.Vector3(this.model.center.x, 0, this.model.center.z) f.set(15, 10, 15) var m = new B.Vector3(0, 0, -1).applyQuaternion(o.quaternion), v = new B.Raycaster(o.position.clone(), m.clone(), 0, 1 / 0).intersectObjects([this.sceneIntersectionPlane]) v.length ? (g.copy(v[0].point), f.copy(o.position), this.cameraControls.controls[V.DOLLHOUSE].resetRanges(0.75 * f.distanceTo(g), !0)) : (Y.warn('Tried to restore dollhouse mode that did not intersect...', o.position, o.quaternion), this.cameraControls.controls[V.DOLLHOUSE].resetRanges(3, !0)), this.cameraControls.controls[V.DOLLHOUSE].target.copy(g), f.add(this.model.position), d.position.copy(f), this.cameraControls.controls[V.DOLLHOUSE].update() } } else if ((this.path.placeCpm(), this.path.fadeInCpm(k.path.fadeInTime), o)) { this.model.warpDestFloors(o.floorVisibility) var y = this.cameraControls.cameras[V.FLOORPLAN], A = this.cameraControls.controls[V.FLOORPLAN], C = y.position.clone().sub(A.target), I = new B.Vector3(-1, 0, 0).applyQuaternion(o.quaternion).normalize(), E = Math.atan2(I.x, I.z) A.target.copy(o.position) var _ = C.length() ;(A.offset.x = _ * Math.sin(E)), (A.offset.y = 0), (A.offset.z = _ * Math.cos(E)), y.position.copy(A.target).add(A.offset), A.target.clone().sub(d.position), d.quaternion.copy(o.quaternion), (A.currentScale = U.convertWorkshopOrthoZoom(o.orthoZoom)), (A.absoluteScale = A.currentScale), A.update() } else this.model.currentFloor.enter(i) var b = this.currentPano, w = this.position.clone() return ( this.emit(W.FlyingStarted, f, w, n, this.currentPano), (this.flying = !0), this.isOutsideMode(i) && this.is360View(u, b) ? (c || i !== V.DOLLHOUSE || (d.position.set(15, 10, 15), d.controls.target.set(this.model.center.x, 0, this.model.center.z), d.controls.update()), (e.blackoutStyle = P.FADEIN), (p = k.show360Views.transitionTime), this.fade360View(p, d, e)) : this.isOutsideMode(u) && this.is360View(i, n) ? (c && this.switchCameraMode(i, c.quaternion), (this.mode = i), this.path && this.path.popOutCpm(), (e.blackoutStyle = P.END), (p = k.show360Views.transitionTime), this.fade360View(p, d, e)) : (G.start(H.property(this.model, 'alpha', e.modelAlpha, null), p * e.modelAlphaLength, null, e.modelAlphaDelay, null, q.FlyToNewMode), G.start(H.vector(this.position, d.position), p, null, k.flydown.movementDelay, z[k.flydown.movementEasing], null, q.FlyToNewMode), G.start(H.quaternion(this.quaternion, d.quaternion), p * e.rotationDuration, null, e.rotationDelay, z[k.flydown.rotationEasing], null, q.FlyToNewMode), G.start(H.matrix4(this.camera.projectionMatrix, d.projectionMatrix), p * e.cameraMatrixDuration, null, e.cameraMatrixDelay, e.cameraMatrixEase, null, q.FlyToNewMode), G.start(H.uniform(this.model.skybox, 'opacity', e.skyboxOpacity), p * e.skyboxOpacityLength, null, e.skyboxOpacityDelay, null, q.FlyToNewMode), G.start(H.property(this.reticule.material.uniforms.opacity, 'value', 0), p, null, q.FlyToNewMode)), G.setTimeout( function () { ;(this.flying = !1), u === V.PANORAMA && i !== V.PANORAMA ? this.currentPano.exit() : u !== V.PANORAMA && i === V.PANORAMA && (this.currentPano !== b && b.exit(), this.currentPano.enter(), this.path.placeCpm(), this.path.fadeOutCpm(k.path.fadeOutTime), this.spider.draw()), u === V.DOLLHOUSE && this.cameraControls.controls[V.DOLLHOUSE].resetRanges(), (this.mode = i), this.emit(W.FlyingEnded, f, w, this.currentPano, b) if (this.afterCModeFuc) { //手动加的函数 var cf = this.afterCModeFuc this.afterCModeFuc = null //因为可能在执行afterCModeFuc时需要再添加afterCModeFuc所以要置空的话提前 cf() } this.updateMarkerVisi() //add //(this.mode == u.PANORAMA) && this.updateHotVisible()//add if (this.mode == V.PANORAMA) { //EditOverlay.updatePano() editTool.hotpoint.updatePano() this.model.fadePanoMarkers() Hot.updateVisibles([this.currentPano]) } else { Hot.updateVisibles(true) this.model.hotGroup.children.forEach(overlay => { if (overlay.animateInfo) { GifTexDeal.start(overlay.animation) } }) } c && u !== V.PANORAMA && i === V.PANORAMA ? this.startWarp(M.Retain, S.Retain, R.BLACK, null, null, a) : (a && a(), t.resolve()) }.bind(this), p, q.FlyToNewMode ), (this.mode = V.TRANSITIONING), //EditOverlay.updatePano(),//add editTool.hotpoint.updatePano(), //add //u == "panorama" && this.updateHotVisible(), t.promise() ) }), (t.prototype.fade360View = function (e, t, i) { this.tagManager.hideShowTagsForBlackoutStyle(i.blackoutStyle, e), $(this.domElement).fadeOut( 0.5 * e, function () { ;(this.model.skybox.material.uniforms.opacity.value = i.skyboxOpacity), (this.model.alpha = i.modelAlpha), this.position.copy(t.position), this.quaternion.copy(t.quaternion), this.camera.projectionMatrix.copy(t.projectionMatrix), $(this.domElement).fadeIn(0.5 * e) }.bind(this) ) }), (t.prototype.findDefaultViews = function () { this.findDefaultView(this.lastInsideView, !0), this.findDefaultView(this.last360View, !1) }), (t.prototype.findDefaultView = function (e, i) { var t, n = this.model.heroLocations, r = this.model.panos, o = n.findIndex(function (e) { if (e.cameraMode !== V.PANORAMA) return !1 var t = r.get(e.panoId) return t && t.isAligned() === i }) 0 <= o ? ((t = r.get(n[o].panoId)), e.update({ cameraMode: V.PANORAMA, pano: t, position: n[o].position, quaternion: n[o].quaternion })) : 0 <= (o = r.list.findIndex(function (e) { return e.isAligned() === i })) ? ((t = r.list[o]), e.update({ cameraMode: V.PANORAMA, pano: t, position: t.position })) : Y.warn('There are no', i ? 'inside' : '360º', 'views in this model') }), (t.prototype.updateLastView = function () { this.mode === V.PANORAMA && (this.currentPano.isAligned() ? this.lastInsideView : this.last360View).update({ pano: this.currentPano, position: this.position, quaternion: this.quaternion }) }), (t.prototype.goToLastView = function (e, t) { var i = $.Deferred(), n = i.resolve.bind(i), r = i.reject.bind(i), o = e ? this.lastInsideView : this.last360View return ( this.isInMode(V.PANORAMA) && this.currentPano.isAligned() !== e && this.updateLastView(), this.isInMode(V.PANORAMA) ? (this.path && this.path.popOutCpm(), this.fadeToView(e, o, k.show360Views.transitionTime, t).done(n).fail(r)) : this.isOutsideMode() && this.flyToNewMode({ mode: o.cameraMode, pano: o.pano, quaternion: o.quaternion, callback: t }) .done(n) .fail(r), i.promise() ) }), (t.prototype.fadeToView = function (e, t, i, n) { var r = $.Deferred(), o = r.resolve.bind(r), a = r.reject.bind(r) if (!t.isValid() || (t.cameraMode === V.PANORAMA && !t.pano)) return Y.warn('Tried to fade to an illegal view', t.cameraMode), a('Cannot go to illegal view'), r.promise() var s = (k[t.cameraMode], function () { $(this.domElement).fadeIn(0.5 * i), n && n(), o() }.bind(this)), l = e ? P.FADEIN : P.END return ( this.tagManager.hideShowTagsForBlackoutStyle(l, i), $(this.domElement).fadeOut( 0.5 * i, function () { this.model.fadePanoMarkers(e ? k.panorama.markerOpacity : 0), t.cameraMode === V.PANORAMA ? this.flyToPano( { pano: t.pano, lookAtPoint: T.FORWARD.clone().applyQuaternion(t.quaternion).add(t.pano.position), duration: 0 }, s ) : this.flyToNewMode({ mode: t.cameraMode, quaternion: t.quaternion, duration: 0, callback: s }) }.bind(this) ), r.promise() ) }), (t.prototype.startWarp = function (e, t, i, n, r, o) { if ((this.cameraControls.activeControl && (this.cameraControls.activeControl.enabled = !1), this.flying)) return Y.warn('Player.startWarp() -> Cannot warp when flying'), o && o(), !1 null != e || (e = M.Show), this.history.invalidate(), e !== M.Retain ? this.path.brushToWarpPano(i, R.BLACK) || (i = R.BLACK) : (i = this.path.upcomingTransType) var a = this.path.warpDestPano && !this.path.warpDestPano.isAligned() return ( this.emit(W.WarpStarted, a, i, n, r), (n = n || P.MIDDLE), this.path.warpToPano( i, n, r, function () { t === S.Slow ? this.path.discardSlow() : t === S.Standard && this.path.discardPathObject(), this.emit(W.WarpEnded, i), this.cameraControls.activeControl && (this.cameraControls.activeControl.enabled = !0), o && o() }.bind(this) ), e === M.Hide && this.path.discardPathObject(), !0 ) }), (t.prototype.warpToPanoById = function (e, t, i, n, r, o, a, s) { return this.path.setWarpDestinationByPanoId(e, t) ? this.startWarp(i, n, r, o, a, s) : (Y.warn('Player.warpToPanoById() -> Could not setWarpDestinationByPanoId()'), s && s(), !1) }), (t.prototype.warpToPanoByHeroIndex = function (e, t, i, n, r, o, a) { return this.path.setWarpDestinationByHeroIndex(e) ? this.startWarp(t, i, n, r, o, a) : (Y.warn('Player.warpToPanoByHeroIndex() -> Could not setWarpDestinationByHeroIndex()'), a && a(), !1) }), (t.prototype.warpToPano = function (e, t, i, n, r, o, a, s) { return this.warpToPanoById(e.id, t, i, n, r, o, a, s) }), (t.prototype.warpToNonPanoByHeroIndex = function (e, t) { return this.path.setWarpDestinationByHeroIndex(e) ? (this.path.warpToNonPano(t), !0) : (Y.warn('Player.warpToNonPanoByHeroIndex() -> Could not setWarpDestinationByHeroIndex()'), t && t(), !1) }), (t.prototype.aimTourCamera = function (e, t, i, n) { return Y.debug('player.aimTourCamera(' + e + ') calling warpToPanoByHeroIndex(' + e + ')'), this.warpToPanoByHeroIndex(e, t, i, null, null, null, n) }), (t.prototype.showPathToHeroLocation = function (e) { this.path.setWarpDestinationByHeroIndex(e) && this.path.brushToWarpPano(R.STD, R.BLACK) }), (t.prototype.tourInterlude = function (e, t) { this.history.invalidate(), this.path.discardSlow() var defaultRotTime = DATA.tourRotTime * 1000 var timeEachItem = (2e3 / (DATA.tourWalkSpeed + DATA.tourBlackSpeed)) * 200 //预估时间假设每个item飞的时间(如果距离远就少了) var currentLocation = this.model.getHeroDescriptorByIndex(this.director.currentItem) var currentLocation0 = this.model.heroLocations[this.director.currentItem[0]] var rotTime if (currentLocation.rotTime == void 0 || currentLocation.rotTime == '') { var restChildCount = currentLocation0.heroLocations ? currentLocation0.heroLocations.length - this.director.currentItem[1] - 1 : 0 var hasMusic = currentLocation0.musicInfo && currentLocation0.musicInfo.music if (hasMusic) { var audioObj = SoundManager.list.find(e => e.name == 'tour') var current = audioObj.audio.currentTime * 1e3 // || 0 //g_tourAudio ? 1e3 * g_tourAudio.currentTime : 0 rotTime = currentLocation0.musicInfo.time - current if (restChildCount) { //如果当前folder中还有剩下的item,平分一下时间 rotTime = (rotTime - timeEachItem * restChildCount) / (restChildCount + 1) } } else { rotTime = defaultRotTime } rotTime = Math.max(0, rotTime) //console.log("rotTime "+rotTime +" at item "+this.director.currentItem + (hasMusic ? (",musicCurrentTime:"+current+'音乐总长:'+currentLocation0.musicInfo.time) : '')) } else { rotTime = currentLocation.rotTime * 1000 //console.log("rotTime "+rotTime +" at item "+this.director.currentItem) } this.path.waitNextStep( e, function () { //等待音乐播放一段时间再下一步,此时镜头会缓慢旋转 t && t() }.bind(this), rotTime ) }), (t.prototype.stopInterlude = function () { this.interruptAndFastForward(null, 0) }), (t.prototype.interruptAndFastForward = function (e, t) { this.isWarping() && this.emit(W.WarpInterrupted, this.path.activeTransType, e, t), this.flying && this.emit(W.FlyingInterrupted), this.path.interruptAndFastForward(e, t) }), (t.prototype.setSize = function (e, t) { var i = e / t this.baseFov = A.clampVFOV(k.insideFOV, k.insideFOVMax, e, t) var n = A.getHFOVFromVFOV(k.insideFOV, e, t) for (var r in (n > k.insideFOVMax ? (this.baseFov = A.getVFOVFromHFOV(k.insideFOVMax, e, t)) : (this.baseFov = k.insideFOV), this.cameraControls.cameras)) { var o = this.cameraControls.cameras[r] ;(o.fov = this.baseFov * (1 / this.zoomLevel)), o.updateAspect(i) } }), (t.prototype.toJSON = function () { var e = {} return ( this.cameraControls.activeControl && (((e = this.cameraControls.activeControl.toJSON()).camera_mode = V.toInt(this.mode)), this.isOutsideMode() ? this.model.allFloorsVisible ? (e.floor_visibility = []) : (e.floor_visibility = this.model.floors.list.map(function (e) { return e.hidden ? 0 : 1 })) : V.PANORAMA && (e.scan_id = this.currentPano.id)), e ) }), (t.prototype.getCurrentNodePanos = function (e) { if ((this.model.panos.map, (e.length = 0), this.path.nodes)) for (var t = 0; t < this.path.nodes.length; t++) { var i = this.path.nodes[t] e.push(this.model.panos.get(i)) } }), (t.prototype.zoomIncrementally = function (e) { var t = this.zoomLevel this.zoomTo(this.zoomLevel + e), t !== this.zoomLevel && this.currentPano && this.zoomStats.addZoomAction(t, this.zoomLevel, this.currentPano.id) }), (t.prototype.zoomInIncrementally = function (e) { ;(e = e || this.defaultZoomIncrement), this.zoomIncrementally(e) }), (t.prototype.zoomOutIncrementally = function (e) { ;(e = e || -this.defaultZoomIncrement), this.zoomIncrementally(e) }), (t.prototype.zoomBy = function (e) { this.zoomTo(this.zoomLevel * e) }), (t.prototype.zoomIn = function () { this.zoomBy(1 + this.zoomSpeed) }), (t.prototype.zoomOut = function () { this.zoomBy(1 - this.zoomSpeed) }), (t.prototype.zoomTo = function (e, t) { if ( (t || (k.zoom.enabled && this.mode === V.PANORAMA && this.zoomEnabled)) && (e < k.zoom.min && (e = k.zoom.min), e > k.zoom.max && (e = k.zoom.max), e > this.zoomLevel ? (this.emit(m.ZoomIn), e === k.zoom.max && this.emit(m.ZoomMax)) : e < this.zoomLevel && (this.emit(m.ZoomOut), e === k.zoom.min && this.emit(m.ZoomMin)), this.cameraControls.activeControl) ) { var i = this.cameraControls.activeControl.camera ;(this.zoomLevel = e), (i.fov = this.baseFov * (1 / this.zoomLevel)), i.updateProjectionMatrix(), (this.zoomFov = i.fov) } }), (t.prototype.increaseZoomSpeed = function () { this.zoomSpeed = this.clampZoomSpeed(this.zoomSpeed + this.zoomSpeedAdjust) }), (t.prototype.decreaseZoomSpeed = function () { this.zoomSpeed = this.clampZoomSpeed(this.zoomSpeed - this.zoomSpeedAdjust) }), (t.prototype.clampZoomSpeed = function (e) { return e < 0 ? 0 : e }), (t.prototype.activatePersistentZooming = function (e) { this.zooming = e ? 1 : -1 }), (t.prototype.deactivatePersistentZooming = function () { this.zooming = 0 }), (t.prototype.zoomDefault = function () { this.zoomTo(1, !0) }) window.fovTranId = 333 //add ;(t.prototype.smoothZoomToDefault = function (e, t) { G.cancelById(window.fovTranId) var i, n = this.zoomLevel, r = function (e) { 1 < e && (e = 1), (i = n * (1 - e) + e), this.zoomTo(i, !0) }.bind(this), o = function () { this.zoomDefault(), t && window.setTimeout(t, 50) }.bind(this) G.start(r, e, o, null, 0, z[k.transition.blendEasing], null, window.fovTranId) }), (t.prototype.smoothZoomFovTo = function (fov, zoomLevel, dur, callback) { //add G.cancelById(window.fovTranId) var i, n = this.zoomLevel, aimLevel = zoomLevel || this.baseFov / fov if (n == aimLevel) return var fun = function (e) { e > 1 && (e = 1), (i = n * (1 - e) + e * aimLevel), this.zoomTo(i, !0) }.bind(this) G.start(fun, dur, callback, null, 0, z[k.transition.easeInCubic], null, window.fovTranId) }), (t.prototype.updateZoomPano = function () { if (!this.panoRenderer.zoomPanoRenderingDisabled && this.mode === V.PANORAMA) { var e = this.currentPano if (e) { var t = this.zoomLevel > k.zoom.activationThreshold, i = ((this.flying && this.nextPano && this.nextPano !== this.currentPano) || this.isWarping(), t) this.tileDownloader.tilePrioritizer.setZoomingActive(i), this.panoRenderer.setZoomingActive(i, e, !0) var n = function (e, t) { this.panoRenderer.resetRenderStatus(e.id, !1, !0, this.qualityManager.getMaxNavPanoSize()), this.panoRenderer.clearAllQueuedUploadsForPano(e.id), this.panoRenderer.renderPanoTiles(e.id, null, !1, !1), e.setZoomed(t) }.bind(this) i && !e.zoomed ? (n(e, !0), this.panoRenderer.enableUltraHighQualityMode( function () { this.qualityManager.useUltraHighResolutionPanos && !k.zoom.overridemax && (k.zoom.max = y.ultraHighQualityMaxZoom), i && n(e, !0) }.bind(this) )) : !t && e.zoomed && n(e, !1) } } }), //-------- (t.prototype.flyToMode = function (mode, f1) { //飞到某个模式后再执行f1函数 var f2 if (this.mode == mode) { f1 && f1() } else { f2 = f1 if (this.mode == 'transitioning' && this.modeTran.split('-')[1] != mode) { //正飞向其他模式,就要先飞完再飞进来然后执行 this.afterCModeFuc = function () { this.afterCModeFuc = f2 this.flyToNewMode({ mode: mode, pano: mode == 'panorama' && this.currentPano }) }.bind(this) } else { this.afterCModeFuc = f2 //飞入后执行 try { //在场景刚开始加载 control还没建好时这句可能会报错所以用try。 不用callback而用 afterCModeFuc也是这个原因,因为会有别的函数可以飞入然后执行它 this.flyToNewMode({ mode: mode, pano: mode == 'panorama' && this.currentPano }) } catch (e) {} } } }), (t.prototype.checkHasNeighbor = function (pano) { //add for (var i in pano.neighbourPanos) { if (i == pano.id) continue if (pano.neighbourPanos[i]) { return true } } }), (ee.exports = t) }).call(this, '/js/player.js') }, { './constants': 8, './enum/AlignmentType': 17, './enum/BlackoutStyle': 18, './enum/ControlEvents': 21, './enum/Keys': 30, './enum/ModelManagerEvents': 33, './enum/PanoSizeClass': 36, './enum/PanoramaEvents': 37, './enum/PathDiscardMode': 38, './enum/PathDisplayMode': 39, './enum/PlayerEvents': 40, './enum/TagStates': 44, './enum/Vectors': 50, './enum/Viewmode': 51, './enum/WarpStyle': 52, './enum/ZoomEvents': 53, './exception/BasicException': 55, './model/ModelManager': 140, './objects/NSpider': 147, './objects/Panorama': 148, './objects/Reticule': 149, './objects/ShowPath': 151, './objects/Snapshot': 153, './objects/View': 154, './settings': 166, './shaders': 167, './tile/TileDownloader': 171, './tile/TilePrioritizer': 172, './util/ZoomStats': 179, './util/browser': 182, './util/camera': 183, './util/cameraLight': 184, './util/common': 185, './util/easing': 186, './util/history': 187, './util/lerp': 188, './util/logger': 189, './util/math': 190, './util/transitions': 195, // hot: "hot", scaleImg: 'scaleImg', events: 202, three: 217 } ], scaleImg: [ function (e, t) { var i = t ;(function () { function e(e, t, i, n) { function r() { ;((U = 'object' == typeof i ? i : t.src || n ? s : document.createElement('canvas')).width = d), (U.height = p), (H = U.getContext('2d')) } function o(e) { if (e) { var t, i = H.getImageData(0, 0, d, p), n = i.data for (t = 0; t < ie; t += 4) (n[t] = (e[t] * ne) | 0), (n[t + 1] = (e[t + 1] * ne) | 0), (n[t + 2] = (e[t + 2] * ne) | 0), (n[t + 3] = (e[t + 3] * ne) | 0) return delete e, i } return H.getImageData(0, 0, d, p) } function a(e, t, i, n, r) { return 0.5 * (n - t + (2 * t - 5 * i + 4 * n - r + (3 * (i - n) + r - t) * e) * e) * e + i } var s, l if ((t || ((t = e.input), (i = e.output), (n = e.inputRemovable), e.scale && (e = e.scale)), t.src)) if (((s = document.createElement('canvas')), null != t.naturalWidth)) (s.width = t.naturalWidth), (s.height = t.naturalHeight) else if (null != t.runtimeStyle) { var c = t.runtimeStyle, h = c.width, u = c.height ;(c.width = 'auto'), (c.height = 'auto'), (s.width = t.width), (s.height = t.height), (c.width = h), (c.height = u) } else { ;(h = t.width), (u = t.height) t.removeAttribute && (t.removeAttribute('width'), t.removeAttribute('height')), (s.width = t.width), (s.height = t.height), (t.width = h), (t.height = u) } else s = t ;(l = s.getContext('2d')), t.src && l.drawImage(t, 0, 0) var d, p, f = s.width, g = s.height, m = l.getImageData(0, 0, f, g).data if (!f || !g) return !1 ;(t.src || n) && s.clearRect(0, 0, f, g), (p = 'object' == typeof e ? e.width ? ((d = (e.width + 0.5) | 0), (e.height + 0.5) | 0) : ((d = (f * e.scaleX + 0.5) | 0), (g * e.scaleY + 0.5) | 0) : ((d = (e * f + 0.5) | 0), (e * g + 0.5) | 0)) var v, y, A, C, I, E, _, b, w, T, x, S, M, R, P, O, L, D, N, F, B, V, k, U, H, z, G, W, j, Y, q, X, Z, K, Q, J = d << 2, $ = f << 2, ee = 0, te = 0, ie = J * p, ne = 255.99 / 255, re = d / f, oe = p / g, ae = re * oe if (1 < re || 1 < oe) for (r(), G = (z = o()).data, C = 0; C < p; C++) for (V = (y = C / oe) - (w = 0 | y), j = w * $, W = w < 1 ? j : j - $, w < g - 2 ? ((Y = j + $), (q = (2 + w) * $)) : (Y = q = g - 2 < w ? j : j + $), A = 0; A < d; A++, te += 4) (Z = (b = 0 | (v = A / re)) << 2), b < f - 2 ? ((K = Z + 4), (Q = Z + 8)) : (K = Q = f - 2 < b ? Z : Z + 4), (D = (a( V, a((k = v - b), m[W + (X = b < 1 ? Z : Z - 4)], m[W + Z], m[W + K], m[W + Q]), a(k, m[j + X], m[j + Z], m[j + K], m[j + Q]), a(k, m[Y + X], m[Y + Z], m[Y + K], m[Y + Q]), a(k, m[q + X], m[q + Z], m[q + K], m[q + Q]) ) * ne) | 0), ++Z, ++K, ++Q, (F = (a( V, a(k, m[W + ++X], m[W + Z], m[W + K], m[W + Q]), a(k, m[j + X], m[j + Z], m[j + K], m[j + Q]), a(k, m[Y + X], m[Y + Z], m[Y + K], m[Y + Q]), a(k, m[q + X], m[q + Z], m[q + K], m[q + Q]) ) * ne) | 0), ++Z, ++K, ++Q, (B = (a( V, a(k, m[W + ++X], m[W + Z], m[W + K], m[W + Q]), a(k, m[j + X], m[j + Z], m[j + K], m[j + Q]), a(k, m[Y + X], m[Y + Z], m[Y + K], m[Y + Q]), a(k, m[q + X], m[q + Z], m[q + K], m[q + Q]) ) * ne) | 0), ++Z, ++K, ++Q, (N = (a( V, a(k, m[W + ++X], m[W + Z], m[W + K], m[W + Q]), a(k, m[j + X], m[j + Z], m[j + K], m[j + Q]), a(k, m[Y + X], m[Y + Z], m[Y + K], m[Y + Q]), a(k, m[q + X], m[q + Z], m[q + K], m[q + Q]) ) * ne) | 0), (G[te] = 0 <= D ? (D < 256 ? D : 255) : 0), (G[te + 1] = 0 <= F ? (F < 256 ? F : 255) : 0), (G[te + 2] = 0 <= B ? (B < 256 ? B : 255) : 0), (G[te + 3] = 0 <= N ? (N < 256 ? N : 255) : 0) else { if (le.Float32Array) L = new Float32Array(ie) else for (L = [], te = 0; te < ie; ++te) L[te] = 0 for (y = 0; y < g; y++) for (I = (_ = 0 | (C = y * oe)) * J, (O = !!((_ - ((C + oe) | 0)) * (g - 1 - y)) << 1) && ((M = 1 + _ - C), (R = C + oe - _ - 1)), v = 0; v < f; v++, ee += 4) switch ( ((A = v * re), (E = 0 | A), (te = I + (E << 2)), (P = !!((E - ((A + re) | 0)) * (f - 1 - v))), P && ((x = 1 + E - A), (S = A + re - E - 1)), (D = m[ee]), (F = m[ee + 1]), (B = m[ee + 2]), (N = m[ee + 3]), P + O) ) { case 0: ;(L[te] += D * ae), (L[te + 1] += F * ae), (L[te + 2] += B * ae), (L[te + 3] += N * ae) break case 1: ;(T = x * oe), (L[te] += D * T), (L[te + 1] += F * T), (L[te + 2] += B * T), (L[te + 3] += N * T), (T = S * oe), (L[te + 4] += D * T), (L[te + 5] += F * T), (L[te + 6] += B * T), (L[te + 7] += N * T) break case 2: ;(T = re * M), (L[te] += D * T), (L[te + 1] += F * T), (L[te + 2] += B * T), (L[te + 3] += N * T), (T = re * R), (L[(te += J)] += D * T), (L[te + 1] += F * T), (L[te + 2] += B * T), (L[te + 3] += N * T) break default: ;(T = x * M), (L[te] += D * T), (L[te + 1] += F * T), (L[te + 2] += B * T), (L[te + 3] += N * T), (T = S * M), (L[te + 4] += D * T), (L[te + 5] += F * T), (L[te + 6] += B * T), (L[te + 7] += N * T), (T = x * R), (L[(te += J)] += D * T), (L[te + 1] += F * T), (L[te + 2] += B * T), (L[te + 3] += N * T), (T = S * R), (L[te + 4] += D * T), (L[te + 5] += F * T), (L[te + 6] += B * T), (L[te + 7] += N * T) } delete m, r(), (z = o(L)) } if ((H.putImageData(z, 0, 0), 'string' == typeof i)) { var se if ('png' === i || 'jpeg' === i) return ((se = n && t.src ? t : new Image()).width = d), (se.height = p), (se.src = U.toDataURL('image/' + i, 0.85)), se if ('png-src' === i || 'jpeg-src' === i) return U.toDataURL('image/' + i.split('-')[0], 0.85) } return U } var le = this 'undefined' != typeof exports ? ('undefined' != typeof module && module.exports && (exports = module.exports = e), (exports.scale = e)) : (c = e) }).call(this), (i.exports = c) }, {} ], 156: [ function (i, n, e) { ;(function (e) { 'use strict' function t(e, t) { ;(this.model = e), (this.panos = e.panos), (this.player = t), (this.imagePanos = this.listImagePanos()), (this.retryMinimumTime = 1e4) } var r = (i('three'), i('./enum/Viewmode')), o = (i('./settings'), i('./objects/Panorama')), a = new (i('./util/logger'))(e) ;(t.prototype.start = function () { this.loadNextPano( function (e) { e ? this.start() : (a.debug('No suitable pano loaded, waiting a little while before looking again'), setTimeout( function () { this.start() }.bind(this), 1e3 )) }.bind(this) ) }), (t.prototype.validLoadTarget = function (e) { return e && !e.isLoaded('high') && Date.now() - e.failedLoadingAt > this.retryMinimumTime }), (t.prototype.listImagePanos = function () { var i = [], n = this return ( this.model.images.forEach(function (e) { if (e.metadata && e.metadata.scan_id) { var t = n.model.panos.get(e.metadata.scan_id) t && !t.isLoaded('high') && i.push(t) } }), i ) }), (t.prototype.nextNotLoadedImage = function () { for (; 0 < this.imagePanos.length; ) { var e = this.imagePanos[0] if (!e.isLoaded('high')) return e this.imagePanos.shift() } return null }), (t.prototype.loadNextPano = function (e) { var t, i, n = this.model.waitQueue.filter(function (e) { return e.object instanceof o }) 0 < n.length ? ((t = n[0].object), a.debug('Overrode pano selection: Flying to an unloaded pano ' + t.id)) : this.validLoadTarget(this.player.currentPano) ? ((t = this.player.currentPano), a.debug('Overrode pano selection: Currently at an unloaded pano ' + t.id)) : this.validLoadTarget(this.player.closestPano) ? ((t = this.player.closestPano), a.debug('Overrode pano selection: Hovering over an unloaded pano ' + t.id)) : this.validLoadTarget(this.nextNotLoadedImage()) ? ((i = 'high'), (t = this.imagePanos[0]), a.debug('Overrode pano selection: Highlight image ' + t.id)) : this.player.mode !== r.PANORAMA || ((t = this.panos.lowestByScore( [this.validLoadTarget.bind(this), o.filters.isNeighbourPanoTo(this.player.currentPano)], [ o.scoreFunctions.distance(this.player.currentPano), o.scoreFunctions.direction(this.player.position, this.player.getDirection()), o.scoreFunctions.inFieldOfView(this.player.position, this.player.getDirection()) ] )) && a.debug('Normal pano selection: neighbor ' + t.id)), t ? ((i = i || t.isLoaded('low') ? 'high' : 'low'), a.debug('Preloading ' + i + '-res pano ' + t.id), t .loadCube(i) .done(e) .fail(function () { a.warn('Failed preloading pano', t.id, ', marking it as failed and forgetting it for a while'), e() })) : e && e(null) }), (n.exports = t) }).call(this, '/js/preloaders.js') }, { './enum/Viewmode': 51, './objects/Panorama': 148, './settings': 166, './util/logger': 189, three: 217 } ], 157: [ function (a, s, e) { ;(function (e) { 'use strict' function t(e, t, i, n, r) { ;(this.qualityManager = e), (this.scene = t), (this.camera = i), (this.container = r), (this.controls = n), (this.controls.enabled = !0), (this.controls.locked = !0), (this.quickstartCamera = n.camera), (this.quickstartCamera.fov = d.clampVFOV(o.insideFOV, o.insideFOVMax, $('#player').width(), $('#player').height())), (this.skybox = null) } var i = a('three'), n = a('../util/logger'), o = a('../constants'), h = (a('../util/transitions'), a('../util/lerp'), a('../util/easing'), a('../enum/Vectors')), u = a('../enum/PanoSizeClass'), r = (a('../materials/ModelTextureMaterial'), a('../materials/CubemapMaterial')), d = (a('../cameras/PanoramaCamera'), a('../controls/PanoramaControls'), a('../tile/TileUtils'), a('../util/camera'), a('../util/cameraLight')), p = (a('../util/browser'), a('../settings'), a('../gui/helpManager'), new n(e)) ;(t.prototype.load = function (e) { e.pano.shouldRedrawOnBaseLoaded = !0 var t, i, n = this, r = h.FORWARD.clone().applyQuaternion(e.quaternion), o = r.clone().negate() this.controls.lookAt(r.add(this.quickstartCamera.position)) var a = this.qualityManager.getPanoSize(u.BASE), s = this.qualityManager.getPanoSize(u.STANDARD) if (e.pano.tiled) { p.warn('Loading startPano, TILED', e.pano.id) var l = d.getHFOVForCamera(this.quickstartCamera, $('#player').width(), $('#player').height()), c = this.quickstartCamera.fov p.warn('Quickstart loading tiles in frustum: [horizontal FOV: ' + l + ', vertical FOV: ' + c + ']'), (t = e.pano.loadTiledPano( s, r, { hFov: l, vFov: c }, !1, !1, !0 )), (i = e.pano.loadTiledPano(a, o, null, !1, !1, !0)) } else p.warn('Loading startPano', e.pano.id), (t = e.pano.loadCube('high')) return $.when(t).then( function () { n.init(e.pano, e.quaternion), e.pano.tiled ? i.done( function () { ;(e.pano.lockUntilRenderingComplete = !1), (this.controls.locked = !1) }.bind(this) ) : (this.controls.locked = !1) }.bind(this) ) }), (t.prototype.init = function (e, t) { p.info('Quickstart done loading, adding scene objects'), (e.lockUntilRenderingComplete = !0), (this.skybox = new i.Mesh( new i.CubeGeometry(1, 1, 1), new r({ side: i.BackSide }) )), (this.skybox.material.uniforms.map.value = e.getSkyboxTexture()), this.skybox.quaternion.copy(e.quaternion), this.scene.add(this.skybox), $(this.container).show() }), (t.prototype.update = function (e) { this.controls.update(e), this.camera.copy(this.quickstartCamera) }), (t.prototype.setSize = function (e, t) { this.quickstartCamera.updateAspect(e / t) }), (t.prototype.destroy = function () { this.scene.remove(this.skybox) }), (s.exports = t) }).call(this, '/js/scene/QuickstartManager.js') }, { '../cameras/PanoramaCamera': 7, '../constants': 8, '../controls/PanoramaControls': 13, '../enum/PanoSizeClass': 36, '../enum/Vectors': 50, '../gui/helpManager': 68, '../materials/CubemapMaterial': 117, '../materials/ModelTextureMaterial': 118, '../settings': 166, '../tile/TileUtils': 174, '../util/browser': 182, '../util/camera': 183, '../util/cameraLight': 184, '../util/easing': 186, '../util/lerp': 188, '../util/logger': 189, '../util/transitions': 195, three: 217 } ], 158: [ function (e, t, i) { 'use strict' function h(e, t, i) { ;(this.scene = e), (this.camera = t), (this.renderer = null), (this.effects = i), (this.animateCallback = null), (this.composer = null), (this.qualityManager = null), (e.renderWidth = 0), (e.renderHeight = 0), (this.updateClock = new M.Clock()), (this.components = []), (this.updateListeners = []), (this.resizeListeners = []), (this.forceUpdateSize = !1), (this.started = !1), (this.textures = {}), (this.suspendedObjects = []) } var o, a, n, M = e('three'), R = e('../shaders'), r = e('../enum/SceneRendererEvents'), f = e('../enum/GLTextureType'), s = e('../enum/GLCubeFaces'), l = e('../exception/BasicException'), c = e('../exception/RendererCreationException'), u = e('../util/browser'), d = e('../settings'), p = e('events').EventEmitter ;(window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame), ((h.prototype = Object.create(p.prototype)).addComponent = function (e) { this.components.push(e), e.update && this.updateListeners.push(e), e.setSize && (this.resizeListeners.push(e), (this.forceUpdateSize = !0)) }), (h.prototype.removeComponent = function (t) { function e(e) { return e !== t } ;(this.components = this.components.filter(e)), (this.updateListeners = this.updateListeners.filter(e)), (this.resizeListeners = this.resizeListeners.filter(e)) }), (h.prototype.start = function (e) { if (this.started) throw new l("Can't start SceneRenderer, already started") this.createContext(e), //u.isMobile() && this.boluoVrInit(), this.initComposer(), (this.started = !0), (b = b.bind(this))() }), (h.prototype.createContext = function (e) { try { ;(this.renderer = new M.WebGLRenderer({ antialias: !u.isMobile() })), (this.renderer.autoClear = !0), this.renderer.setPixelRatio(window.devicePixelRatio ? window.devicePixelRatio : 1), this.renderer.setSize($('#player').width(), $('#player').height(), !1), this.emit(r.ContextCreated) } catch (e) { throw new c('Unable to create a WebGL rendering context') } d.profiling.enabled && this.overrideTextures(), e.appendChild(this.renderer.domElement) }), (h.prototype.overrideTextures = function () { var d = this.renderer.context, t = 0, i = d.createTexture d.createTexture = function () { var e = i.call(d) return (e.id = t++), (this.textures[e.id] = e) }.bind(this) var p = d.texImage2D d.texImage2D = function (e, t, i, n, r, o, a, s, l) { var c, h = this.getTextureTypeFromTarget(d, e) ;(c = h === f.TextureCube ? d.getParameter(d.TEXTURE_BINDING_CUBE_MAP) : d.getParameter(d.TEXTURE_BINDING_2D)), void 0 !== a ? p.call(d, e, t, i, n, r, o, a, s, l) : ((a = n), (s = r), (n = (l = o).naturalWidth), (r = l.naturalHeight), p.call(d, e, t, i, a, s, l)) var u = this.textures[c.id] ;(u.width = h === f.TextureCube ? 6 * n : n), (u.height = r) }.bind(this) var n = d.deleteTexture d.deleteTexture = function (e) { delete this.textures[e.id], n.call(d, e) }.bind(this) }), (h.prototype.updateTextureMemory = ((n = null), function () { var e = 0 for (var t in this.textures) { var i = this.textures[t] i.width && i.height && (e += i.width * i.height * 4) } e !== n && this.emit(r.MemoryUsageUpdated, e), (n = e) })), (h.prototype.getTextureTypeFromTarget = function (e, t) { switch (t) { case e.TEXTURE_CUBE_MAP_POSITIVE_X: case e.TEXTURE_CUBE_MAP_NEGATIVE_X: case e.TEXTURE_CUBE_MAP_POSITIVE_Y: case e.TEXTURE_CUBE_MAP_NEGATIVE_Y: case e.TEXTURE_CUBE_MAP_POSITIVE_Z: case e.TEXTURE_CUBE_MAP_NEGATIVE_Z: return f.TextureCube case e.TEXTURE_2D: return f.Texture2D default: return null } }), (h.prototype.initComposer = function () { ;(this.composer = new M.EffectComposer(this.renderer)), this.composer.addPass(new M.RenderPass(this.scene, this.camera)), /* this.composer.addPass(this.effects.hblurPass), this.composer.addPass(this.effects.vblurPass) */ this.composer.addPass(this.effects.fastTranMaskPass) //add }), (h.prototype.setSize = function (e, t, i) { ;(this.renderWidth = e), (this.renderHeight = t), (this.effects.aspect = e / t), this.renderer.setSize(e, t, !1, i), this.composer.setSize(e, t) for (var n = 0; n < this.resizeListeners.length; n++) this.resizeListeners[n].setSize(e, t) }), (h.prototype.render = function () { this.effects.fastTranMaskPass.enabled ? this.composer.render() : this.renderer.render(this.scene, this.camera) }), (h.prototype.boluoVrInit = function () { console.log('boluoVrInit'), (this.isHuawei5X = u.detectHUAWEI5X()), (this.oldRenderer = this.renderer), (this.newRenderer = new this.vrRenderer(this.renderer, this, this.camera)), (window.panoCamera = this.camera) var i = this ;(window._vrEnabled = !1), Object.defineProperty(window, 'vrEnabled', { get: function () { return window._vrEnabled }, set: function (e) { ;(e = !!e) ? ((i.renderer = i.newRenderer), window.vrMarkers.forEach(function (e) { e.visible = !0 })) : ((i.renderer = i.oldRenderer), window.vrMarkers.forEach(function (e) { e.visible = !1 })), (i.cursor.visible = e), i.setSize($('#player').width(), $('#player').height()), (window._vrEnabled = e), setTimeout(function () { console.log(player.cameraControls.activeControl.camera.fov) }, 500) } }), this.createCursor(0.5, !1, 1, 16777215, 0) var e = { setSize: function (e, t) { i.camera.aspect = e / t } } this.resizeListeners.push(e), this.vrLoadingInit() }), (h.prototype.vrLoadingInit = function () { var e = new (e = function (camera) { var t = this, e = new M.RingGeometry(1.3, 1.5, 32, 32, 0, 1.2 * Math.PI), i = new M.MeshBasicMaterial({ color: 4967932, side: M.DoubleSide }), n = new M.Mesh(e, i) ;((this.mesh = n).position.z = -2), n.scale.set(0.08, 0.08, 0.08), (n.visible = !1), //window.player.camera.add(n), camera.add(n), (t.enabled = !1), (this.update = function (e) { 1 == t.enabled && (n.rotation.z += 15 * e) }) })(this.camera) ;(window.Loading = e), this.updateListeners.push(e) }), (h.prototype.createCursor = function (e, t, i, n, r) { var o, a = new M.SpriteMaterial({ opacity: i, color: n, transparent: t, map: this.boluoGetTexture('images/cursor.png'), needsUpdate: !0, side: M.DoubleSide }) ;(a.map.offset = new M.Vector2((1 / 17) * r, 0)), (a.map.repeat = new M.Vector2(1 / 17, 1)), (a.depthTest = !1), (a.blending = M.AdditiveBlending), (o = new M.Sprite(a)).scale.set(0.3, 0.3, 0.3), (o.position.z = -2), (o.visible = !1), (o.name = 'cursor'), this.camera.add(o), this.scene.add(this.camera), (this.cursor = o) var s = new this.CursorAnimation(this.scene, o, this.camera) ;(this.cursor.triggerTargetEvent = s.triggerTargetEvent), this.updateListeners.push(s) }), (h.prototype.CursorAnimation = function (e, t, o) { ;(this.cursor = t), (this.raycaster = new M.Raycaster()), (this.targetEventObj = {}), (this.type = 1), (this.tweenFlag = !0) var s = this ;(this.target = o), console.log(o.uuid), (this.euler = new M.Euler()), (this.q0 = new M.Quaternion()), (this.q1 = new M.Quaternion(-Math.sqrt(0.5), 0, 0, Math.sqrt(0.5))), (this.zee = new M.Vector3(0, 0, 1)), (this.alpha = -1e3), (this.beta = -1e3), (this.gamma = -1e3), (this.orient = M.Math.degToRad(window.orientation || 0)), window.addEventListener('orientationchange', function () { s.orient = M.Math.degToRad(window.orientation || 0) }), window.addEventListener('deviceorientation', function (e) { var t = M.Math.degToRad(e.alpha), i = M.Math.degToRad(e.beta), n = M.Math.degToRad(e.gamma) if ( (this.isHuawei5X ? (-1e3 === s.alpha && (s.alpha = t), -1e3 === s.beta && (s.beta = i), -1e3 === s.gamma && (s.gamma = n), 0.06 < Math.abs(t - s.alpha) && (s.alpha = t), 0.006 < Math.abs(i - s.beta) && (s.beta = i), 0.006 < Math.abs(n - s.gamma) && (s.gamma = n)) : ((s.alpha = t), (s.beta = i), (s.gamma = n)), h.vrDebug) ) { $('#info-device-orientation').css('display', 'block') var r = '' ;(r += 'alpha=(' + s.alpha + ')
    '), (r += 'beta=(' + s.beta + ')
    '), (r += 'gamma=' + s.gamma + '
    '), (document.getElementById('info-device-orientation').innerHTML = r) } }), (this.setObjectQuaternion = function (e, t, i, n, r) { s.euler.set(i, t, -n, 'YXZ'), e.setFromEuler(s.euler), e.multiply(s.q1), e.multiply(s.q0.setFromAxisAngle(s.zee, -r)), o.updateMatrixWorld() }), parent !== window && window.addEventListener('message', function (e) { var t, i, n, r, o = JSON.parse(e.data), a = -1 !== window.navigator.userAgent.indexOf('KIW-TL00H') o && o.alpha && o.beta && o.gamma && ((t = a), (i = M.Math.degToRad(o.alpha)), (n = M.Math.degToRad(o.beta)), (r = M.Math.degToRad(o.gamma)), t ? (-1e3 === s.alpha && (s.alpha = i), -1e3 === s.beta && (s.beta = n), -1e3 === s.gamma && (s.gamma = r), 0.06 < Math.abs(i - s.alpha) && (s.alpha = i), 0.006 < Math.abs(n - s.beta) && (s.beta = n), 0.006 < Math.abs(r - s.gamma) && (s.gamma = r)) : ((s.alpha = i), (s.beta = n), (s.gamma = r))) }), (this.update = function (e) { TWEEN.update(), window.vrEnabled && (this.setObjectQuaternion(this.target.quaternion, this.alpha, this.beta, this.gamma, this.orient), this.triggerTargetEvent()) }), (this.triggerTargetEvent = function () { var e = this.choseObj(), t = e ? e.object : void 0 ;(this.targetEventObj.currentObj = t) !== this.targetEventObj.lastObj && (t && this.autoCursorPosition(e), 1 === this.type ? (this.cursorAnimate && this.cursorAnimate.stop(), t && t.enabled && this.startAnimate( function () { this.clickCallback(t) }.bind(this) )) : this.type, (this.targetEventObj.lastObj = t)) }), (this.choseObj = function () { this.raycaster.setFromCamera( { x: 0, y: 0 }, o ) var e = (this.raycaster.ray, window.vrMarkers), t = this.raycaster.intersectObjects(e) if (0 < t.length) return t[0] }), (this.clickCallback = function (e) { this.runTHREEAction(e, 'onclick') }), (this.runTHREEAction = function (e, t) { switch (t) { case 'onclick': e._listeners && e._listeners.click && e._listeners.click.forEach(function (e) { e() }) break case 'onhover': e._listeners && e._listeners.hover && e._listeners.hover.forEach(function (e) { e() }) break case 'onout': e._listeners && e._listeners.out && e._listeners.out.forEach(function (e) { e() }) } }), (this.startAnimate = function (e) { this.tweenFlag && this.initAnimation(e) }), (this.initAnimation = function (e) { var t = this, i = this.cursor.material.map.offset ;(t.tweenFlag = !1), (this.cursorAnimate = new TWEEN.Tween(i) .to( { x: 1 }, 1e3 ) .onStart(function () { t.tweenFlag = !1 }) .onStop(function () { ;(t.tweenFlag = !0), (this.x = 0), (i.x = 0) }) .onUpdate(function () {}) .onComplete(function () { e(), (i.x = 0), setTimeout(function () { t.tweenFlag = !0 }, 1500) })), this.cursorAnimate.easing(function (e) { return Math.floor(17 * e) / 17 }), this.cursorAnimate.start() }), (this.autoCursorPosition = function (e) { this.cursor.scale.set(0.3, 0.3, 0.3) }) }), (h.prototype.vrRenderer = function (a, i, e) { var s = new i.vrCamera(e) ;(s.bananaAspect = 0.8), this.width, this.height i = this ;(this.setSize = function (e, t) { a.setSize.call(this, e, t), (i.width = e), (i.height = t) }), (this.render = function (e, t, i, n) { var r, o if (((window.cameraQua = t.quaternion.clone()), t.__RESS__SKIP__STEREO__)) return a.render(e, t, i, n) if ('PerspectiveCamera' === t.type) (r = s.cameraL), (o = s.cameraR), e.updateMatrixWorld(), null === t.parent && t.updateMatrixWorld(), s.vrCameraUpdate(t) else { if ('OrthographicCamera' !== t.type) return DEBUG && console.error('Unsupported renderer: ', t.type) r = o = t } a.setScissorTest(!0), a.setScissor(0, 0, this.width / 2, this.height), a.setViewport(0, 0, this.width / 2, this.height), a.render.call(this, e, r, i, n), a.setScissor(this.width / 2, 0, this.width / 2, this.height), a.setViewport(this.width / 2, 0, this.width / 2, this.height), a.render.call(this, e, o, i, n), a.setScissorTest(!1) }), (this.__proto__ = { __proto__: a }) }), (h.prototype.vrCamera = function (e) { ;(this.type = 'StereoCamera'), (this._aspect = 1), (this._overlap = 0.064), (this.cameraL = new M.PerspectiveCamera()), this.cameraL.layers.enable(1), (this.cameraL.matrixAutoUpdate = !1), (this.cameraR = new M.PerspectiveCamera()), this.cameraR.layers.enable(2), (this.cameraR.matrixAutoUpdate = !1), (this.eyeRight = new M.Matrix4()), (this.eyeLeft = new M.Matrix4()), (this.vrCameraNeedsUpdate = !0), (window.vrCameraL = this.cameraL), Object.defineProperty(this, 'bananaAspect', { get: function () { return this._aspect }, set: function (e) { this._aspect !== e && (this.vrCameraNeedsUpdate = !0), (this._aspect = e) } }), Object.defineProperty(this, 'overlap', { get: function () { return this._overlap }, set: function (e) { this._overlap !== e && (this.vrCameraNeedsUpdate = !0), (this._overlap = e) } }), (this.vrCameraUpdate = function (e) { if ( ((this.vrCameraNeedsUpdate = !0), (this.vrCameraNeedsUpdate = this.vrCameraNeedsUpdate || this.bananaFov !== e.fov || this.bananaReal_aspect !== e.aspect * this.bananaAspect || this.bananaNear !== e.near || this.bananaFar !== e.far), this.vrCameraNeedsUpdate) ) { ;(this.vrCameraNeedsUpdate = !1), console.debug('vrCameraUpdate'), (this.bananaFocus = e.focus), (this.bananaFov = e.fov), (this.bananaReal_aspect = e.aspect * this.bananaAspect), (this.bananaNear = e.near), (this.bananaFar = e.far), console.debug(e.aspect), (this.bananaFocus = 10) var t, i, n = e.projectionMatrix.clone(), r = this.overlap / 2, o = (r * this.bananaNear) / this.bananaFocus, a = this.bananaNear * Math.tan((Math.PI / 180) * this.bananaFov * 0.5) ;(this.eyeLeft.elements[12] = -r), (this.eyeRight.elements[12] = r), (t = -a * this.bananaReal_aspect + o), (i = a * this.bananaReal_aspect + o), (n.elements[0] = (2 * this.bananaNear) / (i - t)), (n.elements[8] = (i + t) / (i - t)), this.cameraL.projectionMatrix.copy(n), (t = -a * this.bananaReal_aspect - o), (i = a * this.bananaReal_aspect - o), (n.elements[0] = (2 * this.bananaNear) / (i - t)), (n.elements[8] = (i + t) / (i - t)), this.cameraR.projectionMatrix.copy(n) } this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(this.eyeLeft), this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(this.eyeRight) }) }), (h.prototype.boluoGetTexture = function (e) { var t = new M.TextureLoader() return (t.crossOrigin = 'anonymous'), t.load(e) }), (h.prototype.updateScreenSize = function (e) { var t, i, n, r = !1 e && !e.resize && null != e.width && null != e.height ? ((i = e.width), (n = e.height), (r = !0), (t = 1)) : ((i = $('#player').width()), (n = $('#player').height()), e && e.resize && ((o = this.renderWidth), (a = this.renderHeight)), (i === o && n === a && !this.forceUpdateSize) || ((o = i), (a = n), (r = !0), (t = window.devicePixelRatio))), r && (this.setSize(i, n, t), (this.forceUpdateSize = !1)) }), (h.prototype.updateComponents = function () { for (var e = Math.min(1, this.updateClock.getDelta()), t = 0; t < this.updateListeners.length; t++) this.updateListeners[t].update(e) }), (h.prototype.suspend = function () { ;(this.started = !1), (this.suspendedObjects = this.scene.children.map( function (e) { return this.scene.remove(e), e }.bind(this) )), this.render() }), (h.prototype.resume = function () { this.suspendedObjects.forEach( function (e) { this.scene.add(e) }.bind(this) ), (this.suspendedObjects = []), (this.started = !0), b() }) var g, m, v, y, A, C, I, P, O, L, D, N, F, E, _, b = function () { this.started && (window.requestAnimationFrame(b), this.updateScreenSize(), this.updateComponents(), this.updateTextureMemory(), this.render(), this.emit(r.AfterRender)) } ;(h.prototype.getImageData = ((E = document.createElement('canvas')), (_ = E.getContext('2d')), function (e, t, i) { return (E.width === t && E.height === i) || ((E.width = t), (E.height = i)), _.drawImage(e, 0, 0, t, i), _.getImageData(0, 0, t, i) })), (h.prototype.initSizedTexture2D = function (e, t, i) { var n = this.renderer, r = n.context, o = n.state, a = new M.Texture(null) !(a.flipY = !1) !== i && (i = !1), (a.generateMipmaps = i) var s = n.paramThreeToGL(a.format), l = n.paramThreeToGL(a.type), c = n.properties.get(a), h = r.createTexture() o.bindTexture(r.TEXTURE_2D, h), r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL, a.flipY), r.texImage2D(r.TEXTURE_2D, 0, s, e, e, 0, s, l, null), (a.wrapS = t), (a.wrapT = t) var u = n.paramThreeToGL(t) return ( r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, u), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, u), i ? ((a.magFilter = M.LinearFilter), (a.minFilter = M.LinearMipMapLinearFilter), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, r.LINEAR_MIPMAP_NEAREST), r.generateMipmap(r.TEXTURE_2D)) : ((a.magFilter = M.LinearFilter), (a.minFilter = M.LinearFilter), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, r.LINEAR), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, r.LINEAR)), o.bindTexture(r.TEXTURE_2D, null), (c.__webglTexture = h), a ) }), (h.prototype.initSizedCubeMap = function (e, t) { var i = this.renderer, n = i.context, r = i.state, o = new M.CubeTexture([null, null, null, null, null, null]) ;(o.flipY = !1), (o.generateMipmaps = t) var a = i.paramThreeToGL(o.format), s = i.paramThreeToGL(o.type), l = i.properties.get(o), c = n.createTexture() r.bindTexture(n.TEXTURE_CUBE_MAP, c), n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL, o.flipY) for (var h = 0; h < 6; h++) n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X + h, 0, a, e, e, 0, a, s, null) return ( t ? ((o.magFilter = M.LinearFilter), (o.minFilter = M.LinearMipMapLinearFilter), n.texParameteri(n.TEXTURE_CUBE_MAP, n.TEXTURE_MAG_FILTER, n.LINEAR), n.texParameteri(n.TEXTURE_CUBE_MAP, n.TEXTURE_MIN_FILTER, n.LINEAR_MIPMAP_LINEAR), n.texParameteri(n.TEXTURE_CUBE_MAP, n.GENERATE_MIPMAP, n.TRUE), n.generateMipmap(n.TEXTURE_CUBE_MAP)) : ((o.magFilter = M.LinearFilter), (o.minFilter = M.LinearFilter), n.texParameteri(n.TEXTURE_CUBE_MAP, n.TEXTURE_MAG_FILTER, n.LINEAR), n.texParameteri(n.TEXTURE_CUBE_MAP, n.TEXTURE_MIN_FILTER, n.LINEAR)), r.bindTexture(n.TEXTURE_CUBE_MAP, null), (l.__image__webglTextureCube = c), o ) }), (h.prototype.deallocateCubeTexture = function (e) { var t = this.renderer, i = t.context, n = t.properties.get(e) i.deleteTexture(n.__image__webglTextureCube) }), (h.prototype.uploadTexture2D = function (e, t, i, n, r, o) { var a = this.renderer, s = a.context, l = a.state, c = a.properties.get(t) l.bindTexture(s.TEXTURE_2D, c.__webglTexture), s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, t.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, t.unpackAlignment), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_S, a.paramThreeToGL(t.wrapS)), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_WRAP_T, a.paramThreeToGL(t.wrapT)), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MAG_FILTER, a.paramThreeToGL(t.magFilter)), s.texParameteri(s.TEXTURE_2D, s.TEXTURE_MIN_FILTER, a.paramThreeToGL(t.minFilter)), s.texSubImage2D(s.TEXTURE_2D, 0, i, n, s.RGBA, s.UNSIGNED_BYTE, e), t.generateMipmaps && s.generateMipmap(s.TEXTURE_2D), l.bindTexture(s.TEXTURE_2D, null) }), (h.prototype.uploadTexture3D = function (e, t, i, n, r, o, a) { var s = this.renderer, l = s.context, c = s.state, h = s.properties.get(t) c.bindTexture(l.TEXTURE_CUBE_MAP, h.__image__webglTextureCube), l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL, t.flipY), l.texSubImage2D(r, 0, i, n, l.RGBA, l.UNSIGNED_BYTE, e), t.generateMipmaps && l.generateMipmap(l.TEXTURE_CUBE_MAP), c.bindTexture(l.TEXTURE_CUBE_MAP, null) }), (h.prototype.rebuildMipMaps2D = function (e) { var t = this.renderer, i = t.context, n = t.state t.properties.get(e), i.generateMipmap(i.TEXTURE_2D), n.bindTexture(i.TEXTURE_2D, null) }), (h.prototype.rebuildMipMaps3D = function (e) { var t = this.renderer, i = t.context, n = t.state, r = t.properties.get(e) n.bindTexture(i.TEXTURE_CUBE_MAP, r.__image__webglTextureCube), i.generateMipmap(i.TEXTURE_CUBE_MAP), n.bindTexture(i.TEXTURE_CUBE_MAP, null) }), (h.prototype.renderToCubeMap = ((P = !1), (F = N = D = L = O = null), function (e, t, i, n, r, o, a, s, l, c, h, u, d, p, f, g) { this.renderer.context, P || (((L = new M.OrthographicCamera(-0.5, 0.5, 0.5, -0.5, -200, 200)).position.z = 150), (O = new M.Scene()).add(L), (D = new M.ShaderMaterial({ uniforms: { tDiffuse: { type: 't', value: null }, alpha: { type: 'f', value: 1 } }, vertexShader: R.basicTextured.vertexShader, fragmentShader: R.basicTextured.fragmentShader, depthWrite: !1, depthTest: !1, side: M.DoubleSide })), (N = new M.PlaneBufferGeometry(1, 1)), ((F = new M.Mesh(N, D)).position.z = 0), O.add(F), (P = !0)) var m = N.getAttribute('uv') m.setDynamic(!0), (m.needsUpdate = !0) var v = m.array, y = r / i, A = o / n, C = a / i, I = s / n ;(v[0] = y), (v[1] = A + I), (v[2] = y + C), (v[3] = A + I), (v[4] = y), (v[5] = A), (v[6] = y + C), (v[7] = A) var E = N.getAttribute('position') E.setDynamic(!0), (E.needsUpdate = !0) var _ = E.array, b = l / t.width - 0.5, w = c / t.height - 0.5, T = h / t.width, x = u / t.height ;(_[0] = b), (_[1] = w + x), (_[3] = b + T), (_[4] = w + x), (_[6] = b), (_[7] = w), (_[9] = b + T), (_[10] = w), this.renderer.properties.get(e), (D.uniforms.tDiffuse.value = e), (D.blending = p || M.NoBlending), (D.transparent = !!f), null != g || (g = 1), (D.uniforms.alpha.value = g), (D.needUpdate = !0), (t.activeCubeFace = d), t.viewport.set(0, 0, t.width, t.height) var S = this.renderer.autoClear ;(this.renderer.autoClear = !1), this.renderer.render(O, L, t, !1), (this.renderer.autoClear = S) })), (h.prototype.copyCubeMap = ((g = !1), (C = A = y = v = m = null), (I = new M.Euler()), new M.Vector3(), function (e, t, i, n, r, o, a, s, l) { this.renderer, g || ((v = new M.OrthographicCamera(-1, 1, 1, -1, 0, 200)).position.set(0, 0, 0), (m = new M.Scene()).add(v), (y = new M.ShaderMaterial({ uniforms: { tDiffuse: { type: 't', value: null }, alpha: { type: 'f', value: 1 } }, vertexShader: R.copyCubeMap.vertexShader, fragmentShader: R.copyCubeMap.fragmentShader, depthWrite: !1, depthTest: !1, side: M.DoubleSide })), (A = new M.BoxGeometry(2, 2, 2)), (C = new M.Mesh(A, y)), m.add(C), (g = !0)) for (var c = 0; c < 6; c++) h.getCubeOrientationForCubeFace(c, I), C.rotation.copy(I), (C.matrixWorldNeedsUpdate = !0), C.updateMatrixWorld(), (y.uniforms.tDiffuse.value = e), (y.blending = a || M.NoBlending), (y.transparent = !!s), null != l || (l = 1), (y.uniforms.alpha.value = l), (y.needUpdate = !0), (t.activeCubeFace = c), t.viewport.set(0, 0, r, o), this.renderer.render(m, v, t, !1) })), (h.getLookAtForCubeFace = function (e, t) { switch (e) { case s.GL_TEXTURE_CUBE_MAP_POSITIVE_X: t.set(1, 0, 0) break case s.GL_TEXTURE_CUBE_MAP_NEGATIVE_X: t.set(-1, 0, 0) break case s.GL_TEXTURE_CUBE_MAP_POSITIVE_Y: t.set(0, 1, 0) break case s.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: t.set(0, -1, 0) break case s.GL_TEXTURE_CUBE_MAP_POSITIVE_Z: t.set(0, 0, 1) break case s.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: t.set(0, 0, -1) } }), (h.getCubeOrientationForCubeFace = function (e, t) { switch (e) { case s.GL_TEXTURE_CUBE_MAP_POSITIVE_X: t.set(0, -Math.PI / 2, 0) break case s.GL_TEXTURE_CUBE_MAP_NEGATIVE_X: t.set(0, Math.PI / 2, 0) break case s.GL_TEXTURE_CUBE_MAP_POSITIVE_Y: t.set(Math.PI / 2, Math.PI, 0) break case s.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: t.set(-Math.PI / 2, Math.PI, 0) break case s.GL_TEXTURE_CUBE_MAP_POSITIVE_Z: t.set(0, -Math.PI, 0) break case s.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: t.set(0, 0, 0) } }), (t.exports = h) }, { '../enum/GLCubeFaces': 25, '../enum/GLTextureType': 26, '../enum/SceneRendererEvents': 43, '../exception/BasicException': 55, '../exception/RendererCreationException': 57, '../settings': 166, '../shaders': 167, '../util/browser': 182, events: 202, three: 217 } ], 159: [ function (e, t, i) { 'use strict' function n(e) { ;(this.messenger = new a(e)), (this.clientKey = null) } var o = e('../util/ajax'), r = e('./PostMessageType'), a = e('./postmessage'), s = e('./VersionInfo'), l = e('events').EventEmitter, c = window.location.origin + '/api/v1/user/' ;((n.prototype = Object.create(l.prototype)).bindEvents = function () { this.messenger.on(r.ACTION, this.onMessageReceived.bind(this)) }), (n.prototype.waitForConnection = function () { return new Promise( function (t, i) { this.messenger.on( r.CONNECT, function (e) { this.onConnectionReceived(e).then(t.bind(this, e.sdkVersion), i.bind()) }.bind(this) ) }.bind(this) ) }), (n.prototype.onConnectionReceived = function (i) { return ( this.messenger.setTarget(i.source, i.origin), this.verifyConnection(i).then( function (e, t) { this.messenger.send({ type: r.ACCEPT, toId: i.fromId, warning: t }), (this.clientKey = e), this.messenger.removeAllListeners(r.CONNECT), this.bindEvents() }.bind(this), function (e) { this.messenger.send({ type: r.REJECT, toId: i.fromId, reason: e }), this.messenger.setTarget() }.bind(this) ) ) }), (n.prototype.verifyConnection = function (r) { return new Promise(function (e, t) { var i if (s.isDeprecated(r.sdkVersion)) i = '这个版本正在被弃用' else if (!s.isSupported(r.sdkVersion)) return t('不支持此版本的SDK') var n = { cache: !1, headers: { 'X-port-Application-Key': r.applicationKey, 'X-port-Referrer': r.origin } } o.get(c, n).done(e.bind(this, r.applicationKey, i)).fail(t.bind(this, 'key/referrer mismatch')) }) }), (n.prototype.onMessageReceived = function (t) { if (this.validateClientApplicationKey(t.applicationKey)) { var i = this ;(t.onDone = function (e) { ;(e.toId = t.fromId), (e.uid = t.uid), (e.type = r.RESPONSE), i.messenger.send(e) }), this.emit(r.ACTION, t) } }), (n.prototype.validateClientApplicationKey = function (e) { return this.clientKey === e }), (n.prototype.sendEvent = function (e, t) { this.messenger.send({ type: r.EVENT, eventType: e, eventData: t }) }), (t.exports = n) }, { '../util/ajax': 181, './PostMessageType': 160, './VersionInfo': 163, './postmessage': 165, events: 202 } ], 160: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ CONNECT: 'postmessage.connect', ACCEPT: 'postmessage.accept', REJECT: 'postmessage.reject', ACTION: 'postmessage.action', RESPONSE: 'postmessage.response', EVENT: 'postmessage.event' }) }, {} ], 161: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ MOVE: 'sdk.move', ENTER_PANO: 'sdk.enterpano', MODEL_LOADED: 'sdk.modelloaded' }) }, {} ], 162: [ function (e, t, i) { 'use strict' t.exports = Object.freeze({ FLY: 'transition.fly', FADEOUT: 'transition.fade', INSTANT: 'transition.instant' }) }, {} ], 163: [ function (e, t, i) { 'use strict' t.exports = { current: '1.0', supported: ['1.0'], deprecated: [], isSupported: function (e) { return -1 !== this.supported.indexOf(e) }, isDeprecated: function (e) { return -1 !== this.deprecated.indexOf(e) }, isValid: function (e) { return this.isSupported(e) || this.isDeprecated(e) } } }, {} ], 164: [ function (q, X, e) { ;(function (e) { 'use strict' function r(e, t, i) { e = e && e.toLowerCase().trim() var n = new C.UP.clone(), r = Math.PI / 3, o = Math.PI / 2 switch (e) { case 'left': i.copy(t), i.applyAxisAngle(n, o) break case 'right': i.copy(t), i.applyAxisAngle(n, -o) break case 'forwardleft': i.copy(t), i.applyAxisAngle(n, r) break case 'forwardright': i.copy(t), i.applyAxisAngle(n, -r) break case 'forward': default: i.copy(t) } return i } function o(e, t) { if (e) { var i = { pano: e, lookAtPoint: null, duration: null, maxDistanceOverride: null, skipWarpingCheck: !1 } this.player.flyToPano(i, function () { t && t({ success: !0, message: 'Transition complete.' }) }) } else M.warn('Showcase -> clickPanoObject: Unable to find pano.'), t && t({ success: !1, error: 'Unable to find pano.' }) } function a(e, t) { t.copy(C.FORWARD), e.getDirection(t) } function c(i) { return { panos: i.panos.list.map(function (e) { var t = y.getCubemapUrls(i.urls, e.id, 'high')[A.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z] return { uuid: e.id, aligned: e.alignmentType === g.ALIGNED, neighbourUUIDs: e.neighbourUUIDs.slice(), position: (function (e) { return e.alignmentType !== g.ALIGNED ? null : { x: e.position.x, y: e.position.y, z: e.position.z } })(e), rotation: (function (e) { var t = new h.Euler().setFromQuaternion(e.quaternion, 'YXZ') return { x: h.Math.radToDeg(t._x), y: h.Math.radToDeg(t._y), z: h.Math.radToDeg(t._z) } })(e), thumbnail: t } }) } } var t, l, i, h = q('three'), u = q('./ApiHost'), n = q('../util/logger'), d = q('../util/common'), s = q('../util/math'), p = q('../enum/ModelManagerEvents'), f = q('./PostMessageType'), g = q('../enum/AlignmentType'), m = q('../enum/Direction'), v = q('./TransitionStyles'), y = q('../util/panorama'), A = q('../enum/GLCubeFaces'), C = q('../enum/Vectors'), I = q('../enum/Viewmode'), E = q('../enum/WarpStyle'), _ = (q('../enum/Keys'), q('../enum/PlayerEvents')), b = q('../sdk/SdkEvents'), w = ((C = q('../enum/Vectors')), q('../enum/ControlEvents')), T = q('../enum/RenderLayers'), x = (q('../constants'), q('../settings')), S = q('../lib/jpeg_encoder'), M = new n(e), R = ((N.active = !1), (N.angle = 0), (N.angleTravelled = 0), (N.playerDirection = new h.Vector3()), (N.lastFacingDirection = new h.Vector3()), (N.onDone = null), (N.player = null), (N.start = function (e, t, i, n) { ;(N.active = !0), e && t && (t = 0), (N.angle = e || t), (N.xAngle = e), (N.yAngle = t), (N.angleTravelled = 0), N.playerDirection.copy(i.mode === I.FLOORPLAN ? C.UP : C.FORWARD), i.getDirection(N.playerDirection), N.lastFacingDirection.copy(N.playerDirection), N.projectVectors(), (N.onDone = n), (N.player = i), N() }), (N.projectVectors = function () { N.xAngle && (N.playerDirection.projectOnPlane(C.UP), N.lastFacingDirection.projectOnPlane(C.UP)) }), N), P = ((i = new h.Vector3()), function (e) { e ? (i.copy(e.position), i.add(e.discPosition), s.projectPositionToCanvas(i, this.player.camera, i), this.click(i.x, i.y)) : M.warn('Showcase -> clicktagObject: Unable to find tag.') }), O = ((l = new h.Vector3()), function (e) { var t = this.player.getDirection() l.copy(t) var i = l.y ;(l.y = 0), l.normalize() var n = h.Math.radToDeg(l.angleTo(t)) * (i < 0 ? -1 : 1) if (this.player.mode !== I.DOLLHOUSE && this.player.mode !== I.PANORAMA) return 0 !== e && M.warn('Cannot rotate in y direction when in ' + this.player.mode + ' mode'), 0 this.player.mode === I.DOLLHOUSE && (n = -n) var r = function () { return this.player.mode === I.PANORAMA ? x.insideLookLimitUp : this.player.mode === I.DOLLHOUSE ? 90 - h.Math.radToDeg(x.dollhouseDefault.minPolarAngle) : null }.call(this) - 0.1, o = function () { return this.player.mode === I.PANORAMA ? x.insideLookLimitDown : this.player.mode === I.DOLLHOUSE ? 90 - h.Math.radToDeg(x.dollhouseDefault.maxPolarAngle) : null }.call(this) + 0.1, a = n + e r < a ? (a = r) : a < o && (a = o) var s = a - n return 0 < e && s < 0.01 && (s = 0), e < 0 && -0.01 < s && (s = 0), s }), L = ((t = new h.Euler()), function (e) { return ( t.setFromQuaternion(e.quaternion, 'YXZ'), { position: { x: e.position.x, y: e.position.y, z: e.position.z }, rotation: { x: h.Math.radToDeg(t.x), y: h.Math.radToDeg(t.y), z: 0 }, pano: e.currentPano ? e.currentPano.id : null, mode: e.mode } ) }), D = null function N() { N.playerDirection.copy(N.player.mode === I.FLOORPLAN ? C.UP : C.FORWARD), N.player.getDirection(N.playerDirection), N.projectVectors() var e = N.playerDirection.angleTo(N.lastFacingDirection) ;(N.angleTravelled += Math.abs(e)) >= Math.abs(N.angle) ? ((N.active = !1), N.onDone && (0, N.onDone)()) : (N.lastFacingDirection.copy(N.playerDirection), window.setTimeout(N, 4)) } X.exports = { init: function (e, t, i, n, r) { Y.init(e, t, i, r), (D = new Promise( function (e, t) { i.on(_.Ready, function () { e() }) }.bind(this) )) var o = new u(window), a = o.waitForConnection() a.then(function (e) { o.on(f.ACTION, Y.onMessageReceive.bind(Y)) }) var s, l = ((s = Date.now()), function () { if (!(Date.now() - s < 100)) { var e = L(i) o.sendEvent(b.MOVE, { state: e }), (s = Date.now()) } }) i.on(_.Move, l), i.on(_.ViewChanged, l), n.on(p.ActiveModelChanged, function (e) { function t(e) { var t, i = e.newPano.id e.oldPano && (t = e.oldPano.id), i !== t && o.sendEvent(b.ENTER_PANO, { oldPano: t, newPano: i }) } var i = e.model, n = e.oldModel ;(Y.model = i), a.then(function () { o.sendEvent(b.MODEL_LOADED, { metadata: c(i) }) }), n && n.panos.forEach(function (e) { e.removeEventListener('enter', t) }), i.panos.forEach(function (e) { e.on('enter', t) }) }) } } var F, B, V, k, U, H, z, G, W, j, Y = { director: null, player: null, controls: null, sceneRenderer: null, model: null, init: function (e, t, i, n) { ;(this.director = e), (this.player = i), (this.controls = t), (this.sceneRenderer = n) }, handleToObject: {}, objectToHandle: {}, handleCount: 0, onMessageReceive: function (e) { if (e) { var t = e.targetFunction, i = e.params, n = e.onDone t && this[t] && this[t](i, n) } }, waitForInit: function (e, t) { D.then( t.bind({ success: !0, message: 'Init complete.' }) ) }, moveToPano: ((W = new h.Euler(0, 0, 0, 'YXZ')), (j = new h.Quaternion()), function (e, t) { var i = e.pano, n = e.rotation, r = e.transition if (!this.model) return t({ success: !1, error: 'The model has not been loaded yet' }) var o = this.model.panos.get(i) if (!o) return t({ success: !1, error: i + ' does not exist in this model' }) if (!n) return t({ sucess: !1, erorr: n + ' is not a valid rotation' }) W.set(h.Math.degToRad(n.x || 0), h.Math.degToRad(n.y || 0), h.Math.degToRad(n.z || 0), 'YXZ'), console.log(n.z) var a = { success: !0, message: i } if (r === v.FADEOUT) j.setFromEuler(W), this.player.warpToPano(o, j, null, null, E.BLACK, null, null, t.bind(this, a)) else { var s, l r === v.INSTANT && (l = s = 0) var c = C.FORWARD.clone().applyEuler(W).add(o.position) this.player.flyToPano( { pano: o, lookAtPoint: c, duration: s, aimDuration: l }, t.bind(this, a) ) } }), moveInDirection: function (e, t) { var i = e.direction return void 0 === m[i] ? (M.warn('Showcase -> moveInDirection: Cannot move in invalid direction.'), void ( t && t({ success: !1, error: 'Invalid direction.' }) )) : void this.player.flyLocalDirection(C[i].clone()).then(function (e) { t( e ? { success: !0, message: 'moved ' + i } : { success: !1, error: 'Cannot move in direction: ' + i } ) }) }, getPose: function (e, t) { return ( this.player.camera.position, new h.Euler().setFromQuaternion(this.player.camera.quaternion, 'YXZ'), t({ success: !0, message: L(this.player) }) ) }, takeScreenShot: ((z = new h.PerspectiveCamera()), (G = new h.WebGLRenderTarget()), function (e, t) { if (!e.resolution) return t({ success: !1, error: 'An invalid resolution was specified' }) if (-1 === e.resolution.width || -1 === e.resolution.height) { var i = this.sceneRenderer.renderer.getSize() ;(e.resolution.width = i.width), (e.resolution.height = i.height) } z.layers.set(T.DEFAULT), e.visibleObjects && (e.visibleObjects.showtags && z.layers.enable(T.TAG), e.visibleObjects.showPucks && z.layers.enable(T.PANOMARKERS), e.visibleObjects.showReticule && z.layers.enable(T.RETICULE)) var n = e.resolution.width, r = e.resolution.height, o = n / r z.position.copy(this.sceneRenderer.camera.position), z.quaternion.copy(this.sceneRenderer.camera.quaternion), z.projectionMatrix.copy(this.player.camera.projectionMatrix), (z.projectionMatrix.elements[0] = this.player.camera.projectionMatrix.elements[5] / o), G.setSize(n, r), this.sceneRenderer.renderer.render(this.sceneRenderer.scene, z, G) var a = new Uint8Array(n * r * 4) this.sceneRenderer.renderer.readRenderTargetPixels(G, 0, 0, n, r, a) var s = S.encode( { data: a, width: n, height: r, heading: 180, pitch: 0 }, { quality: 75, flipY: !0 } ) t({ success: !0, message: 'data:image/jpg;base64,' + d.uint8ToBase64(s.data) }) }), findRankedPano: ((U = new h.Vector3()), (H = new h.Vector3()), function (e, t) { a(this.player, H), r(t, H, U) var i = this.player.rankedPanoInDirection(e, U) if (i) { var n = this.objectToHandle[i.id] return n || ((this.objectToHandle[i.id] = n = this.handleCount++), (this.handleToObject[n] = i)), n } return M.warn('Showcase -> findRankedPano: Unable to find nearby pano.'), -1 }), findRankedtag: ((V = new h.Vector3()), (k = new h.Vector3()), function (e, t) { a(this.player, k), r(t, k, V) var i = this.player.rankedtagInDirection(e, V) if (i) { var n = this.objectToHandle[i.sid] return n || ((this.objectToHandle[i.sid] = n = this.handleCount++), (this.handleToObject[n] = i)), n } return M.warn('Showcase -> findRankedtag: Unable to find nearby tag.'), -1 }), clickNearesttag: function (e) { this.clickRankedtag(0, e) }, clickRankedtag: function (e, t) { var i = function (e, t) { var i = this.findRankedtag(e, t) return 0 <= i ? this.handleToObject[i] : (M.warn('Showcase -> findRankedtagObject: Unable to find nearby tag.'), null) }.call(this, e, t) i && P.call(this, i) }, clickNearestPano: function (e, t) { this.clickRankedPano(0, e, t) }, clickRankedPano: function (e, t, i) { var n = function (e, t) { var i = this.findRankedPano(e, t) return 0 <= i ? this.handleToObject[i] : (M.warn('Showcase -> findRankedPanoObject: Unable to find nearby pano.'), null) }.call(this, e, t) n ? o.call(this, n, i) : i(null) }, clickPano: function (e, t) { var i = this.handleTable[e] i ? o.call(this, i, t) : t(null) }, rotateDirection: function (e, t) { var i = e.direction, n = e.angle if (!R.active) { var r = 0, o = 0, a = 0, s = 0 if (!n || isNaN(n)) return ( M.warn('Showcase -> rotateDirection: Invalid rotation angle.'), void ( t && t({ success: !1, error: 'Invalid rotation angle.' }) ) ) if (this.player.mode === I.TRANSITIONING) return ( M.warn('Automation -> rotateDirection: Cannot rotate while transitioning'), void ( t && t({ success: !1, error: 'Cannot rotate while transitioning' }) ) ) if (i === m.RIGHT || i === m.LEFT) i === m.RIGHT && (n = -n), (r = 0 < n ? -1 : 1), (a = n) else { if (i !== m.UP && i !== m.DOWN) return ( M.warn('Showcase -> rotateDirection: Invalid direction for rotation: ' + i), void ( t && t({ success: !1, error: 'Invalid direction for rotation.' }) ) ) if (this.player.mode === I.FLOORPLAN) return ( M.warn('Showcase -> rotateDirection: Cannot rotate ' + i + ' in floorplan mode'), void ( t && t({ success: !1, error: 'Cannot rotate ' + i + ' in floorplan mode' }) ) ) if ((i === m.DOWN && (n = -n), 0 === (n = O.call(this, n)))) return ( M.warn('Showcase -> rotateDirection: Already at maximum rotation in direction: ' + i), void ( t && t({ success: !1, error: 'Already at maximum rotation in direction: ' + i }) ) ) ;(o = 0 < n ? 1 : -1), (s = n) } var l = n ;(n = h.Math.degToRad(n)), (a = h.Math.degToRad(a)), (s = h.Math.degToRad(s)) var c = this.controls.activeControl c.startRotating(r, o), R.start(a, s, this.player, function () { c.stopRotating(!0), t && t({ success: !0, message: 'Rotated ' + l.toFixed(2) + '° in direction: ' + e.direction }) }) } }, rotate: ((F = new h.Vector3()), (B = new h.Vector3()), function (e, t) { var i = e.xAngle, n = e.yAngle if (!R.active) { if (((i = i || 0), (n = n || 0), isNaN(i) || isNaN(n))) return ( M.warn('Showcase -> rotate: Invalid rotation angle.'), void ( t && t({ success: !1, error: 'Invalid rotation angle.' }) ) ) if (this.player.mode === I.TRANSITIONING) return ( M.warn('Automation -> rotate: Cannot rotate while transitioning'), void ( t && t({ success: !1, error: 'Cannot rotate while transitioning' }) ) ) Math.abs(i) < 0.01 && (i = 0), Math.abs(n) < 0.01 && (n = 0) var r = n n = O.call(this, n) var o = 0 < r ? 'UP' : 'DOWN' if (!(i = -i) && r && !n) return ( M.warn('Showcase -> rotate: Already at maximum rotation in direction: ' + o), void ( t && t({ success: !1, error: 'Already at maximum rotation in direction: ' + o }) ) ) n < r && M.warn('Showcase -> rotate: Reached maximum rotation in direction: ' + o) var a = n ;(n = h.Math.degToRad(n)), (i = h.Math.degToRad(i)), F.copy(this.player.mode === I.FLOORPLAN ? C.UP : C.FORWARD), this.player.getDirection(F), B.copy(F).applyAxisAngle(C.UP, i), B.applyAxisAngle(C.RIGHT, n) var s = (F.angleTo(B), 0 < i ? -1 : i < 0 ? 1 : 0), l = 0 < n ? 1 : n < 0 ? -1 : 0 Math.abs(i) > Math.abs(n) ? (l *= Math.abs(n / i)) : Math.abs(n) > Math.abs(i) && (s *= Math.abs(i / n)) var c = this.controls.activeControl c.startRotating(s, l), R.start(i, n, this.player, function () { c.stopRotating(!0), t && t({ success: !0, message: 'Rotated ' + e.xAngle.toFixed(2) + '° horizontally, ' + a.toFixed(2) + '° vertically' }) }) } }), panCamera: function (e, i) { function t(e) { switch ((r.removeAllListeners(w.AutoPanComplete), r.removeAllListeners(w.AutoPanInterrupt), r.removeAllListeners(w.AutoPanClamped), e)) { case w.AutoPanInterrupt: i({ success: !0, message: 'Camera panning interrupted.' }) break case w.AutoPanClamped: if (r.autoPanPosition.x !== n.x || r.autoPanPosition.z !== n.z) { if (Math.abs(this.player.position.x - r.autoPanPosition.x) < 0.01 && Math.abs(this.player.position.z - r.autoPanPosition.z) < 0.01) return void i({ success: !1, error: 'Already at edge of current model bounds.' }) var t = 'The view point is outside the bounds for the current model. ' ;(t += 'The view point was clamped to ' + o(r.target.x, r.target.z)), console.warn(t) } case w.AutoPanComplete: i({ success: !0, message: 'Panned camera to position ' + o(r.autoPanPosition.x, r.autoPanPosition.z) }) } } if (this.player.mode !== I.DOLLHOUSE && this.player.mode !== I.FLOORPLAN) return i({ success: !1, error: 'Camera panning is not available in the current mode: ' + this.player.mode }) var n = e.position, r = this.player.control r.setAutoPanPosition(n.x, n.z), (r.autoPan = !0) var o = function (e, t) { return '(' + e.toFixed(2) + ', ' + t.toFixed(2) + ')' } r.on(w.AutoPanComplete, t.bind(this, w.AutoPanComplete)), r.on(w.AutoPanInterrupt, t.bind(this, w.AutoPanInterrupt)), r.on(w.AutoPanClamped, t.bind(this, w.AutoPanClamped)) }, click: function (e, t) { var i = e.x, n = e.y !0 === e.percentage && ((i = (i / 100) * $('#player').width()), (n = (n / 100) * $('#player').height())), this.player.handleInputStart(i, n), this.player.updateIntersect(), this.player.handleInputEnd(i, n) }, mouseOver: function (e, t) { var i = e.x, n = e.y !0 === e.percentage && ((i = (i / 100) * $('#player').width()), (n = (n / 100) * $('#player').height())), this.player.handleInputMove(i, n), this.player.updateIntersect() }, moveToMode: function (e, t) { function i(e) { t( e ? { success: !1, error: 'Failed to load new mode: ' + e } : { success: !0, message: 'Moved to new mode: ' + n } ) } var n = e.mode n === I.PANORAMA || n === I.DOLLHOUSE || n === I.FLOORPLAN ? this.director.changeMode(n).then( function () { i() }, function (e) { i(e) } ) : t({ success: !1, error: 'Invalid mode selection' }) } } }).call(this, '/js/sdk/automation.js') }, { '../constants': 8, '../enum/AlignmentType': 17, '../enum/ControlEvents': 21, '../enum/Direction': 22, '../enum/GLCubeFaces': 25, '../enum/Keys': 30, '../enum/ModelManagerEvents': 33, '../enum/PlayerEvents': 40, '../enum/RenderLayers': 41, '../enum/Vectors': 50, '../enum/Viewmode': 51, '../enum/WarpStyle': 52, '../lib/jpeg_encoder': 94, '../sdk/SdkEvents': 161, '../settings': 166, '../util/common': 185, '../util/logger': 189, '../util/math': 190, '../util/panorama': 191, './ApiHost': 159, './PostMessageType': 160, './TransitionStyles': 162, three: 217 } ], 165: [ function (e, t, i) { 'use strict' function n(e) { ;(this.sourceWindow = e), (this.targetWindow = null), (this.targetOrigin = null), (this.id = Math.floor(1e5 * Math.random())), this.bindEvents() } var r = e('./PostMessageType'), o = e('events').EventEmitter ;((n.prototype = Object.create(o.prototype)).bindEvents = function () { this.sourceWindow.addEventListener('message', this.onPostmessageReceived.bind(this)) }), (n.prototype.setTarget = function (e, t) { ;(this.targetWindow = e), (this.targetOrigin = t) }), (n.prototype.onPostmessageReceived = function (e) { var t = e.origin || e.originalEvent.origin, i = e.source switch (e.data.type) { case r.CONNECT: break case r.RESPONSE: if (this.id !== e.data.toId) return default: if (!this.validateMessageOrigin(t)) return } var n = e.data ;(n.source = i), (n.origin = t), (n.timestamp = Date.now()), this.emit(e.data.type, n) }), (n.prototype.validateMessageOrigin = function (e) { return '*' === this.targetOrigin || e === this.targetOrigin }), (n.prototype.send = function (e) { this.targetWindow && this.targetOrigin && ((e.fromId = this.id), this.targetWindow.postMessage(e, this.targetOrigin)) }), (t.exports = n) }, { './PostMessageType': 160, events: 202 } ], 166: [ function (e, t, i) { 'use strict' var n = e('three'), r = e('./util/browser'), o = e('./enum/Viewmode'), a = e('./enum/VROption'), s = e('./enum/Colors'), l = e('./enum/WarpStyle'), c = e('./util/easing'), h = e('./util/common'), u = e('./util/showcase'), d = e('./constants'), p = { debug: !1, version: '2.25.6-0-gd87e5b1', languageTag: r.valueFromHash('lang', null), pageTitle: '四维虚拟漫游', authorizationHeader: u.getAuthorizationHeader(), autoplay: r.valueFromHash('play', !1) || !r.inIframe(), logLevel: r.valueFromHash('log', 2), skyboxRadius: 2500, modelBoundsPadding: 5, showNeighbors: !1, brand: r.valueFromHash('brand', !0), showHighlights: r.valueFromHash('hhl', !0) && r.valueFromHash('hr', 1), startHighlights: r.valueFromHash('hl', -1), specialEdition: r.valueFromHash('bn', 0), useWheel: r.valueFromHash('wh', !0), crossOrigin: 'anonymous', fancierTransition: !1, wireframe: !1, skyboxWireframe: !1, modelAlpha: 1, highlightPanoSelection: !1, showSweeps: !0, showSkyboxes: !1, showMesh: !0, showFloors: !1, showFloorDuration: 300, showFloorDelay: 300, hideFloorDuration: 300, hideFloorDelay: 0, reticuleOpacityTransitionTime: 250, reticuleColor: window.DATA.mouseMarkerColor || s.newBlue, markerOpacityTransitionTime: 500, guiAnimationSpeed: 250, highlightAnimationDuration: 500, modelComponentLoadSpinnerDelay: 150, captureErrors: !1, maxMobileTextures: 6, minimalMemoryMode: r.valueFromHash('m3', r.isMobile()), startupFlyinDelay: 3e3, dollhouseDefault: { minDistance: 1, //15, //编辑页面给近一些 maxDistance: 50, minPolarAngle: n.Math.degToRad(10), maxPolarAngle: n.Math.degToRad(90) }, hideReticuleTimeout: 1e3, analytics: { inactivityThreshold: 30, sessionTrackingRate: 0.15, maxTrackedErrors: 20, sessionDurationPingFrequency: 10, sessionDurationTimeout: 15 }, flydown: { movementEasing: 'easeInOutQuad', movementDelay: 0.001, rotationEasing: 'easeInOutQuad', rotationDelay: 0.5, modelTextureDelay: 0.75, skyboxDelay: 0.75 }, transition: { flySpeed: 0.001, flyTime: 750, flytimeMaxDistanceThreshold: 5, flytimeDistanceMultiplier: 150, aimTime: 1500, aimSlowFactor: 1.5, blur: 0.8, movementEasing: 'easeInOutQuad', blendEasing: 'easeInOutQuad', fastForwardFactor: 4 }, show360Views: { enabled: !0, transitionTime: 1e3 }, quickstart: { enabled: 1 === r.valueFromHash('qust', 0) || 1 === r.valueFromHash('qs', 0), animation: 1400, showTextDelay: 500, fadeOutDelay: 3e3, fovChange: 10 }, appConfig: { webvr_version: null, segment_key: null, embedly_key: null, branch_key: null, keen_write_key: null, keen_project_id: null }, vr: { enabled: !0, allowWebVR: !1, option: r.valueFromHash('vr', a.CONTEXTUAL) }, share: { enabled: !r.valueFromHash('mls', 0) && r.valueFromHash('brand', !0) }, input: { longTapThreshold: 200, moveToleranceNDC: 0.01, //.08, touchMoveThreshold: 25 }, help: { modalStayDuration: 600 }, immersive: { timeToShowAgain: 1250, uiStayDuration: 600 }, tourInteraction: { disabled: '0' === r.valueFromHash('tourcta', null), showPauseButton: 1e3, showModal: 1500, allowNextClick: 200, largeModal: '1' === r.valueFromHash('tourcta', null), smallModal: '2' === r.valueFromHash('tourcta', null) }, labels: { enabled: !1, hideUntilStart: !0, fadeInDuration: 250, fadeInDelay: 250, fadeOutDuration: 250, fadeOutDelay: 0, zoomHideThreshhold: { mobile: r.isSmallScreen() ? 0.45 : 0.6, desktop: 2 }, zoomTruncateThreshhold: { mobile: r.isSmallScreen() ? 0.35 : 0.45, desktop: 0.85 }, minLengthForTruncate: 16, truncateLength: 12, truncateSuffix: '...' }, tags: { enabled: r.valueFromHash('mt', 1), startup: { hideUntilStart: !0, fadeInDuration: 500, fadeInDelay: 100 }, visibility: { anyDistance: !0, visibleDistance: 8, cameraClearance: 0.1, alphaTestLevel: 0.05, hideViaFloor: !0, hideOffScreenDisc: !1, hideOffScreenObject: !1 }, disc: { opacity: 1, disabledOpacity: 0.5, scale: { nearBound: 1.5, farBound: 4.8, linkFarBound: !1, linkPercent: 40, maxSize: 80, minSize: 40, baseViewportSize: 800, responsiveness: 100 } }, pole: { enabled: !0, height: 0.5, width: 2, opacity: 0.5, color: 'white' }, navigate: { nearestPano: !0, lineOfSight: !0, reactivate: !0, aimAt: 'disc', tiltTolerance: 25, rotateSpeedFactor: 0.6 } }, path: { color: window.DATA.floorMarkerColor || s.newBlue, colorUp: s._desat(s.newBlue, 0.5), colorDown: s._darken(s.newBlue, 0.35), opacity: 0.5, style: 'ribbon', height: 0.025, ribbonWidth: 0.24, outsideHeight: 0.5, waypointRadius: 0.5, waypointIndoorRadius: 0.24, waypointPulse: 1e3, typ: l.BLACK, meshFree: r.valueFromHash('mf', 1), mapGuides: r.valueFromHash('guides', !0), fadeInTime: 400, fadeOutTime: 300 }, warp: { nearPanoDist: 0.1, matchCam: !1, blur: 0.33, fastTime: 1500, teleportTime: 1500, //瞬间过渡的时间 flytimeDistanceMultiplier: 150, //add flyTime: 750, //add outsideTime: 2e3, lookAheadMax: 0.3, lookAheadDist: 2.5, softPushDist: 0.37, softPushEnd: 0.3, softBendAngle: 8, softBendTilt: 4, softBendEnd: 0.3, doBurns: !0, burnsAngle: 8, minBurnsAngle: 35, minDownAngle: -35, maxTurnPerSec: 280, maxAimPerSec: 35, minRotation: 12, maxAimRotation: 33.2, turnFriction: 0.2, flySpeed: 0.01, minWarpTime: 1200, warpInterruptionRedirectTime: 500, tourStepDelay: r.valueFromHash('st', 0), walkDelay: 0, walkMaxDist: 50, walkMinDist: 0.8, walkSlideShowThreshhold: 3e3, walkExtraPanosDistance: 0.4, timePerMeter: 1200, motionLeadTime: 5e3, movementEasing: 'easeInOutQuad', blendEasing: 'easeInOutQuad', showBunny: !1, loop: r.valueFromHash('lp', !1), auto: r.valueFromHash('ts', -1), eOrder: 'YXZ', stepFactor: 0.25, brakeStrength: 2, minBrakeAngle: 0.1, maxBrakeAngle: 1.8, climbEffort: 4 }, rotationFriction: 0.05, rotationAccelerationInside: 4.5, rotationAccelerationOutside: 0.15, rotationAfterMoveMultiplier: 40, rotationAfterMoveHistoryCount: 5, panFriction: 0.09, panAccelerationOutside: 60, onload: r.valueFromHash('onload', o.PANORAMA), zoomNearLimit: 0.1, zoomFarLimit: 50, navigation: { panoScores: !1, mouseDirection: !0, filterStrictness: 0.75, angleFactor: -30, directionFactor: 10, distanceFactor: -1, optionalityFactor: 3 }, sdkInit: !1, secretPanelWord: [38, 38, 40, 40, 37, 39, 37, 39, 66, 65], console: r.valueFromHash('console', !1), noMeshFloorPositionOffset: new n.Vector3(0, -1.2, 0), panoramaNeighbourMaxDistance: 5, panoFloorClickRadius: 0.35, showScreenshotLocations: !1, showAxis: !1, showNeighbourRaycasts: !1, colorMarkerOnLoad: !1, colorMarkerByFloor: !1, tiling: { panoPreRenderRepeatDelay: 2500, panoPreRenderDelay: 500, preRenderTourPanos: r.valueFromHash('tileprerender', 0), tilingFlagNames: ['usetiles', 'tiles'], maxNavPanoQuality: r.valueFromHash('maxtileq', null), maxZoomPanoQuality: r.valueFromHash('maxztileq', null), overlayStyle: r.valueFromHash('tileoverlay', 0), uploadIntervalDelay: r.valueFromHash('tileupdelay', 10), initialIntervalDelay: r.valueFromHash('itiledelay', 0), maxNonBaseUploadsPerFrame: r.valueFromHash('maxnbtpf', 2), maxBaseUploadsPerFrame: r.valueFromHash('maxbtpf', 6), customCompression: r.valueFromHash('tilecustcomp', 0), mobileHighQualityOverride: 1, allowUltraHighResolution: !0 }, zoom: { enabled: !0, forceOff: r.valueFromHash('nozoom', 0), overridemax: r.valueFromHash('maxzoom', null), overridemin: r.valueFromHash('minzoom', null), max: d.highQualityMaxZoom, min: 1, transitionStyle: r.valueFromHash('zoomtrans', 1), activationThreshold: 1.1, restoreTime: 500 }, profiling: { enabled: r.valueFromHash('mem', !1) } } ;(p = h.deepExtend(p, d, { insideFOV: r.valueFromHash('fov', d.insideFOV), insideFOVMax: r.valueFromHash('fovmax', d.insideFOVMax), panorama: { transitionTime: 1e3, modelAlpha: 0, modelAlphaDelay: p.flydown.modelTextureDelay, modelAlphaLength: 1, skyboxOpacity: 1, skyboxOpacityDelay: p.flydown.skyboxDelay, skyboxOpacityLength: 0.9, fovLength: 1, fovDelay: 0, cameraMatrixDuration: 0.8, cameraMatrixDelay: 0, cameraMatrixEase: c.easeInCubic, reticuleOpacity: 1, markerOpacity: 0.3, markerOpacityOnHover: 1 }, dollhouse: { transitionTime: 1e3, modelAlpha: 1, modelAlphaDelay: 0, modelAlphaLength: 1 - p.flydown.modelTextureDelay, skyboxOpacity: 0, skyboxOpacityDelay: 0, skyboxOpacityLength: 1 - p.flydown.skyboxDelay, fovLength: 1, fovDelay: 0, cameraMatrixDuration: 0.8, cameraMatrixDelay: 0.3, cameraMatrixEase: c.easeInCubic, reticuleOpacity: 1, markerOpacity: 0, markerOpacityOnHover: 0 }, floorplan: { transitionTime: 1e3, modelAlpha: 1, modelAlphaDelay: 0, modelAlphaLength: 1 - p.flydown.modelTextureDelay, skyboxOpacity: 0, skyboxOpacityDelay: 0, skyboxOpacityLength: 1 - p.flydown.skyboxDelay, fovLength: 1, fovDelay: 0, cameraMatrixDuration: 0.5, cameraMatrixDelay: 0, cameraMatrixEase: c.easeOutCubic, reticuleOpacity: 1, markerOpacity: 0, markerOpacityOnHover: 0, cameraHeight: 50 }, transitioning: { reticuleOpacity: 0, markerOpacity: 0.3, markerOpacityOnHover: 1 }, 'floorplan-dollhouse': { rotationDelay: 0, rotationDuration: 1 }, 'floorplan-panorama': { rotationDelay: 0.5, rotationDuration: 1 }, 'dollhouse-panorama': { rotationDelay: 0.5, rotationDuration: 1 }, 'dollhouse-floorplan': { rotationDelay: 0, rotationDuration: 1, cameraMatrixDuration: 1.05, cameraMatrixDelay: 0.5 }, 'panorama-dollhouse': { rotationDelay: 0, rotationDuration: 0.5 }, 'panorama-floorplan': { transitionTime: 1500, rotationDelay: 0, rotationDuration: 0.5 } })).path.meshFree && (p.path.typ = l.WALK), (p.zoom.max = p.zoom.overridemax || p.zoom.max), (p.zoom.min = p.zoom.overridemin || p.zoom.min), (window._settings = t.exports = p) }, { './constants': 8, './enum/Colors': 19, './enum/VROption': 47, './enum/Viewmode': 51, './enum/WarpStyle': 52, './util/browser': 182, './util/common': 185, './util/easing': 186, './util/showcase': 193, three: 217 } ], 167: [ function (e, t, i) { 'use strict' var n = e('three'), r = e('./settings'), o = 'precision highp float;\nprecision highp int;\n\nuniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 cameraPosition;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n', a = 'precision highp float;\nprecision highp int;\n\nuniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n' t.exports = { basicTextured: { uniforms: { tDiffuse: { type: 't', value: null }, alpha: { type: 'f', value: 1 } }, vertexShader: 'varying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}', fragmentShader: 'varying vec2 vUv;\nuniform float alpha;\nuniform sampler2D tDiffuse;\nvoid main() {\n vec4 texColor = texture2D(tDiffuse, vUv);\n gl_FragColor = vec4(texColor.rgb, texColor.a * alpha);\n}' }, copyCubeMap: { uniforms: { tDiffuse: { type: 't', value: null }, alpha: { type: 'f', value: 1 } }, vertexShader: 'varying vec3 vWorldPos;\nvoid main() {\n vWorldPos = vec3(-position.x, -position.y, position.z);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}', fragmentShader: 'varying vec3 vWorldPos;\nuniform float alpha;\nuniform samplerCube tDiffuse;\nvoid main() {\n vec4 texColor = textureCube(tDiffuse, vWorldPos);\n gl_FragColor = vec4(texColor.rgb, texColor.a * alpha);\n}' }, cube: { uniforms: { map: { type: 't', value: null }, opacity: { type: 'f', value: 1 } }, vertexShader: o + 'varying vec3 vWorldPosition;\n\nvoid main() {\n vWorldPosition = position;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n', fragmentShader: a + 'uniform samplerCube map;\nuniform float opacity;\n\nvarying vec3 vWorldPosition;\n\nvoid main() {\n vec4 color = textureCube( map, vec3( -vWorldPosition.x, vWorldPosition.yz ) );\n gl_FragColor = vec4(color.rgb, opacity);\n}\n' }, model: { uniforms: { map: { type: 't', value: null }, modelAlpha: { type: 'f', value: r.modelAlpha }, opacity: { type: 'f', value: 1 }, progress: { type: 'f', value: 0 }, blackout: { type: 'i', value: 0 }, pano0Map: { type: 't', value: null }, pano0Position: { type: 'v3', value: new n.Vector3() }, pano0Matrix: { type: 'm4', value: new n.Matrix4() }, pano1Map: { type: 't', value: null }, pano1Position: { type: 'v3', value: new n.Vector3() }, pano1Matrix: { type: 'm4', value: new n.Matrix4() } }, /* vertexShader: o + "uniform vec3 pano0Position;\nuniform mat4 pano0Matrix;\n\nuniform vec3 pano1Position;\nuniform mat4 pano1Matrix;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition0;\nvarying vec3 vWorldPosition1;\n\nvoid main() {\n\n vUv = uv;\n vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n\n vec3 positionLocalToPanoCenter0 = worldPosition.xyz - pano0Position;\n vWorldPosition0 = (vec4(positionLocalToPanoCenter0, 1.0) * pano0Matrix).xyz;\n vWorldPosition0.x *= -1.0;\n\n vec3 positionLocalToPanoCenter1 = worldPosition.xyz - pano1Position;\n vWorldPosition1 = (vec4(positionLocalToPanoCenter1, 1.0) * pano1Matrix).xyz;\n vWorldPosition1.x *= -1.0;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n", fragmentShader: a + "uniform sampler2D map;\nuniform float modelAlpha;\nuniform float opacity;\nuniform float progress;\nuniform int blackout;\n\nuniform vec3 pano0Position;\nuniform samplerCube pano0Map;\n\nuniform vec3 pano1Position;\nuniform samplerCube pano1Map;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition0;\nvarying vec3 vWorldPosition1;\n\nvoid main() {\n\tconst vec4 BLACK = vec4(0.0, 0.0, 0.0, 1.0);\n\tconst vec4 GREY = vec4(0.5, 0.5, 0.5, 1.0);\n\n\tvec4 colorFromPanos;\n\tvec4 colorFromPano0 = textureCube( pano0Map, vWorldPosition0.xyz);\n\tvec4 colorFromPano1 = textureCube( pano1Map, vWorldPosition1.xyz);\n\n\tif (blackout == 0) {\n\t\tcolorFromPanos = mix(colorFromPano0, colorFromPano1, progress);\n\t} else if (blackout == 1) {\n\t\tcolorFromPanos = mix(colorFromPano0, BLACK, min(1.0, progress*2.0));\n\t\tcolorFromPanos = mix(colorFromPanos, colorFromPano1, max(0.0, progress * 2.0 - 1.0));\n\t} else if (blackout == 2) {\n\t\tcolorFromPanos = mix(colorFromPano0, BLACK, progress);\n\t} else if (blackout == 3) {\n\t\tcolorFromPanos = mix(BLACK, colorFromPano1, max(0.0, progress * 2.0 - 1.0));\n\t} \n\n\tvec4 colorFromTexture = texture2D( map, vUv );\n\tcolorFromPanos = mix(colorFromPanos, colorFromTexture, modelAlpha);\n\n\tfloat whiteness = 1.0 - smoothstep(0.1, 0.2, opacity);\n\tcolorFromPanos = mix(colorFromPanos, GREY, whiteness);\n\tgl_FragColor = vec4(colorFromPanos.rgb, opacity);\n}\n" */ vertexShader: o + `uniform vec3 pano0Position; uniform mat4 pano0Matrix;\n\nuniform vec3 pano1Position;\n uniform mat4 pano1Matrix;\n\nvarying vec2 vUv;\n varying vec3 vWorldPosition0; varying vec3 vWorldPosition1; uniform int blackout; void main() { vUv = uv; vec4 worldPosition = modelMatrix * vec4(position, 1.0); vec3 positionLocalToPanoCenter0 = worldPosition.xyz - pano0Position; vWorldPosition0 = (vec4(positionLocalToPanoCenter0, 1.0) * pano0Matrix).xyz; vWorldPosition0.x *= -1.0; vec3 positionLocalToPanoCenter1 = worldPosition.xyz - pano1Position; vWorldPosition1 = (vec4(positionLocalToPanoCenter1, 1.0) * pano1Matrix).xyz; vWorldPosition1.x *= -1.0; gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); }`, fragmentShader: a + `uniform sampler2D map;\nuniform float modelAlpha;\nuniform float opacity;\n uniform float progress;\nuniform int blackout;\n\nuniform vec3 pano0Position;\nuniform samplerCube pano0Map;\n\nuniform vec3 pano1Position;\nuniform samplerCube pano1Map;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition0;\nvarying vec3 vWorldPosition1;\n\n void main() { const vec4 BLACK = vec4(0.0, 0.0, 0.0, 1.0); const vec4 GREY = vec4(0.5, 0.5, 0.5, 1.0); vec4 colorFromPanos; if (blackout == 5){//add for TransitionPass colorFromPanos = textureCube( pano1Map, vWorldPosition1.xyz) ; }else{ vec4 colorFromPano0 = textureCube( pano0Map, vWorldPosition0.xyz); vec4 colorFromPano1 = textureCube( pano1Map, vWorldPosition1.xyz); if (blackout == 0) {colorFromPanos = mix(colorFromPano0, colorFromPano1, progress);} else if (blackout == 1) { colorFromPanos = mix(colorFromPano0, BLACK, min(1.0, progress*2.0)); colorFromPanos = mix(colorFromPanos, colorFromPano1, max(0.0, progress * 2.0 - 1.0)); } else if (blackout == 2) {colorFromPanos = mix(colorFromPano0, BLACK, progress);} else if (blackout == 3) {colorFromPanos = mix(BLACK, colorFromPano1, max(0.0, progress * 2.0 - 1.0));} } vec4 colorFromTexture = texture2D( map, vUv ); colorFromPanos = mix(colorFromPanos, colorFromTexture, modelAlpha); float whiteness = 1.0 - smoothstep(0.1, 0.2, opacity); colorFromPanos = mix(colorFromPanos, GREY, whiteness); gl_FragColor = vec4(colorFromPanos.rgb, opacity); }` }, hot: { uniforms: { color: { type: 'c', value: new n.Color(16720384) }, opac: { type: 'f', value: 0 }, texture1: { type: 't', value: null }, texture2: { type: 't', value: null } }, vertexShader: 'varying vec2 vUv;\n\nvoid main() {\n\n vUv = uv ;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n', fragmentShader: 'varying vec3 vNormal;\n\nvarying vec2 vUv;\n\nuniform float opac;\n\nuniform vec3 color;\n\nuniform sampler2D texture1;\n\nuniform sampler2D texture2;\n\nvoid main() {\n\nvec4 tcolor1 = texture2D( texture1, vUv );\n\nvec4 tcolor2 = texture2D( texture2, vUv );\n\ngl_FragColor = mix(tcolor1,tcolor2 ,opac) + tcolor2*0.2; }\n' }, modelOutside: { uniforms: { map: { type: 't', value: null }, opacity: { type: 'f', value: 1 } }, vertexShader: o + 'varying vec2 vUv;\n\nvoid main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n', fragmentShader: a + 'uniform sampler2D map;\nuniform float opacity;\nvarying vec2 vUv;\n\nvec4 white = vec4(0.5, 0.5, 0.5, 1.0);\n\nvoid main() {\n\n vec4 colorFromTexture = texture2D( map, vUv );\n float whiteness = 1.0 - smoothstep(0.1, 0.2, opacity);\n colorFromTexture = mix(colorFromTexture, white, whiteness);\n gl_FragColor = vec4(colorFromTexture.rgb, opacity);\n\n}\n' }, ribbon: { uniforms: { map: { type: 't', value: null }, opacity: { type: 'f', value: 1 }, color: { type: 'c', value: new n.Color(r.path.color) } }, vertexShader: o + 'varying vec2 vUv;\nvarying vec3 vN;\nvarying vec4 vP;\n\nvoid main() {\n\n vUv = uv;\n vN= normalMatrix * normal;\n vP = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * vP;\n}\n', fragmentShader: a + 'uniform sampler2D map;\nuniform float opacity;\nvarying vec2 vUv;\nuniform vec3 color;\nvarying vec3 vN; // show-1182\nvarying vec4 vP; // show-1182\n\nvoid main() {\n\t// TODO add scroll-in and pulsing behaviors\n\tvec3 vNn = normalize(vN);\n\tvec3 vPn = normalize(vP.xyz);\n\tfloat f = pow(1.0-abs(dot(vNn,vPn)),0.2);\n vec4 colorFromTexture = texture2D( map, vUv );\n colorFromTexture.a *= f;\n gl_FragColor = vec4((color.rgb*colorFromTexture.rgb),\n \t\t\t\t\t\t(opacity*colorFromTexture.a));\n}\n' }, waypoint: { uniforms: { map: { type: 't', value: null }, opacity: { type: 'f', value: 1 }, pulse: { type: 'f', value: 1 }, nearFade: { type: 'v2', value: new n.Vector2(2 * r.insideNear, 2 * r.path.waypointIndoorRadius) }, color: { type: 'c', value: new n.Color(r.reticuleColor) } }, vertexShader: o + 'varying vec2 vUv;\nvarying vec4 vPointView;\n\nvoid main() {\n\n vUv = uv;\n vPointView = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * vPointView;\n\n}\n', fragmentShader: a + 'uniform sampler2D map;\nuniform float opacity;\nuniform float pulse; // another opacity, with a different clock\nuniform vec2 nearFade;\nvarying vec2 vUv;\nvarying vec4 vPointView;\nuniform vec3 color;\n\nvoid main() {\n\t// TODO add scroll-in and pulsing behaviors\n\tfloat depthFade = min(1.0, (abs(vPointView.z)-nearFade.x)/(nearFade.y-nearFade.x));\n vec4 colorFromTexture = texture2D( map, vUv );\t\t// we only use the alpha!\n gl_FragColor = vec4(color.rgb,\n \t\t\t\t\t\t(pulse*opacity*colorFromTexture.a * depthFade));\n}\n' }, modelDebug: { uniforms: { map: { type: 't', value: null }, modelAlpha: { type: 'f', value: r.modelAlpha }, depthmapRatio: { type: 'f', value: 0 }, opacity: { type: 'f', value: 1 }, progress: { type: 'f', value: 0 }, considerOcclusion: { type: 'i', value: r.fancierTransition }, highlightPanoSelection: { type: 'i', value: 0 }, useThirdPano: { type: 'i', value: r.useThirdPano }, pano0Map: { type: 't', value: null }, pano0Depth: { type: 't', value: null }, pano0Position: { type: 'v3', value: new n.Vector3() }, pano0Matrix: { type: 'm4', value: new n.Matrix4() }, pano0Weight: { type: 'f', value: r.transition.pano0Weight }, pano1Map: { type: 't', value: null }, pano1Depth: { type: 't', value: null }, pano1Position: { type: 'v3', value: new n.Vector3() }, pano1Matrix: { type: 'm4', value: new n.Matrix4() }, pano1Weight: { type: 'f', value: r.transition.pano1Weight }, pano2Map: { type: 't', value: null }, pano2Depth: { type: 't', value: null }, pano2Position: { type: 'v3', value: new n.Vector3() }, pano2Matrix: { type: 'm4', value: new n.Matrix4() }, pano2Weight: { type: 'f', value: r.transition.pano2Weight } }, vertexShader: o + 'uniform vec3 pano0Position;\nuniform mat4 pano0Matrix;\n\nuniform vec3 pano1Position;\nuniform mat4 pano1Matrix;\n\nuniform vec3 pano2Position;\nuniform mat4 pano2Matrix;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition0;\nvarying vec3 vWorldPosition1;\nvarying vec3 vWorldPosition2;\n\nvarying vec4 worldPosition;\n\nvoid main() {\n\n vUv = uv;\n worldPosition = modelMatrix * vec4(position, 1.0);\n\n vec3 positionLocalToPanoCenter0 = worldPosition.xyz - pano0Position;\n vWorldPosition0 = (vec4(positionLocalToPanoCenter0, 1.0) * pano0Matrix).xyz;\n vWorldPosition0.x *= -1.0;\n\n vec3 positionLocalToPanoCenter1 = worldPosition.xyz - pano1Position;\n vWorldPosition1 = (vec4(positionLocalToPanoCenter1, 1.0) * pano1Matrix).xyz;\n vWorldPosition1.x *= -1.0;\n\n vec3 positionLocalToPanoCenter2 = worldPosition.xyz - pano2Position;\n vWorldPosition2 = (vec4(positionLocalToPanoCenter2, 2.0) * pano2Matrix).xyz;\n vWorldPosition2.x *= -1.0;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n', fragmentShader: a + 'uniform sampler2D map;\nuniform float depthmapRatio;\nuniform float modelAlpha;\nuniform float opacity;\nuniform float progress;\nuniform int considerOcclusion;\nuniform int highlightPanoSelection;\nuniform int useThirdPano;\n\nuniform vec3 pano0Position;\nuniform samplerCube pano0Map;\nuniform samplerCube pano0Depth;\nuniform float pano0Weight;\n\nuniform vec3 pano1Position;\nuniform samplerCube pano1Map;\nuniform samplerCube pano1Depth;\nuniform float pano1Weight;\n\nuniform vec3 pano2Position;\nuniform samplerCube pano2Map;\nuniform samplerCube pano2Depth;\nuniform float pano2Weight;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition0;\nvarying vec3 vWorldPosition1;\nvarying vec3 vWorldPosition2;\n\nvarying vec4 worldPosition;\n\nvoid main() {\n\n vec4 depthFromPano0 = textureCube( pano0Depth, vWorldPosition0.xyz );\n vec4 depthFromPano1 = textureCube( pano1Depth, vWorldPosition1.xyz );\n vec4 depthFromPano2 = textureCube( pano2Depth, vWorldPosition2.xyz );\n\n vec4 colorFromPano0 = textureCube( pano0Map, vWorldPosition0.xyz );\n vec4 colorFromPano1 = textureCube( pano1Map, vWorldPosition1.xyz );\n vec4 colorFromPano2 = textureCube( pano2Map, vWorldPosition2.xyz );\n\n float distanceToPano0 = distance(worldPosition.xyz, pano0Position);\n float distanceToPano1 = distance(worldPosition.xyz, pano1Position);\n float distanceToPano2 = distance(worldPosition.xyz, pano2Position);\n\n float cameraToPano0 = distance(cameraPosition.xyz, pano0Position);\n float cameraToPano1 = distance(cameraPosition.xyz, pano1Position);\n float cameraToPano2 = distance(cameraPosition.xyz, pano2Position);\n\n float contributionFromPano0 = cameraToPano0 == 0.0 ? 1000.0 : pano0Weight / cameraToPano0;\n float contributionFromPano1 = cameraToPano1 == 0.0 ? 1000.0 : pano1Weight / cameraToPano1;\n float contributionFromPano2 = cameraToPano2 == 0.0 ? 1000.0 : pano2Weight / cameraToPano2;\n\n contributionFromPano0 *= 1.0 / distanceToPano0;\n contributionFromPano1 *= 1.0 / distanceToPano1;\n contributionFromPano2 *= 1.0 / distanceToPano2;\n\n if(considerOcclusion == 1) {\n bool occludedFromPano0 = distanceToPano0 / 10.0 > 1.01 - depthFromPano0.x;\n bool occludedFromPano1 = distanceToPano1 / 10.0 > 1.01 - depthFromPano1.x;\n bool occludedFromPano2 = distanceToPano2 / 10.0 > 1.01 - depthFromPano2.x;\n\n if(occludedFromPano0){contributionFromPano0 *= 0.1;}\n if(occludedFromPano1){contributionFromPano1 *= 0.1;}\n if(occludedFromPano2){contributionFromPano2 *= 0.1;}\n //if(occludedFromPano0 && occludedFromPano1 && !occludedFromPano2) { contributionFromPano2 += 0.5; }\n }\n\n float contributionSum = contributionFromPano0 + contributionFromPano1 + contributionFromPano2;\n contributionFromPano0 /= contributionSum;\n contributionFromPano1 /= contributionSum;\n contributionFromPano2 /= contributionSum;\n\n vec4 colorFromPanos = colorFromPano0 * contributionFromPano0;\n colorFromPanos += colorFromPano1 * contributionFromPano1;\n colorFromPanos += colorFromPano2 * contributionFromPano2;\n\n vec4 depthFromPanos = depthFromPano0 * contributionFromPano0;\n depthFromPanos += depthFromPano1 * contributionFromPano1;\n depthFromPanos += depthFromPano2 * contributionFromPano2;\n\n vec4 colorFromTexture = texture2D( map, vUv );\n colorFromPanos = mix(colorFromPanos, colorFromTexture, modelAlpha);\n\n if(highlightPanoSelection == 1) {\n colorFromPanos.r = contributionFromPano0;\n colorFromPanos.g = contributionFromPano1;\n colorFromPanos.b = contributionFromPano2;\n }\n\n gl_FragColor = vec4(mix(colorFromPanos, depthFromPanos, depthmapRatio).rgb, opacity);\n\n}\n' }, customDepth: { uniforms: { panoPosition: { type: 'v3', value: new n.Vector3() } }, vertexShader: o + 'varying vec4 worldPosition;\n\nvoid main() {\n\n worldPosition = modelMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n', fragmentShader: a + 'uniform vec3 panoPosition;\nvarying vec4 worldPosition;\n\nvoid main() {\n\n float depth = distance(worldPosition.xyz, panoPosition);\n float color = 1.0 - depth / 10.0;\n gl_FragColor = vec4(color, color, color, 1.0);\n\n}\n' }, skysphere: { uniforms: { radius: { type: 'f', value: 0 } }, vertexShader: o + 'varying vec4 worldPosition;\n\nvoid main() {\n\n worldPosition = modelMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n', fragmentShader: a + 'varying vec4 worldPosition;\nuniform float radius;\n\nvoid main() {\n\n vec4 topColor = vec4(0.094, 0.102, 0.11, 1.0);\n vec4 bottomColor = vec4(0.2, 0.216, 0.235, 1.0);\n float normalizedHeight = (worldPosition.y + radius) / (radius * 2.0);\n float ratio = smoothstep(0.0, 0.5, normalizedHeight);\n gl_FragColor = mix(bottomColor, topColor, ratio);\n\n}\n' }, tagDisc: { uniforms: { opacity: { type: 'f', value: 0 }, color: { type: 'c', value: new n.Color() }, bg: { type: 't', value: null }, mask: { type: 't', value: null } }, vertexShader: o + 'varying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}', fragmentShader: a + 'uniform float opacity;\nuniform vec3 color;\nuniform sampler2D bg;\nuniform sampler2D mask;\n\nvarying vec2 vUv;\n\nvoid main() {\n vec4 maskColor = texture2D(mask, vUv);\n vec4 bgColor = texture2D(bg, vUv);\n vec3 mappedColor = mix(bgColor.rgb, color, maskColor.a);\n gl_FragColor = vec4(mappedColor, bgColor.a * opacity);\n}\n' } } window.shaders = t.exports }, { './settings': 166, three: 217 } ], 168: [ function (E, _, e) { ;(function (e) { 'use strict' var t = E('three'), i = (E('url'), E('./util/ajax')), n = E('./settings'), r = E('./util/logger'), o = E('./util/math'), a = E('./util/showcase'), s = E('./objects/Panorama'), l = new r(e), c = E('./model/Model'), h = E('./shaders'), u = E('./util/transitions'), d = E('./objects/Chunk'), p = E('./objects/Reticule'), f = E('./objects/Skybox'), g = E('./objects/Floor'), m = E('./cameras/DollhouseCamera'), v = E('./cameras/FloorplanCamera'), y = E('./cameras/PanoramaCamera'), A = E('./controls/DollhouseControls'), C = E('./controls/FloorplanControls'), I = E('./controls/PanoramaControls') ;(t.ImageUtils.crossOrigin = n.crossOrigin), (_.exports = { shaders: h, transitions: u, Model: c, Chunk: d, Floor: g, Skybox: f, Reticule: p, Panorama: s, DollhouseCamera: m, FloorplanCamera: v, PanoramaCamera: y, DollhouseControls: A, FloorplanControls: C, PanoramaControls: I, getModel: function (e) { if (!e.url) throw 'getModel(): missing parameter "url"' e.autoload = void 0 === e.autoload || e.autoload var t = a.parseSidUrl(e.url) ;(e.urlBase = t.urlBase), (e.urlModel = /* 'data/1081/', */ t.urlModel), (e.urlFiles = t.urlFiles) var i = this._getPlatformError() return i ? $.Deferred().reject(i).promise() : ((this.options = e), this._loadModel().then(this._buildModel.bind(this))) }, _getPlatformError: function () { return 'IE' === $.ua.browser.name && parseInt($.ua.browser.major) < 11 ? 'webgl-unsupported' : 'iOS' === $.ua.os.name && /^[0-7][$\.]/.test($.ua.os.version) ? 'webgl-ios' : Modernizr.webgl ? null : 'webgl-unsupported' }, _loadModel: function () { return i .get(this.options.urlModel, { responseType: 'json', prefetchFrom: 'model', auth: a.getAuthorizationHeader() }) .then(null, function () { return l.warn('Model loading failed at initial metadata load'), 'loading-failed' }) }, _buildModel: function (e) { e = a.normalizeModeldata(e, o) var t = new c(this.options, e) return this.options.autoload ? t.load(!0) : $.when(t) } }) }).call(this, '/js/showcase.js') }, { './cameras/DollhouseCamera': 5, './cameras/FloorplanCamera': 6, './cameras/PanoramaCamera': 7, './controls/DollhouseControls': 10, './controls/FloorplanControls': 11, './controls/PanoramaControls': 13, './model/Model': 139, './objects/Chunk': 144, './objects/Floor': 146, './objects/Panorama': 148, './objects/Reticule': 149, './objects/Skybox': 152, './settings': 166, './shaders': 167, './util/ajax': 181, './util/logger': 189, './util/math': 190, './util/showcase': 193, './util/transitions': 195, three: 217, url: 208 } ], 169: [ function (e, t, i) { 'use strict' function l(e) { var t = { renderTarget: null, inUse: !1, size: -1, pano: null } return ( (t.inUse = !0), (t.size = e), (function (e) { O.push(e) })(t), t ) } function c(e) { for (var t = 0; t < O.length; t++) { var i = O[t] if (i.renderTarget === e) return !(i.inUse = !1) } return !1 } function n() { ;(this.tileDirectory = {}), (this.activeRenderTargetDescriptors = {}), (this.activePanos = []), (this.panoLODDescriptors = {}), (this.panoDescriptors = {}), (this.tileTrees = {}), (this.sceneRenderer = null), (this.tileDownloader = null), (this.forceQueue = []), (this.uploadQueues = {}), (this.uploadInterval = null), (this.uploadIntervalCancelled = !1), (this.usingTileOverlay = !1), (this.overlayTilesLoaded = !1), (this.overlayTileBase = null), (this.overlayTilesBasic = {}), (this.overlayTilesEnhanced = {}), (this.zoomRenderTarget = null), (this.zoomPano = null), (this.zoomingActive = !1), (this.zoomPanoId = null), (this.zoomPanoRenderingDisabled = !1), (this.direction = new _.Vector3()), (this.initTime = -1), (this.maxBaseUploadsPerFrame = R), (this.maxNonBaseUploadsPerFrame = M) } var I, E, r, o, a, h, s, _ = e('three'), u = e('../exception/BasicException'), d = e('../settings'), p = e('../enum/PanoSizeClass'), b = (e('../objects/Panorama'), e('../enum/PanoRendererEvents')), f = e('../enum/SceneRendererEvents'), g = e('../enum/TileDownloaderEvents'), m = e('../enum/Vectors'), v = (e('../enum/GLCubeFaces'), e('../objects/Panorama'), e('./TileTree')), y = (e('./TileDownloader'), e('./TilePrioritizer')), A = e('./TileUtils'), C = ((p = e('../enum/PanoSizeClass')), e('../util/browser'), e('../util/panorama')), w = e('events').EventEmitter, T = !1, x = d.tiling.uploadIntervalDelay, S = d.tiling.initialIntervalDelay, M = d.tiling.maxNonBaseUploadsPerFrame, R = d.tiling.maxBaseUploadsPerFrame, P = { Base: 0, Remaining: 1 }, O = [] function L(e) { var t = e.shift() return (t.uploadQueued = !1), t } ;((n.prototype = Object.create(w.prototype)).init = function (e, t, i) { ;(this.sceneRenderer = e), (this.tileDownloader = t), (this.qualityManager = i), this.bindEvents(), this.sceneRenderer.on(f.ContextCreated, this.loadOverlayTiles.bind(this)), (this.initTime = performance.now()) }), (n.prototype.getActivePanoTextures = function (e) { e = e || [] for (var t = 0; t < O.length; t++) { var i = O[t] i.renderTarget && i.renderTarget.texture && e.push(i.renderTarget.texture) } }), (n.prototype.hasQueuedTiles = function () { var e = this.peekNextFromUploadQueue() return null != e }), (n.prototype.getActiveRenderTargetDescriptor = function (e) { return this.activeRenderTargetDescriptors[e] }), (n.prototype.setActiveRenderTargetDescriptor = function (e, t) { this.activeRenderTargetDescriptors[e] = t }), (n.prototype.loadOverlayTiles = function () { if (0 !== d.tiling.overlayStyle) { var n = 0, e = function (e, t, i) { ;(e = t ? (e[t] = this.sceneRenderer.initSizedTexture2D(A.TILE_SIZE, _.ClampToEdgeWrapping)) : (this.overlayTileBase = this.sceneRenderer.initSizedTexture2D(A.TILE_SIZE, _.ClampToEdgeWrapping))), this.sceneRenderer.uploadTexture2D(i, e, 0, 0, A.TILE_SIZE, A.TILE_SIZE), ++n === r.length && (this.overlayTilesLoaded = !0) }.bind(this), r = [ ['images/outlineBase.png', e.bind(this, this.overlayTileBase, null)], ['images/outlineBasic512.png', e.bind(this, this.overlayTilesBasic, 256)], ['images/outlineBasic512.png', e.bind(this, this.overlayTilesBasic, 512)], ['images/outlineBasic1024.png', e.bind(this, this.overlayTilesBasic, 1024)], ['images/outlineBasic2048.png', e.bind(this, this.overlayTilesBasic, 2048)], ['images/outlineBasic4096.png', e.bind(this, this.overlayTilesBasic, 4096)], ['images/outlineEnhanced512.png', e.bind(this, this.overlayTilesEnhanced, 256)], ['images/outlineEnhanced512.png', e.bind(this, this.overlayTilesEnhanced, 512)], ['images/outlineEnhanced1024.png', e.bind(this, this.overlayTilesEnhanced, 1024)], ['images/outlineEnhanced2048.png', e.bind(this, this.overlayTilesEnhanced, 2048)], ['images/outlineEnhanced4096.png', e.bind(this, this.overlayTilesEnhanced, 4096)] ] r.forEach( function (e) { this.tileDownloader.loadImage(e[0], 0, e[1]) }.bind(this) ), (this.usingTileOverlay = !0) } else this.usingTileOverlay = !1 }), (n.prototype.bindEvents = function () { this.tileDownloader.on(g.TileDownloadSuccess, this.onTileDownloaded.bind(this)) }), (n.prototype.setupZoomRenderTarget = function () { if (this.qualityManager.getMaxZoomPanoSize() >= this.qualityManager.getMaxNavPanoSize()) { if (this.zoomRenderTarget && this.zoomRenderTarget.width === this.qualityManager.getMaxZoomPanoSize()) return var e = this.zoomRenderTarget if (((this.zoomRenderTarget = this.initTiledPano(this.qualityManager.getMaxZoomPanoSize(), !1)), e)) { var t = e.width, i = this.zoomRenderTarget.width this.sceneRenderer.copyCubeMap(e.texture, this.zoomRenderTarget, t, t, i, i), e.texture.dispose(), (e.texture.loaded = !1), (e.texture.version = 0), this.sceneRenderer.deallocateCubeTexture(e.texture), (e.texture = null) } this.zoomPanoRenderingDisabled = !1 } else this.zoomPanoRenderingDisabled = !0 }), (n.prototype.enableUltraHighQualityMode = function (t) { if (!this.qualityManager.ultraHighQualityModeEnabled()) { var e = this.qualityManager.getPanoSize(p.ULTRAHIGH) this.tileDownloader.testDownload( e, A.TILE_SIZE, function (e) { e && (this.qualityManager.enableUltraHighQualityMode(), this.setupZoomRenderTarget(), t()) }.bind(this) ) } }), (n.prototype.activateTiledPano = function (e, t, i) { i && this.clearAllQueuedUploads() for (var n = 0; n < A.FACES_PER_PANO; n++) this.initTileTree(e.id, n, this.qualityManager.getMaxPossiblePanoSize()) this.linkAllTilesAndNodes(e) var r = this.getActiveRenderTargetDescriptor(e.id), o = t if ((o > this.qualityManager.getMaxNavPanoSize() && (o = this.qualityManager.getMaxNavPanoSize()), !r || o !== r.size)) { if ( (r && c(r.renderTarget), !(r = (function (e) { for (var t = 0; t < O.length; t++) { var i = O[t] if (!i.inUse && i.size === e) return (i.inUse = !0), i } return null })(o))) ) { var a = this.initTiledPano(o, !1) ;(r = l(a.width)).renderTarget = a } ;(r.pano = e), this.resetPanoDescriptor(e.id), this.resetPanoLODDescriptors(e.id), this.resetRenderStatus(e.id, !0, !0) } this.setActiveRenderTargetDescriptor(e.id, r) var s = i ? 0 : 1 return this.updateActivePanos(e, s), r.renderTarget }), (n.prototype.deactivateTiledPano = function (e) { var t = this.getActiveRenderTargetDescriptor(e.id) this.isRenderTargetDescriptorValid(t) && c(t.renderTarget), this.setActiveRenderTargetDescriptor(e.id, null) var i = this.getUploadQueueForPano(e.id) this.clearUploadQueue(i), this.updateActivePanos() }), (n.prototype.updateActivePanos = ((s = []), function (e, t) { for (var i = (s.length = 0); i < this.activePanos.length; i++) { e && s.length === t && s.push(e) var n = this.activePanos[i], r = this.getActiveRenderTargetDescriptor(n.id) ;(e && n.id === e.id) || !this.isRenderTargetDescriptorValid(r) || s.push(n) } e && t >= s.length && s.push(e), (this.activePanos.length = 0), this.activePanos.push.apply(this.activePanos, s) })), (n.prototype.getActivePanoCount = function () { return this.activePanos.length }), (n.prototype.resetRenderStatus = function (e, r, o, t) { var i = null t && (i = v.getLevelCountForSize(A.TILE_SIZE, t) + 1) for ( var n = function (e, t, i, n) { o && (t.tile.zoomUploaded = !1), r && (t.tile.uploaded = !1) }, a = 0; a < A.FACES_PER_PANO; a++ ) { this.getTileTree(e, a).breadthFirst({ callback: n.bind(this, a), minLevel: i }) } }), (n.prototype.copyBaseRenderStatusToZoomed = function (e) { for ( var t = v.getLevelCountForSize(A.TILE_SIZE, this.qualityManager.getMaxNavPanoSize()), i = function (e, t, i, n) { ;(t.tile.zoomUploaded = t.tile.uploaded), (t.zoomCovered = t.covered) }, n = 0; n < A.FACES_PER_PANO; n++ ) { this.getTileTree(e, n).breadthFirst({ callback: i.bind(this, n), maxLevel: t }) } }), (n.prototype.renderPanoTiles = ((h = []), function (e, t, i, n) { ;(this.zoomRenderTarget && this.zoomRenderTarget.width === this.qualityManager.getMaxZoomPanoSize()) || this.zoomPanoRenderingDisabled || this.setupZoomRenderTarget(), (t = t || this.direction || m.FORWARD) var r = this.getActiveRenderTargetDescriptor(e) if (!this.isRenderTargetDescriptorValid(r)) throw new u('PanoRenderer.renderPanoTiles() -> Cannot render to a pano that is not activated.') for (var o = 0; o < A.FACES_PER_PANO; o++) { var a = this.getTileTree(e, o) ;(h.length = 0), a.breadthFirst({ saveVisited: h }) for (var s = 0; s < h.length; s++) { var l = h[s] this.queueTileUpload(l.tile, !1, n || (0 === s && i)) } } this.updateDirection(t) })), (n.prototype.isRenderTargetDescriptorValid = function (e) { return e && e.renderTarget }), (n.prototype.isPanoActive = function (e) { var t = this.getActiveRenderTargetDescriptor(e) return this.isRenderTargetDescriptorValid(t) }), (n.prototype.isPanoZoomed = function (e) { return this.zoomingActive && this.zoomPanoId === e }), (n.prototype.initTileTree = function (e, t, i) { var n = this.tileTrees[e] n || ((n = []), (this.tileTrees[e] = n)) var r = n[t] if (!r) { var o = v.getLevelCountForSize(A.TILE_SIZE, i) ;(r = new v(A.TILE_SIZE, o)), (n[t] = r) } }), (n.prototype.getTileTree = function (e, t) { var i = this.tileTrees[e] if (!i) throw new u('PanoRenderer.getTileTree() -> Tree array not yet initialized!') var n = i[t] if (!n) throw new u('PanoRenderer.getTileTree() -> Tree not yet initialized!') return n }), (n.prototype.initTiledPano = function (e, t) { var i = this.sceneRenderer.renderer, n = (i.context, new _.WebGLRenderTargetCube(e, e, { stencilBuffer: !1 })), r = new _.CubeTexture([]) ;((n.texture = r).image = [null, null, null, null, null, null]), (r.flipY = !0), t ? ((r.generateMipmaps = !0), (r.magFilter = _.LinearFilter), (r.minFilter = _.LinearMipMapLinearFilter)) : ((r.generateMipmaps = !1), (r.magFilter = _.LinearFilter), (r.minFilter = _.LinearFilter)), (r.format = _.RGBAFormat), i.setRenderTarget(n), i.setRenderTarget(null) var o = i.properties.get(r) return (o.__image__webglTextureCube = o.__webglTexture), n }), (n.prototype.getUploadQueueForPano = function (e) { var t = this.uploadQueues[e] return t || ((t = []), (this.uploadQueues[e] = t)), t }), (n.prototype.isTileUploaded = function (e) { return this.isPanoZoomed(e.panoId) ? e.zoomUploaded : e.uploaded }), (n.prototype.setUploaded = function (e, t) { this.isPanoZoomed(e.panoId) ? (e.zoomUploaded = t) : (e.uploaded = t) }), (n.prototype.queueTileUpload = function (e, t, i) { var n = this.getActiveRenderTargetDescriptor(e.panoId) if ( this.isRenderTargetDescriptorValid(n) && e.downloaded && !this.isTileUploaded(e) && (!e.uploadQueued || i) && (!(e.panoSize > this.qualityManager.getMaxNavPanoSize()) || this.zoomingActive) ) { var r = this.getUploadQueueForPano(e.panoId) i ? this.uploadTile(e, !1) : (this.shoulPushToFrontOfQueue(e) ? this.forceQueue.push(e) : t && this.direction ? y.insertSortedPanoTile(r, e, n.pano, this.direction) : r.push(e), (e.uploadQueued = !0), this.uploadInterval || this.uploadIntervalCancelled || this.refreshUploadInterval(0)) } }), (n.prototype.shoulPushToFrontOfQueue = function (e) { return 0 === v.getLevelCountForSize(A.TILE_SIZE, e.panoSize) }), (n.prototype.getTopUploadQueue = function () { for (var e = null, t = null, i = P.Base; i <= P.Remaining; i++) for (var n = 0; n < this.activePanos.length; n++) if (((e = this.activePanos[n]), 0 < (t = this.getUploadQueueForPano(e.id)).length)) switch (i) { case P.Base: if (0 === t[0].level) return t break case P.Remaining: return t } return null }), (n.prototype.getNextFromUploadQueue = function () { if (0 < this.forceQueue.length) return L(this.forceQueue) var e = this.getTopUploadQueue() return e && 0 < e.length ? L(e) : null }), (n.prototype.peekNextFromUploadQueue = function () { if (0 < this.forceQueue.length) return this.forceQueue[0] var e = this.getTopUploadQueue() return e && 0 < e.length ? e[0] : null }), (n.prototype.clearAllQueuedUploads = function () { this.clearAllUploadQueues(null, 0) }), (n.prototype.clearAllQueuedUploadsForPano = function (e) { this.clearAllUploadQueues(e, 0) }), (n.prototype.clearAllUploadQueues = function (e, t) { if (e) this.clearUploadQueue(this.getUploadQueueForPano(e), t), this.clearUploadQueue(this.forceQueue, t, e) else { for (var i = 0; i < this.activePanos.length; i++) { var n = this.activePanos[i] this.clearUploadQueue(this.getUploadQueueForPano(n.id), t) } this.clearUploadQueue(this.forceQueue, t) } }), (n.prototype.clearUploadQueue = function (e, t, i) { null != t || (t = 0) for (var n = 0; n < e.length; ) { var r = e[n] ;(!i || (i && i === r.tile.panoId)) && r.level >= t ? ((r.uploadQueued = !1), e.splice(n, 1)) : n++ } }), (n.prototype.refreshUploadInterval = ((a = null), function (e) { this.uploadIntervalCancelled || ((a = a || function () { this.uploadIntervalCancelled || (this.overlayTilesLoaded || !this.usingTileOverlay ? ((T = !0), this.updateUploadQueue(this.maxNonBaseUploadsPerFrame, this.maxBaseUploadsPerFrame), this.peekNextFromUploadQueue() ? this.refreshUploadInterval(x) : (this.uploadInterval = null)) : this.refreshUploadInterval(this.uploadIntervalDelay)) }.bind(this)), null != e || (e = x), T || (e = S), (this.uploadInterval = window.setTimeout(a, e)), (this.uploadIntervalDelay = e)) })), (n.prototype.update = ((r = performance.now()), (o = 0), function () { ;(this.uploadIntervalCancelled = !0), window.clearTimeout(this.uploadInterval), (this.uploadInterval = null) var e = performance.now() - r !(x < e || 0 === o) || (!this.overlayTilesLoaded && this.usingTileOverlay) || (this.updateUploadQueue(this.maxNonBaseUploadsPerFrame, this.maxBaseUploadsPerFrame), (r = performance.now())), o++ })), (n.prototype.updateUploadQueue = function (e, t) { e = e || 1 for (var i = 0, n = 0; !(t <= n || e <= i); ) { var r = this.getNextFromUploadQueue() if (!r) break if ((0 !== r.level ? i++ : n++, !(r.panoSize > this.qualityManager.getMaxNavPanoSize()) || this.zoomingActive)) { var o = this.getActiveRenderTargetDescriptor(r.panoId) this.isRenderTargetDescriptorValid(o) && this.uploadTile(r, r.forceUpload) } } }), (n.prototype.updateDirection = function (e) { if ((e = e || this.direction)) { this.direction = e for (var t = 0; t < this.activePanos.length; t++) { var i = this.activePanos[t], n = this.getUploadQueueForPano(i.id) y.sortPanoTiles(n, i, this.direction) } } }), (n.prototype.uploadTile = ((I = {}), new _.Vector4(), (E = d.tiling.overlayStyle), function (e, t) { var i = e.panoId, n = e.image, r = e.tileSize, o = e.panoSize, a = e.tileIndex, s = (e.faceTileIndex, e.totalTiles), l = (e.face, e.tileX), c = e.tileY, h = !0, u = !1, d = (this.getPanoDescriptor(i), this.getPanoLODDescriptor(i, o)), p = this.getActiveRenderTargetDescriptor(i), f = p.renderTarget, g = p.size if ( (this.isPanoZoomed(i) && ((f = this.zoomRenderTarget), (g = this.qualityManager.getMaxZoomPanoSize())), this.isRenderTargetDescriptorValid(p) || (u = h = !1), t || (this.anyUploaded(e.node) && (u = !(h = !1)), this.isTileUploaded(e) && (u = h = !1)), h) ) { var m = (r / o) * g, v = ((l * r) / o) * g, y = ((c * r) / o) * g I[r] || (I[r] = this.sceneRenderer.initSizedTexture2D(r, _.ClampToEdgeWrapping)) var A = I[r] if ((this.sceneRenderer.uploadTexture2D(n, A, 0, 0, r, r), 1 === E || 2 === E)) { var C = 1 === E ? this.overlayTilesBasic : this.overlayTilesEnhanced this.sceneRenderer.renderToCubeMap(A, f, r, r, 0, 0, r, r, v, y, m, m, e.cubeFace), this.sceneRenderer.renderToCubeMap(C[o], f, r, r, 0, 0, r, r, v, y, m, m, e.cubeFace, _.NormalBlending, !0, 0.5) } else this.sceneRenderer.renderToCubeMap(A, f, r, r, 0, 0, r, r, v, y, m, m, e.cubeFace) d.uploadCount++, this.emit(b.TileRenderSuccess, i, o, a, s), d.uploadCount === s && this.emit(b.PanoRenderComplete, i, o, s), this.setUploaded(e, !0), this.addCoverageForNode(e.node) } else this.setUploaded(e, !1) return ( e.uploadAttempted || (d.uploadAttempts++, this.emit(b.TileUploadAttempted, i, o, a, s)), (e.uploadAttempted = !0), d.uploadAttempts === s && this.emit(b.UploadAttemptedForAllTiles, i, o, s), u ) })), (n.prototype.linkTileAndNode = function (e, t) { ;(t.tile = e).node = t }), (n.prototype.linkAllTilesAndNodes = function (a) { for ( var e = function (e, t, i, n, r) { var o = this.getTileDirectoryEntry(a.id, t, n, r) this.linkTileAndNode(o, i) }, t = 0; t < A.FACES_PER_PANO; t++ ) { var i = this.getTileTree(a.id, t) i.breadthFirst({ callback: e.bind(this, i, t) }) } }), (n.prototype.anyUploaded = function (e) { if (!e) return !1 if (e.tile && this.isTileUploaded(e.tile)) return !0 if (e.children) for (var t = 0; t < e.children.length; t++) { var i = e.children[t] if (this.anyUploaded(i)) return !0 } return !1 }), (n.prototype.setNodeCovered = function (e, t) { this.isPanoZoomed(e.tile.panoId) ? (e.zoomCovered = t) : (e.covered = t) }), (n.prototype.isNodeCovered = function (e) { return !!e && (this.isPanoZoomed(e.tile.panoId) ? e.zoomCovered : e.covered) }), (n.prototype.addCoverageForNode = function (e) { if ((this.setNodeCovered(e, !0), e.parent && e.covered)) { var t = e.parent this.nodeSubcovered(t) && this.addCoverageForNode(t, !0) } }), (n.prototype.calcFullCoverage = function (e) { var t = !1 if (e.children) for (var i = 0; i < e.children.length; i++) { var n = e.children[i] t = t || this.calcFullCoverage(n) } e.covered = e.tile.uploaded || t }), (n.prototype.nodeSubcovered = function (e) { if (!e.children) return !1 for (var t = 0; t < e.children.length; t++) if (!e.children[t] || !this.isNodeCovered(e.children[t])) return !1 return !0 }), (n.prototype.resetPanoDescriptor = function (e) { this.getPanoDescriptor(e) }), (n.prototype.getPanoDescriptor = function (e) { var t = this.panoDescriptors[e] return t || ((t = {}), (this.panoDescriptors[e] = t)), t }), (n.prototype.resetPanoLODDescriptors = function (e) { var t = this.getPanoLODDescriptors(e) for (var i in t) if (t.hasOwnProperty(i)) { var n = t[i] ;(n.uploadCount = 0), (n.uploadAttempts = 0) } }), (n.prototype.getPanoLODDescriptor = function (e, t) { var i = this.getPanoLODDescriptors(e), n = i[t] return ( n || ((n = { uploadCount: 0, uploadAttempts: 0 }), (i[t] = n)), n ) }), (n.prototype.getPanoLODDescriptors = function (e) { var t = this.panoLODDescriptors[e] return t || ((t = {}), (this.panoLODDescriptors[e] = t)), t }), (n.prototype.onTileDownloaded = function (e) { var t = v.getLevelCountForSize(A.TILE_SIZE, e.panoSize), i = this.getTileDirectoryEntry(e.panoId, e.face, t, e.faceTileIndex) if ( ((i.downloaded = !0), (i.image = e.image), (i.panoSize = e.panoSize), (i.tileX = e.tileX), (i.tileY = e.tileY), (i.totalTiles = e.totalTiles), (i.tileIndex = e.tileIndex), (i.faceTileIndex = e.faceTileIndex), (i.face = e.face), (i.cubeFace = C.mapFaceToCubemapFace(e.face)), (i.panoId = e.panoId), (i.tileSize = e.tileSize), (i.direction = new _.Vector3().copy(e.direction)), (i.node = null), (i.level = v.getLevelCountForSize(A.TILE_SIZE, i.panoSize)), this.isPanoActive(i.panoId)) ) { var n = this.getTileTree(i.panoId, i.face).getSubNode(i.panoSize, i.tileX, i.tileY) this.linkTileAndNode(i, n), this.queueTileUpload(i, !0) } }), (n.prototype.getTileDirectoryEntry = function (e, t, i, n) { var r = this.tileDirectory[e] r || ((r = {}), (this.tileDirectory[e] = r)) var o = 16384 * t + 1024 * i + n, a = r[o] return ( a || ((a = { downloaded: !1, uploaded: !1, zoomUploaded: !1 }), (r[o] = a)), (a._key = e + ':' + t + ':' + i + ':' + n), (a._tileKey = o), a ) }), (n.prototype.setZoomingActive = function (e, t, i) { this.zoomPanoRenderingDisabled || (e === this.zoomingActive && this.zoomPanoId === t.id) || ((this.zoomingActive = e), (this.zoomPanoId = t.id), this.zoomingActive && (this.zoomPanoId !== t.id || i) && this.updateZoomedPanoFromBase(t)) }), (n.prototype.updateZoomedPanoFromBase = function (e) { if (!this.zoomPanoRenderingDisabled) { var t = this.getActiveRenderTargetDescriptor(e.id) if (t && t.renderTarget) { var i = this.qualityManager.getMaxZoomPanoSize(), n = t.renderTarget, r = t.size this.sceneRenderer.copyCubeMap(n.texture, this.zoomRenderTarget, r, r, i, i), this.copyBaseRenderStatusToZoomed(e.id) } } }), (t.exports = n) }, { '../enum/GLCubeFaces': 25, '../enum/PanoRendererEvents': 35, '../enum/PanoSizeClass': 36, '../enum/SceneRendererEvents': 43, '../enum/TileDownloaderEvents': 45, '../enum/Vectors': 50, '../exception/BasicException': 55, '../objects/Panorama': 148, '../settings': 166, '../util/browser': 182, '../util/panorama': 191, './TileDownloader': 171, './TilePrioritizer': 172, './TileTree': 173, './TileUtils': 174, events: 202, three: 217 } ], 170: [ function (e, t, i) { 'use strict' function n(e, t, i) { ;(this.maxNavPanoSize = -1), (this.maxZoomPanoSize = -1), (this.devicePixelDensity = e), (this.deviceScreenSize = t), (this.clientBandwidth = i), (this.panoSizeClassMap = {}), (this.useHighResolutionPanos = !0), (this.useUltraHighResolutionPanos = !1), (this.modelHasUltraHighPanos = !1) this.maxRenderTargetSize = Math.min(common.getMaxCubemapSize(), this.maxRenderTargetSize) //add } var r = e('../enum/PanoSizeClass'), o = e('../settings'), a = e('../util/browser'), s = e('../constants'), l = e('../util/showcase'), c = e('../enum/ModelManagerEvents') ;(n.prototype.init = function (e) { this.buildPanoSizeClassMap(this.devicePixelDensity, this.deviceScreenSize, this.clientBandwidth), (this.ultraHighSize = this.getPanoSize(r.ULTRAHIGH)), (this.highSize = this.getPanoSize(r.HIGH)), (this.standardSize = this.getPanoSize(r.STANDARD)), (this.baseSize = this.getPanoSize(r.BASE)), o.tiling.maxZoomPanoQuality && this.ultraHighSize <= o.tiling.maxZoomPanoQuality && (o.tiling.allowUltraHighResolution = !0), (this.highQualityThreshold = a.valueFromHash('threshold2k', s.windowHeightHighQualityThreshold)), this.updateMaximums(), e.on(c.ActiveModelChanged, this.onModelChanged.bind(this)) }), (n.prototype.updateFromModel = function (e) { this.updateHighResolutionSettings(e), this.updateUltraHighResolutionSettings(e) }), (n.prototype.updateHighResolutionSettings = function (e) { l.modelDataPromisesTiles(e.data) ? (this.useHighResolutionPanos = !0) : (this.useHighResolutionPanos = !1), this.updateMaximums() }), (n.prototype.updateUltraHighResolutionSettings = function (e) { o.tiling.allowUltraHighResolution && this.modelHasUltraHighPanos ? (this.useUltraHighResolutionPanos = !0) : (this.useUltraHighResolutionPanos = !1), this.updateMaximums() }), (n.prototype.enableUltraHighQualityMode = function () { ;(this.modelHasUltraHighPanos = !0), this.updateUltraHighResolutionSettings(null) }), (n.prototype.ultraHighQualityModeEnabled = function () { return this.modelHasUltraHighPanos }), (n.prototype.onModelChanged = function (e) { this.updateFromModel(e.model), this.updateMaximums() }), (n.prototype.updateMaximums = function () { ;(this.maxNavPanoSize = o.tiling.maxNavPanoQuality || this.detectMaxNavPanoSize()), (this.maxZoomPanoSize = o.tiling.maxZoomPanoQuality || this.detectMaxZoomPanoSize()), this.maxZoomPanoSize < this.maxNavPanoSize && (this.maxNavPanoSize = this.maxZoomPanoSize) }), (n.prototype.buildPanoSizeClassMap = function () { ;(this.panoSizeClassMap[r.BASE] = 512), (this.panoSizeClassMap[r.STANDARD] = 1024), (this.panoSizeClassMap[r.HIGH] = 2048), (this.panoSizeClassMap[r.ULTRAHIGH] = 4096) }), (n.prototype.getPanoSize = function (e) { return this.panoSizeClassMap[e] }), (n.prototype.getMaxPossiblePanoSize = function () { return this.getPanoSize(r.ULTRAHIGH) }), (n.prototype.getMaxPanoSize = function () { return this.maxZoomPanoSize }), (n.prototype.getMaxNavPanoSize = function () { return this.maxNavPanoSize }), (n.prototype.getMaxZoomPanoSize = function () { return this.maxZoomPanoSize }), (n.prototype.detectMaxNavPanoSizeClass = function () { return this.useHighResolutionPanos ? (a.isMobile() ? r.STANDARD : $('#player').height() < this.highQualityThreshold ? r.STANDARD : r.HIGH) : r.STANDARD }), (n.prototype.detectMaxNavPanoSize = function () { var e = this.detectMaxNavPanoSizeClass() return this.getPanoSize(e) }), (n.prototype.detectMaxZoomPanoSize = function () { return this.useHighResolutionPanos ? a.isMobile() ? o.tiling.mobileHighQualityOverride ? this.getPanoSize(r.HIGH) : this.getPanoSize(r.STANDARD) : this.useUltraHighResolutionPanos ? this.getPanoSize(r.ULTRAHIGH) : this.getPanoSize(r.HIGH) : this.getPanoSize(r.STANDARD) }), (t.exports = n) }, { '../constants': 8, '../enum/ModelManagerEvents': 33, '../enum/PanoSizeClass': 36, '../settings': 166, '../util/browser': 182, '../util/showcase': 193 } ], 171: [ function (A, C, e) { ;(function (e) { 'use strict' function i(e) { ;(this.panos = null), (this.retryMinimumTime = 1e4), (this.urls = null), (this.panoLoadCallbacks = {}), (this.downloadDescriptors = {}), (this.priorityQueue = []), (this.forceQueue = []), (this.activeDownloads = []), (this.qualityManager = null), (this.tilePrioritizer = null), (this.refreshInterval = null), (this.processPriorityQueue = !1), (this.concurrentDownloads = e.concurrentDownloads || 1), (this.downloadTestResults = {}) } var c, h, n, p, f, t = A('three'), u = (A('../enum/Viewmode'), A('../settings')), r = (A('../objects/Panorama'), A('../util/logger')), o = (A('../enum/Vectors'), A('../enum/PanoSizeClass'), A('../enum/TileDownloaderEvents')), g = A('./TilePrioritizer'), m = A('./TileUtils'), v = (A('../enum/GLCubeFaces'), A('../enum/DownloadStatus')), a = A('../util/panorama'), s = A('../util/ajax'), d = A('../ab'), l = A('events').EventEmitter, y = (new r(e), Object.freeze({ Testing: 1, Success: 2, Fail: 3 })) ;(i.prototype = Object.create(l.prototype)), (i.IDLE_REFRESH_DELAY = 500), (i.ACTIVE_REFRESH_DELAY = 16), (i.DOWNLOAD_RETRIES = 4), (i.prototype.init = function (e) { this.qualityManager = e }), (i.prototype.setUrls = function (e) { this.urls = e }), (i.prototype.setpanoData = function (e, t, i) { ;(this.panos = e), (this.imagePanos = t), (this.panoGroupId = i) }), (i.prototype.start = function () { this.refreshUpdateInterval(0) }), (i.prototype.stop = function () { window.cancel(this.refreshInterval) }), (i.prototype.refreshUpdateInterval = function (e) { ;(e = e || 0), (this.refreshInterval = window.setTimeout( function () { this.update() ? this.refreshUpdateInterval(i.ACTIVE_REFRESH_DELAY) : this.refreshUpdateInterval(i.IDLE_REFRESH_DELAY) }.bind(this), e )) }), (i.prototype.update = function () { var e = 0 < this.forceQueue.length return ( this.processQueueForDownloading(this.forceQueue), this.processPriorityQueue && (this.queuePrioritizedTilesForPanos(this.panos), 0 < this.priorityQueue.length && (e = !0), this.processQueueForDownloading(this.priorityQueue)), e ) }), (i.prototype.forceQueueTilesForPano = ((p = []), (f = []), function (e, t, i, n, r, o) { p.length = 0 for (var a = this.getTileDownloadDescriptors(e, t), s = 0; s < a.length; s++) { var l = a[s] ;(l.status !== v.None && l.status !== v.Queued) || p.push(l) } if (i && 0 < p.length) { g.sortPanoTiles(p, e, i), (f.length = 0), m.matchingTilesInDirection(e, t, i, n, r, f) for ( var c = 0, h = function (e) { return e.face === u.face && e.faceTileIndex === u.faceTileIndex }; c < p.length; ) { var u = p[c] f.findIndex(h) < 0 ? p.splice(c, 1) : c++ } } for (var d = 0; d < p.length; d++) this.forceQueue.push(p[d]) this.setStatusForAllDescriptors(this.forceQueue, v.ForceQueued), this.clearFromQueue(this.priorityQueue, v.ForceQueued, !1), o && this.processQueueForDownloading(this.forceQueue, !0) })), (i.prototype.clearForceQueue = function () { this.clearQueue(this.forceQueue) }), (i.prototype.queuePrioritizedTilesForPanos = function (e) { this.tilePrioritizer && (this.clearQueue(this.priorityQueue), this.tilePrioritizer.filterAndPrioritize(this.priorityQueue, e, this), this.clearFromQueue(this.priorityQueue, v.None, !0), this.setStatusOrRemoveForAllDescriptors(this.priorityQueue, v.Queued)) }), (i.prototype.clearQueue = function (e) { this.setStatusForAllDescriptors(e, v.None), (e.length = 0) }), (i.prototype.clearFromQueue = function (e, t, i) { for (var n = 0; n < e.length; n++) { var r = e[n] r && ((t === r.status && !i) || (t !== r.status && i)) && (e[n] = null) } }), (i.prototype.setStatusForAllDescriptors = function (e, t) { for (var i = 0; i < e.length; i++) { var n = e[i] n && (n.status = t) } }), (i.prototype.setStatusOrRemoveForAllDescriptors = function (e, t) { for (var i = 0; i < e.length; i++) { var n = e[i] n && (n.status !== t ? (n.status = t) : (e[i] = null)) } }), (i.prototype.getTileDownloadDescriptors = function (e, t) { var i = this.getAllTileDownloadDescriptorsForPano(e), n = i[t] return n || ((n = this.buildDownloadDescriptorArray(t)), (i[t] = n), this.initTileDownloadDescriptors(n, e, t)), n }), (i.prototype.getAllTileDownloadDescriptorsForPano = function (e) { var t = this.downloadDescriptors[e.id] return t || ((t = {}), (this.downloadDescriptors[e.id] = t)), t }), (i.prototype.processQueueForDownloading = function (e, t) { if ((this.cleanupActiveDownloads(), this.activeDownloads.length < this.concurrentDownloads || t)) for (var i = t ? e.length : this.concurrentDownloads - this.activeDownloads.length, n = 0; n < i && 0 < e.length; 0) { var r = e.shift() r && (this.startDownload(r), n++) } }), (i.prototype.testDownload = function (t, e, i) { var n = this.downloadTestResults[t] if (n) n === y.Success ? i(!0) : n === y.Fail && i(!1) else { this.downloadTestResults[t] = y.Testing var r = this.panos.list[0], o = this.getTileUrl(r.id, t, e, 0), a = function (e) { ;(this.downloadTestResults[t] = y.Success), i(!0) }.bind(this), s = function () { ;(this.downloadTestResults[t] = y.Fail), i(!1) }.bind(this) this.loadImage(o, 0, a, s) } }), (i.prototype.startDownload = function (e) { e.status = v.Downloading var t = this.getTileUrl(e.pano.id, e.panoSize, e.tileSize, e.tileIndex) this.activeDownloads.push(e), this.loadImage(t, i.DOWNLOAD_RETRIES, this.downloadComplete.bind(this, e), this.downloadFailed.bind(this, e)) }), (i.prototype.downloadFailed = function (e, t) {}), (i.prototype.downloadComplete = function (e, t) { if (e.panoGroupId === this.panoGroupId) { var i = this.getPanoLoadCallbacks(e.pano, e.panoSize) ;(e.status = v.Downloaded), i && i.onProgress && i.onProgress(e.pano, e.panoSize) var n = { panoId: e.pano.id, image: t, tileSize: e.tileSize, panoSize: e.panoSize, tileIndex: e.tileIndex, faceTileIndex: e.faceTileIndex, totalTiles: e.totalTiles, face: e.face, tileX: e.tileX, tileY: e.tileY, direction: e.direction } ;(e.image = t), this.emit(o.TileDownloadSuccess, n), this.isPanoDownloaded(e.pano, e.panoSize) && ((n = { panoId: e.pano.id, tileSize: e.tileSize, panoSize: e.panoSize }), this.emit(o.PanoDownloadComplete, n), i && i.onLoad && i.onLoad(e.pano, e.panoSize)) } }), (i.prototype.cleanupActiveDownloads = ((n = []), function () { for (var e = (n.length = 0); e < this.activeDownloads.length; e++) { var t = this.activeDownloads[e] t.status !== v.Downloaded && t.status !== v.Failed && n.push(t) } ;(this.activeDownloads.length = 0), this.activeDownloads.push.apply(this.activeDownloads, n) })), (i.prototype.isPanoDownloaded = function (e, t) { var i = this.getTileDownloadDescriptors(e, t) if (i.length <= 0) return !1 for (var n = 0; n < i.length; n++) { if (i[n].status !== v.Downloaded) return !1 } return !0 }), (i.prototype.setPanoLoadCallbacks = function (e, t, i, n, r) { var o = e.id + ':' + this.qualityManager.getPanoSize(t) this.panoLoadCallbacks[o] = { onLoad: i, onFail: n, onProgress: r } }), (i.prototype.getPanoLoadCallbacks = function (e, t) { var i = e.id + ':' + t return this.panoLoadCallbacks[i] }), (i.prototype.buildDownloadDescriptorArray = function (e) { for (var t = m.getTileCountForSize(e), i = [], n = 0; n < t; n++) { var r = this.buildDownloadDescriptor() i.push(r) } return i }), (i.prototype.buildDownloadDescriptor = function () { return { panoGroupId: null, pano: null, panoSize: -1, tileSize: -1, tileIndex: -1, totalTiles: -1, faceTileIndex: -1, status: v.None, url: null, image: null, direction: new t.Vector3(), face: -1, cubeFace: -1, tileX: -1, tileY: -1 } }), (i.prototype.initTileDownloadDescriptors = function (e, t, i) { for (var n = 0; n < e.length; n++) { var r = e[n] this.initTileDownloadDescriptor(r, t, i, n) } }), (i.prototype.initTileDownloadDescriptor = function (e, t, i, n) { var r = i >= m.TILE_SIZE ? m.TILE_SIZE : i ;(e.face = m.getFaceForTile(i, n)), (e.cubeFace = a.mapFaceToCubemapFace(e.face)), (e.panoGroupId = this.panoGroupId), (e.pano = t), (e.panoSize = i), (e.tileSize = r), (e.tileIndex = n), (e.totalTiles = m.getTileCountForSize(i)), (e.status = v.None), (e.image = null), m.getTileLocation(e.panoSize, e.tileIndex, e), m.getTileVector(e.panoSize, e.tileSize, e.cubeFace, e.tileX, e.tileY, m.LocationOnTile.Center, 0, e.direction) }), (i.prototype.getTileUrl = ((c = { 256: '256', 512: '512', 1024: '1k', 2048: '2k', 4096: '4k' }), (h = { face: -1, faceTileIndex: -1, tileX: -1, tileY: -1 }), function (e, t, i, n) { m.getTileLocation(t, n, h) var r = Math.floor(t / i), o = r * r, a = Math.floor(n / o), s = '' 1 === u.tiling.customCompression && (s = '_' + u.tiling['q' + c[t]]) var l = this.urls.get('tiles/' + e + '/' + c[t] + s + '_face' + a + '_' + h.tileX + '_' + h.tileY + '.jpg') return d.changeIfTileGenerating(l) })), (i.prototype.loadImage = function (e, t, i, n) { s.getImage(e, t) .then(function (e) { i(e) }) .fail(n) }), (C.exports = i) }).call(this, '/js/tile/TileDownloader.js') }, { '../ab': 3, '../enum/DownloadStatus': 24, '../enum/GLCubeFaces': 25, '../enum/PanoSizeClass': 36, '../enum/TileDownloaderEvents': 45, '../enum/Vectors': 50, '../enum/Viewmode': 51, '../objects/Panorama': 148, '../settings': 166, '../util/ajax': 181, '../util/logger': 189, '../util/panorama': 191, './TilePrioritizer': 172, './TileUtils': 174, events: 202, three: 217 } ], 172: [ function (n, C, e) { ;(function (e) { 'use strict' function h(e, t, i, n, r) { ;(this.qualityManager = e), (this.maxNavQuality = this.qualityManager.getMaxNavPanoSize()), (this.maxZoomQuality = this.qualityManager.getMaxZoomPanoSize()), (this.baseSize = t), (this.standardSize = i), (this.highSize = n), (this.ultraHighSize = r), (this.priorityCriteria = new h.PriorityCriteria(null, new o.Vector3(0, 0, 0), new o.Vector3(0, 0, -1), new o.Vector3(0, 0, -1))) } var c, s, l, d, r, u, p, f, o = n('three'), g = (n('../enum/Viewmode'), n('../settings'), n('../settings'), n('../objects/Panorama')), t = n('../util/logger'), i = (n('../enum/Vectors'), n('../enum/PanoSizeClass'), n('../enum/ModelManagerEvents'), n('../enum/GLCubeFaces'), n('../enum/DownloadStatus')), m = (n('../util/browser'), n('./TileUtils')), v = n('../util/math'), a = (n('events').EventEmitter, new t(e), Object.freeze({ None: 0, DirectionalFOV: 1 })) ;(h.PriorityCriteria = function (e, t, i, n, r) { ;(this.pano = e), (this.cameraPosition = new o.Vector3().copy(t)), (this.cameraDir = new o.Vector3().copy(i)), (this.panoSpaceDir = new o.Vector3().copy(n)), (this.upcomingPanos = r), (this.copy = function (e) { ;(this.pano = e.pano), this.cameraPosition.copy(e.cameraPosition), this.cameraDir.copy(e.cameraDir), this.panoSpaceDir.copy(e.panoSpaceDir), (this.upcomingPanos = r) }), (this.zoomingActive = !1) }), (h.DIRECTIONAL_FOV = 180), (h.DIRECTIONAL_FOV_NARROW = 120), (h.MAX_SCORED_PANOS_TOCONSIDER = 6), (h.MAX_SCORED_PANOS_TOADD = 2), (h.MAX_UPCOMING_PANOS_TOADD = 3), (h.DIRECTION_SCORE_STRICTNESS = 0.75), (h.appendQueue = function (e, t) { if (e && t) for (var i = 0; i < t.length; i++) e.push(t[i]) }), (h.prototype.updateCriteria = function (e, t, i, n) { ;(this.priorityCriteria.pano = e), this.priorityCriteria.cameraPosition.copy(t), this.priorityCriteria.cameraDir.copy(i), (this.priorityCriteria.upcomingPanos = n), (this.maxNavQuality = this.qualityManager.getMaxNavPanoSize()), (this.maxZoomQuality = this.qualityManager.getMaxZoomPanoSize()) }), (h.prototype.filterAndPrioritize = ((u = []), (p = []), (f = []), function (e, t, i) { this.populateNeighborPanos(this.priorityCriteria.pano, t, u), this.populateScoredPanos(this.priorityCriteria.pano, t, p, this.priorityCriteria.cameraDir, h.MAX_SCORED_PANOS_TOCONSIDER) var n = this.baseSize, r = this.standardSize, o = this.highSize, a = this.ultraHighSize this.queueTilesForPano(e, i, this.priorityCriteria.pano, n), this.priorityCriteria.upcomingPanos && this.queueTilesForPanos(e, this.priorityCriteria.upcomingPanos, i, n, h.MAX_UPCOMING_PANOS_TOADD), (f.length = 0), this.canDownloadSize(r) && this.queueTilesInDirectionForPano(f, i, this.priorityCriteria.pano, r, this.priorityCriteria.cameraPosition, this.priorityCriteria.cameraDir, h.DIRECTIONAL_FOV_NARROW), h.sortPanoTiles(f, this.priorityCriteria.pano, this.priorityCriteria.cameraDir), h.appendQueue(e, f), this.queueTilesForPanos(e, p, i, n, h.MAX_SCORED_PANOS_TOADD), (f.length = 0), this.canDownloadSize(o) && this.queueTilesInDirectionForPano(f, i, this.priorityCriteria.pano, o, this.priorityCriteria.cameraPosition, this.priorityCriteria.cameraDir, h.DIRECTIONAL_FOV_NARROW), this.canDownloadSize(a) && this.queueTilesInDirectionForPano(f, i, this.priorityCriteria.pano, a, this.priorityCriteria.cameraPosition, this.priorityCriteria.cameraDir, h.DIRECTIONAL_FOV_NARROW), h.sortPanoTiles(f, this.priorityCriteria.pano, this.priorityCriteria.cameraDir), h.appendQueue(e, f), (f.length = 0), this.canDownloadSize(r) && this.queueTilesInDirectionForPano(f, i, this.priorityCriteria.pano, r, this.priorityCriteria.cameraPosition, this.priorityCriteria.cameraDir, h.DIRECTIONAL_FOV), this.canDownloadSize(o) && this.queueTilesInDirectionForPano(f, i, this.priorityCriteria.pano, o, this.priorityCriteria.cameraPosition, this.priorityCriteria.cameraDir, h.DIRECTIONAL_FOV), this.canDownloadSize(a) && this.queueTilesInDirectionForPano(f, i, this.priorityCriteria.pano, a, this.priorityCriteria.cameraPosition, this.priorityCriteria.cameraDir, h.DIRECTIONAL_FOV), h.sortPanoTiles(f, this.priorityCriteria.pano, this.priorityCriteria.cameraDir), h.appendQueue(e, f), this.queueTilesForPanos(e, u, i, n) })), (h.prototype.canDownloadSize = function (e) { return this.maxNavQuality >= e || (this.maxZoomQuality >= e && this.zoomingActive) }), (h.prototype.populateNeighborPanos = function (e, t, i) { ;(i = i || []).length = 0 var n = t.getNeighbours(e) for (var r in n) if (n.hasOwnProperty(r)) { var o = t.get(r) i.push(o) } return i }), (h.prototype.populateScoredPanos = function (e, t, i, n, r) { ;(i = i || []).length = 0 var o = [g.filters.inPanoDirection(e.position, n, h.DIRECTION_SCORE_STRICTNESS), g.filters.not(e)], a = [g.scoreFunctions.distanceSquared(e), g.scoreFunctions.direction(e.position, n)], s = t.sortByScore(o, a) if (s) for (var l = 0; l < s.length && l < r; l++) { var c = s[l].item i.push(c) } return i }), (h.prototype.queueTilesForPanos = function (e, t, i, n, r) { for (var o = 0, a = 0; a < t.length; a++) { var s = t[a] if (((o += 0 < this.queueTilesForPano(e, i, s, n) ? 1 : 0), r && r <= o)) break } return o }), (h.prototype.queueTilesForPano = ((r = { filter: a.None }), function (e, t, i, n) { return this.filterAndQueueTileDownloadDescriptors(e, t, i, n, r) })), (h.prototype.queueTilesForPanosInDirection = ((d = new o.Vector3()), function (e, t, i, n, r, o, a, s) { for (var l = 0, c = 0; c < i.length; c++) { var h = i[c] d.copy(h.position), d.sub(r), d.normalize() var u = Math.max(Math.min(o.dot(d), 1), -1) if (v.getFOVDotThreshold(a) <= u && ((l += 0 < this.queueTilesInDirectionForPano(e, t, h, n, r, o, a) ? 1 : 0), s && s <= l)) break } return l })), (h.prototype.queueTilesInDirectionForPanos = function (e, t, i, n, r, o, a, s) { for (var l = 0, c = 0; c < i.length; c++) { var h = i[c] if (((l += 0 < this.queueTilesInDirectionForPano(e, t, h, n, o, a) ? 1 : 0), s && s <= l)) break } return l }), (h.prototype.queueTilesInDirectionForPano = ((s = { filter: a.DirectionalFOV, direction: new o.Vector3(), fov: 60 }), (l = new o.Vector3()), function (e, t, i, n, r, o, a) { return l.copy(o), m.getRelativeDirection(i.quaternion, l), s.direction.copy(l), (s.fov = a), this.filterAndQueueTileDownloadDescriptors(e, t, i, n, s) })), (h.prototype.filterAndQueueTileDownloadDescriptors = ((c = []), function (e, t, i, n, r) { var o = t.getTileDownloadDescriptors(i, n) ;(c.length = 0), this.filterTileDownloadDescriptors(i, o, c, r) for (var a = 0, s = 0; s < c.length; s++) { var l = c[s] l && (e.push(l), a++) } return a })), (h.prototype.filterTileDownloadDescriptors = (new o.Vector3(), function (e, t, i, n) { var r, o switch (n.filter) { case a.DirectionalFOV: for (r = 0; r < t.length; r++) (o = t[r]), m.isTileWithinFOV(o.panoSize, o.tileSize, o.face, o.tileX, o.tileY, n.direction, n.fov) && i.push(o) break default: for (r = 0; r < t.length; r++) (o = t[r]), i.push(o) } for (r = 0; r < i.length; r++) (o = i[r]), this.canIncludeDescriptor(o) || (i[r] = null) })), (h.prototype.canIncludeDescriptor = function (e) { return e.status !== i.Downloading && e.status !== i.Downloaded }), (h.prototype.canIncludePano = function (e, t) { return !e.isLoaded(t) }), (h.getFOVDotThreshold = function (e) { return Math.cos(o.Math.degToRad(e / 2)) }) var y = ((A._panoSpaceDir = new o.Vector3()), (A._fovThreshold = -1), (A._fovThresholdNarrow = -1), A) function A(e, t) { var i = A._panoSpaceDir, n = A._fovThreshold, r = A._fovThresholdNarrow, o = Math.max(Math.min(i.dot(e.direction), 1), -1), a = Math.max(Math.min(i.dot(t.direction), 1), -1) return ( (e._dot = o), (t._dot = a), n <= o && a < n ? -1 : o < n && n <= a ? 1 : r <= o && a < r ? -1 : o < r && r <= a ? 1 : e.panoSize > t.panoSize ? 1 : t.panoSize > e.panoSize ? -1 : -(o - a) ) } ;(h.sortPanoTiles = function (e, t, i) { y._panoSpaceDir.copy(i), m.getRelativeDirection(t.quaternion, y._panoSpaceDir), (y._fovThresholdNarrow = v.getFOVDotThreshold(h.DIRECTIONAL_FOV_NARROW)), (y._fovThreshold = v.getFOVDotThreshold(h.DIRECTIONAL_FOV)), e.sort(y) }), (h.insertSortedPanoTile = function (e, t, i, n) { y._panoSpaceDir.copy(n), m.getRelativeDirection(i.quaternion, y._panoSpaceDir), (y._fovThresholdNarrow = v.getFOVDotThreshold(h.DIRECTIONAL_FOV_NARROW)), (y._fovThreshold = v.getFOVDotThreshold(h.DIRECTIONAL_FOV)) for (var r = -1, o = 0; o < e.length; o++) { if (y(t, e[o]) <= 0) { r = o break } } if (-1 === r) e[e.length] = t else { for (var a = e.length; r < a; a--) e[a] = e[a - 1] e[r] = t } }), (h.prototype.setZoomingActive = function (e) { e !== this.zoomingActive && (this.zoomingActive = e) }), (C.exports = h) }).call(this, '/js/tile/TilePrioritizer.js') }, { '../enum/DownloadStatus': 24, '../enum/GLCubeFaces': 25, '../enum/ModelManagerEvents': 33, '../enum/PanoSizeClass': 36, '../enum/Vectors': 50, '../enum/Viewmode': 51, '../objects/Panorama': 148, '../settings': 166, '../util/browser': 182, '../util/logger': 189, '../util/math': 190, './TileUtils': 174, events: 202, three: 217 } ], 173: [ function (e, t, i) { 'use strict' function f(e, t) { ;(this.levels = t), (this.tileSize = e), (this.root = null), (this.allNodes = []), (function (e) { e.root = (function e(t, i, n) { if (n > t.levels) return null var r = new a(t, i) t.allNodes.push(r) for (var o = 0; o < s; o++) r.children[o] = e(t, r, n + 1) return r })(e, null, 0) })(this) } function a(e, t) { ;(this.tree = e), (this.parent = t), (this.children = []), (this.id = ++n) } var g = (e('three'), e('./TileUtils'), e('../objects/Panorama'), e('../util/panorama'), e('events').EventEmitter, 2), s = g * g f.TraversalType = Object.freeze({ PreOrder: 0, PostOrder: 1 }) var n = 0 ;(f.getLevelCountForSize = function (e, t) { var i = 0 for (t < e && (t = e); !((t /= g) < e); ) i++ return i }), (f.getSizeForLevel = function (e, t) { return Math.pow(g, t) * e }), (f.prototype.getSubNode = function (e, t, i) { ;(!t || e < this.tileSize) && (t = 0), (!i || e < this.tileSize) && (i = 0), e < this.tileSize && (e = this.tileSize) var n = f.getLevelCountForSize(this.tileSize, e) return (function e(t, i, n, r, o) { if (!t) return null if (0 === n) return t if (!t.children || 0 === t.children.length) return null var a = Math.pow(g, n) / g, s = r % a, l = o % a, c = Math.floor(o / a), h = Math.floor(r / a), u = c * g + h return e(t.children[u], i + 1, n - 1, s, l) })(this.root, 0, n, t, i) }), (f.prototype.breadthFirst = function (e) { var t = !!(e = e || {}).nullLevelEnd, i = e.maxLevel, n = e.minLevel, r = e.callback, o = e.saveVisited, a = [], s = {}, l = 0 for (a.push(this.root), a.push(s); 0 < a.length && !(i && i < l); ) { var c = a.shift() if (c === s) (!n || n <= l) && (r && t && r(null), o && t && o.push(null)), 0 < a.length && a.push(s), l++, 0 else { if (c.children) for (var h = 0; h < c.children.length; h++) { c.children[h] && a.push(c.children[h]) } var u = this.getFaceIndexFromNode(c) ;(!n || n <= l) && (r && r(c, l, u), o && o.push(c)), 0 } } }), (f.prototype.getFaceIndexFromNode = function (e) { if (!e) return -1 for (var t = 1, i = e, n = 0, r = 0; ; ) { var o = i.parent if (!o) break for (var a = -1, s = 0; s < o.children.length; s++) o.children[s] === i && (a = s) ;(n = (a % g) * t + n), (r = Math.floor(a / g) * t + r), (t *= g), (i = o) } return r * t + n }), (f.prototype.depthFirst = function (e, t, i) { !(function e(t, i, n, r, o, a, s, l) { if (t) { s = s || f.TraversalType.PreOrder var c = r * g + n if ((s === f.TraversalType.PreOrder && (o && o(t, i, c, n, r), a && a.push(t)), t.children && 0 !== t.children.length)) { for (var h = r * g, u = n * g, d = 0; d < g; d++) for (var p = 0; p < g; p++) e(t.children[p * g + d], i + 1, u + d, h + p, o, a, s, l) s === f.TraversalType.PostOrder && (o && o(t, i, c, n, r), a && a.push(t)) } } })(this.root, 0, 0, 0, e, t, i, this.tileSize) }), (t.exports = f) }, { '../objects/Panorama': 148, '../util/panorama': 191, './TileUtils': 174, events: 202, three: 217 } ], 174: [ function (e, t, i) { 'use strict' var n, a, s, p, f, g, E, l, c, h, u, d, r, o, m = e('../enum/GLCubeFaces'), _ = e('../util/MathLight'), b = {} ;(b.TILE_SIZE = 512), (b.FACES_PER_PANO = 6), (b.LocationOnTile = { Center: 0, UpperLeft: 1, UpperRight: 2, LowerRight: 3, LowerLeft: 4 }), (b.getTileVector = function (e, t, i, n, r, o, a, s) { var l = e / t, c = (t / e) * 2, h = c / 2, u = (n / l) * 2 - 1 + h, d = ((r = l - 1 - r) / l) * 2 - 1 + h switch ((o = o || b.LocationOnTile.Center)) { case b.LocationOnTile.UpperLeft: ;(u -= h), (d += h), (u += a * c) break case b.LocationOnTile.UpperRight: ;(u += h), (d += h), (d -= a * c) break case b.LocationOnTile.LowerRight: ;(u += h), (d -= h), (u -= a * c) break case b.LocationOnTile.LowerLeft: ;(u -= h), (d -= h), (d += a * c) break case b.LocationOnTile.Center: } switch (i) { case m.GL_TEXTURE_CUBE_MAP_POSITIVE_X: _.setVector(s, -1, d, -u) break case m.GL_TEXTURE_CUBE_MAP_NEGATIVE_X: _.setVector(s, 1, d, u) break case m.GL_TEXTURE_CUBE_MAP_POSITIVE_Y: _.setVector(s, -u, 1, -d) break case m.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: _.setVector(s, -u, -1, d) break case m.GL_TEXTURE_CUBE_MAP_POSITIVE_Z: _.setVector(s, -u, d, 1) break case m.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: _.setVector(s, u, d, -1) } _.normalize(s) }), (b.getFaceForTile = function (e, t) { var i = b.TILE_SIZE e < b.TILE_SIZE && (i = e) var n = Math.floor(e / i), r = n * n return Math.floor(t / r) }), (b.getTileLocation = function (e, t, i) { var n = b.TILE_SIZE e < b.TILE_SIZE && (n = e) var r = b.getFaceForTile(e, t), o = Math.floor(e / n), a = t - r * (o * o) ;(i.tileX = a % o), (i.tileY = Math.floor(a / o)), (i.face = r), (i.faceTileIndex = a) }), (b.getTileCountForSize = function (e) { if (e <= b.TILE_SIZE) return b.FACES_PER_PANO var t = Math.floor(e / b.TILE_SIZE) return t * t * b.FACES_PER_PANO }), (b.getRelativeDirection = ((r = new _.Matrix4()), (o = new _.Quaternion()), function (e, t) { o.copy(e), o.inverse(), r.makeRotationFromQuaternion(o), r.applyToVector3(t), _.normalize(t) })), (b.matchingTilesInDirection = ((c = new _.Vector3()), (h = new _.Vector3(0, 0, -1)), (u = new _.Quaternion()), (l = { face: -1, faceTileIndex: -1, tileX: -1, tileY: -1 }), (d = function (e, t, i) { for (var n = b.getTileCountForSize(e), r = 0, o = 0; o < n; o++) b.getTileLocation(e, o, l), (t && !t(l)) || (r++, i && ((a = l), i.push({ face: a.face, faceTileIndex: a.faceTileIndex, tileX: a.tileX, tileY: a.tileY }))) var a return r }), function (e, t, i, n, r, o) { var a = t < b.TILE_SIZE ? t : b.TILE_SIZE if ((b.getTileCountForSize(t), !n && !r)) return d(t, null, o) var s = !!r return ( (r = r || n), (r = Math.max(0, Math.min(r, 360))), (n = Math.max(0, Math.min(n, 360))), _.copyVector(i, c), b.getRelativeDirection(e.quaternion, c), s ? (u.setFromUnitVectors(c, h), d( t, function (e) { return b.isTileWithinFrustum(t, a, e.face, e.tileX, e.tileY, u, n, r) }, o )) : d( t, function (e) { return b.isTileWithinFOV(t, a, e.face, e.tileX, e.tileY, c, n) }, o ) ) })), (b.isTileWithinFrustum = ((E = new _.Vector3()), function (e, t, i, n, r, o, a, s) { for ( var l = Math.tan(0.5 * s * _.RADIANS_PER_DEGREE), c = -l, h = Math.tan(0.5 * a * _.RADIANS_PER_DEGREE), u = -h, d = b.mapFaceToCubemapFace(i), p = 0, f = 0, g = 0, m = 0, v = 0, y = b.LocationOnTile.Center; y <= b.LocationOnTile.LowerLeft; y++ ) if ((b.getTileVector(e, t, d, n, r, y, 0, E), _.applyQuaternionToVector(o, E), -1e-5 <= E.z)); else { var A = -1 / E.z, C = E.x * A, I = E.y * A l < I ? p++ : I < c && f++, h < C ? g++ : C < u && m++, v++ } return f !== v && p !== v && g !== v && m !== v })), (b.isTileWithinFOV = ((p = new _.Vector3()), (f = new _.Vector3(0, 1, 0)), (g = new _.Vector3(1, 0, 0)), function (e, t, i, n, r, o, a) { var s = b.mapFaceToCubemapFace(i) if ((_.cross(o, f, g), b.getTileVector(e, t, s, n, r, b.LocationOnTile.Center, 0, p), b.isWithinFOV(p, o, a, null))) return !0 for (var l = a / 360, c = Math.floor(1 / l), h = 0, u = 0; u < c; u++) { for (var d = b.LocationOnTile.UpperLeft; d <= b.LocationOnTile.LowerLeft; d++) if ((b.getTileVector(e, t, s, n, r, d, h, p), b.isWithinFOV(p, o, a, null))) return !0 h += l } return !1 })), (b.isWithinFOV = ((a = new _.Vector3()), (s = new _.Vector3()), function (e, t, i, n) { if ((_.copyVector(e, s), n)) { _.copyVector(n, a), _.normalize(a) var r = _.dot(a, e) ;(a.x *= r), (a.y *= r), (a.z *= r), _.subVector(s, a) } var o = (i / 2) * _.RADIANS_PER_DEGREE return Math.cos(o) <= _.dot(s, t) })), (b.mapFaceToCubemapFace = ((n = { 0: m.GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 1: m.GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 2: m.GL_TEXTURE_CUBE_MAP_POSITIVE_X, 3: m.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 4: m.GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 5: m.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y }), function (e) { return n[e] })), (t.exports = b) }, { '../enum/GLCubeFaces': 25, '../util/MathLight': 176 } ], 175: [ function (i, n, e) { ;(function (e) { 'use strict' function t() { ;(this.list = []), (this.index = {}), Object.defineProperty(this, 'length', { get: function () { return this.list.length } }) } new (i('./common'), i('./logger'))(e), (t.prototype.forEach = function (e) { this.list.forEach(e) }), (t.prototype.add = function (e) { this.list.push(e), (this.index[this.getIndex(e)] = e) }), (t.prototype.getIndex = function (e) { throw new Error('IndexedCollection.getIndex not implemented in subclass.') }), (t.prototype.extend = function (e) { for (var t = 0; t < e.length; t++) this.add(e[t]) }), (t.prototype.get = function (e) { return this.index[e] }), (t.prototype.first = function () { return this.list[0] }), (t.prototype.last = function () { return this.list[this.list.length - 1] }), (t.prototype.reIndex = function () { this.index = {} var t = this this.forEach(function (e) { t.index[t.getIndex(e)] = e }) }), (t.prototype.filter = function (e) { var t = this.list.filter(e) return this.reIndex(), t }), (t.prototype.reduce = function (e, t) { return this.list.reduce(e, t) }), (t.prototype.sort = function (e) { return this.list.sort(e) }), (t.prototype.indexOf = function (e) { for (var t = 0; t < this.list.length; ++t) if (this.list[t] === e) return t return -1 }), (n.exports = t) }).call(this, '/js/util/IndexedCollection.js') }, { './common': 185, './logger': 189 } ], 176: [ function (e, t, i) { 'use strict' e('../constants') var n, r, o = {} ;(o.RADIANS_PER_DEGREE = Math.PI / 180), (o.DEGREES_PER_RADIAN = 180 / Math.PI), (o.Vector3 = function (e, t, i) { ;(this.x = e || 0), (this.y = t || 0), (this.z = i || 0) }), (o.Matrix4 = function () { ;(this.elements = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])), 0 < arguments.length && console.error('MathLight.Matrix4: the constructor no longer reads arguments. use .set() instead.') }), (o.Matrix4.prototype = { identity: function () { return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this }, copy: function (e) { return this.elements.set(e.elements), this }, applyToVector3: function (e) { var t = e.x, i = e.y, n = e.z, r = this.elements return (e.x = r[0] * t + r[4] * i + r[8] * n + r[12]), (e.y = r[1] * t + r[5] * i + r[9] * n + r[13]), (e.z = r[2] * t + r[6] * i + r[10] * n + r[14]), this }, getInverse: function (e, t) { var i = this.elements, n = e.elements, r = n[0], o = n[1], a = n[2], s = n[3], l = n[4], c = n[5], h = n[6], u = n[7], d = n[8], p = n[9], f = n[10], g = n[11], m = n[12], v = n[13], y = n[14], A = n[15], C = p * y * u - v * f * u + v * h * g - c * y * g - p * h * A + c * f * A, I = m * f * u - d * y * u - m * h * g + l * y * g + d * h * A - l * f * A, E = d * v * u - m * p * u + m * c * g - l * v * g - d * c * A + l * p * A, _ = m * p * h - d * v * h - m * c * f + l * v * f + d * c * y - l * p * y, b = r * C + o * I + a * E + s * _ if (0 == b) { var w = "MathLight.Matrix4.getInverse(): can't invert matrix, determinant is 0" if (t) throw new Error(w) return console.warn(w), this.identity() } var T = 1 / b return ( (i[0] = C * T), (i[1] = (v * f * s - p * y * s - v * a * g + o * y * g + p * a * A - o * f * A) * T), (i[2] = (c * y * s - v * h * s + v * a * u - o * y * u - c * a * A + o * h * A) * T), (i[3] = (p * h * s - c * f * s - p * a * u + o * f * u + c * a * g - o * h * g) * T), (i[4] = I * T), (i[5] = (d * y * s - m * f * s + m * a * g - r * y * g - d * a * A + r * f * A) * T), (i[6] = (m * h * s - l * y * s - m * a * u + r * y * u + l * a * A - r * h * A) * T), (i[7] = (l * f * s - d * h * s + d * a * u - r * f * u - l * a * g + r * h * g) * T), (i[8] = E * T), (i[9] = (m * p * s - d * v * s - m * o * g + r * v * g + d * o * A - r * p * A) * T), (i[10] = (l * v * s - m * c * s + m * o * u - r * v * u - l * o * A + r * c * A) * T), (i[11] = (d * c * s - l * p * s - d * o * u + r * p * u + l * o * g - r * c * g) * T), (i[12] = _ * T), (i[13] = (d * v * a - m * p * a + m * o * f - r * v * f - d * o * y + r * p * y) * T), (i[14] = (m * c * a - l * v * a - m * o * h + r * v * h + l * o * y - r * c * y) * T), (i[15] = (l * p * a - d * c * a + d * o * h - r * p * h - l * o * f + r * c * f) * T), this ) }, makeRotationFromQuaternion: function (e) { var t = this.elements, i = e.x, n = e.y, r = e.z, o = e.w, a = i + i, s = n + n, l = r + r, c = i * a, h = i * s, u = i * l, d = n * s, p = n * l, f = r * l, g = o * a, m = o * s, v = o * l return ( (t[0] = 1 - (d + f)), (t[4] = h - v), (t[8] = u + m), (t[1] = h + v), (t[5] = 1 - (c + f)), (t[9] = p - g), (t[2] = u - m), (t[6] = p + g), (t[10] = 1 - (c + d)), (t[3] = 0), (t[7] = 0), (t[11] = 0), (t[12] = 0), (t[13] = 0), (t[14] = 0), (t[15] = 1), this ) } }), (o.Quaternion = function (e, t, i, n) { ;(this._x = e || 0), (this._y = t || 0), (this._z = i || 0), (this._w = void 0 !== n ? n : 1) }), (o.Quaternion.prototype = { get x() { return this._x }, set x(e) { this._x = e }, get y() { return this._y }, set y(e) { this._y = e }, get z() { return this._z }, set z(e) { this._z = e }, get w() { return this._w }, set w(e) { this._w = e }, copy: function (e) { ;(this._x = e.x), (this._y = e.y), (this._z = e.z), (this._w = e.w) }, inverse: function () { return this.conjugate().normalize() }, conjugate: function () { return (this._x *= -1), (this._y *= -1), (this._z *= -1), this }, length: function () { return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w) }, normalize: function () { var e = this.length() return ( 0 === e ? ((this._x = 0), (this._y = 0), (this._z = 0), (this._w = 1)) : ((e = 1 / e), (this._x = this._x * e), (this._y = this._y * e), (this._z = this._z * e), (this._w = this._w * e)), this ) }, setFromAxisAngle: function (e, t) { var i = t / 2, n = Math.sin(i) return (this._x = e.x * n), (this._y = e.y * n), (this._z = e.z * n), (this._w = Math.cos(i)), this }, setFromUnitVectors: function (e, t) { return ( void 0 === n && (n = new o.Vector3()), (r = o.dot(e, t) + 1) < 1e-6 ? ((r = 0), Math.abs(e.x) > Math.abs(e.z) ? o.setVector(n, -e.y, e.x, 0) : o.setVector(n, 0, -e.z, e.y)) : o.cross(e, t, n), (this._x = n.x), (this._y = n.y), (this._z = n.z), (this._w = r), this.normalize() ) }, multiply: function (e) { return this.multiplyQuaternions(this, e) }, premultiply: function (e) { return this.multiplyQuaternions(e, this) }, multiplyQuaternions: function (e, t) { var i = e._x, n = e._y, r = e._z, o = e._w, a = t._x, s = t._y, l = t._z, c = t._w return (this._x = i * c + o * a + n * l - r * s), (this._y = n * c + o * s + r * a - i * l), (this._z = r * c + o * l + i * s - n * a), (this._w = o * c - i * a - n * s - r * l), this } }), (o.convertWorkshopVector = function (e) { return new o.Vector3(-e.x, e.y, e.z) }), (o.convertWorkshopQuaternion = function (e) { return new o.Quaternion(-e.x, e.y, e.z, -e.w).multiply(new o.Quaternion(Math.sqrt(2) / 2, Math.sqrt(2) / 2, 0, 0)) }), (o.convertWorkshopOrthoZoom = function (e) { return -1 === e ? -1 : ((e * ($('#player').width() / $('#player').height())) / g_snapShotWidth) * g_snapShotHeight }), (o.convertWorkshopPanoramaQuaternion = function (e) { return new o.Quaternion(e.x, -e.y, -e.z, e.w).normalize().multiply(new o.Quaternion().setFromAxisAngle(new o.Vector3(0, 1, 0), 270 * o.RADIANS_PER_DEGREE)) }), (o.normalize = function (e) { var t = e.x * e.x + e.y * e.y + e.z * e.z, i = Math.sqrt(t) ;(e.x /= i), (e.y /= i), (e.z /= i) }), (o.dot = function (e, t) { return e.x * t.x + e.y * t.y + e.z * t.z }), (o.cross = function (e, t, i) { var n = e.x, r = e.y, o = e.z ;(i.x = r * t.z - o * t.y), (i.y = o * t.x - n * t.z), (i.z = n * t.y - r * t.x) }), (o.setVector = function (e, t, i, n) { ;(e.x = t), (e.y = i), (e.z = n) }), (o.copyVector = function (e, t) { ;(t.x = e.x), (t.y = e.y), (t.z = e.z) }), (o.addVector = function (e, t) { ;(e.x += t.x), (e.y += t.y), (e.z += t.z) }), (o.subVector = function (e, t) { ;(e.x -= t.x), (e.y -= t.y), (e.z -= t.z) }), (o.applyQuaternionToVector = function (e, t) { var i = t.x, n = t.y, r = t.z, o = e.x, a = e.y, s = e.z, l = e.w, c = l * i + a * r - s * n, h = l * n + s * i - o * r, u = l * r + o * n - a * i, d = -o * i - a * n - s * r ;(t.x = c * l + d * -o + h * -s - u * -a), (t.y = h * l + d * -a + u * -o - c * -s), (t.z = u * l + d * -s + c * -a - h * -o) }), (o.angleBetweenVectors = function (e, t) { return Math.acos(o.dot(e, t)) }), (t.exports = o) }, { '../constants': 8 } ], 177: [ function (c, h, e) { ;(function (e) { 'use strict' function t(e) { ;(this.cache = null), (this.expires = 0) } function i() { ;(this.baseUrl = null), (this.cache = null), (this.expires = 0) } function n() { ;(this.baseUrl = null), (this.expires = 0) } function r(e) { ;(this.initialLoadingPromise = null), (this.endpoint = e + '?type=3'), (this.urlContainer = null), (this.authorizationHeader = s.getAuthorizationHeader()), (this.containerClasses = [n, i, t]) } c('./ajax') var o = c('./logger'), a = c('../constants'), s = c('./showcase'), l = (c('../ab'), new o(e)) ;(t.prototype = { version: 1, validate: function (e) { return 'catalog.json' in e && 0 < Object.keys(e).length }, update: function (e) { return (this.cache = e), (this.expires = Date.now() + a.signedUrlDefaultExpireTime), $.when() }, get: function (e) { return this.cache[e] } }), (i.prototype = { version: 2, validate: function (e) { return 'catalog.json' in e && 'base.url' in e && 1 < Object.keys(e).length }, update: function (e) { return (this.baseUrl = e['base.url']), (this.cache = e), (this.expires = Date.now() + a.signedUrlDefaultExpireTime), $.when() }, get: function (e) { var t = this.cache[e] return t ? this.baseUrl.replace('{{filename}}', e) + t : null } }), (n.prototype = { version: 3, validate: function (e) { return e.templates && e.catalog_file && (!e.expires || 1e3 * e.expires > Date.now()) }, update: function (e) { return (this.baseUrl = e.templates[0]), e.expires ? (this.expires = 1e3 * e.expires) : (this.expires = Date.now() + a.signedUrlDefaultExpireTime), $.when() }, get: function (e) { return this.baseUrl.replace('{{filename}}', e) } }), (r.prototype = { init: function () { return ( this.initialLoadingPromise || (setInterval( function () { var e = this.urlContainer ? this.urlContainer.expires : Date.now() Date.now() + a.signedUrlRefreshBuffer > e && (l.debug('Refreshing urls...'), this.refresh() .done(function () { l.debug('Refreshed') }) .fail(function () { l.error('Failed url refresh, urls might go stale soon') })) }.bind(this), a.signedUrlCheckInterval ), (this.initialLoadingPromise = this.refresh())), this.initialLoadingPromise ) }, refresh: function (e) { return {}, $.Deferred().resolve() }, get: function (e) { return window.DATA.files.templates[0].replace('{{filename}}', e) } }), (h.exports = r) }).call(this, '/js/util/ModelUrls.js') }, { '../ab': 3, '../constants': 8, './ajax': 181, './logger': 189, './showcase': 193 } ], 178: [ function (l, c, e) { ;(function (e) { 'use strict' function t() { i.call(this), (this.neighbourMap = {}), (this.map = null) } var f, g, m, v, y, A, C, I, E, _, b, w = l('three'), n = l('./common'), a = l('../settings'), r = l('../objects/Panorama'), o = ((a = l('../settings')), l('./aStar')), T = new (l('./logger'))(e), i = l('./IndexedCollection'), s = l('./transitions') n.inherit(t, i), (t.prototype.getIndex = function (e) { return e.id }), (t.prototype.find = function (e, t) { var i = n.filterAll(this.list, e) return 0 === i.length ? null : (t && t.forEach(function (e) { i = n.stableSort(i, e) }), i[0]) }), /* t.prototype.sortByScore = function(e, t) { var i = n.filterAll(this.list, e); return 0 === i.length ? null : i = i.map(function(i) { return { pano: i, score: t.reduce(function(e, t) { return e + t(i) }, 0) } }).sort(function(e, t) { return t.score - e.score }) } */ (t.prototype.sortByScore = function (request, rank) { return common.sortByScore(this.list, request, rank) }), (t.prototype.lowestByScore = function (e, t, i) { return this.findRankedByScore(0, e, t, i) }), (t.prototype.findRankedByScore = function (e, t, i, n) { n && ((n.candidates = null), (n.pano = null)), (e = e || 0) var r = this.sortByScore(t, i) return !r || 0 === r.length || e >= r.length ? null : (n && ((n.candidates = r), (n.pano = r[e].item)), r[e].item) }), (t.prototype.showPanoScores = function (e) { this.list.forEach(function (e) { e.removeTextSprite() }) var t = 6344768 e.forEach(function (e) { e.pano.addTextSprite(e.score.toFixed(2), t), (t = 16428055) }) }), (t.prototype.isNeighbour = function (e, t) { return this.neighbourMap[e.id][t.id] }), (t.prototype.getNeighbours = function (e) { return this.neighbourMap[e.id] }), (t.prototype.setNeighbour = function (e, t, i) { return ( this.neighbourMap[e.id] || (this.neighbourMap[e.id] = {}), this.neighbourMap[t.id] || (this.neighbourMap[t.id] = {}), (this.neighbourMap[e.id][e.id] = !0), (this.neighbourMap[t.id][t.id] = !0), (this.neighbourMap[e.id][t.id] = i), (this.neighbourMap[t.id][e.id] = i), this.neighbourMap[e.id] ) }), (t.prototype.findClosest = function (e, t) { var i = [r.filters.isPanoAligned()] return t && i.push(r.filters.inDirection(e, t, 0.75)), this.find(i, [r.sortFunctions.distanceToPoint(e)]) }), (t.prototype.dualNeighbors = function (e, t) { var i, n = [] for (i in this.neighbourMap[e.id]) this.neighbourMap[t.id][i] && n.push(i) return n }), (t.prototype.populate_path_graph = function () { var e, t, i, n, r, o, a, s, l = Date.now(), c = {}, h = 0, u = new w.Vector3(0, 0, 0) for (e = 0; e < this.list.length; e += 1) { for (t in ((s = !(a = {})), (i = (r = this.list[e]).neighbourPanos || r.findNeighourPanos()))) if (i[t]) { ;(o = this.index[t]), u.copy(r.floorPosition), u.sub(o.floorPosition) var d = Math.sqrt(u.x * u.x + u.z * u.z), p = (Math.abs(u.y), Math.max(d, 0.01), Math.max(0, Math.abs(u.y) - 0.2)) ;(n = 0 < p ? (1, (p = Math.pow(4 * p, 2)), (d = Math.pow(d, 2)), Math.sqrt(p * p + d * d)) : (1, u.length())), (a[o.id] = n), (s = !0) } s ? (c[r.id] = a) : (h += 1) } ;(this.map = c), T.info('graph ready in ' + (Date.now() - l) + 'ms, ' + h + ' had no neighbors') }), (t.prototype.aStarSearch = function (e, t) { var i = Date.now(), n = new o({ start: e, isEnd: function (e) { return e === t }, neighbor: function (e) { var t = e.neighbourPanos || e.findNeighourPanos(), i = [] for (var n in t) t[n] && i.push(this.index[n]) //add: t[n] && return i }.bind(this), distance: function (e, t) { return this.map[e.id][t.id] }.bind(this), heuristic: function (e, t) { return 1 }.bind(this), hash: function (e) { return e.id }, timeout: 5e3 }) if ((T.debug('A* search in ' + (Date.now() - i) + 'ms'), 'success' !== n.status)) return T.debug('Did not find A* path from ' + e + ' to ' + t), null T.debug('Total cost ' + n.cost.toPrecision(3) + ', ' + n.path.length + ' steps') var r = [] return ( n.path.forEach(function (e) { r.push(e.id) }), r ) }), (t.prototype.includeNodesNearPath = ((f = new w.Vector3()), (g = new w.Vector3()), (m = new w.Vector3()), (v = new w.Vector3()), (y = new w.Vector3()), (A = new w.Vector3()), (C = new w.Vector3()), (I = new w.Vector3()), (E = []), (_ = new w.Vector3()), (b = new w.Vector3()), function (e, t) { if (e) for ( var i = function (e, t, i) { return y.copy(t).sub(e), y.dot(i) }, n = function (e, t) { return i(_, e.position, m) - i(_, t.position, m) }, r = 0; r < e.length - 1; ) { var o = e[r], a = e[r + 1], s = this.index[o], l = this.index[a] _.copy(s.position), b.copy(l.position), (E.length = 0), f.copy(b).sub(_), m.copy(f).normalize() for (var c = 0; c < this.list.length; c++) { var h = this.list[c] y.copy(h.position).sub(_) var u = y.dot(m) 0 < u && (C.copy(m), C.multiplyScalar(u), A.copy(y), A.sub(C), A.length() < t && (g.copy(f).negate(), v.copy(g).normalize(), I.copy(h.position).sub(b), 0 < I.dot(v) && E.push(h))) } if (0 < E.length) { E.sort(n) for (var d = e.length + E.length - 1; d >= r + E.length; d--) e[d] = e[d - E.length] for (var p = 0; p < E.length; p++) e[p + r + 1] = E[p].id } r += E.length + 1 } })), /* t.prototype.fadeMarkerOpacity = function(e, t) { var i = void 0 === e ? a.panorama.markerOpacity : e , n = this.list.findIndex(function(e) { return e.marker }); if (!(n < 0)) { var r = this.list[n].marker.material.opacity; if (r !== e) { var o = i - r; s.trigger({ func: function(e, t) { var i = r + e * o; this.forEach(function(e) { e.marker && (e.marker.material.opacity = i) }) } .bind(this), duration: void 0 === t ? a.markerOpacityTransitionTime : t, name: "_fpm" }) } } } */ (t.prototype.fadeMarkerOpacity = function (e, t, gr) { s.cancelById('fadeMarkerOpacity') var n = this.list.findIndex(function (e) { //why? 难道没有marker的pano吗 findeIndex:获取数组中函数返回值不为fasle的第一个元素索引位置 return e.marker }) if (n < 0) { //logger.info('marker findIndex<0') return } var group var tran = function (list, index) { list.member = list.member.filter(function (m) { return m.marker && m.marker.material.opacity != list.toOp }) s.trigger({ func: function (e, t) { //e:0-1 list.member.forEach(function (m) { var o = m.marker.oldOpacity var i = o + e * (list.toOp - o) m.marker && (m.marker.material.opacity = i) }) }.bind(this), duration: void 0 == t ? a.markerOpacityTransitionTime : t, name: '_fpm_' + index, id: 'fadeMarkerOpacity' }) } this.forEach(function (e) { //先记录旧的opacity e.marker && (e.marker.oldOpacity = e.marker.material.opacity) }) group = gr /* if (e > 0 && gr) { group = gr } else { group = [ { member: this.list, toOp: 0, }, ] } */ for (var i = 0; i < group.length; i++) { tran(group[i], i) } }), (c.exports = t) }).call(this, '/js/util/PanoramaCollection.js') }, { '../objects/Panorama': 148, '../settings': 166, './IndexedCollection': 175, './aStar': 180, './common': 185, './logger': 189, './transitions': 195, three: 217 } ], 179: [ function (e, t, i) { 'use strict' function n() { ;(this.actionSequence = []), (this.actionSequenceInProgress = !1) } function r(e, t, i, n) { c.trackAlways('zoom_' + e, { from: t, to: i, pano: n }) } var o, a, s, l, c = e('../analytics') ;(n.prototype.reset = function (e) { ;(this.actionSequenceInProgress = !1), (this.actionSequence.length = 0) }), (n.prototype.addZoomAction = ((a = o = null), (s = !1), (l = function () { if (((o = null), 0 < this.actionSequence.length)) { var e = this.actionSequence[0].start, t = this.actionSequence[this.actionSequence.length - 1].end 1 === e ? (function (e, t) { r('initial', 1, e, t) })(t, a) : (function (e, t, i) { r('followup', e, t, i) })(e, t, a) } this.reset() }), function (e, t, i) { if (e !== t) { s || ((l = l.bind(this)), (s = !0)), o && (window.clearTimeout(o), (o = null)), (i === a && this.actionSequenceInProgress) || (this.reset(), (a = i)), (this.actionSequenceInProgress = !0) var n = { start: e, end: t } this.actionSequence.push(n), (o = window.setTimeout(l, 150)) } })), (t.exports = n) }, { '../analytics': 4 } ], 180: [ function (e, t, i) { 'use strict' function g(e) { if (void 0 === e.parent) return [e.data] var t = g(e.parent) return t.push(e.data), t } function m(e) { return e.toString() } function v(e, t) { return e.f - t.f } var y = e('Set'), A = e('heap'), C = e('dict') t.exports = function (e) { void 0 === e.timeout && (e.timeout = 1 / 0) var t = e.hash || m, i = { data: e.start, g: 0, h: e.heuristic(e.start) }, n = i i.f = i.h var r = new y(), o = new A(v), a = C() o.push(i), a.set(t(i.data), i) for (var s = new Date(); o.size(); ) { if (new Date() - s > e.timeout) return { status: 'timeout', cost: n.g, path: g(n) } var l = o.pop() if ((a.delete(t(l.data)), e.isEnd(l.data))) return { status: 'success', cost: l.g, path: g(l) } r.add(t(l.data)) for (var c = e.neighbor(l.data), h = 0; h < c.length; h++) { var u = c[h] if (!r.contains(t(u))) { var d = l.g + e.distance(l.data, u), p = a.get(t(u)), f = !1 if (void 0 === p) (p = { data: u }), a.set(t(u), p) else { if (p.g < d) continue f = !0 } ;(p.parent = l), (p.g = d), (p.h = e.heuristic(u)), (p.f = d + p.h), p.h < n.h && (n = p), f ? o.heapify() : o.push(p) } } } return { status: 'noPath', cost: n.g, path: g(n) } } }, { Set: 196, dict: 210, heap: 211 } ], 181: [ function (i, n, e) { ;(function (e) { 'use strict' function s(e, t, i) { function n() { l.warn('Retrying ', t), s(e, t, i).done(a.resolve.bind(a)).progress(a.notify.bind(a)).fail(a.reject.bind(a)) } var r = (function (e, t, i) { var n = new XMLHttpRequest() if (i && 'withCredentials' in n) n.open(e, t, i) else if ('undefined' != typeof XDomainRequest) (n = new XDomainRequest()).open(e, t) else { if (i) throw 'Browser does not support CORS!' n.open(e, t) } return n })(e, t, !1) if ((((i = i || {}).retries = void 0 !== i.retries ? i.retries : 0), (i.retry = void 0 !== i.retry ? i.retry : 'get' === e.toLowerCase()), i.responseType)) if (-1 < ['arraybuffer', 'text', 'json'].indexOf(i.responseType)) r.responseType = i.responseType else { if ('image/jpeg' !== i.responseType) throw new Error('reponseType can only be one of "arraybuffer", "text" or "json", "image/jpeg"') r.responseType = 'arraybuffer' } if ( ('json' === i.responseType && r.setRequestHeader('Accept', 'application/json'), i.auth && r.setRequestHeader('Authorization', i.auth), 'object' == typeof i.data && ((i.data = JSON.stringify(i.data)), r.setRequestHeader('Content-Type', 'application/json')), 'object' == typeof i.headers) ) for (var o in i.headers) r.setRequestHeader(o, i.headers[o]) var a = $.Deferred() return ( (r.onreadystatechange = function (e) { if (4 === this.readyState) if (500 <= this.status && this.status <= 600 && i.retry && i.retries < 3) i.retries++, setTimeout(n, 1e3) else if (200 === this.status) { var t = (function (e, t) { var i = e.response if ('json' === t && 'object' != typeof i) try { i = JSON.parse(e.responseText) } catch (e) { return void a.reject({ error: 'Failed parsing JSON' }) } else if ('image/jpeg' === t) { var n = new Uint8Array(e.response), r = new Blob([n], { type: 'image/jpeg' }), o = URL.createObjectURL(r) ;((i = new Image()).src = o), (i.crossOrigin = 'Anonymous'), (i.onload = function () { URL.revokeObjectURL(o) }) } return i })(this, i.responseType) a.resolve(t) } else a.reject(this) }), (r.onprogress = function (e) { a.notify(e) }), r.send(i.data), a.promise() ) } function o(e, t) { var i = e + '__' + (t.responseType || null) + '__' + (t.auth || null) + '__' + (t.prefetchFrom || null) return ( t.headers && (function (t) { return Object.keys(t) .sort() .map(function (e) { return { key: e, value: t[e] } }) })(t.headers).forEach(function (e) { i += '__' + e.key + ':' + e.value }), i ) } var t = i('./logger'), a = i('../ab'), l = new t(e) ;(window.URL = window.URL || window.webkitURL), (window.MP_REQUEST_CACHE = window.MP_REQUEST_CACHE || {}), (window.DATA = window.DATA || {}), (n.exports = { get: function (e, t) { var i, n = void 0 === (t = t || {}).cache || t.cache if (n) { var r = (function (e, t) { return window.MP_REQUEST_CACHE ? window.MP_REQUEST_CACHE[o(e, t)] : null })(e, t) if (r) return r } return ( (i = t.prefetchFrom && window.DATA[t.prefetchFrom] ? $.when(window.DATA[t.prefetchFrom]) : s('GET', e, t)), n && (function (e, t, i) { window.MP_REQUEST_CACHE && (window.MP_REQUEST_CACHE[o(e, t)] = i) })(e, t, i), i ) }, post: function (e, t) { return s('POST', e, t) }, patch: function (e, t) { return s('PATCH', e, t) }, getImage: function (e, t) { function i() { l.warn('Retrying ', e), o .getImage(e, t - 1) .done(n.resolve.bind(n)) .progress(n.notify.bind(n)) .fail(n.reject.bind(n)) } var n = $.Deferred(), r = new Image(), o = this return ( (e = a.changeIfImageOptimzing(e)), null != t || (t = 3), (r.onerror = function () { 0 < t ? setTimeout(i, 1e3) : n.reject() }), (r.onload = function () { n.resolve(r) }), (r.crossOrigin = 'anonymous'), (r.src = e), n ) } }) }).call(this, '/js/util/ajax.js') }, { '../ab': 3, './logger': 189 } ], 182: [ function (e, t, i) { 'use strict' function n(e, t) { var i = window.navigator.userAgent.match(e) return ( (i = i ? i[1].split(t) : []), { major: parseInt(i[0]) || 0, minor: parseInt(i[1]) || 0, patch: parseInt(i[2]) || 0 } ) } var r = e('../exception/DeviceMismatchException') t.exports = { supportsFullscreen: function () { return document.fullscreenEnabled || document.mozFullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled }, isPointerLocked: function () { return document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement }, requestFullscreen: function (e, t) { e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : e.msRequestFullscreen && e.msRequestFullscreen(), t && $(document).on('fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange', browser.requestPointerLock) }, requestPointerLock: function () { var e if (document.fullscreenElement) e = document.fullscreenElement() else if (document.mozFullscreenElement) e = document.mozFullscreenElement() else if (document.mozFullScreenElement) e = document.mozFullScreenElement() else { if (!document.webkitFullscreenElement) return e = document.webkitFullscreenElement() } ;(e.requestPointerLock = e.requestPointerLock || e.mozRequestPointerLock || e.webkitRequestPointerLock), e.requestPointerLock(), $(document).off('fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange', this) }, exitPointerLock: function () { ;(document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock), document.exitPointerLock() }, exitFullscreen: function () { document.exitFullscreen ? document.exitFullscreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen() }, details: function () { var e = navigator.userAgent.match('(Firefox|Chrome|Safari)/([\\d]+)') return e ? { name: e[1], version: parseInt(e[2]), platform: navigator.platform } : {} }, is: function (e) { return this.details() && this.details().name === e }, inIframe: function () { return window.parent !== window }, aspectRatio: function () { var e = $('#player').width() / $('#player').height() return isFinite(e) ? e : 0 }, userAgent: function () { return window.navigator.userAgent }, isLandscape: function () { return this.isMobile && 1 < this.aspectRatio() }, isSmallScreen: function () { return screen.width / window.devicePixelRatio < 240 }, detectIE: function () { return -1 !== window.navigator.userAgent.indexOf('MSIE ') || !!navigator.userAgent.match(/Trident.*rv\:11\./) }, detectSafari: function () { return -1 !== window.navigator.userAgent.indexOf('Safari') && !this.detectChrome() }, detectFirefox: function () { return -1 !== window.navigator.userAgent.indexOf('Firefox') }, detectChrome: function () { return -1 !== window.navigator.userAgent.indexOf('Chrome') && !this.detectOpera() }, detectOpera: function () { return -1 !== window.navigator.userAgent.indexOf('OPR') }, detectIOS: function () { return this.detectIPhone() || this.detectIPad() || this.detectIPod() }, detectIPad: function () { var e = window.navigator.userAgent return /iPad/.test(e) }, detectIPod: function () { var e = window.navigator.userAgent return /iPod/.test(e) }, detectIPhone: function () { var e = window.navigator.userAgent return /iPhone/.test(e) }, detectAndroid: function () { return -1 !== window.navigator.userAgent.indexOf('Android') }, detectAndroidMobile: function () { var e = window.navigator.userAgent return this.detectAndroid() && -1 !== e.indexOf('Mobile') }, detectSamsungNative: function () { var e = window.navigator.userAgent return -1 !== e.indexOf('SM-G900H') || -1 !== e.indexOf('GT-I9500') || -1 !== e.indexOf('SM-N900') }, detectSamsungS6: function () { return -1 !== window.navigator.userAgent.indexOf('SM-G92') }, detectHUAWEI5X: function () { return -1 !== window.navigator.userAgent.indexOf('KIW-TL00H') }, detectWebVR: function () { return !(!window.navigator.getVRDisplays || !window.VRDisplay) }, getVRDisplay: function () { var t = $.Deferred() return this.detectWebVR() ? (navigator.getVRDisplays().then(function (e) { 1 <= e.length && t.resolve(e[0]), t.reject(null) }), t) : t.reject(null) }, iosVersion: function () { if (!this.detectIOS()) throw new r('Did not detect an iDevice') return n(/((?:\d+\_?){1,3}) like Mac OS/, '_') }, androidVersion: function () { if (!this.detectAndroid()) throw new r('Did not detect an Android based device') return n(/Android ((?:\d+\.?){1,3})/, '.') }, valueFromCookie: function (e, t) { var i = new RegExp(e + '=([0-9a-f]+)(; ?|$)').exec(document.cookie) if (!i) return t var n = i[1] return 'boolean' == typeof t ? 'true' === n || '1' === n : 'number' == typeof t ? parseFloat(n) : n } } Object.assign(window.browser, t.exports) t.exports = window.browser }, { '../exception/DeviceMismatchException': 56 } ], 183: [ function (i, n, e) { ;(function (e) { 'use strict' var o = i('../controls/serializer'), a = i('../util/math'), s = i('./browser'), l = i('../enum/Viewmode'), t = i('../util/logger'), c = i('three'), h = new t(e) n.exports = { getStartCameraOptions: function (e, t) { var i = (function (e) { var t = s.valueFromHash('start', ''), i = {} if ('' !== t) { h.debug('Start override found in parameters, trying to parse...'), (i = (function (e) { return o.deserialize(e) })(t) || {}) var n = s.valueFromHash('tag', null) n && (i.tag = n), i.panoId && (i.pano = e.get(i.panoId)) } return i })(t) if (0 < Object.keys(i).length) return i if (e.heroImage) i = (function (e, t) { if (!e.heroImage || !e.heroImage.metadata.camera_position) return {} var i = {}, n = e.heroImage.metadata h.debug('Using start position from thumbnail image'), (i.position = n.camera_position), (i.quaternion = n.camera_quaternion) try { ;(i.mode = l.convertWorkshopModeInt(n.camera_mode)), i.mode === l.PANORAMA ? (i.pano = t.get(n.scan_id)) : (i.floorVisibility = n.floor_visibility) } catch (e) { h.debug(e.message) } return i })(e, t) else if (window.DATA.camera_start) { var n = window.DATA.camera_start try { 0 < Object.keys(n).length && !a.isEmptyQuaternion(n.camera.quaternion) && ((i.mode = l.convertWorkshopModeInt(n.mode)), (i.position = new c.Vector3().fromArray(n.camera.position)), (i.quaternion = new c.Quaternion().fromArray(n.camera.quaternion)), (i.zoom = a.convertWorkshopOrthoZoom(n.camera.zoom)), n.pano && ((i.pano = t.get(n.pano.uuid) || t.findClosest(i.position)), h.debug('Using camera_start'), h.debug('Modeldata pano: ', i.pano.quaternion), h.debug('Camera start pano: ', n.pano.quaternion)), i.mode !== l.PANORAMA && (i.floorVisibility = e.heroImage.metadata.floor_visibility)) } catch (e) { h.warn(e.message) if (i.mode == 'panorama' && !i.pano) { i.pano = t.list[0] } } } if ( (e.outsideAllowed() || i.mode === l.PANORAMA || (i = {}), i.mode === l.MESH && i.position && ((i.mode = l.PANORAMA), (i.pano = t.findClosest(i.position)), (i.quaternion = i.pano.quaternion)), 0 === Object.keys(i).length) ) { var r = t.list[0] r && ((i.mode = l.PANORAMA), (i.pano = r), (i.position = r.position), (i.quaternion = r.quaternion), h.info('Starting at 1st pano ' + r.id)) } return (i.mode = i.mode || l.DOLLHOUSE), i } } }).call(this, '/js/util/camera.js') }, { '../controls/serializer': 14, '../enum/Viewmode': 51, '../util/logger': 189, '../util/math': 190, './browser': 182, three: 217 } ], 184: [ function (e, t, i) { 'use strict' function r(e, t, i) { var n = t, r = i return 2 * Math.atan(Math.tan((e * a.RADIANS_PER_DEGREE) / 2) * (n / r)) * a.DEGREES_PER_RADIAN } function o(e, t, i) { var n = t, r = i return 2 * Math.atan(Math.tan((e * a.RADIANS_PER_DEGREE) / 2) * (r / n)) * a.DEGREES_PER_RADIAN } var a = e('./MathLight') t.exports = { clampVFOV: function (e, t, i, n) { return t < r(e, i, n) ? o(t, i, n) : e }, getHFOVForCamera: function (e, t, i) { return r(e.fov, t, i) }, getHFOVFromVFOV: r, getVFOVFromHFOV: o } window.MathLight = t.exports MathLight.closeTo = function (e1, e2, precision) { //xzw add 判断e1,e2是否接近 var prec = Math.pow(10, -(precision || 4)) var s1 = Math.abs(e1.x - e2.x) < prec && Math.abs(e1.y - e2.y) < prec && Math.abs(e1.z - e2.z) < prec if (e1.w) { return s1 && Math.abs(e1.w - e2.w) < prec } else return s1 } }, { './MathLight': 176 } ], 185: [ function (e, t, i) { 'use strict' var a = e('three') ;(t.exports = { delayOneFrame: function (e) { window.setTimeout(e, 1) }, normalizeUrl: function (e) { return e.replace('https://', 'http://') }, domainFromUrl: function (e) { var t = /^([^:]*:\/\/)?(www\.)?([^\/]+)/.exec(e) return t ? t[3] : e }, average: function (e, t) { if (0 === e.length) return null for (var i = 0, n = 0, r = 0; r < e.length; r++) { ;(i += t ? e[r][t] : e[r]), n++ } return i / n }, countUnique: function (e) { for (var t = {}, i = 0; i < e.length; i++) t[e[i]] = 1 + (t[e[i]] || 0) return Object.keys(t).length }, averageVectors: function (e, t) { var i = new a.Vector3() if (0 === e.length) return i for (var n = 0, r = 0; r < e.length; r++) { var o = t ? e[r][t] : e[r] i.add(o), n++ } return i.divideScalar(n) }, equalLists: function (e, t) { if (e.length !== t.length) return !1 for (var i = 0; i < e.length; i++) if (e[i] !== t[i]) return !1 return !0 }, lowerMedian: function (e, t) { return 0 === e.length ? null : ((t = t || 2), e.sort(function (e, t) { return e - t }), e[Math.floor(e.length / t)]) }, stableSort: function (e, n) { return e .map(function (e, t) { return { value: e, index: t } }) .sort(function (e, t) { var i = n(e.value, t.value) return 0 !== i ? i : e.index - t.index }) .map(function (e) { return e.value }) }, filterAll: function (e, i) { return e.filter(function (t) { return i.every(function (e) { return e(t) }) }) }, formatDate: function (e) { return [e.getFullYear(), e.getMonth() + 1, e.getDate()].join('-') }, formatDatetime: function (e) { return [e.getFullYear(), e.getMonth() + 1, e.getDate(), e.getHours(), e.getMinutes()].join('-') }, randomString: function (e) { for (var t = '', i = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', n = 0; n < e; n++) t += i.charAt(Math.floor(Math.random() * i.length)) return t }, uint8ToBase64: function (e, t) { ;(t && 'number' == typeof t) || (t = 8192) for (var i = [], n = 0; n < e.length; n += t) i.push(String.fromCharCode.apply(null, e.subarray(n, n + t))) return btoa(i.join('')) }, uuid4: function e(t) { return t ? (t ^ ((16 * Math.random()) >> (t / 4))).toString(16) : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, e) }, nth: function (e) { return 1 === (e %= 10) ? e + 'st' : 2 === e ? e + 'nd' : 3 === e ? e + 'rd' : e + 'th' }, extendObject: function (t, i) { return ( Object.keys(i).forEach(function (e) { t[e] = i[e] }), t ) }, deepExtend: function e(t) { t = t || {} for (var i = 1; i < arguments.length; i++) { var n = arguments[i] if (n) for (var r in n) n.hasOwnProperty(r) && ('object' == typeof n[r] ? (t[r] = e(t[r], n[r])) : (t[r] = n[r])) } return t }, inherit: function (e, t) { ;(e.prototype = Object.create(t.prototype)), (e.prototype.constructor = e) }, extend: function (e, t) { for (var i in t.prototype) e.prototype[i] = t.prototype[i] }, getFileNameFromUrl: function (url) { return url.split('/').pop() } }), (Math.sign = function (e) { return e < 0 ? -1 : 1 }) window.common = t.exports expandCommon(common) }, { three: 217 } ], 186: [ function (e, t, i) { 'use strict' var r = { linearTween: function (e, t, i, n) { return (i * e) / n + t }, easeInQuad: function (e, t, i, n) { return i * (e /= n) * e + t }, easeOutQuad: function (e, t, i, n) { return -i * (e /= n) * (e - 2) + t }, easeInOutQuad: function (e, t, i, n) { return (e /= n / 2) < 1 ? (i / 2) * e * e + t : (-i / 2) * (--e * (e - 2) - 1) + t }, easeInCubic: function (e, t, i, n) { return i * (e /= n) * e * e + t }, easeOutCubic: function (e, t, i, n) { return (e /= n), i * (--e * e * e + 1) + t }, easeInOutCubic: function (e, t, i, n) { return (e /= n / 2) < 1 ? (i / 2) * e * e * e + t : (i / 2) * ((e -= 2) * e * e + 2) + t }, easeInQuart: function (e, t, i, n) { return i * (e /= n) * e * e * e + t }, easeOutQuart: function (e, t, i, n) { return (e /= n), -i * (--e * e * e * e - 1) + t }, easeInOutQuart: function (e, t, i, n) { return (e /= n / 2) < 1 ? (i / 2) * e * e * e * e + t : (-i / 2) * ((e -= 2) * e * e * e - 2) + t }, easeInQuint: function (e, t, i, n) { return i * (e /= n) * e * e * e * e + t }, easeOutQuint: function (e, t, i, n) { return (e /= n), i * (--e * e * e * e * e + 1) + t }, easeInOutQuint: function (e, t, i, n) { return (e /= n / 2) < 1 ? (i / 2) * e * e * e * e * e + t : (i / 2) * ((e -= 2) * e * e * e * e + 2) + t }, easeInSine: function (e, t, i, n) { return -i * Math.cos((e / n) * (Math.PI / 2)) + i + t }, easeOutSine: function (e, t, i, n) { return i * Math.sin((e / n) * (Math.PI / 2)) + t }, easeInOutSine: function (e, t, i, n) { return (-i / 2) * (Math.cos((Math.PI * e) / n) - 1) + t }, easeInExpo: function (e, t, i, n) { return i * Math.pow(2, 10 * (e / n - 1)) + t }, easeOutExpo: function (e, t, i, n) { return i * (1 - Math.pow(2, (-10 * e) / n)) + t }, easeInOutExpo: function (e, t, i, n) { return (e /= n / 2) < 1 ? (i / 2) * Math.pow(2, 10 * (e - 1)) + t : (e--, (i / 2) * (2 - Math.pow(2, -10 * e)) + t) }, easeInCirc: function (e, t, i, n) { return (e /= n), -i * (Math.sqrt(1 - e * e) - 1) + t }, easeOutCirc: function (e, t, i, n) { return (e /= n), e--, i * Math.sqrt(1 - e * e) + t }, easeInOutCirc: function (e, t, i, n) { return (e /= n / 2) < 1 ? (-i / 2) * (Math.sqrt(1 - e * e) - 1) + t : ((e -= 2), (i / 2) * (Math.sqrt(1 - e * e) + 1) + t) }, easeInElastic: function (e, t, i, n) { var r = 1.70158, o = 0, a = i return 0 === e ? t : 1 == (e /= n) ? t + i : ((o = o || 0.3 * n), (r = a < Math.abs(i) ? ((a = i), o / 4) : (o / (2 * Math.PI)) * Math.asin(i / a)), -a * Math.pow(2, 10 * (e -= 1)) * Math.sin(((e * n - r) * (2 * Math.PI)) / o) + t) }, easeOutElastic: function (e, t, i, n) { var r = 1.70158, o = 0, a = i return 0 === e ? t : 1 == (e /= n) ? t + i : ((o = o || 0.3 * n), (r = a < Math.abs(i) ? ((a = i), o / 4) : (o / (2 * Math.PI)) * Math.asin(i / a)), a * Math.pow(2, -10 * e) * Math.sin(((e * n - r) * (2 * Math.PI)) / o) + i + t) }, easeInOutElastic: function (e, t, i, n) { var r = 1.70158, o = 0, a = i return 0 === e ? t : 2 == (e /= n / 2) ? t + i : ((o = o || n * (0.3 * 1.5)), (r = a < Math.abs(i) ? ((a = i), o / 4) : (o / (2 * Math.PI)) * Math.asin(i / a)), e < 1 ? a * Math.pow(2, 10 * (e -= 1)) * Math.sin(((e * n - r) * (2 * Math.PI)) / o) * -0.5 + t : a * Math.pow(2, -10 * (e -= 1)) * Math.sin(((e * n - r) * (2 * Math.PI)) / o) * 0.5 + i + t) }, easeInBack: function (e, t, i, n, r) { return void 0 === r && (r = 1.70158), i * (e /= n) * e * ((r + 1) * e - r) + t }, easeOutBack: function (e, t, i, n, r) { return void 0 === r && (r = 1.70158), i * ((e = e / n - 1) * e * ((r + 1) * e + r) + 1) + t }, easeInOutBack: function (e, t, i, n, r) { return void 0 === r && (r = 1.70158), (e /= n / 2) < 1 ? (i / 2) * (e * e * ((1 + (r *= 1.525)) * e - r)) + t : (i / 2) * ((e -= 2) * e * ((1 + (r *= 1.525)) * e + r) + 2) + t }, easeOutBounce: function (e, t, i, n) { return (e /= n) < 1 / 2.75 ? i * (7.5625 * e * e) + t : e < 2 / 2.75 ? i * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? i * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : i * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t }, easeInBounce: function (e, t, i, n) { return i - r.easeOutBounce(n - e, 0, i, n) + t }, easeInOutBounce: function (e, t, i, n) { return e < n / 2 ? 0.5 * r.easeInBounce(2 * e, 0, i, n) + t : 0.5 * r.easeOutBounce(x, 2 * e - n, 0, i, n) + 0.5 * i + t } } window.easing = t.exports = r }, {} ], 187: [ function (e, t, i) { 'use strict' function n() { ;(this.events = []), (this.valid = !1) } var r = e('../enum/Joystick') ;(n.prototype.push = function (e, t) { this.events.push({ direction: e, pano: t }), (this.valid = !0) }), (n.prototype.pop = function (e) { var t = this.events.pop() return this.events.length < 1 && (this.valid = !1), t }), (n.prototype.peek = function () { return this.events.length ? this.events[this.events.length - 1] : { direction: null, pano: null } }), (n.prototype.invalidate = function () { ;(this.events = []), (this.valid = !1) }), (n.prototype.reversePano = function (e) { if (!this.valid) return null var t = this.peek() return r.opposite(e) === t.direction ? (this.pop(), t.pano) : null }), (t.exports = n) }, { '../enum/Joystick': 29 } ], 188: [ function (e, t, i) { 'use strict' window.lerp = t.exports = { vector: function (t, i) { var n = t.clone() return ( (i = i.clone()), function (e) { t.set(n.x * (1 - e) + i.x * e, n.y * (1 - e) + i.y * e, n.z * (1 - e) + i.z * e) } ) }, quaternion: function (t, i) { var n = t.clone() return function (e) { t.copy(n).slerp(i, e) } }, property: function (t, i, n, r) { var o = t[i] return function (e) { ;(t[i] = o * (1 - e) + n * e), r && r(t[i]) } }, uniform: function (t, i, n) { var r = t.material.uniforms[i].value return function (e) { t.material.uniforms[i] && (t.material.uniforms[i].value = r * (1 - e) + n * e) } }, matrix4: function (o, a) { var s = o.clone() return function (e) { for (var t = o.elements, i = s.elements, n = a.elements, r = 0; r < 16; r++) t[r] = i[r] * (1 - e) + n[r] * e } }, allUniforms: function (e, t, i) { var n = e.map( function (e) { return this.uniform(e, t, i) }.bind(this) ) return function (t) { n.forEach(function (e) { e(t) }) } } } }, {} ], 189: [ function (e, t, i) { 'use strict' function h(n) { var e, t, i, r, o = n.split('/'), a = '[' + o[o.length - 1].replace('.js', '') + ']', s = {} if (h.consoleEnabled) { var l = function (e) { $('#debug-console').append('

    ' + e + '

    '), ($('#debug-console')[0].scrollTop = $('#debug-console')[0].scrollHeight) } ;(e = function (e) { l(Array.prototype.slice.call(arguments).join(' ')) }), (t = function (e) { l(Array.prototype.slice.call(arguments).join(' ')) }), (i = function (e) { l('WARN: ' + Array.prototype.slice.call(arguments).join(' ')) }), (r = function (e) { l('ERROR: ' + Array.prototype.slice.call(arguments).join(' ')) }) } else console.log ? ((e = console.log), (t = console.info ? console.info : console.log), (i = console.warn ? console.warn : console.log), (r = console.error ? console.error : console.log)) : (e = t = i = r = function () {}) function c(e) { return [a, h.timestamp()].concat(Array.prototype.slice.call(e)) } return { debug: function () { h.level >= h.levels.debug && e.apply(console, c(arguments)) }, info: function () { h.level >= h.levels.info && t.apply(console, c(arguments)) }, warn: function () { ;(function (e, t) { if (u) { var i = Array.prototype.slice.call(e).join(' ') u.captureMessage(i, { level: t, path: n, timestamp: h.timestamp() }) } })(arguments, 'warn'), h.level >= h.levels.warn && i.apply(console, c(arguments)) }, error: function () { ;(function (e, t) { if (u) { var i = Array.prototype.slice.call(e).join(' ') u.captureException(new Error(i), { level: t, path: n, timestamp: h.timestamp() }) } })(arguments, 'error'), h.level >= h.levels.error && r.apply(console, c(arguments)) }, v3str: function (e, t) { var i = void 0 === t ? 2 : t return '(' + e.x.toPrecision(i) + ', ' + e.y.toPrecision(i) + ', ' + e.z.toPrecision(i) + ')' }, eulstr: function (e, t) { var i = void 0 === t ? 2 : t return '(' + THREE.Math.radToDeg(e.x).toPrecision(i) + ', ' + THREE.Math.radToDeg(e.y).toPrecision(i) + ', ' + THREE.Math.radToDeg(e.z).toPrecision(i) + ' "' + e.order + '")' }, time: function (e) { h.level >= h.levels.debug && (s[e] = Date.now()) }, timeEnd: function (e) { if (h.level >= h.levels.debug) { var t = s[e] if (!t) return var i = (Date.now() - t) / 1e3 this.debug(e, i + 's') } } } } var u = window.Raven ;(h.timestamp = function () { return (Date.now() - window.navigationStart) / 1e3 + 's' }), (h.level = (h.levels = { debug: 3, info: 2, warn: 1, error: 0 }).info), (t.exports = h) }, {} ], 190: [ function (e, t, i) { 'use strict' var o = e('three'), r = e('../enum/GLCubeFaces') e('../constants') t.exports = { convertVisionVector: function (e) { return new o.Vector3(e.x, e.z, -e.y) }, convertVisionQuaternion: function (e) { return new o.Quaternion(e.x, e.z, -e.y, e.w).multiply(new o.Quaternion().setFromAxisAngle(new o.Vector3(0, 1, 0), o.Math.degToRad(90))) }, convertWorkshopVector: function (e) { return new o.Vector3(-e.x, e.y, e.z) }, convertWorkshopQuaternion: function (e) { return new o.Quaternion(-e.x, e.y, e.z, -e.w).multiply(new o.Quaternion(Math.sqrt(2) / 2, Math.sqrt(2) / 2, 0, 0)) }, convertWorkshopPanoramaQuaternion: function (e) { return new o.Quaternion(e.x, -e.y, -e.z, e.w).normalize().multiply(new o.Quaternion().setFromAxisAngle(new o.Vector3(0, 1, 0), o.Math.degToRad(270))) }, convertWorkshopOrthoZoom: function (e) { return -1 === e ? -1 : ((e * ($('#player').width() / $('#player').height())) / g_snapShotWidth) * g_snapShotHeight }, toPrecision: function (e, t) { function i(e, t) { var i = Math.pow(10, t) return Math.round(e * i) / i } if (e instanceof Array) { for (var n = 0; n < e.length; n++) e[n] = i(e[n], t) return e } return i(e, t) }, isEmptyQuaternion: function (e) { return 0 === Math.abs(e.x) && 0 === Math.abs(e.y) && 0 === Math.abs(e.z) && 0 === Math.abs(e.w) }, projectPositionToCanvas: function (e, t, i) { ;(i = i || new o.Vector3()).copy(e) var n = 0.5 * $('#player').width(), r = 0.5 * $('#player').height() return i.project(t), (i.x = i.x * n + n), (i.y = -i.y * r + r), i }, convertScreenPositionToNDC: function (e, t, i) { return ((i = i || new o.Vector2()).x = (e / $('#player').width()) * 2 - 1), (i.y = (-t / $('#player').height()) * 2 + 1), i }, constrainedTurn: function (e) { var t = e % (2 * Math.PI) return t > Math.PI ? (t -= 2 * Math.PI) : t < -Math.PI ? (t += 2 * Math.PI) : t }, getFOVDotThreshold: function (e) { return Math.cos(o.Math.degToRad(e / 2)) }, transform2DForwardVectorByCubeFace: function (e, t, i, n) { switch (e) { case r.GL_TEXTURE_CUBE_MAP_POSITIVE_X: i.set(1, t.y, t.x) break case r.GL_TEXTURE_CUBE_MAP_NEGATIVE_X: i.set(-1, t.y, -t.x) break case r.GL_TEXTURE_CUBE_MAP_POSITIVE_Y: i.set(-t.x, 1, -t.y) break case r.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: i.set(-t.x, -1, t.y) break case r.GL_TEXTURE_CUBE_MAP_POSITIVE_Z: i.set(-t.x, t.y, 1) break case r.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: i.set(t.x, t.y, -1) } n && i.normalize() }, //add: getPos2d: function (point, camera, dom) { var camera = camera var dom = dom var pos = point.clone().project(camera) //比之前hotspot的计算方式写得简单 project用于3转2(求法同shader); unproject用于2转3 :new r.Vector3(e.x, e.y, -1).unproject(this.camera); var x, y x = ((pos.x + 1) / 2) * dom.clientWidth y = (1 - (pos.y + 1) / 2) * dom.clientHeight var inSight = x <= dom.clientWidth && x >= 0 && y <= dom.clientHeight && y >= 0 return { pos: new THREE.Vector2(x, y), vector: pos, trueSide: pos.z < 1, //trueSide为false时,即使在屏幕范围内可见,也是反方向的另一个不可以被渲染的点 参见Tag.update inSight: inSight //在屏幕范围内可见 } }, getDirByLonLat: function (lon, lat) { var dir = new THREE.Vector3() var phi = THREE.Math.degToRad(90 - lat) var theta = THREE.Math.degToRad(lon) dir.x = Math.sin(phi) * Math.cos(theta) dir.y = Math.cos(phi) dir.z = Math.sin(phi) * Math.sin(theta) return dir.negate() } } window.math = t.exports expandMath(math) }, { '../constants': 8, '../enum/GLCubeFaces': 25, three: 217 } ], 191: [ function (e, t, i) { 'use strict' function o(e) { return r[e] } var n = e('../enum/GLCubeFaces'), a = [0, 1, 2, 3, 4, 5], r = { 0: n.GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 1: n.GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 2: n.GL_TEXTURE_CUBE_MAP_POSITIVE_X, 3: n.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 4: n.GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 5: n.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y } t.exports = { mapFaceToCubemapFace: o, getCubemapUrls: function (i, n, r) { return a.map( function (e, t) { return i.get('pan/' + r + '/' + n + '_skybox' + o(e) + '.jpg') }.bind(this) ) } } }, { '../enum/GLCubeFaces': 25 } ], 192: [ function (e, t, i) { 'use strict' t.exports = { captureErrors: function (e, t, i) { if ('Raven' in window) { Raven.config(e, t).install(), i && Raven.setTagsContext(i) var n = console.warn, r = console.error ;(console.warn = function () { var e = Array.prototype.slice.call(arguments) Raven.captureMessage(e.join(' '), { level: 'warning' }), n.apply(console, e) }), (console.error = function () { var e = Array.prototype.slice.call(arguments) Raven.captureException(new Error(e.join(' ')), { level: 'error' }), r.apply(console, e) }) } else console.error('Raven not found, not capturing errors.') } } }, {} ], 193: [ function (c, h, e) { ;(function (e) { 'use strict' var i, n = c('./browser'), r = c('../constants'), o = c('url'), t = c('./logger'), a = c('three'), s = new t(e), l = { getAuthorizationHeader: function () { var e = n.valueFromHash('auth') if (e) return e.replace(',', ' ') var t = n.valueFromCookie('token') return t ? 'Token ' + t : null }, parseSidUrl: function (e) { var t, i if (((t = g_Prefix), (e = e || '').match(/^https?/))) { o.parse(e) ;(t = g_Prefix), (i = e) } else i = (t = g_Prefix) + 'data/' + e return { urlBase: t, urlModel: i, urlFiles: i + (i.match(/\/$/) ? 'files' : '/files'), urlThumb: i + (i.match(/\/$/) ? 'thumb' : '/thumb') } }, getModelIDFromQueryString: function () { return n.valueFromHash('model') || n.valueFromHash('m') }, /* normalizeModeldata: function(e, i) { e = JSON.parse(JSON.stringify(e)); var n = null; if (e.images.forEach(function(t) { if (t.metadata) { if ("string" == typeof t.metadata) try { t.metadata = JSON.parse(t.metadata) } catch (e) { s.warn("Unable to parse image metadata"), t.metadata = null } else "object" == typeof t.metadata && s.debug("image.metadata already a JSON object"); t.metadata.camera_position instanceof Array ? (t.metadata.camera_position = (new a.Vector3).fromArray(t.metadata.camera_position), t.metadata.camera_quaternion = (new a.Quaternion).fromArray(t.metadata.camera_quaternion)) : (t.metadata.camera_quaternion && (t.metadata.camera_quaternion = i.convertWorkshopQuaternion(t.metadata.camera_quaternion)), t.metadata.camera_position && (t.metadata.camera_position = i.convertWorkshopVector(t.metadata.camera_position)), t.metadata.zoom = t.metadata.zoom || 1), !n && e.icon && e.icon === t.sid && (n = t.metadata) } }), n && n.camera_quaternion && n.camera_position && n.scan_position && n.scan_quaternion) { var t = {}; t.pano = { quaternion: i.convertWorkshopPanoramaQuaternion(n.scan_quaternion), position: i.convertWorkshopVector(n.scan_position), uuid: n.scan_id }, t.camera = { quaternion: n.camera_quaternion, position: n.camera_position }, e.startPano = t } return e }, */ normalizeModeldata: function (e, t) { //xzw 修改导览images数据 e = JSON.parse(JSON.stringify(e)) var i = null var deal = function (n) { if (!n.metadata) return if ('string' == typeof n.metadata) try { n.metadata = JSON.parse(n.metadata) } catch (e) { s.warn('Unable to parse image metadata'), (n.metadata = null) } else { 'object' == typeof n.metadata && s.debug('image.metadata already a JSON object') } if (n.metadata.camera_position instanceof Array) { //xzw 改的格式 n.metadata.camera_position = new a.Vector3().fromArray(n.metadata.camera_position) n.metadata.camera_quaternion = new a.Quaternion().fromArray(n.metadata.camera_quaternion) } else { n.metadata.camera_position = new a.Vector3().copy(n.metadata.camera_position) n.metadata.camera_quaternion = new a.Quaternion().copy(n.metadata.camera_quaternion) /* n.metadata.camera_quaternion && (n.metadata.camera_quaternion = i.convertWorkshopQuaternion(n.metadata.camera_quaternion)), n.metadata.camera_position && (n.metadata.camera_position = i.convertWorkshopVector(n.metadata.camera_position)) */ } !i && e.icon && e.icon === n.sid && (i = n.metadata) } //改 e.images.forEach(info => { if (info.locations) { info.locations.forEach(a => deal(a)) } else { deal(info) } }) //icon初始视角的: if (i && i.camera_quaternion && i.camera_position && i.scan_position && i.scan_quaternion) { var n = {} ;(n.pano = { quaternion: t.convertWorkshopPanoramaQuaternion(i.scan_quaternion), position: t.convertWorkshopVector(i.scan_position), uuid: i.scan_id }), (n.camera = { quaternion: i.camera_quaternion, position: i.camera_position }), (e.startPano = n) } return e }, visionVersionToInt: ((i = new RegExp(['(?:[0-9.]+\\.){1,4}', '([0-9]+)', '[^\\.]*$'].join(''))), function (e) { if (!e) throw new Error('Vision version is required') var t = i.exec(e) if (null === t) throw new Error('String is not a vision version: ' + e) return parseInt(t[1]) }), modelDataPromisesTiles: function (e) { var t = e.vision_version || window.DATA.vision_version if (t) try { return l.visionVersionToInt(t) >= l.visionVersionToInt(r.visionTilingStartVersion) } catch (e) { s.warn('Invalid vision version: ' + t) } return !1 } } h.exports = l }).call(this, '/js/util/showcase.js') }, { '../constants': 8, './browser': 182, './logger': 189, three: 217, url: 208 } ], 194: [ function (e, t, i) { 'use strict' var r = e('../util/ajax'), o = e('three'), a = e('../settings'), s = {} t.exports = { load: function (e, t, i) { var n = s[e] return ( n ? t && setTimeout(function () { t(n) }, 1) : ((n = new o.Texture()), a.minimalMemoryMode && ((n.minFilter = o.LinearFilter), (n.magFilter = o.LinearFilter), (n.generateMipmaps = !1)), (n.sourceFile = e), (s[e] = n), r .getImage(e) .then(function (e) { ;(n.image = e), (n.needsUpdate = !0), t && t(n) }) .fail(i)), n ) }, loadBase64: function (e, t) { t = t || 'png' var i = new o.Texture() return ( (i.image = document.createElement('img')), i.image.setAttribute('src', 'data:image/' + t + ';base64,' + e), a.minimalMemoryMode && ((i.minFilter = o.LinearFilter), (i.magFilter = o.LinearFilter), (i.generateMipmaps = !1)), (i.needsUpdate = !0), i ) }, isLoaded: function (e) { return !!s[e] } } window.Texture = t.exports }, { '../settings': 166, '../util/ajax': 181, three: 217 } ], 195: [ function (e, t, i) { 'use strict' var l = e('./easing') window.transitions = t.exports = { globalDone: null, funcs: [], counter: 0, uniqueID: 0, start: function (e, t, i, n, r, o, a) { return ( (n = n || 0), this.funcs.push({ func: e, current: -n * Math.abs(t), duration: (1 - Math.max(n, 0)) * Math.abs(t), done: i, easing: r || l.linearTween, cycling: t < 0, running: !0, debug: n < 0, name: o || 'T' + this.counter, id: void 0 === a ? this.counter : a, paused: !1 }), e(0, 16), (this.counter += 1), e ) }, trigger: function (e) { var t = void 0 === e.delayRatio ? 0 : e.delayRatio, i = e.func || function () {}, n = void 0 === e.duration ? 0 : e.duration void 0 !== e.cycling && e.cycling && (n = -Math.abs(n)) var r = e.done || null, o = e.easing || l.linearTween, a = e.name || 'R' + this.counter, s = void 0 === e.id ? this.counter : e.id return this.start(i, n, r, t, o, a, s) }, setTimeout: function (e, t, i) { var n = void 0 === i ? this.counter : i return this.trigger({ done: e, duration: void 0 === t ? 0 : t, name: 'O' + this.counter, id: n }) }, pause: function () { this.paused = !0 }, resume: function () { this.paused = !1 }, update: function (n) { this.funcs.forEach(function (e) { if (!(e.paused || ((e.current += 1e3 * n), e.current < 0))) if (e.current >= e.duration && !e.cycling) { var t = e.easing(1, 0, 1, 1) e.func(t, 1e3 * n), e.done && e.done(), (e.running = !1) } else { var i = e.easing((e.current % e.duration) / e.duration, 0, 1, 1) ;(e.func(i, 1e3 * n) || !1) && (e.done && e.done(), (e.running = !1)) } }) var e = this.funcs.length this.funcs = this.funcs.filter(function (e) { return e.running }) var t = this.funcs.length if (0 < e && 0 === t && this.globalDone) { var i = this.globalDone ;(this.globalDone = null), i() } }, adjustSpeed: function (e, t) { for (var i = this.getById(e), n = 0; n < i.length; n++) { var r = i[n] ;(r.duration /= t), (r.current /= t) } }, getById: function (t) { return this.funcs.filter(function (e) { return t === e.id }) }, get: function (e) { for (var t = 0; t < this.funcs.length; t += 1) if (this.funcs[t].func === e) return this.funcs[t] return null }, isRunning: function (e) { var t = this.get(e) return null !== t && t.running }, countActive: function () { for (var e = 0, t = 0; t < this.funcs.length; t += 1) e += this.funcs[t].running return e }, listActive: function () { for (var e = [], t = 0; t < this.funcs.length; t += 1) this.funcs[t].running && e.push(this.funcs[t].name) return e }, done: function (e) { this.globalDone = e }, cancelById: function (e) { var t = void 0 === e ? 0 : e this.funcs = this.funcs.filter(function (e) { return e.id !== t }) }, cancel: function (t) { this.funcs = this.funcs.filter(function (e) { return e.func !== t }) }, getUniqueId: function () { return (this.uniqueID -= 1), this.uniqueID } } }, { './easing': 186 } ], 196: [ function (e, t, i) { function n(e) { if ( ((this.set = {}), (this.infContains = function () { return !0 }), 'object' == typeof e) ) if (e instanceof Array) for (var t = 0; t < e.length; t++) this.set[e[t]] = !0 else this.set = e else if ('function' == typeof e) this.infContains = e else if (void 0 !== e) throw new Error('set must be either an array or an object.') } ;((t.exports = n).prototype.has = n.prototype.contains = function (e) { return !!this.set[e] }), (n.prototype.add = function (e) { if (1 == arguments.length) this.set[e] = !0 else for (var t = 0; t < arguments.length; t++) this.set[arguments[t]] = !0 }), (n.prototype.addAll = function (e) { if ('object' != typeof e && !(e instanceof Array)) throw new Error('arr must be an array.') for (var t = 0; t < e.length; t++) this.add(e[t]) }), (n.prototype.delete = n.prototype.remove = function (e) { if (1 == arguments.length) delete this.set[e] else for (var t = 0; t < arguments.length; t++) delete this.set[arguments[t]] }), (n.prototype.clear = function () { this.set = {} }), (n.prototype.size = function () { return Object.keys(this.set).length }), (n.prototype.toString = function () { return '{' + Object.keys(this.set).toString() + '}' }), (n.prototype['*values'] = n.prototype.toArray = function () { return void 0 === this.set ? [] : Object.keys(this.set) }) }, {} ], 197: [function (e, t, i) {}, {}], 198: [ function (N, e, F) { ;(function (e) { 'use strict' function i() { return u.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823 } function o(e, t) { if (i() < t) throw new RangeError('Invalid typed array length') return u.TYPED_ARRAY_SUPPORT ? ((e = new Uint8Array(t)).__proto__ = u.prototype) : (null === e && (e = new u(t)), (e.length = t)), e } function u(e, t, i) { if (!(u.TYPED_ARRAY_SUPPORT || this instanceof u)) return new u(e, t, i) if ('number' != typeof e) return n(this, e, t, i) if ('string' == typeof t) throw new Error('If encoding is specified then the first argument must be a string') return a(this, e) } function n(e, t, i, n) { if ('number' == typeof t) throw new TypeError('"value" argument must not be a number') return 'undefined' != typeof ArrayBuffer && t instanceof ArrayBuffer ? (function (e, t, i, n) { if ((t.byteLength, i < 0 || t.byteLength < i)) throw new RangeError("'offset' is out of bounds") if (t.byteLength < i + (n || 0)) throw new RangeError("'length' is out of bounds") return ( (t = void 0 === i && void 0 === n ? new Uint8Array(t) : void 0 === n ? new Uint8Array(t, i) : new Uint8Array(t, i, n)), u.TYPED_ARRAY_SUPPORT ? ((e = t).__proto__ = u.prototype) : (e = s(e, t)), e ) })(e, t, i, n) : 'string' == typeof t ? (function (e, t, i) { if ((('string' == typeof i && '' !== i) || (i = 'utf8'), !u.isEncoding(i))) throw new TypeError('"encoding" must be a valid string encoding') var n = 0 | c(t, i), r = (e = o(e, n)).write(t, i) return r !== n && (e = e.slice(0, r)), e })(e, t, i) : (function (e, t) { if (u.isBuffer(t)) { var i = 0 | l(t.length) return 0 === (e = o(e, i)).length || t.copy(e, 0, 0, i), e } if (t) { if (('undefined' != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer) || 'length' in t) return 'number' != typeof t.length || (function (e) { return e != e })(t.length) ? o(e, 0) : s(e, t) if ('Buffer' === t.type && L(t.data)) return s(e, t.data) } throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') })(e, t) } function r(e) { if ('number' != typeof e) throw new TypeError('"size" argument must be a number') if (e < 0) throw new RangeError('"size" argument must not be negative') } function a(e, t) { if ((r(t), (e = o(e, t < 0 ? 0 : 0 | l(t))), !u.TYPED_ARRAY_SUPPORT)) for (var i = 0; i < t; ++i) e[i] = 0 return e } function s(e, t) { var i = t.length < 0 ? 0 : 0 | l(t.length) e = o(e, i) for (var n = 0; n < i; n += 1) e[n] = 255 & t[n] return e } function l(e) { if (e >= i()) throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + i().toString(16) + ' bytes') return 0 | e } function c(e, t) { if (u.isBuffer(e)) return e.length if ('undefined' != typeof ArrayBuffer && 'function' == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e.byteLength 'string' != typeof e && (e = '' + e) var i = e.length if (0 === i) return 0 for (var n = !1; ; ) switch (t) { case 'ascii': case 'latin1': case 'binary': return i case 'utf8': case 'utf-8': case void 0: return S(e).length case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return 2 * i case 'hex': return i >>> 1 case 'base64': return M(e).length default: if (n) return S(e).length ;(t = ('' + t).toLowerCase()), (n = !0) } } function h(e, t, i) { var n = e[t] ;(e[t] = e[i]), (e[i] = n) } function d(e, t, i, n, r) { if (0 === e.length) return -1 if ( ('string' == typeof i ? ((n = i), (i = 0)) : 2147483647 < i ? (i = 2147483647) : i < -2147483648 && (i = -2147483648), (i = +i), isNaN(i) && (i = r ? 0 : e.length - 1), i < 0 && (i = e.length + i), i >= e.length) ) { if (r) return -1 i = e.length - 1 } else if (i < 0) { if (!r) return -1 i = 0 } if (('string' == typeof t && (t = u.from(t, n)), u.isBuffer(t))) return 0 === t.length ? -1 : p(e, t, i, n, r) if ('number' == typeof t) return ( (t &= 255), u.TYPED_ARRAY_SUPPORT && 'function' == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype.indexOf.call(e, t, i) : Uint8Array.prototype.lastIndexOf.call(e, t, i) : p(e, [t], i, n, r) ) throw new TypeError('val must be string, number or Buffer') } function p(e, t, i, n, r) { function o(e, t) { return 1 === s ? e[t] : e.readUInt16BE(t * s) } var a, s = 1, l = e.length, c = t.length if (void 0 !== n && ('ucs2' === (n = String(n).toLowerCase()) || 'ucs-2' === n || 'utf16le' === n || 'utf-16le' === n)) { if (e.length < 2 || t.length < 2) return -1 ;(l /= s = 2), (c /= 2), (i /= 2) } if (r) { var h = -1 for (a = i; a < l; a++) if (o(e, a) === o(t, -1 === h ? 0 : a - h)) { if ((-1 === h && (h = a), a - h + 1 === c)) return h * s } else -1 !== h && (a -= a - h), (h = -1) } else for (l < i + c && (i = l - c), a = i; 0 <= a; a--) { for (var u = !0, d = 0; d < c; d++) if (o(e, a + d) !== o(t, d)) { u = !1 break } if (u) return a } return -1 } function g(e, t, i, n) { i = Number(i) || 0 var r = e.length - i n ? r < (n = Number(n)) && (n = r) : (n = r) var o = t.length if (o % 2 != 0) throw new TypeError('Invalid hex string') o / 2 < n && (n = o / 2) for (var a = 0; a < n; ++a) { var s = parseInt(t.substr(2 * a, 2), 16) if (isNaN(s)) return a e[i + a] = s } return a } function m(e, t, i, n) { return R( (function (e) { for (var t = [], i = 0; i < e.length; ++i) t.push(255 & e.charCodeAt(i)) return t })(t), e, i, n ) } function f(e, t, i) { i = Math.min(e.length, i) for (var n = [], r = t; r < i; ) { var o, a, s, l, c = e[r], h = null, u = 239 < c ? 4 : 223 < c ? 3 : 191 < c ? 2 : 1 if (r + u <= i) switch (u) { case 1: c < 128 && (h = c) break case 2: 128 == (192 & (o = e[r + 1])) && 127 < (l = ((31 & c) << 6) | (63 & o)) && (h = l) break case 3: ;(o = e[r + 1]), (a = e[r + 2]), 128 == (192 & o) && 128 == (192 & a) && 2047 < (l = ((15 & c) << 12) | ((63 & o) << 6) | (63 & a)) && (l < 55296 || 57343 < l) && (h = l) break case 4: ;(o = e[r + 1]), (a = e[r + 2]), (s = e[r + 3]), 128 == (192 & o) && 128 == (192 & a) && 128 == (192 & s) && 65535 < (l = ((15 & c) << 18) | ((63 & o) << 12) | ((63 & a) << 6) | (63 & s)) && l < 1114112 && (h = l) } null === h ? ((h = 65533), (u = 1)) : 65535 < h && ((h -= 65536), n.push(((h >>> 10) & 1023) | 55296), (h = 56320 | (1023 & h))), n.push(h), (r += u) } return (function (e) { var t = e.length if (t <= D) return String.fromCharCode.apply(String, e) for (var i = '', n = 0; n < t; ) i += String.fromCharCode.apply(String, e.slice(n, (n += D))) return i })(n) } function v(e, t, i) { var n = '' i = Math.min(e.length, i) for (var r = t; r < i; ++r) n += String.fromCharCode(127 & e[r]) return n } function y(e, t, i) { var n = '' i = Math.min(e.length, i) for (var r = t; r < i; ++r) n += String.fromCharCode(e[r]) return n } function A(e, t, i) { var n, r = e.length ;(!t || t < 0) && (t = 0), (!i || i < 0 || r < i) && (i = r) for (var o = '', a = t; a < i; ++a) o += (n = e[a]) < 16 ? '0' + n.toString(16) : n.toString(16) return o } function C(e, t, i) { for (var n = e.slice(t, i), r = '', o = 0; o < n.length; o += 2) r += String.fromCharCode(n[o] + 256 * n[o + 1]) return r } function I(e, t, i) { if (e % 1 != 0 || e < 0) throw new RangeError('offset is not uint') if (i < e + t) throw new RangeError('Trying to access beyond buffer length') } function E(e, t, i, n, r, o) { if (!u.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance') if (r < t || t < o) throw new RangeError('"value" argument is out of bounds') if (i + n > e.length) throw new RangeError('Index out of range') } function _(e, t, i, n) { t < 0 && (t = 65535 + t + 1) for (var r = 0, o = Math.min(e.length - i, 2); r < o; ++r) e[i + r] = (t & (255 << (8 * (n ? r : 1 - r)))) >>> (8 * (n ? r : 1 - r)) } function b(e, t, i, n) { t < 0 && (t = 4294967295 + t + 1) for (var r = 0, o = Math.min(e.length - i, 4); r < o; ++r) e[i + r] = (t >>> (8 * (n ? r : 3 - r))) & 255 } function w(e, t, i, n) { if (i + n > e.length) throw new RangeError('Index out of range') if (i < 0) throw new RangeError('Index out of range') } function T(e, t, i, n, r) { return r || w(e, 0, i, 4), O.write(e, t, i, n, 23, 4), i + 4 } function x(e, t, i, n, r) { return r || w(e, 0, i, 8), O.write(e, t, i, n, 52, 8), i + 8 } function S(e, t) { t = t || 1 / 0 for (var i, n = e.length, r = null, o = [], a = 0; a < n; ++a) { if (55295 < (i = e.charCodeAt(a)) && i < 57344) { if (!r) { if (56319 < i) { ;-1 < (t -= 3) && o.push(239, 191, 189) continue } if (a + 1 === n) { ;-1 < (t -= 3) && o.push(239, 191, 189) continue } r = i continue } if (i < 56320) { ;-1 < (t -= 3) && o.push(239, 191, 189), (r = i) continue } i = 65536 + (((r - 55296) << 10) | (i - 56320)) } else r && -1 < (t -= 3) && o.push(239, 191, 189) if (((r = null), i < 128)) { if ((t -= 1) < 0) break o.push(i) } else if (i < 2048) { if ((t -= 2) < 0) break o.push((i >> 6) | 192, (63 & i) | 128) } else if (i < 65536) { if ((t -= 3) < 0) break o.push((i >> 12) | 224, ((i >> 6) & 63) | 128, (63 & i) | 128) } else { if (!(i < 1114112)) throw new Error('Invalid code point') if ((t -= 4) < 0) break o.push((i >> 18) | 240, ((i >> 12) & 63) | 128, ((i >> 6) & 63) | 128, (63 & i) | 128) } } return o } function M(e) { return P.toByteArray( (function (e) { if ( (e = (function (e) { return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, '') })(e).replace(t, '')).length < 2 ) return '' for (; e.length % 4 != 0; ) e += '=' return e })(e) ) } function R(e, t, i, n) { for (var r = 0; r < n && !(r + i >= t.length || r >= e.length); ++r) t[r + i] = e[r] return r } var P = N('base64-js'), O = N('ieee754'), L = N('isarray') ;(F.Buffer = u), (F.SlowBuffer = function (e) { return +e != e && (e = 0), u.alloc(+e) }), (F.INSPECT_MAX_BYTES = 50), (u.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ? e.TYPED_ARRAY_SUPPORT : (function () { try { var e = new Uint8Array(1) return ( (e.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }), 42 === e.foo() && 'function' == typeof e.subarray && 0 === e.subarray(1, 1).byteLength ) } catch (e) { return !1 } })()), (F.kMaxLength = i()), (u.poolSize = 8192), (u._augment = function (e) { return (e.__proto__ = u.prototype), e }), (u.from = function (e, t, i) { return n(null, e, t, i) }), u.TYPED_ARRAY_SUPPORT && ((u.prototype.__proto__ = Uint8Array.prototype), (u.__proto__ = Uint8Array), 'undefined' != typeof Symbol && Symbol.species && u[Symbol.species] === u && Object.defineProperty(u, Symbol.species, { value: null, configurable: !0 })), (u.alloc = function (e, t, i) { return (function (e, t, i, n) { return r(t), t <= 0 ? o(e, t) : void 0 !== i ? ('string' == typeof n ? o(e, t).fill(i, n) : o(e, t).fill(i)) : o(e, t) })(null, e, t, i) }), (u.allocUnsafe = function (e) { return a(null, e) }), (u.allocUnsafeSlow = function (e) { return a(null, e) }), (u.isBuffer = function (e) { return !(null == e || !e._isBuffer) }), (u.compare = function (e, t) { if (!u.isBuffer(e) || !u.isBuffer(t)) throw new TypeError('Arguments must be Buffers') if (e === t) return 0 for (var i = e.length, n = t.length, r = 0, o = Math.min(i, n); r < o; ++r) if (e[r] !== t[r]) { ;(i = e[r]), (n = t[r]) break } return i < n ? -1 : n < i ? 1 : 0 }), (u.isEncoding = function (e) { switch (String(e).toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'latin1': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return !0 default: return !1 } }), (u.concat = function (e, t) { if (!L(e)) throw new TypeError('"list" argument must be an Array of Buffers') if (0 === e.length) return u.alloc(0) var i if (void 0 === t) for (i = t = 0; i < e.length; ++i) t += e[i].length var n = u.allocUnsafe(t), r = 0 for (i = 0; i < e.length; ++i) { var o = e[i] if (!u.isBuffer(o)) throw new TypeError('"list" argument must be an Array of Buffers') o.copy(n, r), (r += o.length) } return n }), (u.byteLength = c), (u.prototype._isBuffer = !0), (u.prototype.swap16 = function () { var e = this.length if (e % 2 != 0) throw new RangeError('Buffer size must be a multiple of 16-bits') for (var t = 0; t < e; t += 2) h(this, t, t + 1) return this }), (u.prototype.swap32 = function () { var e = this.length if (e % 4 != 0) throw new RangeError('Buffer size must be a multiple of 32-bits') for (var t = 0; t < e; t += 4) h(this, t, t + 3), h(this, t + 1, t + 2) return this }), (u.prototype.swap64 = function () { var e = this.length if (e % 8 != 0) throw new RangeError('Buffer size must be a multiple of 64-bits') for (var t = 0; t < e; t += 8) h(this, t, t + 7), h(this, t + 1, t + 6), h(this, t + 2, t + 5), h(this, t + 3, t + 4) return this }), (u.prototype.toString = function () { var e = 0 | this.length return 0 == e ? '' : 0 === arguments.length ? f(this, 0, e) : function (e, t, i) { var n, r, o, a = !1 if (((void 0 === t || t < 0) && (t = 0), t > this.length)) return '' if (((void 0 === i || i > this.length) && (i = this.length), i <= 0)) return '' if ((i >>>= 0) <= (t >>>= 0)) return '' for (e = e || 'utf8'; ; ) switch (e) { case 'hex': return A(this, t, i) case 'utf8': case 'utf-8': return f(this, t, i) case 'ascii': return v(this, t, i) case 'latin1': case 'binary': return y(this, t, i) case 'base64': return (n = this), (o = i), 0 === (r = t) && o === n.length ? P.fromByteArray(n) : P.fromByteArray(n.slice(r, o)) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return C(this, t, i) default: if (a) throw new TypeError('Unknown encoding: ' + e) ;(e = (e + '').toLowerCase()), (a = !0) } }.apply(this, arguments) }), (u.prototype.equals = function (e) { if (!u.isBuffer(e)) throw new TypeError('Argument must be a Buffer') return this === e || 0 === u.compare(this, e) }), (u.prototype.inspect = function () { var e = '', t = F.INSPECT_MAX_BYTES return 0 < this.length && ((e = this.toString('hex', 0, t).match(/.{2}/g).join(' ')), this.length > t && (e += ' ... ')), '' }), (u.prototype.compare = function (e, t, i, n, r) { if (!u.isBuffer(e)) throw new TypeError('Argument must be a Buffer') if ((void 0 === t && (t = 0), void 0 === i && (i = e ? e.length : 0), void 0 === n && (n = 0), void 0 === r && (r = this.length), t < 0 || i > e.length || n < 0 || r > this.length)) throw new RangeError('out of range index') if (r <= n && i <= t) return 0 if (r <= n) return -1 if (i <= t) return 1 if (this === e) return 0 for (var o = (r >>>= 0) - (n >>>= 0), a = (i >>>= 0) - (t >>>= 0), s = Math.min(o, a), l = this.slice(n, r), c = e.slice(t, i), h = 0; h < s; ++h) if (l[h] !== c[h]) { ;(o = l[h]), (a = c[h]) break } return o < a ? -1 : a < o ? 1 : 0 }), (u.prototype.includes = function (e, t, i) { return -1 !== this.indexOf(e, t, i) }), (u.prototype.indexOf = function (e, t, i) { return d(this, e, t, i, !0) }), (u.prototype.lastIndexOf = function (e, t, i) { return d(this, e, t, i, !1) }), (u.prototype.write = function (e, t, i, n) { if (void 0 === t) (n = 'utf8'), (i = this.length), (t = 0) else if (void 0 === i && 'string' == typeof t) (n = t), (i = this.length), (t = 0) else { if (!isFinite(t)) throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported') ;(t |= 0), isFinite(i) ? ((i |= 0), void 0 === n && (n = 'utf8')) : ((n = i), (i = void 0)) } var r, o, a, s, l, c, h, u, d, p = this.length - t if (((void 0 === i || p < i) && (i = p), (0 < e.length && (i < 0 || t < 0)) || t > this.length)) throw new RangeError('Attempt to write outside buffer bounds') n = n || 'utf8' for (var f = !1; ; ) switch (n) { case 'hex': return g(this, e, t, i) case 'utf8': case 'utf-8': return (u = t), (d = i), R(S(e, (h = this).length - u), h, u, d) case 'ascii': return m(this, e, t, i) case 'latin1': case 'binary': return m(this, e, t, i) case 'base64': return (s = this), (l = t), (c = i), R(M(e), s, l, c) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return ( (o = t), (a = i), R( (function (e, t) { for (var i, n, r, o = [], a = 0; a < e.length && !((t -= 2) < 0); ++a) (i = e.charCodeAt(a)), (n = i >> 8), (r = i % 256), o.push(r), o.push(n) return o })(e, (r = this).length - o), r, o, a ) ) default: if (f) throw new TypeError('Unknown encoding: ' + n) ;(n = ('' + n).toLowerCase()), (f = !0) } }), (u.prototype.toJSON = function () { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) } }) var D = 4096 ;(u.prototype.slice = function (e, t) { var i, n = this.length if (((e = ~~e) < 0 ? (e += n) < 0 && (e = 0) : n < e && (e = n), (t = void 0 === t ? n : ~~t) < 0 ? (t += n) < 0 && (t = 0) : n < t && (t = n), t < e && (t = e), u.TYPED_ARRAY_SUPPORT)) (i = this.subarray(e, t)).__proto__ = u.prototype else { var r = t - e i = new u(r, void 0) for (var o = 0; o < r; ++o) i[o] = this[o + e] } return i }), (u.prototype.readUIntLE = function (e, t, i) { ;(e |= 0), (t |= 0), i || I(e, t, this.length) for (var n = this[e], r = 1, o = 0; ++o < t && (r *= 256); ) n += this[e + o] * r return n }), (u.prototype.readUIntBE = function (e, t, i) { ;(e |= 0), (t |= 0), i || I(e, t, this.length) for (var n = this[e + --t], r = 1; 0 < t && (r *= 256); ) n += this[e + --t] * r return n }), (u.prototype.readUInt8 = function (e, t) { return t || I(e, 1, this.length), this[e] }), (u.prototype.readUInt16LE = function (e, t) { return t || I(e, 2, this.length), this[e] | (this[e + 1] << 8) }), (u.prototype.readUInt16BE = function (e, t) { return t || I(e, 2, this.length), (this[e] << 8) | this[e + 1] }), (u.prototype.readUInt32LE = function (e, t) { return t || I(e, 4, this.length), (this[e] | (this[e + 1] << 8) | (this[e + 2] << 16)) + 16777216 * this[e + 3] }), (u.prototype.readUInt32BE = function (e, t) { return t || I(e, 4, this.length), 16777216 * this[e] + ((this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3]) }), (u.prototype.readIntLE = function (e, t, i) { ;(e |= 0), (t |= 0), i || I(e, t, this.length) for (var n = this[e], r = 1, o = 0; ++o < t && (r *= 256); ) n += this[e + o] * r return (r *= 128) <= n && (n -= Math.pow(2, 8 * t)), n }), (u.prototype.readIntBE = function (e, t, i) { ;(e |= 0), (t |= 0), i || I(e, t, this.length) for (var n = t, r = 1, o = this[e + --n]; 0 < n && (r *= 256); ) o += this[e + --n] * r return (r *= 128) <= o && (o -= Math.pow(2, 8 * t)), o }), (u.prototype.readInt8 = function (e, t) { return t || I(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] }), (u.prototype.readInt16LE = function (e, t) { t || I(e, 2, this.length) var i = this[e] | (this[e + 1] << 8) return 32768 & i ? 4294901760 | i : i }), (u.prototype.readInt16BE = function (e, t) { t || I(e, 2, this.length) var i = this[e + 1] | (this[e] << 8) return 32768 & i ? 4294901760 | i : i }), (u.prototype.readInt32LE = function (e, t) { return t || I(e, 4, this.length), this[e] | (this[e + 1] << 8) | (this[e + 2] << 16) | (this[e + 3] << 24) }), (u.prototype.readInt32BE = function (e, t) { return t || I(e, 4, this.length), (this[e] << 24) | (this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3] }), (u.prototype.readFloatLE = function (e, t) { return t || I(e, 4, this.length), O.read(this, e, !0, 23, 4) }), (u.prototype.readFloatBE = function (e, t) { return t || I(e, 4, this.length), O.read(this, e, !1, 23, 4) }), (u.prototype.readDoubleLE = function (e, t) { return t || I(e, 8, this.length), O.read(this, e, !0, 52, 8) }), (u.prototype.readDoubleBE = function (e, t) { return t || I(e, 8, this.length), O.read(this, e, !1, 52, 8) }), (u.prototype.writeUIntLE = function (e, t, i, n) { ;(e = +e), (t |= 0), (i |= 0), n || E(this, e, t, i, Math.pow(2, 8 * i) - 1, 0) var r = 1, o = 0 for (this[t] = 255 & e; ++o < i && (r *= 256); ) this[t + o] = (e / r) & 255 return t + i }), (u.prototype.writeUIntBE = function (e, t, i, n) { ;(e = +e), (t |= 0), (i |= 0), n || E(this, e, t, i, Math.pow(2, 8 * i) - 1, 0) var r = i - 1, o = 1 for (this[t + r] = 255 & e; 0 <= --r && (o *= 256); ) this[t + r] = (e / o) & 255 return t + i }), (u.prototype.writeUInt8 = function (e, t, i) { return (e = +e), (t |= 0), i || E(this, e, t, 1, 255, 0), u.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), (this[t] = 255 & e), t + 1 }), (u.prototype.writeUInt16LE = function (e, t, i) { return (e = +e), (t |= 0), i || E(this, e, t, 2, 65535, 0), u.TYPED_ARRAY_SUPPORT ? ((this[t] = 255 & e), (this[t + 1] = e >>> 8)) : _(this, e, t, !0), t + 2 }), (u.prototype.writeUInt16BE = function (e, t, i) { return (e = +e), (t |= 0), i || E(this, e, t, 2, 65535, 0), u.TYPED_ARRAY_SUPPORT ? ((this[t] = e >>> 8), (this[t + 1] = 255 & e)) : _(this, e, t, !1), t + 2 }), (u.prototype.writeUInt32LE = function (e, t, i) { return ( (e = +e), (t |= 0), i || E(this, e, t, 4, 4294967295, 0), u.TYPED_ARRAY_SUPPORT ? ((this[t + 3] = e >>> 24), (this[t + 2] = e >>> 16), (this[t + 1] = e >>> 8), (this[t] = 255 & e)) : b(this, e, t, !0), t + 4 ) }), (u.prototype.writeUInt32BE = function (e, t, i) { return ( (e = +e), (t |= 0), i || E(this, e, t, 4, 4294967295, 0), u.TYPED_ARRAY_SUPPORT ? ((this[t] = e >>> 24), (this[t + 1] = e >>> 16), (this[t + 2] = e >>> 8), (this[t + 3] = 255 & e)) : b(this, e, t, !1), t + 4 ) }), (u.prototype.writeIntLE = function (e, t, i, n) { if (((e = +e), (t |= 0), !n)) { var r = Math.pow(2, 8 * i - 1) E(this, e, t, i, r - 1, -r) } var o = 0, a = 1, s = 0 for (this[t] = 255 & e; ++o < i && (a *= 256); ) e < 0 && 0 === s && 0 !== this[t + o - 1] && (s = 1), (this[t + o] = (((e / a) >> 0) - s) & 255) return t + i }), (u.prototype.writeIntBE = function (e, t, i, n) { if (((e = +e), (t |= 0), !n)) { var r = Math.pow(2, 8 * i - 1) E(this, e, t, i, r - 1, -r) } var o = i - 1, a = 1, s = 0 for (this[t + o] = 255 & e; 0 <= --o && (a *= 256); ) e < 0 && 0 === s && 0 !== this[t + o + 1] && (s = 1), (this[t + o] = (((e / a) >> 0) - s) & 255) return t + i }), (u.prototype.writeInt8 = function (e, t, i) { return (e = +e), (t |= 0), i || E(this, e, t, 1, 127, -128), u.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), (this[t] = 255 & e), t + 1 }), (u.prototype.writeInt16LE = function (e, t, i) { return (e = +e), (t |= 0), i || E(this, e, t, 2, 32767, -32768), u.TYPED_ARRAY_SUPPORT ? ((this[t] = 255 & e), (this[t + 1] = e >>> 8)) : _(this, e, t, !0), t + 2 }), (u.prototype.writeInt16BE = function (e, t, i) { return (e = +e), (t |= 0), i || E(this, e, t, 2, 32767, -32768), u.TYPED_ARRAY_SUPPORT ? ((this[t] = e >>> 8), (this[t + 1] = 255 & e)) : _(this, e, t, !1), t + 2 }), (u.prototype.writeInt32LE = function (e, t, i) { return ( (e = +e), (t |= 0), i || E(this, e, t, 4, 2147483647, -2147483648), u.TYPED_ARRAY_SUPPORT ? ((this[t] = 255 & e), (this[t + 1] = e >>> 8), (this[t + 2] = e >>> 16), (this[t + 3] = e >>> 24)) : b(this, e, t, !0), t + 4 ) }), (u.prototype.writeInt32BE = function (e, t, i) { return ( (e = +e), (t |= 0), i || E(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), u.TYPED_ARRAY_SUPPORT ? ((this[t] = e >>> 24), (this[t + 1] = e >>> 16), (this[t + 2] = e >>> 8), (this[t + 3] = 255 & e)) : b(this, e, t, !1), t + 4 ) }), (u.prototype.writeFloatLE = function (e, t, i) { return T(this, e, t, !0, i) }), (u.prototype.writeFloatBE = function (e, t, i) { return T(this, e, t, !1, i) }), (u.prototype.writeDoubleLE = function (e, t, i) { return x(this, e, t, !0, i) }), (u.prototype.writeDoubleBE = function (e, t, i) { return x(this, e, t, !1, i) }), (u.prototype.copy = function (e, t, i, n) { if (((i = i || 0), n || 0 === n || (n = this.length), t >= e.length && (t = e.length), (t = t || 0), 0 < n && n < i && (n = i), n === i)) return 0 if (0 === e.length || 0 === this.length) return 0 if (t < 0) throw new RangeError('targetStart out of bounds') if (i < 0 || i >= this.length) throw new RangeError('sourceStart out of bounds') if (n < 0) throw new RangeError('sourceEnd out of bounds') n > this.length && (n = this.length), e.length - t < n - i && (n = e.length - t + i) var r, o = n - i if (this === e && i < t && t < n) for (r = o - 1; 0 <= r; --r) e[r + t] = this[r + i] else if (o < 1e3 || !u.TYPED_ARRAY_SUPPORT) for (r = 0; r < o; ++r) e[r + t] = this[r + i] else Uint8Array.prototype.set.call(e, this.subarray(i, i + o), t) return o }), (u.prototype.fill = function (e, t, i, n) { if ('string' == typeof e) { if (('string' == typeof t ? ((n = t), (t = 0), (i = this.length)) : 'string' == typeof i && ((n = i), (i = this.length)), 1 === e.length)) { var r = e.charCodeAt(0) r < 256 && (e = r) } if (void 0 !== n && 'string' != typeof n) throw new TypeError('encoding must be a string') if ('string' == typeof n && !u.isEncoding(n)) throw new TypeError('Unknown encoding: ' + n) } else 'number' == typeof e && (e &= 255) if (t < 0 || this.length < t || this.length < i) throw new RangeError('Out of range index') if (i <= t) return this var o if (((t >>>= 0), (i = void 0 === i ? this.length : i >>> 0), 'number' == typeof (e = e || 0))) for (o = t; o < i; ++o) this[o] = e else { var a = u.isBuffer(e) ? e : S(new u(e, n).toString()), s = a.length for (o = 0; o < i - t; ++o) this[o + t] = a[o % s] } return this }) var t = /[^+\/0-9A-Za-z-_]/g }).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {}) }, { 'base64-js': 199, ieee754: 200, isarray: 201 } ], 199: [ function (e, t, i) { 'use strict' function l(e) { var t = e.length if (0 < t % 4) throw new Error('Invalid string. Length must be a multiple of 4') return '=' === e[t - 2] ? 2 : '=' === e[t - 1] ? 1 : 0 } function c(e, t, i) { for (var n, r = [], o = t; o < i; o += 3) (n = (e[o] << 16) + (e[o + 1] << 8) + e[o + 2]), r.push(h[((a = n) >> 18) & 63] + h[(a >> 12) & 63] + h[(a >> 6) & 63] + h[63 & a]) var a return r.join('') } ;(i.byteLength = function (e) { return (3 * e.length) / 4 - l(e) }), (i.toByteArray = function (e) { var t, i, n, r, o, a = e.length ;(r = l(e)), (o = new d((3 * a) / 4 - r)), (i = 0 < r ? a - 4 : a) var s = 0 for (t = 0; t < i; t += 4, 3) (n = (u[e.charCodeAt(t)] << 18) | (u[e.charCodeAt(t + 1)] << 12) | (u[e.charCodeAt(t + 2)] << 6) | u[e.charCodeAt(t + 3)]), (o[s++] = (n >> 16) & 255), (o[s++] = (n >> 8) & 255), (o[s++] = 255 & n) return ( 2 === r ? ((n = (u[e.charCodeAt(t)] << 2) | (u[e.charCodeAt(t + 1)] >> 4)), (o[s++] = 255 & n)) : 1 === r && ((n = (u[e.charCodeAt(t)] << 10) | (u[e.charCodeAt(t + 1)] << 4) | (u[e.charCodeAt(t + 2)] >> 2)), (o[s++] = (n >> 8) & 255), (o[s++] = 255 & n)), o ) }), (i.fromByteArray = function (e) { for (var t, i = e.length, n = i % 3, r = '', o = [], a = 0, s = i - n; a < s; a += 16383) o.push(c(e, a, s < a + 16383 ? s : a + 16383)) return ( 1 == n ? ((t = e[i - 1]), (r += h[t >> 2]), (r += h[(t << 4) & 63]), (r += '==')) : 2 == n && ((t = (e[i - 2] << 8) + e[i - 1]), (r += h[t >> 10]), (r += h[(t >> 4) & 63]), (r += h[(t << 2) & 63]), (r += '=')), o.push(r), o.join('') ) }) for (var h = [], u = [], d = 'undefined' != typeof Uint8Array ? Uint8Array : Array, n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', r = 0, o = n.length; r < o; ++r) (h[r] = n[r]), (u[n.charCodeAt(r)] = r) ;(u['-'.charCodeAt(0)] = 62), (u['_'.charCodeAt(0)] = 63) }, {} ], 200: [ function (e, t, i) { ;(i.read = function (e, t, i, n, r) { var o, a, s = 8 * r - n - 1, l = (1 << s) - 1, c = l >> 1, h = -7, u = i ? r - 1 : 0, d = i ? -1 : 1, p = e[t + u] for (u += d, o = p & ((1 << -h) - 1), p >>= -h, h += s; 0 < h; o = 256 * o + e[t + u], u += d, h -= 8); for (a = o & ((1 << -h) - 1), o >>= -h, h += n; 0 < h; a = 256 * a + e[t + u], u += d, h -= 8); if (0 === o) o = 1 - c else { if (o === l) return a ? NaN : (1 / 0) * (p ? -1 : 1) ;(a += Math.pow(2, n)), (o -= c) } return (p ? -1 : 1) * a * Math.pow(2, o - n) }), (i.write = function (e, t, i, n, r, o) { var a, s, l, c = 8 * o - r - 1, h = (1 << c) - 1, u = h >> 1, d = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : o - 1, f = n ? 1 : -1, g = t < 0 || (0 === t && 1 / t < 0) ? 1 : 0 for ( t = Math.abs(t), isNaN(t) || t === 1 / 0 ? ((s = isNaN(t) ? 1 : 0), (a = h)) : ((a = Math.floor(Math.log(t) / Math.LN2)), t * (l = Math.pow(2, -a)) < 1 && (a--, (l *= 2)), 2 <= (t += 1 <= a + u ? d / l : d * Math.pow(2, 1 - u)) * l && (a++, (l /= 2)), h <= a + u ? ((s = 0), (a = h)) : 1 <= a + u ? ((s = (t * l - 1) * Math.pow(2, r)), (a += u)) : ((s = t * Math.pow(2, u - 1) * Math.pow(2, r)), (a = 0))); 8 <= r; e[i + p] = 255 & s, p += f, s /= 256, r -= 8 ); for (a = (a << r) | s, c += r; 0 < c; e[i + p] = 255 & a, p += f, a /= 256, c -= 8); e[i + p - f] |= 128 * g }) }, {} ], 201: [ function (e, t, i) { var n = {}.toString t.exports = Array.isArray || function (e) { return '[object Array]' == n.call(e) } }, {} ], 202: [ function (e, t, i) { function n() { ;(this._events = this._events || {}), (this._maxListeners = this._maxListeners || void 0) } function l(e) { return 'function' == typeof e } function c(e) { return 'object' == typeof e && null !== e } function h(e) { return void 0 === e } ;(((t.exports = n).EventEmitter = n).prototype._events = void 0), (n.prototype._maxListeners = void 0), (n.defaultMaxListeners = 10), (n.prototype.setMaxListeners = function (e) { if ( !(function (e) { return 'number' == typeof e })(e) || e < 0 || isNaN(e) ) throw TypeError('n must be a positive number') return (this._maxListeners = e), this }), (n.prototype.emit = function (e) { var t, i, n, r, o, a if ((this._events || (this._events = {}), 'error' === e && (!this._events.error || (c(this._events.error) && !this._events.error.length)))) { if ((t = arguments[1]) instanceof Error) throw t var s = new Error('Uncaught, unspecified "error" event. (' + t + ')') throw ((s.context = t), s) } if (h((i = this._events[e]))) return !1 if (l(i)) switch (arguments.length) { case 1: i.call(this) break case 2: i.call(this, arguments[1]) break case 3: i.call(this, arguments[1], arguments[2]) break default: ;(r = Array.prototype.slice.call(arguments, 1)), i.apply(this, r) } else if (c(i)) for (r = Array.prototype.slice.call(arguments, 1), n = (a = i.slice()).length, o = 0; o < n; o++) a[o].apply(this, r) return !0 }), (n.prototype.on = n.prototype.addListener = function (e, t) { var i if (!l(t)) throw TypeError('listener must be a function') return ( this._events || (this._events = {}), this._events.newListener && this.emit('newListener', e, l(t.listener) ? t.listener : t), this._events[e] ? (c(this._events[e]) ? this._events[e].push(t) : (this._events[e] = [this._events[e], t])) : (this._events[e] = t), c(this._events[e]) && !this._events[e].warned && (i = h(this._maxListeners) ? n.defaultMaxListeners : this._maxListeners) && 0 < i && this._events[e].length > i && ((this._events[e].warned = !0), console.error('(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.', this._events[e].length), 'function' == typeof console.trace && console.trace()), this ) }), (n.prototype.once = function (e, t) { function i() { this.removeListener(e, i), n || ((n = !0), t.apply(this, arguments)) } if (!l(t)) throw TypeError('listener must be a function') var n = !1 return (i.listener = t), this.on(e, i), this }), (n.prototype.removeListener = function (e, t) { var i, n, r, o if (!l(t)) throw TypeError('listener must be a function') if (!this._events || !this._events[e]) return this if (((r = (i = this._events[e]).length), (n = -1), i === t || (l(i.listener) && i.listener === t))) delete this._events[e], this._events.removeListener && this.emit('removeListener', e, t) else if (c(i)) { for (o = r; 0 < o--; ) if (i[o] === t || (i[o].listener && i[o].listener === t)) { n = o break } if (n < 0) return this 1 === i.length ? ((i.length = 0), delete this._events[e]) : i.splice(n, 1), this._events.removeListener && this.emit('removeListener', e, t) } return this }), (n.prototype.removeAllListeners = function (e) { var t, i if (!this._events) return this if (!this._events.removeListener) return 0 === arguments.length ? (this._events = {}) : this._events[e] && delete this._events[e], this if (0 === arguments.length) { for (t in this._events) 'removeListener' !== t && this.removeAllListeners(t) return this.removeAllListeners('removeListener'), (this._events = {}), this } if (l((i = this._events[e]))) this.removeListener(e, i) else if (i) for (; i.length; ) this.removeListener(e, i[i.length - 1]) return delete this._events[e], this }), (n.prototype.listeners = function (e) { return this._events && this._events[e] ? (l(this._events[e]) ? [this._events[e]] : this._events[e].slice()) : [] }), (n.prototype.listenerCount = function (e) { if (this._events) { var t = this._events[e] if (l(t)) return 1 if (t) return t.length } return 0 }), (n.listenerCount = function (e, t) { return e.listenerCount(t) }) }, {} ], 203: [ function (e, t, i) { function n() { throw new Error('setTimeout has not been defined') } function r() { throw new Error('clearTimeout has not been defined') } function o(t) { if (h === setTimeout) return setTimeout(t, 0) if ((h === n || !h) && setTimeout) return (h = setTimeout), setTimeout(t, 0) try { return h(t, 0) } catch (e) { try { return h.call(null, t, 0) } catch (e) { return h.call(this, t, 0) } } } function a() { g && p && ((g = !1), p.length ? (f = p.concat(f)) : (m = -1), f.length && s()) } function s() { if (!g) { var e = o(a) g = !0 for (var t = f.length; t; ) { for (p = f, f = []; ++m < t; ) p && p[m].run() ;(m = -1), (t = f.length) } ;(p = null), (g = !1), (function (t) { if (u === clearTimeout) return clearTimeout(t) if ((u === r || !u) && clearTimeout) return (u = clearTimeout), clearTimeout(t) try { u(t) } catch (e) { try { return u.call(null, t) } catch (e) { return u.call(this, t) } } })(e) } } function l(e, t) { ;(this.fun = e), (this.array = t) } function c() {} var h, u, d = (t.exports = {}) !(function () { try { h = 'function' == typeof setTimeout ? setTimeout : n } catch (e) { h = n } try { u = 'function' == typeof clearTimeout ? clearTimeout : r } catch (e) { u = r } })() var p, f = [], g = !1, m = -1 ;(d.nextTick = function (e) { var t = new Array(arguments.length - 1) if (1 < arguments.length) for (var i = 1; i < arguments.length; i++) t[i - 1] = arguments[i] f.push(new l(e, t)), 1 !== f.length || g || o(s) }), (l.prototype.run = function () { this.fun.apply(null, this.array) }), (d.title = 'browser'), (d.browser = !0), (d.env = {}), (d.argv = []), (d.version = ''), (d.versions = {}), (d.on = c), (d.addListener = c), (d.once = c), (d.off = c), (d.removeListener = c), (d.removeAllListeners = c), (d.emit = c), (d.binding = function (e) { throw new Error('process.binding is not supported') }), (d.cwd = function () { return '/' }), (d.chdir = function (e) { throw new Error('process.chdir is not supported') }), (d.umask = function () { return 0 }) }, {} ], 204: [ function (e, O, L) { ;(function (P) { !(function (e) { function v(e) { throw new RangeError(g[e]) } function r(e, t) { for (var i = e.length, n = []; i--; ) n[i] = t(e[i]) return n } function t(e, t) { var i = e.split('@'), n = '' return 1 < i.length && ((n = i[0] + '@'), (e = i[1])), n + r((e = e.replace(f, '.')).split('.'), t).join('.') } function y(e) { for (var t, i, n = [], r = 0, o = e.length; r < o; ) 55296 <= (t = e.charCodeAt(r++)) && t <= 56319 && r < o ? 56320 == (64512 & (i = e.charCodeAt(r++))) ? n.push(((1023 & t) << 10) + (1023 & i) + 65536) : (n.push(t), r--) : n.push(t) return n } function A(e) { return r(e, function (e) { var t = '' return 65535 < e && ((t += R((((e -= 65536) >>> 10) & 1023) | 55296)), (e = 56320 | (1023 & e))), t + R(e) }).join('') } function C(e, t) { return e + 22 + 75 * (e < 26) - ((0 != t) << 5) } function I(e, t, i) { var n = 0 for (e = i ? M(e / u) : e >> 1, e += M(e / t); (m * w) >> 1 < e; n += _) e = M(e / m) return M(n + ((m + 1) * e) / (e + h)) } function i(e) { var t, i, n, r, o, a, s, l, c, h, u, d = [], p = e.length, f = 0, g = x, m = T for ((i = e.lastIndexOf(S)) < 0 && (i = 0), n = 0; n < i; ++n) 128 <= e.charCodeAt(n) && v('not-basic'), d.push(e.charCodeAt(n)) for (r = 0 < i ? i + 1 : 0; r < p; ) { for ( o = f, a = 1, s = _; p <= r && v('invalid-input'), (u = e.charCodeAt(r++)), (_ <= (l = u - 48 < 10 ? u - 22 : u - 65 < 26 ? u - 65 : u - 97 < 26 ? u - 97 : _) || l > M((E - f) / a)) && v('overflow'), (f += l * a), !(l < (c = s <= m ? b : m + w <= s ? w : s - m)); s += _ ) a > M(E / (h = _ - c)) && v('overflow'), (a *= h) ;(m = I(f - o, (t = d.length + 1), 0 == o)), M(f / t) > E - g && v('overflow'), (g += M(f / t)), (f %= t), d.splice(f++, 0, g) } return A(d) } function n(e) { var t, i, n, r, o, a, s, l, c, h, u, d, p, f, g, m = [] for (d = (e = y(e)).length, t = x, o = T, a = i = 0; a < d; ++a) (u = e[a]) < 128 && m.push(R(u)) for (n = r = m.length, r && m.push(S); n < d; ) { for (s = E, a = 0; a < d; ++a) t <= (u = e[a]) && u < s && (s = u) for (s - t > M((E - i) / (p = n + 1)) && v('overflow'), i += (s - t) * p, t = s, a = 0; a < d; ++a) if (((u = e[a]) < t && ++i > E && v('overflow'), u == t)) { for (l = i, c = _; !(l < (h = c <= o ? b : o + w <= c ? w : c - o)); c += _) (g = l - h), (f = _ - h), m.push(R(C(h + (g % f), 0))), (l = M(g / f)) m.push(R(C(l, 0))), (o = I(i, p, n == r)), (i = 0), ++n } ++i, ++t } return m.join('') } var o = 'object' == typeof L && L && !L.nodeType && L, a = 'object' == typeof O && O && !O.nodeType && O, s = 'object' == typeof P && P ;(s.global !== s && s.window !== s && s.self !== s) || (e = s) var l, c, E = 2147483647, _ = 36, b = 1, w = 26, h = 38, u = 700, T = 72, x = 128, S = '-', d = /^xn--/, p = /[^\x20-\x7E]/, f = /[\x2E\u3002\uFF0E\uFF61]/g, g = { overflow: 'Overflow: input needs wider integers to process', 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', 'invalid-input': 'Invalid input' }, m = _ - b, M = Math.floor, R = String.fromCharCode if ( ((l = { version: '1.4.1', ucs2: { decode: y, encode: A }, decode: i, encode: n, toASCII: function (e) { return t(e, function (e) { return p.test(e) ? 'xn--' + n(e) : e }) }, toUnicode: function (e) { return t(e, function (e) { return d.test(e) ? i(e.slice(4).toLowerCase()) : e }) } }), 'function' == typeof define && 'object' == typeof define.amd && define.amd) ) define('punycode', function () { return l }) else if (o && a) if (O.exports == o) a.exports = l else for (c in l) l.hasOwnProperty(c) && (o[c] = l[c]) else e.punycode = l })(this) }).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {}) }, {} ], 205: [ function (e, t, i) { 'use strict' t.exports = function (e, t, i, n) { ;(t = t || '&'), (i = i || '=') var r = {} if ('string' != typeof e || 0 === e.length) return r var o = /\+/g e = e.split(t) var a = 1e3 n && 'number' == typeof n.maxKeys && (a = n.maxKeys) var s, l, c = e.length 0 < a && a < c && (c = a) for (var h = 0; h < c; ++h) { var u, d, p, f, g = e[h].replace(o, '%20'), m = g.indexOf(i) ;(d = 0 <= m ? ((u = g.substr(0, m)), g.substr(m + 1)) : ((u = g), '')), (p = decodeURIComponent(u)), (f = decodeURIComponent(d)), (s = r), (l = p), Object.prototype.hasOwnProperty.call(s, l) ? (v(r[p]) ? r[p].push(f) : (r[p] = [r[p], f])) : (r[p] = f) } return r } var v = Array.isArray || function (e) { return '[object Array]' === Object.prototype.toString.call(e) } }, {} ], 206: [ function (e, t, i) { 'use strict' function o(e, t) { if (e.map) return e.map(t) for (var i = [], n = 0; n < e.length; n++) i.push(t(e[n], n)) return i } function a(e) { switch (typeof e) { case 'string': return e case 'boolean': return e ? 'true' : 'false' case 'number': return isFinite(e) ? e : '' default: return '' } } t.exports = function (i, n, r, e) { return ( (n = n || '&'), (r = r || '='), null === i && (i = void 0), 'object' == typeof i ? o(l(i), function (e) { var t = encodeURIComponent(a(e)) + r return s(i[e]) ? o(i[e], function (e) { return t + encodeURIComponent(a(e)) }).join(n) : t + encodeURIComponent(a(i[e])) }).join(n) : e ? encodeURIComponent(a(e)) + r + encodeURIComponent(a(i)) : '' ) } var s = Array.isArray || function (e) { return '[object Array]' === Object.prototype.toString.call(e) }, l = Object.keys || function (e) { var t = [] for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && t.push(i) return t } }, {} ], 207: [ function (e, t, i) { 'use strict' ;(i.decode = i.parse = e('./decode')), (i.encode = i.stringify = e('./encode')) }, { './decode': 205, './encode': 206 } ], 208: [ function (e, t, i) { 'use strict' function x() { ;(this.protocol = null), (this.slashes = null), (this.auth = null), (this.host = null), (this.port = null), (this.hostname = null), (this.hash = null), (this.search = null), (this.query = null), (this.pathname = null), (this.path = null), (this.href = null) } function n(e, t, i) { if (e && D.isObject(e) && e instanceof x) return e var n = new x() return n.parse(e, t, i), n } var L = e('punycode'), D = e('./util') ;(i.parse = n), (i.resolve = function (e, t) { return n(e, !1, !0).resolve(t) }), (i.resolveObject = function (e, t) { return e ? n(e, !1, !0).resolveObject(t) : t }), (i.format = function (e) { return D.isString(e) && (e = n(e)), e instanceof x ? e.format() : x.prototype.format.call(e) }), (i.Url = x) var N = /^([a-z0-9.+-]+:)/i, r = /:[0-9]*$/, F = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, o = ['{', '}', '|', '\\', '^', '`'].concat(['<', '>', '"', '`', ' ', '\r', '\n', '\t']), B = ["'"].concat(o), V = ['%', '/', '?', ';', '#'].concat(B), k = ['/', '?', '#'], U = /^[+a-z0-9A-Z_-]{0,63}$/, H = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, z = { javascript: !0, 'javascript:': !0 }, G = { javascript: !0, 'javascript:': !0 }, W = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, 'http:': !0, 'https:': !0, 'ftp:': !0, 'gopher:': !0, 'file:': !0 }, j = e('querystring') ;(x.prototype.parse = function (e, t, i) { if (!D.isString(e)) throw new TypeError("Parameter 'url' must be a string, not " + typeof e) var n = e.indexOf('?'), r = -1 !== n && n < e.indexOf('#') ? '?' : '#', o = e.split(r) o[0] = o[0].replace(/\\/g, '/') var a = (e = o.join(r)) if (((a = a.trim()), !i && 1 === e.split('#').length)) { var s = F.exec(a) if (s) return ( (this.path = a), (this.href = a), (this.pathname = s[1]), s[2] ? ((this.search = s[2]), (this.query = t ? j.parse(this.search.substr(1)) : this.search.substr(1))) : t && ((this.search = ''), (this.query = {})), this ) } var l = N.exec(a) if (l) { var c = (l = l[0]).toLowerCase() ;(this.protocol = c), (a = a.substr(l.length)) } if (i || l || a.match(/^\/\/[^@\/]+@[^@\/]+/)) { var h = '//' === a.substr(0, 2) !h || (l && G[l]) || ((a = a.substr(2)), (this.slashes = !0)) } if (!G[l] && (h || (l && !W[l]))) { for (var u = -1, d = 0; d < k.length; d++) { ;-1 !== (g = a.indexOf(k[d])) && (-1 === u || g < u) && (u = g) } var p, f ;-1 !== (f = -1 === u ? a.lastIndexOf('@') : a.lastIndexOf('@', u)) && ((p = a.slice(0, f)), (a = a.slice(f + 1)), (this.auth = decodeURIComponent(p))), (u = -1) for (d = 0; d < V.length; d++) { var g ;-1 !== (g = a.indexOf(V[d])) && (-1 === u || g < u) && (u = g) } ;-1 === u && (u = a.length), (this.host = a.slice(0, u)), (a = a.slice(u)), this.parseHost(), (this.hostname = this.hostname || '') var m = '[' === this.hostname[0] && ']' === this.hostname[this.hostname.length - 1] if (!m) for (var v = this.hostname.split(/\./), y = ((d = 0), v.length); d < y; d++) { var A = v[d] if (A && !A.match(U)) { for (var C = '', I = 0, E = A.length; I < E; I++) C += 127 < A.charCodeAt(I) ? 'x' : A[I] if (!C.match(U)) { var _ = v.slice(0, d), b = v.slice(d + 1), w = A.match(H) w && (_.push(w[1]), b.unshift(w[2])), b.length && (a = '/' + b.join('.') + a), (this.hostname = _.join('.')) break } } } 255 < this.hostname.length ? (this.hostname = '') : (this.hostname = this.hostname.toLowerCase()), m || (this.hostname = L.toASCII(this.hostname)) var T = this.port ? ':' + this.port : '', x = this.hostname || '' ;(this.host = x + T), (this.href += this.host), m && ((this.hostname = this.hostname.substr(1, this.hostname.length - 2)), '/' !== a[0] && (a = '/' + a)) } if (!z[c]) for (d = 0, y = B.length; d < y; d++) { var S = B[d] if (-1 !== a.indexOf(S)) { var M = encodeURIComponent(S) M === S && (M = escape(S)), (a = a.split(S).join(M)) } } var R = a.indexOf('#') ;-1 !== R && ((this.hash = a.substr(R)), (a = a.slice(0, R))) var P = a.indexOf('?') if ( (-1 !== P ? ((this.search = a.substr(P)), (this.query = a.substr(P + 1)), t && (this.query = j.parse(this.query)), (a = a.slice(0, P))) : t && ((this.search = ''), (this.query = {})), a && (this.pathname = a), W[c] && this.hostname && !this.pathname && (this.pathname = '/'), this.pathname || this.search) ) { T = this.pathname || '' var O = this.search || '' this.path = T + O } return (this.href = this.format()), this }), (x.prototype.format = function () { var e = this.auth || '' e && ((e = (e = encodeURIComponent(e)).replace(/%3A/i, ':')), (e += '@')) var t = this.protocol || '', i = this.pathname || '', n = this.hash || '', r = !1, o = '' this.host ? (r = e + this.host) : this.hostname && ((r = e + (-1 === this.hostname.indexOf(':') ? this.hostname : '[' + this.hostname + ']')), this.port && (r += ':' + this.port)), this.query && D.isObject(this.query) && Object.keys(this.query).length && (o = j.stringify(this.query)) var a = this.search || (o && '?' + o) || '' return ( t && ':' !== t.substr(-1) && (t += ':'), this.slashes || ((!t || W[t]) && !1 !== r) ? ((r = '//' + (r || '')), i && '/' !== i.charAt(0) && (i = '/' + i)) : (r = r || ''), n && '#' !== n.charAt(0) && (n = '#' + n), a && '?' !== a.charAt(0) && (a = '?' + a), t + r + (i = i.replace(/[?#]/g, function (e) { return encodeURIComponent(e) })) + (a = a.replace('#', '%23')) + n ) }), (x.prototype.resolve = function (e) { return this.resolveObject(n(e, !1, !0)).format() }), (x.prototype.resolveObject = function (e) { if (D.isString(e)) { var t = new x() t.parse(e, !1, !0), (e = t) } for (var i = new x(), n = Object.keys(this), r = 0; r < n.length; r++) { var o = n[r] i[o] = this[o] } if (((i.hash = e.hash), '' === e.href)) return (i.href = i.format()), i if (e.slashes && !e.protocol) { for (var a = Object.keys(e), s = 0; s < a.length; s++) { var l = a[s] 'protocol' !== l && (i[l] = e[l]) } return W[i.protocol] && i.hostname && !i.pathname && (i.path = i.pathname = '/'), (i.href = i.format()), i } if (e.protocol && e.protocol !== i.protocol) { if (!W[e.protocol]) { for (var c = Object.keys(e), h = 0; h < c.length; h++) { var u = c[h] i[u] = e[u] } return (i.href = i.format()), i } if (((i.protocol = e.protocol), e.host || G[e.protocol])) i.pathname = e.pathname else { for (var d = (e.pathname || '').split('/'); d.length && !(e.host = d.shift()); ); e.host || (e.host = ''), e.hostname || (e.hostname = ''), '' !== d[0] && d.unshift(''), d.length < 2 && d.unshift(''), (i.pathname = d.join('/')) } if (((i.search = e.search), (i.query = e.query), (i.host = e.host || ''), (i.auth = e.auth), (i.hostname = e.hostname || e.host), (i.port = e.port), i.pathname || i.search)) { var p = i.pathname || '', f = i.search || '' i.path = p + f } return (i.slashes = i.slashes || e.slashes), (i.href = i.format()), i } var g = i.pathname && '/' === i.pathname.charAt(0), m = e.host || (e.pathname && '/' === e.pathname.charAt(0)), v = m || g || (i.host && e.pathname), y = v, A = (i.pathname && i.pathname.split('/')) || [], C = ((d = (e.pathname && e.pathname.split('/')) || []), i.protocol && !W[i.protocol]) if ( (C && ((i.hostname = ''), (i.port = null), i.host && ('' === A[0] ? (A[0] = i.host) : A.unshift(i.host)), (i.host = ''), e.protocol && ((e.hostname = null), (e.port = null), e.host && ('' === d[0] ? (d[0] = e.host) : d.unshift(e.host)), (e.host = null)), (v = v && ('' === d[0] || '' === A[0]))), m) ) (i.host = e.host || '' === e.host ? e.host : i.host), (i.hostname = e.hostname || '' === e.hostname ? e.hostname : i.hostname), (i.search = e.search), (i.query = e.query), (A = d) else if (d.length) (A = A || []).pop(), (A = A.concat(d)), (i.search = e.search), (i.query = e.query) else if (!D.isNullOrUndefined(e.search)) { if (C) (i.hostname = i.host = A.shift()), (w = !!(i.host && 0 < i.host.indexOf('@')) && i.host.split('@')) && ((i.auth = w.shift()), (i.host = i.hostname = w.shift())) return ( (i.search = e.search), (i.query = e.query), (D.isNull(i.pathname) && D.isNull(i.search)) || (i.path = (i.pathname ? i.pathname : '') + (i.search ? i.search : '')), (i.href = i.format()), i ) } if (!A.length) return (i.pathname = null), i.search ? (i.path = '/' + i.search) : (i.path = null), (i.href = i.format()), i for (var I = A.slice(-1)[0], E = ((i.host || e.host || 1 < A.length) && ('.' === I || '..' === I)) || '' === I, _ = 0, b = A.length; 0 <= b; b--) '.' === (I = A[b]) ? A.splice(b, 1) : '..' === I ? (A.splice(b, 1), _++) : _ && (A.splice(b, 1), _--) if (!v && !y) for (; _--; ) A.unshift('..') !v || '' === A[0] || (A[0] && '/' === A[0].charAt(0)) || A.unshift(''), E && '/' !== A.join('/').substr(-1) && A.push('') var w, T = '' === A[0] || (A[0] && '/' === A[0].charAt(0)) C && ((i.hostname = i.host = T ? '' : A.length ? A.shift() : ''), (w = !!(i.host && 0 < i.host.indexOf('@')) && i.host.split('@')) && ((i.auth = w.shift()), (i.host = i.hostname = w.shift()))) return ( (v = v || (i.host && A.length)) && !T && A.unshift(''), A.length ? (i.pathname = A.join('/')) : ((i.pathname = null), (i.path = null)), (D.isNull(i.pathname) && D.isNull(i.search)) || (i.path = (i.pathname ? i.pathname : '') + (i.search ? i.search : '')), (i.auth = e.auth || i.auth), (i.slashes = i.slashes || e.slashes), (i.href = i.format()), i ) }), (x.prototype.parseHost = function () { var e = this.host, t = r.exec(e) t && (':' !== (t = t[0]) && (this.port = t.substr(1)), (e = e.substr(0, e.length - t.length))), e && (this.hostname = e) }) }, { './util': 209, punycode: 204, querystring: 207 } ], 209: [ function (e, t, i) { 'use strict' t.exports = { isString: function (e) { return 'string' == typeof e }, isObject: function (e) { return 'object' == typeof e && null !== e }, isNull: function (e) { return null === e }, isNullOrUndefined: function (e) { return null == e } } }, {} ], 210: [ function (e, t, i) { 'use strict' function r(e) { return c + e } function s(e) { if ('string' != typeof e) throw new TypeError('key must be a string.') } var l = Object.prototype.hasOwnProperty, c = '~' t.exports = function (t) { var o = Object.create(null), n = 0, a = {} return ( (function (e, t) { for (var i in t) Object.defineProperty(e, i, { value: t[i], configurable: !0, writable: !0 }) })(a, { get: function (e, t) { s(e) var i = r(e) return i in o ? o[i] : t }, set: function (e, t) { s(e) var i = r(e) return i in o || ++n, (o[i] = t) }, has: function (e) { return s(e), r(e) in o }, delete: function (e) { s(e) var t = r(e) return t in o && (--n, delete o[t], !0) }, clear: function () { ;(o = Object.create(null)), (n = 0) }, forEach: function (e, t) { if ('function' != typeof e) throw new TypeError('`callback` must be a function') for (var i in o) if (l.call(o, i)) { var n = i.substring(c.length), r = o[i] e.call(t, r, n, a) } } }), Object.defineProperty(a, 'size', { get: function () { return n }, configurable: !0 }), 'object' == typeof t && null !== t && Object.keys(t).forEach(function (e) { a.set(e, t[e]) }), a ) } }, {} ], 211: [ function (e, t, i) { t.exports = e('./lib/heap') }, { './lib/heap': 212 } ], 212: [ function (e, y, A) { ;(function () { var e, d, l, p, f, t, c, i, g, m, n, r, o, h, u, a, s function v(e) { ;(this.cmp = null != e ? e : d), (this.nodes = []) } ;(l = Math.floor), (m = Math.min), (d = function (e, t) { return e < t ? -1 : t < e ? 1 : 0 }), (g = function (e, t, i, n, r) { var o if ((null == i && (i = 0), null == r && (r = d), i < 0)) throw new Error('lo must be non-negative') for (null == n && (n = e.length); i < n; ) r(t, e[(o = l((i + n) / 2))]) < 0 ? (n = o) : (i = o + 1) return [].splice.apply(e, [i, i - i].concat(t)), t }), (t = function (e, t, i) { return null == i && (i = d), e.push(t), h(e, 0, e.length - 1, i) }), (f = function (e, t) { var i, n return null == t && (t = d), (i = e.pop()), e.length ? ((n = e[0]), (e[0] = i), u(e, 0, t)) : (n = i), n }), (i = function (e, t, i) { var n return null == i && (i = d), (n = e[0]), (e[0] = t), u(e, 0, i), n }), (c = function (e, t, i) { var n return null == i && (i = d), e.length && i(e[0], t) < 0 && ((t = (n = [e[0], t])[0]), (e[0] = n[1]), u(e, 0, i)), t }), (p = function (i, e) { var t, n, r, o, a, s for ( null == e && (e = d), a = [], n = 0, r = (o = function () { s = [] for (var e = 0, t = l(i.length / 2); 0 <= t ? e < t : t < e; 0 <= t ? e++ : e--) s.push(e) return s } .apply(this) .reverse()).length; n < r; n++ ) (t = o[n]), a.push(u(i, t, e)) return a }), (o = function (e, t, i) { var n if ((null == i && (i = d), -1 !== (n = e.indexOf(t)))) return h(e, 0, n, i), u(e, n, i) }), (n = function (e, t, i) { var n, r, o, a, s if ((null == i && (i = d), !(r = e.slice(0, t)).length)) return r for (p(r, i), o = 0, a = (s = e.slice(t)).length; o < a; o++) (n = s[o]), c(r, n, i) return r.sort(i).reverse() }), (r = function (e, t, i) { var n, r, o, a, s, l, c, h, u if ((null == i && (i = d), 10 * t <= e.length)) { if (!(o = e.slice(0, t).sort(i)).length) return o for (r = o[o.length - 1], a = 0, l = (c = e.slice(t)).length; a < l; a++) i((n = c[a]), r) < 0 && (g(o, n, 0, null, i), o.pop(), (r = o[o.length - 1])) return o } for (p(e, i), u = [], s = 0, h = m(t, e.length); 0 <= h ? s < h : h < s; 0 <= h ? ++s : --s) u.push(f(e, i)) return u }), (h = function (e, t, i, n) { var r, o, a for (null == n && (n = d), r = e[i]; t < i && n(r, (o = e[(a = (i - 1) >> 1)])) < 0; ) (e[i] = o), (i = a) return (e[i] = r) }), (u = function (e, t, i) { var n, r, o, a, s for (null == i && (i = d), r = e.length, o = e[(s = t)], n = 2 * t + 1; n < r; ) (a = n + 1) < r && !(i(e[n], e[a]) < 0) && (n = a), (e[t] = e[n]), (n = 2 * (t = n) + 1) return (e[t] = o), h(e, s, t, i) }), (v.push = t), (v.pop = f), (v.replace = i), (v.pushpop = c), (v.heapify = p), (v.updateItem = o), (v.nlargest = n), (v.nsmallest = r), (v.prototype.push = function (e) { return t(this.nodes, e, this.cmp) }), (v.prototype.pop = function () { return f(this.nodes, this.cmp) }), (v.prototype.peek = function () { return this.nodes[0] }), (v.prototype.contains = function (e) { return -1 !== this.nodes.indexOf(e) }), (v.prototype.replace = function (e) { return i(this.nodes, e, this.cmp) }), (v.prototype.pushpop = function (e) { return c(this.nodes, e, this.cmp) }), (v.prototype.heapify = function () { return p(this.nodes, this.cmp) }), (v.prototype.updateItem = function (e) { return o(this.nodes, e, this.cmp) }), (v.prototype.clear = function () { return (this.nodes = []) }), (v.prototype.empty = function () { return 0 === this.nodes.length }), (v.prototype.size = function () { return this.nodes.length }), (v.prototype.clone = function () { var e return ((e = new v()).nodes = this.nodes.slice(0)), e }), (v.prototype.toArray = function () { return this.nodes.slice(0) }), (v.prototype.insert = v.prototype.push), (v.prototype.top = v.prototype.peek), (v.prototype.front = v.prototype.peek), (v.prototype.has = v.prototype.contains), (v.prototype.copy = v.prototype.clone), (e = v), (a = this), (s = function () { return e }), 'function' == typeof define && define.amd ? define([], s) : 'object' == typeof A ? (y.exports = s()) : (a.Heap = s()) }).call(this) }, {} ], 213: [ function (e, t, i) { function n() {} function o(e) { if ('object' != typeof this) throw new TypeError('Promises must be constructed via new') if ('function' != typeof e) throw new TypeError('not a function') ;(this._state = 0), (this._handled = !1), (this._value = void 0), (this._deferreds = []), h(e, this) } function r(i, n) { for (; 3 === i._state; ) i = i._value return 0 === i._state ? void i._deferreds.push(n) : ((i._handled = !0), void o._immediateFn(function () { var e = 1 === i._state ? n.onFulfilled : n.onRejected if (null !== e) { var t try { t = e(i._value) } catch (e) { return void s(n.promise, e) } a(n.promise, t) } else (1 === i._state ? a : s)(n.promise, i._value) })) } function a(e, t) { try { if (t === e) throw new TypeError('A promise cannot be resolved with itself.') if (t && ('object' == typeof t || 'function' == typeof t)) { var i = t.then if (t instanceof o) return (e._state = 3), (e._value = t), void l(e) if ('function' == typeof i) return void h( (function (e, t) { return function () { e.apply(t, arguments) } })(i, t), e ) } ;(e._state = 1), (e._value = t), l(e) } catch (t) { s(e, t) } } function s(e, t) { ;(e._state = 2), (e._value = t), l(e) } function l(e) { 2 === e._state && 0 === e._deferreds.length && o._immediateFn(function () { e._handled || o._unhandledRejectionFn(e._value) }) for (var t = 0, i = e._deferreds.length; t < i; t++) r(e, e._deferreds[t]) e._deferreds = null } function c(e, t, i) { ;(this.onFulfilled = 'function' == typeof e ? e : null), (this.onRejected = 'function' == typeof t ? t : null), (this.promise = i) } function h(e, t) { var i = !1 try { e( function (e) { i || ((i = !0), a(t, e)) }, function (e) { i || ((i = !0), s(t, e)) } ) } catch (e) { if (i) return ;(i = !0), s(t, e) } } var u, d ;(u = this), (d = setTimeout), (o.prototype.catch = function (e) { return this.then(null, e) }), (o.prototype.then = function (e, t) { var i = new this.constructor(n) return r(this, new c(e, t, i)), i }), (o.all = function (e) { var s = Array.prototype.slice.call(e) return new o(function (n, r) { function o(t, e) { try { if (e && ('object' == typeof e || 'function' == typeof e)) { var i = e.then if ('function' == typeof i) return void i.call( e, function (e) { o(t, e) }, r ) } ;(s[t] = e), 0 == --a && n(s) } catch (e) { r(e) } } if (0 === s.length) return n([]) for (var a = s.length, e = 0; e < s.length; e++) o(e, s[e]) }) }), (o.resolve = function (t) { return t && 'object' == typeof t && t.constructor === o ? t : new o(function (e) { e(t) }) }), (o.reject = function (i) { return new o(function (e, t) { t(i) }) }), (o.race = function (r) { return new o(function (e, t) { for (var i = 0, n = r.length; i < n; i++) r[i].then(e, t) }) }), (o._immediateFn = ('function' == typeof setImmediate && function (e) { setImmediate(e) }) || function (e) { d(e, 0) }), (o._unhandledRejectionFn = function (e) { 'undefined' != typeof console && console && console.warn('Possible Unhandled Promise Rejection:', e) }), (o._setImmediateFn = function (e) { o._immediateFn = e }), (o._setUnhandledRejectionFn = function (e) { o._unhandledRejectionFn = e }), void 0 !== t && t.exports ? (t.exports = o) : u.Promise || (u.Promise = o) }, {} ], 214: [ function (p, i, e) { ;(function (d) { var e, t ;(e = this), (t = function (I, e) { 'use strict' var a, t, u, i, s, n, r, o = {} return ( (o.ByteBuffer = I), (o.Long = I.Long || null), (o.VERSION = '5.0.1'), (o.WIRE_TYPES = {}), (o.WIRE_TYPES.VARINT = 0), (o.WIRE_TYPES.BITS64 = 1), (o.WIRE_TYPES.LDELIM = 2), (o.WIRE_TYPES.STARTGROUP = 3), (o.WIRE_TYPES.ENDGROUP = 4), (o.WIRE_TYPES.BITS32 = 5), (o.PACKABLE_WIRE_TYPES = [o.WIRE_TYPES.VARINT, o.WIRE_TYPES.BITS64, o.WIRE_TYPES.BITS32]), (o.TYPES = { int32: { name: 'int32', wireType: o.WIRE_TYPES.VARINT, defaultValue: 0 }, uint32: { name: 'uint32', wireType: o.WIRE_TYPES.VARINT, defaultValue: 0 }, sint32: { name: 'sint32', wireType: o.WIRE_TYPES.VARINT, defaultValue: 0 }, int64: { name: 'int64', wireType: o.WIRE_TYPES.VARINT, defaultValue: o.Long ? o.Long.ZERO : void 0 }, uint64: { name: 'uint64', wireType: o.WIRE_TYPES.VARINT, defaultValue: o.Long ? o.Long.UZERO : void 0 }, sint64: { name: 'sint64', wireType: o.WIRE_TYPES.VARINT, defaultValue: o.Long ? o.Long.ZERO : void 0 }, bool: { name: 'bool', wireType: o.WIRE_TYPES.VARINT, defaultValue: !1 }, double: { name: 'double', wireType: o.WIRE_TYPES.BITS64, defaultValue: 0 }, string: { name: 'string', wireType: o.WIRE_TYPES.LDELIM, defaultValue: '' }, bytes: { name: 'bytes', wireType: o.WIRE_TYPES.LDELIM, defaultValue: null }, fixed32: { name: 'fixed32', wireType: o.WIRE_TYPES.BITS32, defaultValue: 0 }, sfixed32: { name: 'sfixed32', wireType: o.WIRE_TYPES.BITS32, defaultValue: 0 }, fixed64: { name: 'fixed64', wireType: o.WIRE_TYPES.BITS64, defaultValue: o.Long ? o.Long.UZERO : void 0 }, sfixed64: { name: 'sfixed64', wireType: o.WIRE_TYPES.BITS64, defaultValue: o.Long ? o.Long.ZERO : void 0 }, float: { name: 'float', wireType: o.WIRE_TYPES.BITS32, defaultValue: 0 }, enum: { name: 'enum', wireType: o.WIRE_TYPES.VARINT, defaultValue: 0 }, message: { name: 'message', wireType: o.WIRE_TYPES.LDELIM, defaultValue: null }, group: { name: 'group', wireType: o.WIRE_TYPES.STARTGROUP, defaultValue: null } }), (o.MAP_KEY_TYPES = [ o.TYPES.int32, o.TYPES.sint32, o.TYPES.sfixed32, o.TYPES.uint32, o.TYPES.fixed32, o.TYPES.int64, o.TYPES.sint64, o.TYPES.sfixed64, o.TYPES.uint64, o.TYPES.fixed64, o.TYPES.bool, o.TYPES.string, o.TYPES.bytes ]), (o.ID_MIN = 1), (o.ID_MAX = 536870911), (o.convertFieldsToCamelCase = !1), (o.populateAccessors = !0), (o.populateDefaults = !0), (o.Util = (((r = {}).IS_NODE = !('object' != typeof d || d + '' != '[object process]' || d.browser)), (r.XHR = function () { for ( var e = [ function () { return new XMLHttpRequest() }, function () { return new ActiveXObject('Msxml2.XMLHTTP') }, function () { return new ActiveXObject('Msxml3.XMLHTTP') }, function () { return new ActiveXObject('Microsoft.XMLHTTP') } ], t = null, i = 0; i < e.length; i++ ) { try { t = e[i]() } catch (e) { continue } break } if (!t) throw Error('XMLHttpRequest is not supported') return t }), (r.fetch = function (e, i) { if ((i && 'function' != typeof i && (i = null), r.IS_NODE)) { var t = p('fs') if (i) t.readFile(e, function (e, t) { i(e ? null : '' + t) }) else try { return t.readFileSync(e) } catch (e) { return null } } else { var n = r.XHR() if ((n.open('GET', e, !!i), n.setRequestHeader('Accept', 'text/plain'), 'function' == typeof n.overrideMimeType && n.overrideMimeType('text/plain'), !i)) return n.send(null), 200 == n.status || (0 == n.status && 'string' == typeof n.responseText) ? n.responseText : null if ( ((n.onreadystatechange = function () { 4 == n.readyState && i(200 == n.status || (0 == n.status && 'string' == typeof n.responseText) ? n.responseText : null) }), 4 == n.readyState) ) return n.send(null) } }), (r.toCamelCase = function (e) { return e.replace(/_([a-zA-Z])/g, function (e, t) { return t.toUpperCase() }) }), r)), (o.Lang = { DELIM: /[\s\{\}=;:\[\],'"\(\)<>]/g, RULE: /^(?:required|optional|repeated|map)$/, TYPE: /^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/, NAME: /^[a-zA-Z_][a-zA-Z_0-9]*$/, TYPEDEF: /^[a-zA-Z][a-zA-Z_0-9]*$/, TYPEREF: /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/, FQTYPEREF: /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/, NUMBER: /^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/, NUMBER_DEC: /^(?:[1-9][0-9]*|0)$/, NUMBER_HEX: /^0[xX][0-9a-fA-F]+$/, NUMBER_OCT: /^0[0-7]+$/, NUMBER_FLT: /^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/, BOOL: /^(?:true|false)$/i, ID: /^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, NEGID: /^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/, WHITESPACE: /\s/, STRING: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, STRING_DQ: /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, STRING_SQ: /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g }), (o.DotProto = (function (r, a) { function s(e, t) { var i = -1, n = 1 if (('-' == e.charAt(0) && ((n = -1), (e = e.substring(1))), a.NUMBER_DEC.test(e))) i = parseInt(e) else if (a.NUMBER_HEX.test(e)) i = parseInt(e.substring(2), 16) else { if (!a.NUMBER_OCT.test(e)) throw Error('illegal id value: ' + (n < 0 ? '-' : '') + e) i = parseInt(e.substring(1), 8) } if (((i = (n * i) | 0), !t && i < 0)) throw Error('illegal id value: ' + (n < 0 ? '-' : '') + e) return i } function o(e) { var t = 1 if (('-' == e.charAt(0) && ((t = -1), (e = e.substring(1))), a.NUMBER_DEC.test(e))) return t * parseInt(e, 10) if (a.NUMBER_HEX.test(e)) return t * parseInt(e.substring(2), 16) if (a.NUMBER_OCT.test(e)) return t * parseInt(e.substring(1), 8) if ('inf' === e) return t * (1 / 0) if ('nan' === e) return NaN if (a.NUMBER_FLT.test(e)) return t * parseFloat(e) throw Error('illegal number value: ' + (t < 0 ? '-' : '') + e) } function n(e, t, i) { void 0 === e[t] ? (e[t] = i) : (Array.isArray(e[t]) || (e[t] = [e[t]]), e[t].push(i)) } function t(e) { ;(this.source = e + ''), (this.index = 0), (this.line = 1), (this.stack = []), (this._stringOpen = null) } var e = {}, i = t.prototype ;(i._readString = function () { var e = '"' === this._stringOpen ? a.STRING_DQ : a.STRING_SQ e.lastIndex = this.index - 1 var t = e.exec(this.source) if (!t) throw Error('unterminated string') return (this.index = e.lastIndex), this.stack.push(this._stringOpen), (this._stringOpen = null), t[1] }), (i.next = function () { if (0 < this.stack.length) return this.stack.shift() if (this.index >= this.source.length) return null if (null !== this._stringOpen) return this._readString() var e, t, i do { for (e = !1; a.WHITESPACE.test((i = this.source.charAt(this.index))); ) if (('\n' === i && ++this.line, ++this.index === this.source.length)) return null if ('/' === this.source.charAt(this.index)) if ((++this.index, '/' === this.source.charAt(this.index))) { for (; '\n' !== this.source.charAt(++this.index); ) if (this.index == this.source.length) return null ++this.index, ++this.line, (e = !0) } else { if ('*' !== (i = this.source.charAt(this.index))) return '/' do { if (('\n' === i && ++this.line, ++this.index === this.source.length)) return null ;(t = i), (i = this.source.charAt(this.index)) } while ('*' !== t || '/' !== i) ++this.index, (e = !0) } } while (e) if (this.index === this.source.length) return null var n = this.index if (((a.DELIM.lastIndex = 0), !a.DELIM.test(this.source.charAt(n++)))) for (; n < this.source.length && !a.DELIM.test(this.source.charAt(n)); ) ++n var r = this.source.substring(this.index, (this.index = n)) return ('"' !== r && "'" !== r) || (this._stringOpen = r), r }), (i.peek = function () { if (0 === this.stack.length) { var e = this.next() if (null === e) return null this.stack.push(e) } return this.stack[0] }), (i.skip = function (e) { var t = this.next() if (t !== e) throw Error("illegal '" + t + "', '" + e + "' expected") }), (i.omit = function (e) { return this.peek() === e && (this.next(), !0) }), (i.toString = function () { return 'Tokenizer (' + this.index + '/' + this.source.length + ' at line ' + this.line + ')' }), (e.Tokenizer = t) function l(e) { ;(this.tn = new t(e)), (this.proto3 = !1) } var c = l.prototype return ( (c.parse = function () { var e, t, i = { name: '[ROOT]', package: null, messages: [], enums: [], imports: [], options: {}, services: [] }, n = !0 try { for (; (e = this.tn.next()); ) switch (e) { case 'package': if (!n || null !== i.package) throw Error("unexpected 'package'") if (((e = this.tn.next()), !a.TYPEREF.test(e))) throw Error('illegal package name: ' + e) this.tn.skip(';'), (i.package = e) break case 'import': if (!n) throw Error("unexpected 'import'") ;('public' !== (e = this.tn.peek()) && !(t = 'weak' === e)) || this.tn.next(), (e = this._readString()), this.tn.skip(';'), t || i.imports.push(e) break case 'syntax': if (!n) throw Error("unexpected 'syntax'") this.tn.skip('='), 'proto3' === (i.syntax = this._readString()) && (this.proto3 = !0), this.tn.skip(';') break case 'message': this._parseMessage(i, null), (n = !1) break case 'enum': this._parseEnum(i), (n = !1) break case 'option': this._parseOption(i) break case 'service': this._parseService(i) break case 'extend': this._parseExtend(i) break default: throw Error("unexpected '" + e + "'") } } catch (e) { throw ((e.message = 'Parse error at line ' + this.tn.line + ': ' + e.message), e) } return delete i.name, i }), (l.parse = function (e) { return new l(e).parse() }), (c._readString = function () { var e, t, i = '' do { if ("'" !== (t = this.tn.next()) && '"' !== t) throw Error('illegal string delimiter: ' + t) ;(i += this.tn.next()), this.tn.skip(t), (e = this.tn.peek()) } while ('"' === e || '"' === e) return i }), (c._readValue = function (e) { var t = this.tn.peek() if ('"' === t || "'" === t) return this._readString() if ((this.tn.next(), a.NUMBER.test(t))) return o(t) if (a.BOOL.test(t)) return 'true' === t.toLowerCase() if (e && a.TYPEREF.test(t)) return t throw Error('illegal value: ' + t) }), (c._parseOption = function (e, t) { var i = this.tn.next(), n = !1 if (('(' === i && ((n = !0), (i = this.tn.next())), !a.TYPEREF.test(i))) throw Error('illegal option name: ' + i) var r = i n && (this.tn.skip(')'), (r = '(' + r + ')'), (i = this.tn.peek()), a.FQTYPEREF.test(i) && ((r += i), this.tn.next())), this.tn.skip('='), this._parseOptionValue(e, r), t || this.tn.skip(';') }), (c._parseOptionValue = function (e, t) { var i = this.tn.peek() if ('{' !== i) n(e.options, t, this._readValue(!0)) else for (this.tn.skip('{'); '}' !== (i = this.tn.next()); ) { if (!a.NAME.test(i)) throw Error('illegal option name: ' + t + '.' + i) this.tn.omit(':') ? n(e.options, t + '.' + i, this._readValue(!0)) : this._parseOptionValue(e, t + '.' + i) } }), (c._parseService = function (e) { var t = this.tn.next() if (!a.NAME.test(t)) throw Error('illegal service name at line ' + this.tn.line + ': ' + t) var i = { name: t, rpc: {}, options: {} } for (this.tn.skip('{'); '}' !== (t = this.tn.next()); ) if ('option' === t) this._parseOption(i) else { if ('rpc' !== t) throw Error('illegal service token: ' + t) this._parseServiceRPC(i) } this.tn.omit(';'), e.services.push(i) }), (c._parseServiceRPC = function (e) { var t = this.tn.next() if (!a.NAME.test(t)) throw Error('illegal rpc service method name: ' + t) var i = t, n = { request: null, response: null, request_stream: !1, response_stream: !1, options: {} } if ((this.tn.skip('('), 'stream' === (t = this.tn.next()).toLowerCase() && ((n.request_stream = !0), (t = this.tn.next())), !a.TYPEREF.test(t))) throw Error('illegal rpc service request type: ' + t) if (((n.request = t), this.tn.skip(')'), 'returns' !== (t = this.tn.next()).toLowerCase())) throw Error('illegal rpc service request type delimiter: ' + t) if ( (this.tn.skip('('), 'stream' === (t = this.tn.next()).toLowerCase() && ((n.response_stream = !0), (t = this.tn.next())), (n.response = t), this.tn.skip(')'), '{' === (t = this.tn.peek())) ) { for (this.tn.next(); '}' !== (t = this.tn.next()); ) { if ('option' !== t) throw Error('illegal rpc service token: ' + t) this._parseOption(n) } this.tn.omit(';') } else this.tn.skip(';') void 0 === e.rpc && (e.rpc = {}), (e.rpc[i] = n) }), (c._parseMessage = function (e, t) { var i = !!t, n = this.tn.next(), r = { name: '', fields: [], enums: [], messages: [], options: {}, services: [], oneofs: {} } if (!a.NAME.test(n)) throw Error('illegal ' + (i ? 'group' : 'message') + ' name: ' + n) for ( r.name = n, i && (this.tn.skip('='), (t.id = s(this.tn.next())), (r.isGroup = !0)), '[' === (n = this.tn.peek()) && t && this._parseFieldOptions(t), this.tn.skip('{'); '}' !== (n = this.tn.next()); ) if (a.RULE.test(n)) this._parseMessageField(r, n) else if ('oneof' === n) this._parseMessageOneOf(r) else if ('enum' === n) this._parseEnum(r) else if ('message' === n) this._parseMessage(r) else if ('option' === n) this._parseOption(r) else if ('service' === n) this._parseService(r) else if ('extensions' === n) r.extensions = this._parseExtensionRanges() else if ('reserved' === n) this._parseIgnored() else if ('extend' === n) this._parseExtend(r) else { if (!a.TYPEREF.test(n)) throw Error('illegal message token: ' + n) if (!this.proto3) throw Error('illegal field rule: ' + n) this._parseMessageField(r, 'optional', n) } return this.tn.omit(';'), e.messages.push(r), r }), (c._parseIgnored = function () { for (; ';' !== this.tn.peek(); ) this.tn.next() this.tn.skip(';') }), (c._parseMessageField = function (e, t, i) { if (!a.RULE.test(t)) throw Error('illegal message field rule: ' + t) var n, r = { rule: t, type: '', name: '', options: {}, id: 0 } if ('map' === t) { if (i) throw Error('illegal type: ' + i) if ((this.tn.skip('<'), (n = this.tn.next()), !a.TYPE.test(n) && !a.TYPEREF.test(n))) throw Error('illegal message field type: ' + n) if (((r.keytype = n), this.tn.skip(','), (n = this.tn.next()), !a.TYPE.test(n) && !a.TYPEREF.test(n))) throw Error('illegal message field: ' + n) if (((r.type = n), this.tn.skip('>'), (n = this.tn.next()), !a.NAME.test(n))) throw Error('illegal message field name: ' + n) ;(r.name = n), this.tn.skip('='), (r.id = s(this.tn.next())), '[' === (n = this.tn.peek()) && this._parseFieldOptions(r), this.tn.skip(';') } else if ('group' === (i = void 0 !== i ? i : this.tn.next())) { var o = this._parseMessage(e, r) if (!/^[A-Z]/.test(o.name)) throw Error('illegal group name: ' + o.name) ;(r.type = o.name), (r.name = o.name.toLowerCase()), this.tn.omit(';') } else { if (!a.TYPE.test(i) && !a.TYPEREF.test(i)) throw Error('illegal message field type: ' + i) if (((r.type = i), (n = this.tn.next()), !a.NAME.test(n))) throw Error('illegal message field name: ' + n) ;(r.name = n), this.tn.skip('='), (r.id = s(this.tn.next())), '[' === (n = this.tn.peek()) && this._parseFieldOptions(r), this.tn.skip(';') } return e.fields.push(r), r }), (c._parseMessageOneOf = function (e) { var t = this.tn.next() if (!a.NAME.test(t)) throw Error('illegal oneof name: ' + t) var i, n = t, r = [] for (this.tn.skip('{'); '}' !== (t = this.tn.next()); ) ((i = this._parseMessageField(e, 'optional', t)).oneof = n), r.push(i.id) this.tn.omit(';'), (e.oneofs[n] = r) }), (c._parseFieldOptions = function (e) { this.tn.skip('[') for (var t = !0; ']' !== this.tn.peek(); ) t || this.tn.skip(','), this._parseOption(e, !0), (t = !1) this.tn.next() }), (c._parseEnum = function (e) { var t = { name: '', values: [], options: {} }, i = this.tn.next() if (!a.NAME.test(i)) throw Error('illegal name: ' + i) for (t.name = i, this.tn.skip('{'); '}' !== (i = this.tn.next()); ) if ('option' === i) this._parseOption(t) else { if (!a.NAME.test(i)) throw Error('illegal name: ' + i) this.tn.skip('=') var n = { name: i, id: s(this.tn.next(), !0) } '[' === (i = this.tn.peek()) && this._parseFieldOptions({ options: {} }), this.tn.skip(';'), t.values.push(n) } this.tn.omit(';'), e.enums.push(t) }), (c._parseExtensionRanges = function () { var e, t, i, n = [] do { for (t = []; ; ) { switch ((e = this.tn.next())) { case 'min': i = r.ID_MIN break case 'max': i = r.ID_MAX break default: i = o(e) } if ((t.push(i), 2 === t.length)) break if ('to' !== this.tn.peek()) { t.push(i) break } this.tn.next() } n.push(t) } while (this.tn.omit(',')) return this.tn.skip(';'), n }), (c._parseExtend = function (e) { var t = this.tn.next() if (!a.TYPEREF.test(t)) throw Error('illegal extend reference: ' + t) var i = { ref: t, fields: [] } for (this.tn.skip('{'); '}' !== (t = this.tn.next()); ) if (a.RULE.test(t)) this._parseMessageField(i, t) else { if (!a.TYPEREF.test(t)) throw Error('illegal extend token: ' + t) if (!this.proto3) throw Error('illegal field rule: ' + t) this._parseMessageField(i, 'optional', t) } return this.tn.omit(';'), e.messages.push(i), i }), (c.toString = function () { return 'Parser at line ' + this.tn.line }), (e.Parser = l), e ) })(o, o.Lang)), (o.Reflect = (function (g) { function a(e, t) { if (e && 'number' == typeof e.low && 'number' == typeof e.high && 'boolean' == typeof e.unsigned && e.low == e.low && e.high == e.high) return new g.Long(e.low, e.high, void 0 === t ? e.unsigned : t) if ('string' == typeof e) return g.Long.fromString(e, t || !1, 10) if ('number' == typeof e) return g.Long.fromNumber(e, t || !1) throw Error('not convertible to Long') } function m(e, t) { var i = t.readVarint32(), n = 7 & i, r = i >>> 3 switch (n) { case g.WIRE_TYPES.VARINT: for (; 128 == (128 & (i = t.readUint8())); ); break case g.WIRE_TYPES.BITS64: t.offset += 8 break case g.WIRE_TYPES.LDELIM: ;(i = t.readVarint32()), (t.offset += i) break case g.WIRE_TYPES.STARTGROUP: m(r, t) break case g.WIRE_TYPES.ENDGROUP: if (r === e) return !1 throw Error('Illegal GROUPEND after unknown group: ' + r + ' (' + e + ' expected)') case g.WIRE_TYPES.BITS32: t.offset += 4 break default: throw Error('Illegal wire type in unknown group ' + e + ': ' + n) } return !0 } function h(e, t, i) { ;(this.builder = e), (this.parent = t), (this.name = i), this.className } var s = {}, e = h.prototype ;(e.fqn = function () { for (var e = this.name, t = this; null != (t = t.parent); ) e = t.name + '.' + e return e }), (e.toString = function (e) { return (e ? this.className + ' ' : '') + this.fqn() }), (e.build = function () { throw Error(this.toString(!0) + ' cannot be built directly') }), (s.T = h) function l(e, t, i, n, r) { h.call(this, e, t, i), (this.className = 'Namespace'), (this.children = []), (this.options = n || {}), (this.syntax = r || 'proto2') } var t = (l.prototype = Object.create(h.prototype)) ;(t.getChildren = function (e) { if (null == (e = e || null)) return this.children.slice() for (var t = [], i = 0, n = this.children.length; i < n; ++i) this.children[i] instanceof e && t.push(this.children[i]) return t }), (t.addChild = function (e) { var t if ((t = this.getChild(e.name))) if (t instanceof d.Field && t.name !== t.originalName && null === this.getChild(t.originalName)) t.name = t.originalName else { if (!(e instanceof d.Field && e.name !== e.originalName && null === this.getChild(e.originalName))) throw Error('Duplicate name in namespace ' + this.toString(!0) + ': ' + e.name) e.name = e.originalName } this.children.push(e) }), (t.getChild = function (e) { for (var t = 'number' == typeof e ? 'id' : 'name', i = 0, n = this.children.length; i < n; ++i) if (this.children[i][t] === e) return this.children[i] return null }), (t.resolve = function (e, t) { var i, n = 'string' == typeof e ? e.split('.') : e, r = this, o = 0 if ('' === n[o]) { for (; null !== r.parent; ) r = r.parent o++ } do { do { if (!(r instanceof s.Namespace)) { r = null break } if (!(i = r.getChild(n[o])) || !(i instanceof s.T) || (t && !(i instanceof s.Namespace))) { r = null break } ;(r = i), o++ } while (o < n.length) if (null != r) break if (null !== this.parent) return this.parent.resolve(e, t) } while (null != r) return r }), (t.qn = function (e) { for (var t = [], i = e; t.unshift(i.name), null !== (i = i.parent); ); for (var n = 1; n <= t.length; n++) { var r = t.slice(t.length - n) if (e === this.resolve(r, e instanceof s.Namespace)) return r.join('.') } return e.fqn() }), (t.build = function () { for (var e, t = {}, i = this.children, n = 0, r = i.length; n < r; ++n) (e = i[n]) instanceof l && (t[e.name] = e.build()) return ( Object.defineProperty && Object.defineProperty(t, '$options', { value: this.buildOpt() }), t ) }), (t.buildOpt = function () { for (var e = {}, t = Object.keys(this.options), i = 0, n = t.length; i < n; ++i) { var r = t[i], o = this.options[t[i]] e[r] = o } return e }), (t.getOption = function (e) { return void 0 === e ? this.options : void 0 !== this.options[e] ? this.options[e] : null }), (s.Namespace = l) function u(e, t, i, n) { if (((this.type = e), (this.resolvedType = t), (this.isMapKey = i), (this.syntax = n), i && g.MAP_KEY_TYPES.indexOf(e) < 0)) throw Error('Invalid map key type: ' + e.name) } var i = u.prototype ;(u.defaultFieldValue = function (e) { if (('string' == typeof e && (e = g.TYPES[e]), void 0 === e.defaultValue)) throw Error('default value for type ' + e.name + ' is not supported') return e == g.TYPES.bytes ? new I(0) : e.defaultValue }), (i.verifyValue = function (t) { function i(e, t) { throw Error('Illegal value for ' + n.toString(!0) + ' of type ' + n.type.name + ': ' + e + ' (' + t + ')') } var n = this switch (this.type) { case g.TYPES.int32: case g.TYPES.sint32: case g.TYPES.sfixed32: return ('number' != typeof t || (t == t && t % 1 != 0)) && i(typeof t, 'not an integer'), 4294967295 < t ? 0 | t : t case g.TYPES.uint32: case g.TYPES.fixed32: return ('number' != typeof t || (t == t && t % 1 != 0)) && i(typeof t, 'not an integer'), t < 0 ? t >>> 0 : t case g.TYPES.int64: case g.TYPES.sint64: case g.TYPES.sfixed64: if (g.Long) try { return a(t, !1) } catch (e) { i(typeof t, e.message) } else i(typeof t, 'requires Long.js') case g.TYPES.uint64: case g.TYPES.fixed64: if (g.Long) try { return a(t, !0) } catch (e) { i(typeof t, e.message) } else i(typeof t, 'requires Long.js') case g.TYPES.bool: return 'boolean' != typeof t && i(typeof t, 'not a boolean'), t case g.TYPES.float: case g.TYPES.double: return 'number' != typeof t && i(typeof t, 'not a number'), t case g.TYPES.string: return 'string' == typeof t || (t && t instanceof String) || i(typeof t, 'not a string'), '' + t case g.TYPES.bytes: return I.isByteBuffer(t) ? t : I.wrap(t, 'base64') case g.TYPES.enum: var e = this.resolvedType.getChildren(g.Reflect.Enum.Value) for (o = 0; o < e.length; o++) { if (e[o].name == t) return e[o].id if (e[o].id == t) return e[o].id } if ('proto3' === this.syntax) return ('number' != typeof t || (t == t && t % 1 != 0)) && i(typeof t, 'not an integer'), (4294967295 < t || t < 0) && i(typeof t, 'not in range for uint32'), t i(t, 'not a valid enum value') case g.TYPES.group: case g.TYPES.message: if (((t && 'object' == typeof t) || i(typeof t, 'object expected'), t instanceof this.resolvedType.clazz)) return t if (t instanceof g.Builder.Message) { var r = {} for (var o in t) t.hasOwnProperty(o) && (r[o] = t[o]) t = r } return new this.resolvedType.clazz(t) } throw Error('[INTERNAL] Illegal value for ' + this.toString(!0) + ': ' + t + ' (undefined type ' + this.type + ')') }), (i.calculateLength = function (e, t) { if (null === t) return 0 var i switch (this.type) { case g.TYPES.int32: return t < 0 ? I.calculateVarint64(t) : I.calculateVarint32(t) case g.TYPES.uint32: return I.calculateVarint32(t) case g.TYPES.sint32: return I.calculateVarint32(I.zigZagEncode32(t)) case g.TYPES.fixed32: case g.TYPES.sfixed32: case g.TYPES.float: return 4 case g.TYPES.int64: case g.TYPES.uint64: return I.calculateVarint64(t) case g.TYPES.sint64: return I.calculateVarint64(I.zigZagEncode64(t)) case g.TYPES.fixed64: case g.TYPES.sfixed64: return 8 case g.TYPES.bool: return 1 case g.TYPES.enum: return I.calculateVarint32(t) case g.TYPES.double: return 8 case g.TYPES.string: return (i = I.calculateUTF8Bytes(t)), I.calculateVarint32(i) + i case g.TYPES.bytes: if (t.remaining() < 0) throw Error('Illegal value for ' + this.toString(!0) + ': ' + t.remaining() + ' bytes remaining') return I.calculateVarint32(t.remaining()) + t.remaining() case g.TYPES.message: return (i = this.resolvedType.calculate(t)), I.calculateVarint32(i) + i case g.TYPES.group: return (i = this.resolvedType.calculate(t)) + I.calculateVarint32((e << 3) | g.WIRE_TYPES.ENDGROUP) } throw Error('[INTERNAL] Illegal value to encode in ' + this.toString(!0) + ': ' + t + ' (unknown type)') }), (i.encodeValue = function (e, t, i) { if (null === t) return i switch (this.type) { case g.TYPES.int32: t < 0 ? i.writeVarint64(t) : i.writeVarint32(t) break case g.TYPES.uint32: i.writeVarint32(t) break case g.TYPES.sint32: i.writeVarint32ZigZag(t) break case g.TYPES.fixed32: i.writeUint32(t) break case g.TYPES.sfixed32: i.writeInt32(t) break case g.TYPES.int64: case g.TYPES.uint64: i.writeVarint64(t) break case g.TYPES.sint64: i.writeVarint64ZigZag(t) break case g.TYPES.fixed64: i.writeUint64(t) break case g.TYPES.sfixed64: i.writeInt64(t) break case g.TYPES.bool: 'string' == typeof t ? i.writeVarint32('false' === t.toLowerCase() ? 0 : !!t) : i.writeVarint32(t ? 1 : 0) break case g.TYPES.enum: i.writeVarint32(t) break case g.TYPES.float: i.writeFloat32(t) break case g.TYPES.double: i.writeFloat64(t) break case g.TYPES.string: i.writeVString(t) break case g.TYPES.bytes: if (t.remaining() < 0) throw Error('Illegal value for ' + this.toString(!0) + ': ' + t.remaining() + ' bytes remaining') var n = t.offset i.writeVarint32(t.remaining()), i.append(t), (t.offset = n) break case g.TYPES.message: var r = new I().LE() this.resolvedType.encode(t, r), i.writeVarint32(r.offset), i.append(r.flip()) break case g.TYPES.group: this.resolvedType.encode(t, i), i.writeVarint32((e << 3) | g.WIRE_TYPES.ENDGROUP) break default: throw Error('[INTERNAL] Illegal value to encode in ' + this.toString(!0) + ': ' + t + ' (unknown type)') } return i }), (i.decode = function (e, t, i) { if (t != this.type.wireType) throw Error('Unexpected wire type for element') var n, r switch (this.type) { case g.TYPES.int32: return 0 | e.readVarint32() case g.TYPES.uint32: return e.readVarint32() >>> 0 case g.TYPES.sint32: return 0 | e.readVarint32ZigZag() case g.TYPES.fixed32: return e.readUint32() >>> 0 case g.TYPES.sfixed32: return 0 | e.readInt32() case g.TYPES.int64: return e.readVarint64() case g.TYPES.uint64: return e.readVarint64().toUnsigned() case g.TYPES.sint64: return e.readVarint64ZigZag() case g.TYPES.fixed64: return e.readUint64() case g.TYPES.sfixed64: return e.readInt64() case g.TYPES.bool: return !!e.readVarint32() case g.TYPES.enum: return e.readVarint32() case g.TYPES.float: return e.readFloat() case g.TYPES.double: return e.readDouble() case g.TYPES.string: return e.readVString() case g.TYPES.bytes: if (((r = e.readVarint32()), e.remaining() < r)) throw Error('Illegal number of bytes for ' + this.toString(!0) + ': ' + r + ' required but got only ' + e.remaining()) return ((n = e.clone()).limit = n.offset + r), (e.offset += r), n case g.TYPES.message: return (r = e.readVarint32()), this.resolvedType.decode(e, r) case g.TYPES.group: return this.resolvedType.decode(e, -1, i) } throw Error('[INTERNAL] Illegal decode type') }), (i.valueFromString = function (e) { if (!this.isMapKey) throw Error('valueFromString() called on non-map-key element') switch (this.type) { case g.TYPES.int32: case g.TYPES.sint32: case g.TYPES.sfixed32: case g.TYPES.uint32: case g.TYPES.fixed32: return this.verifyValue(parseInt(e)) case g.TYPES.int64: case g.TYPES.sint64: case g.TYPES.sfixed64: case g.TYPES.uint64: case g.TYPES.fixed64: return this.verifyValue(e) case g.TYPES.bool: return 'true' === e case g.TYPES.string: return this.verifyValue(e) case g.TYPES.bytes: return I.fromBinary(e) } }), (i.valueToString = function (e) { if (!this.isMapKey) throw Error('valueToString() called on non-map-key element') return this.type === g.TYPES.bytes ? e.toString('binary') : e.toString() }), (s.Element = u) var d = function (e, t, i, n, r, o) { l.call(this, e, t, i, n, o), (this.className = 'Message'), (this.extensions = void 0), (this.clazz = null), (this.isGroup = !!r), (this._fields = null), (this._fieldsById = null), (this._fieldsByName = null) }, n = (d.prototype = Object.create(l.prototype)) ;(n.build = function (e) { if (this.clazz && !e) return this.clazz var t = (function (u, a) { function d(e, i, n, r) { if (null === e || 'object' != typeof e) { if (r && r instanceof u.Reflect.Enum) { var t = u.Reflect.Enum.getName(r.object, e) if (null !== t) return t } return e } if (I.isByteBuffer(e)) return i ? e.toBase64() : e.toBuffer() if (u.Long.isLong(e)) return n ? e.toString() : u.Long.fromValue(e) var o if (Array.isArray(e)) return ( (o = []), e.forEach(function (e, t) { o[t] = d(e, i, n, r) }), o ) if (((o = {}), e instanceof u.Map)) { for (var a = e.entries(), s = a.next(); !s.done; s = a.next()) o[e.keyElem.valueToString(s.value[0])] = d(s.value[1], i, n, e.valueElem.resolvedType) return o } var l = e.$type, c = void 0 for (var h in e) e.hasOwnProperty(h) && (l && (c = l.getChild(h)) ? (o[h] = d(e[h], i, n, c.resolvedType)) : (o[h] = d(e[h], i, n))) return o } var s = a.getChildren(u.Reflect.Message.Field), l = a.getChildren(u.Reflect.Message.OneOf), c = function (e, t) { u.Builder.Message.call(this) for (var i = 0, n = l.length; i < n; ++i) this[l[i].name] = null for (i = 0, n = s.length; i < n; ++i) { var r = s[i] ;(this[r.name] = r.repeated ? [] : r.map ? new u.Map(r) : null), (!r.required && 'proto3' !== a.syntax) || null === r.defaultValue || (this[r.name] = r.defaultValue) } var o if (0 < arguments.length) if ( 1 !== arguments.length || null === e || 'object' != typeof e || !('function' != typeof e.encode || e instanceof c) || Array.isArray(e) || e instanceof u.Map || I.isByteBuffer(e) || e instanceof ArrayBuffer || (u.Long && e instanceof u.Long) ) for (i = 0, n = arguments.length; i < n; ++i) void 0 !== (o = arguments[i]) && this.$set(s[i].name, o) else this.$set(e) }, o = (c.prototype = Object.create(u.Builder.Message.prototype)) ;(o.add = function (e, t, i) { var n = a._fieldsByName[e] if (!i) { if (!n) throw Error(this + '#' + e + ' is undefined') if (!(n instanceof u.Reflect.Message.Field)) throw Error(this + '#' + e + ' is not a field: ' + n.toString(!0)) if (!n.repeated) throw Error(this + '#' + e + ' is not a repeated field') t = n.verifyValue(t, !0) } return null === this[e] && (this[e] = []), this[e].push(t), this }), (o.$add = o.add), (o.set = function (e, t, i) { if (e && 'object' == typeof e) { for (var n in ((i = t), e)) e.hasOwnProperty(n) && void 0 !== (t = e[n]) && this.$set(n, t, i) return this } var r = a._fieldsByName[e] if (i) this[e] = t else { if (!r) throw Error(this + '#' + e + ' is not a field: undefined') if (!(r instanceof u.Reflect.Message.Field)) throw Error(this + '#' + e + ' is not a field: ' + r.toString(!0)) this[r.name] = t = r.verifyValue(t) } if (r && r.oneof) { var o = this[r.oneof.name] null !== t ? (null !== o && o !== r.name && (this[o] = null), (this[r.oneof.name] = r.name)) : o === e && (this[r.oneof.name] = null) } return this }), (o.$set = o.set), (o.get = function (e, t) { if (t) return this[e] var i = a._fieldsByName[e] if (!(i && i instanceof u.Reflect.Message.Field)) throw Error(this + '#' + e + ' is not a field: undefined') if (!(i instanceof u.Reflect.Message.Field)) throw Error(this + '#' + e + ' is not a field: ' + i.toString(!0)) return this[i.name] }), (o.$get = o.get) for (var e = 0; e < s.length; e++) { var t = s[e] t instanceof u.Reflect.Message.ExtensionField || (a.builder.options.populateAccessors && (function (i) { var e = i.originalName.replace(/(_[a-zA-Z])/g, function (e) { return e.toUpperCase().replace('_', '') }) e = e.substring(0, 1).toUpperCase() + e.substring(1) function t(e, t) { return (this[i.name] = t ? e : i.verifyValue(e)), this } function n() { return this[i.name] } var r = i.originalName.replace(/([A-Z])/g, function (e) { return '_' + e }) null === a.getChild('set' + e) && (o['set' + e] = t), null === a.getChild('set_' + r) && (o['set_' + r] = t), null === a.getChild('get' + e) && (o['get' + e] = n), null === a.getChild('get_' + r) && (o['get_' + r] = n) })(t)) } return ( (o.encode = function (t, e) { 'boolean' == typeof t && ((e = t), (t = void 0)) var i = !1 t || ((t = new I()), (i = !0)) var n = t.littleEndian try { return a.encode(this, t.LE(), e), (i ? t.flip() : t).LE(n) } catch (e) { throw (t.LE(n), e) } }), (c.encode = function (e, t, i) { return new c(e).encode(t, i) }), (o.calculate = function () { return a.calculate(this) }), (o.encodeDelimited = function (e, t) { var i = !1 e || ((e = new I()), (i = !0)) var n = new I().LE() return a.encode(this, n, t).flip(), e.writeVarint32(n.remaining()), e.append(n), i ? e.flip() : e }), (o.encodeAB = function () { try { return this.encode().toArrayBuffer() } catch (e) { throw (e.encoded && (e.encoded = e.encoded.toArrayBuffer()), e) } }), (o.toArrayBuffer = o.encodeAB), (o.encodeNB = function () { try { return this.encode().toBuffer() } catch (e) { throw (e.encoded && (e.encoded = e.encoded.toBuffer()), e) } }), (o.toBuffer = o.encodeNB), (o.encode64 = function () { try { return this.encode().toBase64() } catch (e) { throw (e.encoded && (e.encoded = e.encoded.toBase64()), e) } }), (o.toBase64 = o.encode64), (o.encodeHex = function () { try { return this.encode().toHex() } catch (e) { throw (e.encoded && (e.encoded = e.encoded.toHex()), e) } }), (o.toHex = o.encodeHex), (o.toRaw = function (e, t) { return d(this, !!e, !!t, this.$type) }), (o.encodeJSON = function () { return JSON.stringify(d(this, !0, !0, this.$type)) }), (c.decode = function (t, e, i) { 'string' == typeof e && ((i = e), (e = -1)), 'string' == typeof t && (t = I.wrap(t, i || 'base64')) var n = (t = I.isByteBuffer(t) ? t : I.wrap(t)).littleEndian try { var r = a.decode(t.LE()) return t.LE(n), r } catch (e) { throw (t.LE(n), e) } }), (c.decodeDelimited = function (t, e) { if (('string' == typeof t && (t = I.wrap(t, e || 'base64')), (t = I.isByteBuffer(t) ? t : I.wrap(t)).remaining() < 1)) return null var i = t.offset, n = t.readVarint32() if (t.remaining() < n) return (t.offset = i), null try { var r = a.decode(t.slice(t.offset, t.offset + n).LE()) return (t.offset += n), r } catch (e) { throw ((t.offset += n), e) } }), (c.decode64 = function (e) { return c.decode(e, 'base64') }), (c.decodeHex = function (e) { return c.decode(e, 'hex') }), (c.decodeJSON = function (e) { return new c(JSON.parse(e)) }), (o.toString = function () { return a.toString() }), Object.defineProperty && (Object.defineProperty(c, '$options', { value: a.buildOpt() }), Object.defineProperty(o, '$options', { value: c.$options }), Object.defineProperty(c, '$type', { value: a }), Object.defineProperty(o, '$type', { value: a })), c ) })(g, this) ;(this._fields = []), (this._fieldsById = {}), (this._fieldsByName = {}) for (var i, n = 0, r = this.children.length; n < r; n++) if ((i = this.children[n]) instanceof p || i instanceof d || i instanceof y) { if (t.hasOwnProperty(i.name)) throw Error('Illegal reflect child of ' + this.toString(!0) + ': ' + i.toString(!0) + " cannot override static property '" + i.name + "'") t[i.name] = i.build() } else if (i instanceof d.Field) i.build(), this._fields.push(i), (this._fieldsById[i.id] = i), (this._fieldsByName[i.name] = i) else if (!(i instanceof d.OneOf || i instanceof v)) throw Error('Illegal reflect child of ' + this.toString(!0) + ': ' + this.children[n].toString(!0)) return (this.clazz = t) }), (n.encode = function (e, t, i) { for (var n, r, o = null, a = 0, s = this._fields.length; a < s; ++a) (r = e[(n = this._fields[a]).name]), n.required && null === r ? null === o && (o = n) : n.encode(i ? r : n.verifyValue(r), t, e) if (null === o) return t var l = Error('Missing at least one required field for ' + this.toString(!0) + ': ' + o) throw ((l.encoded = t), l) }), (n.calculate = function (e) { for (var t, i, n = 0, r = 0, o = this._fields.length; r < o; ++r) { if (((i = e[(t = this._fields[r]).name]), t.required && null === i)) throw Error('Missing at least one required field for ' + this.toString(!0) + ': ' + t) n += t.calculate(i, e) } return n }), (n.decode = function (e, t, i) { t = 'number' == typeof t ? t : -1 for (var n, r, o, a, s = e.offset, l = new this.clazz(); e.offset < s + t || (-1 === t && 0 < e.remaining()); ) { if (((o = (n = e.readVarint32()) >>> 3), (r = 7 & n) === g.WIRE_TYPES.ENDGROUP)) { if (o !== i) throw Error('Illegal group end indicator for ' + this.toString(!0) + ': ' + o + ' (' + (i ? i + ' expected' : 'not a group') + ')') break } if ((a = this._fieldsById[o])) { if (a.repeated && !a.options.packed) l[a.name].push(a.decode(r, e)) else if (a.map) { var c = a.decode(r, e) l[a.name].set(c[0], c[1]) } else if (((l[a.name] = a.decode(r, e)), a.oneof)) { var h = l[a.oneof.name] null !== h && h !== a.name && (l[h] = null), (l[a.oneof.name] = a.name) } } else switch (r) { case g.WIRE_TYPES.VARINT: e.readVarint32() break case g.WIRE_TYPES.BITS32: e.offset += 4 break case g.WIRE_TYPES.BITS64: e.offset += 8 break case g.WIRE_TYPES.LDELIM: var u = e.readVarint32() e.offset += u break case g.WIRE_TYPES.STARTGROUP: for (; m(o, e); ); break default: throw Error('Illegal wire type for unknown field ' + o + ' in ' + this.toString(!0) + '#decode: ' + r) } } for (var d = 0, p = this._fields.length; d < p; ++d) if (null === l[(a = this._fields[d]).name]) if ('proto3' === this.syntax) l[a.name] = a.defaultValue else { if (a.required) { var f = Error('Missing at least one required field for ' + this.toString(!0) + ': ' + a.name) throw ((f.decoded = l), f) } g.populateDefaults && null !== a.defaultValue && (l[a.name] = a.defaultValue) } return l }), (s.Message = d) function c(e, t, i, n, r, o, a, s, l, c) { h.call(this, e, t, o), (this.className = 'Message.Field'), (this.required = 'required' === i), (this.repeated = 'repeated' === i), (this.map = 'map' === i), (this.keyType = n || null), (this.type = r), (this.resolvedType = null), (this.id = a), (this.options = s || {}), (this.defaultValue = null), (this.oneof = l || null), (this.syntax = c || 'proto2'), (this.originalName = this.name), (this.element = null), (this.keyElement = null), !this.builder.options.convertFieldsToCamelCase || this instanceof d.ExtensionField || (this.name = g.Util.toCamelCase(this.name)) } var r = (c.prototype = Object.create(h.prototype)) ;(r.build = function () { ;(this.element = new u(this.type, this.resolvedType, !1, this.syntax)), this.map && (this.keyElement = new u(this.keyType, void 0, !0, this.syntax)), 'proto3' !== this.syntax || this.repeated || this.map ? void 0 !== this.options.default && (this.defaultValue = this.verifyValue(this.options.default)) : (this.defaultValue = u.defaultFieldValue(this.type)) }), (r.verifyValue = function (e, t) { function i(e, t) { throw Error('Illegal value for ' + r.toString(!0) + ' of type ' + r.type.name + ': ' + e + ' (' + t + ')') } t = t || !1 var n, r = this if (null === e) return ( this.required && i(typeof e, 'required'), 'proto3' === this.syntax && this.type !== g.TYPES.message && i(typeof e, 'proto3 field without field presence cannot be null'), null ) if (!this.repeated || t) return this.map && !t ? e instanceof g.Map ? e : (e instanceof Object || i(typeof e, 'expected ProtoBuf.Map or raw object for map field'), new g.Map(this, e)) : (!this.repeated && Array.isArray(e) && i(typeof e, 'no array expected'), this.element.verifyValue(e)) Array.isArray(e) || (e = [e]) var o = [] for (n = 0; n < e.length; n++) o.push(this.element.verifyValue(e[n])) return o }), (r.hasWirePresence = function (e, t) { if ('proto3' !== this.syntax) return null !== e if (this.oneof && t[this.oneof.name] === this.name) return !0 switch (this.type) { case g.TYPES.int32: case g.TYPES.sint32: case g.TYPES.sfixed32: case g.TYPES.uint32: case g.TYPES.fixed32: return 0 !== e case g.TYPES.int64: case g.TYPES.sint64: case g.TYPES.sfixed64: case g.TYPES.uint64: case g.TYPES.fixed64: return 0 !== e.low || 0 !== e.high case g.TYPES.bool: return e case g.TYPES.float: case g.TYPES.double: return 0 !== e case g.TYPES.string: return 0 < e.length case g.TYPES.bytes: return 0 < e.remaining() case g.TYPES.enum: return 0 !== e case g.TYPES.message: return null !== e default: return !0 } }), (r.encode = function (t, r, e) { if (null === this.type || 'object' != typeof this.type) throw Error('[INTERNAL] Unresolved type in ' + this.toString(!0) + ': ' + this.type) if (null === t || (this.repeated && 0 == t.length)) return r try { var i if (this.repeated) if (this.options.packed && 0 <= g.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)) { r.writeVarint32((this.id << 3) | g.WIRE_TYPES.LDELIM), r.ensureCapacity((r.offset += 1)) var n = r.offset for (i = 0; i < t.length; i++) this.element.encodeValue(this.id, t[i], r) var o = r.offset - n, a = I.calculateVarint32(o) if (1 < a) { var s = r.slice(n, r.offset) ;(n += a - 1), (r.offset = n), r.append(s) } r.writeVarint32(o, n - a) } else for (i = 0; i < t.length; i++) r.writeVarint32((this.id << 3) | this.type.wireType), this.element.encodeValue(this.id, t[i], r) else this.map ? t.forEach(function (e, t, i) { var n = I.calculateVarint32(8 | this.keyType.wireType) + this.keyElement.calculateLength(1, t) + I.calculateVarint32(16 | this.type.wireType) + this.element.calculateLength(2, e) r.writeVarint32((this.id << 3) | g.WIRE_TYPES.LDELIM), r.writeVarint32(n), r.writeVarint32(8 | this.keyType.wireType), this.keyElement.encodeValue(1, t, r), r.writeVarint32(16 | this.type.wireType), this.element.encodeValue(2, e, r) }, this) : this.hasWirePresence(t, e) && (r.writeVarint32((this.id << 3) | this.type.wireType), this.element.encodeValue(this.id, t, r)) } catch (e) { throw Error('Illegal value for ' + this.toString(!0) + ': ' + t + ' (' + e + ')') } return r }), (r.calculate = function (t, e) { if (((t = this.verifyValue(t)), null === this.type || 'object' != typeof this.type)) throw Error('[INTERNAL] Unresolved type in ' + this.toString(!0) + ': ' + this.type) if (null === t || (this.repeated && 0 == t.length)) return 0 var r = 0 try { var i, n if (this.repeated) if (this.options.packed && 0 <= g.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)) { for (r += I.calculateVarint32((this.id << 3) | g.WIRE_TYPES.LDELIM), i = n = 0; i < t.length; i++) n += this.element.calculateLength(this.id, t[i]) ;(r += I.calculateVarint32(n)), (r += n) } else for (i = 0; i < t.length; i++) (r += I.calculateVarint32((this.id << 3) | this.type.wireType)), (r += this.element.calculateLength(this.id, t[i])) else this.map ? t.forEach(function (e, t, i) { var n = I.calculateVarint32(8 | this.keyType.wireType) + this.keyElement.calculateLength(1, t) + I.calculateVarint32(16 | this.type.wireType) + this.element.calculateLength(2, e) ;(r += I.calculateVarint32((this.id << 3) | g.WIRE_TYPES.LDELIM)), (r += I.calculateVarint32(n)), (r += n) }, this) : this.hasWirePresence(t, e) && ((r += I.calculateVarint32((this.id << 3) | this.type.wireType)), (r += this.element.calculateLength(this.id, t))) } catch (e) { throw Error('Illegal value for ' + this.toString(!0) + ': ' + t + ' (' + e + ')') } return r }), (r.decode = function (e, t, i) { var n, r if (!((!this.map && e == this.type.wireType) || (!i && this.repeated && this.options.packed && e == g.WIRE_TYPES.LDELIM) || (this.map && e == g.WIRE_TYPES.LDELIM))) throw Error('Illegal wire type for field ' + this.toString(!0) + ': ' + e + ' (' + this.type.wireType + ' expected)') if (e == g.WIRE_TYPES.LDELIM && this.repeated && this.options.packed && 0 <= g.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType) && !i) { ;(r = t.readVarint32()), (r = t.offset + r) for (var o = []; t.offset < r; ) o.push(this.decode(this.type.wireType, t, !0)) return o } if (this.map) { var a = u.defaultFieldValue(this.keyType) if (((n = u.defaultFieldValue(this.type)), (r = t.readVarint32()), t.remaining() < r)) throw Error('Illegal number of bytes for ' + this.toString(!0) + ': ' + r + ' required but got only ' + t.remaining()) var s = t.clone() for (s.limit = s.offset + r, t.offset += r; 0 < s.remaining(); ) { var l = s.readVarint32() e = 7 & l var c = l >>> 3 if (1 == c) a = this.keyElement.decode(s, e, c) else { if (2 != c) throw Error('Unexpected tag in map field key/value submessage') n = this.element.decode(s, e, c) } } return [a, n] } return this.element.decode(t, e, this.id) }), (s.Message.Field = c) function o(e, t, i, n, r, o, a) { c.call(this, e, t, i, null, n, r, o, a), this.extension } ;(o.prototype = Object.create(c.prototype)), (s.Message.ExtensionField = o) s.Message.OneOf = function (e, t, i) { h.call(this, e, t, i), (this.fields = []) } var p = function (e, t, i, n, r) { l.call(this, e, t, i, n, r), (this.className = 'Enum'), (this.object = null) } ;(p.getName = function (e, t) { for (var i, n = Object.keys(e), r = 0; r < n.length; ++r) if (e[(i = n[r])] === t) return i return null }), ((p.prototype = Object.create(l.prototype)).build = function (e) { if (this.object && !e) return this.object for (var t = new g.Builder.Enum(), i = this.getChildren(p.Value), n = 0, r = i.length; n < r; ++n) t[i[n].name] = i[n].id return ( Object.defineProperty && Object.defineProperty(t, '$options', { value: this.buildOpt(), enumerable: !1 }), (this.object = t) ) }), (s.Enum = p) function f(e, t, i, n) { h.call(this, e, t, i), (this.className = 'Enum.Value'), (this.id = n) } ;(f.prototype = Object.create(h.prototype)), (s.Enum.Value = f) var v = function (e, t, i, n) { h.call(this, e, t, i), (this.field = n) } ;(v.prototype = Object.create(h.prototype)), (s.Extension = v) var y = function (e, t, i, n) { l.call(this, e, t, i, n), (this.className = 'Service'), (this.clazz = null) } ;((y.prototype = Object.create(l.prototype)).build = function (e) { return this.clazz && !e ? this.clazz : (this.clazz = (function (t, r) { for ( var o = function (e) { t.Builder.Service.call(this), (this.rpcImpl = e || function (e, t, i) { setTimeout(i.bind(this, Error('Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services')), 0) }) }, e = (o.prototype = Object.create(t.Builder.Service.prototype)), i = r.getChildren(t.Reflect.Service.RPCMethod), n = 0; n < i.length; n++ ) !(function (n) { ;(e[n.name] = function (e, i) { try { try { e = n.resolvedRequestType.clazz.decode(I.wrap(e)) } catch (e) { if (!(e instanceof TypeError)) throw e } if (null === e || 'object' != typeof e) throw Error('Illegal arguments') e instanceof n.resolvedRequestType.clazz || (e = new n.resolvedRequestType.clazz(e)), this.rpcImpl(n.fqn(), e, function (e, t) { if (!e) { null === t && (t = '') try { t = n.resolvedResponseType.clazz.decode(t) } catch (e) {} return t && t instanceof n.resolvedResponseType.clazz ? void i(null, t) : void i(Error('Illegal response type received in service method ' + r.name + '#' + n.name)) } i(e) }) } catch (e) { setTimeout(i.bind(this, e), 0) } }), (o[n.name] = function (e, t, i) { new o(e)[n.name](t, i) }), Object.defineProperty && (Object.defineProperty(o[n.name], '$options', { value: n.buildOpt() }), Object.defineProperty(e[n.name], '$options', { value: o[n.name].$options })) })(i[n]) return ( Object.defineProperty && (Object.defineProperty(o, '$options', { value: r.buildOpt() }), Object.defineProperty(e, '$options', { value: o.$options }), Object.defineProperty(o, '$type', { value: r }), Object.defineProperty(e, '$type', { value: r })), o ) })(g, this)) }), (s.Service = y) function A(e, t, i, n) { h.call(this, e, t, i), (this.className = 'Service.Method'), (this.options = n || {}) } ;((A.prototype = Object.create(h.prototype)).buildOpt = t.buildOpt), (s.Service.Method = A) function C(e, t, i, n, r, o, a, s) { A.call(this, e, t, i, s), (this.className = 'Service.RPCMethod'), (this.requestName = n), (this.responseName = r), (this.requestStream = o), (this.responseStream = a), (this.resolvedRequestType = null), (this.resolvedResponseType = null) } return (C.prototype = Object.create(A.prototype)), (s.Service.RPCMethod = C), s })(o)), (o.Builder = ((i = (u = o).Lang), (s = o.Reflect), (n = h.prototype), (h.isMessage = function (e) { return 'string' == typeof e.name && void 0 === e.values && void 0 === e.rpc }), (h.isMessageField = function (e) { return 'string' == typeof e.rule && 'string' == typeof e.name && 'string' == typeof e.type && void 0 !== e.id }), (h.isEnum = function (e) { return 'string' == typeof e.name && !(void 0 === e.values || !Array.isArray(e.values) || 0 === e.values.length) }), (h.isService = function (e) { return !('string' != typeof e.name || 'object' != typeof e.rpc || !e.rpc) }), (h.isExtend = function (e) { return 'string' == typeof e.ref }), (n.reset = function () { return (this.ptr = this.ns), this }), (n.define = function (e) { if ('string' != typeof e || !i.TYPEREF.test(e)) throw Error('illegal namespace: ' + e) return ( e.split('.').forEach(function (e) { var t = this.ptr.getChild(e) null === t && this.ptr.addChild((t = new s.Namespace(this, this.ptr, e))), (this.ptr = t) }, this), this ) }), (n.create = function (e) { if (!e) return this if (Array.isArray(e)) { if (0 === e.length) return this e = e.slice() } else e = [e] for (var t = [e]; 0 < t.length; ) { if (((e = t.pop()), !Array.isArray(e))) throw Error('not a valid namespace: ' + JSON.stringify(e)) for (; 0 < e.length; ) { var i = e.shift() if (h.isMessage(i)) { var o = new s.Message(this, this.ptr, i.name, i.options, i.isGroup, i.syntax), n = {} i.oneofs && Object.keys(i.oneofs).forEach(function (e) { o.addChild((n[e] = new s.Message.OneOf(this, o, e))) }, this), i.fields && i.fields.forEach(function (e) { if (null !== o.getChild(0 | e.id)) throw Error('duplicate or invalid field id in ' + o.name + ': ' + e.id) if (e.options && 'object' != typeof e.options) throw Error('illegal field options in ' + o.name + '#' + e.name) var t = null if ('string' == typeof e.oneof && !(t = n[e.oneof])) throw Error('illegal oneof in ' + o.name + '#' + e.name + ': ' + e.oneof) ;(e = new s.Message.Field(this, o, e.rule, e.keytype, e.type, e.name, e.id, e.options, t, i.syntax)), t && t.fields.push(e), o.addChild(e) }, this) var r = [] if ( (i.enums && i.enums.forEach(function (e) { r.push(e) }), i.messages && i.messages.forEach(function (e) { r.push(e) }), i.services && i.services.forEach(function (e) { r.push(e) }), i.extensions && ('number' == typeof i.extensions[0] ? (o.extensions = [i.extensions]) : (o.extensions = i.extensions)), this.ptr.addChild(o), 0 < r.length) ) { t.push(e), (e = r), (r = null), (this.ptr = o), (o = null) continue } r = null } else if (h.isEnum(i)) (o = new s.Enum(this, this.ptr, i.name, i.options, i.syntax)), i.values.forEach(function (e) { o.addChild(new s.Enum.Value(this, o, e.name, e.id)) }, this), this.ptr.addChild(o) else if (h.isService(i)) (o = new s.Service(this, this.ptr, i.name, i.options)), Object.keys(i.rpc).forEach(function (e) { var t = i.rpc[e] o.addChild(new s.Service.RPCMethod(this, o, e, t.request, t.response, !!t.request_stream, !!t.response_stream, t.options)) }, this), this.ptr.addChild(o) else { if (!h.isExtend(i)) throw Error('not a valid definition: ' + JSON.stringify(i)) if ((o = this.ptr.resolve(i.ref, !0))) i.fields.forEach(function (t) { if (null !== o.getChild(0 | t.id)) throw Error('duplicate extended field id in ' + o.name + ': ' + t.id) if (o.extensions) { var i = !1 if ( (o.extensions.forEach(function (e) { t.id >= e[0] && t.id <= e[1] && (i = !0) }), !i) ) throw Error('illegal extended field id in ' + o.name + ': ' + t.id + ' (not within valid ranges)') } var e = t.name this.options.convertFieldsToCamelCase && (e = u.Util.toCamelCase(e)) var n = new s.Message.ExtensionField(this, o, t.rule, t.type, this.ptr.fqn() + '.' + e, t.id, t.options), r = new s.Extension(this, this.ptr, t.name, n) ;(n.extension = r), this.ptr.addChild(r), o.addChild(n) }, this) else if (!/\.?google\.protobuf\./.test(i.ref)) throw Error('extended message ' + i.ref + ' is not defined') } o = i = null } ;(e = null), (this.ptr = this.ptr.parent) } return (this.resolved = !1), (this.result = null), this }), (n.import = function (t, e) { var i = '/' if ('string' == typeof e) { if ((u.Util.IS_NODE && (e = p('path').resolve(e)), !0 === this.files[e])) return this.reset() this.files[e] = !0 } else if ('object' == typeof e) { var n = e.root u.Util.IS_NODE && (n = p('path').resolve(n)), (0 <= n.indexOf('\\') || 0 <= e.file.indexOf('\\')) && (i = '\\') var r = n + i + e.file if (!0 === this.files[r]) return this.reset() this.files[r] = !0 } if (t.imports && 0 < t.imports.length) { var o, a = !1 'object' == typeof e ? ((this.importRoot = e.root), (a = !0), (o = this.importRoot), (e = e.file), (0 <= o.indexOf('\\') || 0 <= e.indexOf('\\')) && (i = '\\')) : 'string' == typeof e ? this.importRoot ? (o = this.importRoot) : 0 <= e.indexOf('/') ? '' === (o = e.replace(/\/[^\/]*$/, '')) && (o = '/') : 0 <= e.indexOf('\\') ? ((o = e.replace(/\\[^\\]*$/, '')), (i = '\\')) : (o = '.') : (o = null) for (var s = 0; s < t.imports.length; s++) if ('string' == typeof t.imports[s]) { if (!o) throw Error('cannot determine import root') var l = t.imports[s] if ('google/protobuf/descriptor.proto' === l) continue if (((l = o + i + l), !0 === this.files[l])) continue ;/\.proto$/i.test(l) && !u.DotProto && (l = l.replace(/\.proto$/, '.json')) var c = u.Util.fetch(l) if (null === c) throw Error("failed to import '" + l + "' in '" + e + "': file not found") ;/\.json$/i.test(l) ? this.import(JSON.parse(c + ''), l) : this.import(u.DotProto.Parser.parse(c), l) } else e ? /\.(\w+)$/.test(e) ? this.import( t.imports[s], e.replace(/^(.+)\.(\w+)$/, function (e, t, i) { return t + '_import' + s + '.' + i }) ) : this.import(t.imports[s], e + '_import' + s) : this.import(t.imports[s]) a && (this.importRoot = null) } t.package && this.define(t.package), t.syntax && (function t(i) { i.messages && i.messages.forEach(function (e) { ;(e.syntax = i.syntax), t(e) }), i.enums && i.enums.forEach(function (e) { e.syntax = i.syntax }) })(t) var h = this.ptr return ( t.options && Object.keys(t.options).forEach(function (e) { h.options[e] = t.options[e] }), t.messages && (this.create(t.messages), (this.ptr = h)), t.enums && (this.create(t.enums), (this.ptr = h)), t.services && (this.create(t.services), (this.ptr = h)), t.extends && this.create(t.extends), this.reset() ) }), (n.resolveAll = function () { var e if (null == this.ptr || 'object' == typeof this.ptr.type) return this if (this.ptr instanceof s.Namespace) this.ptr.children.forEach(function (e) { ;(this.ptr = e), this.resolveAll() }, this) else if (this.ptr instanceof s.Message.Field) { if (i.TYPE.test(this.ptr.type)) this.ptr.type = u.TYPES[this.ptr.type] else { if (!i.TYPEREF.test(this.ptr.type)) throw Error('illegal type reference in ' + this.ptr.toString(!0) + ': ' + this.ptr.type) if (!(e = (this.ptr instanceof s.Message.ExtensionField ? this.ptr.extension.parent : this.ptr.parent).resolve(this.ptr.type, !0))) throw Error('unresolvable type reference in ' + this.ptr.toString(!0) + ': ' + this.ptr.type) if ((this.ptr.resolvedType = e) instanceof s.Enum) { if (((this.ptr.type = u.TYPES.enum), 'proto3' === this.ptr.syntax && 'proto3' !== e.syntax)) throw Error('proto3 message cannot reference proto2 enum') } else { if (!(e instanceof s.Message)) throw Error('illegal type reference in ' + this.ptr.toString(!0) + ': ' + this.ptr.type) this.ptr.type = e.isGroup ? u.TYPES.group : u.TYPES.message } } if (this.ptr.map) { if (!i.TYPE.test(this.ptr.keyType)) throw Error('illegal key type for map field in ' + this.ptr.toString(!0) + ': ' + this.ptr.keyType) this.ptr.keyType = u.TYPES[this.ptr.keyType] } } else if (this.ptr instanceof u.Reflect.Service.Method) { if (!(this.ptr instanceof u.Reflect.Service.RPCMethod)) throw Error('illegal service type in ' + this.ptr.toString(!0)) if (!((e = this.ptr.parent.resolve(this.ptr.requestName, !0)) && e instanceof u.Reflect.Message)) throw Error('Illegal type reference in ' + this.ptr.toString(!0) + ': ' + this.ptr.requestName) if (((this.ptr.resolvedRequestType = e), !((e = this.ptr.parent.resolve(this.ptr.responseName, !0)) && e instanceof u.Reflect.Message))) throw Error('Illegal type reference in ' + this.ptr.toString(!0) + ': ' + this.ptr.responseName) this.ptr.resolvedResponseType = e } else if (!(this.ptr instanceof u.Reflect.Message.OneOf || this.ptr instanceof u.Reflect.Extension || this.ptr instanceof u.Reflect.Enum.Value)) throw Error('illegal object in namespace: ' + typeof this.ptr + ': ' + this.ptr) return this.reset() }), (n.build = function (e) { if ((this.reset(), this.resolved || (this.resolveAll(), (this.resolved = !0), (this.result = null)), null === this.result && (this.result = this.ns.build()), !e)) return this.result for (var t = 'string' == typeof e ? e.split('.') : e, i = this.result, n = 0; n < t.length; n++) { if (!i[t[n]]) { i = null break } i = i[t[n]] } return i }), (n.lookup = function (e, t) { return e ? this.ns.resolve(e, t) : this.ns }), (n.toString = function () { return 'Builder' }), (h.Message = function () {}), (h.Enum = function () {}), (h.Service = function () {}), h)), (o.Map = ((a = o.Reflect), ((t = c.prototype).clear = function () { this.map = {} }), (t.delete = function (e) { var t = this.keyElem.valueToString(this.keyElem.verifyValue(e)), i = t in this.map return delete this.map[t], i }), (t.entries = function () { for (var e, t = [], i = Object.keys(this.map), n = 0; n < i.length; n++) t.push([(e = this.map[i[n]]).key, e.value]) return l(t) }), (t.keys = function () { for (var e = [], t = Object.keys(this.map), i = 0; i < t.length; i++) e.push(this.map[t[i]].key) return l(e) }), (t.values = function () { for (var e = [], t = Object.keys(this.map), i = 0; i < t.length; i++) e.push(this.map[t[i]].value) return l(e) }), (t.forEach = function (e, t) { for (var i, n = Object.keys(this.map), r = 0; r < n.length; r++) e.call(t, (i = this.map[n[r]]).value, i.key, this) }), (t.set = function (e, t) { var i = this.keyElem.verifyValue(e), n = this.valueElem.verifyValue(t) return ( (this.map[this.keyElem.valueToString(i)] = { key: i, value: n }), this ) }), (t.get = function (e) { var t = this.keyElem.valueToString(this.keyElem.verifyValue(e)) if (t in this.map) return this.map[t].value }), (t.has = function (e) { return this.keyElem.valueToString(this.keyElem.verifyValue(e)) in this.map }), c)), (o.loadProto = function (e, t, i) { return ('string' == typeof t || (t && 'string' == typeof t.file && 'string' == typeof t.root)) && ((i = t), (t = void 0)), o.loadJson(o.DotProto.Parser.parse(e), t, i) }), (o.protoFromString = o.loadProto), (o.loadProtoFile = function (t, i, n) { if ((i && 'object' == typeof i ? ((n = i), (i = null)) : (i && 'function' == typeof i) || (i = null), i)) return o.Util.fetch('string' == typeof t ? t : t.root + '/' + t.file, function (e) { if (null !== e) try { i(null, o.loadProto(e, n, t)) } catch (e) { i(e) } else i(Error('Failed to fetch file')) }) var e = o.Util.fetch('object' == typeof t ? t.root + '/' + t.file : t) return null === e ? null : o.loadProto(e, n, t) }), (o.protoFromFile = o.loadProtoFile), (o.newBuilder = function (e) { return ( void 0 === (e = e || {}).convertFieldsToCamelCase && (e.convertFieldsToCamelCase = o.convertFieldsToCamelCase), void 0 === e.populateAccessors && (e.populateAccessors = o.populateAccessors), new o.Builder(e) ) }), (o.loadJson = function (e, t, i) { return ( ('string' == typeof t || (t && 'string' == typeof t.file && 'string' == typeof t.root)) && ((i = t), (t = null)), (t && 'object' == typeof t) || (t = o.newBuilder()), 'string' == typeof e && (e = JSON.parse(e)), t.import(e, i), t.resolveAll(), t ) }), (o.loadJsonFile = function (t, i, n) { if ((i && 'object' == typeof i ? ((n = i), (i = null)) : (i && 'function' == typeof i) || (i = null), i)) return o.Util.fetch('string' == typeof t ? t : t.root + '/' + t.file, function (e) { if (null !== e) try { i(null, o.loadJson(JSON.parse(e), n, t)) } catch (e) { i(e) } else i(Error('Failed to fetch file')) }) var e = o.Util.fetch('object' == typeof t ? t.root + '/' + t.file : t) return null === e ? null : o.loadJson(JSON.parse(e), n, t) }), o ) function l(e) { var t = 0 return { next: function () { return t < e.length ? { done: !1, value: e[t++] } : { done: !0 } } } } function c(e, t) { if (!e.map) throw Error('field is not a map') if ( ((this.field = e), (this.keyElem = new a.Element(e.keyType, null, !0, e.syntax)), (this.valueElem = new a.Element(e.type, e.resolvedType, !1, e.syntax)), (this.map = {}), Object.defineProperty(this, 'size', { get: function () { return Object.keys(this.map).length } }), t) ) for (var i = Object.keys(t), n = 0; n < i.length; n++) { var r = this.keyElem.valueFromString(i[n]), o = this.valueElem.verifyValue(t[i[n]]) this.map[this.keyElem.valueToString(r)] = { key: r, value: o } } } function h(e) { ;(this.ns = new s.Namespace(this, null, '')), (this.ptr = this.ns), (this.resolved = !1), (this.result = null), (this.files = {}), (this.importRoot = null), (this.options = e || {}) } }), 'function' == typeof define && define.amd ? define(['bytebuffer'], t) : 'function' == typeof p && 'object' == typeof i && i && i.exports ? (i.exports = t(p('bytebuffer'))) : ((e.dcodeIO = e.dcodeIO || {}).ProtoBuf = t(e.dcodeIO.ByteBuffer)) }).call(this, p('_process')) }, { _process: 203, bytebuffer: 215, fs: 197, path: 197 } ], 215: [ function (t, e, i) { var n, r ;(n = this), (r = function (l) { 'use strict' function s(e) { var t = 0 return function () { return t < e.length ? e.charCodeAt(t++) : null } } function c() { var e = [], t = [] return function () { return 0 === arguments.length ? t.join('') + i.apply(String, e) : (1024 < e.length + arguments.length && (t.push(i.apply(String, e)), (e.length = 0)), void Array.prototype.push.apply(e, arguments)) } } function n(e, t, i, n, r) { var o, a, s = 8 * r - n - 1, l = (1 << s) - 1, c = l >> 1, h = -7, u = i ? r - 1 : 0, d = i ? -1 : 1, p = e[t + u] for (u += d, o = p & ((1 << -h) - 1), p >>= -h, h += s; 0 < h; o = 256 * o + e[t + u], u += d, h -= 8); for (a = o & ((1 << -h) - 1), o >>= -h, h += n; 0 < h; a = 256 * a + e[t + u], u += d, h -= 8); if (0 === o) o = 1 - c else { if (o === l) return a ? NaN : (1 / 0) * (p ? -1 : 1) ;(a += Math.pow(2, n)), (o -= c) } return (p ? -1 : 1) * a * Math.pow(2, o - n) } function r(e, t, i, n, r, o) { var a, s, l, c = 8 * o - r - 1, h = (1 << c) - 1, u = h >> 1, d = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : o - 1, f = n ? 1 : -1, g = t < 0 || (0 === t && 1 / t < 0) ? 1 : 0 for ( t = Math.abs(t), isNaN(t) || t === 1 / 0 ? ((s = isNaN(t) ? 1 : 0), (a = h)) : ((a = Math.floor(Math.log(t) / Math.LN2)), t * (l = Math.pow(2, -a)) < 1 && (a--, (l *= 2)), 2 <= (t += 1 <= a + u ? d / l : d * Math.pow(2, 1 - u)) * l && (a++, (l /= 2)), h <= a + u ? ((s = 0), (a = h)) : 1 <= a + u ? ((s = (t * l - 1) * Math.pow(2, r)), (a += u)) : ((s = t * Math.pow(2, u - 1) * Math.pow(2, r)), (a = 0))); 8 <= r; e[i + p] = 255 & s, p += f, s /= 256, r -= 8 ); for (a = (a << r) | s, c += r; 0 < c; e[i + p] = 255 & a, p += f, a /= 256, c -= 8); e[i + p - f] |= 128 * g } var f = function (e, t, i) { if ((void 0 === e && (e = f.DEFAULT_CAPACITY), void 0 === t && (t = f.DEFAULT_ENDIAN), void 0 === i && (i = f.DEFAULT_NOASSERT), !i)) { if ((e |= 0) < 0) throw RangeError('Illegal capacity') ;(t = !!t), (i = !!i) } ;(this.buffer = 0 === e ? o : new ArrayBuffer(e)), (this.view = 0 === e ? null : new Uint8Array(this.buffer)), (this.offset = 0), (this.markedOffset = -1), (this.limit = e), (this.littleEndian = t), (this.noAssert = i) } ;(f.VERSION = '5.0.1'), (f.LITTLE_ENDIAN = !0), (f.BIG_ENDIAN = !1), (f.DEFAULT_CAPACITY = 16), (f.DEFAULT_ENDIAN = f.BIG_ENDIAN), (f.DEFAULT_NOASSERT = !1), (f.Long = l || null) var a = f.prototype a.__isByteBuffer__, Object.defineProperty(a, '__isByteBuffer__', { value: !0, enumerable: !1, configurable: !1 }) var o = new ArrayBuffer(0), i = String.fromCharCode ;(f.accessor = function () { return Uint8Array }), (f.allocate = function (e, t, i) { return new f(e, t, i) }), (f.concat = function (e, t, i, n) { ;('boolean' != typeof t && 'string' == typeof t) || ((n = i), (i = t), (t = void 0)) for (var r, o = 0, a = 0, s = e.length; a < s; ++a) f.isByteBuffer(e[a]) || (e[a] = f.wrap(e[a], t)), 0 < (r = e[a].limit - e[a].offset) && (o += r) if (0 === o) return new f(0, i, n) var l, c = new f(o, i, n) for (a = 0; a < s; ) (r = (l = e[a++]).limit - l.offset) <= 0 || (c.view.set(l.view.subarray(l.offset, l.limit), c.offset), (c.offset += r)) return (c.limit = c.offset), (c.offset = 0), c }), (f.isByteBuffer = function (e) { return !0 === (e && e.__isByteBuffer__) }), (f.type = function () { return ArrayBuffer }), (f.wrap = function (e, t, i, n) { if (('string' != typeof t && ((n = i), (i = t), (t = void 0)), 'string' == typeof e)) switch ((void 0 === t && (t = 'utf8'), t)) { case 'base64': return f.fromBase64(e, i) case 'hex': return f.fromHex(e, i) case 'binary': return f.fromBinary(e, i) case 'utf8': return f.fromUTF8(e, i) case 'debug': return f.fromDebug(e, i) default: throw Error('Unsupported encoding: ' + t) } if (null === e || 'object' != typeof e) throw TypeError('Illegal buffer') var r if (f.isByteBuffer(e)) return ((r = a.clone.call(e)).markedOffset = -1), r if (e instanceof Uint8Array) (r = new f(0, i, n)), 0 < e.length && ((r.buffer = e.buffer), (r.offset = e.byteOffset), (r.limit = e.byteOffset + e.byteLength), (r.view = new Uint8Array(e.buffer))) else if (e instanceof ArrayBuffer) (r = new f(0, i, n)), 0 < e.byteLength && ((r.buffer = e), (r.offset = 0), (r.limit = e.byteLength), (r.view = 0 < e.byteLength ? new Uint8Array(e) : null)) else { if ('[object Array]' !== Object.prototype.toString.call(e)) throw TypeError('Illegal buffer') ;(r = new f(e.length, i, n)).limit = e.length for (var o = 0; o < e.length; ++o) r.view[o] = e[o] } return r }), (a.writeBitSet = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if (!(e instanceof Array)) throw TypeError('Illegal BitSet: Not an array') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } var n, r = t, o = e.length, a = o >> 3, s = 0 for (t += this.writeVarint32(o, t); a--; ) (n = (1 & !!e[s++]) | ((1 & !!e[s++]) << 1) | ((1 & !!e[s++]) << 2) | ((1 & !!e[s++]) << 3) | ((1 & !!e[s++]) << 4) | ((1 & !!e[s++]) << 5) | ((1 & !!e[s++]) << 6) | ((1 & !!e[s++]) << 7)), this.writeByte(n, t++) if (s < o) { var l = 0 for (n = 0; s < o; ) n |= (1 & !!e[s++]) << l++ this.writeByte(n, t++) } return i ? ((this.offset = t), this) : t - r }), (a.readBitSet = function (e) { var t = void 0 === e t && (e = this.offset) var i, n = this.readVarint32(e), r = n.value, o = r >> 3, a = 0, s = [] for (e += n.length; o--; ) (i = this.readByte(e++)), (s[a++] = !!(1 & i)), (s[a++] = !!(2 & i)), (s[a++] = !!(4 & i)), (s[a++] = !!(8 & i)), (s[a++] = !!(16 & i)), (s[a++] = !!(32 & i)), (s[a++] = !!(64 & i)), (s[a++] = !!(128 & i)) if (a < r) { var l = 0 for (i = this.readByte(e++); a < r; ) s[a++] = !!((i >> l++) & 1) } return t && (this.offset = e), s }), (a.readBytes = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + e > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+' + e + ') <= ' + this.buffer.byteLength) } var n = this.slice(t, t + e) return i && (this.offset += e), n }), (a.writeBytes = a.append), (a.writeInt8 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal value: ' + e + ' (not an integer)') if (((e |= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } t += 1 var n = this.buffer.byteLength return n < t && this.resize((n *= 2) > t ? n : t), (t -= 1), (this.view[t] = e), i && (this.offset += 1), this }), (a.writeByte = a.writeInt8), (a.readInt8 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 1 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+1) <= ' + this.buffer.byteLength) } var i = this.view[e] return 128 == (128 & i) && (i = -(255 - i + 1)), t && (this.offset += 1), i }), (a.readByte = a.readInt8), (a.writeUint8 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal value: ' + e + ' (not an integer)') if (((e >>>= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } t += 1 var n = this.buffer.byteLength return n < t && this.resize((n *= 2) > t ? n : t), (t -= 1), (this.view[t] = e), i && (this.offset += 1), this }), (a.writeUInt8 = a.writeUint8), (a.readUint8 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 1 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+1) <= ' + this.buffer.byteLength) } var i = this.view[e] return t && (this.offset += 1), i }), (a.readUInt8 = a.readUint8), (a.writeInt16 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal value: ' + e + ' (not an integer)') if (((e |= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } t += 2 var n = this.buffer.byteLength return ( n < t && this.resize((n *= 2) > t ? n : t), (t -= 2), this.littleEndian ? ((this.view[t + 1] = (65280 & e) >>> 8), (this.view[t] = 255 & e)) : ((this.view[t] = (65280 & e) >>> 8), (this.view[t + 1] = 255 & e)), i && (this.offset += 2), this ) }), (a.writeShort = a.writeInt16), (a.readInt16 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 2 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+2) <= ' + this.buffer.byteLength) } var i = 0 return ( this.littleEndian ? ((i = this.view[e]), (i |= this.view[e + 1] << 8)) : ((i = this.view[e] << 8), (i |= this.view[e + 1])), 32768 == (32768 & i) && (i = -(65535 - i + 1)), t && (this.offset += 2), i ) }), (a.readShort = a.readInt16), (a.writeUint16 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal value: ' + e + ' (not an integer)') if (((e >>>= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } t += 2 var n = this.buffer.byteLength return ( n < t && this.resize((n *= 2) > t ? n : t), (t -= 2), this.littleEndian ? ((this.view[t + 1] = (65280 & e) >>> 8), (this.view[t] = 255 & e)) : ((this.view[t] = (65280 & e) >>> 8), (this.view[t + 1] = 255 & e)), i && (this.offset += 2), this ) }), (a.writeUInt16 = a.writeUint16), (a.readUint16 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 2 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+2) <= ' + this.buffer.byteLength) } var i = 0 return this.littleEndian ? ((i = this.view[e]), (i |= this.view[e + 1] << 8)) : ((i = this.view[e] << 8), (i |= this.view[e + 1])), t && (this.offset += 2), i }), (a.readUInt16 = a.readUint16), (a.writeInt32 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal value: ' + e + ' (not an integer)') if (((e |= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } t += 4 var n = this.buffer.byteLength return ( n < t && this.resize((n *= 2) > t ? n : t), (t -= 4), this.littleEndian ? ((this.view[t + 3] = (e >>> 24) & 255), (this.view[t + 2] = (e >>> 16) & 255), (this.view[t + 1] = (e >>> 8) & 255), (this.view[t] = 255 & e)) : ((this.view[t] = (e >>> 24) & 255), (this.view[t + 1] = (e >>> 16) & 255), (this.view[t + 2] = (e >>> 8) & 255), (this.view[t + 3] = 255 & e)), i && (this.offset += 4), this ) }), (a.writeInt = a.writeInt32), (a.readInt32 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 4 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+4) <= ' + this.buffer.byteLength) } var i = 0 return ( this.littleEndian ? ((i = this.view[e + 2] << 16), (i |= this.view[e + 1] << 8), (i |= this.view[e]), (i += (this.view[e + 3] << 24) >>> 0)) : ((i = this.view[e + 1] << 16), (i |= this.view[e + 2] << 8), (i |= this.view[e + 3]), (i += (this.view[e] << 24) >>> 0)), (i |= 0), t && (this.offset += 4), i ) }), (a.readInt = a.readInt32), (a.writeUint32 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal value: ' + e + ' (not an integer)') if (((e >>>= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } t += 4 var n = this.buffer.byteLength return ( n < t && this.resize((n *= 2) > t ? n : t), (t -= 4), this.littleEndian ? ((this.view[t + 3] = (e >>> 24) & 255), (this.view[t + 2] = (e >>> 16) & 255), (this.view[t + 1] = (e >>> 8) & 255), (this.view[t] = 255 & e)) : ((this.view[t] = (e >>> 24) & 255), (this.view[t + 1] = (e >>> 16) & 255), (this.view[t + 2] = (e >>> 8) & 255), (this.view[t + 3] = 255 & e)), i && (this.offset += 4), this ) }), (a.writeUInt32 = a.writeUint32), (a.readUint32 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 4 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+4) <= ' + this.buffer.byteLength) } var i = 0 return ( this.littleEndian ? ((i = this.view[e + 2] << 16), (i |= this.view[e + 1] << 8), (i |= this.view[e]), (i += (this.view[e + 3] << 24) >>> 0)) : ((i = this.view[e + 1] << 16), (i |= this.view[e + 2] << 8), (i |= this.view[e + 3]), (i += (this.view[e] << 24) >>> 0)), t && (this.offset += 4), i ) }), (a.readUInt32 = a.readUint32), l && ((a.writeInt64 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' == typeof e) e = l.fromNumber(e) else if ('string' == typeof e) e = l.fromString(e) else if (!(e && e instanceof l)) throw TypeError('Illegal value: ' + e + ' (not an integer or Long)') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } 'number' == typeof e ? (e = l.fromNumber(e)) : 'string' == typeof e && (e = l.fromString(e)), (t += 8) var n = this.buffer.byteLength n < t && this.resize((n *= 2) > t ? n : t), (t -= 8) var r = e.low, o = e.high return ( this.littleEndian ? ((this.view[t + 3] = (r >>> 24) & 255), (this.view[t + 2] = (r >>> 16) & 255), (this.view[t + 1] = (r >>> 8) & 255), (this.view[t] = 255 & r), (t += 4), (this.view[t + 3] = (o >>> 24) & 255), (this.view[t + 2] = (o >>> 16) & 255), (this.view[t + 1] = (o >>> 8) & 255), (this.view[t] = 255 & o)) : ((this.view[t] = (o >>> 24) & 255), (this.view[t + 1] = (o >>> 16) & 255), (this.view[t + 2] = (o >>> 8) & 255), (this.view[t + 3] = 255 & o), (t += 4), (this.view[t] = (r >>> 24) & 255), (this.view[t + 1] = (r >>> 16) & 255), (this.view[t + 2] = (r >>> 8) & 255), (this.view[t + 3] = 255 & r)), i && (this.offset += 8), this ) }), (a.writeLong = a.writeInt64), (a.readInt64 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 8 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+8) <= ' + this.buffer.byteLength) } var i = 0, n = 0 this.littleEndian ? ((i = this.view[e + 2] << 16), (i |= this.view[e + 1] << 8), (i |= this.view[e]), (i += (this.view[e + 3] << 24) >>> 0), (e += 4), (n = this.view[e + 2] << 16), (n |= this.view[e + 1] << 8), (n |= this.view[e]), (n += (this.view[e + 3] << 24) >>> 0)) : ((n = this.view[e + 1] << 16), (n |= this.view[e + 2] << 8), (n |= this.view[e + 3]), (n += (this.view[e] << 24) >>> 0), (e += 4), (i = this.view[e + 1] << 16), (i |= this.view[e + 2] << 8), (i |= this.view[e + 3]), (i += (this.view[e] << 24) >>> 0)) var r = new l(i, n, !1) return t && (this.offset += 8), r }), (a.readLong = a.readInt64), (a.writeUint64 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' == typeof e) e = l.fromNumber(e) else if ('string' == typeof e) e = l.fromString(e) else if (!(e && e instanceof l)) throw TypeError('Illegal value: ' + e + ' (not an integer or Long)') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } 'number' == typeof e ? (e = l.fromNumber(e)) : 'string' == typeof e && (e = l.fromString(e)), (t += 8) var n = this.buffer.byteLength n < t && this.resize((n *= 2) > t ? n : t), (t -= 8) var r = e.low, o = e.high return ( this.littleEndian ? ((this.view[t + 3] = (r >>> 24) & 255), (this.view[t + 2] = (r >>> 16) & 255), (this.view[t + 1] = (r >>> 8) & 255), (this.view[t] = 255 & r), (t += 4), (this.view[t + 3] = (o >>> 24) & 255), (this.view[t + 2] = (o >>> 16) & 255), (this.view[t + 1] = (o >>> 8) & 255), (this.view[t] = 255 & o)) : ((this.view[t] = (o >>> 24) & 255), (this.view[t + 1] = (o >>> 16) & 255), (this.view[t + 2] = (o >>> 8) & 255), (this.view[t + 3] = 255 & o), (t += 4), (this.view[t] = (r >>> 24) & 255), (this.view[t + 1] = (r >>> 16) & 255), (this.view[t + 2] = (r >>> 8) & 255), (this.view[t + 3] = 255 & r)), i && (this.offset += 8), this ) }), (a.writeUInt64 = a.writeUint64), (a.readUint64 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 8 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+8) <= ' + this.buffer.byteLength) } var i = 0, n = 0 this.littleEndian ? ((i = this.view[e + 2] << 16), (i |= this.view[e + 1] << 8), (i |= this.view[e]), (i += (this.view[e + 3] << 24) >>> 0), (e += 4), (n = this.view[e + 2] << 16), (n |= this.view[e + 1] << 8), (n |= this.view[e]), (n += (this.view[e + 3] << 24) >>> 0)) : ((n = this.view[e + 1] << 16), (n |= this.view[e + 2] << 8), (n |= this.view[e + 3]), (n += (this.view[e] << 24) >>> 0), (e += 4), (i = this.view[e + 1] << 16), (i |= this.view[e + 2] << 8), (i |= this.view[e + 3]), (i += (this.view[e] << 24) >>> 0)) var r = new l(i, n, !0) return t && (this.offset += 8), r }), (a.readUInt64 = a.readUint64)), (a.writeFloat32 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e) throw TypeError('Illegal value: ' + e + ' (not a number)') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } t += 4 var n = this.buffer.byteLength return n < t && this.resize((n *= 2) > t ? n : t), (t -= 4), r(this.view, e, t, this.littleEndian, 23, 4), i && (this.offset += 4), this }), (a.writeFloat = a.writeFloat32), (a.readFloat32 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 4 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+4) <= ' + this.buffer.byteLength) } var i = n(this.view, e, this.littleEndian, 23, 4) return t && (this.offset += 4), i }), (a.readFloat = a.readFloat32), (a.writeFloat64 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e) throw TypeError('Illegal value: ' + e + ' (not a number)') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } t += 8 var n = this.buffer.byteLength return n < t && this.resize((n *= 2) > t ? n : t), (t -= 8), r(this.view, e, t, this.littleEndian, 52, 8), i && (this.offset += 8), this }), (a.writeDouble = a.writeFloat64), (a.readFloat64 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 8 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+8) <= ' + this.buffer.byteLength) } var i = n(this.view, e, this.littleEndian, 52, 8) return t && (this.offset += 8), i }), (a.readDouble = a.readFloat64), (f.MAX_VARINT32_BYTES = 5), (f.calculateVarint32 = function (e) { return (e >>>= 0) < 128 ? 1 : e < 16384 ? 2 : e < 1 << 21 ? 3 : e < 1 << 28 ? 4 : 5 }), (f.zigZagEncode32 = function (e) { return (((e |= 0) << 1) ^ (e >> 31)) >>> 0 }), (f.zigZagDecode32 = function (e) { return ((e >>> 1) ^ -(1 & e)) | 0 }), (a.writeVarint32 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal value: ' + e + ' (not an integer)') if (((e |= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } var n, r = f.calculateVarint32(e) t += r var o = this.buffer.byteLength for (o < t && this.resize((o *= 2) > t ? o : t), t -= r, e >>>= 0; 128 <= e; ) (n = (127 & e) | 128), (this.view[t++] = n), (e >>>= 7) return (this.view[t++] = e), i ? ((this.offset = t), this) : r }), (a.writeVarint32ZigZag = function (e, t) { return this.writeVarint32(f.zigZagEncode32(e), t) }), (a.readVarint32 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 1 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+1) <= ' + this.buffer.byteLength) } var i, n = 0, r = 0 do { if (!this.noAssert && e > this.limit) { var o = Error('Truncated') throw ((o.truncated = !0), o) } ;(i = this.view[e++]), n < 5 && (r |= (127 & i) << (7 * n)), ++n } while (0 != (128 & i)) return ( (r |= 0), t ? ((this.offset = e), r) : { value: r, length: n } ) }), (a.readVarint32ZigZag = function (e) { var t = this.readVarint32(e) return 'object' == typeof t ? (t.value = f.zigZagDecode32(t.value)) : (t = f.zigZagDecode32(t)), t }), l && ((f.MAX_VARINT64_BYTES = 10), (f.calculateVarint64 = function (e) { 'number' == typeof e ? (e = l.fromNumber(e)) : 'string' == typeof e && (e = l.fromString(e)) var t = e.toInt() >>> 0, i = e.shiftRightUnsigned(28).toInt() >>> 0, n = e.shiftRightUnsigned(56).toInt() >>> 0 return 0 == n ? (0 == i ? (t < 16384 ? (t < 128 ? 1 : 2) : t < 1 << 21 ? 3 : 4) : i < 16384 ? (i < 128 ? 5 : 6) : i < 1 << 21 ? 7 : 8) : n < 128 ? 9 : 10 }), (f.zigZagEncode64 = function (e) { return ( 'number' == typeof e ? (e = l.fromNumber(e, !1)) : 'string' == typeof e ? (e = l.fromString(e, !1)) : !1 !== e.unsigned && (e = e.toSigned()), e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned() ) }), (f.zigZagDecode64 = function (e) { return ( 'number' == typeof e ? (e = l.fromNumber(e, !1)) : 'string' == typeof e ? (e = l.fromString(e, !1)) : !1 !== e.unsigned && (e = e.toSigned()), e.shiftRightUnsigned(1).xor(e.and(l.ONE).toSigned().negate()).toSigned() ) }), (a.writeVarint64 = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' == typeof e) e = l.fromNumber(e) else if ('string' == typeof e) e = l.fromString(e) else if (!(e && e instanceof l)) throw TypeError('Illegal value: ' + e + ' (not an integer or Long)') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } 'number' == typeof e ? (e = l.fromNumber(e, !1)) : 'string' == typeof e ? (e = l.fromString(e, !1)) : !1 !== e.unsigned && (e = e.toSigned()) var n = f.calculateVarint64(e), r = e.toInt() >>> 0, o = e.shiftRightUnsigned(28).toInt() >>> 0, a = e.shiftRightUnsigned(56).toInt() >>> 0 t += n var s = this.buffer.byteLength switch ((s < t && this.resize((s *= 2) > t ? s : t), (t -= n), n)) { case 10: this.view[t + 9] = (a >>> 7) & 1 case 9: this.view[t + 8] = 9 !== n ? 128 | a : 127 & a case 8: this.view[t + 7] = 8 !== n ? (o >>> 21) | 128 : (o >>> 21) & 127 case 7: this.view[t + 6] = 7 !== n ? (o >>> 14) | 128 : (o >>> 14) & 127 case 6: this.view[t + 5] = 6 !== n ? (o >>> 7) | 128 : (o >>> 7) & 127 case 5: this.view[t + 4] = 5 !== n ? 128 | o : 127 & o case 4: this.view[t + 3] = 4 !== n ? (r >>> 21) | 128 : (r >>> 21) & 127 case 3: this.view[t + 2] = 3 !== n ? (r >>> 14) | 128 : (r >>> 14) & 127 case 2: this.view[t + 1] = 2 !== n ? (r >>> 7) | 128 : (r >>> 7) & 127 case 1: this.view[t] = 1 !== n ? 128 | r : 127 & r } return i ? ((this.offset += n), this) : n }), (a.writeVarint64ZigZag = function (e, t) { return this.writeVarint64(f.zigZagEncode64(e), t) }), (a.readVarint64 = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 1 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+1) <= ' + this.buffer.byteLength) } var i = e, n = 0, r = 0, o = 0, a = 0 if ( ((n = 127 & (a = this.view[e++])), 128 & a && ((n |= (127 & (a = this.view[e++])) << 7), (128 & a || (this.noAssert && void 0 === a)) && ((n |= (127 & (a = this.view[e++])) << 14), (128 & a || (this.noAssert && void 0 === a)) && ((n |= (127 & (a = this.view[e++])) << 21), (128 & a || (this.noAssert && void 0 === a)) && ((r = 127 & (a = this.view[e++])), (128 & a || (this.noAssert && void 0 === a)) && ((r |= (127 & (a = this.view[e++])) << 7), (128 & a || (this.noAssert && void 0 === a)) && ((r |= (127 & (a = this.view[e++])) << 14), (128 & a || (this.noAssert && void 0 === a)) && ((r |= (127 & (a = this.view[e++])) << 21), (128 & a || (this.noAssert && void 0 === a)) && ((o = 127 & (a = this.view[e++])), (128 & a || (this.noAssert && void 0 === a)) && ((o |= (127 & (a = this.view[e++])) << 7), 128 & a || (this.noAssert && void 0 === a))))))))))) ) throw Error('Buffer overrun') var s = l.fromBits(n | (r << 28), (r >>> 4) | (o << 24), !1) return t ? ((this.offset = e), s) : { value: s, length: e - i } }), (a.readVarint64ZigZag = function (e) { var t = this.readVarint64(e) return t && t.value instanceof l ? (t.value = f.zigZagDecode64(t.value)) : (t = f.zigZagDecode64(t)), t })), (a.writeCString = function (e, t) { var i = void 0 === t i && (t = this.offset) var n, r = e.length if (!this.noAssert) { if ('string' != typeof e) throw TypeError('Illegal str: Not a string') for (n = 0; n < r; ++n) if (0 === e.charCodeAt(n)) throw RangeError('Illegal str: Contains NULL-characters') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } ;(r = d.calculateUTF16asUTF8(s(e))[1]), (t += r + 1) var o = this.buffer.byteLength return ( o < t && this.resize((o *= 2) > t ? o : t), (t -= r + 1), d.encodeUTF16toUTF8( s(e), function (e) { this.view[t++] = e }.bind(this) ), (this.view[t++] = 0), i ? ((this.offset = t), this) : r ) }), (a.readCString = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 1 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+1) <= ' + this.buffer.byteLength) } var i, n = e, r = -1 return ( d.decodeUTF8toUTF16( function () { if (0 === r) return null if (e >= this.limit) throw RangeError('Illegal range: Truncated data, ' + e + ' < ' + this.limit) return 0 === (r = this.view[e++]) ? null : r }.bind(this), (i = c()), !0 ), t ? ((this.offset = e), i()) : { string: i(), length: e - n } ) }), (a.writeIString = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('string' != typeof e) throw TypeError('Illegal str: Not a string') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } var n, r = t ;(n = d.calculateUTF16asUTF8(s(e), this.noAssert)[1]), (t += 4 + n) var o = this.buffer.byteLength if ( (o < t && this.resize((o *= 2) > t ? o : t), (t -= 4 + n), this.littleEndian ? ((this.view[t + 3] = (n >>> 24) & 255), (this.view[t + 2] = (n >>> 16) & 255), (this.view[t + 1] = (n >>> 8) & 255), (this.view[t] = 255 & n)) : ((this.view[t] = (n >>> 24) & 255), (this.view[t + 1] = (n >>> 16) & 255), (this.view[t + 2] = (n >>> 8) & 255), (this.view[t + 3] = 255 & n)), (t += 4), d.encodeUTF16toUTF8( s(e), function (e) { this.view[t++] = e }.bind(this) ), t !== r + 4 + n) ) throw RangeError('Illegal range: Truncated data, ' + t + ' == ' + (t + 4 + n)) return i ? ((this.offset = t), this) : t - r }), (a.readIString = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 4 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+4) <= ' + this.buffer.byteLength) } var i = e, n = this.readUint32(e), r = this.readUTF8String(n, f.METRICS_BYTES, (e += 4)) return ( (e += r.length), t ? ((this.offset = e), r.string) : { string: r.string, length: e - i } ) }), (f.METRICS_CHARS = 'c'), (f.METRICS_BYTES = 'b'), (a.writeUTF8String = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } var n, r = t ;(n = d.calculateUTF16asUTF8(s(e))[1]), (t += n) var o = this.buffer.byteLength return ( o < t && this.resize((o *= 2) > t ? o : t), (t -= n), d.encodeUTF16toUTF8( s(e), function (e) { this.view[t++] = e }.bind(this) ), i ? ((this.offset = t), this) : t - r ) }), (a.writeString = a.writeUTF8String), (f.calculateUTF8Chars = function (e) { return d.calculateUTF16asUTF8(s(e))[0] }), (f.calculateUTF8Bytes = function (e) { return d.calculateUTF16asUTF8(s(e))[1] }), (f.calculateString = f.calculateUTF8Bytes), (a.readUTF8String = function (e, t, i) { 'number' == typeof t && ((i = t), (t = void 0)) var n = void 0 === i if ((n && (i = this.offset), void 0 === t && (t = f.METRICS_CHARS), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal length: ' + e + ' (not an integer)') if (((e |= 0), 'number' != typeof i || i % 1 != 0)) throw TypeError('Illegal offset: ' + i + ' (not an integer)') if ((i >>>= 0) < 0 || i + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + i + ' (+0) <= ' + this.buffer.byteLength) } var r, o = 0, a = i if (t === f.METRICS_CHARS) { if ( ((r = c()), d.decodeUTF8( function () { return o < e && i < this.limit ? this.view[i++] : null }.bind(this), function (e) { ++o, d.UTF8toUTF16(e, r) } ), o !== e) ) throw RangeError('Illegal range: Truncated data, ' + o + ' == ' + e) return n ? ((this.offset = i), r()) : { string: r(), length: i - a } } if (t !== f.METRICS_BYTES) throw TypeError('Unsupported metrics: ' + t) if (!this.noAssert) { if ('number' != typeof i || i % 1 != 0) throw TypeError('Illegal offset: ' + i + ' (not an integer)') if ((i >>>= 0) < 0 || i + e > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + i + ' (+' + e + ') <= ' + this.buffer.byteLength) } var s = i + e if ( (d.decodeUTF8toUTF16( function () { return i < s ? this.view[i++] : null }.bind(this), (r = c()), this.noAssert ), i !== s) ) throw RangeError('Illegal range: Truncated data, ' + i + ' == ' + s) return n ? ((this.offset = i), r()) : { string: r(), length: i - a } }), (a.readString = a.readUTF8String), (a.writeVString = function (e, t) { var i = void 0 === t if ((i && (t = this.offset), !this.noAssert)) { if ('string' != typeof e) throw TypeError('Illegal str: Not a string') if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: ' + t + ' (not an integer)') if ((t >>>= 0) < 0 || t + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + t + ' (+0) <= ' + this.buffer.byteLength) } var n, r, o = t ;(n = d.calculateUTF16asUTF8(s(e), this.noAssert)[1]), (r = f.calculateVarint32(n)), (t += r + n) var a = this.buffer.byteLength if ( (a < t && this.resize((a *= 2) > t ? a : t), (t -= r + n), (t += this.writeVarint32(n, t)), d.encodeUTF16toUTF8( s(e), function (e) { this.view[t++] = e }.bind(this) ), t !== o + n + r) ) throw RangeError('Illegal range: Truncated data, ' + t + ' == ' + (t + n + r)) return i ? ((this.offset = t), this) : t - o }), (a.readVString = function (e) { var t = void 0 === e if ((t && (e = this.offset), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 1 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+1) <= ' + this.buffer.byteLength) } var i = e, n = this.readVarint32(e), r = this.readUTF8String(n.value, f.METRICS_BYTES, (e += n.length)) return ( (e += r.length), t ? ((this.offset = e), r.string) : { string: r.string, length: e - i } ) }), (a.append = function (e, t, i) { ;('number' != typeof t && 'string' == typeof t) || ((i = t), (t = void 0)) var n = void 0 === i if ((n && (i = this.offset), !this.noAssert)) { if ('number' != typeof i || i % 1 != 0) throw TypeError('Illegal offset: ' + i + ' (not an integer)') if ((i >>>= 0) < 0 || i + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + i + ' (+0) <= ' + this.buffer.byteLength) } e instanceof f || (e = f.wrap(e, t)) var r = e.limit - e.offset if (r <= 0) return this i += r var o = this.buffer.byteLength return o < i && this.resize((o *= 2) > i ? o : i), (i -= r), this.view.set(e.view.subarray(e.offset, e.limit), i), (e.offset += r), n && (this.offset += r), this }), (a.appendTo = function (e, t) { return e.append(this, t), this }), (a.assert = function (e) { return (this.noAssert = !e), this }), (a.capacity = function () { return this.buffer.byteLength }), (a.clear = function () { return (this.offset = 0), (this.limit = this.buffer.byteLength), (this.markedOffset = -1), this }), (a.clone = function (e) { var t = new f(0, this.littleEndian, this.noAssert) return ( e ? ((t.buffer = new ArrayBuffer(this.buffer.byteLength)), (t.view = new Uint8Array(t.buffer))) : ((t.buffer = this.buffer), (t.view = this.view)), (t.offset = this.offset), (t.markedOffset = this.markedOffset), (t.limit = this.limit), t ) }), (a.compact = function (e, t) { if ((void 0 === e && (e = this.offset), void 0 === t && (t = this.limit), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal begin: Not an integer') if (((e >>>= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal end: Not an integer') if (((t >>>= 0), e < 0 || t < e || t > this.buffer.byteLength)) throw RangeError('Illegal range: 0 <= ' + e + ' <= ' + t + ' <= ' + this.buffer.byteLength) } if (0 === e && t === this.buffer.byteLength) return this var i = t - e if (0 == i) return (this.buffer = o), (this.view = null), 0 <= this.markedOffset && (this.markedOffset -= e), (this.offset = 0), (this.limit = 0), this var n = new ArrayBuffer(i), r = new Uint8Array(n) return r.set(this.view.subarray(e, t)), (this.buffer = n), (this.view = r), 0 <= this.markedOffset && (this.markedOffset -= e), (this.offset = 0), (this.limit = i), this }), (a.copy = function (e, t) { if ((void 0 === e && (e = this.offset), void 0 === t && (t = this.limit), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal begin: Not an integer') if (((e >>>= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal end: Not an integer') if (((t >>>= 0), e < 0 || t < e || t > this.buffer.byteLength)) throw RangeError('Illegal range: 0 <= ' + e + ' <= ' + t + ' <= ' + this.buffer.byteLength) } if (e === t) return new f(0, this.littleEndian, this.noAssert) var i = t - e, n = new f(i, this.littleEndian, this.noAssert) return (n.offset = 0), (n.limit = i), 0 <= n.markedOffset && (n.markedOffset -= e), this.copyTo(n, 0, e, t), n }), (a.copyTo = function (e, t, i, n) { var r, o if (!this.noAssert && !f.isByteBuffer(e)) throw TypeError('Illegal target: Not a ByteBuffer') if (((t = (o = void 0 === t) ? e.offset : 0 | t), (i = (r = void 0 === i) ? this.offset : 0 | i), (n = void 0 === n ? this.limit : 0 | n), t < 0 || t > e.buffer.byteLength)) throw RangeError('Illegal target range: 0 <= ' + t + ' <= ' + e.buffer.byteLength) if (i < 0 || n > this.buffer.byteLength) throw RangeError('Illegal source range: 0 <= ' + i + ' <= ' + this.buffer.byteLength) var a = n - i return 0 == a ? e : (e.ensureCapacity(t + a), e.view.set(this.view.subarray(i, n), t), r && (this.offset += a), o && (e.offset += a), this) }), (a.ensureCapacity = function (e) { var t = this.buffer.byteLength return t < e ? this.resize((t *= 2) > e ? t : e) : this }), (a.fill = function (e, t, i) { var n = void 0 === t if ((n && (t = this.offset), 'string' == typeof e && 0 < e.length && (e = e.charCodeAt(0)), void 0 === t && (t = this.offset), void 0 === i && (i = this.limit), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal value: ' + e + ' (not an integer)') if (((e |= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal begin: Not an integer') if (((t >>>= 0), 'number' != typeof i || i % 1 != 0)) throw TypeError('Illegal end: Not an integer') if (((i >>>= 0), t < 0 || i < t || i > this.buffer.byteLength)) throw RangeError('Illegal range: 0 <= ' + t + ' <= ' + i + ' <= ' + this.buffer.byteLength) } if (i <= t) return this for (; t < i; ) this.view[t++] = e return n && (this.offset = t), this }), (a.flip = function () { return (this.limit = this.offset), (this.offset = 0), this }), (a.mark = function (e) { if (((e = void 0 === e ? this.offset : e), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal offset: ' + e + ' (not an integer)') if ((e >>>= 0) < 0 || e + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + e + ' (+0) <= ' + this.buffer.byteLength) } return (this.markedOffset = e), this }), (a.order = function (e) { if (!this.noAssert && 'boolean' != typeof e) throw TypeError('Illegal littleEndian: Not a boolean') return (this.littleEndian = !!e), this }), (a.LE = function (e) { return (this.littleEndian = void 0 === e || !!e), this }), (a.BE = function (e) { return (this.littleEndian = void 0 !== e && !e), this }), (a.prepend = function (e, t, i) { ;('number' != typeof t && 'string' == typeof t) || ((i = t), (t = void 0)) var n = void 0 === i if ((n && (i = this.offset), !this.noAssert)) { if ('number' != typeof i || i % 1 != 0) throw TypeError('Illegal offset: ' + i + ' (not an integer)') if ((i >>>= 0) < 0 || i + 0 > this.buffer.byteLength) throw RangeError('Illegal offset: 0 <= ' + i + ' (+0) <= ' + this.buffer.byteLength) } e instanceof f || (e = f.wrap(e, t)) var r = e.limit - e.offset if (r <= 0) return this var o = r - i if (0 < o) { var a = new ArrayBuffer(this.buffer.byteLength + o), s = new Uint8Array(a) s.set(this.view.subarray(i, this.buffer.byteLength), r), (this.buffer = a), (this.view = s), (this.offset += o), 0 <= this.markedOffset && (this.markedOffset += o), (this.limit += o), (i += o) } else new Uint8Array(this.buffer) return this.view.set(e.view.subarray(e.offset, e.limit), i - r), (e.offset = e.limit), n && (this.offset -= r), this }), (a.prependTo = function (e, t) { return e.prepend(this, t), this }), (a.printDebug = function (e) { 'function' != typeof e && (e = console.log.bind(console)), e(this.toString() + '\n-------------------------------------------------------------------\n' + this.toDebug(!0)) }), (a.remaining = function () { return this.limit - this.offset }), (a.reset = function () { return 0 <= this.markedOffset ? ((this.offset = this.markedOffset), (this.markedOffset = -1)) : (this.offset = 0), this }), (a.resize = function (e) { if (!this.noAssert) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal capacity: ' + e + ' (not an integer)') if ((e |= 0) < 0) throw RangeError('Illegal capacity: 0 <= ' + e) } if (this.buffer.byteLength < e) { var t = new ArrayBuffer(e), i = new Uint8Array(t) i.set(this.view), (this.buffer = t), (this.view = i) } return this }), (a.reverse = function (e, t) { if ((void 0 === e && (e = this.offset), void 0 === t && (t = this.limit), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal begin: Not an integer') if (((e >>>= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal end: Not an integer') if (((t >>>= 0), e < 0 || t < e || t > this.buffer.byteLength)) throw RangeError('Illegal range: 0 <= ' + e + ' <= ' + t + ' <= ' + this.buffer.byteLength) } return e === t || Array.prototype.reverse.call(this.view.subarray(e, t)), this }), (a.skip = function (e) { if (!this.noAssert) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal length: ' + e + ' (not an integer)') e |= 0 } var t = this.offset + e if (!this.noAssert && (t < 0 || t > this.buffer.byteLength)) throw RangeError('Illegal length: 0 <= ' + this.offset + ' + ' + e + ' <= ' + this.buffer.byteLength) return (this.offset = t), this }), (a.slice = function (e, t) { if ((void 0 === e && (e = this.offset), void 0 === t && (t = this.limit), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal begin: Not an integer') if (((e >>>= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal end: Not an integer') if (((t >>>= 0), e < 0 || t < e || t > this.buffer.byteLength)) throw RangeError('Illegal range: 0 <= ' + e + ' <= ' + t + ' <= ' + this.buffer.byteLength) } var i = this.clone() return (i.offset = e), (i.limit = t), i }), (a.toBuffer = function (e) { var t = this.offset, i = this.limit if (!this.noAssert) { if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal offset: Not an integer') if (((t >>>= 0), 'number' != typeof i || i % 1 != 0)) throw TypeError('Illegal limit: Not an integer') if (((i >>>= 0), t < 0 || i < t || i > this.buffer.byteLength)) throw RangeError('Illegal range: 0 <= ' + t + ' <= ' + i + ' <= ' + this.buffer.byteLength) } if (!e && 0 === t && i === this.buffer.byteLength) return this.buffer if (t === i) return o var n = new ArrayBuffer(i - t) return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(t, i), 0), n }), (a.toArrayBuffer = a.toBuffer), (a.toString = function (e, t, i) { if (void 0 === e) return 'ByteBufferAB(offset=' + this.offset + ',markedOffset=' + this.markedOffset + ',limit=' + this.limit + ',capacity=' + this.capacity() + ')' switch (('number' == typeof e && (i = t = e = 'utf8'), e)) { case 'utf8': return this.toUTF8(t, i) case 'base64': return this.toBase64(t, i) case 'hex': return this.toHex(t, i) case 'binary': return this.toBinary(t, i) case 'debug': return this.toDebug() case 'columns': return this.toColumns() default: throw Error('Unsupported encoding: ' + e) } }) var h = (function () { for ( var e = {}, r = [ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 ], a = [], t = 0, i = r.length; t < i; ++t ) a[r[t]] = t return ( (e.encode = function (e, t) { for (var i, n; null !== (i = e()); ) t(r[(i >> 2) & 63]), (n = (3 & i) << 4), null !== (i = e()) ? (t(r[63 & ((n |= (i >> 4) & 15) | ((i >> 4) & 15))]), (n = (15 & i) << 2), null !== (i = e()) ? (t(r[63 & (n | ((i >> 6) & 3))]), t(r[63 & i])) : (t(r[63 & n]), t(61))) : (t(r[63 & n]), t(61), t(61)) }), (e.decode = function (e, t) { function i(e) { throw Error('Illegal character code: ' + e) } for (var n, r, o; null !== (n = e()); ) if ((void 0 === (r = a[n]) && i(n), null !== (n = e()) && (void 0 === (o = a[n]) && i(n), t(((r << 2) >>> 0) | ((48 & o) >> 4)), null !== (n = e())))) { if (void 0 === (r = a[n])) { if (61 === n) break i(n) } if ((t((((15 & o) << 4) >>> 0) | ((60 & r) >> 2)), null !== (n = e()))) { if (void 0 === (o = a[n])) { if (61 === n) break i(n) } t((((3 & r) << 6) >>> 0) | o) } } }), (e.test = function (e) { return /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e) }), e ) })() ;(a.toBase64 = function (e, t) { if ((void 0 === e && (e = this.offset), void 0 === t && (t = this.limit), (t |= 0), (e |= 0) < 0 || t > this.capacity || t < e)) throw RangeError('begin, end') var i return ( h.encode( function () { return e < t ? this.view[e++] : null }.bind(this), (i = c()) ), i() ) }), (f.fromBase64 = function (e, t) { if ('string' != typeof e) throw TypeError('str') var i = new f((e.length / 4) * 3, t), n = 0 return ( h.decode(s(e), function (e) { i.view[n++] = e }), (i.limit = n), i ) }), (f.btoa = function (e) { return f.fromBinary(e).toBase64() }), (f.atob = function (e) { return f.fromBase64(e).toBinary() }), (a.toBinary = function (e, t) { if ((void 0 === e && (e = this.offset), void 0 === t && (t = this.limit), (t |= 0), (e |= 0) < 0 || t > this.capacity() || t < e)) throw RangeError('begin, end') if (e === t) return '' for (var i = [], n = []; e < t; ) i.push(this.view[e++]), 1024 <= i.length && (n.push(String.fromCharCode.apply(String, i)), (i = [])) return n.join('') + String.fromCharCode.apply(String, i) }), (f.fromBinary = function (e, t) { if ('string' != typeof e) throw TypeError('str') for (var i, n = 0, r = e.length, o = new f(r, t); n < r; ) { if (255 < (i = e.charCodeAt(n))) throw RangeError('illegal char code: ' + i) o.view[n++] = i } return (o.limit = r), o }), (a.toDebug = function (e) { for (var t, i = -1, n = this.buffer.byteLength, r = '', o = '', a = ''; i < n; ) { if ( (-1 !== i && ((r += (t = this.view[i]) < 16 ? '0' + t.toString(16).toUpperCase() : t.toString(16).toUpperCase()), e && (o += 32 < t && t < 127 ? String.fromCharCode(t) : '.')), ++i, e && 0 < i && i % 16 == 0 && i !== n) ) { for (; r.length < 51; ) r += ' ' ;(a += r + o + '\n'), (r = o = '') } r += i === this.offset && i === this.limit ? i === this.markedOffset ? '!' : '|' : i === this.offset ? i === this.markedOffset ? '[' : '<' : i === this.limit ? i === this.markedOffset ? ']' : '>' : i === this.markedOffset ? "'" : e || (0 !== i && i !== n) ? ' ' : '' } if (e && ' ' !== r) { for (; r.length < 51; ) r += ' ' a += r + o + '\n' } return e ? a : r }), (f.fromDebug = function (e, t, i) { for (var n, r, o = e.length, a = new f(((o + 1) / 3) | 0, t, i), s = 0, l = 0, c = !1, h = !1, u = !1, d = !1, p = !1; s < o; ) { switch ((n = e.charAt(s++))) { case '!': if (!i) { if (h || u || d) { p = !0 break } h = u = d = !0 } ;(a.offset = a.markedOffset = a.limit = l), (c = !1) break case '|': if (!i) { if (h || d) { p = !0 break } h = d = !0 } ;(a.offset = a.limit = l), (c = !1) break case '[': if (!i) { if (h || u) { p = !0 break } h = u = !0 } ;(a.offset = a.markedOffset = l), (c = !1) break case '<': if (!i) { if (h) { p = !0 break } h = !0 } ;(a.offset = l), (c = !1) break case ']': if (!i) { if (d || u) { p = !0 break } d = u = !0 } ;(a.limit = a.markedOffset = l), (c = !1) break case '>': if (!i) { if (d) { p = !0 break } d = !0 } ;(a.limit = l), (c = !1) break case "'": if (!i) { if (u) { p = !0 break } u = !0 } ;(a.markedOffset = l), (c = !1) break case ' ': c = !1 break default: if (!i && c) { p = !0 break } if (((r = parseInt(n + e.charAt(s++), 16)), !i && (isNaN(r) || r < 0 || 255 < r))) throw TypeError('Illegal str: Not a debug encoded string') ;(a.view[l++] = r), (c = !0) } if (p) throw TypeError('Illegal str: Invalid symbol at ' + s) } if (!i) { if (!h || !d) throw TypeError('Illegal str: Missing offset or limit') if (l < a.buffer.byteLength) throw TypeError('Illegal str: Not a debug encoded string (is it hex?) ' + l + ' < ' + o) } return a }), (a.toHex = function (e, t) { if (((e = void 0 === e ? this.offset : e), (t = void 0 === t ? this.limit : t), !this.noAssert)) { if ('number' != typeof e || e % 1 != 0) throw TypeError('Illegal begin: Not an integer') if (((e >>>= 0), 'number' != typeof t || t % 1 != 0)) throw TypeError('Illegal end: Not an integer') if (((t >>>= 0), e < 0 || t < e || t > this.buffer.byteLength)) throw RangeError('Illegal range: 0 <= ' + e + ' <= ' + t + ' <= ' + this.buffer.byteLength) } for (var i, n = new Array(t - e); e < t; ) (i = this.view[e++]) < 16 ? n.push('0', i.toString(16)) : n.push(i.toString(16)) return n.join('') }), (f.fromHex = function (e, t, i) { if (!i) { if ('string' != typeof e) throw TypeError('Illegal str: Not a string') if (e.length % 2 != 0) throw TypeError('Illegal str: Length not a multiple of 2') } for (var n, r = e.length, o = new f((r / 2) | 0, t), a = 0, s = 0; a < r; a += 2) { if (((n = parseInt(e.substring(a, a + 2), 16)), !i && (!isFinite(n) || n < 0 || 255 < n))) throw TypeError('Illegal str: Contains non-hex characters') o.view[s++] = n } return (o.limit = s), o }) var u, d = (u = { MAX_CODEPOINT: 1114111, encodeUTF8: function (e, t) { var i = null for ( 'number' == typeof e && ((i = e), (e = function () { return null })); null !== i || null !== (i = e()); ) i < 128 ? t(127 & i) : (i < 2048 ? t(((i >> 6) & 31) | 192) : (i < 65536 ? t(((i >> 12) & 15) | 224) : (t(((i >> 18) & 7) | 240), t(((i >> 12) & 63) | 128)), t(((i >> 6) & 63) | 128)), t((63 & i) | 128)), (i = null) }, decodeUTF8: function (e, t) { for ( var i, n, r, o, a = function (e) { e = e.slice(0, e.indexOf(null)) var t = Error(e.toString()) throw ((t.name = 'TruncatedError'), (t.bytes = e), t) }; null !== (i = e()); ) if (0 == (128 & i)) t(i) else if (192 == (224 & i)) null === (n = e()) && a([i, n]), t(((31 & i) << 6) | (63 & n)) else if (224 == (240 & i)) (null !== (n = e()) && null !== (r = e())) || a([i, n, r]), t(((15 & i) << 12) | ((63 & n) << 6) | (63 & r)) else { if (240 != (248 & i)) throw RangeError('Illegal starting byte: ' + i) ;(null !== (n = e()) && null !== (r = e()) && null !== (o = e())) || a([i, n, r, o]), t(((7 & i) << 18) | ((63 & n) << 12) | ((63 & r) << 6) | (63 & o)) } }, UTF16toUTF8: function (e, t) { for (var i, n = null; null !== (i = null !== n ? n : e()); ) 55296 <= i && i <= 57343 && null !== (n = e()) && 56320 <= n && n <= 57343 ? (t(1024 * (i - 55296) + n - 56320 + 65536), (n = null)) : t(i) null !== n && t(n) }, UTF8toUTF16: function (e, t) { var i = null for ( 'number' == typeof e && ((i = e), (e = function () { return null })); null !== i || null !== (i = e()); ) i <= 65535 ? t(i) : (t(55296 + ((i -= 65536) >> 10)), t((i % 1024) + 56320)), (i = null) }, encodeUTF16toUTF8: function (e, t) { u.UTF16toUTF8(e, function (e) { u.encodeUTF8(e, t) }) }, decodeUTF8toUTF16: function (e, t) { u.decodeUTF8(e, function (e) { u.UTF8toUTF16(e, t) }) }, calculateCodePoint: function (e) { return e < 128 ? 1 : e < 2048 ? 2 : e < 65536 ? 3 : 4 }, calculateUTF8: function (e) { for (var t, i = 0; null !== (t = e()); ) i += t < 128 ? 1 : t < 2048 ? 2 : t < 65536 ? 3 : 4 return i }, calculateUTF16asUTF8: function (e) { var t = 0, i = 0 return ( u.UTF16toUTF8(e, function (e) { ++t, (i += e < 128 ? 1 : e < 2048 ? 2 : e < 65536 ? 3 : 4) }), [t, i] ) } }) return ( (a.toUTF8 = function (t, i) { if ((void 0 === t && (t = this.offset), void 0 === i && (i = this.limit), !this.noAssert)) { if ('number' != typeof t || t % 1 != 0) throw TypeError('Illegal begin: Not an integer') if (((t >>>= 0), 'number' != typeof i || i % 1 != 0)) throw TypeError('Illegal end: Not an integer') if (((i >>>= 0), t < 0 || i < t || i > this.buffer.byteLength)) throw RangeError('Illegal range: 0 <= ' + t + ' <= ' + i + ' <= ' + this.buffer.byteLength) } var e try { d.decodeUTF8toUTF16( function () { return t < i ? this.view[t++] : null }.bind(this), (e = c()) ) } catch (e) { if (t !== i) throw RangeError('Illegal range: Truncated data, ' + t + ' != ' + i) } return e() }), (f.fromUTF8 = function (e, t, i) { if (!i && 'string' != typeof e) throw TypeError('Illegal str: Not a string') var n = new f(d.calculateUTF16asUTF8(s(e), !0)[1], t, i), r = 0 return ( d.encodeUTF16toUTF8(s(e), function (e) { n.view[r++] = e }), (n.limit = r), n ) }), f ) }), 'function' == typeof define && define.amd ? define(['long'], r) : 'function' == typeof t && 'object' == typeof e && e && e.exports ? (e.exports = (function () { var e try { e = t('long') } catch (e) {} return r(e) })()) : ((n.dcodeIO = n.dcodeIO || {}).ByteBuffer = r(n.dcodeIO.Long)) }, { long: 216 } ], 216: [ function (e, t, i) { var n, r ;(n = this), (r = function () { 'use strict' function n(e, t, i) { ;(this.low = 0 | e), (this.high = 0 | t), (this.unsigned = !!i) } function p(e) { return !0 === (e && e.__isLong__) } function e(e, t) { var i, n, r return t ? (r = 0 <= (e >>>= 0) && e < 256) && (n = a[e]) ? n : ((i = g(e, (0 | e) < 0 ? -1 : 0, !0)), r && (a[e] = i), i) : (r = -128 <= (e |= 0) && e < 128) && (n = o[e]) ? n : ((i = g(e, e < 0 ? -1 : 0, !1)), r && (o[e] = i), i) } function f(e, t) { if (isNaN(e) || !isFinite(e)) return t ? l : y if (t) { if (e < 0) return l if (r <= e) return I } else { if (e <= -s) return E if (s <= e + 1) return C } return e < 0 ? f(-e, t).neg() : g(e % i | 0, (e / i) | 0, t) } function g(e, t, i) { return new n(e, t, i) } function h(e, t, i) { if (0 === e.length) throw Error('empty string') if ('NaN' === e || 'Infinity' === e || '+Infinity' === e || '-Infinity' === e) return y if (((t = 'number' == typeof t ? ((i = t), !1) : !!t), (i = i || 10) < 2 || 36 < i)) throw RangeError('radix') var n if (0 < (n = e.indexOf('-'))) throw Error('interior hyphen') if (0 === n) return h(e.substring(1), t, i).neg() for (var r = f(u(i, 8)), o = y, a = 0; a < e.length; a += 8) { var s = Math.min(8, e.length - a), l = parseInt(e.substring(a, a + s), i) if (s < 8) { var c = f(u(i, s)) o = o.mul(c).add(f(l)) } else o = (o = o.mul(r)).add(f(l)) } return (o.unsigned = t), o } function m(e) { return e instanceof n ? e : 'number' == typeof e ? f(e) : 'string' == typeof e ? h(e) : g(e.low, e.high, e.unsigned) } Object.defineProperty(n.prototype, '__isLong__', { value: !0, enumerable: !1, configurable: !1 }), (n.isLong = p) var o = {}, a = {} ;(n.fromInt = e), (n.fromNumber = f), (n.fromBits = g) var u = Math.pow ;(n.fromString = h), (n.fromValue = m) var i = 4294967296, r = 0x10000000000000000, s = r / 2, v = e(1 << 24), y = e(0) n.ZERO = y var l = e(0, !0) n.UZERO = l var c = e(1) n.ONE = c var d = e(1, !0) n.UONE = d var A = e(-1) n.NEG_ONE = A var C = g(-1, 2147483647, !1) n.MAX_VALUE = C var I = g(-1, -1, !0) n.MAX_UNSIGNED_VALUE = I var E = g(0, -2147483648, !1) n.MIN_VALUE = E var t = n.prototype return ( (t.toInt = function () { return this.unsigned ? this.low >>> 0 : this.low }), (t.toNumber = function () { return this.unsigned ? (this.high >>> 0) * i + (this.low >>> 0) : this.high * i + (this.low >>> 0) }), (t.toString = function (e) { if ((e = e || 10) < 2 || 36 < e) throw RangeError('radix') if (this.isZero()) return '0' if (this.isNegative()) { if (this.eq(E)) { var t = f(e), i = this.div(t), n = i.mul(t).sub(this) return i.toString(e) + n.toInt().toString(e) } return '-' + this.neg().toString(e) } for (var r = f(u(e, 6), this.unsigned), o = this, a = ''; ; ) { var s = o.div(r), l = (o.sub(s.mul(r)).toInt() >>> 0).toString(e) if ((o = s).isZero()) return l + a for (; l.length < 6; ) l = '0' + l a = '' + l + a } }), (t.getHighBits = function () { return this.high }), (t.getHighBitsUnsigned = function () { return this.high >>> 0 }), (t.getLowBits = function () { return this.low }), (t.getLowBitsUnsigned = function () { return this.low >>> 0 }), (t.getNumBitsAbs = function () { if (this.isNegative()) return this.eq(E) ? 64 : this.neg().getNumBitsAbs() for (var e = 0 != this.high ? this.high : this.low, t = 31; 0 < t && 0 == (e & (1 << t)); t--); return 0 != this.high ? t + 33 : t + 1 }), (t.isZero = function () { return 0 === this.high && 0 === this.low }), (t.isNegative = function () { return !this.unsigned && this.high < 0 }), (t.isPositive = function () { return this.unsigned || 0 <= this.high }), (t.isOdd = function () { return 1 == (1 & this.low) }), (t.isEven = function () { return 0 == (1 & this.low) }), (t.equals = function (e) { return p(e) || (e = m(e)), (this.unsigned === e.unsigned || this.high >>> 31 != 1 || e.high >>> 31 != 1) && this.high === e.high && this.low === e.low }), (t.eq = t.equals), (t.notEquals = function (e) { return !this.eq(e) }), (t.neq = t.notEquals), (t.lessThan = function (e) { return this.comp(e) < 0 }), (t.lt = t.lessThan), (t.lessThanOrEqual = function (e) { return this.comp(e) <= 0 }), (t.lte = t.lessThanOrEqual), (t.greaterThan = function (e) { return 0 < this.comp(e) }), (t.gt = t.greaterThan), (t.greaterThanOrEqual = function (e) { return 0 <= this.comp(e) }), (t.gte = t.greaterThanOrEqual), (t.compare = function (e) { if ((p(e) || (e = m(e)), this.eq(e))) return 0 var t = this.isNegative(), i = e.isNegative() return t && !i ? -1 : !t && i ? 1 : this.unsigned ? e.high >>> 0 > this.high >>> 0 || (e.high === this.high && e.low >>> 0 > this.low >>> 0) ? -1 : 1 : this.sub(e).isNegative() ? -1 : 1 }), (t.comp = t.compare), (t.negate = function () { return !this.unsigned && this.eq(E) ? E : this.not().add(c) }), (t.neg = t.negate), (t.add = function (e) { p(e) || (e = m(e)) var t = this.high >>> 16, i = 65535 & this.high, n = this.low >>> 16, r = 65535 & this.low, o = e.high >>> 16, a = 65535 & e.high, s = e.low >>> 16, l = 0, c = 0, h = 0, u = 0 return ( (h += (u += r + (65535 & e.low)) >>> 16), (c += (h += n + s) >>> 16), (l += (c += i + a) >>> 16), (l += t + o), g(((h &= 65535) << 16) | (u &= 65535), ((l &= 65535) << 16) | (c &= 65535), this.unsigned) ) }), (t.subtract = function (e) { return p(e) || (e = m(e)), this.add(e.neg()) }), (t.sub = t.subtract), (t.multiply = function (e) { if (this.isZero()) return y if ((p(e) || (e = m(e)), e.isZero())) return y if (this.eq(E)) return e.isOdd() ? E : y if (e.eq(E)) return this.isOdd() ? E : y if (this.isNegative()) return e.isNegative() ? this.neg().mul(e.neg()) : this.neg().mul(e).neg() if (e.isNegative()) return this.mul(e.neg()).neg() if (this.lt(v) && e.lt(v)) return f(this.toNumber() * e.toNumber(), this.unsigned) var t = this.high >>> 16, i = 65535 & this.high, n = this.low >>> 16, r = 65535 & this.low, o = e.high >>> 16, a = 65535 & e.high, s = e.low >>> 16, l = 65535 & e.low, c = 0, h = 0, u = 0, d = 0 return ( (u += (d += r * l) >>> 16), (h += (u += n * l) >>> 16), (u &= 65535), (h += (u += r * s) >>> 16), (c += (h += i * l) >>> 16), (h &= 65535), (c += (h += n * s) >>> 16), (h &= 65535), (c += (h += r * a) >>> 16), (c += t * l + i * s + n * a + r * o), g(((u &= 65535) << 16) | (d &= 65535), ((c &= 65535) << 16) | (h &= 65535), this.unsigned) ) }), (t.mul = t.multiply), (t.divide = function (e) { if ((p(e) || (e = m(e)), e.isZero())) throw Error('division by zero') if (this.isZero()) return this.unsigned ? l : y var t, i, n if (this.unsigned) { if ((e.unsigned || (e = e.toUnsigned()), e.gt(this))) return l if (e.gt(this.shru(1))) return d n = l } else { if (this.eq(E)) return e.eq(c) || e.eq(A) ? E : e.eq(E) ? c : (t = this.shr(1).div(e).shl(1)).eq(y) ? (e.isNegative() ? c : A) : ((i = this.sub(e.mul(t))), (n = t.add(i.div(e)))) if (e.eq(E)) return this.unsigned ? l : y if (this.isNegative()) return e.isNegative() ? this.neg().div(e.neg()) : this.neg().div(e).neg() if (e.isNegative()) return this.div(e.neg()).neg() n = y } for (i = this; i.gte(e); ) { t = Math.max(1, Math.floor(i.toNumber() / e.toNumber())) for (var r = Math.ceil(Math.log(t) / Math.LN2), o = r <= 48 ? 1 : u(2, r - 48), a = f(t), s = a.mul(e); s.isNegative() || s.gt(i); ) s = (a = f((t -= o), this.unsigned)).mul(e) a.isZero() && (a = c), (n = n.add(a)), (i = i.sub(s)) } return n }), (t.div = t.divide), (t.modulo = function (e) { return p(e) || (e = m(e)), this.sub(this.div(e).mul(e)) }), (t.mod = t.modulo), (t.not = function () { return g(~this.low, ~this.high, this.unsigned) }), (t.and = function (e) { return p(e) || (e = m(e)), g(this.low & e.low, this.high & e.high, this.unsigned) }), (t.or = function (e) { return p(e) || (e = m(e)), g(this.low | e.low, this.high | e.high, this.unsigned) }), (t.xor = function (e) { return p(e) || (e = m(e)), g(this.low ^ e.low, this.high ^ e.high, this.unsigned) }), (t.shiftLeft = function (e) { return ( p(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? g(this.low << e, (this.high << e) | (this.low >>> (32 - e)), this.unsigned) : g(0, this.low << (e - 32), this.unsigned) ) }), (t.shl = t.shiftLeft), (t.shiftRight = function (e) { return ( p(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? g((this.low >>> e) | (this.high << (32 - e)), this.high >> e, this.unsigned) : g(this.high >> (e - 32), 0 <= this.high ? 0 : -1, this.unsigned) ) }), (t.shr = t.shiftRight), (t.shiftRightUnsigned = function (e) { if ((p(e) && (e = e.toInt()), 0 === (e &= 63))) return this var t = this.high return e < 32 ? g((this.low >>> e) | (t << (32 - e)), t >>> e, this.unsigned) : g(32 === e ? t : t >>> (e - 32), 0, this.unsigned) }), (t.shru = t.shiftRightUnsigned), (t.toSigned = function () { return this.unsigned ? g(this.low, this.high, !1) : this }), (t.toUnsigned = function () { return this.unsigned ? this : g(this.low, this.high, !0) }), (t.toBytes = function (e) { return e ? this.toBytesLE() : this.toBytesBE() }), (t.toBytesLE = function () { var e = this.high, t = this.low return [255 & t, (t >>> 8) & 255, (t >>> 16) & 255, (t >>> 24) & 255, 255 & e, (e >>> 8) & 255, (e >>> 16) & 255, (e >>> 24) & 255] }), (t.toBytesBE = function () { var e = this.high, t = this.low return [(e >>> 24) & 255, (e >>> 16) & 255, (e >>> 8) & 255, 255 & e, (t >>> 24) & 255, (t >>> 16) & 255, (t >>> 8) & 255, 255 & t] }), n ) }), 'function' == typeof define && define.amd ? define([], r) : 'function' == typeof e && 'object' == typeof t && t && t.exports ? (t.exports = r()) : ((n.dcodeIO = n.dcodeIO || {}).Long = r()) }, {} ], 217: [ function (e, t, i) { var n, r, o, a, s, l, c, h, u, d, p, f, g, m, v, y, A, C, I, E, _, b, w, T, x, S, M, R, P, O, L, D, N, F, B, V, k, U, H, z, G, W, j, Y, q, X, Z, K, Q, J, $, ee, te, ie, ne, re, oe, ae, se, le, ce, he, ue, de, pe, fe, ge, me, ve, ye, Ae, Ce, Ie, Ee, _e, be, we, Te, xe, Se, Me, Re, Pe, Oe, Le, De, Ne, Fe, Be, Ve, ke, Ue, He, ze, Ge, We, je, Ye, qe, Xe, Ze, Ke, Qe, Je, $e, et, tt, it, nt, rt, ot, at, st, lt, ct, ht, ut, dt, pt, ft, gt, mt, vt, yt, At, Ct, It, Et, _t, bt, wt, Tt, xt, St, Mt, Rt, Pt, Ot, Lt, Dt, Nt, Ft, Bt, Vt, kt, Ut, Ht, zt, Gt, Wt, jt, Yt, qt, Xt, Zt, Kt, Qt, Jt, $t, ei, ti, ii, ni, ri, oi, ai, si, li, ci, hi, ui, di, pi, fi, gi, mi, vi, yi, Ai, Ci = { REVISION: '75' } function Ii(e, t) { return e.distance - t.distance } function Ei(e, t, i, n) { if (!1 !== e.visible && (e.raycast(t, i), !0 === n)) for (var r = e.children, o = 0, a = r.length; o < a; o++) Ei(r[o], t, i, !0) } function _i(e, t, i) { return i < 0 && (i += 1), 1 < i && (i -= 1), i < 1 / 6 ? e + 6 * (t - e) * i : i < 0.5 ? t : i < 2 / 3 ? e + 6 * (t - e) * (2 / 3 - i) : e } function bi(e, t, i, n, r, o, a) { return Ci.Triangle.barycoordFromPoint(e, t, i, n, Vt), r.multiplyScalar(Vt.x), o.multiplyScalar(Vt.y), a.multiplyScalar(Vt.z), r.add(o).add(a), r.clone() } function wi(e, t, i, n, r, o, a) { var s = e.material if (null === (s.side === Ci.BackSide ? i.intersectTriangle(o, r, n, !0, a) : i.intersectTriangle(n, r, o, s.side !== Ci.DoubleSide, a))) return null Ut.copy(a), Ut.applyMatrix4(e.matrixWorld) var l = t.ray.origin.distanceTo(Ut) return l < t.near || l > t.far ? null : { distance: l, point: Ut.clone(), object: e } } function Ti(e, t, i, n, r, o, a, s) { Mt.fromArray(n, 3 * o), Rt.fromArray(n, 3 * a), Pt.fromArray(n, 3 * s) var l = wi(e, t, i, Mt, Rt, Pt, kt) return ( l && (r && (Nt.fromArray(r, 2 * o), Ft.fromArray(r, 2 * a), Bt.fromArray(r, 2 * s), (l.uv = bi(kt, Mt, Rt, Pt, Nt, Ft, Bt))), (l.face = new Ci.Face3(o, a, s, Ci.Triangle.normal(Mt, Rt, Pt))), (l.faceIndex = o)), l ) } function xi() {} function Si(e, t, i, n, r, o) { var a, s, l, c, h, u, d, p, f, g, m, v, y, A, C, I, E if (((s = e[o[t]].x), (l = e[o[t]].y), (c = e[o[i]].x), (h = e[o[i]].y), (u = e[o[n]].x), (d = e[o[n]].y), Number.EPSILON > (c - s) * (d - l) - (h - l) * (u - s))) return !1 for (g = u - c, m = d - h, v = s - u, y = l - d, A = c - s, C = h - l, a = 0; a < r; a++) if ( ((p = e[o[a]].x), (f = e[o[a]].y), !((p === s && f === l) || (p === c && f === h) || (p === u && f === d)) && ((I = A * (f - l) - C * (p - s)), (E = v * (f - d) - y * (p - u)), g * (f - h) - m * (p - c) >= -Number.EPSILON && E >= -Number.EPSILON && I >= -Number.EPSILON)) ) return !1 return !0 } function Mi(e) { switch (e) { case Ci.LinearEncoding: return ['Linear', '( value )'] case Ci.sRGBEncoding: return ['sRGB', '( value )'] case Ci.RGBEEncoding: return ['RGBE', '( value )'] case Ci.RGBM7Encoding: return ['RGBM', '( value, 7.0 )'] case Ci.RGBM16Encoding: return ['RGBM', '( value, 16.0 )'] case Ci.RGBDEncoding: return ['RGBD', '( value, 256.0 )'] case Ci.GammaEncoding: return ['Gamma', '( value, float( GAMMA_FACTOR ) )'] default: throw new Error('unsupported encoding: ' + e) } } function Ri(e, t) { var i = Mi(t) return 'vec4 ' + e + '( vec4 value ) { return ' + i[0] + 'ToLinear' + i[1] + '; }' } function Pi(e) { return '' !== e } function Oi(e, t) { return e .replace(/NUM_DIR_LIGHTS/g, t.numDirLights) .replace(/NUM_SPOT_LIGHTS/g, t.numSpotLights) .replace(/NUM_POINT_LIGHTS/g, t.numPointLights) .replace(/NUM_HEMI_LIGHTS/g, t.numHemiLights) } function Li(e) { return e.replace(/#include +<([\w\d.]+)>/g, function (e, t) { var i = Ci.ShaderChunk[t] if (void 0 === i) throw new Error('Can not resolve #include <' + t + '>') return Li(i) }) } function Di(e) { return e.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g, function (e, t, i, n) { for (var r = '', o = parseInt(t); o < parseInt(i); o++) r += n.replace(/\[ i \]/g, '[ ' + o + ' ]') return r }) } function Ni(e, t, i, n) { gi.set(t, i, n).unproject(mi) var r = fi[e] if (void 0 !== r) for (var o = 0, a = r.length; o < a; o++) pi.vertices[r[o]].copy(gi) } 'function' == typeof define && define.amd ? define('three', Ci) : void 0 !== i && void 0 !== t && (t.exports = Ci), void 0 === Number.EPSILON && (Number.EPSILON = Math.pow(2, -52)), void 0 === Math.sign && (Math.sign = function (e) { return e < 0 ? -1 : 0 < e ? 1 : +e }), void 0 === Function.prototype.name && void 0 !== Object.defineProperty && Object.defineProperty(Function.prototype, 'name', { get: function () { return this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1] } }), void 0 === Object.assign && Object.defineProperty(Object, 'assign', { writable: !0, configurable: !0, value: function (e) { 'use strict' if (null == e) throw new TypeError('Cannot convert first argument to object') for (var t = Object(e), i = 1, n = arguments.length; i !== n; ++i) { var r = arguments[i] if (null != r) { r = Object(r) for (var o = Object.keys(r), a = 0, s = o.length; a !== s; ++a) { var l = o[a], c = Object.getOwnPropertyDescriptor(r, l) void 0 !== c && c.enumerable && (t[l] = r[l]) } } } return t } }), (Ci.MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 }), (Ci.CullFaceNone = 0), (Ci.CullFaceBack = 1), (Ci.CullFaceFront = 2), (Ci.CullFaceFrontBack = 3), (Ci.FrontFaceDirectionCW = 0), (Ci.FrontFaceDirectionCCW = 1), (Ci.BasicShadowMap = 0), (Ci.PCFShadowMap = 1), (Ci.PCFSoftShadowMap = 2), (Ci.FrontSide = 0), (Ci.BackSide = 1), (Ci.DoubleSide = 2), (Ci.FlatShading = 1), (Ci.SmoothShading = 2), (Ci.NoColors = 0), (Ci.FaceColors = 1), (Ci.VertexColors = 2), (Ci.NoBlending = 0), (Ci.NormalBlending = 1), (Ci.AdditiveBlending = 2), (Ci.SubtractiveBlending = 3), (Ci.MultiplyBlending = 4), (Ci.CustomBlending = 5), (Ci.AddEquation = 100), (Ci.SubtractEquation = 101), (Ci.ReverseSubtractEquation = 102), (Ci.MinEquation = 103), (Ci.MaxEquation = 104), (Ci.ZeroFactor = 200), (Ci.OneFactor = 201), (Ci.SrcColorFactor = 202), (Ci.OneMinusSrcColorFactor = 203), (Ci.SrcAlphaFactor = 204), (Ci.OneMinusSrcAlphaFactor = 205), (Ci.DstAlphaFactor = 206), (Ci.OneMinusDstAlphaFactor = 207), (Ci.DstColorFactor = 208), (Ci.OneMinusDstColorFactor = 209), (Ci.SrcAlphaSaturateFactor = 210), (Ci.NeverDepth = 0), (Ci.AlwaysDepth = 1), (Ci.LessDepth = 2), (Ci.LessEqualDepth = 3), (Ci.EqualDepth = 4), (Ci.GreaterEqualDepth = 5), (Ci.GreaterDepth = 6), (Ci.NotEqualDepth = 7), (Ci.MultiplyOperation = 0), (Ci.MixOperation = 1), (Ci.AddOperation = 2), (Ci.NoToneMapping = 0), (Ci.LinearToneMapping = 1), (Ci.ReinhardToneMapping = 2), (Ci.Uncharted2ToneMapping = 3), (Ci.CineonToneMapping = 4), (Ci.UVMapping = 300), (Ci.CubeReflectionMapping = 301), (Ci.CubeRefractionMapping = 302), (Ci.EquirectangularReflectionMapping = 303), (Ci.EquirectangularRefractionMapping = 304), (Ci.SphericalReflectionMapping = 305), (Ci.CubeUVReflectionMapping = 306), (Ci.CubeUVRefractionMapping = 307), (Ci.RepeatWrapping = 1e3), (Ci.ClampToEdgeWrapping = 1001), (Ci.MirroredRepeatWrapping = 1002), (Ci.NearestFilter = 1003), (Ci.NearestMipMapNearestFilter = 1004), (Ci.NearestMipMapLinearFilter = 1005), (Ci.LinearFilter = 1006), (Ci.LinearMipMapNearestFilter = 1007), (Ci.LinearMipMapLinearFilter = 1008), (Ci.UnsignedByteType = 1009), (Ci.ByteType = 1010), (Ci.ShortType = 1011), (Ci.UnsignedShortType = 1012), (Ci.IntType = 1013), (Ci.UnsignedIntType = 1014), (Ci.FloatType = 1015), (Ci.HalfFloatType = 1025), (Ci.UnsignedShort4444Type = 1016), (Ci.UnsignedShort5551Type = 1017), (Ci.UnsignedShort565Type = 1018), (Ci.AlphaFormat = 1019), (Ci.RGBFormat = 1020), (Ci.RGBAFormat = 1021), (Ci.LuminanceFormat = 1022), (Ci.LuminanceAlphaFormat = 1023), (Ci.RGBEFormat = Ci.RGBAFormat), (Ci.RGB_S3TC_DXT1_Format = 2001), (Ci.RGBA_S3TC_DXT1_Format = 2002), (Ci.RGBA_S3TC_DXT3_Format = 2003), (Ci.RGBA_S3TC_DXT5_Format = 2004), (Ci.RGB_PVRTC_4BPPV1_Format = 2100), (Ci.RGB_PVRTC_2BPPV1_Format = 2101), (Ci.RGBA_PVRTC_4BPPV1_Format = 2102), (Ci.RGBA_PVRTC_2BPPV1_Format = 2103), (Ci.RGB_ETC1_Format = 2151), (Ci.LoopOnce = 2200), (Ci.LoopRepeat = 2201), (Ci.LoopPingPong = 2202), (Ci.InterpolateDiscrete = 2300), (Ci.InterpolateLinear = 2301), (Ci.InterpolateSmooth = 2302), (Ci.ZeroCurvatureEnding = 2400), (Ci.ZeroSlopeEnding = 2401), (Ci.WrapAroundEnding = 2402), (Ci.TrianglesDrawMode = 0), (Ci.TriangleStripDrawMode = 1), (Ci.TriangleFanDrawMode = 2), (Ci.LinearEncoding = 3e3), (Ci.sRGBEncoding = 3001), (Ci.GammaEncoding = 3007), (Ci.RGBEEncoding = 3002), (Ci.LogLuvEncoding = 3003), (Ci.RGBM7Encoding = 3004), (Ci.RGBM16Encoding = 3005), (Ci.RGBDEncoding = 3006), (Ci.Color = function (e) { return 3 === arguments.length ? this.fromArray(arguments) : this.set(e) }), (Ci.Color.prototype = { constructor: Ci.Color, r: 1, g: 1, b: 1, set: function (e) { return e instanceof Ci.Color ? this.copy(e) : 'number' == typeof e ? this.setHex(e) : 'string' == typeof e && this.setStyle(e), this }, setScalar: function (e) { ;(this.r = e), (this.g = e), (this.b = e) }, setHex: function (e) { return (e = Math.floor(e)), (this.r = ((e >> 16) & 255) / 255), (this.g = ((e >> 8) & 255) / 255), (this.b = (255 & e) / 255), this }, setRGB: function (e, t, i) { return (this.r = e), (this.g = t), (this.b = i), this }, setHSL: function (e, t, i) { if (((e = Ci.Math.euclideanModulo(e, 1)), (t = Ci.Math.clamp(t, 0, 1)), (i = Ci.Math.clamp(i, 0, 1)), 0 === t)) this.r = this.g = this.b = i else { var n = i <= 0.5 ? i * (1 + t) : i + t - i * t, r = 2 * i - n ;(this.r = _i(r, n, e + 1 / 3)), (this.g = _i(r, n, e)), (this.b = _i(r, n, e - 1 / 3)) } return this }, setStyle: function (t) { function e(e) { void 0 !== e && parseFloat(e) < 1 && console.warn('THREE.Color: Alpha component of ' + t + ' will be ignored.') } var i if ((i = /^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t))) { var n, r = i[1], o = i[2] switch (r) { case 'rgb': case 'rgba': if ((n = /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))) return (this.r = Math.min(255, parseInt(n[1], 10)) / 255), (this.g = Math.min(255, parseInt(n[2], 10)) / 255), (this.b = Math.min(255, parseInt(n[3], 10)) / 255), e(n[5]), this if ((n = /^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))) return (this.r = Math.min(100, parseInt(n[1], 10)) / 100), (this.g = Math.min(100, parseInt(n[2], 10)) / 100), (this.b = Math.min(100, parseInt(n[3], 10)) / 100), e(n[5]), this break case 'hsl': case 'hsla': if ((n = /^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))) { var a = parseFloat(n[1]) / 360, s = parseInt(n[2], 10) / 100, l = parseInt(n[3], 10) / 100 return e(n[5]), this.setHSL(a, s, l) } } } else if ((i = /^\#([A-Fa-f0-9]+)$/.exec(t))) { var c, h = (c = i[1]).length if (3 === h) return ( (this.r = parseInt(c.charAt(0) + c.charAt(0), 16) / 255), (this.g = parseInt(c.charAt(1) + c.charAt(1), 16) / 255), (this.b = parseInt(c.charAt(2) + c.charAt(2), 16) / 255), this ) if (6 === h) return ( (this.r = parseInt(c.charAt(0) + c.charAt(1), 16) / 255), (this.g = parseInt(c.charAt(2) + c.charAt(3), 16) / 255), (this.b = parseInt(c.charAt(4) + c.charAt(5), 16) / 255), this ) } t && 0 < t.length && (void 0 !== (c = Ci.ColorKeywords[t]) ? this.setHex(c) : console.warn('THREE.Color: Unknown color ' + t)) return this }, clone: function () { return new this.constructor(this.r, this.g, this.b) }, copy: function (e) { return (this.r = e.r), (this.g = e.g), (this.b = e.b), this }, copyGammaToLinear: function (e, t) { return void 0 === t && (t = 2), (this.r = Math.pow(e.r, t)), (this.g = Math.pow(e.g, t)), (this.b = Math.pow(e.b, t)), this }, copyLinearToGamma: function (e, t) { void 0 === t && (t = 2) var i = 0 < t ? 1 / t : 1 return (this.r = Math.pow(e.r, i)), (this.g = Math.pow(e.g, i)), (this.b = Math.pow(e.b, i)), this }, convertGammaToLinear: function () { var e = this.r, t = this.g, i = this.b return (this.r = e * e), (this.g = t * t), (this.b = i * i), this }, convertLinearToGamma: function () { return (this.r = Math.sqrt(this.r)), (this.g = Math.sqrt(this.g)), (this.b = Math.sqrt(this.b)), this }, getHex: function () { return ((255 * this.r) << 16) ^ ((255 * this.g) << 8) ^ ((255 * this.b) << 0) }, getHexString: function () { return ('000000' + this.getHex().toString(16)).slice(-6) }, getHSL: function (e) { var t, i, n = e || { h: 0, s: 0, l: 0 }, r = this.r, o = this.g, a = this.b, s = Math.max(r, o, a), l = Math.min(r, o, a), c = (l + s) / 2 if (l === s) i = t = 0 else { var h = s - l switch (((i = c <= 0.5 ? h / (s + l) : h / (2 - s - l)), s)) { case r: t = (o - a) / h + (o < a ? 6 : 0) break case o: t = (a - r) / h + 2 break case a: t = (r - o) / h + 4 } t /= 6 } return (n.h = t), (n.s = i), (n.l = c), n }, getStyle: function () { return 'rgb(' + ((255 * this.r) | 0) + ',' + ((255 * this.g) | 0) + ',' + ((255 * this.b) | 0) + ')' }, offsetHSL: function (e, t, i) { var n = this.getHSL() return (n.h += e), (n.s += t), (n.l += i), this.setHSL(n.h, n.s, n.l), this }, add: function (e) { return (this.r += e.r), (this.g += e.g), (this.b += e.b), this }, addColors: function (e, t) { return (this.r = e.r + t.r), (this.g = e.g + t.g), (this.b = e.b + t.b), this }, addScalar: function (e) { return (this.r += e), (this.g += e), (this.b += e), this }, multiply: function (e) { return (this.r *= e.r), (this.g *= e.g), (this.b *= e.b), this }, multiplyScalar: function (e) { return (this.r *= e), (this.g *= e), (this.b *= e), this }, lerp: function (e, t) { return (this.r += (e.r - this.r) * t), (this.g += (e.g - this.g) * t), (this.b += (e.b - this.b) * t), this }, equals: function (e) { return e.r === this.r && e.g === this.g && e.b === this.b }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this.r = e[t]), (this.g = e[t + 1]), (this.b = e[t + 2]), this }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.r), (e[t + 1] = this.g), (e[t + 2] = this.b), e } }), (Ci.ColorKeywords = { aliceblue: 15792383, antiquewhite: 16444375, aqua: 65535, aquamarine: 8388564, azure: 15794175, beige: 16119260, bisque: 16770244, black: 0, blanchedalmond: 16772045, blue: 255, blueviolet: 9055202, brown: 10824234, burlywood: 14596231, cadetblue: 6266528, chartreuse: 8388352, chocolate: 13789470, coral: 16744272, cornflowerblue: 6591981, cornsilk: 16775388, crimson: 14423100, cyan: 65535, darkblue: 139, darkcyan: 35723, darkgoldenrod: 12092939, darkgray: 11119017, darkgreen: 25600, darkgrey: 11119017, darkkhaki: 12433259, darkmagenta: 9109643, darkolivegreen: 5597999, darkorange: 16747520, darkorchid: 10040012, darkred: 9109504, darksalmon: 15308410, darkseagreen: 9419919, darkslateblue: 4734347, darkslategray: 3100495, darkslategrey: 3100495, darkturquoise: 52945, darkviolet: 9699539, deeppink: 16716947, deepskyblue: 49151, dimgray: 6908265, dimgrey: 6908265, dodgerblue: 2003199, firebrick: 11674146, floralwhite: 16775920, forestgreen: 2263842, fuchsia: 16711935, gainsboro: 14474460, ghostwhite: 16316671, gold: 16766720, goldenrod: 14329120, gray: 8421504, green: 32768, greenyellow: 11403055, grey: 8421504, honeydew: 15794160, hotpink: 16738740, indianred: 13458524, indigo: 4915330, ivory: 16777200, khaki: 15787660, lavender: 15132410, lavenderblush: 16773365, lawngreen: 8190976, lemonchiffon: 16775885, lightblue: 11393254, lightcoral: 15761536, lightcyan: 14745599, lightgoldenrodyellow: 16448210, lightgray: 13882323, lightgreen: 9498256, lightgrey: 13882323, lightpink: 16758465, lightsalmon: 16752762, lightseagreen: 2142890, lightskyblue: 8900346, lightslategray: 7833753, lightslategrey: 7833753, lightsteelblue: 11584734, lightyellow: 16777184, lime: 65280, limegreen: 3329330, linen: 16445670, magenta: 16711935, maroon: 8388608, mediumaquamarine: 6737322, mediumblue: 205, mediumorchid: 12211667, mediumpurple: 9662683, mediumseagreen: 3978097, mediumslateblue: 8087790, mediumspringgreen: 64154, mediumturquoise: 4772300, mediumvioletred: 13047173, midnightblue: 1644912, mintcream: 16121850, mistyrose: 16770273, moccasin: 16770229, navajowhite: 16768685, navy: 128, oldlace: 16643558, olive: 8421376, olivedrab: 7048739, orange: 16753920, orangered: 16729344, orchid: 14315734, palegoldenrod: 15657130, palegreen: 10025880, paleturquoise: 11529966, palevioletred: 14381203, papayawhip: 16773077, peachpuff: 16767673, peru: 13468991, pink: 16761035, plum: 14524637, powderblue: 11591910, purple: 8388736, red: 16711680, rosybrown: 12357519, royalblue: 4286945, saddlebrown: 9127187, salmon: 16416882, sandybrown: 16032864, seagreen: 3050327, seashell: 16774638, sienna: 10506797, silver: 12632256, skyblue: 8900331, slateblue: 6970061, slategray: 7372944, slategrey: 7372944, snow: 16775930, springgreen: 65407, steelblue: 4620980, tan: 13808780, teal: 32896, thistle: 14204888, tomato: 16737095, turquoise: 4251856, violet: 15631086, wheat: 16113331, white: 16777215, whitesmoke: 16119285, yellow: 16776960, yellowgreen: 10145074 }), (Ci.Quaternion = function (e, t, i, n) { ;(this._x = e || 0), (this._y = t || 0), (this._z = i || 0), (this._w = void 0 !== n ? n : 1) }), (Ci.Quaternion.prototype = { constructor: Ci.Quaternion, get x() { return this._x }, set x(e) { ;(this._x = e), this.onChangeCallback() }, get y() { return this._y }, set y(e) { ;(this._y = e), this.onChangeCallback() }, get z() { return this._z }, set z(e) { ;(this._z = e), this.onChangeCallback() }, get w() { return this._w }, set w(e) { ;(this._w = e), this.onChangeCallback() }, set: function (e, t, i, n) { return (this._x = e), (this._y = t), (this._z = i), (this._w = n), this.onChangeCallback(), this }, clone: function () { return new this.constructor(this._x, this._y, this._z, this._w) }, toObject: function () { //add return { x: this.x, y: this.y, z: this.z, w: this.w } }, copy: function (e) { return (this._x = e.x), (this._y = e.y), (this._z = e.z), (this._w = e.w), this.onChangeCallback(), this }, setFromEuler: function (e, t) { if (e instanceof Ci.Euler == 0) throw new Error('THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order.') var i = Math.cos(e._x / 2), n = Math.cos(e._y / 2), r = Math.cos(e._z / 2), o = Math.sin(e._x / 2), a = Math.sin(e._y / 2), s = Math.sin(e._z / 2), l = e.order return ( 'XYZ' === l ? ((this._x = o * n * r + i * a * s), (this._y = i * a * r - o * n * s), (this._z = i * n * s + o * a * r), (this._w = i * n * r - o * a * s)) : 'YXZ' === l ? ((this._x = o * n * r + i * a * s), (this._y = i * a * r - o * n * s), (this._z = i * n * s - o * a * r), (this._w = i * n * r + o * a * s)) : 'ZXY' === l ? ((this._x = o * n * r - i * a * s), (this._y = i * a * r + o * n * s), (this._z = i * n * s + o * a * r), (this._w = i * n * r - o * a * s)) : 'ZYX' === l ? ((this._x = o * n * r - i * a * s), (this._y = i * a * r + o * n * s), (this._z = i * n * s - o * a * r), (this._w = i * n * r + o * a * s)) : 'YZX' === l ? ((this._x = o * n * r + i * a * s), (this._y = i * a * r + o * n * s), (this._z = i * n * s - o * a * r), (this._w = i * n * r - o * a * s)) : 'XZY' === l && ((this._x = o * n * r - i * a * s), (this._y = i * a * r - o * n * s), (this._z = i * n * s + o * a * r), (this._w = i * n * r + o * a * s)), !1 !== t && this.onChangeCallback(), this ) }, setFromAxisAngle: function (e, t) { var i = t / 2, n = Math.sin(i) return (this._x = e.x * n), (this._y = e.y * n), (this._z = e.z * n), (this._w = Math.cos(i)), this.onChangeCallback(), this }, setFromRotationMatrix: function (e) { var t, i = e.elements, n = i[0], r = i[4], o = i[8], a = i[1], s = i[5], l = i[9], c = i[2], h = i[6], u = i[10], d = n + s + u return ( 0 < d ? ((t = 0.5 / Math.sqrt(d + 1)), (this._w = 0.25 / t), (this._x = (h - l) * t), (this._y = (o - c) * t), (this._z = (a - r) * t)) : s < n && u < n ? ((t = 2 * Math.sqrt(1 + n - s - u)), (this._w = (h - l) / t), (this._x = 0.25 * t), (this._y = (r + a) / t), (this._z = (o + c) / t)) : u < s ? ((t = 2 * Math.sqrt(1 + s - n - u)), (this._w = (o - c) / t), (this._x = (r + a) / t), (this._y = 0.25 * t), (this._z = (l + h) / t)) : ((t = 2 * Math.sqrt(1 + u - n - s)), (this._w = (a - r) / t), (this._x = (o + c) / t), (this._y = (l + h) / t), (this._z = 0.25 * t)), this.onChangeCallback(), this ) }, setFromUnitVectors: function (e, t) { return ( void 0 === Be && (Be = new Ci.Vector3()), (Ve = e.dot(t) + 1) < 1e-6 ? ((Ve = 0), Math.abs(e.x) > Math.abs(e.z) ? Be.set(-e.y, e.x, 0) : Be.set(0, -e.z, e.y)) : Be.crossVectors(e, t), (this._x = Be.x), (this._y = Be.y), (this._z = Be.z), (this._w = Ve), this.normalize(), this ) }, inverse: function () { return this.conjugate().normalize(), this }, conjugate: function () { return (this._x *= -1), (this._y *= -1), (this._z *= -1), this.onChangeCallback(), this }, dot: function (e) { return this._x * e._x + this._y * e._y + this._z * e._z + this._w * e._w }, lengthSq: function () { return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w }, length: function () { return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w) }, normalize: function () { var e = this.length() return ( 0 === e ? ((this._x = 0), (this._y = 0), (this._z = 0), (this._w = 1)) : ((e = 1 / e), (this._x = this._x * e), (this._y = this._y * e), (this._z = this._z * e), (this._w = this._w * e)), this.onChangeCallback(), this ) }, multiply: function (e, t) { return void 0 !== t ? (console.warn('THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.'), this.multiplyQuaternions(e, t)) : this.multiplyQuaternions(this, e) }, multiplyQuaternions: function (e, t) { var i = e._x, n = e._y, r = e._z, o = e._w, a = t._x, s = t._y, l = t._z, c = t._w return ( (this._x = i * c + o * a + n * l - r * s), (this._y = n * c + o * s + r * a - i * l), (this._z = r * c + o * l + i * s - n * a), (this._w = o * c - i * a - n * s - r * l), this.onChangeCallback(), this ) }, slerp: function (e, t) { if (0 === t) return this if (1 === t) return this.copy(e) var i = this._x, n = this._y, r = this._z, o = this._w, a = o * e._w + i * e._x + n * e._y + r * e._z if ((a < 0 ? ((this._w = -e._w), (this._x = -e._x), (this._y = -e._y), (this._z = -e._z), (a = -a)) : this.copy(e), 1 <= a)) return (this._w = o), (this._x = i), (this._y = n), (this._z = r), this var s = Math.sqrt(1 - a * a) if (Math.abs(s) < 0.001) return (this._w = 0.5 * (o + this._w)), (this._x = 0.5 * (i + this._x)), (this._y = 0.5 * (n + this._y)), (this._z = 0.5 * (r + this._z)), this var l = Math.atan2(s, a), c = Math.sin((1 - t) * l) / s, h = Math.sin(t * l) / s return (this._w = o * c + this._w * h), (this._x = i * c + this._x * h), (this._y = n * c + this._y * h), (this._z = r * c + this._z * h), this.onChangeCallback(), this }, equals: function (e) { return e._x === this._x && e._y === this._y && e._z === this._z && e._w === this._w }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this._x = e[t]), (this._y = e[t + 1]), (this._z = e[t + 2]), (this._w = e[t + 3]), this.onChangeCallback(), this }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this._x), (e[t + 1] = this._y), (e[t + 2] = this._z), (e[t + 3] = this._w), e }, onChange: function (e) { return (this.onChangeCallback = e), this }, onChangeCallback: function () {} }), Object.assign(Ci.Quaternion, { slerp: function (e, t, i, n) { return i.copy(e).slerp(t, n) }, slerpFlat: function (e, t, i, n, r, o, a) { var s = i[n + 0], l = i[n + 1], c = i[n + 2], h = i[n + 3], u = r[o + 0], d = r[o + 1], p = r[o + 2], f = r[o + 3] if (h !== f || s !== u || l !== d || c !== p) { var g = 1 - a, m = s * u + l * d + c * p + h * f, v = 0 <= m ? 1 : -1, y = 1 - m * m if (y > Number.EPSILON) { var A = Math.sqrt(y), C = Math.atan2(A, m * v) ;(g = Math.sin(g * C) / A), (a = Math.sin(a * C) / A) } var I = a * v if (((s = s * g + u * I), (l = l * g + d * I), (c = c * g + p * I), (h = h * g + f * I), g === 1 - a)) { var E = 1 / Math.sqrt(s * s + l * l + c * c + h * h) ;(s *= E), (l *= E), (c *= E), (h *= E) } } ;(e[t] = s), (e[t + 1] = l), (e[t + 2] = c), (e[t + 3] = h) } }), (Ci.Vector2 = function (e, t) { ;(this.x = e || 0), (this.y = t || 0) }), (Ci.Vector2.prototype = { constructor: Ci.Vector2, get width() { return this.x }, set width(e) { this.x = e }, get height() { return this.y }, set height(e) { this.y = e }, set: function (e, t) { return (this.x = e), (this.y = t), this }, setScalar: function (e) { return (this.x = e), (this.y = e), this }, setX: function (e) { return (this.x = e), this }, setY: function (e) { return (this.y = e), this }, setComponent: function (e, t) { switch (e) { case 0: this.x = t break case 1: this.y = t break default: throw new Error('index is out of range: ' + e) } }, getComponent: function (e) { switch (e) { case 0: return this.x case 1: return this.y default: throw new Error('index is out of range: ' + e) } }, clone: function () { return new this.constructor(this.x, this.y) }, copy: function (e) { return (this.x = e.x), (this.y = e.y), this }, add: function (e, t) { return void 0 !== t ? (console.warn('THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'), this.addVectors(e, t)) : ((this.x += e.x), (this.y += e.y), this) }, addScalar: function (e) { return (this.x += e), (this.y += e), this }, addVectors: function (e, t) { return (this.x = e.x + t.x), (this.y = e.y + t.y), this }, addScaledVector: function (e, t) { return (this.x += e.x * t), (this.y += e.y * t), this }, sub: function (e, t) { return void 0 !== t ? (console.warn('THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'), this.subVectors(e, t)) : ((this.x -= e.x), (this.y -= e.y), this) }, subScalar: function (e) { return (this.x -= e), (this.y -= e), this }, subVectors: function (e, t) { return (this.x = e.x - t.x), (this.y = e.y - t.y), this }, multiply: function (e) { return (this.x *= e.x), (this.y *= e.y), this }, multiplyScalar: function (e) { return isFinite(e) ? ((this.x *= e), (this.y *= e)) : ((this.x = 0), (this.y = 0)), this }, divide: function (e) { return (this.x /= e.x), (this.y /= e.y), this }, divideScalar: function (e) { return this.multiplyScalar(1 / e) }, min: function (e) { return (this.x = Math.min(this.x, e.x)), (this.y = Math.min(this.y, e.y)), this }, max: function (e) { return (this.x = Math.max(this.x, e.x)), (this.y = Math.max(this.y, e.y)), this }, clamp: function (e, t) { return (this.x = Math.max(e.x, Math.min(t.x, this.x))), (this.y = Math.max(e.y, Math.min(t.y, this.y))), this }, clampScalar: function (e, t) { return void 0 === Ne && ((Ne = new Ci.Vector2()), (Fe = new Ci.Vector2())), Ne.set(e, e), Fe.set(t, t), this.clamp(Ne, Fe) }, clampLength: function (e, t) { var i = this.length() return this.multiplyScalar(Math.max(e, Math.min(t, i)) / i), this }, floor: function () { return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), this }, ceil: function () { return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), this }, round: function () { return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), this }, roundToZero: function () { return (this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)), (this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)), this }, negate: function () { return (this.x = -this.x), (this.y = -this.y), this }, dot: function (e) { return this.x * e.x + this.y * e.y }, lengthSq: function () { return this.x * this.x + this.y * this.y }, length: function () { return Math.sqrt(this.x * this.x + this.y * this.y) }, lengthManhattan: function () { return Math.abs(this.x) + Math.abs(this.y) }, normalize: function () { return this.divideScalar(this.length()) }, angle: function () { var e = Math.atan2(this.y, this.x) return e < 0 && (e += 2 * Math.PI), e }, distanceTo: function (e) { return Math.sqrt(this.distanceToSquared(e)) }, distanceToSquared: function (e) { var t = this.x - e.x, i = this.y - e.y return t * t + i * i }, setLength: function (e) { return this.multiplyScalar(e / this.length()) }, lerp: function (e, t) { return (this.x += (e.x - this.x) * t), (this.y += (e.y - this.y) * t), this }, lerpVectors: function (e, t, i) { return this.subVectors(t, e).multiplyScalar(i).add(e), this }, equals: function (e) { return e.x === this.x && e.y === this.y }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), this }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), e }, fromAttribute: function (e, t, i) { return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), this }, rotateAround: function (e, t) { var i = Math.cos(t), n = Math.sin(t), r = this.x - e.x, o = this.y - e.y return (this.x = r * i - o * n + e.x), (this.y = r * n + o * i + e.y), this } }), (Ci.Vector3 = function (e, t, i) { ;(this.x = e || 0), (this.y = t || 0), (this.z = i || 0) }), (Ci.Vector3.prototype = { constructor: Ci.Vector3, set: function (e, t, i) { return (this.x = e), (this.y = t), (this.z = i), this }, setScalar: function (e) { return (this.x = e), (this.y = e), (this.z = e), this }, setX: function (e) { return (this.x = e), this }, setY: function (e) { return (this.y = e), this }, setZ: function (e) { return (this.z = e), this }, setComponent: function (e, t) { switch (e) { case 0: this.x = t break case 1: this.y = t break case 2: this.z = t break default: throw new Error('index is out of range: ' + e) } }, getComponent: function (e) { switch (e) { case 0: return this.x case 1: return this.y case 2: return this.z default: throw new Error('index is out of range: ' + e) } }, clone: function () { return new this.constructor(this.x, this.y, this.z) }, copy: function (e) { return (this.x = e.x), (this.y = e.y), (this.z = e.z), this }, add: function (e, t) { return void 0 !== t ? (console.warn('THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'), this.addVectors(e, t)) : ((this.x += e.x), (this.y += e.y), (this.z += e.z), this) }, addScalar: function (e) { return (this.x += e), (this.y += e), (this.z += e), this }, addVectors: function (e, t) { return (this.x = e.x + t.x), (this.y = e.y + t.y), (this.z = e.z + t.z), this }, addScaledVector: function (e, t) { return (this.x += e.x * t), (this.y += e.y * t), (this.z += e.z * t), this }, sub: function (e, t) { return void 0 !== t ? (console.warn('THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'), this.subVectors(e, t)) : ((this.x -= e.x), (this.y -= e.y), (this.z -= e.z), this) }, subScalar: function (e) { return (this.x -= e), (this.y -= e), (this.z -= e), this }, subVectors: function (e, t) { return (this.x = e.x - t.x), (this.y = e.y - t.y), (this.z = e.z - t.z), this }, multiply: function (e, t) { return void 0 !== t ? (console.warn('THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.'), this.multiplyVectors(e, t)) : ((this.x *= e.x), (this.y *= e.y), (this.z *= e.z), this) }, multiplyScalar: function (e) { return isFinite(e) ? ((this.x *= e), (this.y *= e), (this.z *= e)) : ((this.x = 0), (this.y = 0), (this.z = 0)), this }, multiplyVectors: function (e, t) { return (this.x = e.x * t.x), (this.y = e.y * t.y), (this.z = e.z * t.z), this }, applyEuler: function (e) { return ( e instanceof Ci.Euler == 0 && console.error('THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.'), void 0 === De && (De = new Ci.Quaternion()), this.applyQuaternion(De.setFromEuler(e)), this ) }, applyAxisAngle: function (e, t) { return void 0 === Le && (Le = new Ci.Quaternion()), this.applyQuaternion(Le.setFromAxisAngle(e, t)), this }, applyMatrix3: function (e) { var t = this.x, i = this.y, n = this.z, r = e.elements return (this.x = r[0] * t + r[3] * i + r[6] * n), (this.y = r[1] * t + r[4] * i + r[7] * n), (this.z = r[2] * t + r[5] * i + r[8] * n), this }, applyMatrix4: function (e) { var t = this.x, i = this.y, n = this.z, r = e.elements return (this.x = r[0] * t + r[4] * i + r[8] * n + r[12]), (this.y = r[1] * t + r[5] * i + r[9] * n + r[13]), (this.z = r[2] * t + r[6] * i + r[10] * n + r[14]), this }, applyProjection: function (e) { var t = this.x, i = this.y, n = this.z, r = e.elements, o = 1 / (r[3] * t + r[7] * i + r[11] * n + r[15]) return (this.x = (r[0] * t + r[4] * i + r[8] * n + r[12]) * o), (this.y = (r[1] * t + r[5] * i + r[9] * n + r[13]) * o), (this.z = (r[2] * t + r[6] * i + r[10] * n + r[14]) * o), this }, applyQuaternion: function (e) { var t = this.x, i = this.y, n = this.z, r = e.x, o = e.y, a = e.z, s = e.w, l = s * t + o * n - a * i, c = s * i + a * t - r * n, h = s * n + r * i - o * t, u = -r * t - o * i - a * n return (this.x = l * s + u * -r + c * -a - h * -o), (this.y = c * s + u * -o + h * -r - l * -a), (this.z = h * s + u * -a + l * -o - c * -r), this }, project: function (e) { return void 0 === Oe && (Oe = new Ci.Matrix4()), Oe.multiplyMatrices(e.projectionMatrix, Oe.getInverse(e.matrixWorld)), this.applyProjection(Oe) }, unproject: function (e) { return void 0 === Pe && (Pe = new Ci.Matrix4()), Pe.multiplyMatrices(e.matrixWorld, Pe.getInverse(e.projectionMatrix)), this.applyProjection(Pe) }, transformDirection: function (e) { var t = this.x, i = this.y, n = this.z, r = e.elements return (this.x = r[0] * t + r[4] * i + r[8] * n), (this.y = r[1] * t + r[5] * i + r[9] * n), (this.z = r[2] * t + r[6] * i + r[10] * n), this.normalize(), this }, divide: function (e) { return (this.x /= e.x), (this.y /= e.y), (this.z /= e.z), this }, divideScalar: function (e) { return this.multiplyScalar(1 / e) }, min: function (e) { return (this.x = Math.min(this.x, e.x)), (this.y = Math.min(this.y, e.y)), (this.z = Math.min(this.z, e.z)), this }, max: function (e) { return (this.x = Math.max(this.x, e.x)), (this.y = Math.max(this.y, e.y)), (this.z = Math.max(this.z, e.z)), this }, clamp: function (e, t) { return (this.x = Math.max(e.x, Math.min(t.x, this.x))), (this.y = Math.max(e.y, Math.min(t.y, this.y))), (this.z = Math.max(e.z, Math.min(t.z, this.z))), this }, clampScalar: function (e, t) { return void 0 === Me && ((Me = new Ci.Vector3()), (Re = new Ci.Vector3())), Me.set(e, e, e), Re.set(t, t, t), this.clamp(Me, Re) }, clampLength: function (e, t) { var i = this.length() return this.multiplyScalar(Math.max(e, Math.min(t, i)) / i), this }, floor: function () { return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), (this.z = Math.floor(this.z)), this }, ceil: function () { return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), (this.z = Math.ceil(this.z)), this }, round: function () { return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), (this.z = Math.round(this.z)), this }, roundToZero: function () { return ( (this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)), (this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)), (this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z)), this ) }, negate: function () { return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), this }, dot: function (e) { return this.x * e.x + this.y * e.y + this.z * e.z }, lengthSq: function () { return this.x * this.x + this.y * this.y + this.z * this.z }, length: function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z) }, lengthManhattan: function () { return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) }, normalize: function () { return this.divideScalar(this.length()) }, setLength: function (e) { return this.multiplyScalar(e / this.length()) }, lerp: function (e, t) { return (this.x += (e.x - this.x) * t), (this.y += (e.y - this.y) * t), (this.z += (e.z - this.z) * t), this }, lerpVectors: function (e, t, i) { return this.subVectors(t, e).multiplyScalar(i).add(e), this }, cross: function (e, t) { if (void 0 !== t) return console.warn('THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.'), this.crossVectors(e, t) var i = this.x, n = this.y, r = this.z return (this.x = n * e.z - r * e.y), (this.y = r * e.x - i * e.z), (this.z = i * e.y - n * e.x), this }, crossVectors: function (e, t) { var i = e.x, n = e.y, r = e.z, o = t.x, a = t.y, s = t.z return (this.x = n * s - r * a), (this.y = r * o - i * s), (this.z = i * a - n * o), this }, projectOnVector: function (e) { return void 0 === xe && (xe = new Ci.Vector3()), xe.copy(e).normalize(), (Se = this.dot(xe)), this.copy(xe).multiplyScalar(Se) }, projectOnPlane: function (e) { return void 0 === Te && (Te = new Ci.Vector3()), Te.copy(this).projectOnVector(e), this.sub(Te) }, reflect: function (e) { return void 0 === we && (we = new Ci.Vector3()), this.sub(we.copy(e).multiplyScalar(2 * this.dot(e))) }, angleTo: function (e) { var t = this.dot(e) / Math.sqrt(this.lengthSq() * e.lengthSq()) return Math.acos(Ci.Math.clamp(t, -1, 1)) }, distanceTo: function (e) { return Math.sqrt(this.distanceToSquared(e)) }, distanceToSquared: function (e) { var t = this.x - e.x, i = this.y - e.y, n = this.z - e.z return t * t + i * i + n * n }, setFromSpherical: function (e) { var t = Math.sin(e.phi) * e.radius return (this.x = t * Math.sin(e.theta)), (this.y = Math.cos(e.phi) * e.radius), (this.z = t * Math.cos(e.theta)), this }, setFromMatrixPosition: function (e) { return this.setFromMatrixColumn(e, 3) }, setFromMatrixScale: function (e) { var t = this.setFromMatrixColumn(e, 0).length(), i = this.setFromMatrixColumn(e, 1).length(), n = this.setFromMatrixColumn(e, 2).length() return (this.x = t), (this.y = i), (this.z = n), this }, setFromMatrixColumn: function (e, t) { return 'number' == typeof e && (console.warn('THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).'), (t = e = t)), this.fromArray(e.elements, 4 * t) }, equals: function (e) { return e.x === this.x && e.y === this.y && e.z === this.z }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), (this.z = e[t + 2]), this }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), (e[t + 2] = this.z), e }, fromAttribute: function (e, t, i) { return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), (this.z = e.array[t + 2]), this } }), (Ci.Vector4 = function (e, t, i, n) { ;(this.x = e || 0), (this.y = t || 0), (this.z = i || 0), (this.w = void 0 !== n ? n : 1) }), (Ci.Vector4.prototype = { constructor: Ci.Vector4, set: function (e, t, i, n) { return (this.x = e), (this.y = t), (this.z = i), (this.w = n), this }, setScalar: function (e) { return (this.x = e), (this.y = e), (this.z = e), (this.w = e), this }, setX: function (e) { return (this.x = e), this }, setY: function (e) { return (this.y = e), this }, setZ: function (e) { return (this.z = e), this }, setW: function (e) { return (this.w = e), this }, setComponent: function (e, t) { switch (e) { case 0: this.x = t break case 1: this.y = t break case 2: this.z = t break case 3: this.w = t break default: throw new Error('index is out of range: ' + e) } }, getComponent: function (e) { switch (e) { case 0: return this.x case 1: return this.y case 2: return this.z case 3: return this.w default: throw new Error('index is out of range: ' + e) } }, clone: function () { return new this.constructor(this.x, this.y, this.z, this.w) }, copy: function (e) { return (this.x = e.x), (this.y = e.y), (this.z = e.z), (this.w = void 0 !== e.w ? e.w : 1), this }, add: function (e, t) { return void 0 !== t ? (console.warn('THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'), this.addVectors(e, t)) : ((this.x += e.x), (this.y += e.y), (this.z += e.z), (this.w += e.w), this) }, addScalar: function (e) { return (this.x += e), (this.y += e), (this.z += e), (this.w += e), this }, addVectors: function (e, t) { return (this.x = e.x + t.x), (this.y = e.y + t.y), (this.z = e.z + t.z), (this.w = e.w + t.w), this }, addScaledVector: function (e, t) { return (this.x += e.x * t), (this.y += e.y * t), (this.z += e.z * t), (this.w += e.w * t), this }, sub: function (e, t) { return void 0 !== t ? (console.warn('THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'), this.subVectors(e, t)) : ((this.x -= e.x), (this.y -= e.y), (this.z -= e.z), (this.w -= e.w), this) }, subScalar: function (e) { return (this.x -= e), (this.y -= e), (this.z -= e), (this.w -= e), this }, subVectors: function (e, t) { return (this.x = e.x - t.x), (this.y = e.y - t.y), (this.z = e.z - t.z), (this.w = e.w - t.w), this }, multiplyScalar: function (e) { return isFinite(e) ? ((this.x *= e), (this.y *= e), (this.z *= e), (this.w *= e)) : ((this.x = 0), (this.y = 0), (this.z = 0), (this.w = 0)), this }, applyMatrix4: function (e) { var t = this.x, i = this.y, n = this.z, r = this.w, o = e.elements return ( (this.x = o[0] * t + o[4] * i + o[8] * n + o[12] * r), (this.y = o[1] * t + o[5] * i + o[9] * n + o[13] * r), (this.z = o[2] * t + o[6] * i + o[10] * n + o[14] * r), (this.w = o[3] * t + o[7] * i + o[11] * n + o[15] * r), this ) }, divideScalar: function (e) { return this.multiplyScalar(1 / e) }, setAxisAngleFromQuaternion: function (e) { this.w = 2 * Math.acos(e.w) var t = Math.sqrt(1 - e.w * e.w) return t < 1e-4 ? ((this.x = 1), (this.y = 0), (this.z = 0)) : ((this.x = e.x / t), (this.y = e.y / t), (this.z = e.z / t)), this }, setAxisAngleFromRotationMatrix: function (e) { var t, i, n, r, o = e.elements, a = o[0], s = o[4], l = o[8], c = o[1], h = o[5], u = o[9], d = o[2], p = o[6], f = o[10] if (Math.abs(s - c) < 0.01 && Math.abs(l - d) < 0.01 && Math.abs(u - p) < 0.01) { if (Math.abs(s + c) < 0.1 && Math.abs(l + d) < 0.1 && Math.abs(u + p) < 0.1 && Math.abs(a + h + f - 3) < 0.1) return this.set(1, 0, 0, 0), this t = Math.PI var g = (a + 1) / 2, m = (h + 1) / 2, v = (f + 1) / 2, y = (s + c) / 4, A = (l + d) / 4, C = (u + p) / 4 return ( m < g && v < g ? (r = g < 0.01 ? ((i = 0), (n = 0.707106781)) : ((n = y / (i = Math.sqrt(g))), A / i)) : v < m ? (r = m < 0.01 ? ((n = 0), (i = 0.707106781)) : ((i = y / (n = Math.sqrt(m))), C / n)) : v < 0.01 ? ((n = i = 0.707106781), (r = 0)) : ((i = A / (r = Math.sqrt(v))), (n = C / r)), this.set(i, n, r, t), this ) } var I = Math.sqrt((p - u) * (p - u) + (l - d) * (l - d) + (c - s) * (c - s)) return Math.abs(I) < 0.001 && (I = 1), (this.x = (p - u) / I), (this.y = (l - d) / I), (this.z = (c - s) / I), (this.w = Math.acos((a + h + f - 1) / 2)), this }, min: function (e) { return (this.x = Math.min(this.x, e.x)), (this.y = Math.min(this.y, e.y)), (this.z = Math.min(this.z, e.z)), (this.w = Math.min(this.w, e.w)), this }, max: function (e) { return (this.x = Math.max(this.x, e.x)), (this.y = Math.max(this.y, e.y)), (this.z = Math.max(this.z, e.z)), (this.w = Math.max(this.w, e.w)), this }, clamp: function (e, t) { return ( (this.x = Math.max(e.x, Math.min(t.x, this.x))), (this.y = Math.max(e.y, Math.min(t.y, this.y))), (this.z = Math.max(e.z, Math.min(t.z, this.z))), (this.w = Math.max(e.w, Math.min(t.w, this.w))), this ) }, clampScalar: function (e, t) { return void 0 === _e && ((_e = new Ci.Vector4()), (be = new Ci.Vector4())), _e.set(e, e, e, e), be.set(t, t, t, t), this.clamp(_e, be) }, floor: function () { return (this.x = Math.floor(this.x)), (this.y = Math.floor(this.y)), (this.z = Math.floor(this.z)), (this.w = Math.floor(this.w)), this }, ceil: function () { return (this.x = Math.ceil(this.x)), (this.y = Math.ceil(this.y)), (this.z = Math.ceil(this.z)), (this.w = Math.ceil(this.w)), this }, round: function () { return (this.x = Math.round(this.x)), (this.y = Math.round(this.y)), (this.z = Math.round(this.z)), (this.w = Math.round(this.w)), this }, roundToZero: function () { return ( (this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x)), (this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y)), (this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z)), (this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w)), this ) }, negate: function () { return (this.x = -this.x), (this.y = -this.y), (this.z = -this.z), (this.w = -this.w), this }, dot: function (e) { return this.x * e.x + this.y * e.y + this.z * e.z + this.w * e.w }, lengthSq: function () { return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w }, length: function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w) }, lengthManhattan: function () { return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w) }, normalize: function () { return this.divideScalar(this.length()) }, setLength: function (e) { return this.multiplyScalar(e / this.length()) }, lerp: function (e, t) { return (this.x += (e.x - this.x) * t), (this.y += (e.y - this.y) * t), (this.z += (e.z - this.z) * t), (this.w += (e.w - this.w) * t), this }, lerpVectors: function (e, t, i) { return this.subVectors(t, e).multiplyScalar(i).add(e), this }, equals: function (e) { return e.x === this.x && e.y === this.y && e.z === this.z && e.w === this.w }, fromArray: function (e, t) { return void 0 === t && (t = 0), (this.x = e[t]), (this.y = e[t + 1]), (this.z = e[t + 2]), (this.w = e[t + 3]), this }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this.x), (e[t + 1] = this.y), (e[t + 2] = this.z), (e[t + 3] = this.w), e }, fromAttribute: function (e, t, i) { return void 0 === i && (i = 0), (t = t * e.itemSize + i), (this.x = e.array[t]), (this.y = e.array[t + 1]), (this.z = e.array[t + 2]), (this.w = e.array[t + 3]), this } }), (Ci.Euler = function (e, t, i, n) { ;(this._x = e || 0), (this._y = t || 0), (this._z = i || 0), (this._order = n || Ci.Euler.DefaultOrder) }), (Ci.Euler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX']), (Ci.Euler.DefaultOrder = 'XYZ'), (Ci.Euler.prototype = { constructor: Ci.Euler, get x() { return this._x }, set x(e) { ;(this._x = e), this.onChangeCallback() }, get y() { return this._y }, set y(e) { ;(this._y = e), this.onChangeCallback() }, get z() { return this._z }, set z(e) { ;(this._z = e), this.onChangeCallback() }, get order() { return this._order }, set order(e) { ;(this._order = e), this.onChangeCallback() }, set: function (e, t, i, n) { return (this._x = e), (this._y = t), (this._z = i), (this._order = n || this._order), this.onChangeCallback(), this }, clone: function () { return new this.constructor(this._x, this._y, this._z, this._order) }, copy: function (e) { return (this._x = e._x), (this._y = e._y), (this._z = e._z), (this._order = e._order), this.onChangeCallback(), this }, toObject: function () { //xzw return { x: this.x, y: this.y, z: this.z } }, setFromRotationMatrix: function (e, t, i) { var n = Ci.Math.clamp, r = e.elements, o = r[0], a = r[4], s = r[8], l = r[1], c = r[5], h = r[9], u = r[2], d = r[6], p = r[10] return ( 'XYZ' === (t = t || this._order) ? ((this._y = Math.asin(n(s, -1, 1))), Math.abs(s) < 0.99999 ? ((this._x = Math.atan2(-h, p)), (this._z = Math.atan2(-a, o))) : ((this._x = Math.atan2(d, c)), (this._z = 0))) : 'YXZ' === t ? ((this._x = Math.asin(-n(h, -1, 1))), Math.abs(h) < 0.99999 ? ((this._y = Math.atan2(s, p)), (this._z = Math.atan2(l, c))) : ((this._y = Math.atan2(-u, o)), (this._z = 0))) : 'ZXY' === t ? ((this._x = Math.asin(n(d, -1, 1))), Math.abs(d) < 0.99999 ? ((this._y = Math.atan2(-u, p)), (this._z = Math.atan2(-a, c))) : ((this._y = 0), (this._z = Math.atan2(l, o)))) : 'ZYX' === t ? ((this._y = Math.asin(-n(u, -1, 1))), Math.abs(u) < 0.99999 ? ((this._x = Math.atan2(d, p)), (this._z = Math.atan2(l, o))) : ((this._x = 0), (this._z = Math.atan2(-a, c)))) : 'YZX' === t ? ((this._z = Math.asin(n(l, -1, 1))), Math.abs(l) < 0.99999 ? ((this._x = Math.atan2(-h, c)), (this._y = Math.atan2(-u, o))) : ((this._x = 0), (this._y = Math.atan2(s, p)))) : 'XZY' === t ? ((this._z = Math.asin(-n(a, -1, 1))), Math.abs(a) < 0.99999 ? ((this._x = Math.atan2(d, c)), (this._y = Math.atan2(s, o))) : ((this._x = Math.atan2(-h, p)), (this._y = 0))) : console.warn('THREE.Euler: .setFromRotationMatrix() given unsupported order: ' + t), (this._order = t), !1 !== i && this.onChangeCallback(), this ) }, setFromQuaternion: function (e, t, i) { return void 0 === Ee && (Ee = new Ci.Matrix4()), Ee.makeRotationFromQuaternion(e), this.setFromRotationMatrix(Ee, t, i), this }, setFromVector3: function (e, t) { return this.set(e.x, e.y, e.z, t || this._order) }, reorder: ((Ie = new Ci.Quaternion()), function (e) { Ie.setFromEuler(this), this.setFromQuaternion(Ie, e) }), equals: function (e) { return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order }, fromArray: function (e) { return (this._x = e[0]), (this._y = e[1]), (this._z = e[2]), void 0 !== e[3] && (this._order = e[3]), this.onChangeCallback(), this }, toArray: function (e, t) { return void 0 === e && (e = []), void 0 === t && (t = 0), (e[t] = this._x), (e[t + 1] = this._y), (e[t + 2] = this._z), (e[t + 3] = this._order), e }, toVector3: function (e) { return e ? e.set(this._x, this._y, this._z) : new Ci.Vector3(this._x, this._y, this._z) }, onChange: function (e) { return (this.onChangeCallback = e), this }, onChangeCallback: function () {} }), (Ci.Line3 = function (e, t) { ;(this.start = void 0 !== e ? e : new Ci.Vector3()), (this.end = void 0 !== t ? t : new Ci.Vector3()) }), (Ci.Line3.prototype = { constructor: Ci.Line3, set: function (e, t) { return this.start.copy(e), this.end.copy(t), this }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return this.start.copy(e.start), this.end.copy(e.end), this }, center: function (e) { return (e || new Ci.Vector3()).addVectors(this.start, this.end).multiplyScalar(0.5) }, delta: function (e) { return (e || new Ci.Vector3()).subVectors(this.end, this.start) }, distanceSq: function () { return this.start.distanceToSquared(this.end) }, distance: function () { return this.start.distanceTo(this.end) }, at: function (e, t) { var i = t || new Ci.Vector3() return this.delta(i).multiplyScalar(e).add(this.start) }, closestPointToPointParameter: ((Ae = new Ci.Vector3()), (Ce = new Ci.Vector3()), function (e, t) { Ae.subVectors(e, this.start), Ce.subVectors(this.end, this.start) var i = Ce.dot(Ce), n = Ce.dot(Ae) / i return t && (n = Ci.Math.clamp(n, 0, 1)), n }), closestPointToPoint: function (e, t, i) { var n = this.closestPointToPointParameter(e, t), r = i || new Ci.Vector3() return this.delta(r).multiplyScalar(n).add(this.start) }, applyMatrix4: function (e) { return this.start.applyMatrix4(e), this.end.applyMatrix4(e), this }, equals: function (e) { return e.start.equals(this.start) && e.end.equals(this.end) } }), (Ci.Box2 = function (e, t) { ;(this.min = void 0 !== e ? e : new Ci.Vector2(1 / 0, 1 / 0)), (this.max = void 0 !== t ? t : new Ci.Vector2(-1 / 0, -1 / 0)) }), (Ci.Box2.prototype = { constructor: Ci.Box2, set: function (e, t) { return this.min.copy(e), this.max.copy(t), this }, setFromPoints: function (e) { this.makeEmpty() for (var t = 0, i = e.length; t < i; t++) this.expandByPoint(e[t]) return this }, setFromCenterAndSize: ((ye = new Ci.Vector2()), function (e, t) { var i = ye.copy(t).multiplyScalar(0.5) return this.min.copy(e).sub(i), this.max.copy(e).add(i), this }), clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return this.min.copy(e.min), this.max.copy(e.max), this }, makeEmpty: function () { return (this.min.x = this.min.y = 1 / 0), (this.max.x = this.max.y = -1 / 0), this }, isEmpty: function () { return this.max.x < this.min.x || this.max.y < this.min.y }, center: function (e) { return (e || new Ci.Vector2()).addVectors(this.min, this.max).multiplyScalar(0.5) }, size: function (e) { return (e || new Ci.Vector2()).subVectors(this.max, this.min) }, expandByPoint: function (e) { return this.min.min(e), this.max.max(e), this }, expandByVector: function (e) { return this.min.sub(e), this.max.add(e), this }, expandByScalar: function (e) { return this.min.addScalar(-e), this.max.addScalar(e), this }, containsPoint: function (e) { return !(e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y) }, containsBox: function (e) { return this.min.x <= e.min.x && e.max.x <= this.max.x && this.min.y <= e.min.y && e.max.y <= this.max.y }, getParameter: function (e, t) { return (t || new Ci.Vector2()).set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y)) }, intersectsBox: function (e) { return !(e.max.x < this.min.x || e.min.x > this.max.x || e.max.y < this.min.y || e.min.y > this.max.y) }, clampPoint: function (e, t) { return (t || new Ci.Vector2()).copy(e).clamp(this.min, this.max) }, distanceToPoint: ((ve = new Ci.Vector2()), function (e) { return ve.copy(e).clamp(this.min, this.max).sub(e).length() }), intersect: function (e) { return this.min.max(e.min), this.max.min(e.max), this }, union: function (e) { return this.min.min(e.min), this.max.max(e.max), this }, translate: function (e) { return this.min.add(e), this.max.add(e), this }, equals: function (e) { return e.min.equals(this.min) && e.max.equals(this.max) } }), (Ci.Box3 = function (e, t) { ;(this.min = void 0 !== e ? e : new Ci.Vector3(1 / 0, 1 / 0, 1 / 0)), (this.max = void 0 !== t ? t : new Ci.Vector3(-1 / 0, -1 / 0, -1 / 0)) }), (Ci.Box3.prototype = { constructor: Ci.Box3, set: function (e, t) { return this.min.copy(e), this.max.copy(t), this }, setFromArray: function (e) { this.makeEmpty() for (var t = 1 / 0, i = 1 / 0, n = 1 / 0, r = -1 / 0, o = -1 / 0, a = -1 / 0, s = 0, l = e.length; s < l; s += 3) { var c = e[s], h = e[s + 1], u = e[s + 2] c < t && (t = c), h < i && (i = h), u < n && (n = u), r < c && (r = c), o < h && (o = h), a < u && (a = u) } this.min.set(t, i, n), this.max.set(r, o, a) }, setFromPoints: function (e) { this.makeEmpty() for (var t = 0, i = e.length; t < i; t++) this.expandByPoint(e[t]) return this }, setFromCenterAndSize: ((me = new Ci.Vector3()), function (e, t) { var i = me.copy(t).multiplyScalar(0.5) return this.min.copy(e).sub(i), this.max.copy(e).add(i), this }), setFromObject: function (e) { void 0 === ge && (ge = new Ci.Box3()) var i = this return ( this.makeEmpty(), e.updateMatrixWorld(!0), e.traverse(function (e) { var t = e.geometry void 0 !== t && (null === t.boundingBox && t.computeBoundingBox(), !1 === t.boundingBox.isEmpty() && (ge.copy(t.boundingBox), ge.applyMatrix4(e.matrixWorld), i.union(ge))) }), this ) }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return this.min.copy(e.min), this.max.copy(e.max), this }, makeEmpty: function () { return (this.min.x = this.min.y = this.min.z = 1 / 0), (this.max.x = this.max.y = this.max.z = -1 / 0), this }, isEmpty: function () { return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z }, center: function (e) { return (e || new Ci.Vector3()).addVectors(this.min, this.max).multiplyScalar(0.5) }, size: function (e) { return (e || new Ci.Vector3()).subVectors(this.max, this.min) }, expandByPoint: function (e) { return this.min.min(e), this.max.max(e), this }, expandByVector: function (e) { return this.min.sub(e), this.max.add(e), this }, expandByScalar: function (e) { return this.min.addScalar(-e), this.max.addScalar(e), this }, containsPoint: function (e) { return !(e.x < this.min.x || e.x > this.max.x || e.y < this.min.y || e.y > this.max.y || e.z < this.min.z || e.z > this.max.z) }, containsBox: function (e) { return this.min.x <= e.min.x && e.max.x <= this.max.x && this.min.y <= e.min.y && e.max.y <= this.max.y && this.min.z <= e.min.z && e.max.z <= this.max.z }, getParameter: function (e, t) { return (t || new Ci.Vector3()).set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y), (e.z - this.min.z) / (this.max.z - this.min.z)) }, intersectsBox: function (e) { return !(e.max.x < this.min.x || e.min.x > this.max.x || e.max.y < this.min.y || e.min.y > this.max.y || e.max.z < this.min.z || e.min.z > this.max.z) }, intersectsSphere: function (e) { return void 0 === fe && (fe = new Ci.Vector3()), this.clampPoint(e.center, fe), fe.distanceToSquared(e.center) <= e.radius * e.radius }, intersectsPlane: function (e) { var t, i return ( (i = 0 < e.normal.x ? ((t = e.normal.x * this.min.x), e.normal.x * this.max.x) : ((t = e.normal.x * this.max.x), e.normal.x * this.min.x)), 0 < e.normal.y ? ((t += e.normal.y * this.min.y), (i += e.normal.y * this.max.y)) : ((t += e.normal.y * this.max.y), (i += e.normal.y * this.min.y)), 0 < e.normal.z ? ((t += e.normal.z * this.min.z), (i += e.normal.z * this.max.z)) : ((t += e.normal.z * this.max.z), (i += e.normal.z * this.min.z)), t <= e.constant && i >= e.constant ) }, clampPoint: function (e, t) { return (t || new Ci.Vector3()).copy(e).clamp(this.min, this.max) }, distanceToPoint: ((pe = new Ci.Vector3()), function (e) { return pe.copy(e).clamp(this.min, this.max).sub(e).length() }), getBoundingSphere: ((de = new Ci.Vector3()), function (e) { var t = e || new Ci.Sphere() return (t.center = this.center()), (t.radius = 0.5 * this.size(de).length()), t }), intersect: function (e) { return this.min.max(e.min), this.max.min(e.max), this }, union: function (e) { return this.min.min(e.min), this.max.max(e.max), this }, applyMatrix4: ((ue = [new Ci.Vector3(), new Ci.Vector3(), new Ci.Vector3(), new Ci.Vector3(), new Ci.Vector3(), new Ci.Vector3(), new Ci.Vector3(), new Ci.Vector3()]), function (e) { return ( ue[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), ue[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), ue[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), ue[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), ue[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), ue[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), ue[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), ue[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.makeEmpty(), this.setFromPoints(ue), this ) }), translate: function (e) { return this.min.add(e), this.max.add(e), this }, equals: function (e) { return e.min.equals(this.min) && e.max.equals(this.max) } }), (Ci.Matrix3 = function () { ;(this.elements = new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1])), 0 < arguments.length && console.error('THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.') }), (Ci.Matrix3.prototype = { constructor: Ci.Matrix3, set: function (e, t, i, n, r, o, a, s, l) { var c = this.elements return (c[0] = e), (c[1] = n), (c[2] = a), (c[3] = t), (c[4] = r), (c[5] = s), (c[6] = i), (c[7] = o), (c[8] = l), this }, identity: function () { return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this }, clone: function () { return new this.constructor().fromArray(this.elements) }, copy: function (e) { var t = e.elements return this.set(t[0], t[3], t[6], t[1], t[4], t[7], t[2], t[5], t[8]), this }, setFromMatrix4: function (e) { var t = e.elements return this.set(t[0], t[4], t[8], t[1], t[5], t[9], t[2], t[6], t[10]), this }, applyToVector3Array: function (e, t, i) { void 0 === he && (he = new Ci.Vector3()), void 0 === t && (t = 0), void 0 === i && (i = e.length) for (var n = 0, r = t; n < i; n += 3, r += 3) he.fromArray(e, r), he.applyMatrix3(this), he.toArray(e, r) return e }, applyToBuffer: function (e, t, i) { void 0 === ce && (ce = new Ci.Vector3()), void 0 === t && (t = 0), void 0 === i && (i = e.length / e.itemSize) for (var n = 0, r = t; n < i; n++, r++) (ce.x = e.getX(r)), (ce.y = e.getY(r)), (ce.z = e.getZ(r)), ce.applyMatrix3(this), e.setXYZ(ce.x, ce.y, ce.z) return e }, multiplyScalar: function (e) { var t = this.elements return (t[0] *= e), (t[3] *= e), (t[6] *= e), (t[1] *= e), (t[4] *= e), (t[7] *= e), (t[2] *= e), (t[5] *= e), (t[8] *= e), this }, determinant: function () { var e = this.elements, t = e[0], i = e[1], n = e[2], r = e[3], o = e[4], a = e[5], s = e[6], l = e[7], c = e[8] return t * o * c - t * a * l - i * r * c + i * a * s + n * r * l - n * o * s }, getInverse: function (e, t) { e instanceof Ci.Matrix4 && console.warn('THREE.Matrix3.getInverse no longer takes a Matrix4 argument.') var i = e.elements, n = this.elements, r = i[0], o = i[1], a = i[2], s = i[3], l = i[4], c = i[5], h = i[6], u = i[7], d = i[8], p = d * l - c * u, f = c * h - d * s, g = u * s - l * h, m = r * p + o * f + a * g if (0 != m) return ( (n[0] = p), (n[1] = a * u - d * o), (n[2] = c * o - a * l), (n[3] = f), (n[4] = d * r - a * h), (n[5] = a * s - c * r), (n[6] = g), (n[7] = o * h - u * r), (n[8] = l * r - o * s), this.multiplyScalar(1 / m) ) var v = "THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0" if (t) throw new Error(v) return this.identity() /* console.warn(v), */ //许钟文删 boxHelper报的 }, transpose: function () { var e, t = this.elements return (e = t[1]), (t[1] = t[3]), (t[3] = e), (e = t[2]), (t[2] = t[6]), (t[6] = e), (e = t[5]), (t[5] = t[7]), (t[7] = e), this }, flattenToArrayOffset: function (e, t) { var i = this.elements return (e[t] = i[0]), (e[t + 1] = i[1]), (e[t + 2] = i[2]), (e[t + 3] = i[3]), (e[t + 4] = i[4]), (e[t + 5] = i[5]), (e[t + 6] = i[6]), (e[t + 7] = i[7]), (e[t + 8] = i[8]), e }, getNormalMatrix: function (e) { return this.setFromMatrix4(e).getInverse(this).transpose() }, transposeIntoArray: function (e) { var t = this.elements return (e[0] = t[0]), (e[1] = t[3]), (e[2] = t[6]), (e[3] = t[1]), (e[4] = t[4]), (e[5] = t[7]), (e[6] = t[2]), (e[7] = t[5]), (e[8] = t[8]), this }, fromArray: function (e) { return this.elements.set(e), this }, toArray: function () { var e = this.elements return [e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8]] } }), (Ci.Matrix4 = function () { ;(this.elements = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])), 0 < arguments.length && console.error('THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.') }), (Ci.Matrix4.prototype = { constructor: Ci.Matrix4, set: function (e, t, i, n, r, o, a, s, l, c, h, u, d, p, f, g) { var m = this.elements return ( (m[0] = e), (m[4] = t), (m[8] = i), (m[12] = n), (m[1] = r), (m[5] = o), (m[9] = a), (m[13] = s), (m[2] = l), (m[6] = c), (m[10] = h), (m[14] = u), (m[3] = d), (m[7] = p), (m[11] = f), (m[15] = g), this ) }, identity: function () { return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this }, clone: function () { return new Ci.Matrix4().fromArray(this.elements) }, copy: function (e) { return this.elements.set(e.elements), this }, copyPosition: function (e) { var t = this.elements, i = e.elements return (t[12] = i[12]), (t[13] = i[13]), (t[14] = i[14]), this }, extractBasis: function (e, t, i) { return e.setFromMatrixColumn(this, 0), t.setFromMatrixColumn(this, 1), i.setFromMatrixColumn(this, 2), this }, makeBasis: function (e, t, i) { return this.set(e.x, t.x, i.x, 0, e.y, t.y, i.y, 0, e.z, t.z, i.z, 0, 0, 0, 0, 1), this }, extractRotation: function (e) { void 0 === le && (le = new Ci.Vector3()) var t = this.elements, i = e.elements, n = 1 / le.setFromMatrixColumn(e, 0).length(), r = 1 / le.setFromMatrixColumn(e, 1).length(), o = 1 / le.setFromMatrixColumn(e, 2).length() return (t[0] = i[0] * n), (t[1] = i[1] * n), (t[2] = i[2] * n), (t[4] = i[4] * r), (t[5] = i[5] * r), (t[6] = i[6] * r), (t[8] = i[8] * o), (t[9] = i[9] * o), (t[10] = i[10] * o), this }, makeRotationFromEuler: function (e) { e instanceof Ci.Euler == 0 && console.error('THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.') var t = this.elements, i = e.x, n = e.y, r = e.z, o = Math.cos(i), a = Math.sin(i), s = Math.cos(n), l = Math.sin(n), c = Math.cos(r), h = Math.sin(r) if ('XYZ' === e.order) { var u = o * c, d = o * h, p = a * c, f = a * h ;(t[0] = s * c), (t[4] = -s * h), (t[8] = l), (t[1] = d + p * l), (t[5] = u - f * l), (t[9] = -a * s), (t[2] = f - u * l), (t[6] = p + d * l), (t[10] = o * s) } else if ('YXZ' === e.order) { var g = s * c, m = s * h, v = l * c, y = l * h ;(t[0] = g + y * a), (t[4] = v * a - m), (t[8] = o * l), (t[1] = o * h), (t[5] = o * c), (t[9] = -a), (t[2] = m * a - v), (t[6] = y + g * a), (t[10] = o * s) } else if ('ZXY' === e.order) { ;(g = s * c), (m = s * h), (v = l * c), (y = l * h) ;(t[0] = g - y * a), (t[4] = -o * h), (t[8] = v + m * a), (t[1] = m + v * a), (t[5] = o * c), (t[9] = y - g * a), (t[2] = -o * l), (t[6] = a), (t[10] = o * s) } else if ('ZYX' === e.order) { ;(u = o * c), (d = o * h), (p = a * c), (f = a * h) ;(t[0] = s * c), (t[4] = p * l - d), (t[8] = u * l + f), (t[1] = s * h), (t[5] = f * l + u), (t[9] = d * l - p), (t[2] = -l), (t[6] = a * s), (t[10] = o * s) } else if ('YZX' === e.order) { var A = o * s, C = o * l, I = a * s, E = a * l ;(t[0] = s * c), (t[4] = E - A * h), (t[8] = I * h + C), (t[1] = h), (t[5] = o * c), (t[9] = -a * c), (t[2] = -l * c), (t[6] = C * h + I), (t[10] = A - E * h) } else if ('XZY' === e.order) { ;(A = o * s), (C = o * l), (I = a * s), (E = a * l) ;(t[0] = s * c), (t[4] = -h), (t[8] = l * c), (t[1] = A * h + E), (t[5] = o * c), (t[9] = C * h - I), (t[2] = I * h - C), (t[6] = a * c), (t[10] = E * h + A) } return (t[3] = 0), (t[7] = 0), (t[11] = 0), (t[12] = 0), (t[13] = 0), (t[14] = 0), (t[15] = 1), this }, makeRotationFromQuaternion: function (e) { var t = this.elements, i = e.x, n = e.y, r = e.z, o = e.w, a = i + i, s = n + n, l = r + r, c = i * a, h = i * s, u = i * l, d = n * s, p = n * l, f = r * l, g = o * a, m = o * s, v = o * l return ( (t[0] = 1 - (d + f)), (t[4] = h - v), (t[8] = u + m), (t[1] = h + v), (t[5] = 1 - (c + f)), (t[9] = p - g), (t[2] = u - m), (t[6] = p + g), (t[10] = 1 - (c + d)), (t[3] = 0), (t[7] = 0), (t[11] = 0), (t[12] = 0), (t[13] = 0), (t[14] = 0), (t[15] = 1), this ) }, lookAt: function (e, t, i) { void 0 === oe && (oe = new Ci.Vector3()), void 0 === ae && (ae = new Ci.Vector3()), void 0 === se && (se = new Ci.Vector3()) var n = this.elements return ( se.subVectors(e, t).normalize(), 0 === se.lengthSq() && (se.z = 1), oe.crossVectors(i, se).normalize(), 0 === oe.lengthSq() && ((se.x += 1e-4), oe.crossVectors(i, se).normalize()), ae.crossVectors(se, oe), (n[0] = oe.x), (n[4] = ae.x), (n[8] = se.x), (n[1] = oe.y), (n[5] = ae.y), (n[9] = se.y), (n[2] = oe.z), (n[6] = ae.z), (n[10] = se.z), this ) }, multiply: function (e, t) { return void 0 !== t ? (console.warn('THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.'), this.multiplyMatrices(e, t)) : this.multiplyMatrices(this, e) }, multiplyMatrices: function (e, t) { var i = e.elements, n = t.elements, r = this.elements, o = i[0], a = i[4], s = i[8], l = i[12], c = i[1], h = i[5], u = i[9], d = i[13], p = i[2], f = i[6], g = i[10], m = i[14], v = i[3], y = i[7], A = i[11], C = i[15], I = n[0], E = n[4], _ = n[8], b = n[12], w = n[1], T = n[5], x = n[9], S = n[13], M = n[2], R = n[6], P = n[10], O = n[14], L = n[3], D = n[7], N = n[11], F = n[15] return ( (r[0] = o * I + a * w + s * M + l * L), (r[4] = o * E + a * T + s * R + l * D), (r[8] = o * _ + a * x + s * P + l * N), (r[12] = o * b + a * S + s * O + l * F), (r[1] = c * I + h * w + u * M + d * L), (r[5] = c * E + h * T + u * R + d * D), (r[9] = c * _ + h * x + u * P + d * N), (r[13] = c * b + h * S + u * O + d * F), (r[2] = p * I + f * w + g * M + m * L), (r[6] = p * E + f * T + g * R + m * D), (r[10] = p * _ + f * x + g * P + m * N), (r[14] = p * b + f * S + g * O + m * F), (r[3] = v * I + y * w + A * M + C * L), (r[7] = v * E + y * T + A * R + C * D), (r[11] = v * _ + y * x + A * P + C * N), (r[15] = v * b + y * S + A * O + C * F), this ) }, multiplyToArray: function (e, t, i) { var n = this.elements return ( this.multiplyMatrices(e, t), (i[0] = n[0]), (i[1] = n[1]), (i[2] = n[2]), (i[3] = n[3]), (i[4] = n[4]), (i[5] = n[5]), (i[6] = n[6]), (i[7] = n[7]), (i[8] = n[8]), (i[9] = n[9]), (i[10] = n[10]), (i[11] = n[11]), (i[12] = n[12]), (i[13] = n[13]), (i[14] = n[14]), (i[15] = n[15]), this ) }, multiplyScalar: function (e) { var t = this.elements return ( (t[0] *= e), (t[4] *= e), (t[8] *= e), (t[12] *= e), (t[1] *= e), (t[5] *= e), (t[9] *= e), (t[13] *= e), (t[2] *= e), (t[6] *= e), (t[10] *= e), (t[14] *= e), (t[3] *= e), (t[7] *= e), (t[11] *= e), (t[15] *= e), this ) }, applyToVector3Array: function (e, t, i) { void 0 === re && (re = new Ci.Vector3()), void 0 === t && (t = 0), void 0 === i && (i = e.length) for (var n = 0, r = t; n < i; n += 3, r += 3) re.fromArray(e, r), re.applyMatrix4(this), re.toArray(e, r) return e }, applyToBuffer: function (e, t, i) { void 0 === ne && (ne = new Ci.Vector3()), void 0 === t && (t = 0), void 0 === i && (i = e.length / e.itemSize) for (var n = 0, r = t; n < i; n++, r++) (ne.x = e.getX(r)), (ne.y = e.getY(r)), (ne.z = e.getZ(r)), ne.applyMatrix4(this), e.setXYZ(ne.x, ne.y, ne.z) return e }, determinant: function () { var e = this.elements, t = e[0], i = e[4], n = e[8], r = e[12], o = e[1], a = e[5], s = e[9], l = e[13], c = e[2], h = e[6], u = e[10], d = e[14] return ( e[3] * (+r * s * h - n * l * h - r * a * u + i * l * u + n * a * d - i * s * d) + e[7] * (+t * s * d - t * l * u + r * o * u - n * o * d + n * l * c - r * s * c) + e[11] * (+t * l * h - t * a * d - r * o * h + i * o * d + r * a * c - i * l * c) + e[15] * (-n * a * c - t * s * h + t * a * u + n * o * h - i * o * u + i * s * c) ) }, transpose: function () { var e, t = this.elements return ( (e = t[1]), (t[1] = t[4]), (t[4] = e), (e = t[2]), (t[2] = t[8]), (t[8] = e), (e = t[6]), (t[6] = t[9]), (t[9] = e), (e = t[3]), (t[3] = t[12]), (t[12] = e), (e = t[7]), (t[7] = t[13]), (t[13] = e), (e = t[11]), (t[11] = t[14]), (t[14] = e), this ) }, flattenToArrayOffset: function (e, t) { var i = this.elements return ( (e[t] = i[0]), (e[t + 1] = i[1]), (e[t + 2] = i[2]), (e[t + 3] = i[3]), (e[t + 4] = i[4]), (e[t + 5] = i[5]), (e[t + 6] = i[6]), (e[t + 7] = i[7]), (e[t + 8] = i[8]), (e[t + 9] = i[9]), (e[t + 10] = i[10]), (e[t + 11] = i[11]), (e[t + 12] = i[12]), (e[t + 13] = i[13]), (e[t + 14] = i[14]), (e[t + 15] = i[15]), e ) }, getPosition: function () { return ( void 0 === ie && (ie = new Ci.Vector3()), console.warn('THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.'), ie.setFromMatrixColumn(this, 3) ) }, setPosition: function (e) { var t = this.elements return (t[12] = e.x), (t[13] = e.y), (t[14] = e.z), this }, getInverse: function (e, t) { var i = this.elements, n = e.elements, r = n[0], o = n[1], a = n[2], s = n[3], l = n[4], c = n[5], h = n[6], u = n[7], d = n[8], p = n[9], f = n[10], g = n[11], m = n[12], v = n[13], y = n[14], A = n[15], C = p * y * u - v * f * u + v * h * g - c * y * g - p * h * A + c * f * A, I = m * f * u - d * y * u - m * h * g + l * y * g + d * h * A - l * f * A, E = d * v * u - m * p * u + m * c * g - l * v * g - d * c * A + l * p * A, _ = m * p * h - d * v * h - m * c * f + l * v * f + d * c * y - l * p * y, b = r * C + o * I + a * E + s * _ if (0 != b) return ( (i[0] = C), (i[1] = v * f * s - p * y * s - v * a * g + o * y * g + p * a * A - o * f * A), (i[2] = c * y * s - v * h * s + v * a * u - o * y * u - c * a * A + o * h * A), (i[3] = p * h * s - c * f * s - p * a * u + o * f * u + c * a * g - o * h * g), (i[4] = I), (i[5] = d * y * s - m * f * s + m * a * g - r * y * g - d * a * A + r * f * A), (i[6] = m * h * s - l * y * s - m * a * u + r * y * u + l * a * A - r * h * A), (i[7] = l * f * s - d * h * s + d * a * u - r * f * u - l * a * g + r * h * g), (i[8] = E), (i[9] = m * p * s - d * v * s - m * o * g + r * v * g + d * o * A - r * p * A), (i[10] = l * v * s - m * c * s + m * o * u - r * v * u - l * o * A + r * c * A), (i[11] = d * c * s - l * p * s - d * o * u + r * p * u + l * o * g - r * c * g), (i[12] = _), (i[13] = d * v * a - m * p * a + m * o * f - r * v * f - d * o * y + r * p * y), (i[14] = m * c * a - l * v * a - m * o * h + r * v * h + l * o * y - r * c * y), (i[15] = l * p * a - d * c * a + d * o * h - r * p * h - l * o * f + r * c * f), this.multiplyScalar(1 / b) ) var w = "THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0" if (t) throw new Error(w) return console.warn(w), this.identity() }, scale: function (e) { var t = this.elements, i = e.x, n = e.y, r = e.z return (t[0] *= i), (t[4] *= n), (t[8] *= r), (t[1] *= i), (t[5] *= n), (t[9] *= r), (t[2] *= i), (t[6] *= n), (t[10] *= r), (t[3] *= i), (t[7] *= n), (t[11] *= r), this }, getMaxScaleOnAxis: function () { var e = this.elements, t = e[0] * e[0] + e[1] * e[1] + e[2] * e[2], i = e[4] * e[4] + e[5] * e[5] + e[6] * e[6], n = e[8] * e[8] + e[9] * e[9] + e[10] * e[10] return Math.sqrt(Math.max(t, i, n)) }, makeTranslation: function (e, t, i) { return this.set(1, 0, 0, e, 0, 1, 0, t, 0, 0, 1, i, 0, 0, 0, 1), this }, makeRotationX: function (e) { var t = Math.cos(e), i = Math.sin(e) return this.set(1, 0, 0, 0, 0, t, -i, 0, 0, i, t, 0, 0, 0, 0, 1), this }, makeRotationY: function (e) { var t = Math.cos(e), i = Math.sin(e) return this.set(t, 0, i, 0, 0, 1, 0, 0, -i, 0, t, 0, 0, 0, 0, 1), this }, makeRotationZ: function (e) { var t = Math.cos(e), i = Math.sin(e) return this.set(t, -i, 0, 0, i, t, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this }, makeRotationAxis: function (e, t) { var i = Math.cos(t), n = Math.sin(t), r = 1 - i, o = e.x, a = e.y, s = e.z, l = r * o, c = r * a return this.set(l * o + i, l * a - n * s, l * s + n * a, 0, l * a + n * s, c * a + i, c * s - n * o, 0, l * s - n * a, c * s + n * o, r * s * s + i, 0, 0, 0, 0, 1), this }, makeScale: function (e, t, i) { return this.set(e, 0, 0, 0, 0, t, 0, 0, 0, 0, i, 0, 0, 0, 0, 1), this }, compose: function (e, t, i) { return this.makeRotationFromQuaternion(t), this.scale(i), this.setPosition(e), this }, decompose: function (e, t, i) { void 0 === ee && (ee = new Ci.Vector3()), void 0 === te && (te = new Ci.Matrix4()) var n = this.elements, r = ee.set(n[0], n[1], n[2]).length(), o = ee.set(n[4], n[5], n[6]).length(), a = ee.set(n[8], n[9], n[10]).length() this.determinant() < 0 && (r = -r), (e.x = n[12]), (e.y = n[13]), (e.z = n[14]), te.elements.set(this.elements) var s = 1 / r, l = 1 / o, c = 1 / a return ( (te.elements[0] *= s), (te.elements[1] *= s), (te.elements[2] *= s), (te.elements[4] *= l), (te.elements[5] *= l), (te.elements[6] *= l), (te.elements[8] *= c), (te.elements[9] *= c), (te.elements[10] *= c), t.setFromRotationMatrix(te), (i.x = r), (i.y = o), (i.z = a), this ) }, makeFrustum: function (e, t, i, n, r, o) { var a = this.elements, s = (2 * r) / (t - e), l = (2 * r) / (n - i), c = (t + e) / (t - e), h = (n + i) / (n - i), u = -(o + r) / (o - r), d = (-2 * o * r) / (o - r) return ( (a[0] = s), (a[4] = 0), (a[8] = c), (a[12] = 0), (a[1] = 0), (a[5] = l), (a[9] = h), (a[13] = 0), (a[2] = 0), (a[6] = 0), (a[10] = u), (a[14] = d), (a[3] = 0), (a[7] = 0), (a[11] = -1), (a[15] = 0), this ) }, makePerspective: function (e, t, i, n) { var r = i * Math.tan(Ci.Math.degToRad(0.5 * e)), o = -r, a = o * t, s = r * t return this.makeFrustum(a, s, o, r, i, n) }, makeOrthographic: function (e, t, i, n, r, o) { var a = this.elements, s = 1 / (t - e), l = 1 / (i - n), c = 1 / (o - r), h = (t + e) * s, u = (i + n) * l, d = (o + r) * c return ( (a[0] = 2 * s), (a[4] = 0), (a[8] = 0), (a[12] = -h), (a[1] = 0), (a[5] = 2 * l), (a[9] = 0), (a[13] = -u), (a[2] = 0), (a[6] = 0), (a[10] = -2 * c), (a[14] = -d), (a[3] = 0), (a[7] = 0), (a[11] = 0), (a[15] = 1), this ) }, equals: function (e) { for (var t = this.elements, i = e.elements, n = 0; n < 16; n++) if (t[n] !== i[n]) return !1 return !0 }, fromArray: function (e) { return this.elements.set(e), this }, toArray: function () { var e = this.elements return [e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10], e[11], e[12], e[13], e[14], e[15]] } }), (Ci.Ray = function (e, t) { ;(this.origin = void 0 !== e ? e : new Ci.Vector3()), (this.direction = void 0 !== t ? t : new Ci.Vector3()) }), (Ci.Ray.prototype = { constructor: Ci.Ray, set: function (e, t) { return this.origin.copy(e), this.direction.copy(t), this }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return this.origin.copy(e.origin), this.direction.copy(e.direction), this }, at: function (e, t) { return (t || new Ci.Vector3()).copy(this.direction).multiplyScalar(e).add(this.origin) }, lookAt: function (e) { this.direction.copy(e).sub(this.origin).normalize() }, recast: (($ = new Ci.Vector3()), function (e) { return this.origin.copy(this.at(e, $)), this }), closestPointToPoint: function (e, t) { var i = t || new Ci.Vector3() i.subVectors(e, this.origin) var n = i.dot(this.direction) return n < 0 ? i.copy(this.origin) : i.copy(this.direction).multiplyScalar(n).add(this.origin) }, distanceToPoint: function (e) { return Math.sqrt(this.distanceSqToPoint(e)) }, distanceSqToPoint: ((J = new Ci.Vector3()), function (e) { var t = J.subVectors(e, this.origin).dot(this.direction) return t < 0 ? this.origin.distanceToSquared(e) : (J.copy(this.direction).multiplyScalar(t).add(this.origin), J.distanceToSquared(e)) }), distanceSqToSegment: ((Z = new Ci.Vector3()), (K = new Ci.Vector3()), (Q = new Ci.Vector3()), function (e, t, i, n) { Z.copy(e).add(t).multiplyScalar(0.5), K.copy(t).sub(e).normalize(), Q.copy(this.origin).sub(Z) var r, o, a, s, l = 0.5 * e.distanceTo(t), c = -this.direction.dot(K), h = Q.dot(this.direction), u = -Q.dot(K), d = Q.lengthSq(), p = Math.abs(1 - c * c) if (0 < p) if (((o = c * h - u), (s = l * p), 0 <= (r = c * u - h))) if (-s <= o) if (o <= s) { var f = 1 / p a = (r *= f) * (r + c * (o *= f) + 2 * h) + o * (c * r + o + 2 * u) + d } else (o = l), (a = -(r = Math.max(0, -(c * o + h))) * r + o * (o + 2 * u) + d) else (o = -l), (a = -(r = Math.max(0, -(c * o + h))) * r + o * (o + 2 * u) + d) else a = o <= -s ? -(r = Math.max(0, -(-c * l + h))) * r + (o = 0 < r ? -l : Math.min(Math.max(-l, -u), l)) * (o + 2 * u) + d : o <= s ? ((r = 0), (o = Math.min(Math.max(-l, -u), l)) * (o + 2 * u) + d) : -(r = Math.max(0, -(c * l + h))) * r + (o = 0 < r ? l : Math.min(Math.max(-l, -u), l)) * (o + 2 * u) + d else (o = 0 < c ? -l : l), (a = -(r = Math.max(0, -(c * o + h))) * r + o * (o + 2 * u) + d) return i && i.copy(this.direction).multiplyScalar(r).add(this.origin), n && n.copy(K).multiplyScalar(o).add(Z), a }), intersectSphere: ((X = new Ci.Vector3()), function (e, t) { X.subVectors(e.center, this.origin) var i = X.dot(this.direction), n = X.dot(X) - i * i, r = e.radius * e.radius if (r < n) return null var o = Math.sqrt(r - n), a = i - o, s = i + o return a < 0 && s < 0 ? null : a < 0 ? this.at(s, t) : this.at(a, t) }), intersectsSphere: function (e) { return this.distanceToPoint(e.center) <= e.radius }, distanceToPlane: function (e) { var t = e.normal.dot(this.direction) if (0 === t) return 0 === e.distanceToPoint(this.origin) ? 0 : null var i = -(this.origin.dot(e.normal) + e.constant) / t return 0 <= i ? i : null }, intersectPlane: function (e, t) { var i = this.distanceToPlane(e) return null === i ? null : this.at(i, t) }, intersectsPlane: function (e) { var t = e.distanceToPoint(this.origin) return 0 === t || e.normal.dot(this.direction) * t < 0 }, intersectBox: function (e, t) { var i, n, r, o, a, s, l = 1 / this.direction.x, c = 1 / this.direction.y, h = 1 / this.direction.z, u = this.origin return ( (n = 0 <= l ? ((i = (e.min.x - u.x) * l), (e.max.x - u.x) * l) : ((i = (e.max.x - u.x) * l), (e.min.x - u.x) * l)), (o = 0 <= c ? ((r = (e.min.y - u.y) * c), (e.max.y - u.y) * c) : ((r = (e.max.y - u.y) * c), (e.min.y - u.y) * c)) < i || n < r ? null : ((i < r || i != i) && (i = r), (o < n || n != n) && (n = o), (s = 0 <= h ? ((a = (e.min.z - u.z) * h), (e.max.z - u.z) * h) : ((a = (e.max.z - u.z) * h), (e.min.z - u.z) * h)) < i || n < a ? null : ((i < a || i != i) && (i = a), (s < n || n != n) && (n = s), n < 0 ? null : this.at(0 <= i ? i : n, t))) ) }, intersectsBox: ((q = new Ci.Vector3()), function (e) { return null !== this.intersectBox(e, q) }), intersectTriangle: ((G = new Ci.Vector3()), (W = new Ci.Vector3()), (j = new Ci.Vector3()), (Y = new Ci.Vector3()), function (e, t, i, n, r) { W.subVectors(t, e), j.subVectors(i, e), Y.crossVectors(W, j) var o, a = this.direction.dot(Y) if (0 < a) { if (n) return null o = 1 } else { if (!(a < 0)) return null ;(o = -1), (a = -a) } G.subVectors(this.origin, e) var s = o * this.direction.dot(j.crossVectors(G, j)) if (s < 0) return null var l = o * this.direction.dot(W.cross(G)) if (l < 0) return null if (a < s + l) return null var c = -o * G.dot(Y) return c < 0 ? null : this.at(c / a, r) }), applyMatrix4: function (e) { return this.direction.add(this.origin).applyMatrix4(e), this.origin.applyMatrix4(e), this.direction.sub(this.origin), this.direction.normalize(), this }, equals: function (e) { return e.origin.equals(this.origin) && e.direction.equals(this.direction) } }), (Ci.Sphere = function (e, t) { ;(this.center = void 0 !== e ? e : new Ci.Vector3()), (this.radius = void 0 !== t ? t : 0) }), (Ci.Sphere.prototype = { constructor: Ci.Sphere, set: function (e, t) { return this.center.copy(e), (this.radius = t), this }, setFromPoints: ((z = new Ci.Box3()), function (e, t) { var i = this.center void 0 !== t ? i.copy(t) : z.setFromPoints(e).center(i) for (var n = 0, r = 0, o = e.length; r < o; r++) n = Math.max(n, i.distanceToSquared(e[r])) return (this.radius = Math.sqrt(n)), this }), clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return this.center.copy(e.center), (this.radius = e.radius), this }, empty: function () { return this.radius <= 0 }, containsPoint: function (e) { return e.distanceToSquared(this.center) <= this.radius * this.radius }, distanceToPoint: function (e) { return e.distanceTo(this.center) - this.radius }, intersectsSphere: function (e) { var t = this.radius + e.radius return e.center.distanceToSquared(this.center) <= t * t }, intersectsBox: function (e) { return e.intersectsSphere(this) }, intersectsPlane: function (e) { return Math.abs(this.center.dot(e.normal) - e.constant) <= this.radius }, clampPoint: function (e, t) { var i = this.center.distanceToSquared(e), n = t || new Ci.Vector3() return n.copy(e), i > this.radius * this.radius && (n.sub(this.center).normalize(), n.multiplyScalar(this.radius).add(this.center)), n }, getBoundingBox: function (e) { var t = e || new Ci.Box3() return t.set(this.center, this.center), t.expandByScalar(this.radius), t }, applyMatrix4: function (e) { return this.center.applyMatrix4(e), (this.radius = this.radius * e.getMaxScaleOnAxis()), this }, translate: function (e) { return this.center.add(e), this }, equals: function (e) { return e.center.equals(this.center) && e.radius === this.radius } }), (Ci.Frustum = function (e, t, i, n, r, o) { this.planes = [ void 0 !== e ? e : new Ci.Plane(), void 0 !== t ? t : new Ci.Plane(), void 0 !== i ? i : new Ci.Plane(), void 0 !== n ? n : new Ci.Plane(), void 0 !== r ? r : new Ci.Plane(), void 0 !== o ? o : new Ci.Plane() ] }), (Ci.Frustum.prototype = { constructor: Ci.Frustum, set: function (e, t, i, n, r, o) { var a = this.planes return a[0].copy(e), a[1].copy(t), a[2].copy(i), a[3].copy(n), a[4].copy(r), a[5].copy(o), this }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { for (var t = this.planes, i = 0; i < 6; i++) t[i].copy(e.planes[i]) return this }, setFromMatrix: function (e) { var t = this.planes, i = e.elements, n = i[0], r = i[1], o = i[2], a = i[3], s = i[4], l = i[5], c = i[6], h = i[7], u = i[8], d = i[9], p = i[10], f = i[11], g = i[12], m = i[13], v = i[14], y = i[15] return ( t[0].setComponents(a - n, h - s, f - u, y - g).normalize(), t[1].setComponents(a + n, h + s, f + u, y + g).normalize(), t[2].setComponents(a + r, h + l, f + d, y + m).normalize(), t[3].setComponents(a - r, h - l, f - d, y - m).normalize(), t[4].setComponents(a - o, h - c, f - p, y - v).normalize(), t[5].setComponents(a + o, h + c, f + p, y + v).normalize(), this ) }, intersectsObject: ((H = new Ci.Sphere()), function (e) { var t = e.geometry return null === t.boundingSphere && t.computeBoundingSphere(), H.copy(t.boundingSphere), H.applyMatrix4(e.matrixWorld), this.intersectsSphere(H) }), intersectsSphere: function (e) { for (var t = this.planes, i = e.center, n = -e.radius, r = 0; r < 6; r++) { if (t[r].distanceToPoint(i) < n) return !1 } return !0 }, intersectsBox: ((k = new Ci.Vector3()), (U = new Ci.Vector3()), function (e) { for (var t = this.planes, i = 0; i < 6; i++) { var n = t[i] ;(k.x = 0 < n.normal.x ? e.min.x : e.max.x), (U.x = 0 < n.normal.x ? e.max.x : e.min.x), (k.y = 0 < n.normal.y ? e.min.y : e.max.y), (U.y = 0 < n.normal.y ? e.max.y : e.min.y), (k.z = 0 < n.normal.z ? e.min.z : e.max.z), (U.z = 0 < n.normal.z ? e.max.z : e.min.z) var r = n.distanceToPoint(k), o = n.distanceToPoint(U) if (r < 0 && o < 0) return !1 } return !0 }), containsPoint: function (e) { for (var t = this.planes, i = 0; i < 6; i++) if (t[i].distanceToPoint(e) < 0) return !1 return !0 } }), (Ci.Plane = function (e, t) { ;(this.normal = void 0 !== e ? e : new Ci.Vector3(1, 0, 0)), (this.constant = void 0 !== t ? t : 0) }), (Ci.Plane.prototype = { constructor: Ci.Plane, set: function (e, t) { return this.normal.copy(e), (this.constant = t), this }, setComponents: function (e, t, i, n) { return this.normal.set(e, t, i), (this.constant = n), this }, setFromNormalAndCoplanarPoint: function (e, t) { return this.normal.copy(e), (this.constant = -t.dot(this.normal)), this }, setFromCoplanarPoints: ((B = new Ci.Vector3()), (V = new Ci.Vector3()), function (e, t, i) { var n = B.subVectors(i, t).cross(V.subVectors(e, t)).normalize() return this.setFromNormalAndCoplanarPoint(n, e), this }), clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return this.normal.copy(e.normal), (this.constant = e.constant), this }, normalize: function () { var e = 1 / this.normal.length() return this.normal.multiplyScalar(e), (this.constant *= e), this }, negate: function () { return (this.constant *= -1), this.normal.negate(), this }, distanceToPoint: function (e) { return this.normal.dot(e) + this.constant }, distanceToSphere: function (e) { return this.distanceToPoint(e.center) - e.radius }, projectPoint: function (e, t) { return this.orthoPoint(e, t).sub(e).negate() }, orthoPoint: function (e, t) { var i = this.distanceToPoint(e) return (t || new Ci.Vector3()).copy(this.normal).multiplyScalar(i) }, intersectLine: ((F = new Ci.Vector3()), function (e, t) { var i = t || new Ci.Vector3(), n = e.delta(F), r = this.normal.dot(n) if (0 !== r) { var o = -(e.start.dot(this.normal) + this.constant) / r if (!(o < 0 || 1 < o)) return i.copy(n).multiplyScalar(o).add(e.start) } else if (0 === this.distanceToPoint(e.start)) return i.copy(e.start) }), intersectsLine: function (e) { var t = this.distanceToPoint(e.start), i = this.distanceToPoint(e.end) return (t < 0 && 0 < i) || (i < 0 && 0 < t) }, intersectsBox: function (e) { return e.intersectsPlane(this) }, intersectsSphere: function (e) { return e.intersectsPlane(this) }, coplanarPoint: function (e) { return (e || new Ci.Vector3()).copy(this.normal).multiplyScalar(-this.constant) }, applyMatrix4: ((L = new Ci.Vector3()), (D = new Ci.Vector3()), (N = new Ci.Matrix3()), function (e, t) { var i = t || N.getNormalMatrix(e), n = L.copy(this.normal).applyMatrix3(i), r = this.coplanarPoint(D) return r.applyMatrix4(e), this.setFromNormalAndCoplanarPoint(n, r), this }), translate: function (e) { return (this.constant = this.constant - e.dot(this.normal)), this }, equals: function (e) { return e.normal.equals(this.normal) && e.constant === this.constant } }), (Ci.Spherical = function (e, t, i) { return (this.radius = void 0 !== e ? e : 1), (this.phi = void 0 !== t ? t : 0), (this.theta = void 0 !== i ? i : 0), this }), (Ci.Spherical.prototype = { constructor: Ci.Spherical, set: function (e, t, i) { ;(this.radius = e), (this.phi = t), (this.theta = i) }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return this.radius.copy(e.radius), this.phi.copy(e.phi), this.theta.copy(e.theta), this }, makeSafe: function () { this.phi = Math.max(1e-6, Math.min(Math.PI - 1e-6, this.phi)) }, setFromVector3: function (e) { return ( (this.radius = e.length()), 0 === this.radius ? ((this.theta = 0), (this.phi = 0)) : ((this.theta = Math.atan2(e.x, e.z)), (this.phi = Math.acos(Ci.Math.clamp(e.y / this.radius, -1, 1)))), this ) } }), (Ci.Math = { generateUUID: ((R = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')), (P = new Array(36)), (O = 0), function () { for (var e = 0; e < 36; e++) 8 === e || 13 === e || 18 === e || 23 === e ? (P[e] = '-') : 14 === e ? (P[e] = '4') : (O <= 2 && (O = (33554432 + 16777216 * Math.random()) | 0), (M = 15 & O), (O >>= 4), (P[e] = R[19 === e ? (3 & M) | 8 : M])) return P.join('') }), clamp: function (e, t, i) { return Math.max(t, Math.min(i, e)) }, euclideanModulo: function (e, t) { return ((e % t) + t) % t }, mapLinear: function (e, t, i, n, r) { return n + ((e - t) * (r - n)) / (i - t) }, smoothstep: function (e, t, i) { return e <= t ? 0 : i <= e ? 1 : (e = (e - t) / (i - t)) * e * (3 - 2 * e) }, smootherstep: function (e, t, i) { return e <= t ? 0 : i <= e ? 1 : (e = (e - t) / (i - t)) * e * e * (e * (6 * e - 15) + 10) }, random16: function () { return console.warn('THREE.Math.random16() has been deprecated. Use Math.random() instead.'), Math.random() }, randInt: function (e, t) { return e + Math.floor(Math.random() * (t - e + 1)) }, randFloat: function (e, t) { return e + Math.random() * (t - e) }, randFloatSpread: function (e) { return e * (0.5 - Math.random()) }, degToRad: ((S = Math.PI / 180), function (e) { return e * S }), radToDeg: ((x = 180 / Math.PI), function (e) { return e * x }), isPowerOfTwo: function (e) { return 0 == (e & (e - 1)) && 0 !== e }, nearestPowerOfTwo: function (e) { return Math.pow(2, Math.round(Math.log(e) / Math.LN2)) }, nextPowerOfTwo: function (e) { return e--, (e |= e >> 1), (e |= e >> 2), (e |= e >> 4), (e |= e >> 8), (e |= e >> 16), ++e } }), (Ci.Spline = function (e) { function t(e, t, i, n, r, o, a) { var s = 0.5 * (i - e), l = 0.5 * (n - t) return (2 * (t - i) + s + l) * a + (-3 * (t - i) - 2 * s - l) * o + s * r + t } this.points = e var i, n, r, o, a, s, l, c, h, u = [], d = { x: 0, y: 0, z: 0 } ;(this.initFromArray = function (e) { this.points = [] for (var t = 0; t < e.length; t++) this.points[t] = { x: e[t][0], y: e[t][1], z: e[t][2] } }), (this.getPoint = function (e) { return ( (i = (this.points.length - 1) * e), (n = Math.floor(i)), (r = i - n), (u[0] = 0 === n ? n : n - 1), (u[1] = n), (u[2] = n > this.points.length - 2 ? this.points.length - 1 : n + 1), (u[3] = n > this.points.length - 3 ? this.points.length - 1 : n + 2), (s = this.points[u[0]]), (l = this.points[u[1]]), (c = this.points[u[2]]), (h = this.points[u[3]]), (a = r * (o = r * r)), (d.x = t(s.x, l.x, c.x, h.x, r, o, a)), (d.y = t(s.y, l.y, c.y, h.y, r, o, a)), (d.z = t(s.z, l.z, c.z, h.z, r, o, a)), d ) }), (this.getControlPointsArray = function () { var e, t, i = this.points.length, n = [] for (e = 0; e < i; e++) (t = this.points[e]), (n[e] = [t.x, t.y, t.z]) return n }), (this.getLength = function (e) { var t, i, n, r, o = 0, a = 0, s = 0, l = new Ci.Vector3(), c = new Ci.Vector3(), h = [], u = 0 for (h[0] = 0, e = e || 100, n = this.points.length * e, l.copy(this.points[0]), t = 1; t < n; t++) (i = t / n), (r = this.getPoint(i)), c.copy(r), (u += c.distanceTo(l)), l.copy(r), (o = (this.points.length - 1) * i), (a = Math.floor(o)) !== s && ((h[a] = u), (s = a)) return ( (h[h.length] = u), { chunks: h, total: u } ) }), (this.reparametrizeByArcLength = function (e) { var t, i, n, r, o, a, s, l, c = [], h = new Ci.Vector3(), u = this.getLength() for (c.push(h.copy(this.points[0]).clone()), t = 1; t < this.points.length; t++) { for (a = u.chunks[t] - u.chunks[t - 1], s = Math.ceil((e * a) / u.total), r = (t - 1) / (this.points.length - 1), o = t / (this.points.length - 1), i = 1; i < s - 1; i++) (n = r + i * (1 / s) * (o - r)), (l = this.getPoint(n)), c.push(h.copy(l).clone()) c.push(h.copy(this.points[t]).clone()) } this.points = c }) }), (Ci.Triangle = function (e, t, i) { ;(this.a = void 0 !== e ? e : new Ci.Vector3()), (this.b = void 0 !== t ? t : new Ci.Vector3()), (this.c = void 0 !== i ? i : new Ci.Vector3()) }), (Ci.Triangle.normal = ((T = new Ci.Vector3()), function (e, t, i, n) { var r = n || new Ci.Vector3() r.subVectors(i, t), T.subVectors(e, t), r.cross(T) var o = r.lengthSq() return 0 < o ? r.multiplyScalar(1 / Math.sqrt(o)) : r.set(0, 0, 0) })), (Ci.Triangle.barycoordFromPoint = ((_ = new Ci.Vector3()), (b = new Ci.Vector3()), (w = new Ci.Vector3()), function (e, t, i, n, r) { _.subVectors(n, t), b.subVectors(i, t), w.subVectors(e, t) var o = _.dot(_), a = _.dot(b), s = _.dot(w), l = b.dot(b), c = b.dot(w), h = o * l - a * a, u = r || new Ci.Vector3() if (0 == h) return u.set(-2, -1, -1) var d = 1 / h, p = (l * s - a * c) * d, f = (o * c - a * s) * d return u.set(1 - p - f, f, p) })), (Ci.Triangle.containsPoint = ((E = new Ci.Vector3()), function (e, t, i, n) { var r = Ci.Triangle.barycoordFromPoint(e, t, i, n, E) return 0 <= r.x && 0 <= r.y && r.x + r.y <= 1 })), (Ci.Triangle.prototype = { constructor: Ci.Triangle, set: function (e, t, i) { return this.a.copy(e), this.b.copy(t), this.c.copy(i), this }, setFromPointsAndIndices: function (e, t, i, n) { return this.a.copy(e[t]), this.b.copy(e[i]), this.c.copy(e[n]), this }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return this.a.copy(e.a), this.b.copy(e.b), this.c.copy(e.c), this }, area: ((C = new Ci.Vector3()), (I = new Ci.Vector3()), function () { return C.subVectors(this.c, this.b), I.subVectors(this.a, this.b), 0.5 * C.cross(I).length() }), midpoint: function (e) { return (e || new Ci.Vector3()) .addVectors(this.a, this.b) .add(this.c) .multiplyScalar(1 / 3) }, normal: function (e) { return Ci.Triangle.normal(this.a, this.b, this.c, e) }, plane: function (e) { return (e || new Ci.Plane()).setFromCoplanarPoints(this.a, this.b, this.c) }, barycoordFromPoint: function (e, t) { return Ci.Triangle.barycoordFromPoint(e, this.a, this.b, this.c, t) }, containsPoint: function (e) { return Ci.Triangle.containsPoint(e, this.a, this.b, this.c) }, equals: function (e) { return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c) } }), (Ci.Interpolant = function (e, t, i, n) { ;(this.parameterPositions = e), (this._cachedIndex = 0), (this.resultBuffer = void 0 !== n ? n : new t.constructor(i)), (this.sampleValues = t), (this.valueSize = i) }), (Ci.Interpolant.prototype = { constructor: Ci.Interpolant, evaluate: function (e) { var t = this.parameterPositions, i = this._cachedIndex, n = t[i], r = t[i - 1] e: { t: { var o i: { n: if (!(e < n)) { for (var a = i + 2; ; ) { if (void 0 === n) { if (e < r) break n return (i = t.length), (this._cachedIndex = i), this.afterEnd_(i - 1, e, r) } if (i === a) break if (((r = n), e < (n = t[++i]))) break t } o = t.length break i } if (r <= e) break e var s = t[1] e < s && ((i = 2), (r = s)) for (a = i - 2; ; ) { if (void 0 === r) return (this._cachedIndex = 0), this.beforeStart_(0, e, n) if (i === a) break if (((n = r), (r = t[--i - 1]) <= e)) break t } ;(o = i), (i = 0) } for (; i < o; ) { var l = (i + o) >>> 1 e < t[l] ? (o = l) : (i = 1 + l) } if (((n = t[i]), void 0 === (r = t[i - 1]))) return (this._cachedIndex = 0), this.beforeStart_(0, e, n) if (void 0 === n) return (i = t.length), (this._cachedIndex = i), this.afterEnd_(i - 1, r, e) } ;(this._cachedIndex = i), this.intervalChanged_(i, r, n) } return this.interpolate_(i, r, e, n) }, settings: null, DefaultSettings_: {}, getSettings_: function () { return this.settings || this.DefaultSettings_ }, copySampleValue_: function (e) { for (var t = this.resultBuffer, i = this.sampleValues, n = this.valueSize, r = e * n, o = 0; o !== n; ++o) t[o] = i[r + o] return t }, interpolate_: function (e, t, i, n) { throw new Error('call to abstract method') }, intervalChanged_: function (e, t, i) {} }), Object.assign(Ci.Interpolant.prototype, { beforeStart_: Ci.Interpolant.prototype.copySampleValue_, afterEnd_: Ci.Interpolant.prototype.copySampleValue_ }), (Ci.CubicInterpolant = function (e, t, i, n) { Ci.Interpolant.call(this, e, t, i, n), (this._weightPrev = -0), (this._offsetPrev = -0), (this._weightNext = -0), (this._offsetNext = -0) }), (Ci.CubicInterpolant.prototype = Object.assign(Object.create(Ci.Interpolant.prototype), { constructor: Ci.CubicInterpolant, DefaultSettings_: { endingStart: Ci.ZeroCurvatureEnding, endingEnd: Ci.ZeroCurvatureEnding }, intervalChanged_: function (e, t, i) { var n = this.parameterPositions, r = e - 2, o = e + 1, a = n[r], s = n[o] if (void 0 === a) switch (this.getSettings_().endingStart) { case Ci.ZeroSlopeEnding: ;(r = e), (a = 2 * t - i) break case Ci.WrapAroundEnding: a = t + n[(r = n.length - 2)] - n[r + 1] break default: ;(r = e), (a = i) } if (void 0 === s) switch (this.getSettings_().endingEnd) { case Ci.ZeroSlopeEnding: ;(o = e), (s = 2 * i - t) break case Ci.WrapAroundEnding: s = i + n[(o = 1)] - n[0] break default: ;(o = e - 1), (s = t) } var l = 0.5 * (i - t), c = this.valueSize ;(this._weightPrev = l / (t - a)), (this._weightNext = l / (s - i)), (this._offsetPrev = r * c), (this._offsetNext = o * c) }, interpolate_: function (e, t, i, n) { for ( var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = s - a, c = this._offsetPrev, h = this._offsetNext, u = this._weightPrev, d = this._weightNext, p = (i - t) / (n - t), f = p * p, g = f * p, m = -u * g + 2 * u * f - u * p, v = (1 + u) * g + (-1.5 - 2 * u) * f + (-0.5 + u) * p + 1, y = (-1 - d) * g + (1.5 + d) * f + 0.5 * p, A = d * g - d * f, C = 0; C !== a; ++C ) r[C] = m * o[c + C] + v * o[l + C] + y * o[s + C] + A * o[h + C] return r } })), (Ci.DiscreteInterpolant = function (e, t, i, n) { Ci.Interpolant.call(this, e, t, i, n) }), (Ci.DiscreteInterpolant.prototype = Object.assign(Object.create(Ci.Interpolant.prototype), { constructor: Ci.DiscreteInterpolant, interpolate_: function (e, t, i, n) { return this.copySampleValue_(e - 1) } })), (Ci.LinearInterpolant = function (e, t, i, n) { Ci.Interpolant.call(this, e, t, i, n) }), (Ci.LinearInterpolant.prototype = Object.assign(Object.create(Ci.Interpolant.prototype), { constructor: Ci.LinearInterpolant, interpolate_: function (e, t, i, n) { for (var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = s - a, c = (i - t) / (n - t), h = 1 - c, u = 0; u !== a; ++u) r[u] = o[l + u] * h + o[s + u] * c return r } })), (Ci.QuaternionLinearInterpolant = function (e, t, i, n) { Ci.Interpolant.call(this, e, t, i, n) }), (Ci.QuaternionLinearInterpolant.prototype = Object.assign(Object.create(Ci.Interpolant.prototype), { constructor: Ci.QuaternionLinearInterpolant, interpolate_: function (e, t, i, n) { for (var r = this.resultBuffer, o = this.sampleValues, a = this.valueSize, s = e * a, l = (i - t) / (n - t), c = s + a; s !== c; s += 4) Ci.Quaternion.slerpFlat(r, 0, o, s - a, o, s, l) return r } })), (Ci.Clock = function (e) { ;(this.autoStart = void 0 === e || e), (this.startTime = 0), (this.oldTime = 0), (this.elapsedTime = 0), (this.running = !1) }), (Ci.Clock.prototype = { constructor: Ci.Clock, start: function () { ;(this.startTime = performance.now()), (this.oldTime = this.startTime), (this.running = !0) }, stop: function () { this.getElapsedTime(), (this.running = !1) }, getElapsedTime: function () { return this.getDelta(), this.elapsedTime }, getDelta: function () { var e = 0 if ((this.autoStart && !this.running && this.start(), this.running)) { var t = performance.now() ;(e = 0.001 * (t - this.oldTime)), (this.oldTime = t), (this.elapsedTime += e) } return e } }), (Ci.EventDispatcher = function () {}), (Ci.EventDispatcher.prototype = { constructor: Ci.EventDispatcher, apply: function (e) { ;(e.addEventListener = Ci.EventDispatcher.prototype.addEventListener), (e.hasEventListener = Ci.EventDispatcher.prototype.hasEventListener), (e.removeEventListener = Ci.EventDispatcher.prototype.removeEventListener), (e.dispatchEvent = Ci.EventDispatcher.prototype.dispatchEvent) }, addEventListener: function (e, t) { void 0 === this._listeners && (this._listeners = {}) var i = this._listeners void 0 === i[e] && (i[e] = []), -1 === i[e].indexOf(t) && i[e].push(t) }, hasEventListener: function (e, t) { if (void 0 === this._listeners) return !1 var i = this._listeners return void 0 !== i[e] && -1 !== i[e].indexOf(t) }, removeEventListener: function (e, t) { if (void 0 !== this._listeners) { var i = this._listeners[e] if (void 0 !== i) { var n = i.indexOf(t) ;-1 !== n && i.splice(n, 1) } } }, dispatchEvent: function (e) { if (void 0 !== this._listeners) { var t = this._listeners[e.type] if (void 0 !== t) { e.target = this for (var i = [], n = t.length, r = 0; r < n; r++) i[r] = t[r] for (r = 0; r < n; r++) i[r].call(this, e) } } } }), (Ci.Layers = function () { this.mask = 1 }), (Ci.Layers.prototype = { constructor: Ci.Layers, set: function (e) { this.mask = 1 << e }, enable: function (e) { this.mask |= 1 << e }, toggle: function (e) { this.mask ^= 1 << e }, disable: function (e) { this.mask &= ~(1 << e) }, test: function (e) { return 0 != (this.mask & e.mask) } }), ((A = Ci).Raycaster = function (e, t, i, n) { ;(this.ray = new A.Ray(e, t)), (this.near = i || 0), (this.far = n || 1 / 0), (this.params = { Mesh: {}, Line: {}, LOD: {}, Points: { threshold: 1 }, Sprite: {} }), Object.defineProperties(this.params, { PointCloud: { get: function () { return console.warn('THREE.Raycaster: params.PointCloud has been renamed to params.Points.'), this.Points } } }) }), (A.Raycaster.prototype = { constructor: A.Raycaster, linePrecision: 1, set: function (e, t) { this.ray.set(e, t) }, setFromCamera: function (e, t) { t instanceof A.PerspectiveCamera ? (this.ray.origin.setFromMatrixPosition(t.matrixWorld), this.ray.direction.set(e.x, e.y, 0.5).unproject(t).sub(this.ray.origin).normalize()) : t instanceof A.OrthographicCamera ? (this.ray.origin.set(e.x, e.y, -1).unproject(t), this.ray.direction.set(0, 0, -1).transformDirection(t.matrixWorld)) : console.error('THREE.Raycaster: Unsupported camera type.') }, intersectObject: function (e, t) { var i = [] return Ei(e, this, i, t), i.sort(Ii), i }, intersectObjects: function (e, t) { var i = [] if (!1 === Array.isArray(e)) return console.warn('THREE.Raycaster.intersectObjects: objects is not an Array.'), i for (var n = 0, r = e.length; n < r; n++) Ei(e[n], this, i, t) return i.sort(Ii), i } }), (Ci.Object3D = function () { Object.defineProperty(this, 'id', { value: Ci.Object3DIdCount++ }), (this.uuid = Ci.Math.generateUUID()), (this.name = ''), (this.type = 'Object3D'), (this.parent = null), (this.children = []), (this.up = Ci.Object3D.DefaultUp.clone()) var e = new Ci.Vector3(), t = new Ci.Euler(), i = new Ci.Quaternion(), n = new Ci.Vector3(1, 1, 1) t.onChange(function () { i.setFromEuler(t, !1) }), i.onChange(function () { t.setFromQuaternion(i, void 0, !1) }), Object.defineProperties(this, { position: { enumerable: !0, value: e }, rotation: { enumerable: !0, value: t }, quaternion: { enumerable: !0, value: i }, scale: { enumerable: !0, value: n }, modelViewMatrix: { value: new Ci.Matrix4() }, normalMatrix: { value: new Ci.Matrix3() } }), (this.rotationAutoUpdate = !0), (this.matrix = new Ci.Matrix4()), (this.matrixWorld = new Ci.Matrix4()), (this.matrixAutoUpdate = Ci.Object3D.DefaultMatrixAutoUpdate), (this.matrixWorldNeedsUpdate = !1), (this.layers = new Ci.Layers()), (this.visible = !0), (this.castShadow = !1), (this.receiveShadow = !1), (this.frustumCulled = !0), (this.renderOrder = 0), (this.userData = {}) }), (Ci.Object3D.DefaultUp = new Ci.Vector3(0, 1, 0)), (Ci.Object3D.DefaultMatrixAutoUpdate = !0), (Ci.Object3D.prototype = { constructor: Ci.Object3D, applyMatrix: function (e) { this.matrix.multiplyMatrices(e, this.matrix), this.matrix.decompose(this.position, this.quaternion, this.scale) }, setRotationFromAxisAngle: function (e, t) { this.quaternion.setFromAxisAngle(e, t) }, setRotationFromEuler: function (e) { this.quaternion.setFromEuler(e, !0) }, setRotationFromMatrix: function (e) { this.quaternion.setFromRotationMatrix(e) }, setRotationFromQuaternion: function (e) { this.quaternion.copy(e) }, rotateOnAxis: ((y = new Ci.Quaternion()), function (e, t) { return y.setFromAxisAngle(e, t), this.quaternion.multiply(y), this }), rotateX: ((v = new Ci.Vector3(1, 0, 0)), function (e) { return this.rotateOnAxis(v, e) }), rotateY: ((m = new Ci.Vector3(0, 1, 0)), function (e) { return this.rotateOnAxis(m, e) }), rotateZ: ((g = new Ci.Vector3(0, 0, 1)), function (e) { return this.rotateOnAxis(g, e) }), translateOnAxis: ((f = new Ci.Vector3()), function (e, t) { return f.copy(e).applyQuaternion(this.quaternion), this.position.add(f.multiplyScalar(t)), this }), translateX: ((p = new Ci.Vector3(1, 0, 0)), function (e) { return this.translateOnAxis(p, e) }), translateY: ((d = new Ci.Vector3(0, 1, 0)), function (e) { return this.translateOnAxis(d, e) }), translateZ: ((u = new Ci.Vector3(0, 0, 1)), function (e) { return this.translateOnAxis(u, e) }), localToWorld: function (e) { return e.applyMatrix4(this.matrixWorld) }, worldToLocal: ((h = new Ci.Matrix4()), function (e) { return e.applyMatrix4(h.getInverse(this.matrixWorld)) }), lookAt: ((c = new Ci.Matrix4()), function (e) { c.lookAt(e, this.position, this.up), this.quaternion.setFromRotationMatrix(c) }), add: function (e) { if (1 < arguments.length) { for (var t = 0; t < arguments.length; t++) this.add(arguments[t]) return this } return ( e === this ? console.error("THREE.Object3D.add: object can't be added as a child of itself.", e) : e instanceof Ci.Object3D ? (null !== e.parent && e.parent.remove(e), (e.parent = this), e.dispatchEvent({ type: 'added' }), this.children.push(e)) : console.error('THREE.Object3D.add: object not an instance of THREE.Object3D.', e), this ) }, remove: function (e) { if (1 < arguments.length) for (var t = 0; t < arguments.length; t++) this.remove(arguments[t]) var i = this.children.indexOf(e) ;-1 !== i && ((e.parent = null), e.dispatchEvent({ type: 'removed' }), this.children.splice(i, 1)) }, getObjectById: function (e) { return this.getObjectByProperty('id', e) }, getObjectByName: function (e) { return this.getObjectByProperty('name', e) }, getObjectByProperty: function (e, t) { if (this[e] === t) return this for (var i = 0, n = this.children.length; i < n; i++) { var r = this.children[i].getObjectByProperty(e, t) if (void 0 !== r) return r } }, getWorldPosition: function (e) { var t = e || new Ci.Vector3() return this.updateMatrixWorld(!0), t.setFromMatrixPosition(this.matrixWorld) }, getWorldQuaternion: ((s = new Ci.Vector3()), (l = new Ci.Vector3()), function (e) { var t = e || new Ci.Quaternion() return this.updateMatrixWorld(!0), this.matrixWorld.decompose(s, t, l), t }), getWorldRotation: ((a = new Ci.Quaternion()), function (e) { var t = e || new Ci.Euler() return this.getWorldQuaternion(a), t.setFromQuaternion(a, this.rotation.order, !1) }), getWorldScale: ((r = new Ci.Vector3()), (o = new Ci.Quaternion()), function (e) { var t = e || new Ci.Vector3() return this.updateMatrixWorld(!0), this.matrixWorld.decompose(r, o, t), t }), getWorldDirection: ((n = new Ci.Quaternion()), function (e) { var t = e || new Ci.Vector3() return this.getWorldQuaternion(n), t.set(0, 0, 1).applyQuaternion(n) }), raycast: function () {}, traverse: function (e) { e(this) for (var t = this.children, i = 0, n = t.length; i < n; i++) t[i].traverse(e) }, traverseVisible: function (e) { if (!1 !== this.visible) { e(this) for (var t = this.children, i = 0, n = t.length; i < n; i++) t[i].traverseVisible(e) } }, traverseAncestors: function (e) { var t = this.parent null !== t && (e(t), t.traverseAncestors(e)) }, updateMatrix: function () { this.matrix.compose(this.position, this.quaternion, this.scale), (this.matrixWorldNeedsUpdate = !0) }, updateMatrixWorld: function (e) { !0 === this.matrixAutoUpdate && this.updateMatrix(), (!0 !== this.matrixWorldNeedsUpdate && !0 !== e) || (null === this.parent ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), (e = !(this.matrixWorldNeedsUpdate = !1))) for (var t = 0, i = this.children.length; t < i; t++) this.children[t].updateMatrixWorld(e) }, toJSON: function (e) { function t(e) { var t = [] for (var i in e) { var n = e[i] delete n.metadata, t.push(n) } return t } var i = void 0 === e, n = {} i && ((e = { geometries: {}, materials: {}, textures: {}, images: {} }), (n.metadata = { version: 4.4, type: 'Object', generator: 'Object3D.toJSON' })) var r = {} if ( ((r.uuid = this.uuid), (r.type = this.type), '' !== this.name && (r.name = this.name), '{}' !== JSON.stringify(this.userData) && (r.userData = this.userData), !0 === this.castShadow && (r.castShadow = !0), !0 === this.receiveShadow && (r.receiveShadow = !0), !1 === this.visible && (r.visible = !1), (r.matrix = this.matrix.toArray()), void 0 !== this.geometry && (void 0 === e.geometries[this.geometry.uuid] && (e.geometries[this.geometry.uuid] = this.geometry.toJSON(e)), (r.geometry = this.geometry.uuid)), void 0 !== this.material && (void 0 === e.materials[this.material.uuid] && (e.materials[this.material.uuid] = this.material.toJSON(e)), (r.material = this.material.uuid)), 0 < this.children.length) ) { r.children = [] for (var o = 0; o < this.children.length; o++) r.children.push(this.children[o].toJSON(e).object) } if (i) { var a = t(e.geometries), s = t(e.materials), l = t(e.textures), c = t(e.images) 0 < a.length && (n.geometries = a), 0 < s.length && (n.materials = s), 0 < l.length && (n.textures = l), 0 < c.length && (n.images = c) } return (n.object = r), n }, clone: function (e) { return new this.constructor().copy(this, e) }, copy: function (e, t) { if ( (void 0 === t && (t = !0), (this.name = e.name), this.up.copy(e.up), this.position.copy(e.position), this.quaternion.copy(e.quaternion), this.scale.copy(e.scale), (this.rotationAutoUpdate = e.rotationAutoUpdate), this.matrix.copy(e.matrix), this.matrixWorld.copy(e.matrixWorld), (this.matrixAutoUpdate = e.matrixAutoUpdate), (this.matrixWorldNeedsUpdate = e.matrixWorldNeedsUpdate), (this.visible = e.visible), (this.castShadow = e.castShadow), (this.receiveShadow = e.receiveShadow), (this.frustumCulled = e.frustumCulled), (this.renderOrder = e.renderOrder), (this.userData = JSON.parse(JSON.stringify(e.userData))), !0 === t) ) for (var i = 0; i < e.children.length; i++) { var n = e.children[i] this.add(n.clone()) } return this } }), Ci.EventDispatcher.prototype.apply(Ci.Object3D.prototype), (Ci.Object3DIdCount = 0), (Ci.Face3 = function (e, t, i, n, r, o) { ;(this.a = e), (this.b = t), (this.c = i), (this.normal = n instanceof Ci.Vector3 ? n : new Ci.Vector3()), (this.vertexNormals = Array.isArray(n) ? n : []), (this.color = r instanceof Ci.Color ? r : new Ci.Color()), (this.vertexColors = Array.isArray(r) ? r : []), (this.materialIndex = void 0 !== o ? o : 0) }), (Ci.Face3.prototype = { constructor: Ci.Face3, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { ;(this.a = e.a), (this.b = e.b), (this.c = e.c), this.normal.copy(e.normal), this.color.copy(e.color), (this.materialIndex = e.materialIndex) for (var t = 0, i = e.vertexNormals.length; t < i; t++) this.vertexNormals[t] = e.vertexNormals[t].clone() for (t = 0, i = e.vertexColors.length; t < i; t++) this.vertexColors[t] = e.vertexColors[t].clone() return this } }), (Ci.BufferAttribute = function (e, t) { ;(this.uuid = Ci.Math.generateUUID()), (this.array = e), (this.itemSize = t), (this.dynamic = !1), (this.updateRange = { offset: 0, count: -1 }), (this.version = 0) }), (Ci.BufferAttribute.prototype = { constructor: Ci.BufferAttribute, get count() { return this.array.length / this.itemSize }, set needsUpdate(e) { !0 === e && this.version++ }, setDynamic: function (e) { return (this.dynamic = e), this }, copy: function (e) { return (this.array = new e.array.constructor(e.array)), (this.itemSize = e.itemSize), (this.dynamic = e.dynamic), this }, copyAt: function (e, t, i) { ;(e *= this.itemSize), (i *= t.itemSize) for (var n = 0, r = this.itemSize; n < r; n++) this.array[e + n] = t.array[i + n] return this }, copyArray: function (e) { return this.array.set(e), this }, copyColorsArray: function (e) { for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { var o = e[n] void 0 === o && (console.warn('THREE.BufferAttribute.copyColorsArray(): color is undefined', n), (o = new Ci.Color())), (t[i++] = o.r), (t[i++] = o.g), (t[i++] = o.b) } return this }, copyIndicesArray: function (e) { for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { var o = e[n] ;(t[i++] = o.a), (t[i++] = o.b), (t[i++] = o.c) } return this }, copyVector2sArray: function (e) { for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { var o = e[n] void 0 === o && (console.warn('THREE.BufferAttribute.copyVector2sArray(): vector is undefined', n), (o = new Ci.Vector2())), (t[i++] = o.x), (t[i++] = o.y) } return this }, copyVector3sArray: function (e) { for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { var o = e[n] void 0 === o && (console.warn('THREE.BufferAttribute.copyVector3sArray(): vector is undefined', n), (o = new Ci.Vector3())), (t[i++] = o.x), (t[i++] = o.y), (t[i++] = o.z) } return this }, copyVector4sArray: function (e) { for (var t = this.array, i = 0, n = 0, r = e.length; n < r; n++) { var o = e[n] void 0 === o && (console.warn('THREE.BufferAttribute.copyVector4sArray(): vector is undefined', n), (o = new Ci.Vector4())), (t[i++] = o.x), (t[i++] = o.y), (t[i++] = o.z), (t[i++] = o.w) } return this }, set: function (e, t) { return void 0 === t && (t = 0), this.array.set(e, t), this }, getX: function (e) { return this.array[e * this.itemSize] }, setX: function (e, t) { return (this.array[e * this.itemSize] = t), this }, getY: function (e) { return this.array[e * this.itemSize + 1] }, setY: function (e, t) { return (this.array[e * this.itemSize + 1] = t), this }, getZ: function (e) { return this.array[e * this.itemSize + 2] }, setZ: function (e, t) { return (this.array[e * this.itemSize + 2] = t), this }, getW: function (e) { return this.array[e * this.itemSize + 3] }, setW: function (e, t) { return (this.array[e * this.itemSize + 3] = t), this }, setXY: function (e, t, i) { return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), this }, setXYZ: function (e, t, i, n) { return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), (this.array[e + 2] = n), this }, setXYZW: function (e, t, i, n, r) { return (e *= this.itemSize), (this.array[e + 0] = t), (this.array[e + 1] = i), (this.array[e + 2] = n), (this.array[e + 3] = r), this }, clone: function () { return new this.constructor().copy(this) } }), (Ci.Int8Attribute = function (e, t) { return new Ci.BufferAttribute(new Int8Array(e), t) }), (Ci.Uint8Attribute = function (e, t) { return new Ci.BufferAttribute(new Uint8Array(e), t) }), (Ci.Uint8ClampedAttribute = function (e, t) { return new Ci.BufferAttribute(new Uint8ClampedArray(e), t) }), (Ci.Int16Attribute = function (e, t) { return new Ci.BufferAttribute(new Int16Array(e), t) }), (Ci.Uint16Attribute = function (e, t) { return new Ci.BufferAttribute(new Uint16Array(e), t) }), (Ci.Int32Attribute = function (e, t) { return new Ci.BufferAttribute(new Int32Array(e), t) }), (Ci.Uint32Attribute = function (e, t) { return new Ci.BufferAttribute(new Uint32Array(e), t) }), (Ci.Float32Attribute = function (e, t) { return new Ci.BufferAttribute(new Float32Array(e), t) }), (Ci.Float64Attribute = function (e, t) { return new Ci.BufferAttribute(new Float64Array(e), t) }), (Ci.DynamicBufferAttribute = function (e, t) { return console.warn('THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.'), new Ci.BufferAttribute(e, t).setDynamic(!0) }), (Ci.InstancedBufferAttribute = function (e, t, i) { Ci.BufferAttribute.call(this, e, t), (this.meshPerAttribute = i || 1) }), (Ci.InstancedBufferAttribute.prototype = Object.create(Ci.BufferAttribute.prototype)), (Ci.InstancedBufferAttribute.prototype.constructor = Ci.InstancedBufferAttribute), (Ci.InstancedBufferAttribute.prototype.copy = function (e) { return Ci.BufferAttribute.prototype.copy.call(this, e), (this.meshPerAttribute = e.meshPerAttribute), this }), (Ci.InterleavedBuffer = function (e, t) { ;(this.uuid = Ci.Math.generateUUID()), (this.array = e), (this.stride = t), (this.dynamic = !1), (this.updateRange = { offset: 0, count: -1 }), (this.version = 0) }), (Ci.InterleavedBuffer.prototype = { constructor: Ci.InterleavedBuffer, get length() { return this.array.length }, get count() { return this.array.length / this.stride }, set needsUpdate(e) { !0 === e && this.version++ }, setDynamic: function (e) { return (this.dynamic = e), this }, copy: function (e) { return (this.array = new e.array.constructor(e.array)), (this.stride = e.stride), (this.dynamic = e.dynamic), this }, copyAt: function (e, t, i) { ;(e *= this.stride), (i *= t.stride) for (var n = 0, r = this.stride; n < r; n++) this.array[e + n] = t.array[i + n] return this }, set: function (e, t) { return void 0 === t && (t = 0), this.array.set(e, t), this }, clone: function () { return new this.constructor().copy(this) } }), (Ci.InstancedInterleavedBuffer = function (e, t, i) { Ci.InterleavedBuffer.call(this, e, t), (this.meshPerAttribute = i || 1) }), (Ci.InstancedInterleavedBuffer.prototype = Object.create(Ci.InterleavedBuffer.prototype)), (Ci.InstancedInterleavedBuffer.prototype.constructor = Ci.InstancedInterleavedBuffer), (Ci.InstancedInterleavedBuffer.prototype.copy = function (e) { return Ci.InterleavedBuffer.prototype.copy.call(this, e), (this.meshPerAttribute = e.meshPerAttribute), this }), (Ci.InterleavedBufferAttribute = function (e, t, i) { ;(this.uuid = Ci.Math.generateUUID()), (this.data = e), (this.itemSize = t), (this.offset = i) }), (Ci.InterleavedBufferAttribute.prototype = { constructor: Ci.InterleavedBufferAttribute, get length() { return console.warn('THREE.BufferAttribute: .length has been deprecated. Please use .count.'), this.array.length }, get count() { return this.data.count }, setX: function (e, t) { return (this.data.array[e * this.data.stride + this.offset] = t), this }, setY: function (e, t) { return (this.data.array[e * this.data.stride + this.offset + 1] = t), this }, setZ: function (e, t) { return (this.data.array[e * this.data.stride + this.offset + 2] = t), this }, setW: function (e, t) { return (this.data.array[e * this.data.stride + this.offset + 3] = t), this }, getX: function (e) { return this.data.array[e * this.data.stride + this.offset] }, getY: function (e) { return this.data.array[e * this.data.stride + this.offset + 1] }, getZ: function (e) { return this.data.array[e * this.data.stride + this.offset + 2] }, getW: function (e) { return this.data.array[e * this.data.stride + this.offset + 3] }, setXY: function (e, t, i) { return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), this }, setXYZ: function (e, t, i, n) { return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), (this.data.array[e + 2] = n), this }, setXYZW: function (e, t, i, n, r) { return (e = e * this.data.stride + this.offset), (this.data.array[e + 0] = t), (this.data.array[e + 1] = i), (this.data.array[e + 2] = n), (this.data.array[e + 3] = r), this } }), (Ci.Geometry = function () { Object.defineProperty(this, 'id', { value: Ci.GeometryIdCount++ }), (this.uuid = Ci.Math.generateUUID()), (this.name = ''), (this.type = 'Geometry'), (this.vertices = []), (this.colors = []), (this.faces = []), (this.faceVertexUvs = [[]]), (this.morphTargets = []), (this.morphNormals = []), (this.skinWeights = []), (this.skinIndices = []), (this.lineDistances = []), (this.boundingBox = null), (this.boundingSphere = null), (this.verticesNeedUpdate = !1), (this.elementsNeedUpdate = !1), (this.uvsNeedUpdate = !1), (this.normalsNeedUpdate = !1), (this.colorsNeedUpdate = !1), (this.lineDistancesNeedUpdate = !1), (this.groupsNeedUpdate = !1) }), (Ci.Geometry.prototype = { constructor: Ci.Geometry, applyMatrix: function (e) { for (var t = new Ci.Matrix3().getNormalMatrix(e), i = 0, n = this.vertices.length; i < n; i++) { this.vertices[i].applyMatrix4(e) } for (i = 0, n = this.faces.length; i < n; i++) { var r = this.faces[i] r.normal.applyMatrix3(t).normalize() for (var o = 0, a = r.vertexNormals.length; o < a; o++) r.vertexNormals[o].applyMatrix3(t).normalize() } return ( null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), (this.verticesNeedUpdate = !0), (this.normalsNeedUpdate = !0), this ) }, rotateX: function (e) { return void 0 === mt && (mt = new Ci.Matrix4()), mt.makeRotationX(e), this.applyMatrix(mt), this }, rotateY: function (e) { return void 0 === gt && (gt = new Ci.Matrix4()), gt.makeRotationY(e), this.applyMatrix(gt), this }, rotateZ: function (e) { return void 0 === ft && (ft = new Ci.Matrix4()), ft.makeRotationZ(e), this.applyMatrix(ft), this }, translate: function (e, t, i) { return void 0 === pt && (pt = new Ci.Matrix4()), pt.makeTranslation(e, t, i), this.applyMatrix(pt), this }, scale: function (e, t, i) { return void 0 === dt && (dt = new Ci.Matrix4()), dt.makeScale(e, t, i), this.applyMatrix(dt), this }, lookAt: function (e) { void 0 === ut && (ut = new Ci.Object3D()), ut.lookAt(e), ut.updateMatrix(), this.applyMatrix(ut.matrix) }, fromBufferGeometry: function (e) { function t(e, t, i, n) { var r = void 0 !== l ? [d[e].clone(), d[t].clone(), d[i].clone()] : [], o = void 0 !== c ? [s.colors[e].clone(), s.colors[t].clone(), s.colors[i].clone()] : [], a = new Ci.Face3(e, t, i, r, o, n) s.faces.push(a), void 0 !== h && s.faceVertexUvs[0].push([p[e].clone(), p[t].clone(), p[i].clone()]), void 0 !== u && s.faceVertexUvs[1].push([f[e].clone(), f[t].clone(), f[i].clone()]) } var s = this, i = null !== e.index ? e.index.array : void 0, n = e.attributes, r = n.position.array, l = void 0 !== n.normal ? n.normal.array : void 0, c = void 0 !== n.color ? n.color.array : void 0, h = void 0 !== n.uv ? n.uv.array : void 0, u = void 0 !== n.uv2 ? n.uv2.array : void 0 void 0 !== u && (this.faceVertexUvs[1] = []) for (var d = [], p = [], f = [], o = 0, a = 0; o < r.length; o += 3, a += 2) s.vertices.push(new Ci.Vector3(r[o], r[o + 1], r[o + 2])), void 0 !== l && d.push(new Ci.Vector3(l[o], l[o + 1], l[o + 2])), void 0 !== c && s.colors.push(new Ci.Color(c[o], c[o + 1], c[o + 2])), void 0 !== h && p.push(new Ci.Vector2(h[a], h[a + 1])), void 0 !== u && f.push(new Ci.Vector2(u[a], u[a + 1])) if (void 0 !== i) { var g = e.groups if (0 < g.length) for (o = 0; o < g.length; o++) for (var m = g[o], v = m.start, y = ((a = v), v + m.count); a < y; a += 3) t(i[a], i[a + 1], i[a + 2], m.materialIndex) else for (o = 0; o < i.length; o += 3) t(i[o], i[o + 1], i[o + 2]) } else for (o = 0; o < r.length / 3; o += 3) t(o, o + 1, o + 2) return ( this.computeFaceNormals(), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()), null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), this ) }, center: function () { this.computeBoundingBox() var e = this.boundingBox.center().negate() return this.translate(e.x, e.y, e.z), e }, normalize: function () { this.computeBoundingSphere() var e = this.boundingSphere.center, t = this.boundingSphere.radius, i = 0 === t ? 1 : 1 / t, n = new Ci.Matrix4() return n.set(i, 0, 0, -i * e.x, 0, i, 0, -i * e.y, 0, 0, i, -i * e.z, 0, 0, 0, 1), this.applyMatrix(n), this }, computeFaceNormals: function () { for (var e = new Ci.Vector3(), t = new Ci.Vector3(), i = 0, n = this.faces.length; i < n; i++) { var r = this.faces[i], o = this.vertices[r.a], a = this.vertices[r.b], s = this.vertices[r.c] e.subVectors(s, a), t.subVectors(o, a), e.cross(t), e.normalize(), r.normal.copy(e) } }, computeVertexNormals: function (e) { var t, i, n, r, o, a for (void 0 === e && (e = !0), a = new Array(this.vertices.length), t = 0, i = this.vertices.length; t < i; t++) a[t] = new Ci.Vector3() if (e) { var s, l, c, h = new Ci.Vector3(), u = new Ci.Vector3() for (n = 0, r = this.faces.length; n < r; n++) (o = this.faces[n]), (s = this.vertices[o.a]), (l = this.vertices[o.b]), (c = this.vertices[o.c]), h.subVectors(c, l), u.subVectors(s, l), h.cross(u), a[o.a].add(h), a[o.b].add(h), a[o.c].add(h) } else for (n = 0, r = this.faces.length; n < r; n++) a[(o = this.faces[n]).a].add(o.normal), a[o.b].add(o.normal), a[o.c].add(o.normal) for (t = 0, i = this.vertices.length; t < i; t++) a[t].normalize() for (n = 0, r = this.faces.length; n < r; n++) { var d = (o = this.faces[n]).vertexNormals 3 === d.length ? (d[0].copy(a[o.a]), d[1].copy(a[o.b]), d[2].copy(a[o.c])) : ((d[0] = a[o.a].clone()), (d[1] = a[o.b].clone()), (d[2] = a[o.c].clone())) } 0 < this.faces.length && (this.normalsNeedUpdate = !0) }, computeMorphNormals: function () { var e, t, i, n, r for (i = 0, n = this.faces.length; i < n; i++) for ( (r = this.faces[i]).__originalFaceNormal ? r.__originalFaceNormal.copy(r.normal) : (r.__originalFaceNormal = r.normal.clone()), r.__originalVertexNormals || (r.__originalVertexNormals = []), e = 0, t = r.vertexNormals.length; e < t; e++ ) r.__originalVertexNormals[e] ? r.__originalVertexNormals[e].copy(r.vertexNormals[e]) : (r.__originalVertexNormals[e] = r.vertexNormals[e].clone()) var o = new Ci.Geometry() for (o.faces = this.faces, e = 0, t = this.morphTargets.length; e < t; e++) { if (!this.morphNormals[e]) { ;(this.morphNormals[e] = {}), (this.morphNormals[e].faceNormals = []), (this.morphNormals[e].vertexNormals = []) var a = this.morphNormals[e].faceNormals, s = this.morphNormals[e].vertexNormals for (i = 0, n = this.faces.length; i < n; i++) (l = new Ci.Vector3()), (c = { a: new Ci.Vector3(), b: new Ci.Vector3(), c: new Ci.Vector3() }), a.push(l), s.push(c) } var l, c, h = this.morphNormals[e] for (o.vertices = this.morphTargets[e].vertices, o.computeFaceNormals(), o.computeVertexNormals(), i = 0, n = this.faces.length; i < n; i++) (r = this.faces[i]), (l = h.faceNormals[i]), (c = h.vertexNormals[i]), l.copy(r.normal), c.a.copy(r.vertexNormals[0]), c.b.copy(r.vertexNormals[1]), c.c.copy(r.vertexNormals[2]) } for (i = 0, n = this.faces.length; i < n; i++) ((r = this.faces[i]).normal = r.__originalFaceNormal), (r.vertexNormals = r.__originalVertexNormals) }, computeTangents: function () { console.warn('THREE.Geometry: .computeTangents() has been removed.') }, computeLineDistances: function () { for (var e = 0, t = this.vertices, i = 0, n = t.length; i < n; i++) 0 < i && (e += t[i].distanceTo(t[i - 1])), (this.lineDistances[i] = e) }, computeBoundingBox: function () { null === this.boundingBox && (this.boundingBox = new Ci.Box3()), this.boundingBox.setFromPoints(this.vertices) }, computeBoundingSphere: function () { null === this.boundingSphere && (this.boundingSphere = new Ci.Sphere()), this.boundingSphere.setFromPoints(this.vertices) }, merge: function (e, t, i) { if (e instanceof Ci.Geometry != 0) { var n, r = this.vertices.length, o = this.vertices, a = e.vertices, s = this.faces, l = e.faces, c = this.faceVertexUvs[0], h = e.faceVertexUvs[0] void 0 === i && (i = 0), void 0 !== t && (n = new Ci.Matrix3().getNormalMatrix(t)) for (var u = 0, d = a.length; u < d; u++) { var p = a[u].clone() void 0 !== t && p.applyMatrix4(t), o.push(p) } for (u = 0, d = l.length; u < d; u++) { var f, g, m, v = l[u], y = v.vertexNormals, A = v.vertexColors ;(f = new Ci.Face3(v.a + r, v.b + r, v.c + r)).normal.copy(v.normal), void 0 !== n && f.normal.applyMatrix3(n).normalize() for (var C = 0, I = y.length; C < I; C++) (g = y[C].clone()), void 0 !== n && g.applyMatrix3(n).normalize(), f.vertexNormals.push(g) f.color.copy(v.color) for (C = 0, I = A.length; C < I; C++) (m = A[C]), f.vertexColors.push(m.clone()) ;(f.materialIndex = v.materialIndex + i), s.push(f) } for (u = 0, d = h.length; u < d; u++) { var E = h[u], _ = [] if (void 0 !== E) { for (C = 0, I = E.length; C < I; C++) _.push(E[C].clone()) c.push(_) } } } else console.error('THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.', e) }, mergeMesh: function (e) { return e instanceof Ci.Mesh == 0 ? void console.error('THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.', e) : (e.matrixAutoUpdate && e.updateMatrix(), void this.merge(e.geometry, e.matrix)) }, mergeVertices: function () { var e, t, i, n, r, o, a, s, l = {}, c = [], h = [], u = Math.pow(10, 4) for (i = 0, n = this.vertices.length; i < n; i++) (e = this.vertices[i]), void 0 === l[(t = Math.round(e.x * u) + '_' + Math.round(e.y * u) + '_' + Math.round(e.z * u))] ? ((l[t] = i), c.push(this.vertices[i]), (h[i] = c.length - 1)) : (h[i] = h[l[t]]) var d = [] for (i = 0, n = this.faces.length; i < n; i++) { ;((r = this.faces[i]).a = h[r.a]), (r.b = h[r.b]), (r.c = h[r.c]), (o = [r.a, r.b, r.c]) for (var p = 0; p < 3; p++) if (o[p] === o[(p + 1) % 3]) { p, d.push(i) break } } for (i = d.length - 1; 0 <= i; i--) { var f = d[i] for (this.faces.splice(f, 1), a = 0, s = this.faceVertexUvs.length; a < s; a++) this.faceVertexUvs[a].splice(f, 1) } var g = this.vertices.length - c.length return (this.vertices = c), g }, sortFacesByMaterialIndex: function () { for (var e = this.faces, t = e.length, i = 0; i < t; i++) e[i]._id = i e.sort(function (e, t) { return e.materialIndex - t.materialIndex }) var n, r, o = this.faceVertexUvs[0], a = this.faceVertexUvs[1] o && o.length === t && (n = []), a && a.length === t && (r = []) for (i = 0; i < t; i++) { var s = e[i]._id n && n.push(o[s]), r && r.push(a[s]) } n && (this.faceVertexUvs[0] = n), r && (this.faceVertexUvs[1] = r) }, toJSON: function () { function e(e, t, i) { return i ? e | (1 << t) : e & ~(1 << t) } function t(e) { var t = e.x.toString() + e.y.toString() + e.z.toString() return void 0 !== d[t] || ((d[t] = u.length / 3), u.push(e.x, e.y, e.z)), d[t] } function i(e) { var t = e.r.toString() + e.g.toString() + e.b.toString() return void 0 !== f[t] || ((f[t] = p.length), p.push(e.getHex())), f[t] } function n(e) { var t = e.x.toString() + e.y.toString() return void 0 !== m[t] || ((m[t] = g.length / 2), g.push(e.x, e.y)), m[t] } var r = { metadata: { version: 4.4, type: 'Geometry', generator: 'Geometry.toJSON' } } if (((r.uuid = this.uuid), (r.type = this.type), '' !== this.name && (r.name = this.name), void 0 !== this.parameters)) { var o = this.parameters for (var a in o) void 0 !== o[a] && (r[a] = o[a]) return r } for (var s = [], l = 0; l < this.vertices.length; l++) { var c = this.vertices[l] s.push(c.x, c.y, c.z) } var h = [], u = [], d = {}, p = [], f = {}, g = [], m = {} for (l = 0; l < this.faces.length; l++) { var v = this.faces[l], y = void 0 !== this.faceVertexUvs[0][l], A = 0 < v.normal.length(), C = 0 < v.vertexNormals.length, I = 1 !== v.color.r || 1 !== v.color.g || 1 !== v.color.b, E = 0 < v.vertexColors.length, _ = 0 if ( ((_ = e((_ = e((_ = e((_ = e((_ = e((_ = e((_ = e((_ = e(_, 0, 0)), 1, !0)), 2, !1)), 3, y)), 4, A)), 5, C)), 6, I)), 7, E)), h.push(_), h.push(v.a, v.b, v.c), h.push(v.materialIndex), y) ) { var b = this.faceVertexUvs[0][l] h.push(n(b[0]), n(b[1]), n(b[2])) } if ((A && h.push(t(v.normal)), C)) { var w = v.vertexNormals h.push(t(w[0]), t(w[1]), t(w[2])) } if ((I && h.push(i(v.color)), E)) { var T = v.vertexColors h.push(i(T[0]), i(T[1]), i(T[2])) } } return (r.data = {}), (r.data.vertices = s), (r.data.normals = u), 0 < p.length && (r.data.colors = p), 0 < g.length && (r.data.uvs = [g]), (r.data.faces = h), r }, clone: function () { return new Ci.Geometry().copy(this) }, copy: function (e) { ;(this.vertices = []), (this.faces = []), (this.faceVertexUvs = [[]]) for (var t = e.vertices, i = 0, n = t.length; i < n; i++) this.vertices.push(t[i].clone()) var r = e.faces for (i = 0, n = r.length; i < n; i++) this.faces.push(r[i].clone()) for (i = 0, n = e.faceVertexUvs.length; i < n; i++) { var o = e.faceVertexUvs[i] void 0 === this.faceVertexUvs[i] && (this.faceVertexUvs[i] = []) for (var a = 0, s = o.length; a < s; a++) { for (var l = o[a], c = [], h = 0, u = l.length; h < u; h++) { var d = l[h] c.push(d.clone()) } this.faceVertexUvs[i].push(c) } } return this }, dispose: function () { this.dispatchEvent({ type: 'dispose' }) } }), Ci.EventDispatcher.prototype.apply(Ci.Geometry.prototype), (Ci.GeometryIdCount = 0), (Ci.DirectGeometry = function () { Object.defineProperty(this, 'id', { value: Ci.GeometryIdCount++ }), (this.uuid = Ci.Math.generateUUID()), (this.name = ''), (this.type = 'DirectGeometry'), (this.indices = []), (this.vertices = []), (this.normals = []), (this.colors = []), (this.uvs = []), (this.uvs2 = []), (this.groups = []), (this.morphTargets = {}), (this.skinWeights = []), (this.skinIndices = []), (this.boundingBox = null), (this.boundingSphere = null), (this.verticesNeedUpdate = !1), (this.normalsNeedUpdate = !1), (this.colorsNeedUpdate = !1), (this.uvsNeedUpdate = !1), (this.groupsNeedUpdate = !1) }), (Ci.DirectGeometry.prototype = { constructor: Ci.DirectGeometry, computeBoundingBox: Ci.Geometry.prototype.computeBoundingBox, computeBoundingSphere: Ci.Geometry.prototype.computeBoundingSphere, computeFaceNormals: function () { console.warn('THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.') }, computeVertexNormals: function () { console.warn('THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.') }, computeGroups: function (e) { for (var t, i, n = [], r = e.faces, o = 0; o < r.length; o++) { var a = r[o] a.materialIndex !== i && ((i = a.materialIndex), void 0 !== t && ((t.count = 3 * o - t.start), n.push(t)), (t = { start: 3 * o, materialIndex: i })) } void 0 !== t && ((t.count = 3 * o - t.start), n.push(t)), (this.groups = n) }, fromGeometry: function (e) { var t, i = e.faces, n = e.vertices, r = e.faceVertexUvs, o = r[0] && 0 < r[0].length, a = r[1] && 0 < r[1].length, s = e.morphTargets, l = s.length if (0 < l) { t = [] for (var c = 0; c < l; c++) t[c] = [] this.morphTargets.position = t } var h, u = e.morphNormals, d = u.length if (0 < d) { h = [] for (c = 0; c < d; c++) h[c] = [] this.morphTargets.normal = h } var p = e.skinIndices, f = e.skinWeights, g = p.length === n.length, m = f.length === n.length for (c = 0; c < i.length; c++) { var v = i[c] this.vertices.push(n[v.a], n[v.b], n[v.c]) var y = v.vertexNormals if (3 === y.length) this.normals.push(y[0], y[1], y[2]) else { var A = v.normal this.normals.push(A, A, A) } var C, I = v.vertexColors if (3 === I.length) this.colors.push(I[0], I[1], I[2]) else { var E = v.color this.colors.push(E, E, E) } if (!0 === o) void 0 !== (C = r[0][c]) ? this.uvs.push(C[0], C[1], C[2]) : (console.warn('THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ', c), this.uvs.push(new Ci.Vector2(), new Ci.Vector2(), new Ci.Vector2())) if (!0 === a) void 0 !== (C = r[1][c]) ? this.uvs2.push(C[0], C[1], C[2]) : (console.warn('THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ', c), this.uvs2.push(new Ci.Vector2(), new Ci.Vector2(), new Ci.Vector2())) for (var _ = 0; _ < l; _++) { var b = s[_].vertices t[_].push(b[v.a], b[v.b], b[v.c]) } for (_ = 0; _ < d; _++) { var w = u[_].vertexNormals[c] h[_].push(w.a, w.b, w.c) } g && this.skinIndices.push(p[v.a], p[v.b], p[v.c]), m && this.skinWeights.push(f[v.a], f[v.b], f[v.c]) } return ( this.computeGroups(e), (this.verticesNeedUpdate = e.verticesNeedUpdate), (this.normalsNeedUpdate = e.normalsNeedUpdate), (this.colorsNeedUpdate = e.colorsNeedUpdate), (this.uvsNeedUpdate = e.uvsNeedUpdate), (this.groupsNeedUpdate = e.groupsNeedUpdate), this ) }, dispose: function () { this.dispatchEvent({ type: 'dispose' }) } }), Ci.EventDispatcher.prototype.apply(Ci.DirectGeometry.prototype), (Ci.BufferGeometry = function () { Object.defineProperty(this, 'id', { value: Ci.GeometryIdCount++ }), (this.uuid = Ci.Math.generateUUID()), (this.name = ''), (this.type = 'BufferGeometry'), (this.index = null), (this.attributes = {}), (this.morphAttributes = {}), (this.groups = []), (this.boundingBox = null), (this.boundingSphere = null), (this.drawRange = { start: 0, count: 1 / 0 }) }), (Ci.BufferGeometry.prototype = { constructor: Ci.BufferGeometry, getIndex: function () { return this.index }, setIndex: function (e) { this.index = e }, addAttribute: function (e, t) { return t instanceof Ci.BufferAttribute == 0 && t instanceof Ci.InterleavedBufferAttribute == 0 ? (console.warn('THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).'), void this.addAttribute(e, new Ci.BufferAttribute(t, arguments[2]))) : 'index' === e ? (console.warn('THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.'), void this.setIndex(t)) : ((this.attributes[e] = t), this) }, getAttribute: function (e) { return this.attributes[e] }, removeAttribute: function (e) { return delete this.attributes[e], this }, addGroup: function (e, t, i) { this.groups.push({ start: e, count: t, materialIndex: void 0 !== i ? i : 0 }) }, clearGroups: function () { this.groups = [] }, setDrawRange: function (e, t) { ;(this.drawRange.start = e), (this.drawRange.count = t) }, applyMatrix: function (e) { var t = this.attributes.position void 0 !== t && (e.applyToVector3Array(t.array), (t.needsUpdate = !0)) var i = this.attributes.normal void 0 !== i && (new Ci.Matrix3().getNormalMatrix(e).applyToVector3Array(i.array), (i.needsUpdate = !0)) return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this }, rotateX: function (e) { return void 0 === ht && (ht = new Ci.Matrix4()), ht.makeRotationX(e), this.applyMatrix(ht), this }, rotateY: function (e) { return void 0 === ct && (ct = new Ci.Matrix4()), ct.makeRotationY(e), this.applyMatrix(ct), this }, rotateZ: function (e) { return void 0 === lt && (lt = new Ci.Matrix4()), lt.makeRotationZ(e), this.applyMatrix(lt), this }, translate: function (e, t, i) { return void 0 === st && (st = new Ci.Matrix4()), st.makeTranslation(e, t, i), this.applyMatrix(st), this }, scale: function (e, t, i) { return void 0 === at && (at = new Ci.Matrix4()), at.makeScale(e, t, i), this.applyMatrix(at), this }, lookAt: function (e) { void 0 === ot && (ot = new Ci.Object3D()), ot.lookAt(e), ot.updateMatrix(), this.applyMatrix(ot.matrix) }, center: function () { this.computeBoundingBox() var e = this.boundingBox.center().negate() return this.translate(e.x, e.y, e.z), e }, setFromObject: function (e) { var t = e.geometry if (e instanceof Ci.Points || e instanceof Ci.Line) { var i = new Ci.Float32Attribute(3 * t.vertices.length, 3), n = new Ci.Float32Attribute(3 * t.colors.length, 3) if ( (this.addAttribute('position', i.copyVector3sArray(t.vertices)), this.addAttribute('color', n.copyColorsArray(t.colors)), t.lineDistances && t.lineDistances.length === t.vertices.length) ) { var r = new Ci.Float32Attribute(t.lineDistances.length, 1) this.addAttribute('lineDistance', r.copyArray(t.lineDistances)) } null !== t.boundingSphere && (this.boundingSphere = t.boundingSphere.clone()), null !== t.boundingBox && (this.boundingBox = t.boundingBox.clone()) } else e instanceof Ci.Mesh && t instanceof Ci.Geometry && this.fromGeometry(t) return this }, updateFromObject: function (e) { var t, i = e.geometry if (e instanceof Ci.Mesh) { var n = i.__directGeometry if (void 0 === n) return this.fromGeometry(i) ;(n.verticesNeedUpdate = i.verticesNeedUpdate), (n.normalsNeedUpdate = i.normalsNeedUpdate), (n.colorsNeedUpdate = i.colorsNeedUpdate), (n.uvsNeedUpdate = i.uvsNeedUpdate), (n.groupsNeedUpdate = i.groupsNeedUpdate), (i.verticesNeedUpdate = !1), (i.normalsNeedUpdate = !1), (i.colorsNeedUpdate = !1), (i.uvsNeedUpdate = !1), (i.groupsNeedUpdate = !1), (i = n) } !0 === i.verticesNeedUpdate && (void 0 !== (t = this.attributes.position) && (t.copyVector3sArray(i.vertices), (t.needsUpdate = !0)), (i.verticesNeedUpdate = !1)) !0 === i.normalsNeedUpdate && (void 0 !== (t = this.attributes.normal) && (t.copyVector3sArray(i.normals), (t.needsUpdate = !0)), (i.normalsNeedUpdate = !1)) !0 === i.colorsNeedUpdate && (void 0 !== (t = this.attributes.color) && (t.copyColorsArray(i.colors), (t.needsUpdate = !0)), (i.colorsNeedUpdate = !1)) i.uvsNeedUpdate && (void 0 !== (t = this.attributes.uv) && (t.copyVector2sArray(i.uvs), (t.needsUpdate = !0)), (i.uvsNeedUpdate = !1)) i.lineDistancesNeedUpdate && (void 0 !== (t = this.attributes.lineDistance) && (t.copyArray(i.lineDistances), (t.needsUpdate = !0)), (i.lineDistancesNeedUpdate = !1)) return i.groupsNeedUpdate && (i.computeGroups(e.geometry), (this.groups = i.groups), (i.groupsNeedUpdate = !1)), this }, fromGeometry: function (e) { return (e.__directGeometry = new Ci.DirectGeometry().fromGeometry(e)), this.fromDirectGeometry(e.__directGeometry) }, fromDirectGeometry: function (e) { var t = new Float32Array(3 * e.vertices.length) if ((this.addAttribute('position', new Ci.BufferAttribute(t, 3).copyVector3sArray(e.vertices)), 0 < e.normals.length)) { var i = new Float32Array(3 * e.normals.length) this.addAttribute('normal', new Ci.BufferAttribute(i, 3).copyVector3sArray(e.normals)) } if (0 < e.colors.length) { var n = new Float32Array(3 * e.colors.length) this.addAttribute('color', new Ci.BufferAttribute(n, 3).copyColorsArray(e.colors)) } if (0 < e.uvs.length) { var r = new Float32Array(2 * e.uvs.length) this.addAttribute('uv', new Ci.BufferAttribute(r, 2).copyVector2sArray(e.uvs)) } if (0 < e.uvs2.length) { var o = new Float32Array(2 * e.uvs2.length) this.addAttribute('uv2', new Ci.BufferAttribute(o, 2).copyVector2sArray(e.uvs2)) } if (0 < e.indices.length) { var a = new (65535 < e.vertices.length ? Uint32Array : Uint16Array)(3 * e.indices.length) this.setIndex(new Ci.BufferAttribute(a, 1).copyIndicesArray(e.indices)) } for (var s in ((this.groups = e.groups), e.morphTargets)) { for (var l = [], c = e.morphTargets[s], h = 0, u = c.length; h < u; h++) { var d = c[h], p = new Ci.Float32Attribute(3 * d.length, 3) l.push(p.copyVector3sArray(d)) } this.morphAttributes[s] = l } if (0 < e.skinIndices.length) { var f = new Ci.Float32Attribute(4 * e.skinIndices.length, 4) this.addAttribute('skinIndex', f.copyVector4sArray(e.skinIndices)) } if (0 < e.skinWeights.length) { var g = new Ci.Float32Attribute(4 * e.skinWeights.length, 4) this.addAttribute('skinWeight', g.copyVector4sArray(e.skinWeights)) } return null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone()), this }, computeBoundingBox: (new Ci.Vector3(), function () { null === this.boundingBox && (this.boundingBox = new Ci.Box3()) var e = this.attributes.position.array e && this.boundingBox.setFromArray(e), (void 0 !== e && 0 !== e.length) || (this.boundingBox.min.set(0, 0, 0), this.boundingBox.max.set(0, 0, 0)), (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) && console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this) }), computeBoundingSphere: ((nt = new Ci.Box3()), (rt = new Ci.Vector3()), function () { null === this.boundingSphere && (this.boundingSphere = new Ci.Sphere()) var e = this.attributes.position.array if (e) { var t = this.boundingSphere.center nt.setFromArray(e), nt.center(t) for (var i = 0, n = 0, r = e.length; n < r; n += 3) rt.fromArray(e, n), (i = Math.max(i, t.distanceToSquared(rt))) ;(this.boundingSphere.radius = Math.sqrt(i)), isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this) } }), computeFaceNormals: function () {}, computeVertexNormals: function () { var e = this.index, t = this.attributes, i = this.groups if (t.position) { var n = t.position.array if (void 0 === t.normal) this.addAttribute('normal', new Ci.BufferAttribute(new Float32Array(n.length), 3)) else for (var r = t.normal.array, o = 0, a = r.length; o < a; o++) r[o] = 0 var s, l, c, h = t.normal.array, u = new Ci.Vector3(), d = new Ci.Vector3(), p = new Ci.Vector3(), f = new Ci.Vector3(), g = new Ci.Vector3() if (e) { var m = e.array 0 === i.length && this.addGroup(0, m.length) for (var v = 0, y = i.length; v < y; ++v) { var A = i[v], C = A.start for (o = C, a = C + A.count; o < a; o += 3) (s = 3 * m[o + 0]), (l = 3 * m[o + 1]), (c = 3 * m[o + 2]), u.fromArray(n, s), d.fromArray(n, l), p.fromArray(n, c), f.subVectors(p, d), g.subVectors(u, d), f.cross(g), (h[s] += f.x), (h[1 + s] += f.y), (h[2 + s] += f.z), (h[l] += f.x), (h[1 + l] += f.y), (h[2 + l] += f.z), (h[c] += f.x), (h[1 + c] += f.y), (h[2 + c] += f.z) } } else for (o = 0, a = n.length; o < a; o += 9) u.fromArray(n, o), d.fromArray(n, o + 3), p.fromArray(n, o + 6), f.subVectors(p, d), g.subVectors(u, d), f.cross(g), (h[o] = f.x), (h[o + 1] = f.y), (h[o + 2] = f.z), (h[o + 3] = f.x), (h[o + 4] = f.y), (h[o + 5] = f.z), (h[o + 6] = f.x), (h[o + 7] = f.y), (h[o + 8] = f.z) this.normalizeNormals(), (t.normal.needsUpdate = !0) } }, merge: function (e, t) { if (e instanceof Ci.BufferGeometry != 0) { void 0 === t && (t = 0) var i = this.attributes for (var n in i) if (void 0 !== e.attributes[n]) for (var r = i[n].array, o = e.attributes[n], a = o.array, s = 0, l = o.itemSize * t; s < a.length; s++, l++) r[l] = a[s] return this } console.error('THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', e) }, normalizeNormals: function () { for (var e, t, i, n, r = this.attributes.normal.array, o = 0, a = r.length; o < a; o += 3) (e = r[o]), (t = r[o + 1]), (i = r[o + 2]), (n = 1 / Math.sqrt(e * e + t * t + i * i)), (r[o] *= n), (r[o + 1] *= n), (r[o + 2] *= n) }, toNonIndexed: function () { if (null === this.index) return console.warn('THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed.'), this var e = new Ci.BufferGeometry(), t = this.index.array, i = this.attributes for (var n in i) { for (var r = i[n], o = r.array, a = r.itemSize, s = new o.constructor(t.length * a), l = 0, c = 0, h = 0, u = t.length; h < u; h++) { l = t[h] * a for (var d = 0; d < a; d++) s[c++] = o[l++] } e.addAttribute(n, new Ci.BufferAttribute(s, a)) } return e }, toJSON: function () { var e = { metadata: { version: 4.4, type: 'BufferGeometry', generator: 'BufferGeometry.toJSON' } } if (((e.uuid = this.uuid), (e.type = this.type), '' !== this.name && (e.name = this.name), void 0 !== this.parameters)) { var t = this.parameters for (var i in t) void 0 !== t[i] && (e[i] = t[i]) return e } e.data = { attributes: {} } var n = this.index if (null !== n) { var r = Array.prototype.slice.call(n.array) e.data.index = { type: n.array.constructor.name, array: r } } var o = this.attributes for (var i in o) { var a = o[i] r = Array.prototype.slice.call(a.array) e.data.attributes[i] = { itemSize: a.itemSize, type: a.array.constructor.name, array: r } } var s = this.groups 0 < s.length && (e.data.groups = JSON.parse(JSON.stringify(s))) var l = this.boundingSphere return ( null !== l && (e.data.boundingSphere = { center: l.center.toArray(), radius: l.radius }), e ) }, clone: function () { return new Ci.BufferGeometry().copy(this) }, copy: function (e) { var t = e.index null !== t && this.setIndex(t.clone()) var i = e.attributes for (var n in i) { var r = i[n] this.addAttribute(n, r.clone()) } for (var o = e.groups, a = 0, s = o.length; a < s; a++) { var l = o[a] this.addGroup(l.start, l.count) } return this }, dispose: function () { this.dispatchEvent({ type: 'dispose' }) } }), Ci.EventDispatcher.prototype.apply(Ci.BufferGeometry.prototype), (Ci.BufferGeometry.MaxIndex = 65535), (Ci.InstancedBufferGeometry = function () { Ci.BufferGeometry.call(this), (this.type = 'InstancedBufferGeometry'), (this.maxInstancedCount = void 0) }), (Ci.InstancedBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.InstancedBufferGeometry.prototype.constructor = Ci.InstancedBufferGeometry), (Ci.InstancedBufferGeometry.prototype.addGroup = function (e, t, i) { this.groups.push({ start: e, count: t, instances: i }) }), (Ci.InstancedBufferGeometry.prototype.copy = function (e) { var t = e.index null !== t && this.setIndex(t.clone()) var i = e.attributes for (var n in i) { var r = i[n] this.addAttribute(n, r.clone()) } for (var o = e.groups, a = 0, s = o.length; a < s; a++) { var l = o[a] this.addGroup(l.start, l.count, l.instances) } return this }), Ci.EventDispatcher.prototype.apply(Ci.InstancedBufferGeometry.prototype), (Ci.Uniform = function (e, t) { ;(this.type = e), (this.value = t), (this.dynamic = !1) }), (Ci.Uniform.prototype = { constructor: Ci.Uniform, onUpdate: function (e) { return (this.dynamic = !0), (this.onUpdateCallback = e), this } }), (Ci.AnimationClip = function (e, t, i) { ;(this.name = e || Ci.Math.generateUUID()), (this.tracks = i), (this.duration = void 0 !== t ? t : -1), this.duration < 0 && this.resetDuration(), this.trim(), this.optimize() }), (Ci.AnimationClip.prototype = { constructor: Ci.AnimationClip, resetDuration: function () { for (var e = 0, t = 0, i = this.tracks.length; t !== i; ++t) { var n = this.tracks[t] e = Math.max(e, n.times[n.times.length - 1]) } this.duration = e }, trim: function () { for (var e = 0; e < this.tracks.length; e++) this.tracks[e].trim(0, this.duration) return this }, optimize: function () { for (var e = 0; e < this.tracks.length; e++) this.tracks[e].optimize() return this } }), Object.assign(Ci.AnimationClip, { parse: function (e) { for (var t = [], i = e.tracks, n = 1 / (e.fps || 1), r = 0, o = i.length; r !== o; ++r) t.push(Ci.KeyframeTrack.parse(i[r]).scale(n)) return new Ci.AnimationClip(e.name, e.duration, t) }, toJSON: function (e) { for ( var t = [], i = e.tracks, n = { name: e.name, duration: e.duration, tracks: t }, r = 0, o = i.length; r !== o; ++r ) t.push(Ci.KeyframeTrack.toJSON(i[r])) return n }, CreateFromMorphTargetSequence: function (e, t, i) { for (var n = t.length, r = [], o = 0; o < n; o++) { var a = [], s = [] a.push((o + n - 1) % n, o, (o + 1) % n), s.push(0, 1, 0) var l = Ci.AnimationUtils.getKeyframeOrder(a) ;(a = Ci.AnimationUtils.sortedArray(a, 1, l)), (s = Ci.AnimationUtils.sortedArray(s, 1, l)), 0 === a[0] && (a.push(n), s.push(s[0])), r.push(new Ci.NumberKeyframeTrack('.morphTargetInfluences[' + t[o].name + ']', a, s).scale(1 / i)) } return new Ci.AnimationClip(e, -1, r) }, findByName: function (e, t) { for (var i = 0; i < e.length; i++) if (e[i].name === t) return e[i] return null }, CreateClipsFromMorphTargetSequences: function (e, t) { for (var i = {}, n = /^([\w-]*?)([\d]+)$/, r = 0, o = e.length; r < o; r++) { var a = e[r], s = a.name.match(n) if (s && 1 < s.length) { var l = i[(h = s[1])] l || (i[h] = l = []), l.push(a) } } var c = [] for (var h in i) c.push(Ci.AnimationClip.CreateFromMorphTargetSequence(h, i[h], t)) return c }, parseAnimation: function (e, t, i) { if (!e) return console.error(' no animation in JSONLoader data'), null function n(e, t, i, n, r) { if (0 !== i.length) { var o = [], a = [] Ci.AnimationUtils.flattenJSON(i, o, a, n), 0 !== o.length && r.push(new e(t, o, a)) } } for (var r = [], o = e.name || 'default', a = e.length || -1, s = e.fps || 30, l = e.hierarchy || [], c = 0; c < l.length; c++) { var h = l[c].keys if (h && 0 != h.length) if (h[0].morphTargets) { for (var u = {}, d = 0; d < h.length; d++) if (h[d].morphTargets) for (var p = 0; p < h[d].morphTargets.length; p++) u[h[d].morphTargets[p]] = -1 for (var f in u) { var g = [], m = [] for (p = 0; p !== h[d].morphTargets.length; ++p) { var v = h[d] g.push(v.time), m.push(v.morphTarget === f ? 1 : 0) } r.push(new Ci.NumberKeyframeTrack('.morphTargetInfluence[' + f + ']', g, m)) } a = u.length * (s || 1) } else { var y = '.bones[' + t[c].name + ']' n(Ci.VectorKeyframeTrack, y + '.position', h, 'pos', r), n(Ci.QuaternionKeyframeTrack, y + '.quaternion', h, 'rot', r), n(Ci.VectorKeyframeTrack, y + '.scale', h, 'scl', r) } } return 0 === r.length ? null : new Ci.AnimationClip(o, a, r) } }), (Ci.AnimationMixer = function (e) { ;(this._root = e), this._initMemoryManager(), (this._accuIndex = 0), (this.time = 0), (this.timeScale = 1) }), (Ci.AnimationMixer.prototype = { constructor: Ci.AnimationMixer, clipAction: function (e, t) { var i, n = (t || this._root).uuid, r = 'string' == typeof e ? e : e.name, o = e !== r ? e : null, a = this._actionsByClip[r] if (void 0 !== a) { var s = a.actionByRoot[n] if (void 0 !== s) return s if (((o = (i = a.knownActions[0])._clip), e !== r && e !== o)) throw new Error('Different clips with the same name detected!') } if (null === o) return null var l = new Ci.AnimationMixer._Action(this, o, t) return this._bindAction(l, i), this._addInactiveAction(l, r, n), l }, existingAction: function (e, t) { var i = (t || this._root).uuid, n = 'string' == typeof e ? e : e.name, r = this._actionsByClip[n] return (void 0 !== r && r.actionByRoot[i]) || null }, stopAllAction: function () { var e = this._actions, t = this._nActiveActions, i = this._bindings, n = this._nActiveBindings this._nActiveActions = 0 for (var r = (this._nActiveBindings = 0); r !== t; ++r) e[r].reset() for (r = 0; r !== n; ++r) i[r].useCount = 0 return this }, update: function (e) { e *= this.timeScale for (var t = this._actions, i = this._nActiveActions, n = (this.time += e), r = Math.sign(e), o = (this._accuIndex ^= 1), a = 0; a !== i; ++a) { var s = t[a] s.enabled && s._update(n, e, r, o) } var l = this._bindings, c = this._nActiveBindings for (a = 0; a !== c; ++a) l[a].apply(o) return this }, getRoot: function () { return this._root }, uncacheClip: function (e) { var t = this._actions, i = e.name, n = this._actionsByClip, r = n[i] if (void 0 !== r) { for (var o = r.knownActions, a = 0, s = o.length; a !== s; ++a) { var l = o[a] this._deactivateAction(l) var c = l._cacheIndex, h = t[t.length - 1] ;(l._cacheIndex = null), (l._byClipCacheIndex = null), (t[(h._cacheIndex = c)] = h), t.pop(), this._removeInactiveBindingsForAction(l) } delete n[i] } }, uncacheRoot: function (e) { var t = e.uuid, i = this._actionsByClip for (var n in i) { var r = i[n].actionByRoot[t] void 0 !== r && (this._deactivateAction(r), this._removeInactiveAction(r)) } var o = this._bindingsByRootAndName[t] if (void 0 !== o) for (var a in o) { var s = o[a] s.restoreOriginalState(), this._removeInactiveBinding(s) } }, uncacheAction: function (e, t) { var i = this.existingAction(e, t) null !== i && (this._deactivateAction(i), this._removeInactiveAction(i)) } }), Ci.EventDispatcher.prototype.apply(Ci.AnimationMixer.prototype), (Ci.AnimationMixer._Action = function (e, t, i) { ;(this._mixer = e), (this._clip = t), (this._localRoot = i || null) for ( var n = t.tracks, r = n.length, o = new Array(r), a = { endingStart: Ci.ZeroCurvatureEnding, endingEnd: Ci.ZeroCurvatureEnding }, s = 0; s !== r; ++s ) { var l = n[s].createInterpolant(null) ;(o[s] = l).settings = a } ;(this._interpolantSettings = a), (this._interpolants = o), (this._propertyBindings = new Array(r)), (this._cacheIndex = null), (this._byClipCacheIndex = null), (this._timeScaleInterpolant = null), (this._weightInterpolant = null), (this.loop = Ci.LoopRepeat), (this._loopCount = -1), (this._startTime = null), (this.time = 0), (this.timeScale = 1), (this._effectiveTimeScale = 1), (this.weight = 1), (this._effectiveWeight = 1), (this.repetitions = 1 / 0), (this.paused = !1), (this.enabled = !0), (this.clampWhenFinished = !1), (this.zeroSlopeAtStart = !0), (this.zeroSlopeAtEnd = !0) }), (Ci.AnimationMixer._Action.prototype = { constructor: Ci.AnimationMixer._Action, play: function () { return this._mixer._activateAction(this), this }, stop: function () { return this._mixer._deactivateAction(this), this.reset() }, reset: function () { return (this.paused = !1), (this.enabled = !0), (this.time = 0), (this._loopCount = -1), (this._startTime = null), this.stopFading().stopWarping() }, isRunning: function () { return this._startTime, this.enabled && !this.paused && 0 !== this.timeScale && null === this._startTime && this._mixer._isActiveAction(this) }, isScheduled: function () { return this._mixer._isActiveAction(this) }, startAt: function (e) { return (this._startTime = e), this }, setLoop: function (e, t) { return (this.loop = e), (this.repetitions = t), this }, setEffectiveWeight: function (e) { return (this.weight = e), (this._effectiveWeight = this.enabled ? e : 0), this.stopFading() }, getEffectiveWeight: function () { return this._effectiveWeight }, fadeIn: function (e) { return this._scheduleFading(e, 0, 1) }, fadeOut: function (e) { return this._scheduleFading(e, 1, 0) }, crossFadeFrom: function (e, t, i) { if ((this._mixer, e.fadeOut(t), this.fadeIn(t), i)) { var n = this._clip.duration, r = e._clip.duration, o = r / n, a = n / r e.warp(1, o, t), this.warp(a, 1, t) } return this }, crossFadeTo: function (e, t, i) { return e.crossFadeFrom(this, t, i) }, stopFading: function () { var e = this._weightInterpolant return null !== e && ((this._weightInterpolant = null), this._mixer._takeBackControlInterpolant(e)), this }, setEffectiveTimeScale: function (e) { return (this.timeScale = e), (this._effectiveTimeScale = this.paused ? 0 : e), this.stopWarping() }, getEffectiveTimeScale: function () { return this._effectiveTimeScale }, setDuration: function (e) { return (this.timeScale = this._clip.duration / e), this.stopWarping() }, syncWith: function (e) { return (this.time = e.time), (this.timeScale = e.timeScale), this.stopWarping() }, halt: function (e) { return this.warp(this._currentTimeScale, 0, e) }, warp: function (e, t, i) { var n = this._mixer, r = n.time, o = this._timeScaleInterpolant, a = this.timeScale null === o && ((o = n._lendControlInterpolant()), (this._timeScaleInterpolant = o)) var s = o.parameterPositions, l = o.sampleValues return (s[0] = r), (s[1] = r + i), (l[0] = e / a), (l[1] = t / a), this }, stopWarping: function () { var e = this._timeScaleInterpolant return null !== e && ((this._timeScaleInterpolant = null), this._mixer._takeBackControlInterpolant(e)), this }, getMixer: function () { return this._mixer }, getClip: function () { return this._clip }, getRoot: function () { return this._localRoot || this._mixer._root }, _update: function (e, t, i, n) { var r = this._startTime if (null !== r) { var o = (e - r) * i if (o < 0 || 0 === i) return ;(this._startTime = null), (t = i * o) } t *= this._updateTimeScale(e) var a = this._updateTime(t), s = this._updateWeight(e) if (0 < s) for (var l = this._interpolants, c = this._propertyBindings, h = 0, u = l.length; h !== u; ++h) l[h].evaluate(a), c[h].accumulate(n, s) }, _updateWeight: function (e) { var t = 0 if (this.enabled) { t = this.weight var i = this._weightInterpolant if (null !== i) { var n = i.evaluate(e)[0] ;(t *= n), e > i.parameterPositions[1] && (this.stopFading(), 0 === n && (this.enabled = !1)) } } return (this._effectiveWeight = t) }, _updateTimeScale: function (e) { var t = 0 if (!this.paused) { t = this.timeScale var i = this._timeScaleInterpolant if (null !== i) (t *= i.evaluate(e)[0]), e > i.parameterPositions[1] && (this.stopWarping(), 0 === t ? (this.pause = !0) : (this.timeScale = t)) } return (this._effectiveTimeScale = t) }, _updateTime: function (e) { var t = this.time + e if (0 === e) return t var i = this._clip.duration, n = this.loop, r = this._loopCount, o = !1 switch (n) { case Ci.LoopOnce: if ((-1 === r && ((this.loopCount = 0), this._setEndings(!0, !0, !1)), i <= t)) t = i else { if (!(t < 0)) break t = 0 } this.clampWhenFinished ? (this.pause = !0) : (this.enabled = !1), this._mixer.dispatchEvent({ type: 'finished', action: this, direction: e < 0 ? -1 : 1 }) break case Ci.LoopPingPong: o = !0 case Ci.LoopRepeat: if ((-1 === r && (0 < e ? ((r = 0), this._setEndings(!0, 0 === this.repetitions, o)) : this._setEndings(0 === this.repetitions, !0, o)), i <= t || t < 0)) { var a = Math.floor(t / i) ;(t -= i * a), (r += Math.abs(a)) var s = this.repetitions - r if (s < 0) { this.clampWhenFinished ? (this.paused = !0) : (this.enabled = !1), (t = 0 < e ? i : 0), this._mixer.dispatchEvent({ type: 'finished', action: this, direction: 0 < e ? 1 : -1 }) break } if (0 == s) { var l = e < 0 this._setEndings(l, !l, o) } else this._setEndings(!1, !1, o) ;(this._loopCount = r), this._mixer.dispatchEvent({ type: 'loop', action: this, loopDelta: a }) } if (n === Ci.LoopPingPong && 1 == (1 & r)) return i - (this.time = t) } return (this.time = t) }, _setEndings: function (e, t, i) { var n = this._interpolantSettings i ? ((n.endingStart = Ci.ZeroSlopeEnding), (n.endingEnd = Ci.ZeroSlopeEnding)) : ((n.endingStart = e ? (this.zeroSlopeAtStart ? Ci.ZeroSlopeEnding : Ci.ZeroCurvatureEnding) : Ci.WrapAroundEnding), (n.endingEnd = t ? (this.zeroSlopeAtEnd ? Ci.ZeroSlopeEnding : Ci.ZeroCurvatureEnding) : Ci.WrapAroundEnding)) }, _scheduleFading: function (e, t, i) { var n = this._mixer, r = n.time, o = this._weightInterpolant null === o && ((o = n._lendControlInterpolant()), (this._weightInterpolant = o)) var a = o.parameterPositions, s = o.sampleValues return (a[0] = r), (s[0] = t), (a[1] = r + e), (s[1] = i), this } }), Object.assign(Ci.AnimationMixer.prototype, { _bindAction: function (e, t) { var i = e._localRoot || this._root, n = e._clip.tracks, r = n.length, o = e._propertyBindings, a = e._interpolants, s = i.uuid, l = this._bindingsByRootAndName, c = l[s] void 0 === c && ((c = {}), (l[s] = c)) for (var h = 0; h !== r; ++h) { var u = n[h], d = u.name, p = c[d] if (void 0 !== p) o[h] = p else { if (void 0 !== (p = o[h])) { null === p._cacheIndex && (++p.referenceCount, this._addInactiveBinding(p, s, d)) continue } var f = t && t._propertyBindings[h].binding.parsedPath ++(p = new Ci.PropertyMixer(Ci.PropertyBinding.create(i, d, f), u.ValueTypeName, u.getValueSize())).referenceCount, this._addInactiveBinding(p, s, d), (o[h] = p) } a[h].resultBuffer = p.buffer } }, _activateAction: function (e) { if (!this._isActiveAction(e)) { if (null === e._cacheIndex) { var t = (e._localRoot || this._root).uuid, i = e._clip.name, n = this._actionsByClip[i] this._bindAction(e, n && n.knownActions[0]), this._addInactiveAction(e, i, t) } for (var r = e._propertyBindings, o = 0, a = r.length; o !== a; ++o) { var s = r[o] 0 == s.useCount++ && (this._lendBinding(s), s.saveOriginalState()) } this._lendAction(e) } }, _deactivateAction: function (e) { if (this._isActiveAction(e)) { for (var t = e._propertyBindings, i = 0, n = t.length; i !== n; ++i) { var r = t[i] 0 == --r.useCount && (r.restoreOriginalState(), this._takeBackBinding(r)) } this._takeBackAction(e) } }, _initMemoryManager: function () { ;(this._actions = []), (this._nActiveActions = 0), (this._actionsByClip = {}), (this._bindings = []), (this._nActiveBindings = 0), (this._bindingsByRootAndName = {}), (this._controlInterpolants = []), (this._nActiveControlInterpolants = 0) var e = this this.stats = { actions: { get total() { return e._actions.length }, get inUse() { return e._nActiveActions } }, bindings: { get total() { return e._bindings.length }, get inUse() { return e._nActiveBindings } }, controlInterpolants: { get total() { return e._controlInterpolants.length }, get inUse() { return e._nActiveControlInterpolants } } } }, _isActiveAction: function (e) { var t = e._cacheIndex return null !== t && t < this._nActiveActions }, _addInactiveAction: function (e, t, i) { var n = this._actions, r = this._actionsByClip, o = r[t] if (void 0 === o) (o = { knownActions: [e], actionByRoot: {} }), (e._byClipCacheIndex = 0), (r[t] = o) else { var a = o.knownActions ;(e._byClipCacheIndex = a.length), a.push(e) } ;(e._cacheIndex = n.length), n.push(e), (o.actionByRoot[i] = e) }, _removeInactiveAction: function (e) { var t = this._actions, i = t[t.length - 1], n = e._cacheIndex ;(t[(i._cacheIndex = n)] = i), t.pop(), (e._cacheIndex = null) var r = e._clip.name, o = this._actionsByClip, a = o[r], s = a.knownActions, l = s[s.length - 1], c = e._byClipCacheIndex ;(s[(l._byClipCacheIndex = c)] = l), s.pop(), (e._byClipCacheIndex = null), delete a.actionByRoot[(t._localRoot || this._root).uuid], 0 === s.length && delete o[r], this._removeInactiveBindingsForAction(e) }, _removeInactiveBindingsForAction: function (e) { for (var t = e._propertyBindings, i = 0, n = t.length; i !== n; ++i) { var r = t[i] 0 == --r.referenceCount && this._removeInactiveBinding(r) } }, _lendAction: function (e) { var t = this._actions, i = e._cacheIndex, n = this._nActiveActions++, r = t[n] ;(t[(e._cacheIndex = n)] = e), (t[(r._cacheIndex = i)] = r) }, _takeBackAction: function (e) { var t = this._actions, i = e._cacheIndex, n = --this._nActiveActions, r = t[n] ;(t[(e._cacheIndex = n)] = e), (t[(r._cacheIndex = i)] = r) }, _addInactiveBinding: function (e, t, i) { var n = this._bindingsByRootAndName, r = n[t], o = this._bindings void 0 === r && ((r = {}), (n[t] = r)), ((r[i] = e)._cacheIndex = o.length), o.push(e) }, _removeInactiveBinding: function (e) { var t = this._bindings, i = e.binding, n = i.rootNode.uuid, r = i.path, o = this._bindingsByRootAndName, a = o[n], s = t[t.length - 1], l = e._cacheIndex ;(t[(s._cacheIndex = l)] = s), t.pop(), delete a[r] e: { for (var c in a) break e delete o[n] } }, _lendBinding: function (e) { var t = this._bindings, i = e._cacheIndex, n = this._nActiveBindings++, r = t[n] ;(t[(e._cacheIndex = n)] = e), (t[(r._cacheIndex = i)] = r) }, _takeBackBinding: function (e) { var t = this._bindings, i = e._cacheIndex, n = --this._nActiveBindings, r = t[n] ;(t[(e._cacheIndex = n)] = e), (t[(r._cacheIndex = i)] = r) }, _lendControlInterpolant: function () { var e = this._controlInterpolants, t = this._nActiveControlInterpolants++, i = e[t] return void 0 === i && (e[((i = new Ci.LinearInterpolant(new Float32Array(2), new Float32Array(2), 1, this._controlInterpolantsResultBuffer)).__cacheIndex = t)] = i), i }, _takeBackControlInterpolant: function (e) { var t = this._controlInterpolants, i = e.__cacheIndex, n = --this._nActiveControlInterpolants, r = t[n] ;(t[(e.__cacheIndex = n)] = e), (t[(r.__cacheIndex = i)] = r) }, _controlInterpolantsResultBuffer: new Float32Array(1) }), (Ci.AnimationObjectGroup = function (e) { ;(this.uuid = Ci.Math.generateUUID()), (this._objects = Array.prototype.slice.call(arguments)), (this.nCachedObjects_ = 0) var t = {} this._indicesByUUID = t for (var i = 0, n = arguments.length; i !== n; ++i) t[arguments[i].uuid] = i ;(this._paths = []), (this._parsedPaths = []), (this._bindings = []), (this._bindingsIndicesByPath = {}) var r = this this.stats = { objects: { get total() { return r._objects.length }, get inUse() { return this.total - r.nCachedObjects_ } }, get bindingsPerObject() { return r._bindings.length } } }), (Ci.AnimationObjectGroup.prototype = { constructor: Ci.AnimationObjectGroup, add: function (e) { for ( var t = this._objects, i = t.length, n = this.nCachedObjects_, r = this._indicesByUUID, o = this._paths, a = this._parsedPaths, s = this._bindings, l = s.length, c = 0, h = arguments.length; c !== h; ++c ) { var u = arguments[c], d = u.uuid, p = r[d] if (void 0 === p) { ;(p = i++), (r[d] = p), t.push(u) for (var f = 0, g = l; f !== g; ++f) s[f].push(new Ci.PropertyBinding(u, o[f], a[f])) } else if (p < n) { var m = t[p], v = --n, y = t[v] ;(t[(r[y.uuid] = p)] = y), (t[(r[d] = v)] = u) for (f = 0, g = l; f !== g; ++f) { var A = s[f], C = A[v], I = A[p] ;(A[p] = C), void 0 === I && (I = new Ci.PropertyBinding(u, o[f], a[f])), (A[v] = I) } } else t[p] !== m && console.error('Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...') } this.nCachedObjects_ = n }, remove: function (e) { for (var t = this._objects, i = (t.length, this.nCachedObjects_), n = this._indicesByUUID, r = this._bindings, o = r.length, a = 0, s = arguments.length; a !== s; ++a) { var l = arguments[a], c = l.uuid, h = n[c] if (void 0 !== h && i <= h) { var u = i++, d = t[u] ;(t[(n[d.uuid] = h)] = d), (t[(n[c] = u)] = l) for (var p = 0, f = o; p !== f; ++p) { var g = r[p], m = g[u], v = g[h] ;(g[h] = m), (g[u] = v) } } } this.nCachedObjects_ = i }, uncache: function (e) { for (var t = this._objects, i = t.length, n = this.nCachedObjects_, r = this._indicesByUUID, o = this._bindings, a = o.length, s = 0, l = arguments.length; s !== l; ++s) { var c = arguments[s].uuid, h = r[c] if (void 0 !== h) if ((delete r[c], h < n)) { var u = --n, d = t[u], p = t[(y = --i)] ;(t[(r[d.uuid] = h)] = d), (t[(r[p.uuid] = u)] = p), t.pop() for (var f = 0, g = a; f !== g; ++f) { var m = (A = o[f])[u], v = A[y] ;(A[h] = m), (A[u] = v), A.pop() } } else { var y ;(t[(r[(p = t[(y = --i)]).uuid] = h)] = p), t.pop() for (f = 0, g = a; f !== g; ++f) { var A ;((A = o[f])[h] = A[y]), A.pop() } } } this.nCachedObjects_ = n }, subscribe_: function (e, t) { var i = this._bindingsIndicesByPath, n = i[e], r = this._bindings if (void 0 !== n) return r[n] var o = this._paths, a = this._parsedPaths, s = this._objects, l = s.length, c = this.nCachedObjects_, h = new Array(l) ;(n = r.length), (i[e] = n), o.push(e), a.push(t), r.push(h) for (var u = c, d = s.length; u !== d; ++u) { var p = s[u] h[u] = new Ci.PropertyBinding(p, e, t) } return h }, unsubscribe_: function (e) { var t = this._bindingsIndicesByPath, i = t[e] if (void 0 !== i) { var n = this._paths, r = this._parsedPaths, o = this._bindings, a = o.length - 1, s = o[a] ;(o[(t[e[a]] = i)] = s), o.pop(), (r[i] = r[a]), r.pop(), (n[i] = n[a]), n.pop() } } }), (Ci.AnimationUtils = { arraySlice: function (e, t, i) { return Ci.AnimationUtils.isTypedArray(e) ? new e.constructor(e.subarray(t, i)) : e.slice(t, i) }, convertArray: function (e, t, i) { return !e || (!i && e.constructor === t) ? e : 'number' == typeof t.BYTES_PER_ELEMENT ? new t(e) : Array.prototype.slice.call(e) }, isTypedArray: function (e) { return ArrayBuffer.isView(e) && !(e instanceof DataView) }, getKeyframeOrder: function (i) { for (var e = i.length, t = new Array(e), n = 0; n !== e; ++n) t[n] = n return ( t.sort(function (e, t) { return i[e] - i[t] }), t ) }, sortedArray: function (e, t, i) { for (var n = e.length, r = new e.constructor(n), o = 0, a = 0; a !== n; ++o) for (var s = i[o] * t, l = 0; l !== t; ++l) r[a++] = e[s + l] return r }, flattenJSON: function (e, t, i, n) { for (var r = 1, o = e[0]; void 0 !== o && void 0 === o[n]; ) o = e[r++] if (void 0 !== o) { var a = o[n] if (void 0 !== a) if (Array.isArray(a)) for (; void 0 !== (a = o[n]) && (t.push(o.time), i.push.apply(i, a)), void 0 !== (o = e[r++]); ); else if (void 0 !== a.toArray) for (; void 0 !== (a = o[n]) && (t.push(o.time), a.toArray(i, i.length)), void 0 !== (o = e[r++]); ); else for (; void 0 !== (a = o[n]) && (t.push(o.time), i.push(a)), void 0 !== (o = e[r++]); ); } } }), (Ci.KeyframeTrack = function (e, t, i, n) { if (void 0 === e) throw new Error('track name is undefined') if (void 0 === t || 0 === t.length) throw new Error('no keyframes in track named ' + e) ;(this.name = e), (this.times = Ci.AnimationUtils.convertArray(t, this.TimeBufferType)), (this.values = Ci.AnimationUtils.convertArray(i, this.ValueBufferType)), this.setInterpolation(n || this.DefaultInterpolation), this.validate(), this.optimize() }), (Ci.KeyframeTrack.prototype = { constructor: Ci.KeyframeTrack, TimeBufferType: Float32Array, ValueBufferType: Float32Array, DefaultInterpolation: Ci.InterpolateLinear, InterpolantFactoryMethodDiscrete: function (e) { return new Ci.DiscreteInterpolant(this.times, this.values, this.getValueSize(), e) }, InterpolantFactoryMethodLinear: function (e) { return new Ci.LinearInterpolant(this.times, this.values, this.getValueSize(), e) }, InterpolantFactoryMethodSmooth: function (e) { return new Ci.CubicInterpolant(this.times, this.values, this.getValueSize(), e) }, setInterpolation: function (e) { var t = void 0 switch (e) { case Ci.InterpolateDiscrete: t = this.InterpolantFactoryMethodDiscrete break case Ci.InterpolateLinear: t = this.InterpolantFactoryMethodLinear break case Ci.InterpolateSmooth: t = this.InterpolantFactoryMethodSmooth } if (void 0 !== t) this.createInterpolant = t else { var i = 'unsupported interpolation for ' + this.ValueTypeName + ' keyframe track named ' + this.name if (void 0 === this.createInterpolant) { if (e === this.DefaultInterpolation) throw new Error(i) this.setInterpolation(this.DefaultInterpolation) } console.warn(i) } }, getInterpolation: function () { switch (this.createInterpolant) { case this.InterpolantFactoryMethodDiscrete: return Ci.InterpolateDiscrete case this.InterpolantFactoryMethodLinear: return Ci.InterpolateLinear case this.InterpolantFactoryMethodSmooth: return Ci.InterpolateSmooth } }, getValueSize: function () { return this.values.length / this.times.length }, shift: function (e) { if (0 !== e) for (var t = this.times, i = 0, n = t.length; i !== n; ++i) t[i] += e return this }, scale: function (e) { if (1 !== e) for (var t = this.times, i = 0, n = t.length; i !== n; ++i) t[i] *= e return this }, trim: function (e, t) { for (var i = this.times, n = i.length, r = 0, o = n - 1; r !== n && i[r] < e; ) ++r for (; -1 !== o && i[o] > t; ) --o if ((++o, 0 !== r || o !== n)) { o <= r && (r = (o = Math.max(o, 1)) - 1) var a = this.getValueSize() ;(this.times = Ci.AnimationUtils.arraySlice(i, r, o)), (this.values = Ci.AnimationUtils.arraySlice(this.values, r * a, o * a)) } return this }, validate: function () { var e = !0, t = this.getValueSize() t - Math.floor(t) != 0 && (console.error('invalid value size in track', this), (e = !1)) var i = this.times, n = this.values, r = i.length 0 === r && (console.error('track is empty', this), (e = !1)) for (var o = null, a = 0; a !== r; a++) { var s = i[a] if ('number' == typeof s && isNaN(s)) { console.error('time is not a valid number', this, a, s), (e = !1) break } if (null !== o && s < o) { console.error('out of order keys', this, a, s, o), (e = !1) break } o = s } if (void 0 !== n && Ci.AnimationUtils.isTypedArray(n)) { a = 0 for (var l = n.length; a !== l; ++a) { var c = n[a] if (isNaN(c)) { console.error('value is not a valid number', this, a, c), (e = !1) break } } } return e }, optimize: function () { for (var e = this.times, t = this.values, i = this.getValueSize(), n = 1, r = 1, o = e.length - 1; r <= o; ++r) { var a = !1, s = e[r] if (s !== e[r + 1] && (1 !== r || s !== s[0])) for (var l = r * i, c = l - i, h = l + i, u = 0; u !== i; ++u) { var d = t[l + u] if (d !== t[c + u] || d !== t[h + u]) { a = !0 break } } if (a) { if (r !== n) { e[n] = e[r] var p = r * i, f = n * i for (u = 0; u !== i; ++u) t[f + u] = t[p + u] } ++n } } return n !== e.length && ((this.times = Ci.AnimationUtils.arraySlice(e, 0, n)), (this.values = Ci.AnimationUtils.arraySlice(t, 0, n * i))), this } }), Object.assign(Ci.KeyframeTrack, { parse: function (e) { if (void 0 === e.type) throw new Error('track type undefined, can not parse') var t = Ci.KeyframeTrack._getTrackTypeForValueTypeName(e.type) if (void 0 === e.times) { console.warn('legacy JSON format detected, converting') var i = [], n = [] Ci.AnimationUtils.flattenJSON(e.keys, i, n, 'value'), (e.times = i), (e.values = n) } return void 0 !== t.parse ? t.parse(e) : new t(e.name, e.times, e.values, e.interpolation) }, toJSON: function (e) { var t, i = e.constructor if (void 0 !== i.toJSON) t = i.toJSON(e) else { t = { name: e.name, times: Ci.AnimationUtils.convertArray(e.times, Array), values: Ci.AnimationUtils.convertArray(e.values, Array) } var n = e.getInterpolation() n !== e.DefaultInterpolation && (t.interpolation = n) } return (t.type = e.ValueTypeName), t }, _getTrackTypeForValueTypeName: function (e) { switch (e.toLowerCase()) { case 'scalar': case 'double': case 'float': case 'number': case 'integer': return Ci.NumberKeyframeTrack case 'vector': case 'vector2': case 'vector3': case 'vector4': return Ci.VectorKeyframeTrack case 'color': return Ci.ColorKeyframeTrack case 'quaternion': return Ci.QuaternionKeyframeTrack case 'bool': case 'boolean': return Ci.BooleanKeyframeTrack case 'string': return Ci.StringKeyframeTrack } throw new Error('Unsupported typeName: ' + e) } }), (Ci.PropertyBinding = function (e, t, i) { ;(this.path = t), (this.parsedPath = i || Ci.PropertyBinding.parseTrackName(t)), (this.node = Ci.PropertyBinding.findNode(e, this.parsedPath.nodeName) || e), (this.rootNode = e) }), (Ci.PropertyBinding.prototype = { constructor: Ci.PropertyBinding, getValue: function (e, t) { this.bind(), this.getValue(e, t) }, setValue: function (e, t) { this.bind(), this.setValue(e, t) }, bind: function () { var e = this.node, t = this.parsedPath, i = t.objectName, n = t.propertyName, r = t.propertyIndex if ( (e || ((e = Ci.PropertyBinding.findNode(this.rootNode, t.nodeName) || this.rootNode), (this.node = e)), (this.getValue = this._getValue_unavailable), (this.setValue = this._setValue_unavailable), e) ) { if (i) { var o = t.objectIndex switch (i) { case 'materials': if (!e.material) return void console.error(' can not bind to material as node does not have a material', this) if (!e.material.materials) return void console.error(' can not bind to material.materials as node.material does not have a materials array', this) e = e.material.materials break case 'bones': if (!e.skeleton) return void console.error(' can not bind to bones as node does not have a skeleton', this) e = e.skeleton.bones for (var a = 0; a < e.length; a++) if (e[a].name === o) { o = a break } break default: if (void 0 === e[i]) return void console.error(' can not bind to objectName of node, undefined', this) e = e[i] } if (void 0 !== o) { if (void 0 === e[o]) return void console.error(' trying to bind to objectIndex of objectName, but is undefined:', this, e) e = e[o] } } var s = e[n] if (s) { var l = this.Versioning.None void 0 !== e.needsUpdate ? ((l = this.Versioning.NeedsUpdate), (this.targetObject = e)) : void 0 !== e.matrixWorldNeedsUpdate && ((l = this.Versioning.MatrixWorldNeedsUpdate), (this.targetObject = e)) var c = this.BindingType.Direct if (void 0 !== r) { if ('morphTargetInfluences' === n) { if (!e.geometry) return void console.error(' can not bind to morphTargetInfluences becasuse node does not have a geometry', this) if (!e.geometry.morphTargets) return void console.error(' can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets', this) for (a = 0; a < this.node.geometry.morphTargets.length; a++) if (e.geometry.morphTargets[a].name === r) { r = a break } } ;(c = this.BindingType.ArrayElement), (this.resolvedProperty = s), (this.propertyIndex = r) } else void 0 !== s.fromArray && void 0 !== s.toArray ? ((c = this.BindingType.HasFromToArray), (this.resolvedProperty = s)) : void 0 !== s.length ? ((c = this.BindingType.EntireArray), (this.resolvedProperty = s)) : (this.propertyName = n) ;(this.getValue = this.GetterByBindingType[c]), (this.setValue = this.SetterByBindingTypeAndVersioning[c][l]) } else { var h = t.nodeName console.error(' trying to update property for track: ' + h + '.' + n + " but it wasn't found.", e) } } else console.error(' trying to update node for track: ' + this.path + " but it wasn't found.") }, unbind: function () { ;(this.node = null), (this.getValue = this._getValue_unbound), (this.setValue = this._setValue_unbound) } }), Object.assign(Ci.PropertyBinding.prototype, { _getValue_unavailable: function () {}, _setValue_unavailable: function () {}, _getValue_unbound: Ci.PropertyBinding.prototype.getValue, _setValue_unbound: Ci.PropertyBinding.prototype.setValue, BindingType: { Direct: 0, EntireArray: 1, ArrayElement: 2, HasFromToArray: 3 }, Versioning: { None: 0, NeedsUpdate: 1, MatrixWorldNeedsUpdate: 2 }, GetterByBindingType: [ function (e, t) { e[t] = this.node[this.propertyName] }, function (e, t) { for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) e[t++] = i[n] }, function (e, t) { e[t] = this.resolvedProperty[this.propertyIndex] }, function (e, t) { this.resolvedProperty.toArray(e, t) } ], SetterByBindingTypeAndVersioning: [ [ function (e, t) { this.node[this.propertyName] = e[t] }, function (e, t) { ;(this.node[this.propertyName] = e[t]), (this.targetObject.needsUpdate = !0) }, function (e, t) { ;(this.node[this.propertyName] = e[t]), (this.targetObject.matrixWorldNeedsUpdate = !0) } ], [ function (e, t) { for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++] }, function (e, t) { for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++] this.targetObject.needsUpdate = !0 }, function (e, t) { for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = e[t++] this.targetObject.matrixWorldNeedsUpdate = !0 } ], [ function (e, t) { this.resolvedProperty[this.propertyIndex] = e[t] }, function (e, t) { ;(this.resolvedProperty[this.propertyIndex] = e[t]), (this.targetObject.needsUpdate = !0) }, function (e, t) { ;(this.resolvedProperty[this.propertyIndex] = e[t]), (this.targetObject.matrixWorldNeedsUpdate = !0) } ], [ function (e, t) { this.resolvedProperty.fromArray(e, t) }, function (e, t) { this.resolvedProperty.fromArray(e, t), (this.targetObject.needsUpdate = !0) }, function (e, t) { this.resolvedProperty.fromArray(e, t), (this.targetObject.matrixWorldNeedsUpdate = !0) } ] ] }), (Ci.PropertyBinding.Composite = function (e, t, i) { var n = i || Ci.PropertyBinding.parseTrackName(t) ;(this._targetGroup = e), (this._bindings = e.subscribe_(t, n)) }), (Ci.PropertyBinding.Composite.prototype = { constructor: Ci.PropertyBinding.Composite, getValue: function (e, t) { this.bind() var i = this._targetGroup.nCachedObjects_, n = this._bindings[i] void 0 !== n && n.getValue(e, t) }, setValue: function (e, t) { for (var i = this._bindings, n = this._targetGroup.nCachedObjects_, r = i.length; n !== r; ++n) i[n].setValue(e, t) }, bind: function () { for (var e = this._bindings, t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].bind() }, unbind: function () { for (var e = this._bindings, t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].unbind() } }), (Ci.PropertyBinding.create = function (e, t, i) { return e instanceof Ci.AnimationObjectGroup ? new Ci.PropertyBinding.Composite(e, t, i) : new Ci.PropertyBinding(e, t, i) }), (Ci.PropertyBinding.parseTrackName = function (e) { var t = /^(([\w]+\/)*)([\w-\d]+)?(\.([\w]+)(\[([\w\d\[\]\_.:\- ]+)\])?)?(\.([\w.]+)(\[([\w\d\[\]\_. ]+)\])?)$/, i = t.exec(e) if (!i) throw new Error('cannot parse trackName at all: ' + e) i.index === t.lastIndex && t.lastIndex++ var n = { nodeName: i[3], objectName: i[5], objectIndex: i[7], propertyName: i[9], propertyIndex: i[11] } if (null === n.propertyName || 0 === n.propertyName.length) throw new Error('can not parse propertyName from trackName: ' + e) return n }), (Ci.PropertyBinding.findNode = function (e, r) { if (!r || '' === r || 'root' === r || '.' === r || -1 === r || r === e.name || r === e.uuid) return e if (e.skeleton) { var t = (function (e) { for (var t = 0; t < e.bones.length; t++) { var i = e.bones[t] if (i.name === r) return i } return null })(e.skeleton) if (t) return t } if (e.children) { var o = function (e) { for (var t = 0; t < e.length; t++) { var i = e[t] if (i.name === r || i.uuid === r) return i var n = o(i.children) if (n) return n } return null }, i = o(e.children) if (i) return i } return null }), (Ci.PropertyMixer = function (e, t, i) { ;(this.binding = e), (this.valueSize = i) var n, r = Float64Array switch (t) { case 'quaternion': n = this._slerp break case 'string': case 'bool': ;(r = Array), (n = this._select) break default: n = this._lerp } ;(this.buffer = new r(4 * i)), (this._mixBufferRegion = n), (this.cumulativeWeight = 0), (this.useCount = 0), (this.referenceCount = 0) }), (Ci.PropertyMixer.prototype = { constructor: Ci.PropertyMixer, accumulate: function (e, t) { var i = this.buffer, n = this.valueSize, r = e * n + n, o = this.cumulativeWeight if (0 === o) { for (var a = 0; a !== n; ++a) i[r + a] = i[a] o = t } else { var s = t / (o += t) this._mixBufferRegion(i, r, 0, s, n) } this.cumulativeWeight = o }, apply: function (e) { var t = this.valueSize, i = this.buffer, n = e * t + t, r = this.cumulativeWeight, o = this.binding if (((this.cumulativeWeight = 0), r < 1)) { var a = 3 * t this._mixBufferRegion(i, n, a, 1 - r, t) } for (var s = t, l = t + t; s !== l; ++s) if (i[s] !== i[s + t]) { o.setValue(i, n) break } }, saveOriginalState: function () { var e = this.binding, t = this.buffer, i = this.valueSize, n = 3 * i e.getValue(t, n) for (var r = i, o = n; r !== o; ++r) t[r] = t[n + (r % i)] this.cumulativeWeight = 0 }, restoreOriginalState: function () { var e = 3 * this.valueSize this.binding.setValue(this.buffer, e) }, _select: function (e, t, i, n, r) { if (0.5 <= n) for (var o = 0; o !== r; ++o) e[t + o] = e[i + o] }, _slerp: function (e, t, i, n, r) { Ci.Quaternion.slerpFlat(e, t, e, t, e, i, n) }, _lerp: function (e, t, i, n, r) { for (var o = 1 - n, a = 0; a !== r; ++a) { var s = t + a e[s] = e[s] * o + e[i + a] * n } } }), (Ci.BooleanKeyframeTrack = function (e, t, i) { Ci.KeyframeTrack.call(this, e, t, i) }), (Ci.BooleanKeyframeTrack.prototype = Object.assign(Object.create(Ci.KeyframeTrack.prototype), { constructor: Ci.BooleanKeyframeTrack, ValueTypeName: 'bool', ValueBufferType: Array, DefaultInterpolation: Ci.IntepolateDiscrete, InterpolantFactoryMethodLinear: void 0, InterpolantFactoryMethodSmooth: void 0 })), (Ci.NumberKeyframeTrack = function (e, t, i, n) { Ci.KeyframeTrack.call(this, e, t, i, n) }), (Ci.NumberKeyframeTrack.prototype = Object.assign(Object.create(Ci.KeyframeTrack.prototype), { constructor: Ci.NumberKeyframeTrack, ValueTypeName: 'number' })), (Ci.QuaternionKeyframeTrack = function (e, t, i, n) { Ci.KeyframeTrack.call(this, e, t, i, n) }), (Ci.QuaternionKeyframeTrack.prototype = Object.assign(Object.create(Ci.KeyframeTrack.prototype), { constructor: Ci.QuaternionKeyframeTrack, ValueTypeName: 'quaternion', DefaultInterpolation: Ci.InterpolateLinear, InterpolantFactoryMethodLinear: function (e) { return new Ci.QuaternionLinearInterpolant(this.times, this.values, this.getValueSize(), e) }, InterpolantFactoryMethodSmooth: void 0 })), (Ci.StringKeyframeTrack = function (e, t, i, n) { Ci.KeyframeTrack.call(this, e, t, i, n) }), (Ci.StringKeyframeTrack.prototype = Object.assign(Object.create(Ci.KeyframeTrack.prototype), { constructor: Ci.StringKeyframeTrack, ValueTypeName: 'string', ValueBufferType: Array, DefaultInterpolation: Ci.IntepolateDiscrete, InterpolantFactoryMethodLinear: void 0, InterpolantFactoryMethodSmooth: void 0 })), (Ci.VectorKeyframeTrack = function (e, t, i, n) { Ci.KeyframeTrack.call(this, e, t, i, n) }), (Ci.VectorKeyframeTrack.prototype = Object.assign(Object.create(Ci.KeyframeTrack.prototype), { constructor: Ci.VectorKeyframeTrack, ValueTypeName: 'vector' })), (Ci.Audio = function (e) { Ci.Object3D.call(this), (this.type = 'Audio'), (this.context = e.context), (this.source = this.context.createBufferSource()), (this.source.onended = this.onEnded.bind(this)), (this.gain = this.context.createGain()), this.gain.connect(e.getInput()), (this.autoplay = !1), (this.startTime = 0), (this.playbackRate = 1), (this.isPlaying = !1), (this.hasPlaybackControl = !0), (this.sourceType = 'empty'), (this.filter = null) }), (Ci.Audio.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Audio.prototype.constructor = Ci.Audio), (Ci.Audio.prototype.getOutput = function () { return this.gain }), (Ci.Audio.prototype.load = function (e) { var t = new Ci.AudioBuffer(this.context) return t.load(e), this.setBuffer(t), this }), (Ci.Audio.prototype.setNodeSource = function (e) { return (this.hasPlaybackControl = !1), (this.sourceType = 'audioNode'), (this.source = e), this.connect(), this }), (Ci.Audio.prototype.setBuffer = function (e) { var t = this return ( e.onReady(function (e) { ;(t.source.buffer = e), (t.sourceType = 'buffer'), t.autoplay && t.play() }), this ) }), (Ci.Audio.prototype.play = function () { if (!0 !== this.isPlaying) if (!1 !== this.hasPlaybackControl) { var e = this.context.createBufferSource() ;(e.buffer = this.source.buffer), (e.loop = this.source.loop), (e.onended = this.source.onended), e.start(0, this.startTime), (e.playbackRate.value = this.playbackRate), (this.isPlaying = !0), (this.source = e), this.connect() } else console.warn('THREE.Audio: this Audio has no playback control.') else console.warn('THREE.Audio: Audio is already playing.') }), (Ci.Audio.prototype.pause = function () { return !1 === this.hasPlaybackControl ? void console.warn('THREE.Audio: this Audio has no playback control.') : (this.source.stop(), void (this.startTime = this.context.currentTime)) }), (Ci.Audio.prototype.stop = function () { return !1 === this.hasPlaybackControl ? void console.warn('THREE.Audio: this Audio has no playback control.') : (this.source.stop(), void (this.startTime = 0)) }), (Ci.Audio.prototype.connect = function () { null !== this.filter ? (this.source.connect(this.filter), this.filter.connect(this.getOutput())) : this.source.connect(this.getOutput()) }), (Ci.Audio.prototype.disconnect = function () { null !== this.filter ? (this.source.disconnect(this.filter), this.filter.disconnect(this.getOutput())) : this.source.disconnect(this.getOutput()) }), (Ci.Audio.prototype.getFilter = function () { return this.filter }), (Ci.Audio.prototype.setFilter = function (e) { void 0 === e && (e = null), !0 === this.isPlaying ? (this.disconnect(), (this.filter = e), this.connect()) : (this.filter = e) }), (Ci.Audio.prototype.setPlaybackRate = function (e) { return !1 === this.hasPlaybackControl ? void console.warn('THREE.Audio: this Audio has no playback control.') : ((this.playbackRate = e), void (!0 === this.isPlaying && (this.source.playbackRate.value = this.playbackRate))) }), (Ci.Audio.prototype.getPlaybackRate = function () { return this.playbackRate }), (Ci.Audio.prototype.onEnded = function () { this.isPlaying = !1 }), (Ci.Audio.prototype.setLoop = function (e) { return !1 === this.hasPlaybackControl ? void console.warn('THREE.Audio: this Audio has no playback control.') : void (this.source.loop = e) }), (Ci.Audio.prototype.getLoop = function () { return !1 === this.hasPlaybackControl ? (console.warn('THREE.Audio: this Audio has no playback control.'), !1) : this.source.loop }), (Ci.Audio.prototype.setVolume = function (e) { this.gain.gain.value = e }), (Ci.Audio.prototype.getVolume = function () { return this.gain.gain.value }), (Ci.AudioAnalyser = function (e, t) { ;(this.analyser = e.context.createAnalyser()), (this.analyser.fftSize = void 0 !== t ? t : 2048), (this.data = new Uint8Array(this.analyser.frequencyBinCount)), e.getOutput().connect(this.analyser) }), (Ci.AudioAnalyser.prototype = { constructor: Ci.AudioAnalyser, getData: function () { return this.analyser.getByteFrequencyData(this.data), this.data } }), (Ci.AudioBuffer = function (e) { ;(this.context = e), (this.ready = !1), (this.readyCallbacks = []) }), (Ci.AudioBuffer.prototype.load = function (e) { var i = this, t = new XMLHttpRequest() return ( t.open('GET', e, !0), (t.responseType = 'arraybuffer'), (t.onload = function (e) { i.context.decodeAudioData(this.response, function (e) { ;(i.buffer = e), (i.ready = !0) for (var t = 0; t < i.readyCallbacks.length; t++) i.readyCallbacks[t](i.buffer) i.readyCallbacks = [] }) }), t.send(), this ) }), (Ci.AudioBuffer.prototype.onReady = function (e) { this.ready ? e(this.buffer) : this.readyCallbacks.push(e) }), (Ci.PositionalAudio = function (e) { Ci.Audio.call(this, e), (this.panner = this.context.createPanner()), this.panner.connect(this.gain) }), (Ci.PositionalAudio.prototype = Object.create(Ci.Audio.prototype)), (Ci.PositionalAudio.prototype.constructor = Ci.PositionalAudio), (Ci.PositionalAudio.prototype.getOutput = function () { return this.panner }), (Ci.PositionalAudio.prototype.setRefDistance = function (e) { this.panner.refDistance = e }), (Ci.PositionalAudio.prototype.getRefDistance = function () { return this.panner.refDistance }), (Ci.PositionalAudio.prototype.setRolloffFactor = function (e) { this.panner.rolloffFactor = e }), (Ci.PositionalAudio.prototype.getRolloffFactor = function () { return this.panner.rolloffFactor }), (Ci.PositionalAudio.prototype.setDistanceModel = function (e) { this.panner.distanceModel = e }), (Ci.PositionalAudio.prototype.getDistanceModel = function () { return this.panner.distanceModel }), (Ci.PositionalAudio.prototype.setMaxDistance = function (e) { this.panner.maxDistance = e }), (Ci.PositionalAudio.prototype.getMaxDistance = function () { return this.panner.maxDistance }), (Ci.PositionalAudio.prototype.updateMatrixWorld = ((it = new Ci.Vector3()), function (e) { Ci.Object3D.prototype.updateMatrixWorld.call(this, e), it.setFromMatrixPosition(this.matrixWorld), this.panner.setPosition(it.x, it.y, it.z) })), (Ci.AudioListener = function () { Ci.Object3D.call(this), (this.type = 'AudioListener'), (this.context = new (window.AudioContext || window.webkitAudioContext)()), (this.gain = this.context.createGain()), this.gain.connect(this.context.destination), (this.filter = null) }), (Ci.AudioListener.prototype = Object.create(Ci.Object3D.prototype)), (Ci.AudioListener.prototype.constructor = Ci.AudioListener), (Ci.AudioListener.prototype.getInput = function () { return this.gain }), (Ci.AudioListener.prototype.removeFilter = function () { null !== this.filter && (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination), this.gain.connect(this.context.destination), (this.filter = null)) }), (Ci.AudioListener.prototype.setFilter = function (e) { null !== this.filter ? (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination)) : this.gain.disconnect(this.context.destination), (this.filter = e), this.gain.connect(this.filter), this.filter.connect(this.context.destination) }), (Ci.AudioListener.prototype.getFilter = function () { return this.filter }), (Ci.AudioListener.prototype.setMasterVolume = function (e) { this.gain.gain.value = e }), (Ci.AudioListener.prototype.getMasterVolume = function () { return this.gain.gain.value }), (Ci.AudioListener.prototype.updateMatrixWorld = ((Je = new Ci.Vector3()), ($e = new Ci.Quaternion()), (et = new Ci.Vector3()), (tt = new Ci.Vector3()), function (e) { Ci.Object3D.prototype.updateMatrixWorld.call(this, e) var t = this.context.listener, i = this.up this.matrixWorld.decompose(Je, $e, et), tt.set(0, 0, -1).applyQuaternion($e), t.setPosition(Je.x, Je.y, Je.z), t.setOrientation(tt.x, tt.y, tt.z, i.x, i.y, i.z) })), (Ci.Camera = function () { Ci.Object3D.call(this), (this.type = 'Camera'), (this.matrixWorldInverse = new Ci.Matrix4()), (this.projectionMatrix = new Ci.Matrix4()) }), (Ci.Camera.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Camera.prototype.constructor = Ci.Camera), (Ci.Camera.prototype.getWorldDirection = ((Qe = new Ci.Quaternion()), function (e) { var t = e || new Ci.Vector3() return this.getWorldQuaternion(Qe), t.set(0, 0, -1).applyQuaternion(Qe) })), (Ci.Camera.prototype.lookAt = ((Ke = new Ci.Matrix4()), function (e) { Ke.lookAt(this.position, e, this.up), this.quaternion.setFromRotationMatrix(Ke) })), (Ci.Camera.prototype.clone = function () { return new this.constructor().copy(this) }), (Ci.Camera.prototype.copy = function (e) { return Ci.Object3D.prototype.copy.call(this, e), this.matrixWorldInverse.copy(e.matrixWorldInverse), this.projectionMatrix.copy(e.projectionMatrix), this }), (Ci.CubeCamera = function (e, t, i) { Ci.Object3D.call(this), (this.type = 'CubeCamera') var r = new Ci.PerspectiveCamera(90, 1, e, t) r.up.set(0, -1, 0), r.lookAt(new Ci.Vector3(1, 0, 0)), this.add(r) var o = new Ci.PerspectiveCamera(90, 1, e, t) o.up.set(0, -1, 0), o.lookAt(new Ci.Vector3(-1, 0, 0)), this.add(o) var a = new Ci.PerspectiveCamera(90, 1, e, t) a.up.set(0, 0, 1), a.lookAt(new Ci.Vector3(0, 1, 0)), this.add(a) var s = new Ci.PerspectiveCamera(90, 1, e, t) s.up.set(0, 0, -1), s.lookAt(new Ci.Vector3(0, -1, 0)), this.add(s) var l = new Ci.PerspectiveCamera(90, 1, e, t) l.up.set(0, -1, 0), l.lookAt(new Ci.Vector3(0, 0, 1)), this.add(l) var c = new Ci.PerspectiveCamera(90, 1, e, t) c.up.set(0, -1, 0), c.lookAt(new Ci.Vector3(0, 0, -1)), this.add(c) var n = { format: Ci.RGBFormat, magFilter: Ci.LinearFilter, minFilter: Ci.LinearFilter } ;(this.renderTarget = new Ci.WebGLRenderTargetCube(i, i, n)), (this.updateCubeMap = function (e, t) { null === this.parent && this.updateMatrixWorld() var i = this.renderTarget, n = i.texture.generateMipmaps ;(i.texture.generateMipmaps = !1), (i.activeCubeFace = 0), e.render(t, r, i), (i.activeCubeFace = 1), e.render(t, o, i), (i.activeCubeFace = 2), e.render(t, a, i), (i.activeCubeFace = 3), e.render(t, s, i), (i.activeCubeFace = 4), e.render(t, l, i), (i.texture.generateMipmaps = n), (i.activeCubeFace = 5), e.render(t, c, i), e.setRenderTarget(null) }) }), (Ci.CubeCamera.prototype = Object.create(Ci.Object3D.prototype)), (Ci.CubeCamera.prototype.constructor = Ci.CubeCamera), (Ci.OrthographicCamera = function (e, t, i, n, r, o) { Ci.Camera.call(this), (this.type = 'OrthographicCamera'), (this.zoom = 1), (this.left = e), (this.right = t), (this.top = i), (this.bottom = n), (this.near = void 0 !== r ? r : 0.1), (this.far = void 0 !== o ? o : 2e3), this.updateProjectionMatrix() }), (Ci.OrthographicCamera.prototype = Object.create(Ci.Camera.prototype)), (Ci.OrthographicCamera.prototype.constructor = Ci.OrthographicCamera), (Ci.OrthographicCamera.prototype.updateProjectionMatrix = function () { var e = (this.right - this.left) / (2 * this.zoom), t = (this.top - this.bottom) / (2 * this.zoom), i = (this.right + this.left) / 2, n = (this.top + this.bottom) / 2 this.projectionMatrix.makeOrthographic(i - e, i + e, n + t, n - t, this.near, this.far) }), (Ci.OrthographicCamera.prototype.copy = function (e) { return ( Ci.Camera.prototype.copy.call(this, e), (this.left = e.left), (this.right = e.right), (this.top = e.top), (this.bottom = e.bottom), (this.near = e.near), (this.far = e.far), (this.zoom = e.zoom), this ) }), (Ci.OrthographicCamera.prototype.toJSON = function (e) { var t = Ci.Object3D.prototype.toJSON.call(this, e) return ( (t.object.zoom = this.zoom), (t.object.left = this.left), (t.object.right = this.right), (t.object.top = this.top), (t.object.bottom = this.bottom), (t.object.near = this.near), (t.object.far = this.far), t ) }), (Ci.PerspectiveCamera = function (e, t, i, n) { Ci.Camera.call(this), (this.type = 'PerspectiveCamera'), (this.focalLength = 10), (this.zoom = 1), (this.fov = void 0 !== e ? e : 50), (this.aspect = void 0 !== t ? t : 1), (this.near = void 0 !== i ? i : 0.1), (this.far = void 0 !== n ? n : 2e3), this.updateProjectionMatrix() }), (Ci.PerspectiveCamera.prototype = Object.create(Ci.Camera.prototype)), (Ci.PerspectiveCamera.prototype.constructor = Ci.PerspectiveCamera), (Ci.PerspectiveCamera.prototype.setLens = function (e, t) { void 0 === t && (t = 24), (this.fov = 2 * Ci.Math.radToDeg(Math.atan(t / (2 * e)))), this.updateProjectionMatrix() }), (Ci.PerspectiveCamera.prototype.setViewOffset = function (e, t, i, n, r, o) { ;(this.fullWidth = e), (this.fullHeight = t), (this.x = i), (this.y = n), (this.width = r), (this.height = o), this.updateProjectionMatrix() }), (Ci.PerspectiveCamera.prototype.updateProjectionMatrix = function () { var e = Ci.Math.radToDeg(2 * Math.atan(Math.tan(0.5 * Ci.Math.degToRad(this.fov)) / this.zoom)) if (this.fullWidth) { var t = this.fullWidth / this.fullHeight, i = Math.tan(Ci.Math.degToRad(0.5 * e)) * this.near, n = -i, r = t * n, o = t * i, a = Math.abs(o - r), s = Math.abs(i - n) this.projectionMatrix.makeFrustum( r + (this.x * a) / this.fullWidth, r + ((this.x + this.width) * a) / this.fullWidth, i - ((this.y + this.height) * s) / this.fullHeight, i - (this.y * s) / this.fullHeight, this.near, this.far ) } else this.projectionMatrix.makePerspective(e, this.aspect, this.near, this.far) }), (Ci.PerspectiveCamera.prototype.copy = function (e) { return ( Ci.Camera.prototype.copy.call(this, e), (this.focalLength = e.focalLength), (this.zoom = e.zoom), (this.fov = e.fov), (this.aspect = e.aspect), (this.near = e.near), (this.far = e.far), this ) }), (Ci.PerspectiveCamera.prototype.toJSON = function (e) { var t = Ci.Object3D.prototype.toJSON.call(this, e) return ( (t.object.focalLength = this.focalLength), (t.object.zoom = this.zoom), (t.object.fov = this.fov), (t.object.aspect = this.aspect), (t.object.near = this.near), (t.object.far = this.far), t ) }), (Ci.StereoCamera = function () { ;(this.type = 'StereoCamera'), (this.aspect = 1), (this.cameraL = new Ci.PerspectiveCamera()), this.cameraL.layers.enable(1), (this.cameraL.matrixAutoUpdate = !1), (this.cameraR = new Ci.PerspectiveCamera()), this.cameraR.layers.enable(2), (this.cameraR.matrixAutoUpdate = !1) }), (Ci.StereoCamera.prototype = { constructor: Ci.StereoCamera, update: ((Xe = new Ci.Matrix4()), (Ze = new Ci.Matrix4()), function (e) { if (Ge !== e.focalLength || We !== e.fov || je !== e.aspect * this.aspect || Ye !== e.near || qe !== e.far) { ;(Ge = e.focalLength), (We = e.fov), (je = e.aspect * this.aspect), (Ye = e.near), (qe = e.far) var t, i, n = e.projectionMatrix.clone(), r = (0.032 * Ye) / Ge, o = Ye * Math.tan(Ci.Math.degToRad(0.5 * We)) ;(Ze.elements[12] = -0.032), (Xe.elements[12] = 0.032), (t = -o * je + r), (i = o * je + r), (n.elements[0] = (2 * Ye) / (i - t)), (n.elements[8] = (i + t) / (i - t)), this.cameraL.projectionMatrix.copy(n), (t = -o * je - r), (i = o * je - r), (n.elements[0] = (2 * Ye) / (i - t)), (n.elements[8] = (i + t) / (i - t)), this.cameraR.projectionMatrix.copy(n) } this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Ze), this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Xe) }) }), (Ci.Light = function (e, t) { Ci.Object3D.call(this), (this.type = 'Light'), (this.color = new Ci.Color(e)), (this.intensity = void 0 !== t ? t : 1), (this.receiveShadow = void 0) }), (Ci.Light.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Light.prototype.constructor = Ci.Light), (Ci.Light.prototype.copy = function (e) { return Ci.Object3D.prototype.copy.call(this, e), this.color.copy(e.color), (this.intensity = e.intensity), this }), (Ci.Light.prototype.toJSON = function (e) { var t = Ci.Object3D.prototype.toJSON.call(this, e) return ( (t.object.color = this.color.getHex()), (t.object.intensity = this.intensity), void 0 !== this.groundColor && (t.object.groundColor = this.groundColor.getHex()), void 0 !== this.distance && (t.object.distance = this.distance), void 0 !== this.angle && (t.object.angle = this.angle), void 0 !== this.decay && (t.object.decay = this.decay), void 0 !== this.penumbra && (t.object.penumbra = this.penumbra), t ) }), (Ci.LightShadow = function (e) { ;(this.camera = e), (this.bias = 0), (this.radius = 1), (this.mapSize = new Ci.Vector2(512, 512)), (this.map = null), (this.matrix = new Ci.Matrix4()) }), (Ci.LightShadow.prototype = { constructor: Ci.LightShadow, copy: function (e) { return (this.camera = e.camera.clone()), (this.bias = e.bias), (this.radius = e.radius), this.mapSize.copy(e.mapSize), this }, clone: function () { return new this.constructor().copy(this) } }), (Ci.AmbientLight = function (e, t) { Ci.Light.call(this, e, t), (this.type = 'AmbientLight'), (this.castShadow = void 0) }), (Ci.AmbientLight.prototype = Object.create(Ci.Light.prototype)), (Ci.AmbientLight.prototype.constructor = Ci.AmbientLight), (Ci.DirectionalLight = function (e, t) { Ci.Light.call(this, e, t), (this.type = 'DirectionalLight'), this.position.set(0, 1, 0), this.updateMatrix(), (this.target = new Ci.Object3D()), (this.shadow = new Ci.LightShadow(new Ci.OrthographicCamera(-5, 5, 5, -5, 0.5, 500))) }), (Ci.DirectionalLight.prototype = Object.create(Ci.Light.prototype)), (Ci.DirectionalLight.prototype.constructor = Ci.DirectionalLight), (Ci.DirectionalLight.prototype.copy = function (e) { return Ci.Light.prototype.copy.call(this, e), (this.target = e.target.clone()), (this.shadow = e.shadow.clone()), this }), (Ci.HemisphereLight = function (e, t, i) { Ci.Light.call(this, e, i), (this.type = 'HemisphereLight'), (this.castShadow = void 0), this.position.set(0, 1, 0), this.updateMatrix(), (this.groundColor = new Ci.Color(t)) }), (Ci.HemisphereLight.prototype = Object.create(Ci.Light.prototype)), (Ci.HemisphereLight.prototype.constructor = Ci.HemisphereLight), (Ci.HemisphereLight.prototype.copy = function (e) { return Ci.Light.prototype.copy.call(this, e), this.groundColor.copy(e.groundColor), this }), (Ci.PointLight = function (e, t, i, n) { Ci.Light.call(this, e, t), (this.type = 'PointLight'), (this.distance = void 0 !== i ? i : 0), (this.decay = void 0 !== n ? n : 1), (this.shadow = new Ci.LightShadow(new Ci.PerspectiveCamera(90, 1, 0.5, 500))) }), (Ci.PointLight.prototype = Object.create(Ci.Light.prototype)), (Ci.PointLight.prototype.constructor = Ci.PointLight), Object.defineProperty(Ci.PointLight.prototype, 'power', { get: function () { return 4 * this.intensity * Math.PI }, set: function (e) { this.intensity = e / (4 * Math.PI) } }), (Ci.PointLight.prototype.copy = function (e) { return Ci.Light.prototype.copy.call(this, e), (this.distance = e.distance), (this.decay = e.decay), (this.shadow = e.shadow.clone()), this }), (Ci.SpotLight = function (e, t, i, n, r, o) { Ci.Light.call(this, e, t), (this.type = 'SpotLight'), this.position.set(0, 1, 0), this.updateMatrix(), (this.target = new Ci.Object3D()), (this.distance = void 0 !== i ? i : 0), (this.angle = void 0 !== n ? n : Math.PI / 3), (this.penumbra = void 0 !== r ? r : 0), (this.decay = void 0 !== o ? o : 1), (this.shadow = new Ci.LightShadow(new Ci.PerspectiveCamera(50, 1, 0.5, 500))) }), (Ci.SpotLight.prototype = Object.create(Ci.Light.prototype)), (Ci.SpotLight.prototype.constructor = Ci.SpotLight), Object.defineProperty(Ci.SpotLight.prototype, 'power', { get: function () { return this.intensity * Math.PI }, set: function (e) { this.intensity = e / Math.PI } }), (Ci.SpotLight.prototype.copy = function (e) { return ( Ci.Light.prototype.copy.call(this, e), (this.distance = e.distance), (this.angle = e.angle), (this.penumbra = e.penumbra), (this.decay = e.decay), (this.target = e.target.clone()), (this.shadow = e.shadow.clone()), this ) }), (Ci.Cache = { enabled: !1, files: {}, add: function (e, t) { !1 !== this.enabled && (this.files[e] = t) }, get: function (e) { if (!1 !== this.enabled) return this.files[e] }, remove: function (e) { delete this.files[e] }, clear: function () { this.files = {} } }), (Ci.Loader = function () { ;(this.onLoadStart = function () {}), (this.onLoadProgress = function () {}), (this.onLoadComplete = function () {}) }), (Ci.Loader.prototype = { constructor: Ci.Loader, crossOrigin: void 0, extractUrlBase: function (e) { var t = e.split('/') return 1 === t.length ? './' : (t.pop(), t.join('/') + '/') }, initMaterials: function (e, t, i) { for (var n = [], r = 0; r < e.length; ++r) n[r] = this.createMaterial(e[r], t, i) return n }, createMaterial: function (e, c, h) { function t(e, t, i, n, r) { var o, a = c + e, s = Ci.Loader.Handlers.get(a) ;(o = null !== s ? s.load(a) : (He.setCrossOrigin(h), He.load(a))), void 0 !== t && (o.repeat.fromArray(t), 1 !== t[0] && (o.wrapS = Ci.RepeatWrapping), 1 !== t[1] && (o.wrapT = Ci.RepeatWrapping)), void 0 !== i && o.offset.fromArray(i), void 0 !== n && ('repeat' === n[0] && (o.wrapS = Ci.RepeatWrapping), 'mirror' === n[0] && (o.wrapS = Ci.MirroredRepeatWrapping), 'repeat' === n[1] && (o.wrapT = Ci.RepeatWrapping), 'mirror' === n[1] && (o.wrapT = Ci.MirroredRepeatWrapping)), void 0 !== r && (o.anisotropy = r) var l = Ci.Math.generateUUID() return (u[l] = o), l } void 0 === Ue && (Ue = new Ci.Color()), void 0 === He && (He = new Ci.TextureLoader()), void 0 === ze && (ze = new Ci.MaterialLoader()) var u = {}, i = { uuid: Ci.Math.generateUUID(), type: 'MeshLambertMaterial' } for (var n in e) { var r = e[n] switch (n) { case 'DbgColor': case 'DbgIndex': case 'opticalDensity': case 'illumination': break case 'DbgName': i.name = r break case 'blending': i.blending = Ci[r] break case 'colorAmbient': case 'mapAmbient': console.warn('THREE.Loader.createMaterial:', n, 'is no longer supported.') break case 'colorDiffuse': i.color = Ue.fromArray(r).getHex() break case 'colorSpecular': i.specular = Ue.fromArray(r).getHex() break case 'colorEmissive': i.emissive = Ue.fromArray(r).getHex() break case 'specularCoef': i.shininess = r break case 'shading': 'basic' === r.toLowerCase() && (i.type = 'MeshBasicMaterial'), 'phong' === r.toLowerCase() && (i.type = 'MeshPhongMaterial') break case 'mapDiffuse': i.map = t(r, e.mapDiffuseRepeat, e.mapDiffuseOffset, e.mapDiffuseWrap, e.mapDiffuseAnisotropy) break case 'mapDiffuseRepeat': case 'mapDiffuseOffset': case 'mapDiffuseWrap': case 'mapDiffuseAnisotropy': break case 'mapLight': i.lightMap = t(r, e.mapLightRepeat, e.mapLightOffset, e.mapLightWrap, e.mapLightAnisotropy) break case 'mapLightRepeat': case 'mapLightOffset': case 'mapLightWrap': case 'mapLightAnisotropy': break case 'mapAO': i.aoMap = t(r, e.mapAORepeat, e.mapAOOffset, e.mapAOWrap, e.mapAOAnisotropy) break case 'mapAORepeat': case 'mapAOOffset': case 'mapAOWrap': case 'mapAOAnisotropy': break case 'mapBump': i.bumpMap = t(r, e.mapBumpRepeat, e.mapBumpOffset, e.mapBumpWrap, e.mapBumpAnisotropy) break case 'mapBumpScale': i.bumpScale = r break case 'mapBumpRepeat': case 'mapBumpOffset': case 'mapBumpWrap': case 'mapBumpAnisotropy': break case 'mapNormal': i.normalMap = t(r, e.mapNormalRepeat, e.mapNormalOffset, e.mapNormalWrap, e.mapNormalAnisotropy) break case 'mapNormalFactor': i.normalScale = [r, r] break case 'mapNormalRepeat': case 'mapNormalOffset': case 'mapNormalWrap': case 'mapNormalAnisotropy': break case 'mapSpecular': i.specularMap = t(r, e.mapSpecularRepeat, e.mapSpecularOffset, e.mapSpecularWrap, e.mapSpecularAnisotropy) break case 'mapSpecularRepeat': case 'mapSpecularOffset': case 'mapSpecularWrap': case 'mapSpecularAnisotropy': break case 'mapAlpha': i.alphaMap = t(r, e.mapAlphaRepeat, e.mapAlphaOffset, e.mapAlphaWrap, e.mapAlphaAnisotropy) break case 'mapAlphaRepeat': case 'mapAlphaOffset': case 'mapAlphaWrap': case 'mapAlphaAnisotropy': break case 'flipSided': i.side = Ci.BackSide break case 'doubleSided': i.side = Ci.DoubleSide break case 'transparency': console.warn('THREE.Loader.createMaterial: transparency has been renamed to opacity'), (i.opacity = r) break case 'depthTest': case 'depthWrite': case 'colorWrite': case 'opacity': case 'reflectivity': case 'transparent': case 'visible': case 'wireframe': i[n] = r break case 'vertexColors': !0 === r && (i.vertexColors = Ci.VertexColors), 'face' === r && (i.vertexColors = Ci.FaceColors) break default: console.error('THREE.Loader.createMaterial: Unsupported', n, r) } } return 'MeshBasicMaterial' === i.type && delete i.emissive, 'MeshPhongMaterial' !== i.type && delete i.specular, i.opacity < 1 && (i.transparent = !0), ze.setTextures(u), ze.parse(i) } }), (Ci.Loader.Handlers = { handlers: [], add: function (e, t) { this.handlers.push(e, t) }, get: function (e) { for (var t = this.handlers, i = 0, n = t.length; i < n; i += 2) { var r = t[i], o = t[i + 1] if (r.test(e)) return o } return null } }), (Ci.XHRLoader = function (e) { this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager }), (Ci.XHRLoader.prototype = { constructor: Ci.XHRLoader, load: function (i, n, t, r) { void 0 !== this.path && (i = this.path + i) var o = this, e = Ci.Cache.get(i) if (void 0 !== e) return ( n && setTimeout(function () { n(e) }, 0), e ) var a = new XMLHttpRequest() return ( a.overrideMimeType('text/plain'), a.open('GET', i, !0), a.addEventListener( 'load', function (e) { var t = e.target.response Ci.Cache.add(i, t), 200 === this.status ? (n && n(t), o.manager.itemEnd(i)) : 0 === this.status ? (console.warn('THREE.XHRLoader: HTTP Status 0 received.'), n && n(t), o.manager.itemEnd(i)) : (r && r(e), o.manager.itemError(i)) }, !1 ), void 0 !== t && a.addEventListener( 'progress', function (e) { t(e) }, !1 ), a.addEventListener( 'error', function (e) { r && r(e), o.manager.itemError(i) }, !1 ), void 0 !== this.responseType && (a.responseType = this.responseType), void 0 !== this.withCredentials && (a.withCredentials = this.withCredentials), a.send(null), o.manager.itemStart(i), a ) }, setPath: function (e) { this.path = e }, setResponseType: function (e) { this.responseType = e }, setWithCredentials: function (e) { this.withCredentials = e } }), (Ci.FontLoader = function (e) { this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager }), (Ci.FontLoader.prototype = { constructor: Ci.FontLoader, load: function (e, t, i, n) { new Ci.XHRLoader(this.manager).load( e, function (e) { t(new Ci.Font(JSON.parse(e.substring(65, e.length - 2)))) }, i, n ) } }), (Ci.ImageLoader = function (e) { this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager }), (Ci.ImageLoader.prototype = { constructor: Ci.ImageLoader, load: function (t, i, n, r) { void 0 !== this.path && (t = this.path + t) var o = this, e = Ci.Cache.get(t) if (void 0 !== e) return ( o.manager.itemStart(t), i ? setTimeout(function () { i(e), o.manager.itemEnd(t) }, 0) : o.manager.itemEnd(t), e ) var a = document.createElement('img') return ( a.addEventListener( 'load', function (e) { Ci.Cache.add(t, this), i && i(this), o.manager.itemEnd(t) }, !1 ), void 0 !== n && a.addEventListener( 'progress', function (e) { n(e) }, !1 ), a.addEventListener( 'error', function (e) { r && r(e), o.manager.itemError(t) }, !1 ), void 0 !== this.crossOrigin && (a.crossOrigin = this.crossOrigin), o.manager.itemStart(t), (a.src = t), a ) }, setCrossOrigin: function (e) { this.crossOrigin = e }, setPath: function (e) { this.path = e } }), (Ci.JSONLoader = function (e) { 'boolean' == typeof e && (console.warn('THREE.JSONLoader: showStatus parameter has been removed from constructor.'), (e = void 0)), (this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager), (this.withCredentials = !1) }), (Ci.JSONLoader.prototype = { constructor: Ci.JSONLoader, get statusDomElement() { return ( void 0 === this._statusDomElement && (this._statusDomElement = document.createElement('div')), console.warn('THREE.JSONLoader: .statusDomElement has been removed.'), this._statusDomElement ) }, load: function (o, a, e, t) { var s = this, l = this.texturePath && 'string' == typeof this.texturePath ? this.texturePath : Ci.Loader.prototype.extractUrlBase(o), i = new Ci.XHRLoader(this.manager) i.setWithCredentials(this.withCredentials), i.load( o, function (e) { var t = JSON.parse(e), i = t.metadata if (void 0 !== i) { var n = i.type if (void 0 !== n) { if ('object' === n.toLowerCase()) return void console.error('THREE.JSONLoader: ' + o + ' should be loaded with THREE.ObjectLoader instead.') if ('scene' === n.toLowerCase()) return void console.error('THREE.JSONLoader: ' + o + ' should be loaded with THREE.SceneLoader instead.') } } var r = s.parse(t, l) a(r.geometry, r.materials) }, e, t ) }, setTexturePath: function (e) { this.texturePath = e }, parse: function (D, e) { var N = new Ci.Geometry(), t = void 0 !== D.scale ? 1 / D.scale : 1 if ( ((function (e) { function t(e, t) { return e & (1 << t) } var i, n, r, o, a, s, l, c, h, u, d, p, f, g, m, v, y, A, C, I, E, _, b, w, T, x, S, M = D.faces, R = D.vertices, P = D.normals, O = D.colors, L = 0 if (void 0 !== D.uvs) { for (i = 0; i < D.uvs.length; i++) D.uvs[i].length && L++ for (i = 0; i < L; i++) N.faceVertexUvs[i] = [] } for (o = 0, a = R.length; o < a; ) ((A = new Ci.Vector3()).x = R[o++] * e), (A.y = R[o++] * e), (A.z = R[o++] * e), N.vertices.push(A) for (o = 0, a = M.length; o < a; ) if (((d = t((u = M[o++]), 0)), (p = t(u, 1)), (f = t(u, 3)), (g = t(u, 4)), (m = t(u, 5)), (v = t(u, 6)), (y = t(u, 7)), d)) { if ( (((I = new Ci.Face3()).a = M[o]), (I.b = M[o + 1]), (I.c = M[o + 3]), ((E = new Ci.Face3()).a = M[o + 1]), (E.b = M[o + 2]), (E.c = M[o + 3]), (o += 4), p && ((h = M[o++]), (I.materialIndex = h), (E.materialIndex = h)), (r = N.faces.length), f) ) for (i = 0; i < L; i++) for (w = D.uvs[i], N.faceVertexUvs[i][r] = [], N.faceVertexUvs[i][r + 1] = [], n = 0; n < 4; n++) (x = w[2 * (c = M[o++])]), (S = w[2 * c + 1]), (T = new Ci.Vector2(x, S)), 2 !== n && N.faceVertexUvs[i][r].push(T), 0 !== n && N.faceVertexUvs[i][r + 1].push(T) if ((g && ((l = 3 * M[o++]), I.normal.set(P[l++], P[l++], P[l]), E.normal.copy(I.normal)), m)) for (i = 0; i < 4; i++) (l = 3 * M[o++]), (b = new Ci.Vector3(P[l++], P[l++], P[l])), 2 !== i && I.vertexNormals.push(b), 0 !== i && E.vertexNormals.push(b) if ((v && ((_ = O[(s = M[o++])]), I.color.setHex(_), E.color.setHex(_)), y)) for (i = 0; i < 4; i++) (_ = O[(s = M[o++])]), 2 !== i && I.vertexColors.push(new Ci.Color(_)), 0 !== i && E.vertexColors.push(new Ci.Color(_)) N.faces.push(I), N.faces.push(E) } else { if ((((C = new Ci.Face3()).a = M[o++]), (C.b = M[o++]), (C.c = M[o++]), p && ((h = M[o++]), (C.materialIndex = h)), (r = N.faces.length), f)) for (i = 0; i < L; i++) for (w = D.uvs[i], N.faceVertexUvs[i][r] = [], n = 0; n < 3; n++) (x = w[2 * (c = M[o++])]), (S = w[2 * c + 1]), (T = new Ci.Vector2(x, S)), N.faceVertexUvs[i][r].push(T) if ((g && ((l = 3 * M[o++]), C.normal.set(P[l++], P[l++], P[l])), m)) for (i = 0; i < 3; i++) (l = 3 * M[o++]), (b = new Ci.Vector3(P[l++], P[l++], P[l])), C.vertexNormals.push(b) if ((v && ((s = M[o++]), C.color.setHex(O[s])), y)) for (i = 0; i < 3; i++) (s = M[o++]), C.vertexColors.push(new Ci.Color(O[s])) N.faces.push(C) } })(t), (function () { var e = void 0 !== D.influencesPerVertex ? D.influencesPerVertex : 2 if (D.skinWeights) for (var t = 0, i = D.skinWeights.length; t < i; t += e) { var n = D.skinWeights[t], r = 1 < e ? D.skinWeights[t + 1] : 0, o = 2 < e ? D.skinWeights[t + 2] : 0, a = 3 < e ? D.skinWeights[t + 3] : 0 N.skinWeights.push(new Ci.Vector4(n, r, o, a)) } if (D.skinIndices) for (t = 0, i = D.skinIndices.length; t < i; t += e) { var s = D.skinIndices[t], l = 1 < e ? D.skinIndices[t + 1] : 0, c = 2 < e ? D.skinIndices[t + 2] : 0, h = 3 < e ? D.skinIndices[t + 3] : 0 N.skinIndices.push(new Ci.Vector4(s, l, c, h)) } ;(N.bones = D.bones), N.bones && 0 < N.bones.length && (N.skinWeights.length !== N.skinIndices.length || N.skinIndices.length !== N.vertices.length) && console.warn( 'When skinning, number of vertices (' + N.vertices.length + '), skinIndices (' + N.skinIndices.length + '), and skinWeights (' + N.skinWeights.length + ') should match.' ) })(), (function (e) { if (void 0 !== D.morphTargets) for (var t = 0, i = D.morphTargets.length; t < i; t++) { ;(N.morphTargets[t] = {}), (N.morphTargets[t].name = D.morphTargets[t].name), (N.morphTargets[t].vertices = []) for (var n = N.morphTargets[t].vertices, r = D.morphTargets[t].vertices, o = 0, a = r.length; o < a; o += 3) { var s = new Ci.Vector3() ;(s.x = r[o] * e), (s.y = r[o + 1] * e), (s.z = r[o + 2] * e), n.push(s) } } if (void 0 !== D.morphColors && 0 < D.morphColors.length) { console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.') var l = N.faces, c = D.morphColors[0].colors for (t = 0, i = l.length; t < i; t++) l[t].color.fromArray(c, 3 * t) } })(t), (function () { var e = [], t = [] void 0 !== D.animation && t.push(D.animation), void 0 !== D.animations && (D.animations.length ? (t = t.concat(D.animations)) : t.push(D.animations)) for (var i = 0; i < t.length; i++) { var n = Ci.AnimationClip.parseAnimation(t[i], N.bones) n && e.push(n) } if (N.morphTargets) { var r = Ci.AnimationClip.CreateClipsFromMorphTargetSequences(N.morphTargets, 10) e = e.concat(r) } 0 < e.length && (N.animations = e) })(), N.computeFaceNormals(), N.computeBoundingSphere(), void 0 === D.materials || 0 === D.materials.length) ) return { geometry: N } var i = Ci.Loader.prototype.initMaterials(D.materials, e, this.crossOrigin) return { geometry: N, materials: i } } }), (Ci.LoadingManager = function (e, t, i) { var n = this, r = !1, o = 0, a = 0 ;(this.onStart = void 0), (this.onLoad = e), (this.onProgress = t), (this.onError = i), (this.itemStart = function (e) { a++, !1 === r && void 0 !== n.onStart && n.onStart(e, o, a), (r = !0) }), (this.itemEnd = function (e) { o++, void 0 !== n.onProgress && n.onProgress(e, o, a), o === a && ((r = !1), void 0 !== n.onLoad && n.onLoad()) }), (this.itemError = function (e) { void 0 !== n.onError && n.onError(e) }) }), (Ci.DefaultLoadingManager = new Ci.LoadingManager()), (Ci.BufferGeometryLoader = function (e) { this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager }), (Ci.BufferGeometryLoader.prototype = { constructor: Ci.BufferGeometryLoader, load: function (e, t, i, n) { var r = this new Ci.XHRLoader(r.manager).load( e, function (e) { t(r.parse(JSON.parse(e))) }, i, n ) }, parse: function (e) { var t = new Ci.BufferGeometry(), i = e.data.index, n = { Int8Array: Int8Array, Uint8Array: Uint8Array, Uint8ClampedArray: Uint8ClampedArray, Int16Array: Int16Array, Uint16Array: Uint16Array, Int32Array: Int32Array, Uint32Array: Uint32Array, Float32Array: Float32Array, Float64Array: Float64Array } if (void 0 !== i) { var r = new n[i.type](i.array) t.setIndex(new Ci.BufferAttribute(r, 1)) } var o = e.data.attributes for (var a in o) { var s = o[a] r = new n[s.type](s.array) t.addAttribute(a, new Ci.BufferAttribute(r, s.itemSize)) } var l = e.data.groups || e.data.drawcalls || e.data.offsets if (void 0 !== l) for (var c = 0, h = l.length; c !== h; ++c) { var u = l[c] t.addGroup(u.start, u.count, u.materialIndex) } var d = e.data.boundingSphere if (void 0 !== d) { var p = new Ci.Vector3() void 0 !== d.center && p.fromArray(d.center), (t.boundingSphere = new Ci.Sphere(p, d.radius)) } return t } }), (Ci.MaterialLoader = function (e) { ;(this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager), (this.textures = {}) }), (Ci.MaterialLoader.prototype = { constructor: Ci.MaterialLoader, load: function (e, t, i, n) { var r = this new Ci.XHRLoader(r.manager).load( e, function (e) { t(r.parse(JSON.parse(e))) }, i, n ) }, setTextures: function (e) { this.textures = e }, getTexture: function (e) { var t = this.textures return void 0 === t[e] && console.warn('THREE.MaterialLoader: Undefined texture', e), t[e] }, parse: function (e) { var t = new Ci[e.type]() if ( (void 0 !== e.uuid && (t.uuid = e.uuid), void 0 !== e.name && (t.name = e.name), void 0 !== e.color && t.color.setHex(e.color), void 0 !== e.roughness && (t.roughness = e.roughness), void 0 !== e.metalness && (t.metalness = e.metalness), void 0 !== e.emissive && t.emissive.setHex(e.emissive), void 0 !== e.specular && t.specular.setHex(e.specular), void 0 !== e.shininess && (t.shininess = e.shininess), void 0 !== e.uniforms && (t.uniforms = e.uniforms), void 0 !== e.vertexShader && (t.vertexShader = e.vertexShader), void 0 !== e.fragmentShader && (t.fragmentShader = e.fragmentShader), void 0 !== e.vertexColors && (t.vertexColors = e.vertexColors), void 0 !== e.shading && (t.shading = e.shading), void 0 !== e.blending && (t.blending = e.blending), void 0 !== e.side && (t.side = e.side), void 0 !== e.opacity && (t.opacity = e.opacity), void 0 !== e.transparent && (t.transparent = e.transparent), void 0 !== e.alphaTest && (t.alphaTest = e.alphaTest), void 0 !== e.depthTest && (t.depthTest = e.depthTest), void 0 !== e.depthWrite && (t.depthWrite = e.depthWrite), void 0 !== e.colorWrite && (t.colorWrite = e.colorWrite), void 0 !== e.wireframe && (t.wireframe = e.wireframe), void 0 !== e.wireframeLinewidth && (t.wireframeLinewidth = e.wireframeLinewidth), void 0 !== e.size && (t.size = e.size), void 0 !== e.sizeAttenuation && (t.sizeAttenuation = e.sizeAttenuation), void 0 !== e.map && (t.map = this.getTexture(e.map)), void 0 !== e.alphaMap && ((t.alphaMap = this.getTexture(e.alphaMap)), (t.transparent = !0)), void 0 !== e.bumpMap && (t.bumpMap = this.getTexture(e.bumpMap)), void 0 !== e.bumpScale && (t.bumpScale = e.bumpScale), void 0 !== e.normalMap && (t.normalMap = this.getTexture(e.normalMap)), void 0 !== e.normalScale) ) { var i = e.normalScale !1 === Array.isArray(i) && (i = [i, i]), (t.normalScale = new Ci.Vector2().fromArray(i)) } if ( (void 0 !== e.displacementMap && (t.displacementMap = this.getTexture(e.displacementMap)), void 0 !== e.displacementScale && (t.displacementScale = e.displacementScale), void 0 !== e.displacementBias && (t.displacementBias = e.displacementBias), void 0 !== e.roughnessMap && (t.roughnessMap = this.getTexture(e.roughnessMap)), void 0 !== e.metalnessMap && (t.metalnessMap = this.getTexture(e.metalnessMap)), void 0 !== e.emissiveMap && (t.emissiveMap = this.getTexture(e.emissiveMap)), void 0 !== e.emissiveIntensity && (t.emissiveIntensity = e.emissiveIntensity), void 0 !== e.specularMap && (t.specularMap = this.getTexture(e.specularMap)), void 0 !== e.envMap && ((t.envMap = this.getTexture(e.envMap)), (t.combine = Ci.MultiplyOperation)), e.reflectivity && (t.reflectivity = e.reflectivity), void 0 !== e.lightMap && (t.lightMap = this.getTexture(e.lightMap)), void 0 !== e.lightMapIntensity && (t.lightMapIntensity = e.lightMapIntensity), void 0 !== e.aoMap && (t.aoMap = this.getTexture(e.aoMap)), void 0 !== e.aoMapIntensity && (t.aoMapIntensity = e.aoMapIntensity), void 0 !== e.materials) ) for (var n = 0, r = e.materials.length; n < r; n++) t.materials.push(this.parse(e.materials[n])) return t } }), (Ci.ObjectLoader = function (e) { ;(this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager), (this.texturePath = '') }), (Ci.ObjectLoader.prototype = { constructor: Ci.ObjectLoader, load: function (e, t, i, n) { '' === this.texturePath && (this.texturePath = e.substring(0, e.lastIndexOf('/') + 1)) var r = this new Ci.XHRLoader(r.manager).load( e, function (e) { r.parse(JSON.parse(e), t) }, i, n ) }, setTexturePath: function (e) { this.texturePath = e }, setCrossOrigin: function (e) { this.crossOrigin = e }, parse: function (e, t) { var i = this.parseGeometries(e.geometries), n = this.parseImages(e.images, function () { void 0 !== t && t(a) }), r = this.parseTextures(e.textures, n), o = this.parseMaterials(e.materials, r), a = this.parseObject(e.object, i, o) return e.animations && (a.animations = this.parseAnimations(e.animations)), (void 0 !== e.images && 0 !== e.images.length) || (void 0 !== t && t(a)), a }, parseGeometries: function (e) { var t = {} if (void 0 !== e) for (var i = new Ci.JSONLoader(), n = new Ci.BufferGeometryLoader(), r = 0, o = e.length; r < o; r++) { var a, s = e[r] switch (s.type) { case 'PlaneGeometry': case 'PlaneBufferGeometry': a = new Ci[s.type](s.width, s.height, s.widthSegments, s.heightSegments) break case 'BoxGeometry': case 'BoxBufferGeometry': case 'CubeGeometry': a = new Ci[s.type](s.width, s.height, s.depth, s.widthSegments, s.heightSegments, s.depthSegments) break case 'CircleGeometry': case 'CircleBufferGeometry': a = new Ci[s.type](s.radius, s.segments, s.thetaStart, s.thetaLength) break case 'CylinderGeometry': case 'CylinderBufferGeometry': a = new Ci[s.type](s.radiusTop, s.radiusBottom, s.height, s.radialSegments, s.heightSegments, s.openEnded, s.thetaStart, s.thetaLength) break case 'SphereGeometry': case 'SphereBufferGeometry': a = new Ci[s.type](s.radius, s.widthSegments, s.heightSegments, s.phiStart, s.phiLength, s.thetaStart, s.thetaLength) break case 'DodecahedronGeometry': a = new Ci.DodecahedronGeometry(s.radius, s.detail) break case 'IcosahedronGeometry': a = new Ci.IcosahedronGeometry(s.radius, s.detail) break case 'OctahedronGeometry': a = new Ci.OctahedronGeometry(s.radius, s.detail) break case 'TetrahedronGeometry': a = new Ci.TetrahedronGeometry(s.radius, s.detail) break case 'RingGeometry': case 'RingBufferGeometry': a = new Ci[s.type](s.innerRadius, s.outerRadius, s.thetaSegments, s.phiSegments, s.thetaStart, s.thetaLength) break case 'TorusGeometry': case 'TorusBufferGeometry': a = new Ci[s.type](s.radius, s.tube, s.radialSegments, s.tubularSegments, s.arc) break case 'TorusKnotGeometry': case 'TorusKnotBufferGeometry': a = new Ci[s.type](s.radius, s.tube, s.tubularSegments, s.radialSegments, s.p, s.q) break case 'LatheGeometry': a = new Ci.LatheGeometry(s.points, s.segments, s.phiStart, s.phiLength) break case 'BufferGeometry': a = n.parse(s) break case 'Geometry': a = i.parse(s.data, this.texturePath).geometry break default: console.warn('THREE.ObjectLoader: Unsupported geometry type "' + s.type + '"') continue } ;(a.uuid = s.uuid), void 0 !== s.name && (a.name = s.name), (t[s.uuid] = a) } return t }, parseMaterials: function (e, t) { var i = {} if (void 0 !== e) { var n = new Ci.MaterialLoader() n.setTextures(t) for (var r = 0, o = e.length; r < o; r++) { var a = n.parse(e[r]) i[a.uuid] = a } } return i }, parseAnimations: function (e) { for (var t = [], i = 0; i < e.length; i++) { var n = Ci.AnimationClip.parse(e[i]) t.push(n) } return t }, parseImages: function (e, t) { function i(e) { return ( n.manager.itemStart(e), a.load(e, function () { n.manager.itemEnd(e) }) ) } var n = this, r = {} if (void 0 !== e && 0 < e.length) { var o = new Ci.LoadingManager(t), a = new Ci.ImageLoader(o) a.setCrossOrigin(this.crossOrigin) for (var s = 0, l = e.length; s < l; s++) { var c = e[s], h = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(c.url) ? c.url : n.texturePath + c.url r[c.uuid] = i(h) } } return r }, parseTextures: function (e, t) { function i(e) { return 'number' == typeof e ? e : (console.warn('THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', e), Ci[e]) } var n = {} if (void 0 !== e) for (var r = 0, o = e.length; r < o; r++) { var a = e[r] void 0 === a.image && console.warn('THREE.ObjectLoader: No "image" specified for', a.uuid), void 0 === t[a.image] && console.warn('THREE.ObjectLoader: Undefined image', a.image) var s = new Ci.Texture(t[a.image]) ;(s.needsUpdate = !0), (s.uuid = a.uuid), void 0 !== a.name && (s.name = a.name), void 0 !== a.mapping && (s.mapping = i(a.mapping)), void 0 !== a.offset && (s.offset = new Ci.Vector2(a.offset[0], a.offset[1])), void 0 !== a.repeat && (s.repeat = new Ci.Vector2(a.repeat[0], a.repeat[1])), void 0 !== a.minFilter && (s.minFilter = i(a.minFilter)), void 0 !== a.magFilter && (s.magFilter = i(a.magFilter)), void 0 !== a.anisotropy && (s.anisotropy = a.anisotropy), Array.isArray(a.wrap) && ((s.wrapS = i(a.wrap[0])), (s.wrapT = i(a.wrap[1]))), (n[a.uuid] = s) } return n }, parseObject: ((ke = new Ci.Matrix4()), function (e, t, i) { function n(e) { return void 0 === t[e] && console.warn('THREE.ObjectLoader: Undefined geometry', e), t[e] } function r(e) { if (void 0 !== e) return void 0 === i[e] && console.warn('THREE.ObjectLoader: Undefined material', e), i[e] } var o switch (e.type) { case 'Scene': o = new Ci.Scene() break case 'PerspectiveCamera': o = new Ci.PerspectiveCamera(e.fov, e.aspect, e.near, e.far) break case 'OrthographicCamera': o = new Ci.OrthographicCamera(e.left, e.right, e.top, e.bottom, e.near, e.far) break case 'AmbientLight': o = new Ci.AmbientLight(e.color, e.intensity) break case 'DirectionalLight': o = new Ci.DirectionalLight(e.color, e.intensity) break case 'PointLight': o = new Ci.PointLight(e.color, e.intensity, e.distance, e.decay) break case 'SpotLight': o = new Ci.SpotLight(e.color, e.intensity, e.distance, e.angle, e.penumbra, e.decay) break case 'HemisphereLight': o = new Ci.HemisphereLight(e.color, e.groundColor, e.intensity) break case 'Mesh': var a = n(e.geometry), s = r(e.material) o = a.bones && 0 < a.bones.length ? new Ci.SkinnedMesh(a, s) : new Ci.Mesh(a, s) break case 'LOD': o = new Ci.LOD() break case 'Line': o = new Ci.Line(n(e.geometry), r(e.material), e.mode) break case 'PointCloud': case 'Points': o = new Ci.Points(n(e.geometry), r(e.material)) break case 'Sprite': o = new Ci.Sprite(r(e.material)) break case 'Group': o = new Ci.Group() break default: o = new Ci.Object3D() } if ( ((o.uuid = e.uuid), void 0 !== e.name && (o.name = e.name), void 0 !== e.matrix ? (ke.fromArray(e.matrix), ke.decompose(o.position, o.quaternion, o.scale)) : (void 0 !== e.position && o.position.fromArray(e.position), void 0 !== e.rotation && o.rotation.fromArray(e.rotation), void 0 !== e.scale && o.scale.fromArray(e.scale)), void 0 !== e.castShadow && (o.castShadow = e.castShadow), void 0 !== e.receiveShadow && (o.receiveShadow = e.receiveShadow), void 0 !== e.visible && (o.visible = e.visible), void 0 !== e.userData && (o.userData = e.userData), void 0 !== e.children) ) for (var l in e.children) o.add(this.parseObject(e.children[l], t, i)) if ('LOD' === e.type) for (var c = e.levels, h = 0; h < c.length; h++) { var u = c[h] void 0 !== (l = o.getObjectByProperty('uuid', u.object)) && o.addLevel(l, u.distance) } return o }) }), (Ci.TextureLoader = function (e) { this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager }), (Ci.TextureLoader.prototype = { constructor: Ci.TextureLoader, load: function (e, t, i, n) { var r = new Ci.Texture(), o = new Ci.ImageLoader(this.manager) return ( o.setCrossOrigin(this.crossOrigin), o.setPath(this.path), o.load( e, function (e) { ;(r.image = e), (r.needsUpdate = !0), void 0 !== t && t(r) }, i, n ), r ) }, setCrossOrigin: function (e) { this.crossOrigin = e }, setPath: function (e) { this.path = e } }), (Ci.CubeTextureLoader = function (e) { this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager }), (Ci.CubeTextureLoader.prototype = { constructor: Ci.CubeTextureLoader, load: function (e, i, t, n) { function r(t) { a.load( e[t], function (e) { ;(o.images[t] = e), 6 === ++s && ((o.needsUpdate = !0), i && i(o)) }, void 0, n ) } var o = new Ci.CubeTexture(), a = new Ci.ImageLoader(this.manager) a.setCrossOrigin(this.crossOrigin), a.setPath(this.path) for (var s = 0, l = 0; l < e.length; ++l) r(l) return o }, setCrossOrigin: function (e) { this.crossOrigin = e }, setPath: function (e) { this.path = e } }), (Ci.DataTextureLoader = Ci.BinaryTextureLoader = function (e) { ;(this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager), (this._parser = null) }), (Ci.BinaryTextureLoader.prototype = { constructor: Ci.BinaryTextureLoader, load: function (e, i, t, n) { var r = this, o = new Ci.DataTexture(), a = new Ci.XHRLoader(this.manager) return ( a.setResponseType('arraybuffer'), a.load( e, function (e) { var t = r._parser(e) t && (void 0 !== t.image ? (o.image = t.image) : void 0 !== t.data && ((o.image.width = t.width), (o.image.height = t.height), (o.image.data = t.data)), (o.wrapS = void 0 !== t.wrapS ? t.wrapS : Ci.ClampToEdgeWrapping), (o.wrapT = void 0 !== t.wrapT ? t.wrapT : Ci.ClampToEdgeWrapping), (o.magFilter = void 0 !== t.magFilter ? t.magFilter : Ci.LinearFilter), (o.minFilter = void 0 !== t.minFilter ? t.minFilter : Ci.LinearMipMapLinearFilter), (o.anisotropy = void 0 !== t.anisotropy ? t.anisotropy : 1), void 0 !== t.format && (o.format = t.format), void 0 !== t.type && (o.type = t.type), void 0 !== t.mipmaps && (o.mipmaps = t.mipmaps), 1 === t.mipmapCount && (o.minFilter = Ci.LinearFilter), (o.needsUpdate = !0), i && i(o, t)) }, t, n ), o ) } }), (Ci.CompressedTextureLoader = function (e) { ;(this.manager = void 0 !== e ? e : Ci.DefaultLoadingManager), (this._parser = null) }), (Ci.CompressedTextureLoader.prototype = { constructor: Ci.CompressedTextureLoader, load: function (e, o, t, n) { function i(i) { r.load( e[i], function (e) { var t = a._parser(e, !0) ;(s[i] = { width: t.width, height: t.height, format: t.format, mipmaps: t.mipmaps }), 6 === (c += 1) && (1 === t.mipmapCount && (l.minFilter = Ci.LinearFilter), (l.format = t.format), (l.needsUpdate = !0), o && o(l)) }, t, n ) } var a = this, s = [], l = new Ci.CompressedTexture() l.image = s var r = new Ci.XHRLoader(this.manager) if ((r.setPath(this.path), r.setResponseType('arraybuffer'), Array.isArray(e))) for (var c = 0, h = 0, u = e.length; h < u; ++h) i(h) else r.load( e, function (e) { var t = a._parser(e, !0) if (t.isCubemap) for (var i = t.mipmaps.length / t.mipmapCount, n = 0; n < i; n++) { s[n] = { mipmaps: [] } for (var r = 0; r < t.mipmapCount; r++) s[n].mipmaps.push(t.mipmaps[n * t.mipmapCount + r]), (s[n].format = t.format), (s[n].width = t.width), (s[n].height = t.height) } else (l.image.width = t.width), (l.image.height = t.height), (l.mipmaps = t.mipmaps) 1 === t.mipmapCount && (l.minFilter = Ci.LinearFilter), (l.format = t.format), (l.needsUpdate = !0), o && o(l) }, t, n ) return l }, setPath: function (e) { this.path = e } }), (Ci.Material = function () { Object.defineProperty(this, 'id', { value: Ci.MaterialIdCount++ }), (this.uuid = Ci.Math.generateUUID()), (this.name = ''), (this.type = 'Material'), (this.side = Ci.FrontSide), (this.opacity = 1), (this.transparent = !1), (this.blending = Ci.NormalBlending), (this.blendSrc = Ci.SrcAlphaFactor), (this.blendDst = Ci.OneMinusSrcAlphaFactor), (this.blendEquation = Ci.AddEquation), (this.blendSrcAlpha = null), (this.blendDstAlpha = null), (this.blendEquationAlpha = null), (this.depthFunc = Ci.LessEqualDepth), (this.depthTest = !0), (this.depthWrite = !0), (this.colorWrite = !0), (this.precision = null), (this.polygonOffset = !1), (this.polygonOffsetFactor = 0), (this.polygonOffsetUnits = 0), (this.alphaTest = 0), (this.premultipliedAlpha = !1), (this.overdraw = 0), (this.visible = !0), (this._needsUpdate = !0) }), (Ci.Material.prototype = { constructor: Ci.Material, get needsUpdate() { return this._needsUpdate }, set needsUpdate(e) { !0 === e && this.update(), (this._needsUpdate = e) }, setValues: function (e) { if (void 0 !== e) for (var t in e) { var i = e[t] if (void 0 !== i) { var n = this[t] void 0 !== n ? n instanceof Ci.Color ? n.set(i) : n instanceof Ci.Vector3 && i instanceof Ci.Vector3 ? n.copy(i) : (this[t] = 'overdraw' === t ? Number(i) : i) : console.warn('THREE.' + this.type + ": '" + t + "' is not a property of this material.") } else console.warn("THREE.Material: '" + t + "' parameter is undefined.") } }, toJSON: function (e) { function t(e) { var t = [] for (var i in e) { var n = e[i] delete n.metadata, t.push(n) } return t } var i = void 0 === e i && (e = { textures: {}, images: {} }) var n = { metadata: { version: 4.4, type: 'Material', generator: 'Material.toJSON' } } if ( ((n.uuid = this.uuid), (n.type = this.type), '' !== this.name && (n.name = this.name), this.color instanceof Ci.Color && (n.color = this.color.getHex()), 0.5 !== this.roughness && (n.roughness = this.roughness), 0.5 !== this.metalness && (n.metalness = this.metalness), this.emissive instanceof Ci.Color && (n.emissive = this.emissive.getHex()), this.specular instanceof Ci.Color && (n.specular = this.specular.getHex()), void 0 !== this.shininess && (n.shininess = this.shininess), this.map instanceof Ci.Texture && (n.map = this.map.toJSON(e).uuid), this.alphaMap instanceof Ci.Texture && (n.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap instanceof Ci.Texture && (n.lightMap = this.lightMap.toJSON(e).uuid), this.bumpMap instanceof Ci.Texture && ((n.bumpMap = this.bumpMap.toJSON(e).uuid), (n.bumpScale = this.bumpScale)), this.normalMap instanceof Ci.Texture && ((n.normalMap = this.normalMap.toJSON(e).uuid), (n.normalScale = this.normalScale.toArray())), this.displacementMap instanceof Ci.Texture && ((n.displacementMap = this.displacementMap.toJSON(e).uuid), (n.displacementScale = this.displacementScale), (n.displacementBias = this.displacementBias)), this.roughnessMap instanceof Ci.Texture && (n.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap instanceof Ci.Texture && (n.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap instanceof Ci.Texture && (n.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap instanceof Ci.Texture && (n.specularMap = this.specularMap.toJSON(e).uuid), this.envMap instanceof Ci.Texture && ((n.envMap = this.envMap.toJSON(e).uuid), (n.reflectivity = this.reflectivity)), void 0 !== this.size && (n.size = this.size), void 0 !== this.sizeAttenuation && (n.sizeAttenuation = this.sizeAttenuation), void 0 !== this.vertexColors && this.vertexColors !== Ci.NoColors && (n.vertexColors = this.vertexColors), void 0 !== this.shading && this.shading !== Ci.SmoothShading && (n.shading = this.shading), void 0 !== this.blending && this.blending !== Ci.NormalBlending && (n.blending = this.blending), void 0 !== this.side && this.side !== Ci.FrontSide && (n.side = this.side), this.opacity < 1 && (n.opacity = this.opacity), !0 === this.transparent && (n.transparent = this.transparent), 0 < this.alphaTest && (n.alphaTest = this.alphaTest), !0 === this.premultipliedAlpha && (n.premultipliedAlpha = this.premultipliedAlpha), !0 === this.wireframe && (n.wireframe = this.wireframe), 1 < this.wireframeLinewidth && (n.wireframeLinewidth = this.wireframeLinewidth), i) ) { var r = t(e.textures), o = t(e.images) 0 < r.length && (n.textures = r), 0 < o.length && (n.images = o) } return n }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return ( (this.name = e.name), (this.side = e.side), (this.opacity = e.opacity), (this.transparent = e.transparent), (this.blending = e.blending), (this.blendSrc = e.blendSrc), (this.blendDst = e.blendDst), (this.blendEquation = e.blendEquation), (this.blendSrcAlpha = e.blendSrcAlpha), (this.blendDstAlpha = e.blendDstAlpha), (this.blendEquationAlpha = e.blendEquationAlpha), (this.depthFunc = e.depthFunc), (this.depthTest = e.depthTest), (this.depthWrite = e.depthWrite), (this.colorWrite = e.colorWrite), (this.precision = e.precision), (this.polygonOffset = e.polygonOffset), (this.polygonOffsetFactor = e.polygonOffsetFactor), (this.polygonOffsetUnits = e.polygonOffsetUnits), (this.alphaTest = e.alphaTest), (this.premultipliedAlpha = e.premultipliedAlpha), (this.overdraw = e.overdraw), (this.visible = e.visible), this ) }, update: function () { this.dispatchEvent({ type: 'update' }) }, dispose: function () { this.dispatchEvent({ type: 'dispose' }) } }), Ci.EventDispatcher.prototype.apply(Ci.Material.prototype), (Ci.MaterialIdCount = 0), (Ci.LineBasicMaterial = function (e) { Ci.Material.call(this), (this.type = 'LineBasicMaterial'), (this.color = new Ci.Color(16777215)), (this.linewidth = 1), (this.linecap = 'round'), (this.linejoin = 'round'), (this.blending = Ci.NormalBlending), (this.vertexColors = Ci.NoColors), (this.fog = !0), this.setValues(e) }), (Ci.LineBasicMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.LineBasicMaterial.prototype.constructor = Ci.LineBasicMaterial), (Ci.LineBasicMaterial.prototype.copy = function (e) { return ( Ci.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.linewidth = e.linewidth), (this.linecap = e.linecap), (this.linejoin = e.linejoin), (this.vertexColors = e.vertexColors), (this.fog = e.fog), this ) }), (Ci.LineDashedMaterial = function (e) { Ci.Material.call(this), (this.type = 'LineDashedMaterial'), (this.color = new Ci.Color(16777215)), (this.linewidth = 1), (this.scale = 1), (this.dashSize = 3), (this.gapSize = 1), (this.blending = Ci.NormalBlending), (this.vertexColors = Ci.NoColors), (this.fog = !0), this.setValues(e) }), (Ci.LineDashedMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.LineDashedMaterial.prototype.constructor = Ci.LineDashedMaterial), (Ci.LineDashedMaterial.prototype.copy = function (e) { return ( Ci.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.linewidth = e.linewidth), (this.scale = e.scale), (this.dashSize = e.dashSize), (this.gapSize = e.gapSize), (this.vertexColors = e.vertexColors), (this.fog = e.fog), this ) }), (Ci.MeshBasicMaterial = function (e) { Ci.Material.call(this), (this.type = 'MeshBasicMaterial'), (this.color = new Ci.Color(16777215)), (this.map = null), (this.aoMap = null), (this.aoMapIntensity = 1), (this.specularMap = null), (this.alphaMap = null), (this.envMap = null), (this.combine = Ci.MultiplyOperation), (this.reflectivity = 1), (this.refractionRatio = 0.98), (this.fog = !0), (this.shading = Ci.SmoothShading), (this.blending = Ci.NormalBlending), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.wireframeLinecap = 'round'), (this.wireframeLinejoin = 'round'), (this.vertexColors = Ci.NoColors), (this.skinning = !1), (this.morphTargets = !1), this.setValues(e) }), (Ci.MeshBasicMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.MeshBasicMaterial.prototype.constructor = Ci.MeshBasicMaterial), (Ci.MeshBasicMaterial.prototype.copy = function (e) { return ( Ci.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (this.aoMap = e.aoMap), (this.aoMapIntensity = e.aoMapIntensity), (this.specularMap = e.specularMap), (this.alphaMap = e.alphaMap), (this.envMap = e.envMap), (this.combine = e.combine), (this.reflectivity = e.reflectivity), (this.refractionRatio = e.refractionRatio), (this.fog = e.fog), (this.shading = e.shading), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), (this.wireframeLinecap = e.wireframeLinecap), (this.wireframeLinejoin = e.wireframeLinejoin), (this.vertexColors = e.vertexColors), (this.skinning = e.skinning), (this.morphTargets = e.morphTargets), this ) }), (Ci.MeshLambertMaterial = function (e) { Ci.Material.call(this), (this.type = 'MeshLambertMaterial'), (this.color = new Ci.Color(16777215)), (this.map = null), (this.lightMap = null), (this.lightMapIntensity = 1), (this.aoMap = null), (this.aoMapIntensity = 1), (this.emissive = new Ci.Color(0)), (this.emissiveIntensity = 1), (this.emissiveMap = null), (this.specularMap = null), (this.alphaMap = null), (this.envMap = null), (this.combine = Ci.MultiplyOperation), (this.reflectivity = 1), (this.refractionRatio = 0.98), (this.fog = !0), (this.blending = Ci.NormalBlending), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.wireframeLinecap = 'round'), (this.wireframeLinejoin = 'round'), (this.vertexColors = Ci.NoColors), (this.skinning = !1), (this.morphTargets = !1), (this.morphNormals = !1), this.setValues(e) }), (Ci.MeshLambertMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.MeshLambertMaterial.prototype.constructor = Ci.MeshLambertMaterial), (Ci.MeshLambertMaterial.prototype.copy = function (e) { return ( Ci.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (this.lightMap = e.lightMap), (this.lightMapIntensity = e.lightMapIntensity), (this.aoMap = e.aoMap), (this.aoMapIntensity = e.aoMapIntensity), this.emissive.copy(e.emissive), (this.emissiveMap = e.emissiveMap), (this.emissiveIntensity = e.emissiveIntensity), (this.specularMap = e.specularMap), (this.alphaMap = e.alphaMap), (this.envMap = e.envMap), (this.combine = e.combine), (this.reflectivity = e.reflectivity), (this.refractionRatio = e.refractionRatio), (this.fog = e.fog), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), (this.wireframeLinecap = e.wireframeLinecap), (this.wireframeLinejoin = e.wireframeLinejoin), (this.vertexColors = e.vertexColors), (this.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.morphNormals = e.morphNormals), this ) }), (Ci.MeshPhongMaterial = function (e) { Ci.Material.call(this), (this.type = 'MeshPhongMaterial'), (this.color = new Ci.Color(16777215)), (this.specular = new Ci.Color(1118481)), (this.shininess = 30), (this.map = null), (this.lightMap = null), (this.lightMapIntensity = 1), (this.aoMap = null), (this.aoMapIntensity = 1), (this.emissive = new Ci.Color(0)), (this.emissiveIntensity = 1), (this.emissiveMap = null), (this.bumpMap = null), (this.bumpScale = 1), (this.normalMap = null), (this.normalScale = new Ci.Vector2(1, 1)), (this.displacementMap = null), (this.displacementScale = 1), (this.displacementBias = 0), (this.specularMap = null), (this.alphaMap = null), (this.envMap = null), (this.combine = Ci.MultiplyOperation), (this.reflectivity = 1), (this.refractionRatio = 0.98), (this.fog = !0), (this.shading = Ci.SmoothShading), (this.blending = Ci.NormalBlending), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.wireframeLinecap = 'round'), (this.wireframeLinejoin = 'round'), (this.vertexColors = Ci.NoColors), (this.skinning = !1), (this.morphTargets = !1), (this.morphNormals = !1), this.setValues(e) }), (Ci.MeshPhongMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.MeshPhongMaterial.prototype.constructor = Ci.MeshPhongMaterial), (Ci.MeshPhongMaterial.prototype.copy = function (e) { return ( Ci.Material.prototype.copy.call(this, e), this.color.copy(e.color), this.specular.copy(e.specular), (this.shininess = e.shininess), (this.map = e.map), (this.lightMap = e.lightMap), (this.lightMapIntensity = e.lightMapIntensity), (this.aoMap = e.aoMap), (this.aoMapIntensity = e.aoMapIntensity), this.emissive.copy(e.emissive), (this.emissiveMap = e.emissiveMap), (this.emissiveIntensity = e.emissiveIntensity), (this.bumpMap = e.bumpMap), (this.bumpScale = e.bumpScale), (this.normalMap = e.normalMap), this.normalScale.copy(e.normalScale), (this.displacementMap = e.displacementMap), (this.displacementScale = e.displacementScale), (this.displacementBias = e.displacementBias), (this.specularMap = e.specularMap), (this.alphaMap = e.alphaMap), (this.envMap = e.envMap), (this.combine = e.combine), (this.reflectivity = e.reflectivity), (this.refractionRatio = e.refractionRatio), (this.fog = e.fog), (this.shading = e.shading), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), (this.wireframeLinecap = e.wireframeLinecap), (this.wireframeLinejoin = e.wireframeLinejoin), (this.vertexColors = e.vertexColors), (this.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.morphNormals = e.morphNormals), this ) }), (Ci.MeshStandardMaterial = function (e) { Ci.Material.call(this), (this.type = 'MeshStandardMaterial'), (this.color = new Ci.Color(16777215)), (this.roughness = 0.5), (this.metalness = 0.5), (this.map = null), (this.lightMap = null), (this.lightMapIntensity = 1), (this.aoMap = null), (this.aoMapIntensity = 1), (this.emissive = new Ci.Color(0)), (this.emissiveIntensity = 1), (this.emissiveMap = null), (this.bumpMap = null), (this.bumpScale = 1), (this.normalMap = null), (this.normalScale = new Ci.Vector2(1, 1)), (this.displacementMap = null), (this.displacementScale = 1), (this.displacementBias = 0), (this.roughnessMap = null), (this.metalnessMap = null), (this.alphaMap = null), (this.envMap = null), (this.envMapIntensity = 1), (this.refractionRatio = 0.98), (this.fog = !0), (this.shading = Ci.SmoothShading), (this.blending = Ci.NormalBlending), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.wireframeLinecap = 'round'), (this.wireframeLinejoin = 'round'), (this.vertexColors = Ci.NoColors), (this.skinning = !1), (this.morphTargets = !1), (this.morphNormals = !1), this.setValues(e) }), (Ci.MeshStandardMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.MeshStandardMaterial.prototype.constructor = Ci.MeshStandardMaterial), (Ci.MeshStandardMaterial.prototype.copy = function (e) { return ( Ci.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.roughness = e.roughness), (this.metalness = e.metalness), (this.map = e.map), (this.lightMap = e.lightMap), (this.lightMapIntensity = e.lightMapIntensity), (this.aoMap = e.aoMap), (this.aoMapIntensity = e.aoMapIntensity), this.emissive.copy(e.emissive), (this.emissiveMap = e.emissiveMap), (this.emissiveIntensity = e.emissiveIntensity), (this.bumpMap = e.bumpMap), (this.bumpScale = e.bumpScale), (this.normalMap = e.normalMap), this.normalScale.copy(e.normalScale), (this.displacementMap = e.displacementMap), (this.displacementScale = e.displacementScale), (this.displacementBias = e.displacementBias), (this.roughnessMap = e.roughnessMap), (this.metalnessMap = e.metalnessMap), (this.alphaMap = e.alphaMap), (this.envMap = e.envMap), (this.envMapIntensity = e.envMapIntensity), (this.refractionRatio = e.refractionRatio), (this.fog = e.fog), (this.shading = e.shading), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), (this.wireframeLinecap = e.wireframeLinecap), (this.wireframeLinejoin = e.wireframeLinejoin), (this.vertexColors = e.vertexColors), (this.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.morphNormals = e.morphNormals), this ) }), (Ci.MeshDepthMaterial = function (e) { Ci.Material.call(this), (this.type = 'MeshDepthMaterial'), (this.morphTargets = !1), (this.wireframe = !1), (this.wireframeLinewidth = 1), this.setValues(e) }), (Ci.MeshDepthMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.MeshDepthMaterial.prototype.constructor = Ci.MeshDepthMaterial), (Ci.MeshDepthMaterial.prototype.copy = function (e) { return Ci.Material.prototype.copy.call(this, e), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), this }), (Ci.MeshNormalMaterial = function (e) { Ci.Material.call(this, e), (this.type = 'MeshNormalMaterial'), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.morphTargets = !1), this.setValues(e) }), (Ci.MeshNormalMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.MeshNormalMaterial.prototype.constructor = Ci.MeshNormalMaterial), (Ci.MeshNormalMaterial.prototype.copy = function (e) { return Ci.Material.prototype.copy.call(this, e), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), this }), (Ci.MultiMaterial = function (e) { ;(this.uuid = Ci.Math.generateUUID()), (this.type = 'MultiMaterial'), (this.materials = e instanceof Array ? e : []), (this.visible = !0) }), (Ci.MultiMaterial.prototype = { constructor: Ci.MultiMaterial, toJSON: function (e) { for ( var t = { metadata: { version: 4.2, type: 'material', generator: 'MaterialExporter' }, uuid: this.uuid, type: this.type, materials: [] }, i = this.materials, n = 0, r = i.length; n < r; n++ ) { var o = i[n].toJSON(e) delete o.metadata, t.materials.push(o) } return (t.visible = this.visible), t }, clone: function () { for (var e = new this.constructor(), t = 0; t < this.materials.length; t++) e.materials.push(this.materials[t].clone()) return (e.visible = this.visible), e } }), (Ci.PointsMaterial = function (e) { Ci.Material.call(this), (this.type = 'PointsMaterial'), (this.color = new Ci.Color(16777215)), (this.map = null), (this.size = 1), (this.sizeAttenuation = !0), (this.blending = Ci.NormalBlending), (this.vertexColors = Ci.NoColors), (this.fog = !0), this.setValues(e) }), (Ci.PointsMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.PointsMaterial.prototype.constructor = Ci.PointsMaterial), (Ci.PointsMaterial.prototype.copy = function (e) { return ( Ci.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (this.size = e.size), (this.sizeAttenuation = e.sizeAttenuation), (this.vertexColors = e.vertexColors), (this.fog = e.fog), this ) }), (Ci.ShaderMaterial = function (e) { Ci.Material.call(this), (this.type = 'ShaderMaterial'), (this.defines = {}), (this.uniforms = {}), (this.vertexShader = 'void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}'), (this.fragmentShader = 'void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}'), (this.shading = Ci.SmoothShading), (this.linewidth = 1), (this.wireframe = !1), (this.wireframeLinewidth = 1), (this.fog = !1), (this.lights = !1), (this.vertexColors = Ci.NoColors), (this.skinning = !1), (this.morphTargets = !1), (this.morphNormals = !1), (this.extensions = { derivatives: !1, fragDepth: !1, drawBuffers: !1, shaderTextureLOD: !1 }), (this.defaultAttributeValues = { color: [1, 1, 1], uv: [0, 0], uv2: [0, 0] }), (this.index0AttributeName = void 0) !== e && (void 0 !== e.attributes && console.error('THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.'), this.setValues(e)) }), (Ci.ShaderMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.ShaderMaterial.prototype.constructor = Ci.ShaderMaterial), (Ci.ShaderMaterial.prototype.copy = function (e) { return ( Ci.Material.prototype.copy.call(this, e), (this.fragmentShader = e.fragmentShader), (this.vertexShader = e.vertexShader), (this.uniforms = Ci.UniformsUtils.clone(e.uniforms)), (this.defines = e.defines), (this.shading = e.shading), (this.wireframe = e.wireframe), (this.wireframeLinewidth = e.wireframeLinewidth), (this.fog = e.fog), (this.lights = e.lights), (this.vertexColors = e.vertexColors), (this.skinning = e.skinning), (this.morphTargets = e.morphTargets), (this.morphNormals = e.morphNormals), (this.extensions = e.extensions), this ) }), (Ci.ShaderMaterial.prototype.toJSON = function (e) { var t = Ci.Material.prototype.toJSON.call(this, e) return (t.uniforms = this.uniforms), (t.vertexShader = this.vertexShader), (t.fragmentShader = this.fragmentShader), t }), (Ci.RawShaderMaterial = function (e) { Ci.ShaderMaterial.call(this, e), (this.type = 'RawShaderMaterial') }), (Ci.RawShaderMaterial.prototype = Object.create(Ci.ShaderMaterial.prototype)), (Ci.RawShaderMaterial.prototype.constructor = Ci.RawShaderMaterial), (Ci.SpriteMaterial = function (e) { Ci.Material.call(this), (this.type = 'SpriteMaterial'), (this.color = new Ci.Color(16777215)), (this.map = null), (this.rotation = 0), (this.fog = !1), this.setValues(e) }), (Ci.SpriteMaterial.prototype = Object.create(Ci.Material.prototype)), (Ci.SpriteMaterial.prototype.constructor = Ci.SpriteMaterial), (Ci.SpriteMaterial.prototype.copy = function (e) { return Ci.Material.prototype.copy.call(this, e), this.color.copy(e.color), (this.map = e.map), (this.rotation = e.rotation), (this.fog = e.fog), this }), (Ci.Texture = function (e, t, i, n, r, o, a, s, l) { Object.defineProperty(this, 'id', { value: Ci.TextureIdCount++ }), (this.uuid = Ci.Math.generateUUID()), (this.name = ''), (this.sourceFile = ''), (this.image = void 0 !== e ? e : Ci.Texture.DEFAULT_IMAGE), (this.mipmaps = []), (this.mapping = void 0 !== t ? t : Ci.Texture.DEFAULT_MAPPING), (this.wrapS = void 0 !== i ? i : Ci.ClampToEdgeWrapping), (this.wrapT = void 0 !== n ? n : Ci.ClampToEdgeWrapping), (this.magFilter = void 0 !== r ? r : Ci.LinearFilter), (this.minFilter = void 0 !== o ? o : Ci.LinearMipMapLinearFilter), (this.anisotropy = void 0 !== l ? l : 1), (this.format = void 0 !== a ? a : Ci.RGBAFormat), (this.type = void 0 !== s ? s : Ci.UnsignedByteType), (this.offset = new Ci.Vector2(0, 0)), (this.repeat = new Ci.Vector2(1, 1)), (this.generateMipmaps = !0), (this.premultiplyAlpha = !1), (this.flipY = !0), (this.unpackAlignment = 4), (this.encoding = Ci.LinearEncoding), (this.version = 0), (this.onUpdate = null) }), (Ci.Texture.DEFAULT_IMAGE = void 0), (Ci.Texture.DEFAULT_MAPPING = Ci.UVMapping), (Ci.Texture.prototype = { constructor: Ci.Texture, set needsUpdate(e) { !0 === e && this.version++ }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return ( (this.image = e.image), (this.mipmaps = e.mipmaps.slice(0)), (this.mapping = e.mapping), (this.wrapS = e.wrapS), (this.wrapT = e.wrapT), (this.magFilter = e.magFilter), (this.minFilter = e.minFilter), (this.anisotropy = e.anisotropy), (this.format = e.format), (this.type = e.type), this.offset.copy(e.offset), this.repeat.copy(e.repeat), (this.generateMipmaps = e.generateMipmaps), (this.premultiplyAlpha = e.premultiplyAlpha), (this.flipY = e.flipY), (this.unpackAlignment = e.unpackAlignment), (this.encoding = e.encoding), this ) }, toJSON: function (e) { if (void 0 !== e.textures[this.uuid]) return e.textures[this.uuid] var t, i, n = { metadata: { version: 4.4, type: 'Texture', generator: 'Texture.toJSON' }, uuid: this.uuid, name: this.name, mapping: this.mapping, repeat: [this.repeat.x, this.repeat.y], offset: [this.offset.x, this.offset.y], wrap: [this.wrapS, this.wrapT], minFilter: this.minFilter, magFilter: this.magFilter, anisotropy: this.anisotropy } if (void 0 !== this.image) { var r = this.image void 0 === r.uuid && (r.uuid = Ci.Math.generateUUID()), void 0 === e.images[r.uuid] && (e.images[r.uuid] = { uuid: r.uuid, url: ((t = r), void 0 !== t.toDataURL ? (i = t) : (((i = document.createElement('canvas')).width = t.width), (i.height = t.height), i.getContext('2d').drawImage(t, 0, 0, t.width, t.height)), 2048 < i.width || 2048 < i.height ? i.toDataURL('image/jpeg', 0.6) : i.toDataURL('image/png')) }), (n.image = r.uuid) } return (e.textures[this.uuid] = n) }, dispose: function () { this.dispatchEvent({ type: 'dispose' }) }, transformUv: function (e) { if (this.mapping === Ci.UVMapping) { if ((e.multiply(this.repeat), e.add(this.offset), e.x < 0 || 1 < e.x)) switch (this.wrapS) { case Ci.RepeatWrapping: e.x = e.x - Math.floor(e.x) break case Ci.ClampToEdgeWrapping: e.x = e.x < 0 ? 0 : 1 break case Ci.MirroredRepeatWrapping: 1 === Math.abs(Math.floor(e.x) % 2) ? (e.x = Math.ceil(e.x) - e.x) : (e.x = e.x - Math.floor(e.x)) } if (e.y < 0 || 1 < e.y) switch (this.wrapT) { case Ci.RepeatWrapping: e.y = e.y - Math.floor(e.y) break case Ci.ClampToEdgeWrapping: e.y = e.y < 0 ? 0 : 1 break case Ci.MirroredRepeatWrapping: 1 === Math.abs(Math.floor(e.y) % 2) ? (e.y = Math.ceil(e.y) - e.y) : (e.y = e.y - Math.floor(e.y)) } this.flipY && (e.y = 1 - e.y) } } }), Ci.EventDispatcher.prototype.apply(Ci.Texture.prototype), (Ci.TextureIdCount = 0), (Ci.CanvasTexture = function (e, t, i, n, r, o, a, s, l) { Ci.Texture.call(this, e, t, i, n, r, o, a, s, l), (this.needsUpdate = !0) }), (Ci.CanvasTexture.prototype = Object.create(Ci.Texture.prototype)), (Ci.CanvasTexture.prototype.constructor = Ci.CanvasTexture), (Ci.CubeTexture = function (e, t, i, n, r, o, a, s, l) { ;(e = void 0 !== e ? e : []), (t = void 0 !== t ? t : Ci.CubeReflectionMapping), Ci.Texture.call(this, e, t, i, n, r, o, a, s, l), (this.flipY = !1) }), (Ci.CubeTexture.prototype = Object.create(Ci.Texture.prototype)), (Ci.CubeTexture.prototype.constructor = Ci.CubeTexture), Object.defineProperty(Ci.CubeTexture.prototype, 'images', { get: function () { return this.image }, set: function (e) { this.image = e } }), (Ci.CompressedTexture = function (e, t, i, n, r, o, a, s, l, c, h) { Ci.Texture.call(this, null, o, a, s, l, c, n, r, h), (this.image = { width: t, height: i }), (this.mipmaps = e), (this.flipY = !1), (this.generateMipmaps = !1) }), (Ci.CompressedTexture.prototype = Object.create(Ci.Texture.prototype)), (Ci.CompressedTexture.prototype.constructor = Ci.CompressedTexture), (Ci.DataTexture = function (e, t, i, n, r, o, a, s, l, c, h) { Ci.Texture.call(this, null, o, a, s, l, c, n, r, h), (this.image = { data: e, width: t, height: i }), (this.magFilter = void 0 !== l ? l : Ci.NearestFilter), (this.minFilter = void 0 !== c ? c : Ci.NearestFilter), (this.flipY = !1), (this.generateMipmaps = !1) }), (Ci.DataTexture.prototype = Object.create(Ci.Texture.prototype)), (Ci.DataTexture.prototype.constructor = Ci.DataTexture), (Ci.VideoTexture = function (t, e, i, n, r, o, a, s, l) { Ci.Texture.call(this, t, e, i, n, r, o, a, s, l), (this.generateMipmaps = !1) var c = this !(function e() { requestAnimationFrame(e), !t.paused && t.readyState === t.HAVE_ENOUGH_DATA && (c.needsUpdate = !0) })() }), (Ci.VideoTexture.prototype = Object.create(Ci.Texture.prototype)), (Ci.VideoTexture.prototype.constructor = Ci.VideoTexture), (Ci.Group = function () { Ci.Object3D.call(this), (this.type = 'Group') }), (Ci.Group.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Group.prototype.constructor = Ci.Group), (Ci.Points = function (e, t) { Ci.Object3D.call(this), (this.type = 'Points'), (this.geometry = void 0 !== e ? e : new Ci.Geometry()), (this.material = void 0 !== t ? t : new Ci.PointsMaterial({ color: 16777215 * Math.random() })) }), (Ci.Points.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Points.prototype.constructor = Ci.Points), (Ci.Points.prototype.raycast = ((Wt = new Ci.Matrix4()), (jt = new Ci.Ray()), (Yt = new Ci.Sphere()), function (o, a) { function e(e, t) { var i = jt.distanceSqToPoint(e) if (i < c) { var n = jt.closestPointToPoint(e) n.applyMatrix4(l) var r = o.ray.origin.distanceTo(n) if (r < o.near || r > o.far) return a.push({ distance: r, distanceToRay: Math.sqrt(i), point: n.clone(), index: t, face: null, object: s }) } } var s = this, t = this.geometry, l = this.matrixWorld, i = o.params.Points.threshold if ((null === t.boundingSphere && t.computeBoundingSphere(), Yt.copy(t.boundingSphere), Yt.applyMatrix4(l), !1 !== o.ray.intersectsSphere(Yt))) { Wt.getInverse(l), jt.copy(o.ray).applyMatrix4(Wt) var n = i / ((this.scale.x + this.scale.y + this.scale.z) / 3), c = n * n, r = new Ci.Vector3() if (t instanceof Ci.BufferGeometry) { var h = t.index, u = t.attributes.position.array if (null !== h) for (var d = h.array, p = 0, f = d.length; p < f; p++) { var g = d[p] r.fromArray(u, 3 * g), e(r, g) } else { p = 0 for (var m = u.length / 3; p < m; p++) r.fromArray(u, 3 * p), e(r, p) } } else { var v = t.vertices for (p = 0, m = v.length; p < m; p++) e(v[p], p) } } })), (Ci.Points.prototype.clone = function () { return new this.constructor(this.geometry, this.material).copy(this) }), (Ci.Line = function (e, t, i) { return 1 === i ? (console.warn('THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead.'), new Ci.LineSegments(e, t)) : (Ci.Object3D.call(this), (this.type = 'Line'), (this.geometry = void 0 !== e ? e : new Ci.Geometry()), void (this.material = void 0 !== t ? t : new Ci.LineBasicMaterial({ color: 16777215 * Math.random() }))) }), (Ci.Line.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Line.prototype.constructor = Ci.Line), (Ci.Line.prototype.raycast = ((Ht = new Ci.Matrix4()), (zt = new Ci.Ray()), (Gt = new Ci.Sphere()), function (e, t) { var i = e.linePrecision, n = i * i, r = this.geometry, o = this.matrixWorld if ((null === r.boundingSphere && r.computeBoundingSphere(), Gt.copy(r.boundingSphere), Gt.applyMatrix4(o), !1 !== e.ray.intersectsSphere(Gt))) { Ht.getInverse(o), zt.copy(e.ray).applyMatrix4(Ht) var a = new Ci.Vector3(), s = new Ci.Vector3(), l = new Ci.Vector3(), c = new Ci.Vector3(), h = this instanceof Ci.LineSegments ? 2 : 1 if (r instanceof Ci.BufferGeometry) { var u = r.index, d = r.attributes.position.array if (null !== u) for (var p = u.array, f = 0, g = p.length - 1; f < g; f += h) { var m = p[f], v = p[f + 1] a.fromArray(d, 3 * m), s.fromArray(d, 3 * v), n < zt.distanceSqToSegment(a, s, c, l) || (c.applyMatrix4(this.matrixWorld), (C = e.ray.origin.distanceTo(c)) < e.near || C > e.far || t.push({ distance: C, point: l.clone().applyMatrix4(this.matrixWorld), index: f, face: null, faceIndex: null, object: this })) } else for (f = 0, g = d.length / 3 - 1; f < g; f += h) a.fromArray(d, 3 * f), s.fromArray(d, 3 * f + 3), n < zt.distanceSqToSegment(a, s, c, l) || (c.applyMatrix4(this.matrixWorld), (C = e.ray.origin.distanceTo(c)) < e.near || C > e.far || t.push({ distance: C, point: l.clone().applyMatrix4(this.matrixWorld), index: f, face: null, faceIndex: null, object: this })) } else if (r instanceof Ci.Geometry) { var y = r.vertices, A = y.length for (f = 0; f < A - 1; f += h) { var C n < zt.distanceSqToSegment(y[f], y[f + 1], c, l) || (c.applyMatrix4(this.matrixWorld), (C = e.ray.origin.distanceTo(c)) < e.near || C > e.far || t.push({ distance: C, point: l.clone().applyMatrix4(this.matrixWorld), index: f, face: null, faceIndex: null, object: this })) } } } })), (Ci.Line.prototype.clone = function () { return new this.constructor(this.geometry, this.material).copy(this) }), (Ci.LineStrip = 0), (Ci.LinePieces = 1), (Ci.LineSegments = function (e, t) { Ci.Line.call(this, e, t), (this.type = 'LineSegments') }), (Ci.LineSegments.prototype = Object.create(Ci.Line.prototype)), (Ci.LineSegments.prototype.constructor = Ci.LineSegments), (Ci.Mesh = function (e, t) { Ci.Object3D.call(this), (this.type = 'Mesh'), (this.geometry = void 0 !== e ? e : new Ci.Geometry()), (this.material = void 0 !== t ? t : new Ci.MeshBasicMaterial({ color: 16777215 * Math.random() })), (this.drawMode = Ci.TrianglesDrawMode), this.updateMorphTargets() }), (Ci.Mesh.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Mesh.prototype.constructor = Ci.Mesh), (Ci.Mesh.prototype.setDrawMode = function (e) { this.drawMode = e }), (Ci.Mesh.prototype.updateMorphTargets = function () { if (void 0 !== this.geometry.morphTargets && 0 < this.geometry.morphTargets.length) { ;(this.morphTargetBase = -1), (this.morphTargetInfluences = []), (this.morphTargetDictionary = {}) for (var e = 0, t = this.geometry.morphTargets.length; e < t; e++) this.morphTargetInfluences.push(0), (this.morphTargetDictionary[this.geometry.morphTargets[e].name] = e) } }), (Ci.Mesh.prototype.getMorphTargetIndexByName = function (e) { return void 0 !== this.morphTargetDictionary[e] ? this.morphTargetDictionary[e] : (console.warn('THREE.Mesh.getMorphTargetIndexByName: morph target ' + e + ' does not exist. Returning 0.'), 0) }), (Ci.Mesh.prototype.raycast = ((Tt = new Ci.Matrix4()), (xt = new Ci.Ray()), (St = new Ci.Sphere()), (Mt = new Ci.Vector3()), (Rt = new Ci.Vector3()), (Pt = new Ci.Vector3()), (Ot = new Ci.Vector3()), (Lt = new Ci.Vector3()), (Dt = new Ci.Vector3()), (Nt = new Ci.Vector2()), (Ft = new Ci.Vector2()), (Bt = new Ci.Vector2()), (Vt = new Ci.Vector3()), (kt = new Ci.Vector3()), (Ut = new Ci.Vector3()), function (e, t) { var i, n, r = this.geometry, o = this.material, a = this.matrixWorld if ( void 0 !== o && (null === r.boundingSphere && r.computeBoundingSphere(), St.copy(r.boundingSphere), St.applyMatrix4(a), !1 !== e.ray.intersectsSphere(St) && (Tt.getInverse(a), xt.copy(e.ray).applyMatrix4(Tt), null === r.boundingBox || !1 !== xt.intersectsBox(r.boundingBox))) ) if (r instanceof Ci.BufferGeometry) { var s, l, c, h = r.index, u = r.attributes, d = u.position.array if ((void 0 !== u.uv && (i = u.uv.array), null !== h)) for (var p = h.array, f = 0, g = p.length; f < g; f += 3) (s = p[f]), (l = p[f + 1]), (c = p[f + 2]), (n = Ti(this, e, xt, d, i, s, l, c)) && ((n.faceIndex = Math.floor(f / 3)), t.push(n)) else for (f = 0, g = d.length; f < g; f += 9) (n = Ti(this, e, xt, d, i, (s = f / 3), (l = s + 1), (c = s + 2))) && ((n.index = s), t.push(n)) } else if (r instanceof Ci.Geometry) { var m, v, y, A = o instanceof Ci.MultiMaterial, C = 1 == A ? o.materials : null, I = r.vertices, E = r.faces, _ = r.faceVertexUvs[0] 0 < _.length && (i = _) for (var b = 0, w = E.length; b < w; b++) { var T = E[b], x = 1 == A ? C[T.materialIndex] : o if (void 0 !== x) { if (((m = I[T.a]), (v = I[T.b]), (y = I[T.c]), !0 === x.morphTargets)) { var S = r.morphTargets, M = this.morphTargetInfluences Mt.set(0, 0, 0), Rt.set(0, 0, 0), Pt.set(0, 0, 0) for (var R = 0, P = S.length; R < P; R++) { var O = M[R] if (0 !== O) { var L = S[R].vertices Mt.addScaledVector(Ot.subVectors(L[T.a], m), O), Rt.addScaledVector(Lt.subVectors(L[T.b], v), O), Pt.addScaledVector(Dt.subVectors(L[T.c], y), O) } } Mt.add(m), Rt.add(v), Pt.add(y), (m = Mt), (v = Rt), (y = Pt) } if ((n = wi(this, e, xt, m, v, y, kt))) { if (i) { var D = i[b] Nt.copy(D[0]), Ft.copy(D[1]), Bt.copy(D[2]), (n.uv = bi(kt, m, v, y, Nt, Ft, Bt)) } ;(n.face = T), (n.faceIndex = b), t.push(n) } } } } })), (Ci.Mesh.prototype.clone = function () { return new this.constructor(this.geometry, this.material).copy(this) }), (Ci.Bone = function (e) { Ci.Object3D.call(this), (this.type = 'Bone'), (this.skin = e) }), (Ci.Bone.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Bone.prototype.constructor = Ci.Bone), (Ci.Bone.prototype.copy = function (e) { return Ci.Object3D.prototype.copy.call(this, e), (this.skin = e.skin), this }), (Ci.Skeleton = function (e, t, i) { if (((this.useVertexTexture = void 0 === i || i), (this.identityMatrix = new Ci.Matrix4()), (e = e || []), (this.bones = e.slice(0)), this.useVertexTexture)) { var n = Math.sqrt(4 * this.bones.length) ;(n = Ci.Math.nextPowerOfTwo(Math.ceil(n))), (n = Math.max(n, 4)), (this.boneTextureWidth = n), (this.boneTextureHeight = n), (this.boneMatrices = new Float32Array(this.boneTextureWidth * this.boneTextureHeight * 4)), (this.boneTexture = new Ci.DataTexture(this.boneMatrices, this.boneTextureWidth, this.boneTextureHeight, Ci.RGBAFormat, Ci.FloatType)) } else this.boneMatrices = new Float32Array(16 * this.bones.length) if (void 0 === t) this.calculateInverses() else if (this.bones.length === t.length) this.boneInverses = t.slice(0) else { console.warn('THREE.Skeleton bonInverses is the wrong length.'), (this.boneInverses = []) for (var r = 0, o = this.bones.length; r < o; r++) this.boneInverses.push(new Ci.Matrix4()) } }), (Ci.Skeleton.prototype.calculateInverses = function () { this.boneInverses = [] for (var e = 0, t = this.bones.length; e < t; e++) { var i = new Ci.Matrix4() this.bones[e] && i.getInverse(this.bones[e].matrixWorld), this.boneInverses.push(i) } }), (Ci.Skeleton.prototype.pose = function () { for (var e, t = 0, i = this.bones.length; t < i; t++) (e = this.bones[t]) && e.matrixWorld.getInverse(this.boneInverses[t]) for (t = 0, i = this.bones.length; t < i; t++) (e = this.bones[t]) && (e.parent ? (e.matrix.getInverse(e.parent.matrixWorld), e.matrix.multiply(e.matrixWorld)) : e.matrix.copy(e.matrixWorld), e.matrix.decompose(e.position, e.quaternion, e.scale)) }), (Ci.Skeleton.prototype.update = ((wt = new Ci.Matrix4()), function () { for (var e = 0, t = this.bones.length; e < t; e++) { var i = this.bones[e] ? this.bones[e].matrixWorld : this.identityMatrix wt.multiplyMatrices(i, this.boneInverses[e]), wt.flattenToArrayOffset(this.boneMatrices, 16 * e) } this.useVertexTexture && (this.boneTexture.needsUpdate = !0) })), (Ci.Skeleton.prototype.clone = function () { return new Ci.Skeleton(this.bones, this.boneInverses, this.useVertexTexture) }), (Ci.SkinnedMesh = function (e, t, i) { Ci.Mesh.call(this, e, t), (this.type = 'SkinnedMesh'), (this.bindMode = 'attached'), (this.bindMatrix = new Ci.Matrix4()), (this.bindMatrixInverse = new Ci.Matrix4()) var n = [] if (this.geometry && void 0 !== this.geometry.bones) { for (var r, o, a = 0, s = this.geometry.bones.length; a < s; ++a) (o = this.geometry.bones[a]), (r = new Ci.Bone(this)), n.push(r), (r.name = o.name), r.position.fromArray(o.pos), r.quaternion.fromArray(o.rotq), void 0 !== o.scl && r.scale.fromArray(o.scl) for (a = 0, s = this.geometry.bones.length; a < s; ++a) -1 !== (o = this.geometry.bones[a]).parent && null !== o.parent ? n[o.parent].add(n[a]) : this.add(n[a]) } this.normalizeSkinWeights(), this.updateMatrixWorld(!0), this.bind(new Ci.Skeleton(n, void 0, i), this.matrixWorld) }), (Ci.SkinnedMesh.prototype = Object.create(Ci.Mesh.prototype)), (Ci.SkinnedMesh.prototype.constructor = Ci.SkinnedMesh), (Ci.SkinnedMesh.prototype.bind = function (e, t) { ;(this.skeleton = e), void 0 === t && (this.updateMatrixWorld(!0), this.skeleton.calculateInverses(), (t = this.matrixWorld)), this.bindMatrix.copy(t), this.bindMatrixInverse.getInverse(t) }), (Ci.SkinnedMesh.prototype.pose = function () { this.skeleton.pose() }), (Ci.SkinnedMesh.prototype.normalizeSkinWeights = function () { if (this.geometry instanceof Ci.Geometry) for (var e = 0; e < this.geometry.skinWeights.length; e++) { var t = this.geometry.skinWeights[e] ;(r = 1 / t.lengthManhattan()) !== 1 / 0 ? t.multiplyScalar(r) : t.set(1, 0, 0, 0) } else if (this.geometry instanceof Ci.BufferGeometry) { var i = new Ci.Vector4(), n = this.geometry.attributes.skinWeight for (e = 0; e < n.count; e++) { var r ;(i.x = n.getX(e)), (i.y = n.getY(e)), (i.z = n.getZ(e)), (i.w = n.getW(e)), (r = 1 / i.lengthManhattan()) !== 1 / 0 ? i.multiplyScalar(r) : i.set(1, 0, 0, 0), n.setXYZW(e, i.x, i.y, i.z, i.w) } } }), (Ci.SkinnedMesh.prototype.updateMatrixWorld = function (e) { Ci.Mesh.prototype.updateMatrixWorld.call(this, !0), 'attached' === this.bindMode ? this.bindMatrixInverse.getInverse(this.matrixWorld) : 'detached' === this.bindMode ? this.bindMatrixInverse.getInverse(this.bindMatrix) : console.warn('THREE.SkinnedMesh unrecognized bindMode: ' + this.bindMode) }), (Ci.SkinnedMesh.prototype.clone = function () { return new this.constructor(this.geometry, this.material, this.useVertexTexture).copy(this) }), (Ci.LOD = function () { Ci.Object3D.call(this), (this.type = 'LOD'), Object.defineProperties(this, { levels: { enumerable: !0, value: [] }, objects: { get: function () { return console.warn('THREE.LOD: .objects has been renamed to .levels.'), this.levels } } }) }), (Ci.LOD.prototype = Object.create(Ci.Object3D.prototype)), (Ci.LOD.prototype.constructor = Ci.LOD), (Ci.LOD.prototype.addLevel = function (e, t) { void 0 === t && (t = 0), (t = Math.abs(t)) for (var i = this.levels, n = 0; n < i.length && !(t < i[n].distance); n++); i.splice(n, 0, { distance: t, object: e }), this.add(e) }), (Ci.LOD.prototype.getObjectForDistance = function (e) { for (var t = this.levels, i = 1, n = t.length; i < n && !(e < t[i].distance); i++); return t[i - 1].object }), (Ci.LOD.prototype.raycast = ((bt = new Ci.Vector3()), function (e, t) { bt.setFromMatrixPosition(this.matrixWorld) var i = e.ray.origin.distanceTo(bt) this.getObjectForDistance(i).raycast(e, t) })), (Ci.LOD.prototype.update = ((Et = new Ci.Vector3()), (_t = new Ci.Vector3()), function (e) { var t = this.levels if (1 < t.length) { Et.setFromMatrixPosition(e.matrixWorld), _t.setFromMatrixPosition(this.matrixWorld) var i = Et.distanceTo(_t) t[0].object.visible = !0 for (var n = 1, r = t.length; n < r && i >= t[n].distance; n++) (t[n - 1].object.visible = !1), (t[n].object.visible = !0) for (; n < r; n++) t[n].object.visible = !1 } })), (Ci.LOD.prototype.copy = function (e) { Ci.Object3D.prototype.copy.call(this, e, !1) for (var t = e.levels, i = 0, n = t.length; i < n; i++) { var r = t[i] this.addLevel(r.object.clone(), r.distance) } return this }), (Ci.LOD.prototype.toJSON = function (e) { var t = Ci.Object3D.prototype.toJSON.call(this, e) t.object.levels = [] for (var i = this.levels, n = 0, r = i.length; n < r; n++) { var o = i[n] t.object.levels.push({ object: o.object.uuid, distance: o.distance }) } return t }), (Ci.Sprite = ((yt = new Uint16Array([0, 1, 2, 0, 2, 3])), (At = new Float32Array([-0.5, -0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, 0, -0.5, 0.5, 0])), (Ct = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1])), (It = new Ci.BufferGeometry()).setIndex(new Ci.BufferAttribute(yt, 1)), It.addAttribute('position', new Ci.BufferAttribute(At, 3)), It.addAttribute('uv', new Ci.BufferAttribute(Ct, 2)), function (e) { Ci.Object3D.call(this), (this.type = 'Sprite'), (this.geometry = It), (this.material = void 0 !== e ? e : new Ci.SpriteMaterial()) })), (Ci.Sprite.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Sprite.prototype.constructor = Ci.Sprite), (Ci.Sprite.prototype.raycast = ((vt = new Ci.Vector3()), function (e, t) { vt.setFromMatrixPosition(this.matrixWorld) var i = e.ray.distanceSqToPoint(vt) this.scale.x * this.scale.y < i || t.push({ distance: Math.sqrt(i), point: this.position, face: null, object: this }) })), (Ci.Sprite.prototype.clone = function () { return new this.constructor(this.material).copy(this) }), (Ci.Particle = Ci.Sprite), (Ci.LensFlare = function (e, t, i, n, r) { Ci.Object3D.call(this), (this.lensFlares = []), (this.positionScreen = new Ci.Vector3()), (this.customUpdateCallback = void 0) !== e && this.add(e, t, i, n, r) }), (Ci.LensFlare.prototype = Object.create(Ci.Object3D.prototype)), (Ci.LensFlare.prototype.constructor = Ci.LensFlare), (Ci.LensFlare.prototype.add = function (e, t, i, n, r, o) { void 0 === t && (t = -1), void 0 === i && (i = 0), void 0 === o && (o = 1), void 0 === r && (r = new Ci.Color(16777215)), void 0 === n && (n = Ci.NormalBlending), (i = Math.min(i, Math.max(0, i))), this.lensFlares.push({ texture: e, size: t, distance: i, x: 0, y: 0, z: 0, scale: 1, rotation: 0, opacity: o, color: r, blending: n }) }), (Ci.LensFlare.prototype.updateLensFlares = function () { var e, t, i = this.lensFlares.length, n = 2 * -this.positionScreen.x, r = 2 * -this.positionScreen.y for (e = 0; e < i; e++) ((t = this.lensFlares[e]).x = this.positionScreen.x + n * t.distance), (t.y = this.positionScreen.y + r * t.distance), (t.wantedRotation = t.x * Math.PI * 0.25), (t.rotation += 0.25 * (t.wantedRotation - t.rotation)) }), (Ci.LensFlare.prototype.copy = function (e) { Ci.Object3D.prototype.copy.call(this, e), this.positionScreen.copy(e.positionScreen), (this.customUpdateCallback = e.customUpdateCallback) for (var t = 0, i = e.lensFlares.length; t < i; t++) this.lensFlares.push(e.lensFlares[t]) return this }), (Ci.Scene = function () { Ci.Object3D.call(this), (this.type = 'Scene'), (this.fog = null), (this.overrideMaterial = null), (this.autoUpdate = !0) }), (Ci.Scene.prototype = Object.create(Ci.Object3D.prototype)), (Ci.Scene.prototype.constructor = Ci.Scene), (Ci.Scene.prototype.copy = function (e, t) { return ( Ci.Object3D.prototype.copy.call(this, e, t), null !== e.fog && (this.fog = e.fog.clone()), null !== e.overrideMaterial && (this.overrideMaterial = e.overrideMaterial.clone()), (this.autoUpdate = e.autoUpdate), (this.matrixAutoUpdate = e.matrixAutoUpdate), this ) }), (Ci.Fog = function (e, t, i) { ;(this.name = ''), (this.color = new Ci.Color(e)), (this.near = void 0 !== t ? t : 1), (this.far = void 0 !== i ? i : 1e3) }), (Ci.Fog.prototype.clone = function () { return new Ci.Fog(this.color.getHex(), this.near, this.far) }), (Ci.FogExp2 = function (e, t) { ;(this.name = ''), (this.color = new Ci.Color(e)), (this.density = void 0 !== t ? t : 25e-5) }), (Ci.FogExp2.prototype.clone = function () { return new Ci.FogExp2(this.color.getHex(), this.density) }), (Ci.ShaderChunk = {}), (Ci.ShaderChunk.alphamap_fragment = '#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n'), (Ci.ShaderChunk.alphamap_pars_fragment = '#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n'), (Ci.ShaderChunk.alphatest_fragment = '#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n'), (Ci.ShaderChunk.aomap_fragment = '#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n'), (Ci.ShaderChunk.aomap_pars_fragment = '#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif'), (Ci.ShaderChunk.begin_vertex = '\nvec3 transformed = vec3( position );\n'), (Ci.ShaderChunk.beginnormal_vertex = '\nvec3 objectNormal = vec3( normal );\n'), (Ci.ShaderChunk.bsdfs = 'bool testLightInRange( const in float lightDistance, const in float cutoffDistance ) {\n\treturn any( bvec2( cutoffDistance == 0.0, lightDistance < cutoffDistance ) );\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t\t}\n\t\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_Smith( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n'), (Ci.ShaderChunk.bumpmap_pars_fragment = '#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos );\n\t\tvec3 vSigmaY = dFdy( surf_pos );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n'), (Ci.ShaderChunk.color_fragment = '#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif'), (Ci.ShaderChunk.color_pars_fragment = '#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n'), (Ci.ShaderChunk.color_pars_vertex = '#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif'), (Ci.ShaderChunk.color_vertex = '#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif'), (Ci.ShaderChunk.common = '#define PI 3.14159\n#define PI2 6.28318\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\n'), (Ci.ShaderChunk.cube_uv_reflection_fragment = '#ifdef ENVMAP_TYPE_CUBE_UV\nconst float cubeUV_textureSize = 1024.0;\nint getFaceFromDirection(vec3 direction) {\n vec3 absDirection = abs(direction);\n int face = -1;\n if( absDirection.x > absDirection.z ) {\n if(absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0 : 3;\n else\n face = direction.y > 0.0 ? 1 : 4;\n }\n else {\n if(absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2 : 5;\n else\n face = direction.y > 0.0 ? 1 : 4;\n }\n return face;\n}\nconst float cubeUV_maxLods1 = log2(cubeUV_textureSize*0.25) - 1.0;\nconst float cubeUV_rangeClamp = exp2((6.0 - 1.0) * 2.0);\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n float scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n float dxRoughness = dFdx(roughness);\n float dyRoughness = dFdy(roughness);\n vec3 dx = dFdx( vec * scale * dxRoughness );\n vec3 dy = dFdy( vec * scale * dyRoughness );\n float d = max( dot( dx, dx ), dot( dy, dy ) );\n d = clamp(d, 1.0, cubeUV_rangeClamp);\n float mipLevel = 0.5 * log2(d);\n return vec2(floor(mipLevel), fract(mipLevel));\n}\nconst float cubeUV_maxLods2 = log2(cubeUV_textureSize*0.25) - 2.0;\nconst float cubeUV_rcpTextureSize = 1.0 / cubeUV_textureSize;\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n mipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n float a = 16.0 * cubeUV_rcpTextureSize;\n vec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n vec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n float powScale = exp2_packed.x * exp2_packed.y;\n float scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n float mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n bool bRes = mipLevel == 0.0;\n scale = bRes && (scale < a) ? a : scale;\n vec3 r;\n vec2 offset;\n int face = getFaceFromDirection(direction);\n float rcpPowScale = 1.0 / powScale;\n if( face == 0) {\n r = vec3(direction.x, -direction.z, direction.y);\n offset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n }\n else if( face == 1) {\n r = vec3(direction.y, direction.x, direction.z);\n offset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n }\n else if( face == 2) {\n r = vec3(direction.z, direction.x, direction.y);\n offset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n offset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n }\n else if( face == 3) {\n r = vec3(direction.x, direction.z, direction.y);\n offset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n }\n else if( face == 4) {\n r = vec3(direction.y, direction.x, -direction.z);\n offset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n }\n else {\n r = vec3(direction.z, -direction.x, direction.y);\n offset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n offset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n }\n r = normalize(r);\n float texelOffset = 0.5 * cubeUV_rcpTextureSize;\n vec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n vec2 base = offset + vec2( texelOffset );\n return base + s * ( scale - 2.0 * texelOffset );\n}\nconst float cubeUV_maxLods3 = log2(cubeUV_textureSize*0.25) - 3.0;\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n float roughnessVal = roughness* cubeUV_maxLods3;\n float r1 = floor(roughnessVal);\n float r2 = r1 + 1.0;\n float t = fract(roughnessVal);\n vec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n float s = mipInfo.y;\n float level0 = mipInfo.x;\n float level1 = level0 + 1.0;\n level1 = level1 > 5.0 ? 5.0 : level1;\n level0 += min( floor( s + 0.5 ), 5.0 );\n vec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n vec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n vec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n vec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n vec4 result = mix(color10, color20, t);\n return vec4(result.rgb, 1.0);\n}\n#endif\n'), (Ci.ShaderChunk.defaultnormal_vertex = '#ifdef FLIP_SIDED\n\tobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;\n'), (Ci.ShaderChunk.displacementmap_vertex = '#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normal * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n'), (Ci.ShaderChunk.displacementmap_pars_vertex = '#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n'), (Ci.ShaderChunk.emissivemap_fragment = '#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n'), (Ci.ShaderChunk.emissivemap_pars_fragment = '#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n'), (Ci.ShaderChunk.encodings_pars_fragment = '\nvec4 LinearToLinear( in vec4 value ) {\n return value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n float maxComponent = max( max( value.r, value.g ), value.b );\n float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.x, max( value.g, value.b ) );\n float M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n M = ceil( M * 255.0 ) / 255.0;\n return vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.x, max( value.g, value.b ) );\n float D = max( maxRange / maxRGB, 1.0 );\n D = min( floor( D ) / 255.0, 1.0 );\n return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n vec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n Xp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n vec4 vResult;\n vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n vResult.w = fract(Le);\n vResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n return vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n float Le = value.z * 255.0 + value.w;\n vec3 Xp_Y_XYZp;\n Xp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n vec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n return vec4( max(vRGB, 0.0), 1.0 );\n}\n'), (Ci.ShaderChunk.encodings_fragment = ' gl_FragColor = linearToOutputTexel( gl_FragColor );\n'), (Ci.ShaderChunk.envmap_fragment = '#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#else\n\t\tfloat flipNormal = 1.0;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n'), (Ci.ShaderChunk.envmap_pars_fragment = '#if defined( USE_ENVMAP ) || defined( STANDARD )\n\tuniform float reflectivity;\n\tuniform float envMapIntenstiy;\n#endif\n#ifdef USE_ENVMAP\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( STANDARD )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n'), (Ci.ShaderChunk.envmap_pars_vertex = '#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG ) && ! defined( STANDARD )\n\tvarying vec3 vReflect;\n\tuniform float refractionRatio;\n#endif\n'), (Ci.ShaderChunk.envmap_vertex = '#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG ) && ! defined( STANDARD )\n\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t#ifdef ENVMAP_MODE_REFLECTION\n\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t#else\n\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t#endif\n#endif\n'), (Ci.ShaderChunk.fog_fragment = '#ifdef USE_FOG\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t#else\n\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t#endif\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * depth * depth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n'), (Ci.ShaderChunk.fog_pars_fragment = '#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif'), (Ci.ShaderChunk.lightmap_fragment = '#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n'), (Ci.ShaderChunk.lightmap_pars_fragment = '#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif'), (Ci.ShaderChunk.lights_lambert_vertex = 'vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tdirectLight = getPointDirectLightIrradiance( pointLights[ i ], geometry );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tdirectLight = getSpotDirectLightIrradiance( spotLights[ i ], geometry );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectLight = getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n'), (Ci.ShaderChunk.lights_pars = 'uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tIncidentLight getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry ) {\n\t\tIncidentLight directLight;\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t\treturn directLight;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tIncidentLight getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry ) {\n\t\tIncidentLight directLight;\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tif ( testLightInRange( lightDistance, pointLight.distance ) ) {\n\t\t\tdirectLight.color = pointLight.color;\n\t\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t\treturn directLight;\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tIncidentLight getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry ) {\n\t\tIncidentLight directLight;\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( all( bvec2( angleCos > spotLight.coneCos, testLightInRange( lightDistance, spotLight.distance ) ) ) ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t\treturn directLight;\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( STANDARD )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#else\n\t\t\tfloat flipNormal = 1.0;\n\t\t#endif\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = flipNormal * vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#else\n\t\t\tfloat flipNormal = 1.0;\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = flipNormal * normalize((viewMatrix * vec4( reflectVec, 0.0 )).xyz + vec3(0.0,0.0,1.0));\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t#endif\n\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n'), (Ci.ShaderChunk.lights_phong_fragment = 'BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n'), (Ci.ShaderChunk.lights_phong_pars_fragment = '#ifdef USE_ENVMAP\n\tvarying vec3 vWorldPosition;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n'), (Ci.ShaderChunk.lights_phong_pars_vertex = '#ifdef USE_ENVMAP\n\tvarying vec3 vWorldPosition;\n#endif\n'), (Ci.ShaderChunk.lights_phong_vertex = '#ifdef USE_ENVMAP\n\tvWorldPosition = worldPosition.xyz;\n#endif\n'), (Ci.ShaderChunk.lights_standard_fragment = 'StandardMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\nmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n'), (Ci.ShaderChunk.lights_standard_pars_fragment = 'struct StandardMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n};\nvoid RE_Direct_Standard( const in IncidentLight directLight, const in GeometricContext geometry, const in StandardMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n}\nvoid RE_IndirectDiffuse_Standard( const in vec3 irradiance, const in GeometricContext geometry, const in StandardMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Standard( const in vec3 radiance, const in GeometricContext geometry, const in StandardMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectSpecular += radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Standard\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Standard\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Standard\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n'), (Ci.ShaderChunk.lights_template = '\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tdirectLight = getPointDirectLightIrradiance( pointLight, geometry );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tdirectLight = getSpotDirectLightIrradiance( spotLight, geometry );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tdirectLight = getDirectionalDirectLightIrradiance( directionalLight, geometry );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t \tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\tRE_IndirectSpecular( radiance, geometry, material, reflectedLight );\n#endif\n'), (Ci.ShaderChunk.logdepthbuf_fragment = '#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\tgl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n#endif'), (Ci.ShaderChunk.logdepthbuf_pars_fragment = '#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n'), (Ci.ShaderChunk.logdepthbuf_pars_vertex = '#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif'), (Ci.ShaderChunk.logdepthbuf_vertex = '#ifdef USE_LOGDEPTHBUF\n\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n'), (Ci.ShaderChunk.map_fragment = '#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n'), (Ci.ShaderChunk.map_pars_fragment = '#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n'), (Ci.ShaderChunk.map_particle_fragment = '#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n'), (Ci.ShaderChunk.map_particle_pars_fragment = '#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\n\tuniform sampler2D map;\n#endif\n'), (Ci.ShaderChunk.metalnessmap_fragment = 'float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.r;\n#endif\n'), (Ci.ShaderChunk.metalnessmap_pars_fragment = '#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif'), (Ci.ShaderChunk.morphnormal_vertex = '#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n'), (Ci.ShaderChunk.morphtarget_pars_vertex = '#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif'), (Ci.ShaderChunk.morphtarget_vertex = '#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n'), (Ci.ShaderChunk.normal_fragment = '#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) );\n\t#endif\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n'), (Ci.ShaderChunk.normalmap_pars_fragment = '#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n'), (Ci.ShaderChunk.premultiplied_alpha_fragment = '#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n'), (Ci.ShaderChunk.project_vertex = '#ifdef USE_SKINNING\n\tvec4 mvPosition = modelViewMatrix * skinned;\n#else\n\tvec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n#endif\ngl_Position = projectionMatrix * mvPosition;\n'), (Ci.ShaderChunk.roughnessmap_fragment = 'float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.r;\n#endif\n'), (Ci.ShaderChunk.roughnessmap_pars_fragment = '#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif'), (Ci.ShaderChunk.shadowmap_pars_fragment = '#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat unpackDepth( const in vec4 rgba_depth ) {\n\t\tconst vec4 bit_shift = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n\t\treturn dot( rgba_depth, bit_shift );\n\t}\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn 1.0;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n'), (Ci.ShaderChunk.shadowmap_pars_vertex = '#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n'), (Ci.ShaderChunk.shadowmap_vertex = '#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n'), (Ci.ShaderChunk.shadowmask_pars_fragment = 'float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n'), (Ci.ShaderChunk.skinbase_vertex = '#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif'), (Ci.ShaderChunk.skinning_pars_vertex = '#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureWidth;\n\t\tuniform int boneTextureHeight;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureWidth ) );\n\t\t\tfloat y = floor( j / float( boneTextureWidth ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureWidth );\n\t\t\tfloat dy = 1.0 / float( boneTextureHeight );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneGlobalMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneGlobalMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n'), (Ci.ShaderChunk.skinning_vertex = '#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\tskinned = bindMatrixInverse * skinned;\n#endif\n'), (Ci.ShaderChunk.skinnormal_vertex = '#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n'), (Ci.ShaderChunk.specularmap_fragment = 'float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif'), (Ci.ShaderChunk.specularmap_pars_fragment = '#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif'), (Ci.ShaderChunk.tonemapping_fragment = '#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n'), (Ci.ShaderChunk.tonemapping_pars_fragment = '#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n return toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n'), (Ci.ShaderChunk.uv2_pars_fragment = '#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif'), (Ci.ShaderChunk.uv2_pars_vertex = '#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif'), (Ci.ShaderChunk.uv2_vertex = '#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif'), (Ci.ShaderChunk.uv_pars_fragment = '#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif'), (Ci.ShaderChunk.uv_pars_vertex = '#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform vec4 offsetRepeat;\n#endif\n'), (Ci.ShaderChunk.uv_vertex = '#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n#endif'), (Ci.ShaderChunk.worldpos_vertex = '#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( STANDARD ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\t#ifdef USE_SKINNING\n\t\tvec4 worldPosition = modelMatrix * skinned;\n\t#else\n\t\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\t#endif\n#endif\n'), (Ci.UniformsUtils = { merge: function (e) { for (var t = {}, i = 0; i < e.length; i++) { var n = this.clone(e[i]) for (var r in n) t[r] = n[r] } return t }, clone: function (e) { var t = {} for (var i in e) for (var n in ((t[i] = {}), e[i])) { var r = e[i][n] r instanceof Ci.Color || r instanceof Ci.Vector2 || r instanceof Ci.Vector3 || r instanceof Ci.Vector4 || r instanceof Ci.Matrix3 || r instanceof Ci.Matrix4 || r instanceof Ci.Texture ? (t[i][n] = r.clone()) : Array.isArray(r) ? (t[i][n] = r.slice()) : (t[i][n] = r) } return t } }), (Ci.UniformsLib = { common: { diffuse: { type: 'c', value: new Ci.Color(15658734) }, opacity: { type: 'f', value: 1 }, map: { type: 't', value: null }, offsetRepeat: { type: 'v4', value: new Ci.Vector4(0, 0, 1, 1) }, specularMap: { type: 't', value: null }, alphaMap: { type: 't', value: null }, envMap: { type: 't', value: null }, flipEnvMap: { type: 'f', value: -1 }, reflectivity: { type: 'f', value: 1 }, refractionRatio: { type: 'f', value: 0.98 } }, aomap: { aoMap: { type: 't', value: null }, aoMapIntensity: { type: 'f', value: 1 } }, lightmap: { lightMap: { type: 't', value: null }, lightMapIntensity: { type: 'f', value: 1 } }, emissivemap: { emissiveMap: { type: 't', value: null } }, bumpmap: { bumpMap: { type: 't', value: null }, bumpScale: { type: 'f', value: 1 } }, normalmap: { normalMap: { type: 't', value: null }, normalScale: { type: 'v2', value: new Ci.Vector2(1, 1) } }, displacementmap: { displacementMap: { type: 't', value: null }, displacementScale: { type: 'f', value: 1 }, displacementBias: { type: 'f', value: 0 } }, roughnessmap: { roughnessMap: { type: 't', value: null } }, metalnessmap: { metalnessMap: { type: 't', value: null } }, fog: { fogDensity: { type: 'f', value: 25e-5 }, fogNear: { type: 'f', value: 1 }, fogFar: { type: 'f', value: 2e3 }, fogColor: { type: 'c', value: new Ci.Color(16777215) } }, lights: { ambientLightColor: { type: 'fv', value: [] }, directionalLights: { type: 'sa', value: [], properties: { direction: { type: 'v3' }, color: { type: 'c' }, shadow: { type: 'i' }, shadowBias: { type: 'f' }, shadowRadius: { type: 'f' }, shadowMapSize: { type: 'v2' } } }, directionalShadowMap: { type: 'tv', value: [] }, directionalShadowMatrix: { type: 'm4v', value: [] }, spotLights: { type: 'sa', value: [], properties: { color: { type: 'c' }, position: { type: 'v3' }, direction: { type: 'v3' }, distance: { type: 'f' }, coneCos: { type: 'f' }, penumbraCos: { type: 'f' }, decay: { type: 'f' }, shadow: { type: 'i' }, shadowBias: { type: 'f' }, shadowRadius: { type: 'f' }, shadowMapSize: { type: 'v2' } } }, spotShadowMap: { type: 'tv', value: [] }, spotShadowMatrix: { type: 'm4v', value: [] }, pointLights: { type: 'sa', value: [], properties: { color: { type: 'c' }, position: { type: 'v3' }, decay: { type: 'f' }, distance: { type: 'f' }, shadow: { type: 'i' }, shadowBias: { type: 'f' }, shadowRadius: { type: 'f' }, shadowMapSize: { type: 'v2' } } }, pointShadowMap: { type: 'tv', value: [] }, pointShadowMatrix: { type: 'm4v', value: [] }, hemisphereLights: { type: 'sa', value: [], properties: { direction: { type: 'v3' }, skyColor: { type: 'c' }, groundColor: { type: 'c' } } } }, points: { diffuse: { type: 'c', value: new Ci.Color(15658734) }, opacity: { type: 'f', value: 1 }, size: { type: 'f', value: 1 }, scale: { type: 'f', value: 1 }, map: { type: 't', value: null }, offsetRepeat: { type: 'v4', value: new Ci.Vector4(0, 0, 1, 1) } } }), (Ci.ShaderChunk.cube_frag = 'uniform samplerCube tCube;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include \n#include \nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\t#include \n}\n'), (Ci.ShaderChunk.cube_vert = 'varying vec3 vWorldPosition;\n#include \n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t#include \n}\n'), (Ci.ShaderChunk.depth_frag = 'uniform float mNear;\nuniform float mFar;\nuniform float opacity;\n#include \n#include \nvoid main() {\n\t#include \n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tfloat depth = gl_FragDepthEXT / gl_FragCoord.w;\n\t#else\n\t\tfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n\t#endif\n\tfloat color = 1.0 - smoothstep( mNear, mFar, depth );\n\tgl_FragColor = vec4( vec3( color ), opacity );\n}\n'), (Ci.ShaderChunk.depth_vert = '#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.depthRGBA_frag = '#include \n#include \nvec4 pack_depth( const in float depth ) {\n\tconst vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = mod( depth * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n\tres -= res.xxyz * bit_mask;\n\treturn res;\n}\nvoid main() {\n\t#include \n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragDepthEXT );\n\t#else\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragCoord.z );\n\t#endif\n}\n'), (Ci.ShaderChunk.depthRGBA_vert = '#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.distanceRGBA_frag = 'uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include \nvec4 pack1K ( float depth ) {\n\tdepth /= 1000.0;\n\tconst vec4 bitSh = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bitMsk = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = mod( depth * bitSh * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n\tres -= res.xxyz * bitMsk;\n\treturn res;\n}\nfloat unpack1K ( vec4 color ) {\n\tconst vec4 bitSh = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n\treturn dot( color, bitSh ) * 1000.0;\n}\nvoid main () {\n\tgl_FragColor = pack1K( length( vWorldPosition.xyz - lightPos.xyz ) );\n}\n'), (Ci.ShaderChunk.distanceRGBA_vert = 'varying vec4 vWorldPosition;\n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition;\n}\n'), (Ci.ShaderChunk.equirect_frag = 'uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include \n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n}\n'), (Ci.ShaderChunk.equirect_vert = 'varying vec3 vWorldPosition;\n#include \n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t#include \n}\n'), (Ci.ShaderChunk.linedashed_frag = 'uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \nvoid main() {\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.linedashed_vert = 'uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n}\n'), (Ci.ShaderChunk.meshbasic_frag = 'uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight;\n\treflectedLight.directDiffuse = vec3( 0.0 );\n\treflectedLight.directSpecular = vec3( 0.0 );\n\treflectedLight.indirectDiffuse = diffuseColor.rgb;\n\treflectedLight.indirectSpecular = vec3( 0.0 );\n\t#include \n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.meshbasic_vert = '#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.meshlambert_frag = 'uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.meshlambert_vert = '#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.meshphong_frag = '#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.meshphong_vert = '#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.meshstandard_frag = '#define STANDARD\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\nuniform float envMapIntensity;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.meshstandard_vert = '#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.normal_frag = 'uniform float opacity;\nvarying vec3 vNormal;\n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity );\n\t#include \n}\n'), (Ci.ShaderChunk.normal_vert = 'varying vec3 vNormal;\n#include \n#include \n#include \nvoid main() {\n\tvNormal = normalize( normalMatrix * normal );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.points_frag = 'uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderChunk.points_vert = 'uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include \n\t#include \n\t#include \n}\n'), (Ci.ShaderLib = { basic: { uniforms: Ci.UniformsUtils.merge([Ci.UniformsLib.common, Ci.UniformsLib.aomap, Ci.UniformsLib.fog]), vertexShader: Ci.ShaderChunk.meshbasic_vert, fragmentShader: Ci.ShaderChunk.meshbasic_frag }, lambert: { uniforms: Ci.UniformsUtils.merge([ Ci.UniformsLib.common, Ci.UniformsLib.aomap, Ci.UniformsLib.lightmap, Ci.UniformsLib.emissivemap, Ci.UniformsLib.fog, Ci.UniformsLib.lights, { emissive: { type: 'c', value: new Ci.Color(0) } } ]), vertexShader: Ci.ShaderChunk.meshlambert_vert, fragmentShader: Ci.ShaderChunk.meshlambert_frag }, phong: { uniforms: Ci.UniformsUtils.merge([ Ci.UniformsLib.common, Ci.UniformsLib.aomap, Ci.UniformsLib.lightmap, Ci.UniformsLib.emissivemap, Ci.UniformsLib.bumpmap, Ci.UniformsLib.normalmap, Ci.UniformsLib.displacementmap, Ci.UniformsLib.fog, Ci.UniformsLib.lights, { emissive: { type: 'c', value: new Ci.Color(0) }, specular: { type: 'c', value: new Ci.Color(1118481) }, shininess: { type: 'f', value: 30 } } ]), vertexShader: Ci.ShaderChunk.meshphong_vert, fragmentShader: Ci.ShaderChunk.meshphong_frag }, standard: { uniforms: Ci.UniformsUtils.merge([ Ci.UniformsLib.common, Ci.UniformsLib.aomap, Ci.UniformsLib.lightmap, Ci.UniformsLib.emissivemap, Ci.UniformsLib.bumpmap, Ci.UniformsLib.normalmap, Ci.UniformsLib.displacementmap, Ci.UniformsLib.roughnessmap, Ci.UniformsLib.metalnessmap, Ci.UniformsLib.fog, Ci.UniformsLib.lights, { emissive: { type: 'c', value: new Ci.Color(0) }, roughness: { type: 'f', value: 0.5 }, metalness: { type: 'f', value: 0 }, envMapIntensity: { type: 'f', value: 1 } } ]), vertexShader: Ci.ShaderChunk.meshstandard_vert, fragmentShader: Ci.ShaderChunk.meshstandard_frag }, points: { uniforms: Ci.UniformsUtils.merge([Ci.UniformsLib.points, Ci.UniformsLib.fog]), vertexShader: Ci.ShaderChunk.points_vert, fragmentShader: Ci.ShaderChunk.points_frag }, dashed: { uniforms: Ci.UniformsUtils.merge([ Ci.UniformsLib.common, Ci.UniformsLib.fog, { scale: { type: 'f', value: 1 }, dashSize: { type: 'f', value: 1 }, totalSize: { type: 'f', value: 2 } } ]), vertexShader: Ci.ShaderChunk.linedashed_vert, fragmentShader: Ci.ShaderChunk.linedashed_frag }, depth: { uniforms: { mNear: { type: 'f', value: 1 }, mFar: { type: 'f', value: 2e3 }, opacity: { type: 'f', value: 1 } }, vertexShader: Ci.ShaderChunk.depth_vert, fragmentShader: Ci.ShaderChunk.depth_frag }, normal: { uniforms: { opacity: { type: 'f', value: 1 } }, vertexShader: Ci.ShaderChunk.normal_vert, fragmentShader: Ci.ShaderChunk.normal_frag }, cube: { uniforms: { tCube: { type: 't', value: null }, tFlip: { type: 'f', value: -1 } }, vertexShader: Ci.ShaderChunk.cube_vert, fragmentShader: Ci.ShaderChunk.cube_frag }, equirect: { uniforms: { tEquirect: { type: 't', value: null }, tFlip: { type: 'f', value: -1 } }, vertexShader: Ci.ShaderChunk.equirect_vert, fragmentShader: Ci.ShaderChunk.equirect_frag }, depthRGBA: { uniforms: {}, vertexShader: Ci.ShaderChunk.depthRGBA_vert, fragmentShader: Ci.ShaderChunk.depthRGBA_frag }, distanceRGBA: { uniforms: { lightPos: { type: 'v3', value: new Ci.Vector3(0, 0, 0) } }, vertexShader: Ci.ShaderChunk.distanceRGBA_vert, fragmentShader: Ci.ShaderChunk.distanceRGBA_frag } }), (Ci.WebGLRenderer = function (e) { function S() { return null === Q ? he : 1 } function i(e, t, i, n) { !0 === V && ((e *= n), (t *= n), (i *= n)), _e.clearColor(e, t, i, n) } function t() { _e.init(), _e.scissor(ie.copy(ue).multiplyScalar(he)), _e.viewport(re.copy(pe).multiplyScalar(he)), i(ae.r, ae.g, ae.b, se) } function n() { ;(te = K = null), (ee = ''), ($ = -1), _e.reset() } function r(e) { e.preventDefault(), n(), t(), be.clear() } function f(e) { var t = e.target t.removeEventListener('dispose', f), (function (e) { var t = be.get(e) if (e.image && t.__image__webglTextureCube) X.deleteTexture(t.__image__webglTextureCube) else { if (void 0 === t.__webglInit) return X.deleteTexture(t.__webglTexture) } be.delete(e) })(t), ye.textures-- } function a(e) { var t = e.target t.removeEventListener('dispose', a), (function (e) { var t = be.get(e), i = be.get(e.texture) if (e && void 0 !== i.__webglTexture) { if ((X.deleteTexture(i.__webglTexture), e instanceof Ci.WebGLRenderTargetCube)) for (var n = 0; n < 6; n++) X.deleteFramebuffer(t.__webglFramebuffer[n]), X.deleteRenderbuffer(t.__webglDepthbuffer[n]) else X.deleteFramebuffer(t.__webglFramebuffer), X.deleteRenderbuffer(t.__webglDepthbuffer) be.delete(e.texture), be.delete(e) } })(t), ye.textures-- } function v(e) { var t = e.target t.removeEventListener('dispose', v), (function (e) { y(e), be.delete(e) })(t) } function y(e) { var t = be.get(e).program ;(e.program = void 0) !== t && Te.releaseProgram(t) } function M(e, t) { return Math.abs(t[0]) - Math.abs(e[0]) } function s(e, t) { return e.object.renderOrder !== t.object.renderOrder ? e.object.renderOrder - t.object.renderOrder : e.material.id !== t.material.id ? e.material.id - t.material.id : e.z !== t.z ? e.z - t.z : e.id - t.id } function l(e, t) { return e.object.renderOrder !== t.object.renderOrder ? e.object.renderOrder - t.object.renderOrder : e.z !== t.z ? t.z - e.z : e.id - t.id } function d(e, t, i, n, r) { var o, a a = i.transparent ? ((o = G), ++W) : ((o = H), ++z) var s = o[a] void 0 !== s ? ((s.id = e.id), (s.object = e), (s.geometry = t), (s.material = i), (s.z = me.z), (s.group = r)) : ((s = { id: e.id, object: e, geometry: t, material: i, z: me.z, group: r }), o.push(s)) } function c(e, t, i, n) { for (var r = 0, o = e.length; r < o; r++) { var a = e[r], s = a.object, l = a.geometry, c = void 0 === n ? a.material : n, h = a.group if ((s.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, s.matrixWorld), s.normalMatrix.getNormalMatrix(s.modelViewMatrix), s instanceof Ci.ImmediateRenderObject)) { R(c) var u = P(t, i, c, s) ;(ee = ''), s.render(function (e) { Z.renderBufferImmediate(e, u, c) }) } else Z.renderBufferDirect(t, i, l, c, s, h) } } function R(e) { ;(function (e) { e.side !== Ci.DoubleSide ? _e.enable(X.CULL_FACE) : _e.disable(X.CULL_FACE), _e.setFlipSided(e.side === Ci.BackSide) })(e), !0 === e.transparent ? _e.setBlending(e.blending, e.blendEquation, e.blendSrc, e.blendDst, e.blendEquationAlpha, e.blendSrcAlpha, e.blendDstAlpha, e.premultipliedAlpha) : _e.setBlending(Ci.NoBlending), _e.setDepthFunc(e.depthFunc), _e.setDepthTest(e.depthTest), _e.setDepthWrite(e.depthWrite), _e.setColorWrite(e.colorWrite), _e.setPolygonOffset(e.polygonOffset, e.polygonOffsetFactor, e.polygonOffsetUnits) } function P(e, t, i, n) { oe = 0 var r = be.get(i) void 0 === r.program && (i.needsUpdate = !0), void 0 !== r.lightsHash && r.lightsHash !== ve.hash && (i.needsUpdate = !0), i.needsUpdate && ((function (e, t, i) { var n = be.get(e), r = Te.getParameters(e, ve, t, i), o = Te.getProgramCode(e, r), a = n.program, s = !0 if (void 0 === a) e.addEventListener('dispose', v) else if (a.code !== o) y(e) else { if (void 0 !== r.shaderID) return s = !1 } if (s) { if (r.shaderID) { var l = Ci.ShaderLib[r.shaderID] n.__webglShader = { name: e.type, uniforms: Ci.UniformsUtils.clone(l.uniforms), vertexShader: l.vertexShader, fragmentShader: l.fragmentShader } } else n.__webglShader = { name: e.type, uniforms: e.uniforms, vertexShader: e.vertexShader, fragmentShader: e.fragmentShader } ;(e.__webglShader = n.__webglShader), (a = Te.acquireProgram(e, r, o)), (n.program = a), (e.program = a) } var c = a.getAttributes() if (e.morphTargets) for (var h = (e.numSupportedMorphTargets = 0); h < Z.maxMorphTargets; h++) 0 <= c['morphTarget' + h] && e.numSupportedMorphTargets++ if (e.morphNormals) for (h = e.numSupportedMorphNormals = 0; h < Z.maxMorphNormals; h++) 0 <= c['morphNormal' + h] && e.numSupportedMorphNormals++ n.uniformsList = [] var u = n.__webglShader.uniforms, d = n.program.getUniforms() for (var p in u) { var f = d[p] f && n.uniformsList.push([n.__webglShader.uniforms[p], f]) } ;(e instanceof Ci.MeshPhongMaterial || e instanceof Ci.MeshLambertMaterial || e instanceof Ci.MeshStandardMaterial || e.lights) && ((n.lightsHash = ve.hash), (u.ambientLightColor.value = ve.ambient), (u.directionalLights.value = ve.directional), (u.spotLights.value = ve.spot), (u.pointLights.value = ve.point), (u.hemisphereLights.value = ve.hemi), (u.directionalShadowMap.value = ve.directionalShadowMap), (u.directionalShadowMatrix.value = ve.directionalShadowMatrix), (u.spotShadowMap.value = ve.spotShadowMap), (u.spotShadowMatrix.value = ve.spotShadowMatrix), (u.pointShadowMap.value = ve.pointShadowMap), (u.pointShadowMatrix.value = ve.pointShadowMatrix)), (n.hasDynamicUniforms = !1) for (var g = 0, m = n.uniformsList.length; g < m; g++) { if (!0 === n.uniformsList[g][0].dynamic) { n.hasDynamicUniforms = !0 break } } })(i, t, n), (i.needsUpdate = !1)) var o = !1, a = !1, s = !1, l = r.program, c = l.getUniforms(), h = r.__webglShader.uniforms if ( (l.id !== K && (X.useProgram(l.program), (K = l.id), (s = a = o = !0)), i.id !== $ && (($ = i.id), (a = !0)), (!o && e === te) || (X.uniformMatrix4fv(c.projectionMatrix, !1, e.projectionMatrix.elements), Ee.logarithmicDepthBuffer && X.uniform1f(c.logDepthBufFC, 2 / (Math.log(e.far + 1) / Math.LN2)), e !== te && ((te = e), (s = a = !0)), (i instanceof Ci.ShaderMaterial || i instanceof Ci.MeshPhongMaterial || i instanceof Ci.MeshStandardMaterial || i.envMap) && void 0 !== c.cameraPosition && (me.setFromMatrixPosition(e.matrixWorld), X.uniform3f(c.cameraPosition, me.x, me.y, me.z)), (i instanceof Ci.MeshPhongMaterial || i instanceof Ci.MeshLambertMaterial || i instanceof Ci.MeshBasicMaterial || i instanceof Ci.MeshStandardMaterial || i instanceof Ci.ShaderMaterial || i.skinning) && void 0 !== c.viewMatrix && X.uniformMatrix4fv(c.viewMatrix, !1, e.matrixWorldInverse.elements), void 0 !== c.toneMappingExposure && X.uniform1f(c.toneMappingExposure, Z.toneMappingExposure), void 0 !== c.toneMappingWhitePoint && X.uniform1f(c.toneMappingWhitePoint, Z.toneMappingWhitePoint)), i.skinning) ) if ( (n.bindMatrix && void 0 !== c.bindMatrix && X.uniformMatrix4fv(c.bindMatrix, !1, n.bindMatrix.elements), n.bindMatrixInverse && void 0 !== c.bindMatrixInverse && X.uniformMatrix4fv(c.bindMatrixInverse, !1, n.bindMatrixInverse.elements), Ee.floatVertexTextures && n.skeleton && n.skeleton.useVertexTexture) ) { if (void 0 !== c.boneTexture) { var u = A() X.uniform1i(c.boneTexture, u), Z.setTexture(n.skeleton.boneTexture, u) } void 0 !== c.boneTextureWidth && X.uniform1i(c.boneTextureWidth, n.skeleton.boneTextureWidth), void 0 !== c.boneTextureHeight && X.uniform1i(c.boneTextureHeight, n.skeleton.boneTextureHeight) } else n.skeleton && n.skeleton.boneMatrices && void 0 !== c.boneGlobalMatrices && X.uniformMatrix4fv(c.boneGlobalMatrices, !1, n.skeleton.boneMatrices) return ( a && ((i instanceof Ci.MeshPhongMaterial || i instanceof Ci.MeshLambertMaterial || i instanceof Ci.MeshStandardMaterial || i.lights) && (function (e, t) { ;(e.ambientLightColor.needsUpdate = t), (e.directionalLights.needsUpdate = t), (e.pointLights.needsUpdate = t), (e.spotLights.needsUpdate = t), (e.hemisphereLights.needsUpdate = t) })(h, s), t && i.fog && (function (e, t) { ;(e.fogColor.value = t.color), t instanceof Ci.Fog ? ((e.fogNear.value = t.near), (e.fogFar.value = t.far)) : t instanceof Ci.FogExp2 && (e.fogDensity.value = t.density) })(h, t), (i instanceof Ci.MeshBasicMaterial || i instanceof Ci.MeshLambertMaterial || i instanceof Ci.MeshPhongMaterial || i instanceof Ci.MeshStandardMaterial) && (function (e, t) { var i if ( ((e.opacity.value = t.opacity), (e.diffuse.value = t.color), t.emissive && e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity), (e.map.value = t.map), (e.specularMap.value = t.specularMap), (e.alphaMap.value = t.alphaMap), t.aoMap && ((e.aoMap.value = t.aoMap), (e.aoMapIntensity.value = t.aoMapIntensity)), t.map ? (i = t.map) : t.specularMap ? (i = t.specularMap) : t.displacementMap ? (i = t.displacementMap) : t.normalMap ? (i = t.normalMap) : t.bumpMap ? (i = t.bumpMap) : t.roughnessMap ? (i = t.roughnessMap) : t.metalnessMap ? (i = t.metalnessMap) : t.alphaMap ? (i = t.alphaMap) : t.emissiveMap && (i = t.emissiveMap), void 0 !== i) ) { i instanceof Ci.WebGLRenderTarget && (i = i.texture) var n = i.offset, r = i.repeat e.offsetRepeat.value.set(n.x, n.y, r.x, r.y) } ;(e.envMap.value = t.envMap), (e.flipEnvMap.value = t.envMap instanceof Ci.WebGLRenderTargetCube ? 1 : -1), (e.reflectivity.value = t.reflectivity), (e.refractionRatio.value = t.refractionRatio) })(h, i), i instanceof Ci.LineBasicMaterial ? p(h, i) : i instanceof Ci.LineDashedMaterial ? (p(h, i), (function (e, t) { ;(e.dashSize.value = t.dashSize), (e.totalSize.value = t.dashSize + t.gapSize), (e.scale.value = t.scale) })(h, i)) : i instanceof Ci.PointsMaterial ? (function (e, t) { if (((e.diffuse.value = t.color), (e.opacity.value = t.opacity), (e.size.value = t.size * he), (e.scale.value = O.clientHeight / 2), (e.map.value = t.map), null !== t.map)) { var i = t.map.offset, n = t.map.repeat e.offsetRepeat.value.set(i.x, i.y, n.x, n.y) } })(h, i) : i instanceof Ci.MeshLambertMaterial ? (function (e, t) { t.lightMap && ((e.lightMap.value = t.lightMap), (e.lightMapIntensity.value = t.lightMapIntensity)), t.emissiveMap && (e.emissiveMap.value = t.emissiveMap) })(h, i) : i instanceof Ci.MeshPhongMaterial ? (function (e, t) { ;(e.specular.value = t.specular), (e.shininess.value = Math.max(t.shininess, 1e-4)), t.lightMap && ((e.lightMap.value = t.lightMap), (e.lightMapIntensity.value = t.lightMapIntensity)), t.emissiveMap && (e.emissiveMap.value = t.emissiveMap), t.bumpMap && ((e.bumpMap.value = t.bumpMap), (e.bumpScale.value = t.bumpScale)), t.normalMap && ((e.normalMap.value = t.normalMap), e.normalScale.value.copy(t.normalScale)), t.displacementMap && ((e.displacementMap.value = t.displacementMap), (e.displacementScale.value = t.displacementScale), (e.displacementBias.value = t.displacementBias)) })(h, i) : i instanceof Ci.MeshStandardMaterial ? (function (e, t) { ;(e.roughness.value = t.roughness), (e.metalness.value = t.metalness), t.roughnessMap && (e.roughnessMap.value = t.roughnessMap), t.metalnessMap && (e.metalnessMap.value = t.metalnessMap), t.lightMap && ((e.lightMap.value = t.lightMap), (e.lightMapIntensity.value = t.lightMapIntensity)), t.emissiveMap && (e.emissiveMap.value = t.emissiveMap), t.bumpMap && ((e.bumpMap.value = t.bumpMap), (e.bumpScale.value = t.bumpScale)), t.normalMap && ((e.normalMap.value = t.normalMap), e.normalScale.value.copy(t.normalScale)), t.displacementMap && ((e.displacementMap.value = t.displacementMap), (e.displacementScale.value = t.displacementScale), (e.displacementBias.value = t.displacementBias)), t.envMap && (e.envMapIntensity.value = t.envMapIntensity) })(h, i) : i instanceof Ci.MeshDepthMaterial ? ((h.mNear.value = e.near), (h.mFar.value = e.far), (h.opacity.value = i.opacity)) : i instanceof Ci.MeshNormalMaterial && (h.opacity.value = i.opacity), g(r.uniformsList)), (function (e, t) { X.uniformMatrix4fv(e.modelViewMatrix, !1, t.modelViewMatrix.elements), e.normalMatrix && X.uniformMatrix3fv(e.normalMatrix, !1, t.normalMatrix.elements) })(c, n), void 0 !== c.modelMatrix && X.uniformMatrix4fv(c.modelMatrix, !1, n.matrixWorld.elements), !0 === r.hasDynamicUniforms && (function (e, t, i) { for (var n = [], r = 0, o = e.length; r < o; r++) { var a = e[r][0], s = a.onUpdateCallback void 0 !== s && (s.bind(a)(t, i), n.push(e[r])) } g(n) })(r.uniformsList, n, e), l ) } function p(e, t) { ;(e.diffuse.value = t.color), (e.opacity.value = t.opacity) } function A() { var e = oe return e >= Ee.maxTextures && console.warn('WebGLRenderer: trying to use ' + e + ' texture units while this GPU supports only ' + Ee.maxTextures), (oe += 1), e } function C(e, t, i, n) { var r, o if ('1i' === t) X.uniform1i(i, n) else if ('1f' === t) X.uniform1f(i, n) else if ('2f' === t) X.uniform2f(i, n[0], n[1]) else if ('3f' === t) X.uniform3f(i, n[0], n[1], n[2]) else if ('4f' === t) X.uniform4f(i, n[0], n[1], n[2], n[3]) else if ('1iv' === t) X.uniform1iv(i, n) else if ('3iv' === t) X.uniform3iv(i, n) else if ('1fv' === t) X.uniform1fv(i, n) else if ('2fv' === t) X.uniform2fv(i, n) else if ('3fv' === t) X.uniform3fv(i, n) else if ('4fv' === t) X.uniform4fv(i, n) else if ('Matrix2fv' === t) X.uniformMatrix2fv(i, !1, n) else if ('Matrix3fv' === t) X.uniformMatrix3fv(i, !1, n) else if ('Matrix4fv' === t) X.uniformMatrix4fv(i, !1, n) else if ('i' === t) X.uniform1i(i, n) else if ('f' === t) X.uniform1f(i, n) else if ('v2' === t) X.uniform2f(i, n.x, n.y) else if ('v3' === t) X.uniform3f(i, n.x, n.y, n.z) else if ('v4' === t) X.uniform4f(i, n.x, n.y, n.z, n.w) else if ('c' === t) X.uniform3f(i, n.r, n.g, n.b) else if ('s' === t) { var a = e.properties for (var s in a) { var l = a[s], c = i[s], h = n[s] C(l, l.type, c, h) } } else if ('sa' === t) { a = e.properties for (var u = 0, d = n.length; u < d; u++) for (var s in a) { ;(l = a[s]), (c = i[u][s]), (h = n[u][s]) C(l, l.type, c, h) } } else if ('iv1' === t) X.uniform1iv(i, n) else if ('iv' === t) X.uniform3iv(i, n) else if ('fv1' === t) X.uniform1fv(i, n) else if ('fv' === t) X.uniform3fv(i, n) else if ('v2v' === t) { void 0 === e._array && (e._array = new Float32Array(2 * n.length)) u = 0 for (var p = 0, f = n.length; u < f; u++, p += 2) (e._array[p + 0] = n[u].x), (e._array[p + 1] = n[u].y) X.uniform2fv(i, e._array) } else if ('v3v' === t) { void 0 === e._array && (e._array = new Float32Array(3 * n.length)) u = 0 var g = 0 for (f = n.length; u < f; u++, g += 3) (e._array[g + 0] = n[u].x), (e._array[g + 1] = n[u].y), (e._array[g + 2] = n[u].z) X.uniform3fv(i, e._array) } else if ('v4v' === t) { void 0 === e._array && (e._array = new Float32Array(4 * n.length)) u = 0 var m = 0 for (f = n.length; u < f; u++, m += 4) (e._array[m + 0] = n[u].x), (e._array[m + 1] = n[u].y), (e._array[m + 2] = n[u].z), (e._array[m + 3] = n[u].w) X.uniform4fv(i, e._array) } else if ('m2' === t) X.uniformMatrix2fv(i, !1, n.elements) else if ('m3' === t) X.uniformMatrix3fv(i, !1, n.elements) else if ('m3v' === t) { void 0 === e._array && (e._array = new Float32Array(9 * n.length)) for (u = 0, f = n.length; u < f; u++) n[u].flattenToArrayOffset(e._array, 9 * u) X.uniformMatrix3fv(i, !1, e._array) } else if ('m4' === t) X.uniformMatrix4fv(i, !1, n.elements) else if ('m4v' === t) { void 0 === e._array && (e._array = new Float32Array(16 * n.length)) for (u = 0, f = n.length; u < f; u++) n[u].flattenToArrayOffset(e._array, 16 * u) X.uniformMatrix4fv(i, !1, e._array) } else if ('t' === t) { if (((r = n), (o = A()), X.uniform1i(i, o), !r)) return r instanceof Ci.CubeTexture || (Array.isArray(r.image) && 6 === r.image.length) ? _(r, o) : r instanceof Ci.WebGLRenderTargetCube ? b(r.texture, o) : r instanceof Ci.WebGLRenderTarget ? Z.setTexture(r.texture, o) : Z.setTexture(r, o) } else if ('tv' === t) { void 0 === e._array && (e._array = []) for (u = 0, f = e.value.length; u < f; u++) e._array[u] = A() X.uniform1iv(i, e._array) for (u = 0, f = e.value.length; u < f; u++) (r = e.value[u]), (o = e._array[u]), r && (r instanceof Ci.CubeTexture || (r.image instanceof Array && 6 === r.image.length) ? _(r, o) : r instanceof Ci.WebGLRenderTarget ? Z.setTexture(r.texture, o) : r instanceof Ci.WebGLRenderTargetCube ? b(r.texture, o) : Z.setTexture(r, o)) } else console.warn('THREE.WebGLRenderer: Unknown uniform type: ' + t) } function g(e) { for (var t = 0, i = e.length; t < i; t++) { var n = e[t][0] if (!1 !== n.needsUpdate) C(n, n.type, e[t][1], n.value) } } function m(e, t, i) { var n if ( (i ? (X.texParameteri(e, X.TEXTURE_WRAP_S, x(t.wrapS)), X.texParameteri(e, X.TEXTURE_WRAP_T, x(t.wrapT)), X.texParameteri(e, X.TEXTURE_MAG_FILTER, x(t.magFilter)), X.texParameteri(e, X.TEXTURE_MIN_FILTER, x(t.minFilter))) : (X.texParameteri(e, X.TEXTURE_WRAP_S, X.CLAMP_TO_EDGE), X.texParameteri(e, X.TEXTURE_WRAP_T, X.CLAMP_TO_EDGE), (t.wrapS === Ci.ClampToEdgeWrapping && t.wrapT === Ci.ClampToEdgeWrapping) || console.warn('THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.', t), X.texParameteri(e, X.TEXTURE_MAG_FILTER, T(t.magFilter)), X.texParameteri(e, X.TEXTURE_MIN_FILTER, T(t.minFilter)), t.minFilter !== Ci.NearestFilter && t.minFilter !== Ci.LinearFilter && console.warn('THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.', t)), (n = Ie.get('EXT_texture_filter_anisotropic'))) ) { if (t.type === Ci.FloatType && null === Ie.get('OES_texture_float_linear')) return if (t.type === Ci.HalfFloatType && null === Ie.get('OES_texture_half_float_linear')) return ;(1 < t.anisotropy || be.get(t).__currentAnisotropy) && (X.texParameterf(e, n.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(t.anisotropy, Z.getMaxAnisotropy())), (be.get(t).__currentAnisotropy = t.anisotropy)) } } function o(e, t, i) { void 0 === e.__webglInit && ((e.__webglInit = !0), t.addEventListener('dispose', f), (e.__webglTexture = X.createTexture()), ye.textures++), _e.activeTexture(X.TEXTURE0 + i), _e.bindTexture(X.TEXTURE_2D, e.__webglTexture), X.pixelStorei(X.UNPACK_FLIP_Y_WEBGL, t.flipY), X.pixelStorei(X.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.premultiplyAlpha), X.pixelStorei(X.UNPACK_ALIGNMENT, t.unpackAlignment) var n = I(t.image, Ee.maxTextureSize) !(function (e) { return e.wrapS !== Ci.ClampToEdgeWrapping || e.wrapT !== Ci.ClampToEdgeWrapping || (e.minFilter !== Ci.NearestFilter && e.minFilter !== Ci.LinearFilter) })(t) || !1 !== E(n) || (n = (function (e) { if (e instanceof HTMLImageElement || e instanceof HTMLCanvasElement) { var t = document.createElement('canvas') return ( (t.width = Ci.Math.nearestPowerOfTwo(e.width)), (t.height = Ci.Math.nearestPowerOfTwo(e.height)), t.getContext('2d').drawImage(e, 0, 0, t.width, t.height), console.warn('THREE.WebGLRenderer: image is not power of two (' + e.width + 'x' + e.height + '). Resized to ' + t.width + 'x' + t.height, e), t ) } return e })(n)) var r = E(n), o = x(t.format), a = x(t.type) m(X.TEXTURE_2D, t, r) var s, l = t.mipmaps if (t instanceof Ci.DataTexture) if (0 < l.length && r) { for (var c = 0, h = l.length; c < h; c++) (s = l[c]), _e.texImage2D(X.TEXTURE_2D, c, o, s.width, s.height, 0, o, a, s.data) t.generateMipmaps = !1 } else _e.texImage2D(X.TEXTURE_2D, 0, o, n.width, n.height, 0, o, a, n.data) else if (t instanceof Ci.CompressedTexture) for (c = 0, h = l.length; c < h; c++) (s = l[c]), t.format !== Ci.RGBAFormat && t.format !== Ci.RGBFormat ? -1 < _e.getCompressedTextureFormats().indexOf(o) ? _e.compressedTexImage2D(X.TEXTURE_2D, c, o, s.width, s.height, 0, s.data) : console.warn('THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()') : _e.texImage2D(X.TEXTURE_2D, c, o, s.width, s.height, 0, o, a, s.data) else if (0 < l.length && r) { for (c = 0, h = l.length; c < h; c++) (s = l[c]), _e.texImage2D(X.TEXTURE_2D, c, o, o, a, s) t.generateMipmaps = !1 } else _e.texImage2D(X.TEXTURE_2D, 0, o, o, a, n) t.generateMipmaps && r && X.generateMipmap(X.TEXTURE_2D), (e.__version = t.version), t.onUpdate && t.onUpdate(t) } function I(e, t) { if (e.width > t || e.height > t) { var i = t / Math.max(e.width, e.height), n = document.createElement('canvas') return ( (n.width = Math.floor(e.width * i)), (n.height = Math.floor(e.height * i)), n.getContext('2d').drawImage(e, 0, 0, e.width, e.height, 0, 0, n.width, n.height), console.warn('THREE.WebGLRenderer: image is too big (' + e.width + 'x' + e.height + '). Resized to ' + n.width + 'x' + n.height, e), n ) } return e } function E(e) { return Ci.Math.isPowerOfTwo(e.width) && Ci.Math.isPowerOfTwo(e.height) } function _(e, t) { var i = be.get(e) if (6 === e.image.length) if (0 < e.version && i.__version !== e.version) { i.__image__webglTextureCube || (e.addEventListener('dispose', f), (i.__image__webglTextureCube = X.createTexture()), ye.textures++), _e.activeTexture(X.TEXTURE0 + t), _e.bindTexture(X.TEXTURE_CUBE_MAP, i.__image__webglTextureCube), X.pixelStorei(X.UNPACK_FLIP_Y_WEBGL, e.flipY) for (var n = e instanceof Ci.CompressedTexture, r = e.image[0] instanceof Ci.DataTexture, o = [], a = 0; a < 6; a++) !Z.autoScaleCubemaps || n || r ? (o[a] = r ? e.image[a].image : e.image[a]) : (o[a] = I(e.image[a], Ee.maxCubemapSize)) var s = E(o[0]), l = x(e.format), c = x(e.type) m(X.TEXTURE_CUBE_MAP, e, s) for (a = 0; a < 6; a++) if (n) for (var h, u = o[a].mipmaps, d = 0, p = u.length; d < p; d++) (h = u[d]), e.format !== Ci.RGBAFormat && e.format !== Ci.RGBFormat ? -1 < _e.getCompressedTextureFormats().indexOf(l) ? _e.compressedTexImage2D(X.TEXTURE_CUBE_MAP_POSITIVE_X + a, d, l, h.width, h.height, 0, h.data) : console.warn('THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()') : _e.texImage2D(X.TEXTURE_CUBE_MAP_POSITIVE_X + a, d, l, h.width, h.height, 0, l, c, h.data) else r ? _e.texImage2D(X.TEXTURE_CUBE_MAP_POSITIVE_X + a, 0, l, o[a].width, o[a].height, 0, l, c, o[a].data) : _e.texImage2D(X.TEXTURE_CUBE_MAP_POSITIVE_X + a, 0, l, l, c, o[a]) e.generateMipmaps && s && X.generateMipmap(X.TEXTURE_CUBE_MAP), (i.__version = e.version), e.onUpdate && e.onUpdate(e) } else _e.activeTexture(X.TEXTURE0 + t), _e.bindTexture(X.TEXTURE_CUBE_MAP, i.__image__webglTextureCube) } function b(e, t) { _e.activeTexture(X.TEXTURE0 + t), _e.bindTexture(X.TEXTURE_CUBE_MAP, be.get(e).__webglTexture) } function h(e, t, i, n) { var r = x(t.texture.format), o = x(t.texture.type) _e.texImage2D(n, 0, r, t.width, t.height, 0, r, o, null), X.bindFramebuffer(X.FRAMEBUFFER, e), X.framebufferTexture2D(X.FRAMEBUFFER, i, n, be.get(t.texture).__webglTexture, 0), X.bindFramebuffer(X.FRAMEBUFFER, null) } function u(e, t) { X.bindRenderbuffer(X.RENDERBUFFER, e), t.depthBuffer && !t.stencilBuffer ? (X.renderbufferStorage(X.RENDERBUFFER, X.DEPTH_COMPONENT16, t.width, t.height), X.framebufferRenderbuffer(X.FRAMEBUFFER, X.DEPTH_ATTACHMENT, X.RENDERBUFFER, e)) : t.depthBuffer && t.stencilBuffer ? (X.renderbufferStorage(X.RENDERBUFFER, X.DEPTH_STENCIL, t.width, t.height), X.framebufferRenderbuffer(X.FRAMEBUFFER, X.DEPTH_STENCIL_ATTACHMENT, X.RENDERBUFFER, e)) : X.renderbufferStorage(X.RENDERBUFFER, X.RGBA4, t.width, t.height), X.bindRenderbuffer(X.RENDERBUFFER, null) } function w(e) { var t = be.get(e), i = be.get(e.texture) e.addEventListener('dispose', a), (i.__webglTexture = X.createTexture()), ye.textures++ var n = e instanceof Ci.WebGLRenderTargetCube, r = Ci.Math.isPowerOfTwo(e.width) && Ci.Math.isPowerOfTwo(e.height) if (n) { t.__webglFramebuffer = [] for (var o = 0; o < 6; o++) t.__webglFramebuffer[o] = X.createFramebuffer() } else t.__webglFramebuffer = X.createFramebuffer() if (n) { _e.bindTexture(X.TEXTURE_CUBE_MAP, i.__webglTexture), m(X.TEXTURE_CUBE_MAP, e.texture, r) for (o = 0; o < 6; o++) h(t.__webglFramebuffer[o], e, X.COLOR_ATTACHMENT0, X.TEXTURE_CUBE_MAP_POSITIVE_X + o) e.texture.generateMipmaps && r && X.generateMipmap(X.TEXTURE_CUBE_MAP), _e.bindTexture(X.TEXTURE_CUBE_MAP, null) } else _e.bindTexture(X.TEXTURE_2D, i.__webglTexture), m(X.TEXTURE_2D, e.texture, r), h(t.__webglFramebuffer, e, X.COLOR_ATTACHMENT0, X.TEXTURE_2D), e.texture.generateMipmaps && r && X.generateMipmap(X.TEXTURE_2D), _e.bindTexture(X.TEXTURE_2D, null) e.depthBuffer && (function (e) { var t = be.get(e) if (e instanceof Ci.WebGLRenderTargetCube) { t.__webglDepthbuffer = [] for (var i = 0; i < 6; i++) X.bindFramebuffer(X.FRAMEBUFFER, t.__webglFramebuffer[i]), (t.__webglDepthbuffer[i] = X.createRenderbuffer()), u(t.__webglDepthbuffer[i], e) } else X.bindFramebuffer(X.FRAMEBUFFER, t.__webglFramebuffer), (t.__webglDepthbuffer = X.createRenderbuffer()), u(t.__webglDepthbuffer, e) X.bindFramebuffer(X.FRAMEBUFFER, null) })(e) } function T(e) { return e === Ci.NearestFilter || e === Ci.NearestMipMapNearestFilter || e === Ci.NearestMipMapLinearFilter ? X.NEAREST : X.LINEAR } function x(e) { var t if (e === Ci.RepeatWrapping) return X.REPEAT if (e === Ci.ClampToEdgeWrapping) return X.CLAMP_TO_EDGE if (e === Ci.MirroredRepeatWrapping) return X.MIRRORED_REPEAT if (e === Ci.NearestFilter) return X.NEAREST if (e === Ci.NearestMipMapNearestFilter) return X.NEAREST_MIPMAP_NEAREST if (e === Ci.NearestMipMapLinearFilter) return X.NEAREST_MIPMAP_LINEAR if (e === Ci.LinearFilter) return X.LINEAR if (e === Ci.LinearMipMapNearestFilter) return X.LINEAR_MIPMAP_NEAREST if (e === Ci.LinearMipMapLinearFilter) return X.LINEAR_MIPMAP_LINEAR if (e === Ci.UnsignedByteType) return X.UNSIGNED_BYTE if (e === Ci.UnsignedShort4444Type) return X.UNSIGNED_SHORT_4_4_4_4 if (e === Ci.UnsignedShort5551Type) return X.UNSIGNED_SHORT_5_5_5_1 if (e === Ci.UnsignedShort565Type) return X.UNSIGNED_SHORT_5_6_5 if (e === Ci.ByteType) return X.BYTE if (e === Ci.ShortType) return X.SHORT if (e === Ci.UnsignedShortType) return X.UNSIGNED_SHORT if (e === Ci.IntType) return X.INT if (e === Ci.UnsignedIntType) return X.UNSIGNED_INT if (e === Ci.FloatType) return X.FLOAT if (null !== (t = Ie.get('OES_texture_half_float')) && e === Ci.HalfFloatType) return t.HALF_FLOAT_OES if (e === Ci.AlphaFormat) return X.ALPHA if (e === Ci.RGBFormat) return X.RGB if (e === Ci.RGBAFormat) return X.RGBA if (e === Ci.LuminanceFormat) return X.LUMINANCE if (e === Ci.LuminanceAlphaFormat) return X.LUMINANCE_ALPHA if (e === Ci.AddEquation) return X.FUNC_ADD if (e === Ci.SubtractEquation) return X.FUNC_SUBTRACT if (e === Ci.ReverseSubtractEquation) return X.FUNC_REVERSE_SUBTRACT if (e === Ci.ZeroFactor) return X.ZERO if (e === Ci.OneFactor) return X.ONE if (e === Ci.SrcColorFactor) return X.SRC_COLOR if (e === Ci.OneMinusSrcColorFactor) return X.ONE_MINUS_SRC_COLOR if (e === Ci.SrcAlphaFactor) return X.SRC_ALPHA if (e === Ci.OneMinusSrcAlphaFactor) return X.ONE_MINUS_SRC_ALPHA if (e === Ci.DstAlphaFactor) return X.DST_ALPHA if (e === Ci.OneMinusDstAlphaFactor) return X.ONE_MINUS_DST_ALPHA if (e === Ci.DstColorFactor) return X.DST_COLOR if (e === Ci.OneMinusDstColorFactor) return X.ONE_MINUS_DST_COLOR if (e === Ci.SrcAlphaSaturateFactor) return X.SRC_ALPHA_SATURATE if (null !== (t = Ie.get('WEBGL_compressed_texture_s3tc'))) { if (e === Ci.RGB_S3TC_DXT1_Format) return t.COMPRESSED_RGB_S3TC_DXT1_EXT if (e === Ci.RGBA_S3TC_DXT1_Format) return t.COMPRESSED_RGBA_S3TC_DXT1_EXT if (e === Ci.RGBA_S3TC_DXT3_Format) return t.COMPRESSED_RGBA_S3TC_DXT3_EXT if (e === Ci.RGBA_S3TC_DXT5_Format) return t.COMPRESSED_RGBA_S3TC_DXT5_EXT } if (null !== (t = Ie.get('WEBGL_compressed_texture_pvrtc'))) { if (e === Ci.RGB_PVRTC_4BPPV1_Format) return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG if (e === Ci.RGB_PVRTC_2BPPV1_Format) return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG if (e === Ci.RGBA_PVRTC_4BPPV1_Format) return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG if (e === Ci.RGBA_PVRTC_2BPPV1_Format) return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG } if (null !== (t = Ie.get('WEBGL_compressed_texture_etc1')) && e === Ci.RGB_ETC1_Format) return t.COMPRESSED_RGB_ETC1_WEBGL if (null !== (t = Ie.get('EXT_blend_minmax'))) { if (e === Ci.MinEquation) return t.MIN_EXT if (e === Ci.MaxEquation) return t.MAX_EXT } return 0 } console.log('THREE.WebGLRenderer', Ci.REVISION) var O = void 0 !== (e = e || {}).canvas ? e.canvas : document.createElement('canvas'), L = void 0 !== e.context ? e.context : null, D = void 0 !== e.alpha && e.alpha, N = void 0 === e.depth || e.depth, F = void 0 === e.stencil || e.stencil, B = void 0 !== e.antialias && e.antialias, V = void 0 === e.premultipliedAlpha || e.premultipliedAlpha, k = void 0 !== e.preserveDrawingBuffer && e.preserveDrawingBuffer, U = [], H = [], z = -1, G = [], W = -1, j = new Float32Array(8), Y = [], q = [] ;(this.domElement = O), (this.context = null), (this.autoClear = !0), (this.autoClearColor = !0), (this.autoClearDepth = !0), (this.autoClearStencil = !0), (this.sortObjects = !0), (this.gammaFactor = 2), (this.gammaInput = !1), (this.gammaOutput = !1), (this.physicallyCorrectLights = !1), (this.toneMapping = Ci.LinearToneMapping), (this.toneMappingExposure = 1), (this.toneMappingWhitePoint = 1), (this.maxMorphTargets = 8), (this.maxMorphNormals = 4), (this.autoScaleCubemaps = !0) var X, Z = this, K = null, Q = null, J = null, $ = -1, ee = '', te = null, ie = new Ci.Vector4(), ne = null, re = new Ci.Vector4(), oe = 0, ae = new Ci.Color(0), se = 0, le = O.width, ce = O.height, he = 1, ue = new Ci.Vector4(0, 0, le, ce), de = !1, pe = new Ci.Vector4(0, 0, le, ce), fe = new Ci.Frustum(), ge = new Ci.Matrix4(), me = new Ci.Vector3(), ve = { hash: '', ambient: [0, 0, 0], directional: [], directionalShadowMap: [], directionalShadowMatrix: [], spot: [], spotShadowMap: [], spotShadowMatrix: [], point: [], pointShadowMap: [], pointShadowMatrix: [], hemi: [], shadows: [], shadowsPointLight: 0 }, ye = { geometries: 0, textures: 0 }, Ae = { calls: 0, vertices: 0, faces: 0, points: 0 } this.info = { render: Ae, memory: ye, programs: null } try { var Ce = { alpha: D, depth: N, stencil: F, antialias: B, premultipliedAlpha: V, preserveDrawingBuffer: k } if (null === (X = L || O.getContext('webgl', Ce) || O.getContext('experimental-webgl', Ce))) throw null !== O.getContext('webgl') ? 'Error creating WebGL context with your selected attributes.' : 'Error creating WebGL context.' void 0 === X.getShaderPrecisionFormat && (X.getShaderPrecisionFormat = function () { return { rangeMin: 1, rangeMax: 1, precision: 1 } }), O.addEventListener('webglcontextlost', r, !1) } catch (e) { console.error('THREE.WebGLRenderer: ' + e) } var Ie = new Ci.WebGLExtensions(X) Ie.get('OES_texture_float'), Ie.get('OES_texture_float_linear'), Ie.get('OES_texture_half_float'), Ie.get('OES_texture_half_float_linear'), Ie.get('OES_standard_derivatives'), Ie.get('ANGLE_instanced_arrays'), Ie.get('OES_element_index_uint') && (Ci.BufferGeometry.MaxIndex = 4294967296) var Ee = new Ci.WebGLCapabilities(X, Ie, e), _e = new Ci.WebGLState(X, Ie, x), be = new Ci.WebGLProperties(), we = new Ci.WebGLObjects(X, be, this.info), Te = new Ci.WebGLPrograms(this, Ee), xe = new Ci.WebGLLights() this.info.programs = Te.programs var Se = new Ci.WebGLBufferRenderer(X, Ie, Ae), Me = new Ci.WebGLIndexedBufferRenderer(X, Ie, Ae) t(), (this.context = X), (this.capabilities = Ee), (this.extensions = Ie), (this.properties = be), (this.state = _e) var Re = new Ci.WebGLShadowMap(this, ve, we) this.shadowMap = Re var Pe, Oe = new Ci.SpritePlugin(this, Y), Le = new Ci.LensFlarePlugin(this, q) ;(this.getContext = function () { return X }), (this.getContextAttributes = function () { return X.getContextAttributes() }), (this.forceContextLoss = function () { Ie.get('WEBGL_lose_context').loseContext() }), (this.getMaxAnisotropy = function () { if (void 0 !== Pe) return Pe var e = Ie.get('EXT_texture_filter_anisotropic') return (Pe = null !== e ? X.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0) }), (this.getPrecision = function () { return Ee.precision }), (this.getPixelRatio = function () { return he }), (this.setPixelRatio = function (e) { void 0 !== e && ((he = e), this.setSize(pe.z, pe.w, !1)) }), (this.getSize = function () { return { width: le, height: ce } }), (this.setSize = function (e, t, i, n) { null != n && (he = n), (le = e), (ce = t), (O.width = e * he), (O.height = t * he), !1 !== i && ((O.style.width = e + 'px'), (O.style.height = t + 'px')), this.setViewport(0, 0, e, t) }), (this.setViewport = function (e, t, i, n) { _e.viewport(pe.set(e, t, i, n)) }), (this.setScissor = function (e, t, i, n) { _e.scissor(ue.set(e, t, i, n)) }), (this.setScissorTest = function (e) { _e.setScissorTest((de = e)) }), (this.getClearColor = function () { return ae }), (this.setClearColor = function (e, t) { ae.set(e), (se = void 0 !== t ? t : 1), i(ae.r, ae.g, ae.b, se) }), (this.getClearAlpha = function () { return se }), (this.setClearAlpha = function (e) { ;(se = e), i(ae.r, ae.g, ae.b, se) }), (this.clear = function (e, t, i) { var n = 0 ;(void 0 !== e && !e) || (n |= X.COLOR_BUFFER_BIT), (void 0 !== t && !t) || (n |= X.DEPTH_BUFFER_BIT), (void 0 !== i && !i) || (n |= X.STENCIL_BUFFER_BIT), X.clear(n) }), (this.clearColor = function () { this.clear(!0, !1, !1) }), (this.clearDepth = function () { this.clear(!1, !0, !1) }), (this.clearStencil = function () { this.clear(!1, !1, !0) }), (this.clearTarget = function (e, t, i, n) { this.setRenderTarget(e), this.clear(t, i, n) }), (this.resetGLState = n), (this.dispose = function () { O.removeEventListener('webglcontextlost', r, !1) }), (this.renderBufferImmediate = function (e, t, i) { _e.initAttributes() var n = be.get(e) e.hasPositions && !n.position && (n.position = X.createBuffer()), e.hasNormals && !n.normal && (n.normal = X.createBuffer()), e.hasUvs && !n.uv && (n.uv = X.createBuffer()), e.hasColors && !n.color && (n.color = X.createBuffer()) var r = t.getAttributes() if ( (e.hasPositions && (X.bindBuffer(X.ARRAY_BUFFER, n.position), X.bufferData(X.ARRAY_BUFFER, e.positionArray, X.DYNAMIC_DRAW), _e.enableAttribute(r.position), X.vertexAttribPointer(r.position, 3, X.FLOAT, !1, 0, 0)), e.hasNormals) ) { if ((X.bindBuffer(X.ARRAY_BUFFER, n.normal), 'MeshPhongMaterial' !== i.type && 'MeshStandardMaterial' !== i.type && i.shading === Ci.FlatShading)) for (var o = 0, a = 3 * e.count; o < a; o += 9) { var s = e.normalArray, l = (s[o + 0] + s[o + 3] + s[o + 6]) / 3, c = (s[o + 1] + s[o + 4] + s[o + 7]) / 3, h = (s[o + 2] + s[o + 5] + s[o + 8]) / 3 ;(s[o + 0] = l), (s[o + 1] = c), (s[o + 2] = h), (s[o + 3] = l), (s[o + 4] = c), (s[o + 5] = h), (s[o + 6] = l), (s[o + 7] = c), (s[o + 8] = h) } X.bufferData(X.ARRAY_BUFFER, e.normalArray, X.DYNAMIC_DRAW), _e.enableAttribute(r.normal), X.vertexAttribPointer(r.normal, 3, X.FLOAT, !1, 0, 0) } e.hasUvs && i.map && (X.bindBuffer(X.ARRAY_BUFFER, n.uv), X.bufferData(X.ARRAY_BUFFER, e.uvArray, X.DYNAMIC_DRAW), _e.enableAttribute(r.uv), X.vertexAttribPointer(r.uv, 2, X.FLOAT, !1, 0, 0)), e.hasColors && i.vertexColors !== Ci.NoColors && (X.bindBuffer(X.ARRAY_BUFFER, n.color), X.bufferData(X.ARRAY_BUFFER, e.colorArray, X.DYNAMIC_DRAW), _e.enableAttribute(r.color), X.vertexAttribPointer(r.color, 3, X.FLOAT, !1, 0, 0)), _e.disableUnusedAttributes(), X.drawArrays(X.TRIANGLES, 0, e.count), (e.count = 0) }), (this.renderBufferDirect = function (e, t, i, n, r, o) { R(n) var a = P(e, t, n, r), s = !1, l = i.id + '_' + a.id + '_' + n.wireframe l !== ee && ((ee = l), (s = !0)) var c = r.morphTargetInfluences if (void 0 !== c) { for (var h = [], u = 0, d = c.length; u < d; u++) { var p = c[u] h.push([p, u]) } h.sort(M), 8 < h.length && (h.length = 8) var f = i.morphAttributes for (u = 0, d = h.length; u < d; u++) { p = h[u] if (((j[u] = p[0]), 0 !== p[0])) { var g = p[1] !0 === n.morphTargets && f.position && i.addAttribute('morphTarget' + u, f.position[g]), !0 === n.morphNormals && f.normal && i.addAttribute('morphNormal' + u, f.normal[g]) } else !0 === n.morphTargets && i.removeAttribute('morphTarget' + u), !0 === n.morphNormals && i.removeAttribute('morphNormal' + u) } var m = a.getUniforms() null !== m.morphTargetInfluences && X.uniform1fv(m.morphTargetInfluences, j), (s = !0) } g = i.index var v, y = i.attributes.position !0 === n.wireframe && (g = we.getWireframeAttribute(i)), null !== g ? (v = Me).setIndex(g) : (v = Se), s && ((function (e, t, i, n) { var r if (i instanceof Ci.InstancedBufferGeometry && null === (r = Ie.get('ANGLE_instanced_arrays'))) console.error('THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.') else { void 0 === n && (n = 0), _e.initAttributes() var o = i.attributes, a = t.getAttributes(), s = e.defaultAttributeValues for (var l in a) { var c = a[l] if (0 <= c) { var h = o[l] if (void 0 !== h) { var u = h.itemSize, d = we.getAttributeBuffer(h) if (h instanceof Ci.InterleavedBufferAttribute) { var p = h.data, f = p.stride, g = h.offset p instanceof Ci.InstancedInterleavedBuffer ? (_e.enableAttributeAndDivisor(c, p.meshPerAttribute, r), void 0 === i.maxInstancedCount && (i.maxInstancedCount = p.meshPerAttribute * p.count)) : _e.enableAttribute(c), X.bindBuffer(X.ARRAY_BUFFER, d), X.vertexAttribPointer(c, u, X.FLOAT, !1, f * p.array.BYTES_PER_ELEMENT, (n * f + g) * p.array.BYTES_PER_ELEMENT) } else h instanceof Ci.InstancedBufferAttribute ? (_e.enableAttributeAndDivisor(c, h.meshPerAttribute, r), void 0 === i.maxInstancedCount && (i.maxInstancedCount = h.meshPerAttribute * h.count)) : _e.enableAttribute(c), X.bindBuffer(X.ARRAY_BUFFER, d), X.vertexAttribPointer(c, u, X.FLOAT, !1, 0, n * u * 4) } else if (void 0 !== s) { var m = s[l] if (void 0 !== m) switch (m.length) { case 2: X.vertexAttrib2fv(c, m) break case 3: X.vertexAttrib3fv(c, m) break case 4: X.vertexAttrib4fv(c, m) break default: X.vertexAttrib1fv(c, m) } } } } _e.disableUnusedAttributes() } })(n, a, i), null !== g && X.bindBuffer(X.ELEMENT_ARRAY_BUFFER, we.getAttributeBuffer(g))) var A = 1 / 0 null !== g ? (A = g.count) : void 0 !== y && (A = y.count) var C = i.drawRange.start, I = i.drawRange.count, E = null !== o ? o.start : 0, _ = null !== o ? o.count : 1 / 0, b = Math.max(0, C, E), w = Math.min(0 + A, C + I, E + _) - 1, T = Math.max(0, w - b + 1) if (r instanceof Ci.Mesh) if (!0 === n.wireframe) _e.setLineWidth(n.wireframeLinewidth * S()), v.setMode(X.LINES) else switch (r.drawMode) { case Ci.TrianglesDrawMode: v.setMode(X.TRIANGLES) break case Ci.TriangleStripDrawMode: v.setMode(X.TRIANGLE_STRIP) break case Ci.TriangleFanDrawMode: v.setMode(X.TRIANGLE_FAN) } else if (r instanceof Ci.Line) { var x = n.linewidth void 0 === x && (x = 1), _e.setLineWidth(x * S()), r instanceof Ci.LineSegments ? v.setMode(X.LINES) : v.setMode(X.LINE_STRIP) } else r instanceof Ci.Points && v.setMode(X.POINTS) i instanceof Ci.InstancedBufferGeometry ? 0 < i.maxInstancedCount && v.renderInstances(i, b, T) : v.render(b, T) }), (this.render = function (e, t, i, n) { if (t instanceof Ci.Camera != 0) { var r = e.fog if ( ((ee = ''), ($ = -1), !(te = null) === e.autoUpdate && e.updateMatrixWorld(), null === t.parent && t.updateMatrixWorld(), t.matrixWorldInverse.getInverse(t.matrixWorld), ge.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), fe.setFromMatrix(ge), (U.length = 0), (W = z = -1), (Y.length = 0), (q.length = 0), (function e(t, i) { if (!1 !== t.visible) { if (t.layers.test(i.layers)) if (t instanceof Ci.Light) U.push(t) else if (t instanceof Ci.Sprite) (!1 !== t.frustumCulled && !0 !== fe.intersectsObject(t)) || Y.push(t) else if (t instanceof Ci.LensFlare) q.push(t) else if (t instanceof Ci.ImmediateRenderObject) !0 === Z.sortObjects && (me.setFromMatrixPosition(t.matrixWorld), me.applyProjection(ge)), d(t, null, t.material, me.z, null) else if ( (t instanceof Ci.Mesh || t instanceof Ci.Line || t instanceof Ci.Points) && (t instanceof Ci.SkinnedMesh && t.skeleton.update(), !1 === t.frustumCulled || !0 === fe.intersectsObject(t)) ) { var n = t.material if (!0 === n.visible) { !0 === Z.sortObjects && (me.setFromMatrixPosition(t.matrixWorld), me.applyProjection(ge)) var r = we.update(t) if (n instanceof Ci.MultiMaterial) for (var o = r.groups, a = n.materials, s = 0, l = o.length; s < l; s++) { var c = o[s], h = a[c.materialIndex] !0 === h.visible && d(t, r, h, me.z, c) } else d(t, r, n, me.z, null) } } var u = t.children for (s = 0, l = u.length; s < l; s++) e(u[s], i) } })(e, t), (H.length = z + 1), (G.length = W + 1), !0 === Z.sortObjects && (H.sort(s), G.sort(l)), (function (e, t) { var i, n, r, o, a, s, l = 0, c = 0, h = 0, u = t.matrixWorldInverse, d = 0, p = 0, f = 0, g = 0, m = 0 for (i = ve.shadowsPointLight = 0, n = e.length; i < n; i++) if (((o = (r = e[i]).color), (a = r.intensity), (s = r.distance), r instanceof Ci.AmbientLight)) (l += o.r * a), (c += o.g * a), (h += o.b * a) else if (r instanceof Ci.DirectionalLight) { ;(v = xe.get(r)).color.copy(r.color).multiplyScalar(r.intensity), v.direction.setFromMatrixPosition(r.matrixWorld), me.setFromMatrixPosition(r.target.matrixWorld), v.direction.sub(me), v.direction.transformDirection(u), (v.shadow = r.castShadow), r.castShadow && ((v.shadowBias = r.shadow.bias), (v.shadowRadius = r.shadow.radius), (v.shadowMapSize = r.shadow.mapSize), (ve.shadows[m++] = r)), (ve.directionalShadowMap[d] = r.shadow.map), (ve.directionalShadowMatrix[d] = r.shadow.matrix), (ve.directional[d++] = v) } else if (r instanceof Ci.SpotLight) { ;(v = xe.get(r)).position.setFromMatrixPosition(r.matrixWorld), v.position.applyMatrix4(u), v.color.copy(o).multiplyScalar(a), (v.distance = s), v.direction.setFromMatrixPosition(r.matrixWorld), me.setFromMatrixPosition(r.target.matrixWorld), v.direction.sub(me), v.direction.transformDirection(u), (v.coneCos = Math.cos(r.angle)), (v.penumbraCos = Math.cos(r.angle * (1 - r.penumbra))), (v.decay = 0 === r.distance ? 0 : r.decay), (v.shadow = r.castShadow), r.castShadow && ((v.shadowBias = r.shadow.bias), (v.shadowRadius = r.shadow.radius), (v.shadowMapSize = r.shadow.mapSize), (ve.shadows[m++] = r)), (ve.spotShadowMap[f] = r.shadow.map), (ve.spotShadowMatrix[f] = r.shadow.matrix), (ve.spot[f++] = v) } else if (r instanceof Ci.PointLight) { ;(v = xe.get(r)).position.setFromMatrixPosition(r.matrixWorld), v.position.applyMatrix4(u), v.color.copy(r.color).multiplyScalar(r.intensity), (v.distance = r.distance), (v.decay = 0 === r.distance ? 0 : r.decay), (v.shadow = r.castShadow), r.castShadow && ((v.shadowBias = r.shadow.bias), (v.shadowRadius = r.shadow.radius), (v.shadowMapSize = r.shadow.mapSize), (ve.shadows[m++] = r)), (ve.pointShadowMap[p] = r.shadow.map), void 0 === ve.pointShadowMatrix[p] && (ve.pointShadowMatrix[p] = new Ci.Matrix4()), me.setFromMatrixPosition(r.matrixWorld).negate(), ve.pointShadowMatrix[p].identity().setPosition(me), (ve.point[p++] = v) } else if (r instanceof Ci.HemisphereLight) { var v ;(v = xe.get(r)).direction.setFromMatrixPosition(r.matrixWorld), v.direction.transformDirection(u), v.direction.normalize(), v.skyColor.copy(r.color).multiplyScalar(a), v.groundColor.copy(r.groundColor).multiplyScalar(a), (ve.hemi[g++] = v) } ;(ve.ambient[0] = l), (ve.ambient[1] = c), (ve.ambient[2] = h), (ve.directional.length = d), (ve.spot.length = f), (ve.point.length = p), (ve.hemi.length = g), (ve.shadows.length = m), (ve.hash = d + ',' + p + ',' + f + ',' + g + ',' + m) })(U, t), Re.render(e, t), (Ae.calls = 0), (Ae.vertices = 0), (Ae.faces = 0), void (Ae.points = 0) === i && (i = null), this.setRenderTarget(i), (this.autoClear || n) && this.clear(this.autoClearColor, this.autoClearDepth, this.autoClearStencil), e.overrideMaterial) ) { var o = e.overrideMaterial c(H, t, r, o), c(G, t, r, o) } else _e.setBlending(Ci.NoBlending), c(H, t, r), c(G, t, r) if ((Oe.render(e, t), Le.render(e, t, re), i)) { var a = i.texture a.generateMipmaps && E(i) && a.minFilter !== Ci.NearestFilter && a.minFilter !== Ci.LinearFilter && (function (e) { var t = e instanceof Ci.WebGLRenderTargetCube ? X.TEXTURE_CUBE_MAP : X.TEXTURE_2D, i = be.get(e.texture).__webglTexture _e.bindTexture(t, i), X.generateMipmap(t), _e.bindTexture(t, null) })(i) } _e.setDepthTest(!0), _e.setDepthWrite(!0), _e.setColorWrite(!0) } else console.error('THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.') }), (this.setFaceCulling = function (e, t) { e === Ci.CullFaceNone ? _e.disable(X.CULL_FACE) : (t === Ci.FrontFaceDirectionCW ? X.frontFace(X.CW) : X.frontFace(X.CCW), e === Ci.CullFaceBack ? X.cullFace(X.BACK) : e === Ci.CullFaceFront ? X.cullFace(X.FRONT) : X.cullFace(X.FRONT_AND_BACK), _e.enable(X.CULL_FACE)) }), (this.setTexture = function (e, t) { var i = be.get(e) if (0 < e.version && i.__version !== e.version) { var n = e.image return void 0 === n ? void console.warn('THREE.WebGLRenderer: Texture marked for update but image is undefined', e) : !1 === n.complete ? void console.warn('THREE.WebGLRenderer: Texture marked for update but image is incomplete', e) : void o(i, e, t) } _e.activeTexture(X.TEXTURE0 + t), _e.bindTexture(X.TEXTURE_2D, i.__webglTexture) }), (this.getCurrentRenderTarget = function () { return Q }), (this.setRenderTarget = function (e) { ;(Q = e) && void 0 === be.get(e).__webglFramebuffer && w(e) var t, i = e instanceof Ci.WebGLRenderTargetCube if (e) { var n = be.get(e) ;(t = i ? n.__webglFramebuffer[e.activeCubeFace] : n.__webglFramebuffer), ie.copy(e.scissor), (ne = e.scissorTest), re.copy(e.viewport) } else (t = null), ie.copy(ue).multiplyScalar(he), (ne = de), re.copy(pe).multiplyScalar(he) if ((J !== t && (X.bindFramebuffer(X.FRAMEBUFFER, t), (J = t)), _e.scissor(ie), _e.setScissorTest(ne), _e.viewport(re), i)) { var r = be.get(e.texture) X.framebufferTexture2D(X.FRAMEBUFFER, X.COLOR_ATTACHMENT0, X.TEXTURE_CUBE_MAP_POSITIVE_X + e.activeCubeFace, r.__webglTexture, e.activeMipMapLevel) } }), (this.readRenderTargetPixels = function (e, t, i, n, r, o) { if (e instanceof Ci.WebGLRenderTarget != 0) { var a = be.get(e).__webglFramebuffer if (a) { var s = !1 a !== J && (X.bindFramebuffer(X.FRAMEBUFFER, a), (s = !0)) try { var l = e.texture if (l.format !== Ci.RGBAFormat && x(l.format) !== X.getParameter(X.IMPLEMENTATION_COLOR_READ_FORMAT)) return void console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.') if ( !( l.type === Ci.UnsignedByteType || x(l.type) === X.getParameter(X.IMPLEMENTATION_COLOR_READ_TYPE) || (l.type === Ci.FloatType && Ie.get('WEBGL_color_buffer_float')) || (l.type === Ci.HalfFloatType && Ie.get('EXT_color_buffer_half_float')) ) ) return void console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.') X.checkFramebufferStatus(X.FRAMEBUFFER) === X.FRAMEBUFFER_COMPLETE ? X.readPixels(t, i, n, r, x(l.format), x(l.type), o) : console.error('THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.') } finally { s && X.bindFramebuffer(X.FRAMEBUFFER, J) } } } else console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.') }) }), (Ci.WebGLRenderTarget = function (e, t, i) { ;(this.uuid = Ci.Math.generateUUID()), (this.width = e), (this.height = t), (this.scissor = new Ci.Vector4(0, 0, e, t)), (this.scissorTest = !1), (this.viewport = new Ci.Vector4(0, 0, e, t)), void 0 === (i = i || {}).minFilter && (i.minFilter = Ci.LinearFilter), (this.texture = new Ci.Texture(void 0, void 0, i.wrapS, i.wrapT, i.magFilter, i.minFilter, i.format, i.type, i.anisotropy)), (this.depthBuffer = void 0 === i.depthBuffer || i.depthBuffer), (this.stencilBuffer = void 0 === i.stencilBuffer || i.stencilBuffer) }), (Ci.WebGLRenderTarget.prototype = { constructor: Ci.WebGLRenderTarget, setSize: function (e, t) { ;(this.width === e && this.height === t) || ((this.width = e), (this.height = t), this.dispose()), this.viewport.set(0, 0, e, t), this.scissor.set(0, 0, e, t) }, clone: function () { return new this.constructor().copy(this) }, copy: function (e) { return ( (this.width = e.width), (this.height = e.height), this.viewport.copy(e.viewport), (this.texture = e.texture.clone()), (this.depthBuffer = e.depthBuffer), (this.stencilBuffer = e.stencilBuffer), this ) }, dispose: function () { this.dispatchEvent({ type: 'dispose' }) } }), Ci.EventDispatcher.prototype.apply(Ci.WebGLRenderTarget.prototype), (Ci.WebGLRenderTargetCube = function (e, t, i) { Ci.WebGLRenderTarget.call(this, e, t, i), (this.activeCubeFace = 0), (this.activeMipMapLevel = 0) }), (Ci.WebGLRenderTargetCube.prototype = Object.create(Ci.WebGLRenderTarget.prototype)), (Ci.WebGLRenderTargetCube.prototype.constructor = Ci.WebGLRenderTargetCube), (Ci.WebGLBufferRenderer = function (r, o, a) { var s ;(this.setMode = function (e) { s = e }), (this.render = function (e, t) { r.drawArrays(s, e, t), a.calls++, (a.vertices += t), s === r.TRIANGLES && (a.faces += t / 3) }), (this.renderInstances = function (e) { var t = o.get('ANGLE_instanced_arrays') if (null !== t) { var i = e.attributes.position, n = 0 ;(n = i instanceof Ci.InterleavedBufferAttribute ? i.data.count : i.count), t.drawArraysInstancedANGLE(s, 0, n, e.maxInstancedCount), a.calls++, (a.vertices += n * e.maxInstancedCount), s === r.TRIANGLES && (a.faces += (e.maxInstancedCount * n) / 3) } else console.error('THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.') }) }), (Ci.WebGLIndexedBufferRenderer = function (r, o, a) { var s, l, c ;(this.setMode = function (e) { s = e }), (this.setIndex = function (e) { c = e.array instanceof Uint32Array && o.get('OES_element_index_uint') ? ((l = r.UNSIGNED_INT), 4) : ((l = r.UNSIGNED_SHORT), 2) }), (this.render = function (e, t) { r.drawElements(s, t, l, e * c), a.calls++, (a.vertices += t), s === r.TRIANGLES && (a.faces += t / 3) }), (this.renderInstances = function (e, t, i) { var n = o.get('ANGLE_instanced_arrays') return null === n ? void console.error('THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.') : (n.drawElementsInstancedANGLE(s, i, l, t * c, e.maxInstancedCount), a.calls++, (a.vertices += i * e.maxInstancedCount), void (s === r.TRIANGLES && (a.faces += (e.maxInstancedCount * i) / 3))) }) }), (Ci.WebGLExtensions = function (i) { var n = {} this.get = function (e) { if (void 0 !== n[e]) return n[e] var t switch (e) { case 'EXT_texture_filter_anisotropic': t = i.getExtension('EXT_texture_filter_anisotropic') || i.getExtension('MOZ_EXT_texture_filter_anisotropic') || i.getExtension('WEBKIT_EXT_texture_filter_anisotropic') break case 'WEBGL_compressed_texture_s3tc': t = i.getExtension('WEBGL_compressed_texture_s3tc') || i.getExtension('MOZ_WEBGL_compressed_texture_s3tc') || i.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc') break case 'WEBGL_compressed_texture_pvrtc': t = i.getExtension('WEBGL_compressed_texture_pvrtc') || i.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc') break case 'WEBGL_compressed_texture_etc1': t = i.getExtension('WEBGL_compressed_texture_etc1') break default: t = i.getExtension(e) } return null === t && console.warn('THREE.WebGLRenderer: ' + e + ' extension not supported.'), (n[e] = t) } }), (Ci.WebGLCapabilities = function (t, e, i) { function n(e) { if ('highp' === e) { if (0 < t.getShaderPrecisionFormat(t.VERTEX_SHADER, t.HIGH_FLOAT).precision && 0 < t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.HIGH_FLOAT).precision) return 'highp' e = 'mediump' } return 'mediump' === e && 0 < t.getShaderPrecisionFormat(t.VERTEX_SHADER, t.MEDIUM_FLOAT).precision && 0 < t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.MEDIUM_FLOAT).precision ? 'mediump' : 'lowp' } ;(this.getMaxPrecision = n), (this.precision = void 0 !== i.precision ? i.precision : 'highp'), (this.logarithmicDepthBuffer = void 0 !== i.logarithmicDepthBuffer && i.logarithmicDepthBuffer), (this.maxTextures = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)), (this.maxVertexTextures = t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS)), (this.maxTextureSize = t.getParameter(t.MAX_TEXTURE_SIZE)), (this.maxCubemapSize = t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE)), (this.maxAttributes = t.getParameter(t.MAX_VERTEX_ATTRIBS)), (this.maxVertexUniforms = t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS)), (this.maxVaryings = t.getParameter(t.MAX_VARYING_VECTORS)), (this.maxFragmentUniforms = t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS)), (this.vertexTextures = 0 < this.maxVertexTextures), (this.floatFragmentTextures = !!e.get('OES_texture_float')), (this.floatVertexTextures = this.vertexTextures && this.floatFragmentTextures) var r = n(this.precision) r !== this.precision && (console.warn('THREE.WebGLRenderer:', this.precision, 'not supported, using', r, 'instead.'), (this.precision = r)), this.logarithmicDepthBuffer && (this.logarithmicDepthBuffer = !!e.get('EXT_frag_depth')) }), (Ci.WebGLGeometries = function (i, o, a) { function s(e) { var t = e.target, i = c[t.id] null !== i.index && l(i.index), (function (e) { for (var t in e) l(e[t]) })(i.attributes), t.removeEventListener('dispose', s), delete c[t.id] var n = o.get(t) n.wireframe && l(n.wireframe), o.delete(t) var r = o.get(i) r.wireframe && l(r.wireframe), o.delete(i), a.memory.geometries-- } function l(e) { var t = (function (e) { return e instanceof Ci.InterleavedBufferAttribute ? o.get(e.data).__webglBuffer : o.get(e).__webglBuffer })(e) void 0 !== t && (i.deleteBuffer(t), (function (e) { e instanceof Ci.InterleavedBufferAttribute ? o.delete(e.data) : o.delete(e) })(e)) } var c = {} this.get = function (e) { var t, i = e.geometry return void 0 !== c[i.id] ? c[i.id] : (i.addEventListener('dispose', s), i instanceof Ci.BufferGeometry ? (t = i) : i instanceof Ci.Geometry && (void 0 === i._bufferGeometry && (i._bufferGeometry = new Ci.BufferGeometry().setFromObject(e)), (t = i._bufferGeometry)), (c[i.id] = t), a.memory.geometries++, t) } }), (Ci.WebGLLights = function () { var i = {} this.get = function (e) { if (void 0 !== i[e.id]) return i[e.id] var t switch (e.type) { case 'DirectionalLight': t = { direction: new Ci.Vector3(), color: new Ci.Color(), shadow: !1, shadowBias: 0, shadowRadius: 1, shadowMapSize: new Ci.Vector2() } break case 'SpotLight': t = { position: new Ci.Vector3(), direction: new Ci.Vector3(), color: new Ci.Color(), distance: 0, coneCos: 0, penumbraCos: 0, decay: 0, shadow: !1, shadowBias: 0, shadowRadius: 1, shadowMapSize: new Ci.Vector2() } break case 'PointLight': t = { position: new Ci.Vector3(), color: new Ci.Color(), distance: 0, decay: 0, shadow: !1, shadowBias: 0, shadowRadius: 1, shadowMapSize: new Ci.Vector2() } break case 'HemisphereLight': t = { direction: new Ci.Vector3(), skyColor: new Ci.Color(), groundColor: new Ci.Color() } } return (i[e.id] = t) } }), (Ci.WebGLObjects = function (g, m, e) { function v(e, t) { var i = e instanceof Ci.InterleavedBufferAttribute ? e.data : e, n = m.get(i) void 0 === n.__webglBuffer ? (function (e, t, i) { ;(e.__webglBuffer = g.createBuffer()), g.bindBuffer(i, e.__webglBuffer) var n = t.dynamic ? g.DYNAMIC_DRAW : g.STATIC_DRAW g.bufferData(i, t.array, n), (e.version = t.version) })(n, i, t) : n.version !== i.version && (function (e, t, i) { g.bindBuffer(i, e.__webglBuffer), !1 === t.dynamic || -1 === t.updateRange.count ? g.bufferSubData(i, 0, t.array) : 0 === t.updateRange.count ? console.error( 'THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually.' ) : (g.bufferSubData(i, t.updateRange.offset * t.array.BYTES_PER_ELEMENT, t.array.subarray(t.updateRange.offset, t.updateRange.offset + t.updateRange.count)), (t.updateRange.count = 0)), (e.version = t.version) })(n, i, t) } function y(e, t, i) { if (i < t) { var n = t ;(t = i), (i = n) } var r = e[t] return void 0 === r ? ((e[t] = [i]), !0) : -1 === r.indexOf(i) && (r.push(i), !0) } var c = new Ci.WebGLGeometries(g, m, e) ;(this.getAttributeBuffer = function (e) { return e instanceof Ci.InterleavedBufferAttribute ? m.get(e.data).__webglBuffer : m.get(e).__webglBuffer }), (this.getWireframeAttribute = function (e) { var t = m.get(e) if (void 0 !== t.wireframe) return t.wireframe var i, n = [], r = e.index, o = e.attributes, a = o.position if (null !== r) for (var s = {}, l = 0, c = (i = r.array).length; l < c; l += 3) { var h = i[l + 0], u = i[l + 1], d = i[l + 2] y(s, h, u) && n.push(h, u), y(s, u, d) && n.push(u, d), y(s, d, h) && n.push(d, h) } else for (l = 0, c = (i = o.position.array).length / 3 - 1; l < c; l += 3) { ;(h = l + 0), (u = l + 1), (d = l + 2) n.push(h, u, u, d, d, h) } var p = 65535 < a.count ? Uint32Array : Uint16Array, f = new Ci.BufferAttribute(new p(n), 1) return v(f, g.ELEMENT_ARRAY_BUFFER), (t.wireframe = f) }), (this.update = function (e) { var t = c.get(e) e.geometry instanceof Ci.Geometry && t.updateFromObject(e) var i = t.index, n = t.attributes for (var r in (null !== i && v(i, g.ELEMENT_ARRAY_BUFFER), n)) v(n[r], g.ARRAY_BUFFER) var o = t.morphAttributes for (var r in o) for (var a = o[r], s = 0, l = a.length; s < l; s++) v(a[s], g.ARRAY_BUFFER) return t }) }), (Ci.WebGLProgram = ((Qt = 0), (Jt = /^([\w\d_]+)\.([\w\d_]+)$/), ($t = /^([\w\d_]+)\[(\d+)\]\.([\w\d_]+)$/), (ei = /^([\w\d_]+)\[0\]$/), function (e, t, i, n) { var r = e.context, o = i.extensions, a = i.defines, s = i.__webglShader.vertexShader, l = i.__webglShader.fragmentShader, c = 'SHADOWMAP_TYPE_BASIC' n.shadowMapType === Ci.PCFShadowMap ? (c = 'SHADOWMAP_TYPE_PCF') : n.shadowMapType === Ci.PCFSoftShadowMap && (c = 'SHADOWMAP_TYPE_PCF_SOFT') var h = 'ENVMAP_TYPE_CUBE', u = 'ENVMAP_MODE_REFLECTION', d = 'ENVMAP_BLENDING_MULTIPLY' if (n.envMap) { switch (i.envMap.mapping) { case Ci.CubeReflectionMapping: case Ci.CubeRefractionMapping: h = 'ENVMAP_TYPE_CUBE' break case Ci.CubeUVReflectionMapping: case Ci.CubeUVRefractionMapping: h = 'ENVMAP_TYPE_CUBE_UV' break case Ci.EquirectangularReflectionMapping: case Ci.EquirectangularRefractionMapping: h = 'ENVMAP_TYPE_EQUIREC' break case Ci.SphericalReflectionMapping: h = 'ENVMAP_TYPE_SPHERE' } switch (i.envMap.mapping) { case Ci.CubeRefractionMapping: case Ci.EquirectangularRefractionMapping: u = 'ENVMAP_MODE_REFRACTION' } switch (i.combine) { case Ci.MultiplyOperation: d = 'ENVMAP_BLENDING_MULTIPLY' break case Ci.MixOperation: d = 'ENVMAP_BLENDING_MIX' break case Ci.AddOperation: d = 'ENVMAP_BLENDING_ADD' } } var p, f, g = 0 < e.gammaFactor ? e.gammaFactor : 1, m = (function (e, t, i) { return [ (e = e || {}).derivatives || t.envMapCubeUV || t.bumpMap || t.normalMap || t.flatShading ? '#extension GL_OES_standard_derivatives : enable' : '', (e.fragDepth || t.logarithmicDepthBuffer) && i.get('EXT_frag_depth') ? '#extension GL_EXT_frag_depth : enable' : '', e.drawBuffers && i.get('WEBGL_draw_buffers') ? '#extension GL_EXT_draw_buffers : require' : '', (e.shaderTextureLOD || t.envMap) && i.get('EXT_shader_texture_lod') ? '#extension GL_EXT_shader_texture_lod : enable' : '' ] .filter(Pi) .join('\n') })(o, n, e.extensions), v = (function (e) { var t = [] for (var i in e) { var n = e[i] !1 !== n && t.push('#define ' + i + ' ' + n) } return t.join('\n') })(a), y = r.createProgram() ;(f = i instanceof Ci.RawShaderMaterial ? (p = '') : ((p = [ 'precision ' + n.precision + ' float;', 'precision ' + n.precision + ' int;', '#define SHADER_NAME ' + i.__webglShader.name, v, n.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '', '#define GAMMA_FACTOR ' + g, '#define MAX_BONES ' + n.maxBones, n.map ? '#define USE_MAP' : '', n.envMap ? '#define USE_ENVMAP' : '', n.envMap ? '#define ' + u : '', n.lightMap ? '#define USE_LIGHTMAP' : '', n.aoMap ? '#define USE_AOMAP' : '', n.emissiveMap ? '#define USE_EMISSIVEMAP' : '', n.bumpMap ? '#define USE_BUMPMAP' : '', n.normalMap ? '#define USE_NORMALMAP' : '', n.displacementMap && n.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '', n.specularMap ? '#define USE_SPECULARMAP' : '', n.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', n.metalnessMap ? '#define USE_METALNESSMAP' : '', n.alphaMap ? '#define USE_ALPHAMAP' : '', n.vertexColors ? '#define USE_COLOR' : '', n.flatShading ? '#define FLAT_SHADED' : '', n.skinning ? '#define USE_SKINNING' : '', n.useVertexTexture ? '#define BONE_TEXTURE' : '', n.morphTargets ? '#define USE_MORPHTARGETS' : '', n.morphNormals && !1 === n.flatShading ? '#define USE_MORPHNORMALS' : '', n.doubleSided ? '#define DOUBLE_SIDED' : '', n.flipSided ? '#define FLIP_SIDED' : '', n.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', n.shadowMapEnabled ? '#define ' + c : '', 0 < n.pointLightShadows ? '#define POINT_LIGHT_SHADOWS' : '', n.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '', n.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', n.logarithmicDepthBuffer && e.extensions.get('EXT_frag_depth') ? '#define USE_LOGDEPTHBUF_EXT' : '', 'uniform mat4 modelMatrix;', 'uniform mat4 modelViewMatrix;', 'uniform mat4 projectionMatrix;', 'uniform mat4 viewMatrix;', 'uniform mat3 normalMatrix;', 'uniform vec3 cameraPosition;', 'attribute vec3 position;', 'attribute vec3 normal;', 'attribute vec2 uv;', '#ifdef USE_COLOR', '\tattribute vec3 color;', '#endif', '#ifdef USE_MORPHTARGETS', '\tattribute vec3 morphTarget0;', '\tattribute vec3 morphTarget1;', '\tattribute vec3 morphTarget2;', '\tattribute vec3 morphTarget3;', '\t#ifdef USE_MORPHNORMALS', '\t\tattribute vec3 morphNormal0;', '\t\tattribute vec3 morphNormal1;', '\t\tattribute vec3 morphNormal2;', '\t\tattribute vec3 morphNormal3;', '\t#else', '\t\tattribute vec3 morphTarget4;', '\t\tattribute vec3 morphTarget5;', '\t\tattribute vec3 morphTarget6;', '\t\tattribute vec3 morphTarget7;', '\t#endif', '#endif', '#ifdef USE_SKINNING', '\tattribute vec4 skinIndex;', '\tattribute vec4 skinWeight;', '#endif', '\n' ] .filter(Pi) .join('\n')), [ m, 'precision ' + n.precision + ' float;', 'precision ' + n.precision + ' int;', '#define SHADER_NAME ' + i.__webglShader.name, v, n.alphaTest ? '#define ALPHATEST ' + n.alphaTest : '', '#define GAMMA_FACTOR ' + g, n.useFog && n.fog ? '#define USE_FOG' : '', n.useFog && n.fogExp ? '#define FOG_EXP2' : '', n.map ? '#define USE_MAP' : '', n.envMap ? '#define USE_ENVMAP' : '', n.envMap ? '#define ' + h : '', n.envMap ? '#define ' + u : '', n.envMap ? '#define ' + d : '', n.lightMap ? '#define USE_LIGHTMAP' : '', n.aoMap ? '#define USE_AOMAP' : '', n.emissiveMap ? '#define USE_EMISSIVEMAP' : '', n.bumpMap ? '#define USE_BUMPMAP' : '', n.normalMap ? '#define USE_NORMALMAP' : '', n.specularMap ? '#define USE_SPECULARMAP' : '', n.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', n.metalnessMap ? '#define USE_METALNESSMAP' : '', n.alphaMap ? '#define USE_ALPHAMAP' : '', n.vertexColors ? '#define USE_COLOR' : '', n.flatShading ? '#define FLAT_SHADED' : '', n.doubleSided ? '#define DOUBLE_SIDED' : '', n.flipSided ? '#define FLIP_SIDED' : '', n.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', n.shadowMapEnabled ? '#define ' + c : '', 0 < n.pointLightShadows ? '#define POINT_LIGHT_SHADOWS' : '', n.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '', n.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '', n.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', n.logarithmicDepthBuffer && e.extensions.get('EXT_frag_depth') ? '#define USE_LOGDEPTHBUF_EXT' : '', n.envMap && e.extensions.get('EXT_shader_texture_lod') ? '#define TEXTURE_LOD_EXT' : '', 'uniform mat4 viewMatrix;', 'uniform vec3 cameraPosition;', n.toneMapping !== Ci.NoToneMapping ? '#define TONE_MAPPING' : '', n.toneMapping !== Ci.NoToneMapping ? Ci.ShaderChunk.tonemapping_pars_fragment : '', n.toneMapping !== Ci.NoToneMapping ? (function (e, t) { var i switch (t) { case Ci.LinearToneMapping: i = 'Linear' break case Ci.ReinhardToneMapping: i = 'Reinhard' break case Ci.Uncharted2ToneMapping: i = 'Uncharted2' break case Ci.CineonToneMapping: i = 'OptimizedCineon' break default: throw new Error('unsupported toneMapping: ' + t) } return 'vec3 ' + e + '( vec3 color ) { return ' + i + 'ToneMapping( color ); }' })('toneMapping', n.toneMapping) : '', n.outputEncoding || n.mapEncoding || n.envMapEncoding || n.emissiveMapEncoding ? Ci.ShaderChunk.encodings_pars_fragment : '', n.mapEncoding ? Ri('mapTexelToLinear', n.mapEncoding) : '', n.envMapEncoding ? Ri('envMapTexelToLinear', n.envMapEncoding) : '', n.emissiveMapEncoding ? Ri('emissiveMapTexelToLinear', n.emissiveMapEncoding) : '', n.outputEncoding ? (function (e, t) { var i = Mi(t) return 'vec4 ' + e + '( vec4 value ) { return LinearTo' + i[0] + i[1] + '; }' })('linearToOutputTexel', n.outputEncoding) : '', '\n' ] .filter(Pi) .join('\n'))), (s = Oi((s = Li(s)), n)), (l = Oi((l = Li(l)), n)), i instanceof Ci.ShaderMaterial == 0 && ((s = Di(s)), (l = Di(l))) var A = p + s, C = f + l, I = Ci.WebGLShader(r, r.VERTEX_SHADER, A), E = Ci.WebGLShader(r, r.FRAGMENT_SHADER, C) r.attachShader(y, I), r.attachShader(y, E), void 0 !== i.index0AttributeName ? r.bindAttribLocation(y, 0, i.index0AttributeName) : !0 === n.morphTargets && r.bindAttribLocation(y, 0, 'position'), r.linkProgram(y) var _, b, w = r.getProgramInfoLog(y), T = r.getShaderInfoLog(I), x = r.getShaderInfoLog(E), S = !0, M = !0 return ( !1 === r.getProgramParameter(y, r.LINK_STATUS) ? ((S = !1), console.error('THREE.WebGLProgram: shader error: ', r.getError(), 'gl.VALIDATE_STATUS', r.getProgramParameter(y, r.VALIDATE_STATUS), 'gl.getProgramInfoLog', w, T, x)) : '' !== w ? console.warn('THREE.WebGLProgram: gl.getProgramInfoLog()', w) : ('' !== T && '' !== x) || (M = !1), M && (this.diagnostics = { runnable: S, material: i, programLog: w, vertexShader: { log: T, prefix: p }, fragmentShader: { log: x, prefix: f } }), r.deleteShader(I), r.deleteShader(E), (this.getUniforms = function () { return ( void 0 === _ && (_ = (function (e, t) { for (var i = {}, n = e.getProgramParameter(t, e.ACTIVE_UNIFORMS), r = 0; r < n; r++) { var o = e.getActiveUniform(t, r).name, a = e.getUniformLocation(t, o), s = Jt.exec(o) if (s) { var l = s[1], c = s[2], h = i[l] ;(h = h || (i[l] = {}))[c] = a } else if ((s = $t.exec(o))) { var u = s[1], d = s[2], p = s[3], f = i[u], g = (f = f || (i[u] = []))[d] ;(g = g || (f[d] = {}))[p] = a } else (s = ei.exec(o)) ? (i[(u = s[1])] = a) : (i[o] = a) } return i })(r, y)), _ ) }), (this.getAttributes = function () { return ( void 0 === b && (b = (function (e, t) { for (var i = {}, n = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES), r = 0; r < n; r++) { var o = e.getActiveAttrib(t, r).name i[o] = e.getAttribLocation(t, o) } return i })(r, y)), b ) }), (this.destroy = function () { r.deleteProgram(y), (this.program = void 0) }), Object.defineProperties(this, { uniforms: { get: function () { return console.warn('THREE.WebGLProgram: .uniforms is now .getUniforms().'), this.getUniforms() } }, attributes: { get: function () { return console.warn('THREE.WebGLProgram: .attributes is now .getAttributes().'), this.getAttributes() } } }), (this.id = Qt++), (this.code = t), (this.usedTimes = 1), (this.program = y), (this.vertexShader = I), (this.fragmentShader = E), this ) })), (Ci.WebGLPrograms = function (s, l) { function c(e, t) { var i return ( e ? (e instanceof Ci.Texture ? (i = e.encoding) : e instanceof Ci.WebGLRenderTarget && (i = e.texture.encoding)) : (i = Ci.LinearEncoding), i === Ci.LinearEncoding && t && (i = Ci.GammaEncoding), i ) } var h = [], u = { MeshDepthMaterial: 'depth', MeshNormalMaterial: 'normal', MeshBasicMaterial: 'basic', MeshLambertMaterial: 'lambert', MeshPhongMaterial: 'phong', MeshStandardMaterial: 'standard', LineBasicMaterial: 'basic', LineDashedMaterial: 'dashed', PointsMaterial: 'points' }, a = [ 'precision', 'supportsVertexTextures', 'map', 'mapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'lightMap', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap', 'displacementMap', 'specularMap', 'roughnessMap', 'metalnessMap', 'alphaMap', 'combine', 'vertexColors', 'fog', 'useFog', 'fogExp', 'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning', 'maxBones', 'useVertexTexture', 'morphTargets', 'morphNormals', 'maxMorphTargets', 'maxMorphNormals', 'premultipliedAlpha', 'numDirLights', 'numPointLights', 'numSpotLights', 'numHemiLights', 'shadowMapEnabled', 'pointLightShadows', 'toneMapping', 'physicallyCorrectLights', 'shadowMapType', 'alphaTest', 'doubleSided', 'flipSided' ] ;(this.getParameters = function (e, t, i, n) { var r = u[e.type], o = (function (e) { if (l.floatVertexTextures && e && e.skeleton && e.skeleton.useVertexTexture) return 1024 var t = l.maxVertexUniforms, i = Math.floor((t - 20) / 4) return ( void 0 !== e && e instanceof Ci.SkinnedMesh && (i = Math.min(e.skeleton.bones.length, i)) < e.skeleton.bones.length && console.warn('WebGLRenderer: too many bones - ' + e.skeleton.bones.length + ', this GPU supports just ' + i + ' (try OpenGL instead of ANGLE)'), i ) })(n), a = s.getPrecision() return ( null === e.precision || ((a = l.getMaxPrecision(e.precision)) !== e.precision && console.warn('THREE.WebGLProgram.getParameters:', e.precision, 'not supported, using', a, 'instead.')), { shaderID: r, precision: a, supportsVertexTextures: l.vertexTextures, outputEncoding: c(s.getCurrentRenderTarget(), s.gammaOutput), map: !!e.map, mapEncoding: c(e.map, s.gammaInput), envMap: !!e.envMap, envMapMode: e.envMap && e.envMap.mapping, envMapEncoding: c(e.envMap, s.gammaInput), envMapCubeUV: !!e.envMap && (e.envMap.mapping === Ci.CubeUVReflectionMapping || e.envMap.mapping === Ci.CubeUVRefractionMapping), lightMap: !!e.lightMap, aoMap: !!e.aoMap, emissiveMap: !!e.emissiveMap, emissiveMapEncoding: c(e.emissiveMap, s.gammaInput), bumpMap: !!e.bumpMap, normalMap: !!e.normalMap, displacementMap: !!e.displacementMap, roughnessMap: !!e.roughnessMap, metalnessMap: !!e.metalnessMap, specularMap: !!e.specularMap, alphaMap: !!e.alphaMap, combine: e.combine, vertexColors: e.vertexColors, fog: i, useFog: e.fog, fogExp: i instanceof Ci.FogExp2, flatShading: e.shading === Ci.FlatShading, sizeAttenuation: e.sizeAttenuation, logarithmicDepthBuffer: l.logarithmicDepthBuffer, skinning: e.skinning, maxBones: o, useVertexTexture: l.floatVertexTextures && n && n.skeleton && n.skeleton.useVertexTexture, morphTargets: e.morphTargets, morphNormals: e.morphNormals, maxMorphTargets: s.maxMorphTargets, maxMorphNormals: s.maxMorphNormals, numDirLights: t.directional.length, numPointLights: t.point.length, numSpotLights: t.spot.length, numHemiLights: t.hemi.length, pointLightShadows: t.shadowsPointLight, shadowMapEnabled: s.shadowMap.enabled && n.receiveShadow && 0 < t.shadows.length, shadowMapType: s.shadowMap.type, toneMapping: s.toneMapping, physicallyCorrectLights: s.physicallyCorrectLights, premultipliedAlpha: e.premultipliedAlpha, alphaTest: e.alphaTest, doubleSided: e.side === Ci.DoubleSide, flipSided: e.side === Ci.BackSide } ) }), (this.getProgramCode = function (e, t) { var i = [] if ((t.shaderID ? i.push(t.shaderID) : (i.push(e.fragmentShader), i.push(e.vertexShader)), void 0 !== e.defines)) for (var n in e.defines) i.push(n), i.push(e.defines[n]) for (var r = 0; r < a.length; r++) { var o = a[r] i.push(o), i.push(t[o]) } return i.join() }), (this.acquireProgram = function (e, t, i) { for (var n, r = 0, o = h.length; r < o; r++) { var a = h[r] if (a.code === i) { ++(n = a).usedTimes break } } return void 0 === n && ((n = new Ci.WebGLProgram(s, i, e, t)), h.push(n)), n }), (this.releaseProgram = function (e) { if (0 == --e.usedTimes) { var t = h.indexOf(e) ;(h[t] = h[h.length - 1]), h.pop(), e.destroy() } }), (this.programs = h) }), (Ci.WebGLProperties = function () { var n = {} ;(this.get = function (e) { var t = e.uuid, i = n[t] return void 0 === i && ((i = {}), (n[t] = i)), i }), (this.delete = function (e) { delete n[e.uuid] }), (this.clear = function () { n = {} }) }), (Ci.WebGLShader = function (e, t, i) { var n = e.createShader(t) return ( e.shaderSource(n, i), e.compileShader(n), !1 === e.getShaderParameter(n, e.COMPILE_STATUS) && console.error("THREE.WebGLShader: Shader couldn't compile."), '' !== e.getShaderInfoLog(n) && console.warn( 'THREE.WebGLShader: gl.getShaderInfoLog()', t === e.VERTEX_SHADER ? 'vertex' : 'fragment', e.getShaderInfoLog(n), (function (e) { for (var t = e.split('\n'), i = 0; i < t.length; i++) t[i] = i + 1 + ': ' + t[i] return t.join('\n') })(i) ), n ) }), (Ci.WebGLShadowMap = function (P, O, L) { function D(e, t, i, n) { var r = e.geometry, o = null, a = p, s = e.customDepthMaterial if ((i && ((a = f), (s = e.customDistanceMaterial)), s)) o = s else { var l = void 0 !== r.morphTargets && 0 < r.morphTargets.length && t.morphTargets, c = e instanceof Ci.SkinnedMesh && t.skinning, h = 0 l && (h |= u), c && (h |= d), (o = a[h]) } return (o.visible = t.visible), (o.wireframe = t.wireframe), (o.wireframeLinewidth = t.wireframeLinewidth), i && void 0 !== o.uniforms.lightPos && o.uniforms.lightPos.value.copy(n), o } function N(e, t, i) { if (!1 !== e.visible) { if (e.layers.test(t.layers) && (e instanceof Ci.Mesh || e instanceof Ci.Line || e instanceof Ci.Points) && e.castShadow && (!1 === e.frustumCulled || !0 === V.intersectsObject(e))) !0 === e.material.visible && (e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, e.matrixWorld), G.push(e)) for (var n = e.children, r = 0, o = n.length; r < o; r++) N(n[r], t, i) } } for ( var F = P.context, B = P.state, V = new Ci.Frustum(), k = new Ci.Matrix4(), U = new Ci.Vector2(), H = new Ci.Vector3(), z = new Ci.Vector3(), G = [], u = 1, d = 2, e = 1 + (u | d), p = new Array(e), f = new Array(e), W = [new Ci.Vector3(1, 0, 0), new Ci.Vector3(-1, 0, 0), new Ci.Vector3(0, 0, 1), new Ci.Vector3(0, 0, -1), new Ci.Vector3(0, 1, 0), new Ci.Vector3(0, -1, 0)], j = [new Ci.Vector3(0, 1, 0), new Ci.Vector3(0, 1, 0), new Ci.Vector3(0, 1, 0), new Ci.Vector3(0, 1, 0), new Ci.Vector3(0, 0, 1), new Ci.Vector3(0, 0, -1)], Y = [new Ci.Vector4(), new Ci.Vector4(), new Ci.Vector4(), new Ci.Vector4(), new Ci.Vector4(), new Ci.Vector4()], t = Ci.ShaderLib.depthRGBA, i = Ci.UniformsUtils.clone(t.uniforms), n = Ci.ShaderLib.distanceRGBA, r = Ci.UniformsUtils.clone(n.uniforms), o = 0; o !== e; ++o ) { var a = 0 != (o & u), s = 0 != (o & d), l = new Ci.ShaderMaterial({ uniforms: i, vertexShader: t.vertexShader, fragmentShader: t.fragmentShader, morphTargets: a, skinning: s }) p[o] = l var c = new Ci.ShaderMaterial({ defines: { USE_SHADOWMAP: '' }, uniforms: r, vertexShader: n.vertexShader, fragmentShader: n.fragmentShader, morphTargets: a, skinning: s }) f[o] = c } var q = this ;(this.enabled = !1), (this.autoUpdate = !0), (this.needsUpdate = !1), (this.type = Ci.PCFShadowMap), (this.cullFace = Ci.CullFaceFront), (this.render = function (e, t) { var i, n, r = O.shadows if (0 !== r.length && !1 !== q.enabled && (!1 !== q.autoUpdate || !1 !== q.needsUpdate)) { B.clearColor(1, 1, 1, 1), B.disable(F.BLEND), B.enable(F.CULL_FACE), F.frontFace(F.CCW), F.cullFace(q.cullFace === Ci.CullFaceFront ? F.FRONT : F.BACK), B.setDepthTest(!0), B.setScissorTest(!1) for (var o = 0, a = r.length; o < a; o++) { var s = r[o], l = s.shadow, c = l.camera if ((U.copy(l.mapSize), s instanceof Ci.PointLight)) { ;(i = 6), (n = !0) var h = U.x, u = U.y Y[0].set(2 * h, u, h, u), Y[1].set(0, u, h, u), Y[2].set(3 * h, u, h, u), Y[3].set(h, u, h, u), Y[4].set(3 * h, 0, h, u), Y[5].set(h, 0, h, u), (U.x *= 4), (U.y *= 2) } else n = !(i = 1) if (null === l.map) { var d = { minFilter: Ci.NearestFilter, magFilter: Ci.NearestFilter, format: Ci.RGBAFormat } ;(l.map = new Ci.WebGLRenderTarget(U.x, U.y, d)), s instanceof Ci.SpotLight && (c.aspect = U.x / U.y), c.updateProjectionMatrix() } var p = l.map, f = l.matrix z.setFromMatrixPosition(s.matrixWorld), c.position.copy(z), P.setRenderTarget(p), P.clear() for (var g = 0; g < i; g++) { if (n) { H.copy(c.position), H.add(W[g]), c.up.copy(j[g]), c.lookAt(H) var m = Y[g] B.viewport(m) } else H.setFromMatrixPosition(s.target.matrixWorld), c.lookAt(H) c.updateMatrixWorld(), c.matrixWorldInverse.getInverse(c.matrixWorld), f.set(0.5, 0, 0, 0.5, 0, 0.5, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0, 0, 1), f.multiply(c.projectionMatrix), f.multiply(c.matrixWorldInverse), k.multiplyMatrices(c.projectionMatrix, c.matrixWorldInverse), V.setFromMatrix(k), (G.length = 0), N(e, t, c) for (var v = 0, y = G.length; v < y; v++) { var A = G[v], C = L.update(A), I = A.material if (I instanceof Ci.MultiMaterial) for (var E = C.groups, _ = I.materials, b = 0, w = E.length; b < w; b++) { var T = E[b], x = _[T.materialIndex] if (!0 === x.visible) { var S = D(A, x, n, z) P.renderBufferDirect(c, null, C, S, A, T) } } else { S = D(A, I, n, z) P.renderBufferDirect(c, null, C, S, A, null) } } } } var M = P.getClearColor(), R = P.getClearAlpha() P.setClearColor(M, R), B.enable(F.BLEND), q.cullFace === Ci.CullFaceFront && F.cullFace(F.BACK), (q.needsUpdate = !1) } }) }), (Ci.WebGLState = function (l, i, c) { var n = this, r = new Ci.Vector4(), o = new Uint8Array(16), a = new Uint8Array(16), s = new Uint8Array(16), t = {}, h = null, u = null, d = null, p = null, f = null, g = null, m = null, v = null, y = !1, A = null, C = null, I = null, E = null, _ = null, b = null, w = null, T = null, x = null, S = null, M = null, R = null, P = null, O = null, L = null, D = l.getParameter(l.MAX_TEXTURE_IMAGE_UNITS), N = void 0, F = {}, B = new Ci.Vector4(), V = null, k = null, U = new Ci.Vector4(), H = new Ci.Vector4(), z = l.createTexture() l.bindTexture(l.TEXTURE_2D, z), l.texParameteri(l.TEXTURE_2D, l.TEXTURE_MIN_FILTER, l.LINEAR), l.texImage2D(l.TEXTURE_2D, 0, l.RGB, 1, 1, 0, l.RGB, l.UNSIGNED_BYTE, new Uint8Array(3)), (this.init = function () { this.clearColor(0, 0, 0, 1), this.clearDepth(1), this.clearStencil(0), this.enable(l.DEPTH_TEST), l.depthFunc(l.LEQUAL), l.frontFace(l.CCW), l.cullFace(l.BACK), this.enable(l.CULL_FACE), this.enable(l.BLEND), l.blendEquation(l.FUNC_ADD), l.blendFunc(l.SRC_ALPHA, l.ONE_MINUS_SRC_ALPHA) }), (this.initAttributes = function () { for (var e = 0, t = o.length; e < t; e++) o[e] = 0 }), (this.enableAttribute = function (e) { ;(o[e] = 1), 0 === a[e] && (l.enableVertexAttribArray(e), (a[e] = 1)), 0 !== s[e] && (i.get('ANGLE_instanced_arrays').vertexAttribDivisorANGLE(e, 0), (s[e] = 0)) }), (this.enableAttributeAndDivisor = function (e, t, i) { ;(o[e] = 1), 0 === a[e] && (l.enableVertexAttribArray(e), (a[e] = 1)), s[e] !== t && (i.vertexAttribDivisorANGLE(e, t), (s[e] = t)) }), (this.disableUnusedAttributes = function () { for (var e = 0, t = a.length; e < t; e++) a[e] !== o[e] && (l.disableVertexAttribArray(e), (a[e] = 0)) }), (this.enable = function (e) { !0 !== t[e] && (l.enable(e), (t[e] = !0)) }), (this.disable = function (e) { !1 !== t[e] && (l.disable(e), (t[e] = !1)) }), (this.getCompressedTextureFormats = function () { if (null === h && ((h = []), i.get('WEBGL_compressed_texture_pvrtc') || i.get('WEBGL_compressed_texture_s3tc') || i.get('WEBGL_compressed_texture_etc1'))) for (var e = l.getParameter(l.COMPRESSED_TEXTURE_FORMATS), t = 0; t < e.length; t++) h.push(e[t]) return h }), (this.setBlending = function (e, t, i, n, r, o, a, s) { e === Ci.NoBlending ? this.disable(l.BLEND) : this.enable(l.BLEND), (e === u && s === y) || (e === Ci.AdditiveBlending ? s ? (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.ONE, l.ONE, l.ONE, l.ONE)) : (l.blendEquation(l.FUNC_ADD), l.blendFunc(l.SRC_ALPHA, l.ONE)) : e === Ci.SubtractiveBlending ? s ? (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.ZERO, l.ZERO, l.ONE_MINUS_SRC_COLOR, l.ONE_MINUS_SRC_ALPHA)) : (l.blendEquation(l.FUNC_ADD), l.blendFunc(l.ZERO, l.ONE_MINUS_SRC_COLOR)) : e === Ci.MultiplyBlending ? s ? (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.ZERO, l.ZERO, l.SRC_COLOR, l.SRC_ALPHA)) : (l.blendEquation(l.FUNC_ADD), l.blendFunc(l.ZERO, l.SRC_COLOR)) : s ? (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.ONE, l.ONE_MINUS_SRC_ALPHA, l.ONE, l.ONE_MINUS_SRC_ALPHA)) : (l.blendEquationSeparate(l.FUNC_ADD, l.FUNC_ADD), l.blendFuncSeparate(l.SRC_ALPHA, l.ONE_MINUS_SRC_ALPHA, l.ONE, l.ONE_MINUS_SRC_ALPHA)), (u = e), (y = s)), e === Ci.CustomBlending ? ((r = r || t), (o = o || i), (a = a || n), (t === d && r === g) || (l.blendEquationSeparate(c(t), c(r)), (d = t), (g = r)), (i === p && n === f && o === m && a === v) || (l.blendFuncSeparate(c(i), c(n), c(o), c(a)), (p = i), (f = n), (m = o), (v = a))) : (v = m = g = f = p = d = null) }), (this.setDepthFunc = function (e) { if (A !== e) { if (e) switch (e) { case Ci.NeverDepth: l.depthFunc(l.NEVER) break case Ci.AlwaysDepth: l.depthFunc(l.ALWAYS) break case Ci.LessDepth: l.depthFunc(l.LESS) break case Ci.LessEqualDepth: l.depthFunc(l.LEQUAL) break case Ci.EqualDepth: l.depthFunc(l.EQUAL) break case Ci.GreaterEqualDepth: l.depthFunc(l.GEQUAL) break case Ci.GreaterDepth: l.depthFunc(l.GREATER) break case Ci.NotEqualDepth: l.depthFunc(l.NOTEQUAL) break default: l.depthFunc(l.LEQUAL) } else l.depthFunc(l.LEQUAL) A = e } }), (this.setDepthTest = function (e) { e ? this.enable(l.DEPTH_TEST) : this.disable(l.DEPTH_TEST) }), (this.setDepthWrite = function (e) { C !== e && (l.depthMask(e), (C = e)) }), (this.setColorWrite = function (e) { I !== e && (l.colorMask(e, e, e, e), (I = e)) }), (this.setStencilFunc = function (e, t, i) { ;(_ === e && b === t && w === i) || (l.stencilFunc(e, t, i), (_ = e), (b = t), (w = i)) }), (this.setStencilOp = function (e, t, i) { ;(T === e && x === t && S === i) || (l.stencilOp(e, t, i), (T = e), (x = t), (S = i)) }), (this.setStencilTest = function (e) { e ? this.enable(l.STENCIL_TEST) : this.disable(l.STENCIL_TEST) }), (this.setStencilWrite = function (e) { E !== e && (l.stencilMask(e), (E = e)) }), (this.setFlipSided = function (e) { M !== e && (e ? l.frontFace(l.CW) : l.frontFace(l.CCW), (M = e)) }), (this.setLineWidth = function (e) { e !== R && (l.lineWidth(e), (R = e)) }), (this.setPolygonOffset = function (e, t, i) { e ? this.enable(l.POLYGON_OFFSET_FILL) : this.disable(l.POLYGON_OFFSET_FILL), !e || (P === t && O === i) || (l.polygonOffset(t, i), (P = t), (O = i)) }), (this.getScissorTest = function () { return L }), (this.setScissorTest = function (e) { ;(L = e) ? this.enable(l.SCISSOR_TEST) : this.disable(l.SCISSOR_TEST) }), (this.activeTexture = function (e) { void 0 === e && (e = l.TEXTURE0 + D - 1), N !== e && (l.activeTexture(e), (N = e)) }), (this.bindTexture = function (e, t) { void 0 === N && n.activeTexture() var i = F[N] void 0 === i && ((i = { type: void 0, texture: void 0 }), (F[N] = i)), (i.type === e && i.texture === t) || (l.bindTexture(e, t || z), (i.type = e), (i.texture = t)) }), (this.compressedTexImage2D = function () { try { l.compressedTexImage2D.apply(l, arguments) } catch (e) { console.error(e) } }), (this.texImage2D = function () { try { l.texImage2D.apply(l, arguments) } catch (e) { console.error(e) } }), (this.clearColor = function (e, t, i, n) { r.set(e, t, i, n), !1 === B.equals(r) && (l.clearColor(e, t, i, n), B.copy(r)) }), (this.clearDepth = function (e) { V !== e && (l.clearDepth(e), (V = e)) }), (this.clearStencil = function (e) { k !== e && (l.clearStencil(e), (k = e)) }), (this.scissor = function (e) { !1 === U.equals(e) && (l.scissor(e.x, e.y, e.z, e.w), U.copy(e)) }), (this.viewport = function (e) { !1 === H.equals(e) && (l.viewport(e.x, e.y, e.z, e.w), H.copy(e)) }), (this.reset = function () { for (var e = 0; e < a.length; e++) 1 === a[e] && (l.disableVertexAttribArray(e), (a[e] = 0)) ;(t = {}), (N = void 0), (F = {}), (M = E = C = I = u = h = null) }) }), (Ci.LensFlarePlugin = function (v, y) { function A() { var e, t = new Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1]), i = new Uint16Array([0, 1, 2, 0, 2, 3]) ;(C = S.createBuffer()), (I = S.createBuffer()), S.bindBuffer(S.ARRAY_BUFFER, C), S.bufferData(S.ARRAY_BUFFER, t, S.STATIC_DRAW), S.bindBuffer(S.ELEMENT_ARRAY_BUFFER, I), S.bufferData(S.ELEMENT_ARRAY_BUFFER, i, S.STATIC_DRAW), (T = S.createTexture()), (x = S.createTexture()), M.bindTexture(S.TEXTURE_2D, T), S.texImage2D(S.TEXTURE_2D, 0, S.RGB, 16, 16, 0, S.RGB, S.UNSIGNED_BYTE, null), S.texParameteri(S.TEXTURE_2D, S.TEXTURE_WRAP_S, S.CLAMP_TO_EDGE), S.texParameteri(S.TEXTURE_2D, S.TEXTURE_WRAP_T, S.CLAMP_TO_EDGE), S.texParameteri(S.TEXTURE_2D, S.TEXTURE_MAG_FILTER, S.NEAREST), S.texParameteri(S.TEXTURE_2D, S.TEXTURE_MIN_FILTER, S.NEAREST), M.bindTexture(S.TEXTURE_2D, x), S.texImage2D(S.TEXTURE_2D, 0, S.RGBA, 16, 16, 0, S.RGBA, S.UNSIGNED_BYTE, null), S.texParameteri(S.TEXTURE_2D, S.TEXTURE_WRAP_S, S.CLAMP_TO_EDGE), S.texParameteri(S.TEXTURE_2D, S.TEXTURE_WRAP_T, S.CLAMP_TO_EDGE), S.texParameteri(S.TEXTURE_2D, S.TEXTURE_MAG_FILTER, S.NEAREST), S.texParameteri(S.TEXTURE_2D, S.TEXTURE_MIN_FILTER, S.NEAREST), (e = (w = 0 < S.getParameter(S.MAX_VERTEX_TEXTURE_IMAGE_UNITS)) ? { vertexShader: [ 'uniform lowp int renderType;', 'uniform vec3 screenPosition;', 'uniform vec2 scale;', 'uniform float rotation;', 'uniform sampler2D occlusionMap;', 'attribute vec2 position;', 'attribute vec2 uv;', 'varying vec2 vUV;', 'varying float vVisibility;', 'void main() {', 'vUV = uv;', 'vec2 pos = position;', 'if ( renderType == 2 ) {', 'vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );', 'visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );', 'visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );', 'visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );', 'visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );', 'visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );', 'visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );', 'visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );', 'visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );', 'vVisibility = visibility.r / 9.0;', 'vVisibility *= 1.0 - visibility.g / 9.0;', 'vVisibility *= visibility.b / 9.0;', 'vVisibility *= 1.0 - visibility.a / 9.0;', 'pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;', 'pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;', '}', 'gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );', '}' ].join('\n'), fragmentShader: [ 'uniform lowp int renderType;', 'uniform sampler2D map;', 'uniform float opacity;', 'uniform vec3 color;', 'varying vec2 vUV;', 'varying float vVisibility;', 'void main() {', 'if ( renderType == 0 ) {', 'gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );', '} else if ( renderType == 1 ) {', 'gl_FragColor = texture2D( map, vUV );', '} else {', 'vec4 texture = texture2D( map, vUV );', 'texture.a *= opacity * vVisibility;', 'gl_FragColor = texture;', 'gl_FragColor.rgb *= color;', '}', '}' ].join('\n') } : { vertexShader: [ 'uniform lowp int renderType;', 'uniform vec3 screenPosition;', 'uniform vec2 scale;', 'uniform float rotation;', 'attribute vec2 position;', 'attribute vec2 uv;', 'varying vec2 vUV;', 'void main() {', 'vUV = uv;', 'vec2 pos = position;', 'if ( renderType == 2 ) {', 'pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;', 'pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;', '}', 'gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );', '}' ].join('\n'), fragmentShader: [ 'precision mediump float;', 'uniform lowp int renderType;', 'uniform sampler2D map;', 'uniform sampler2D occlusionMap;', 'uniform float opacity;', 'uniform vec3 color;', 'varying vec2 vUV;', 'void main() {', 'if ( renderType == 0 ) {', 'gl_FragColor = vec4( texture2D( map, vUV ).rgb, 0.0 );', '} else if ( renderType == 1 ) {', 'gl_FragColor = texture2D( map, vUV );', '} else {', 'float visibility = texture2D( occlusionMap, vec2( 0.5, 0.1 ) ).a;', 'visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) ).a;', 'visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) ).a;', 'visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) ).a;', 'visibility = ( 1.0 - visibility / 4.0 );', 'vec4 texture = texture2D( map, vUV );', 'texture.a *= opacity * visibility;', 'gl_FragColor = texture;', 'gl_FragColor.rgb *= color;', '}', '}' ].join('\n') }), (E = (function (e) { var t = S.createProgram(), i = S.createShader(S.FRAGMENT_SHADER), n = S.createShader(S.VERTEX_SHADER), r = 'precision ' + v.getPrecision() + ' float;\n' return ( S.shaderSource(i, r + e.fragmentShader), S.shaderSource(n, r + e.vertexShader), S.compileShader(i), S.compileShader(n), S.attachShader(t, i), S.attachShader(t, n), S.linkProgram(t), t ) })(e)), (_ = { vertex: S.getAttribLocation(E, 'position'), uv: S.getAttribLocation(E, 'uv') }), (b = { renderType: S.getUniformLocation(E, 'renderType'), map: S.getUniformLocation(E, 'map'), occlusionMap: S.getUniformLocation(E, 'occlusionMap'), opacity: S.getUniformLocation(E, 'opacity'), color: S.getUniformLocation(E, 'color'), scale: S.getUniformLocation(E, 'scale'), rotation: S.getUniformLocation(E, 'rotation'), screenPosition: S.getUniformLocation(E, 'screenPosition') }) } var C, I, E, _, b, w, T, x, S = v.context, M = v.state this.render = function (e, t, i) { if (0 !== y.length) { var n = new Ci.Vector3(), r = i.w / i.z, o = 0.5 * i.z, a = 0.5 * i.w, s = 16 / i.w, l = new Ci.Vector2(s * r, s), c = new Ci.Vector3(1, 1, 0), h = new Ci.Vector2(1, 1) void 0 === E && A(), S.useProgram(E), M.initAttributes(), M.enableAttribute(_.vertex), M.enableAttribute(_.uv), M.disableUnusedAttributes(), S.uniform1i(b.occlusionMap, 0), S.uniform1i(b.map, 1), S.bindBuffer(S.ARRAY_BUFFER, C), S.vertexAttribPointer(_.vertex, 2, S.FLOAT, !1, 16, 0), S.vertexAttribPointer(_.uv, 2, S.FLOAT, !1, 16, 8), S.bindBuffer(S.ELEMENT_ARRAY_BUFFER, I), M.disable(S.CULL_FACE), M.setDepthWrite(!1) for (var u = 0, d = y.length; u < d; u++) { ;(s = 16 / i.w), l.set(s * r, s) var p = y[u] if ( (n.set(p.matrixWorld.elements[12], p.matrixWorld.elements[13], p.matrixWorld.elements[14]), n.applyMatrix4(t.matrixWorldInverse), n.applyProjection(t.projectionMatrix), c.copy(n), (h.x = c.x * o + o), (h.y = c.y * a + a), w || (0 < h.x && h.x < i.z && 0 < h.y && h.y < i.w)) ) { M.activeTexture(S.TEXTURE0), M.bindTexture(S.TEXTURE_2D, null), M.activeTexture(S.TEXTURE1), M.bindTexture(S.TEXTURE_2D, T), S.copyTexImage2D(S.TEXTURE_2D, 0, S.RGB, i.x + h.x - 8, i.y + h.y - 8, 16, 16, 0), S.uniform1i(b.renderType, 0), S.uniform2f(b.scale, l.x, l.y), S.uniform3f(b.screenPosition, c.x, c.y, c.z), M.disable(S.BLEND), M.enable(S.DEPTH_TEST), S.drawElements(S.TRIANGLES, 6, S.UNSIGNED_SHORT, 0), M.activeTexture(S.TEXTURE0), M.bindTexture(S.TEXTURE_2D, x), S.copyTexImage2D(S.TEXTURE_2D, 0, S.RGBA, i.x + h.x - 8, i.y + h.y - 8, 16, 16, 0), S.uniform1i(b.renderType, 1), M.disable(S.DEPTH_TEST), M.activeTexture(S.TEXTURE1), M.bindTexture(S.TEXTURE_2D, T), S.drawElements(S.TRIANGLES, 6, S.UNSIGNED_SHORT, 0), p.positionScreen.copy(c), p.customUpdateCallback ? p.customUpdateCallback(p) : p.updateLensFlares(), S.uniform1i(b.renderType, 2), M.enable(S.BLEND) for (var f = 0, g = p.lensFlares.length; f < g; f++) { var m = p.lensFlares[f] 0.001 < m.opacity && 0.001 < m.scale && ((c.x = m.x), (c.y = m.y), (c.z = m.z), (s = (m.size * m.scale) / i.w), (l.x = s * r), (l.y = s), S.uniform3f(b.screenPosition, c.x, c.y, c.z), S.uniform2f(b.scale, l.x, l.y), S.uniform1f(b.rotation, m.rotation), S.uniform1f(b.opacity, m.opacity), S.uniform3f(b.color, m.color.r, m.color.g, m.color.b), M.setBlending(m.blending, m.blendEquation, m.blendSrc, m.blendDst), v.setTexture(m.texture, 1), S.drawElements(S.TRIANGLES, 6, S.UNSIGNED_SHORT, 0)) } } } M.enable(S.CULL_FACE), M.enable(S.DEPTH_TEST), M.setDepthWrite(!0), v.resetGLState() } } }), (Ci.SpritePlugin = function (u, d) { function p() { var e = new Float32Array([-0.5, -0.5, 0, 0, 0.5, -0.5, 1, 0, 0.5, 0.5, 1, 1, -0.5, 0.5, 0, 1]), t = new Uint16Array([0, 1, 2, 0, 2, 3]) ;(g = I.createBuffer()), (m = I.createBuffer()), I.bindBuffer(I.ARRAY_BUFFER, g), I.bufferData(I.ARRAY_BUFFER, e, I.STATIC_DRAW), I.bindBuffer(I.ELEMENT_ARRAY_BUFFER, m), I.bufferData(I.ELEMENT_ARRAY_BUFFER, t, I.STATIC_DRAW), (v = (function () { var e = I.createProgram(), t = I.createShader(I.VERTEX_SHADER), i = I.createShader(I.FRAGMENT_SHADER) return ( I.shaderSource( t, [ 'precision ' + u.getPrecision() + ' float;', 'uniform mat4 modelViewMatrix;', 'uniform mat4 projectionMatrix;', 'uniform float rotation;', 'uniform vec2 scale;', 'uniform vec2 uvOffset;', 'uniform vec2 uvScale;', 'attribute vec2 position;', 'attribute vec2 uv;', 'varying vec2 vUV;', 'void main() {', 'vUV = uvOffset + uv * uvScale;', 'vec2 alignedPosition = position * scale;', 'vec2 rotatedPosition;', 'rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;', 'rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;', 'vec4 finalPosition;', 'finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );', 'finalPosition.xy += rotatedPosition;', 'finalPosition = projectionMatrix * finalPosition;', 'gl_Position = finalPosition;', '}' ].join('\n') ), I.shaderSource( i, [ 'precision ' + u.getPrecision() + ' float;', 'uniform vec3 color;', 'uniform sampler2D map;', 'uniform float opacity;', 'uniform int fogType;', 'uniform vec3 fogColor;', 'uniform float fogDensity;', 'uniform float fogNear;', 'uniform float fogFar;', 'uniform float alphaTest;', 'varying vec2 vUV;', 'void main() {', 'vec4 texture = texture2D( map, vUV );', 'if ( texture.a < alphaTest ) discard;', 'gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );', 'if ( fogType > 0 ) {', 'float depth = gl_FragCoord.z / gl_FragCoord.w;', 'float fogFactor = 0.0;', 'if ( fogType == 1 ) {', 'fogFactor = smoothstep( fogNear, fogFar, depth );', '} else {', 'const float LOG2 = 1.442695;', 'fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );', 'fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );', '}', 'gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );', '}', '}' ].join('\n') ), I.compileShader(t), I.compileShader(i), I.attachShader(e, t), I.attachShader(e, i), I.linkProgram(e), e ) })()), (y = { position: I.getAttribLocation(v, 'position'), uv: I.getAttribLocation(v, 'uv') }), (A = { uvOffset: I.getUniformLocation(v, 'uvOffset'), uvScale: I.getUniformLocation(v, 'uvScale'), rotation: I.getUniformLocation(v, 'rotation'), scale: I.getUniformLocation(v, 'scale'), color: I.getUniformLocation(v, 'color'), map: I.getUniformLocation(v, 'map'), opacity: I.getUniformLocation(v, 'opacity'), modelViewMatrix: I.getUniformLocation(v, 'modelViewMatrix'), projectionMatrix: I.getUniformLocation(v, 'projectionMatrix'), fogType: I.getUniformLocation(v, 'fogType'), fogDensity: I.getUniformLocation(v, 'fogDensity'), fogNear: I.getUniformLocation(v, 'fogNear'), fogFar: I.getUniformLocation(v, 'fogFar'), fogColor: I.getUniformLocation(v, 'fogColor'), alphaTest: I.getUniformLocation(v, 'alphaTest') }) var i = document.createElement('canvas') ;(i.width = 8), (i.height = 8) var n = i.getContext('2d') ;(n.fillStyle = 'white'), n.fillRect(0, 0, 8, 8), ((C = new Ci.Texture(i)).needsUpdate = !0) } function f(e, t) { return e.renderOrder !== t.renderOrder ? e.renderOrder - t.renderOrder : e.z !== t.z ? t.z - e.z : t.id - e.id } var g, m, v, y, A, C, I = u.context, E = u.state, _ = new Ci.Vector3(), b = new Ci.Quaternion(), w = new Ci.Vector3() this.render = function (e, t) { if (0 !== d.length) { void 0 === v && p(), I.useProgram(v), E.initAttributes(), E.enableAttribute(y.position), E.enableAttribute(y.uv), E.disableUnusedAttributes(), E.disable(I.CULL_FACE), E.enable(I.BLEND), I.bindBuffer(I.ARRAY_BUFFER, g), I.vertexAttribPointer(y.position, 2, I.FLOAT, !1, 16, 0), I.vertexAttribPointer(y.uv, 2, I.FLOAT, !1, 16, 8), I.bindBuffer(I.ELEMENT_ARRAY_BUFFER, m), I.uniformMatrix4fv(A.projectionMatrix, !1, t.projectionMatrix.elements), E.activeTexture(I.TEXTURE0), I.uniform1i(A.map, 0) var i = 0, n = 0, r = e.fog r ? (I.uniform3f(A.fogColor, r.color.r, r.color.g, r.color.b), r instanceof Ci.Fog ? (I.uniform1f(A.fogNear, r.near), I.uniform1f(A.fogFar, r.far), I.uniform1i(A.fogType, 1), (n = i = 1)) : r instanceof Ci.FogExp2 && (I.uniform1f(A.fogDensity, r.density), I.uniform1i(A.fogType, 2), (n = i = 2))) : (I.uniform1i(A.fogType, 0), (n = i = 0)) for (var o = 0, a = d.length; o < a; o++) { ;(l = d[o]).modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, l.matrixWorld), (l.z = -l.modelViewMatrix.elements[14]) } d.sort(f) var s = [] for (o = 0, a = d.length; o < a; o++) { var l, c = (l = d[o]).material I.uniform1f(A.alphaTest, c.alphaTest), I.uniformMatrix4fv(A.modelViewMatrix, !1, l.modelViewMatrix.elements), l.matrixWorld.decompose(_, b, w), (s[0] = w.x), (s[1] = w.y) var h = 0 e.fog && c.fog && (h = n), i !== h && (I.uniform1i(A.fogType, h), (i = h)), null !== c.map ? (I.uniform2f(A.uvOffset, c.map.offset.x, c.map.offset.y), I.uniform2f(A.uvScale, c.map.repeat.x, c.map.repeat.y)) : (I.uniform2f(A.uvOffset, 0, 0), I.uniform2f(A.uvScale, 1, 1)), I.uniform1f(A.opacity, c.opacity), I.uniform3f(A.color, c.color.r, c.color.g, c.color.b), I.uniform1f(A.rotation, c.rotation), I.uniform2fv(A.scale, s), E.setBlending(c.blending, c.blendEquation, c.blendSrc, c.blendDst), E.setDepthTest(c.depthTest), E.setDepthWrite(c.depthWrite), c.map && c.map.image && c.map.image.width ? u.setTexture(c.map, 0) : u.setTexture(C, 0), I.drawElements(I.TRIANGLES, 6, I.UNSIGNED_SHORT, 0) } E.enable(I.CULL_FACE), u.resetGLState() } } }), Object.defineProperties(Ci.Box2.prototype, { empty: { value: function () { return console.warn('THREE.Box2: .empty() has been renamed to .isEmpty().'), this.isEmpty() } }, isIntersectionBox: { value: function (e) { return console.warn('THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().'), this.intersectsBox(e) } } }), Object.defineProperties(Ci.Box3.prototype, { empty: { value: function () { return console.warn('THREE.Box3: .empty() has been renamed to .isEmpty().'), this.isEmpty() } }, isIntersectionBox: { value: function (e) { return console.warn('THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().'), this.intersectsBox(e) } }, isIntersectionSphere: { value: function (e) { return console.warn('THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().'), this.intersectsSphere(e) } } }), Object.defineProperties(Ci.Matrix3.prototype, { multiplyVector3: { value: function (e) { return console.warn('THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.'), e.applyMatrix3(this) } }, multiplyVector3Array: { value: function (e) { return console.warn('THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.'), this.applyToVector3Array(e) } } }), Object.defineProperties(Ci.Matrix4.prototype, { extractPosition: { value: function (e) { return console.warn('THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().'), this.copyPosition(e) } }, setRotationFromQuaternion: { value: function (e) { return console.warn('THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().'), this.makeRotationFromQuaternion(e) } }, multiplyVector3: { value: function (e) { return console.warn('THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.'), e.applyProjection(this) } }, multiplyVector4: { value: function (e) { return console.warn('THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.'), e.applyMatrix4(this) } }, multiplyVector3Array: { value: function (e) { return console.warn('THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.'), this.applyToVector3Array(e) } }, rotateAxis: { value: function (e) { console.warn('THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.'), e.transformDirection(this) } }, crossVector: { value: function (e) { return console.warn('THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.'), e.applyMatrix4(this) } }, translate: { value: function (e) { console.error('THREE.Matrix4: .translate() has been removed.') } }, rotateX: { value: function (e) { console.error('THREE.Matrix4: .rotateX() has been removed.') } }, rotateY: { value: function (e) { console.error('THREE.Matrix4: .rotateY() has been removed.') } }, rotateZ: { value: function (e) { console.error('THREE.Matrix4: .rotateZ() has been removed.') } }, rotateByAxis: { value: function (e, t) { console.error('THREE.Matrix4: .rotateByAxis() has been removed.') } } }), Object.defineProperties(Ci.Plane.prototype, { isIntersectionLine: { value: function (e) { return console.warn('THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().'), this.intersectsLine(e) } } }), Object.defineProperties(Ci.Quaternion.prototype, { multiplyVector3: { value: function (e) { return console.warn('THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.'), e.applyQuaternion(this) } } }), Object.defineProperties(Ci.Ray.prototype, { isIntersectionBox: { value: function (e) { return console.warn('THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().'), this.intersectsBox(e) } }, isIntersectionPlane: { value: function (e) { return console.warn('THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().'), this.intersectsPlane(e) } }, isIntersectionSphere: { value: function (e) { return console.warn('THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().'), this.intersectsSphere(e) } } }), Object.defineProperties(Ci.Vector3.prototype, { setEulerFromRotationMatrix: { value: function () { console.error('THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.') } }, setEulerFromQuaternion: { value: function () { console.error('THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.') } }, getPositionFromMatrix: { value: function (e) { return console.warn('THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().'), this.setFromMatrixPosition(e) } }, getScaleFromMatrix: { value: function (e) { return console.warn('THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().'), this.setFromMatrixScale(e) } }, getColumnFromMatrix: { value: function (e, t) { return console.warn('THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().'), this.setFromMatrixColumn(e, t) } } }), (Ci.Face4 = function (e, t, i, n, r, o, a) { return console.warn('THREE.Face4 has been removed. A THREE.Face3 will be created instead.'), new Ci.Face3(e, t, i, r, o, a) }), (Ci.Vertex = function (e, t, i) { return console.warn('THREE.Vertex has been removed. Use THREE.Vector3 instead.'), new Ci.Vector3(e, t, i) }), Object.defineProperties(Ci.Object3D.prototype, { eulerOrder: { get: function () { return console.warn('THREE.Object3D: .eulerOrder is now .rotation.order.'), this.rotation.order }, set: function (e) { console.warn('THREE.Object3D: .eulerOrder is now .rotation.order.'), (this.rotation.order = e) } }, getChildByName: { value: function (e) { return console.warn('THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().'), this.getObjectByName(e) } }, renderDepth: { set: function (e) { console.warn('THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.') } }, translate: { value: function (e, t) { return console.warn('THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.'), this.translateOnAxis(t, e) } }, useQuaternion: { get: function () { console.warn('THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.') }, set: function (e) { console.warn('THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.') } } }), Object.defineProperties(Ci, { PointCloud: { value: function (e, t) { return console.warn('THREE.PointCloud has been renamed to THREE.Points.'), new Ci.Points(e, t) } }, ParticleSystem: { value: function (e, t) { return console.warn('THREE.ParticleSystem has been renamed to THREE.Points.'), new Ci.Points(e, t) } } }), Object.defineProperties(Ci.Light.prototype, { onlyShadow: { set: function (e) { console.warn('THREE.Light: .onlyShadow has been removed.') } }, shadowCameraFov: { set: function (e) { console.warn('THREE.Light: .shadowCameraFov is now .shadow.camera.fov.'), (this.shadow.camera.fov = e) } }, shadowCameraLeft: { set: function (e) { console.warn('THREE.Light: .shadowCameraLeft is now .shadow.camera.left.'), (this.shadow.camera.left = e) } }, shadowCameraRight: { set: function (e) { console.warn('THREE.Light: .shadowCameraRight is now .shadow.camera.right.'), (this.shadow.camera.right = e) } }, shadowCameraTop: { set: function (e) { console.warn('THREE.Light: .shadowCameraTop is now .shadow.camera.top.'), (this.shadow.camera.top = e) } }, shadowCameraBottom: { set: function (e) { console.warn('THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.'), (this.shadow.camera.bottom = e) } }, shadowCameraNear: { set: function (e) { console.warn('THREE.Light: .shadowCameraNear is now .shadow.camera.near.'), (this.shadow.camera.near = e) } }, shadowCameraFar: { set: function (e) { console.warn('THREE.Light: .shadowCameraFar is now .shadow.camera.far.'), (this.shadow.camera.far = e) } }, shadowCameraVisible: { set: function (e) { console.warn('THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.') } }, shadowBias: { set: function (e) { console.warn('THREE.Light: .shadowBias is now .shadow.bias.'), (this.shadow.bias = e) } }, shadowDarkness: { set: function (e) { console.warn('THREE.Light: .shadowDarkness has been removed.') } }, shadowMapWidth: { set: function (e) { console.warn('THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.'), (this.shadow.mapSize.width = e) } }, shadowMapHeight: { set: function (e) { console.warn('THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.'), (this.shadow.mapSize.height = e) } } }), Object.defineProperties(Ci.BufferAttribute.prototype, { length: { get: function () { return console.warn('THREE.BufferAttribute: .length has been deprecated. Please use .count.'), this.array.length } } }), Object.defineProperties(Ci.BufferGeometry.prototype, { drawcalls: { get: function () { return console.error('THREE.BufferGeometry: .drawcalls has been renamed to .groups.'), this.groups } }, offsets: { get: function () { return console.warn('THREE.BufferGeometry: .offsets has been renamed to .groups.'), this.groups } }, addIndex: { value: function (e) { console.warn('THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().'), this.setIndex(e) } }, addDrawCall: { value: function (e, t, i) { void 0 !== i && console.warn('THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.'), console.warn('THREE.BufferGeometry: .addDrawCall() is now .addGroup().'), this.addGroup(e, t) } }, clearDrawCalls: { value: function () { console.warn('THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().'), this.clearGroups() } }, computeTangents: { value: function () { console.warn('THREE.BufferGeometry: .computeTangents() has been removed.') } }, computeOffsets: { value: function () { console.warn('THREE.BufferGeometry: .computeOffsets() has been removed.') } } }), Object.defineProperties(Ci.Material.prototype, { wrapAround: { get: function () { console.warn('THREE.' + this.type + ': .wrapAround has been removed.') }, set: function (e) { console.warn('THREE.' + this.type + ': .wrapAround has been removed.') } }, wrapRGB: { get: function () { return console.warn('THREE.' + this.type + ': .wrapRGB has been removed.'), new Ci.Color() } } }), Object.defineProperties(Ci, { PointCloudMaterial: { value: function (e) { return console.warn('THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.'), new Ci.PointsMaterial(e) } }, ParticleBasicMaterial: { value: function (e) { return console.warn('THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.'), new Ci.PointsMaterial(e) } }, ParticleSystemMaterial: { value: function (e) { return console.warn('THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.'), new Ci.PointsMaterial(e) } } }), Object.defineProperties(Ci.MeshPhongMaterial.prototype, { metal: { get: function () { return console.warn('THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.'), !1 }, set: function (e) { console.warn('THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead') } } }), Object.defineProperties(Ci.ShaderMaterial.prototype, { derivatives: { get: function () { return console.warn('THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.'), this.extensions.derivatives }, set: function (e) { console.warn('THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.'), (this.extensions.derivatives = e) } } }), Object.defineProperties(Ci.WebGLRenderer.prototype, { supportsFloatTextures: { value: function () { return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."), this.extensions.get('OES_texture_float') } }, supportsHalfFloatTextures: { value: function () { return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."), this.extensions.get('OES_texture_half_float') } }, supportsStandardDerivatives: { value: function () { return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."), this.extensions.get('OES_standard_derivatives') } }, supportsCompressedTextureS3TC: { value: function () { return ( console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."), this.extensions.get('WEBGL_compressed_texture_s3tc') ) } }, supportsCompressedTexturePVRTC: { value: function () { return ( console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."), this.extensions.get('WEBGL_compressed_texture_pvrtc') ) } }, supportsBlendMinMax: { value: function () { return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."), this.extensions.get('EXT_blend_minmax') } }, supportsVertexTextures: { value: function () { return this.capabilities.vertexTextures } }, supportsInstancedArrays: { value: function () { return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."), this.extensions.get('ANGLE_instanced_arrays') } }, enableScissorTest: { value: function (e) { console.warn('THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().'), this.setScissorTest(e) } }, initMaterial: { value: function () { console.warn('THREE.WebGLRenderer: .initMaterial() has been removed.') } }, addPrePlugin: { value: function () { console.warn('THREE.WebGLRenderer: .addPrePlugin() has been removed.') } }, addPostPlugin: { value: function () { console.warn('THREE.WebGLRenderer: .addPostPlugin() has been removed.') } }, updateShadowMap: { value: function () { console.warn('THREE.WebGLRenderer: .updateShadowMap() has been removed.') } }, shadowMapEnabled: { get: function () { return this.shadowMap.enabled }, set: function (e) { console.warn('THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.'), (this.shadowMap.enabled = e) } }, shadowMapType: { get: function () { return this.shadowMap.type }, set: function (e) { console.warn('THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.'), (this.shadowMap.type = e) } }, shadowMapCullFace: { get: function () { return this.shadowMap.cullFace }, set: function (e) { console.warn('THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.'), (this.shadowMap.cullFace = e) } } }), Object.defineProperties(Ci.WebGLRenderTarget.prototype, { wrapS: { get: function () { return console.warn('THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.'), this.texture.wrapS }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.'), (this.texture.wrapS = e) } }, wrapT: { get: function () { return console.warn('THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.'), this.texture.wrapT }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.'), (this.texture.wrapT = e) } }, magFilter: { get: function () { return console.warn('THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.'), this.texture.magFilter }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.'), (this.texture.magFilter = e) } }, minFilter: { get: function () { return console.warn('THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.'), this.texture.minFilter }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.'), (this.texture.minFilter = e) } }, anisotropy: { get: function () { return console.warn('THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.'), this.texture.anisotropy }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.'), (this.texture.anisotropy = e) } }, offset: { get: function () { return console.warn('THREE.WebGLRenderTarget: .offset is now .texture.offset.'), this.texture.offset }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .offset is now .texture.offset.'), (this.texture.offset = e) } }, repeat: { get: function () { return console.warn('THREE.WebGLRenderTarget: .repeat is now .texture.repeat.'), this.texture.repeat }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .repeat is now .texture.repeat.'), (this.texture.repeat = e) } }, format: { get: function () { return console.warn('THREE.WebGLRenderTarget: .format is now .texture.format.'), this.texture.format }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .format is now .texture.format.'), (this.texture.format = e) } }, type: { get: function () { return console.warn('THREE.WebGLRenderTarget: .type is now .texture.type.'), this.texture.type }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .type is now .texture.type.'), (this.texture.type = e) } }, generateMipmaps: { get: function () { return console.warn('THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.'), this.texture.generateMipmaps }, set: function (e) { console.warn('THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.'), (this.texture.generateMipmaps = e) } } }), (Ci.GeometryUtils = { merge: function (e, t, i) { var n console.warn('THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.'), t instanceof Ci.Mesh && (t.matrixAutoUpdate && t.updateMatrix(), (n = t.matrix), (t = t.geometry)), e.merge(t, n, i) }, center: function (e) { return console.warn('THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.'), e.center() } }), (Ci.ImageUtils = { crossOrigin: void 0, loadTexture: function (e, t, i, n) { console.warn('THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.') var r = new Ci.TextureLoader() r.setCrossOrigin(this.crossOrigin) var o = r.load(e, i, void 0, n) return t && (o.mapping = t), o }, loadTextureCube: function (e, t, i, n) { console.warn('THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.') var r = new Ci.CubeTextureLoader() r.setCrossOrigin(this.crossOrigin) var o = r.load(e, i, void 0, n) return t && (o.mapping = t), o }, loadCompressedTexture: function () { console.error('THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.') }, loadCompressedTextureCube: function () { console.error('THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.') } }), (Ci.Projector = function () { console.error('THREE.Projector has been moved to /examples/js/renderers/Projector.js.'), (this.projectVector = function (e, t) { console.warn('THREE.Projector: .projectVector() is now vector.project().'), e.project(t) }), (this.unprojectVector = function (e, t) { console.warn('THREE.Projector: .unprojectVector() is now vector.unproject().'), e.unproject(t) }), (this.pickingRay = function (e, t) { console.error('THREE.Projector: .pickingRay() is now raycaster.setFromCamera().') }) }), (Ci.CanvasRenderer = function () { console.error('THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js'), (this.domElement = document.createElement('canvas')), (this.clear = function () {}), (this.render = function () {}), (this.setClearColor = function () {}), (this.setSize = function () {}) }), (Ci.MeshFaceMaterial = Ci.MultiMaterial), (Ci.CurveUtils = { tangentQuadraticBezier: function (e, t, i, n) { return 2 * (1 - e) * (i - t) + 2 * e * (n - i) }, tangentCubicBezier: function (e, t, i, n, r) { return -3 * t * (1 - e) * (1 - e) + 3 * i * (1 - e) * (1 - e) - 6 * e * i * (1 - e) + 6 * e * n * (1 - e) - 3 * e * e * n + 3 * e * e * r }, tangentSpline: function (e, t, i, n, r) { return 6 * e * e - 6 * e + (3 * e * e - 4 * e + 1) + (-6 * e * e + 6 * e) + (3 * e * e - 2 * e) }, interpolate: function (e, t, i, n, r) { var o = 0.5 * (i - e), a = 0.5 * (n - t), s = r * r return (2 * t - 2 * i + o + a) * (r * s) + (-3 * t + 3 * i - 2 * o - a) * s + o * r + t } }), (Ci.SceneUtils = { createMultiMaterialObject: function (e, t) { for (var i = new Ci.Group(), n = 0, r = t.length; n < r; n++) i.add(new Ci.Mesh(e, t[n])) return i }, detach: function (e, t, i) { e.applyMatrix(t.matrixWorld), t.remove(e), i.add(e) }, attach: function (e, t, i) { var n = new Ci.Matrix4() n.getInverse(i.matrixWorld), e.applyMatrix(n), t.remove(e), i.add(e) } }), (Ci.ShapeUtils = { area: function (e) { for (var t = e.length, i = 0, n = t - 1, r = 0; r < t; n = r++) i += e[n].x * e[r].y - e[r].x * e[n].y return 0.5 * i }, triangulate: function (e, t) { var i = e.length if (i < 3) return null var n, r, o, a = [], s = [], l = [] if (0 < Ci.ShapeUtils.area(e)) for (r = 0; r < i; r++) s[r] = r else for (r = 0; r < i; r++) s[r] = i - 1 - r var c = i, h = 2 * c for (r = c - 1; 2 < c; ) { if (h-- <= 0) return console.warn('THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()'), t ? l : a if ((c <= (n = r) && (n = 0), c <= (r = n + 1) && (r = 0), c <= (o = r + 1) && (o = 0), Si(e, n, r, o, c, s))) { var u, d, p, f, g for (u = s[n], d = s[r], p = s[o], a.push([e[u], e[d], e[p]]), l.push([s[n], s[r], s[o]]), g = (f = r) + 1; g < c; f++, g++) s[f] = s[g] h = 2 * --c } } return t ? l : a }, triangulateShape: function (e, t) { function w(e, t, i) { return e.x !== t.x ? (e.x < t.x ? e.x <= i.x && i.x <= t.x : t.x <= i.x && i.x <= e.x) : e.y < t.y ? e.y <= i.y && i.y <= t.y : t.y <= i.y && i.y <= e.y } function b(e, t, i, n, r) { var o = t.x - e.x, a = t.y - e.y, s = n.x - i.x, l = n.y - i.y, c = e.x - i.x, h = e.y - i.y, u = a * s - o * l, d = a * c - o * h if (Math.abs(u) > Number.EPSILON) { var p if (0 < u) { if (d < 0 || u < d) return [] if ((p = l * c - s * h) < 0 || u < p) return [] } else { if (0 < d || d < u) return [] if (0 < (p = l * c - s * h) || p < u) return [] } if (0 === p) return !r || (0 != d && d != u) ? [e] : [] if (p === u) return !r || (0 != d && d != u) ? [t] : [] if (0 == d) return [i] if (d == u) return [n] var f = p / u return [ { x: e.x + f * o, y: e.y + f * a } ] } if (0 != d || l * c != s * h) return [] var g, m, v, y, A, C, I, E, _ = 0 == o && 0 == a, b = 0 == s && 0 == l return _ && b ? e.x !== i.x || e.y !== i.y ? [] : [e] : _ ? w(i, n, e) ? [e] : [] : b ? w(e, t, i) ? [i] : [] : ((E = 0 != o ? ((y = e.x < t.x ? ((v = (g = e).x), (m = t).x) : ((v = (g = t).x), (m = e).x)), i.x < n.x ? ((I = (A = i).x), (C = n).x) : ((I = (A = n).x), (C = i).x)) : ((y = e.y < t.y ? ((v = (g = e).y), (m = t).y) : ((v = (g = t).y), (m = e).y)), i.y < n.y ? ((I = (A = i).y), (C = n).y) : ((I = (A = n).y), (C = i).y))), v <= I ? (y < I ? [] : y === I ? (r ? [] : [A]) : y <= E ? [A, m] : [A, C]) : E < v ? [] : v === E ? (r ? [] : [g]) : y <= E ? [g, m] : [g, C]) } function T(e, t, i, n) { var r = t.x - e.x, o = t.y - e.y, a = i.x - e.x, s = i.y - e.y, l = n.x - e.x, c = n.y - e.y, h = r * s - o * a, u = r * c - o * l if (Math.abs(h) > Number.EPSILON) { var d = l * s - c * a return 0 < h ? 0 <= u && 0 <= d : 0 <= u || 0 <= d } return 0 < u } for (var i, n, r, o, a, s, l = {}, c = e.concat(), h = 0, u = t.length; h < u; h++) Array.prototype.push.apply(c, t[h]) for (i = 0, n = c.length; i < n; i++) void 0 !== l[(a = c[i].x + ':' + c[i].y)] && console.warn('THREE.Shape: Duplicate point', a), (l[a] = i) var d = (function (e, a) { function t(e, t) { var i = m.length - 1, n = e - 1 n < 0 && (n = i) var r = e + 1 i < r && (r = 0) var o = T(m[e], m[n], m[r], c[t]) if (!o) return !1 var a = c.length - 1, s = t - 1 s < 0 && (s = a) var l = t + 1 return a < l && (l = 0), !!(o = T(c[t], c[s], c[l], m[e])) } function i(e, t) { var i, n for (i = 0; i < m.length; i++) if (((n = i + 1), (n %= m.length), 0 < b(e, t, m[i], m[n], !0).length)) return !0 return !1 } function n(e, t) { var i, n, r, o for (i = 0; i < v.length; i++) for (n = a[v[i]], r = 0; r < n.length; r++) if (((o = r + 1), (o %= n.length), 0 < b(e, t, n[r], n[o], !0).length)) return !0 return !1 } for (var c, r, o, s, l, h, u, d, p, f, g, m = e.concat(), v = [], y = [], A = 0, C = a.length; A < C; A++) v.push(A) for (var I = 0, E = 2 * v.length; 0 < v.length; ) { if (--E < 0) { console.log('Infinite Loop! Holes left:' + v.length + ', Probably Hole outside Shape!') break } for (o = I; o < m.length; o++) { ;(s = m[o]), (r = -1) for (A = 0; A < v.length; A++) if (((h = v[A]), void 0 === y[(u = s.x + ':' + s.y + ':' + h)])) { c = a[h] for (var _ = 0; _ < c.length; _++) if (((l = c[_]), t(o, _) && !i(s, l) && !n(s, l))) { ;(r = _), v.splice(A, 1), (d = m.slice(0, o + 1)), (p = m.slice(o)), (f = c.slice(r)), (g = c.slice(0, r + 1)), (m = d.concat(f).concat(g).concat(p)), (I = o) break } if (0 <= r) break y[u] = !0 } if (0 <= r) break } } return m })(e, t), p = Ci.ShapeUtils.triangulate(d, !1) for (i = 0, n = p.length; i < n; i++) for (o = p[i], r = 0; r < 3; r++) void 0 !== (s = l[(a = o[r].x + ':' + o[r].y)]) && (o[r] = s) return p.concat() }, isClockWise: function (e) { return Ci.ShapeUtils.area(e) < 0 }, b2: function (e, t, i, n) { return ( (function (e, t) { var i = 1 - e return i * i * t })(e, t) + (function (e, t) { return 2 * (1 - e) * e * t })(e, i) + (function (e, t) { return e * e * t })(e, n) ) }, b3: function (e, t, i, n, r) { return ( (function (e, t) { var i = 1 - e return i * i * i * t })(e, t) + (function (e, t) { var i = 1 - e return 3 * i * i * e * t })(e, i) + (function (e, t) { return 3 * (1 - e) * e * e * t })(e, n) + (function (e, t) { return e * e * e * t })(e, r) ) } }), (Ci.Curve = function () {}), (Ci.Curve.prototype = { constructor: Ci.Curve, getPoint: function (e) { return console.warn('THREE.Curve: Warning, getPoint() not implemented!'), null }, getPointAt: function (e) { var t = this.getUtoTmapping(e) return this.getPoint(t) }, getPoints: function (e) { e = e || 5 var t, i = [] for (t = 0; t <= e; t++) i.push(this.getPoint(t / e)) return i }, getSpacedPoints: function (e) { e = e || 5 var t, i = [] for (t = 0; t <= e; t++) i.push(this.getPointAt(t / e)) return i }, getLength: function () { var e = this.getLengths() return e[e.length - 1] }, getLengths: function (e) { if (((e = e || (this.__arcLengthDivisions ? this.__arcLengthDivisions : 200)), this.cacheArcLengths && this.cacheArcLengths.length === e + 1 && !this.needsUpdate)) return this.cacheArcLengths this.needsUpdate = !1 var t, i, n = [], r = this.getPoint(0), o = 0 for (n.push(0), i = 1; i <= e; i++) (o += (t = this.getPoint(i / e)).distanceTo(r)), n.push(o), (r = t) return (this.cacheArcLengths = n) }, updateArcLengths: function () { ;(this.needsUpdate = !0), this.getLengths() }, getUtoTmapping: function (e, t) { var i, n = this.getLengths(), r = 0, o = n.length i = t || e * n[o - 1] for (var a, s = 0, l = o - 1; s <= l; ) if ((a = n[(r = Math.floor(s + (l - s) / 2))] - i) < 0) s = r + 1 else { if (!(0 < a)) { l = r break } l = r - 1 } if (n[(r = l)] === i) return r / (o - 1) var c = n[r] return (r + (i - c) / (n[r + 1] - c)) / (o - 1) }, getTangent: function (e) { var t = e - 1e-4, i = e + 1e-4 t < 0 && (t = 0), 1 < i && (i = 1) var n = this.getPoint(t) return this.getPoint(i).clone().sub(n).normalize() }, getTangentAt: function (e) { var t = this.getUtoTmapping(e) return this.getTangent(t) } }), (Ci.Curve.create = function (e, t) { return (e.prototype = Object.create(Ci.Curve.prototype)), ((e.prototype.constructor = e).prototype.getPoint = t), e }), (Ci.CurvePath = function () { ;(this.curves = []), (this.autoClose = !1) }), (Ci.CurvePath.prototype = Object.create(Ci.Curve.prototype)), (Ci.CurvePath.prototype.constructor = Ci.CurvePath), (Ci.CurvePath.prototype.add = function (e) { this.curves.push(e) }), (Ci.CurvePath.prototype.closePath = function () { var e = this.curves[0].getPoint(0), t = this.curves[this.curves.length - 1].getPoint(1) e.equals(t) || this.curves.push(new Ci.LineCurve(t, e)) }), (Ci.CurvePath.prototype.getPoint = function (e) { for (var t = e * this.getLength(), i = this.getCurveLengths(), n = 0; n < i.length; ) { if (i[n] >= t) { var r = i[n] - t, o = this.curves[n], a = 1 - r / o.getLength() return o.getPointAt(a) } n++ } return null }), (Ci.CurvePath.prototype.getLength = function () { var e = this.getCurveLengths() return e[e.length - 1] }), (Ci.CurvePath.prototype.getCurveLengths = function () { if (this.cacheLengths && this.cacheLengths.length === this.curves.length) return this.cacheLengths for (var e = [], t = 0, i = 0, n = this.curves.length; i < n; i++) (t += this.curves[i].getLength()), e.push(t) return (this.cacheLengths = e) }), (Ci.CurvePath.prototype.createPointsGeometry = function (e) { var t = this.getPoints(e) return this.createGeometry(t) }), (Ci.CurvePath.prototype.createSpacedPointsGeometry = function (e) { var t = this.getSpacedPoints(e) return this.createGeometry(t) }), (Ci.CurvePath.prototype.createGeometry = function (e) { for (var t = new Ci.Geometry(), i = 0, n = e.length; i < n; i++) { var r = e[i] t.vertices.push(new Ci.Vector3(r.x, r.y, r.z || 0)) } return t }), (Ci.Font = function (e) { this.data = e }), (Ci.Font.prototype = { constructor: Ci.Font, generateShapes: function (e, s, b) { function l(e, t, i) { var n = w.glyphs[e] || w.glyphs['?'] if (n) { var r, o, a, s, l, c, h, u, d, p, f, g = new Ci.Path(), m = [], v = Ci.ShapeUtils.b2, y = Ci.ShapeUtils.b3 if (n.o) for (var A = n._cachedOutline || (n._cachedOutline = n.o.split(' ')), C = 0, I = A.length; C < I; ) { switch (A[C++]) { case 'm': ;(r = A[C++] * t + i), (o = A[C++] * t), g.moveTo(r, o) break case 'l': ;(r = A[C++] * t + i), (o = A[C++] * t), g.lineTo(r, o) break case 'q': if (((a = A[C++] * t + i), (s = A[C++] * t), (h = A[C++] * t + i), (u = A[C++] * t), g.quadraticCurveTo(h, u, a, s), (f = m[m.length - 1]))) { ;(l = f.x), (c = f.y) for (var E = 1; E <= b; E++) { v((_ = E / b), l, h, a), v(_, c, u, s) } } break case 'b': if ( ((a = A[C++] * t + i), (s = A[C++] * t), (h = A[C++] * t + i), (u = A[C++] * t), (d = A[C++] * t + i), (p = A[C++] * t), g.bezierCurveTo(h, u, d, p, a, s), (f = m[m.length - 1])) ) { ;(l = f.x), (c = f.y) for (E = 1; E <= b; E++) { var _ y((_ = E / b), l, h, d, a), y(_, c, u, p, s) } } } } return { offset: n.ha * t, path: g } } } void 0 === s && (s = 100), void 0 === b && (b = 4) for ( var w = this.data, t = (function (e) { for (var t = String(e).split(''), i = s / w.resolution, n = 0, r = [], o = 0; o < t.length; o++) { var a = l(t[o], i, n) ;(n += a.offset), r.push(a.path) } return r })(e), i = [], n = 0, r = t.length; n < r; n++ ) Array.prototype.push.apply(i, t[n].toShapes()) return i } }), (Ci.Path = function (e) { Ci.CurvePath.call(this), (this.actions = []), e && this.fromPoints(e) }), (Ci.Path.prototype = Object.create(Ci.CurvePath.prototype)), (Ci.Path.prototype.constructor = Ci.Path), (Ci.Path.prototype.fromPoints = function (e) { this.moveTo(e[0].x, e[0].y) for (var t = 1, i = e.length; t < i; t++) this.lineTo(e[t].x, e[t].y) }), (Ci.Path.prototype.moveTo = function (e, t) { this.actions.push({ action: 'moveTo', args: [e, t] }) }), (Ci.Path.prototype.lineTo = function (e, t) { var i = this.actions[this.actions.length - 1].args, n = i[i.length - 2], r = i[i.length - 1], o = new Ci.LineCurve(new Ci.Vector2(n, r), new Ci.Vector2(e, t)) this.curves.push(o), this.actions.push({ action: 'lineTo', args: [e, t] }) }), (Ci.Path.prototype.quadraticCurveTo = function (e, t, i, n) { var r = this.actions[this.actions.length - 1].args, o = r[r.length - 2], a = r[r.length - 1], s = new Ci.QuadraticBezierCurve(new Ci.Vector2(o, a), new Ci.Vector2(e, t), new Ci.Vector2(i, n)) this.curves.push(s), this.actions.push({ action: 'quadraticCurveTo', args: [e, t, i, n] }) }), (Ci.Path.prototype.bezierCurveTo = function (e, t, i, n, r, o) { var a = this.actions[this.actions.length - 1].args, s = a[a.length - 2], l = a[a.length - 1], c = new Ci.CubicBezierCurve(new Ci.Vector2(s, l), new Ci.Vector2(e, t), new Ci.Vector2(i, n), new Ci.Vector2(r, o)) this.curves.push(c), this.actions.push({ action: 'bezierCurveTo', args: [e, t, i, n, r, o] }) }), (Ci.Path.prototype.splineThru = function (e) { var t = Array.prototype.slice.call(arguments), i = this.actions[this.actions.length - 1].args, n = i[i.length - 2], r = i[i.length - 1], o = [new Ci.Vector2(n, r)] Array.prototype.push.apply(o, e) var a = new Ci.SplineCurve(o) this.curves.push(a), this.actions.push({ action: 'splineThru', args: t }) }), (Ci.Path.prototype.arc = function (e, t, i, n, r, o) { var a = this.actions[this.actions.length - 1].args, s = a[a.length - 2], l = a[a.length - 1] this.absarc(e + s, t + l, i, n, r, o) }), (Ci.Path.prototype.absarc = function (e, t, i, n, r, o) { this.absellipse(e, t, i, i, n, r, o) }), (Ci.Path.prototype.ellipse = function (e, t, i, n, r, o, a, s) { var l = this.actions[this.actions.length - 1].args, c = l[l.length - 2], h = l[l.length - 1] this.absellipse(e + c, t + h, i, n, r, o, a, s) }), (Ci.Path.prototype.absellipse = function (e, t, i, n, r, o, a, s) { var l = [e, t, i, n, r, o, a, s || 0], c = new Ci.EllipseCurve(e, t, i, n, r, o, a, s) this.curves.push(c) var h = c.getPoint(1) l.push(h.x), l.push(h.y), this.actions.push({ action: 'ellipse', args: l }) }), (Ci.Path.prototype.getSpacedPoints = function (e) { e = e || 40 for (var t = [], i = 0; i < e; i++) t.push(this.getPoint(i / e)) return this.autoClose && t.push(t[0]), t }), (Ci.Path.prototype.getPoints = function (e) { e = e || 12 for (var t, i, n, r, o, a, s, l, c, h, u, d = Ci.ShapeUtils.b2, p = Ci.ShapeUtils.b3, f = [], g = 0, m = this.actions.length; g < m; g++) { var v = this.actions[g], y = v.action, A = v.args switch (y) { case 'moveTo': case 'lineTo': f.push(new Ci.Vector2(A[0], A[1])) break case 'quadraticCurveTo': ;(t = A[2]), (i = A[3]), (o = A[0]), (a = A[1]), (l = 0 < f.length ? ((s = (c = f[f.length - 1]).x), c.y) : ((s = (c = this.actions[g - 1].args)[c.length - 2]), c[c.length - 1])) for (var C = 1; C <= e; C++) { ;(h = d((O = C / e), s, o, t)), (u = d(O, l, a, i)), f.push(new Ci.Vector2(h, u)) } break case 'bezierCurveTo': ;(t = A[4]), (i = A[5]), (o = A[0]), (a = A[1]), (n = A[2]), (r = A[3]), (l = 0 < f.length ? ((s = (c = f[f.length - 1]).x), c.y) : ((s = (c = this.actions[g - 1].args)[c.length - 2]), c[c.length - 1])) for (C = 1; C <= e; C++) { ;(h = p((O = C / e), s, o, n, t)), (u = p(O, l, a, r, i)), f.push(new Ci.Vector2(h, u)) } break case 'splineThru': c = this.actions[g - 1].args var I = [new Ci.Vector2(c[c.length - 2], c[c.length - 1])], E = e * A[0].length I = I.concat(A[0]) var _ = new Ci.SplineCurve(I) for (C = 1; C <= E; C++) f.push(_.getPointAt(C / E)) break case 'arc': var b = A[0], w = A[1], T = A[2], x = A[3], S = A[4], M = !!A[5], R = S - x, P = 2 * e for (C = 1; C <= P; C++) { var O = C / P M || (O = 1 - O), (L = x + O * R), (h = b + T * Math.cos(L)), (u = w + T * Math.sin(L)), f.push(new Ci.Vector2(h, u)) } break case 'ellipse': ;(b = A[0]), (w = A[1]) var L, D, N, F = A[2], B = A[3], V = ((x = A[4]), (S = A[5]), (M = !!A[6]), A[7]) ;(R = S - x), (P = 2 * e) 0 !== V && ((D = Math.cos(V)), (N = Math.sin(V))) for (C = 1; C <= P; C++) { O = C / P if ((M || (O = 1 - O), (L = x + O * R), (h = b + F * Math.cos(L)), (u = w + B * Math.sin(L)), 0 !== V)) { var k = h ;(h = (k - b) * D - (u - w) * N + b), (u = (k - b) * N + (u - w) * D + w) } f.push(new Ci.Vector2(h, u)) } } } var U = f[f.length - 1] return Math.abs(U.x - f[0].x) < Number.EPSILON && Math.abs(U.y - f[0].y) < Number.EPSILON && f.splice(f.length - 1, 1), this.autoClose && f.push(f[0]), f }), (Ci.Path.prototype.toShapes = function (e, t) { function i(e) { for (var t = [], i = 0, n = e.length; i < n; i++) { var r = e[i], o = new Ci.Shape() ;(o.actions = r.actions), (o.curves = r.curves), t.push(o) } return t } function n(e, t) { for (var i = t.length, n = !1, r = i - 1, o = 0; o < i; r = o++) { var a = t[r], s = t[o], l = s.x - a.x, c = s.y - a.y if (Math.abs(c) > Number.EPSILON) { if ((c < 0 && ((a = t[o]), (l = -l), (s = t[r]), (c = -c)), e.y < a.y || e.y > s.y)) continue if (e.y === a.y) { if (e.x === a.x) return !0 } else { var h = c * (e.x - a.x) - l * (e.y - a.y) if (0 == h) return !0 if (h < 0) continue n = !n } } else { if (e.y !== a.y) continue if ((s.x <= e.x && e.x <= a.x) || (a.x <= e.x && e.x <= s.x)) return !0 } } return n } var r = Ci.ShapeUtils.isClockWise, o = (function (e) { for (var t = [], i = new Ci.Path(), n = 0, r = e.length; n < r; n++) { var o = e[n], a = o.args, s = o.action 'moveTo' === s && 0 !== i.actions.length && (t.push(i), (i = new Ci.Path())), i[s].apply(i, a) } return 0 !== i.actions.length && t.push(i), t })(this.actions) if (0 === o.length) return [] if (!0 === t) return i(o) var a, s, l, c = [] if (1 === o.length) return (s = o[0]), ((l = new Ci.Shape()).actions = s.actions), (l.curves = s.curves), c.push(l), c var h = !r(o[0].getPoints()) h = e ? !h : h var u, d = [], p = [], f = [], g = 0 ;(p[g] = void 0), (f[g] = []) for (var m = 0, v = o.length; m < v; m++) (a = r((u = (s = o[m]).getPoints()))), (a = e ? !a : a) ? (!h && p[g] && g++, (p[g] = { s: new Ci.Shape(), p: u }), (p[g].s.actions = s.actions), (p[g].s.curves = s.curves), h && g++, (f[g] = [])) : f[g].push({ h: s, p: u[0] }) if (!p[0]) return i(o) if (1 < p.length) { for (var y = !1, A = [], C = 0, I = p.length; C < I; C++) d[C] = [] for (C = 0, I = p.length; C < I; C++) for (var E = f[C], _ = 0; _ < E.length; _++) { for (var b = E[_], w = !0, T = 0; T < p.length; T++) n(b.p, p[T].p) && (C !== T && A.push({ froms: C, tos: T, hole: _ }), w ? ((w = !1), d[T].push(b)) : (y = !0)) w && d[C].push(b) } 0 < A.length && (y || (f = d)) } m = 0 for (var x, S = p.length; m < S; m++) { ;(l = p[m].s), c.push(l) for (var M = 0, R = (x = f[m]).length; M < R; M++) l.holes.push(x[M].h) } return c }), (Ci.Shape = function () { Ci.Path.apply(this, arguments), (this.holes = []) }), (Ci.Shape.prototype = Object.create(Ci.Path.prototype)), (Ci.Shape.prototype.constructor = Ci.Shape), (Ci.Shape.prototype.extrude = function (e) { return new Ci.ExtrudeGeometry(this, e) }), (Ci.Shape.prototype.makeGeometry = function (e) { return new Ci.ShapeGeometry(this, e) }), (Ci.Shape.prototype.getPointsHoles = function (e) { for (var t = [], i = 0, n = this.holes.length; i < n; i++) t[i] = this.holes[i].getPoints(e) return t }), (Ci.Shape.prototype.extractAllPoints = function (e) { return { shape: this.getPoints(e), holes: this.getPointsHoles(e) } }), (Ci.Shape.prototype.extractPoints = function (e) { return this.extractAllPoints(e) }), (Ci.LineCurve = function (e, t) { ;(this.v1 = e), (this.v2 = t) }), (Ci.LineCurve.prototype = Object.create(Ci.Curve.prototype)), (Ci.LineCurve.prototype.constructor = Ci.LineCurve), (Ci.LineCurve.prototype.getPoint = function (e) { var t = this.v2.clone().sub(this.v1) return t.multiplyScalar(e).add(this.v1), t }), (Ci.LineCurve.prototype.getPointAt = function (e) { return this.getPoint(e) }), (Ci.LineCurve.prototype.getTangent = function (e) { return this.v2.clone().sub(this.v1).normalize() }), (Ci.QuadraticBezierCurve = function (e, t, i) { ;(this.v0 = e), (this.v1 = t), (this.v2 = i) }), (Ci.QuadraticBezierCurve.prototype = Object.create(Ci.Curve.prototype)), (Ci.QuadraticBezierCurve.prototype.constructor = Ci.QuadraticBezierCurve), (Ci.QuadraticBezierCurve.prototype.getPoint = function (e) { var t = Ci.ShapeUtils.b2 return new Ci.Vector2(t(e, this.v0.x, this.v1.x, this.v2.x), t(e, this.v0.y, this.v1.y, this.v2.y)) }), (Ci.QuadraticBezierCurve.prototype.getTangent = function (e) { var t = Ci.CurveUtils.tangentQuadraticBezier return new Ci.Vector2(t(e, this.v0.x, this.v1.x, this.v2.x), t(e, this.v0.y, this.v1.y, this.v2.y)).normalize() }), (Ci.CubicBezierCurve = function (e, t, i, n) { ;(this.v0 = e), (this.v1 = t), (this.v2 = i), (this.v3 = n) }), (Ci.CubicBezierCurve.prototype = Object.create(Ci.Curve.prototype)), (Ci.CubicBezierCurve.prototype.constructor = Ci.CubicBezierCurve), (Ci.CubicBezierCurve.prototype.getPoint = function (e) { var t = Ci.ShapeUtils.b3 return new Ci.Vector2(t(e, this.v0.x, this.v1.x, this.v2.x, this.v3.x), t(e, this.v0.y, this.v1.y, this.v2.y, this.v3.y)) }), (Ci.CubicBezierCurve.prototype.getTangent = function (e) { var t = Ci.CurveUtils.tangentCubicBezier return new Ci.Vector2(t(e, this.v0.x, this.v1.x, this.v2.x, this.v3.x), t(e, this.v0.y, this.v1.y, this.v2.y, this.v3.y)).normalize() }), (Ci.SplineCurve = function (e) { this.points = null == e ? [] : e }), (Ci.SplineCurve.prototype = Object.create(Ci.Curve.prototype)), (Ci.SplineCurve.prototype.constructor = Ci.SplineCurve), (Ci.SplineCurve.prototype.getPoint = function (e) { var t = this.points, i = (t.length - 1) * e, n = Math.floor(i), r = i - n, o = t[0 === n ? n : n - 1], a = t[n], s = t[n > t.length - 2 ? t.length - 1 : n + 1], l = t[n > t.length - 3 ? t.length - 1 : n + 2], c = Ci.CurveUtils.interpolate return new Ci.Vector2(c(o.x, a.x, s.x, l.x, r), c(o.y, a.y, s.y, l.y, r)) }), (Ci.EllipseCurve = function (e, t, i, n, r, o, a, s) { ;(this.aX = e), (this.aY = t), (this.xRadius = i), (this.yRadius = n), (this.aStartAngle = r), (this.aEndAngle = o), (this.aClockwise = a), (this.aRotation = s || 0) }), (Ci.EllipseCurve.prototype = Object.create(Ci.Curve.prototype)), (Ci.EllipseCurve.prototype.constructor = Ci.EllipseCurve), (Ci.EllipseCurve.prototype.getPoint = function (e) { var t, i = this.aEndAngle - this.aStartAngle i < 0 && (i += 2 * Math.PI), i > 2 * Math.PI && (i -= 2 * Math.PI), (t = !0 === this.aClockwise ? this.aEndAngle + (1 - e) * (2 * Math.PI - i) : this.aStartAngle + e * i) var n = this.aX + this.xRadius * Math.cos(t), r = this.aY + this.yRadius * Math.sin(t) if (0 !== this.aRotation) { var o = Math.cos(this.aRotation), a = Math.sin(this.aRotation), s = n, l = r ;(n = (s - this.aX) * o - (l - this.aY) * a + this.aX), (r = (s - this.aX) * a + (l - this.aY) * o + this.aY) } return new Ci.Vector2(n, r) }), (Ci.ArcCurve = function (e, t, i, n, r, o) { Ci.EllipseCurve.call(this, e, t, i, i, n, r, o) }), (Ci.ArcCurve.prototype = Object.create(Ci.EllipseCurve.prototype)), (Ci.ArcCurve.prototype.constructor = Ci.ArcCurve), (Ci.LineCurve3 = Ci.Curve.create( function (e, t) { ;(this.v1 = e), (this.v2 = t) }, function (e) { var t = new Ci.Vector3() return t.subVectors(this.v2, this.v1), t.multiplyScalar(e), t.add(this.v1), t } )), (Ci.QuadraticBezierCurve3 = Ci.Curve.create( function (e, t, i) { ;(this.v0 = e), (this.v1 = t), (this.v2 = i) }, function (e) { var t = Ci.ShapeUtils.b2 return new Ci.Vector3(t(e, this.v0.x, this.v1.x, this.v2.x), t(e, this.v0.y, this.v1.y, this.v2.y), t(e, this.v0.z, this.v1.z, this.v2.z)) } )), (Ci.CubicBezierCurve3 = Ci.Curve.create( function (e, t, i, n) { ;(this.v0 = e), (this.v1 = t), (this.v2 = i), (this.v3 = n) }, function (e) { var t = Ci.ShapeUtils.b3 return new Ci.Vector3(t(e, this.v0.x, this.v1.x, this.v2.x, this.v3.x), t(e, this.v0.y, this.v1.y, this.v2.y, this.v3.y), t(e, this.v0.z, this.v1.z, this.v2.z, this.v3.z)) } )), (Ci.SplineCurve3 = Ci.Curve.create( function (e) { console.warn('THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3'), (this.points = null == e ? [] : e) }, function (e) { var t = this.points, i = (t.length - 1) * e, n = Math.floor(i), r = i - n, o = t[0 == n ? n : n - 1], a = t[n], s = t[n > t.length - 2 ? t.length - 1 : n + 1], l = t[n > t.length - 3 ? t.length - 1 : n + 2], c = Ci.CurveUtils.interpolate return new Ci.Vector3(c(o.x, a.x, s.x, l.x, r), c(o.y, a.y, s.y, l.y, r), c(o.z, a.z, s.z, l.z, r)) } )), (Ci.CatmullRomCurve3 = ((qt = new Ci.Vector3()), (Xt = new xi()), (Zt = new xi()), (Kt = new xi()), (xi.prototype.init = function (e, t, i, n) { ;(this.c0 = e), (this.c1 = i), (this.c2 = -3 * e + 3 * t - 2 * i - n), (this.c3 = 2 * e - 2 * t + i + n) }), (xi.prototype.initNonuniformCatmullRom = function (e, t, i, n, r, o, a) { var s = (t - e) / r - (i - e) / (r + o) + (i - t) / o, l = (i - t) / o - (n - t) / (o + a) + (n - i) / a ;(s *= o), (l *= o), this.init(t, i, s, l) }), (xi.prototype.initCatmullRom = function (e, t, i, n, r) { this.init(t, i, r * (i - e), r * (n - t)) }), (xi.prototype.calc = function (e) { var t = e * e, i = t * e return this.c0 + this.c1 * e + this.c2 * t + this.c3 * i }), Ci.Curve.create( function (e) { ;(this.points = e || []), (this.closed = !1) }, function (e) { var t, i, n, r, o, a, s, l, c = this.points if ( ((r = c.length) < 2 && console.log('duh, you need at least 2 points'), (n = (t = (r - (this.closed ? 0 : 1)) * e) - (i = Math.floor(t))), this.closed ? (i += 0 < i ? 0 : (Math.floor(Math.abs(i) / c.length) + 1) * c.length) : 0 === n && i === r - 1 && ((i = r - 2), (n = 1)), (o = this.closed || 0 < i ? c[(i - 1) % r] : (qt.subVectors(c[0], c[1]).add(c[0]), qt)), (a = c[i % r]), (s = c[(i + 1) % r]), (l = this.closed || i + 2 < r ? c[(i + 2) % r] : (qt.subVectors(c[r - 1], c[r - 2]).add(c[r - 1]), qt)), void 0 === this.type || 'centripetal' === this.type || 'chordal' === this.type) ) { var h = 'chordal' === this.type ? 0.5 : 0.25, u = Math.pow(o.distanceToSquared(a), h), d = Math.pow(a.distanceToSquared(s), h), p = Math.pow(s.distanceToSquared(l), h) d < 1e-4 && (d = 1), u < 1e-4 && (u = d), p < 1e-4 && (p = d), Xt.initNonuniformCatmullRom(o.x, a.x, s.x, l.x, u, d, p), Zt.initNonuniformCatmullRom(o.y, a.y, s.y, l.y, u, d, p), Kt.initNonuniformCatmullRom(o.z, a.z, s.z, l.z, u, d, p) } else if ('catmullrom' === this.type) { var f = void 0 !== this.tension ? this.tension : 0.5 Xt.initCatmullRom(o.x, a.x, s.x, l.x, f), Zt.initCatmullRom(o.y, a.y, s.y, l.y, f), Kt.initCatmullRom(o.z, a.z, s.z, l.z, f) } return new Ci.Vector3(Xt.calc(n), Zt.calc(n), Kt.calc(n)) } ))), (Ci.ClosedSplineCurve3 = function (e) { console.warn('THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3.'), Ci.CatmullRomCurve3.call(this, e), (this.type = 'catmullrom'), (this.closed = !0) }), (Ci.ClosedSplineCurve3.prototype = Object.create(Ci.CatmullRomCurve3.prototype)), (Ci.BoxGeometry = function (e, t, i, n, r, o) { Ci.Geometry.call(this), (this.type = 'BoxGeometry'), (this.parameters = { width: e, height: t, depth: i, widthSegments: n, heightSegments: r, depthSegments: o }), this.fromBufferGeometry(new Ci.BoxBufferGeometry(e, t, i, n, r, o)), this.mergeVertices() }), (Ci.BoxGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.BoxGeometry.prototype.constructor = Ci.BoxGeometry), (Ci.CubeGeometry = Ci.BoxGeometry), (Ci.BoxBufferGeometry = function (e, t, i, n, r, o) { function a(e, t, i, n, r, o, a, s, l, c, h) { for (var u = o / l, d = a / c, p = o / 2, f = a / 2, g = s / 2, m = l + 1, v = c + 1, y = 0, A = 0, C = new Ci.Vector3(), I = 0; I < v; I++) for (var E = I * d - f, _ = 0; _ < m; _++) { var b = _ * u - p ;(C[e] = b * n), (C[t] = E * r), (C[i] = g), (P[D] = C.x), (P[D + 1] = C.y), (P[D + 2] = C.z), (C[e] = 0), (C[t] = 0), (C[i] = 0 < s ? 1 : -1), (O[D] = C.x), (O[D + 1] = C.y), (O[D + 2] = C.z), (L[N] = _ / l), (L[N + 1] = 1 - I / c), (D += 3), (N += 2), (y += 1) } for (I = 0; I < c; I++) for (_ = 0; _ < l; _++) { var w = B + _ + m * I, T = B + _ + m * (I + 1), x = B + (_ + 1) + m * (I + 1), S = B + (_ + 1) + m * I ;(R[F] = w), (R[F + 1] = T), (R[F + 2] = S), (R[F + 3] = T), (R[F + 4] = x), (R[F + 5] = S), (F += 6), (A += 6) } M.addGroup(V, A, h), (V += A), (B += y) } Ci.BufferGeometry.call(this), (this.type = 'BoxBufferGeometry'), (this.parameters = { width: e, height: t, depth: i, widthSegments: n, heightSegments: r, depthSegments: o }) var M = this ;(n = Math.floor(n) || 1), (r = Math.floor(r) || 1), (o = Math.floor(o) || 1) var s, l, c, h, u = ((h = 0), (h += (s = n) * (l = r) * 2), (h += s * (c = o) * 2), 4 * (h += c * l * 2)), d = (u / 4) * 6, R = new (65535 < d ? Uint32Array : Uint16Array)(d), P = new Float32Array(3 * u), O = new Float32Array(3 * u), L = new Float32Array(2 * u), D = 0, N = 0, F = 0, B = 0, V = 0 a('z', 'y', 'x', -1, -1, i, t, e, o, r, 0), a('z', 'y', 'x', 1, -1, i, t, -e, o, r, 1), a('x', 'z', 'y', 1, 1, e, i, t, n, o, 2), a('x', 'z', 'y', 1, -1, e, i, -t, n, o, 3), a('x', 'y', 'z', 1, -1, e, t, i, n, r, 4), a('x', 'y', 'z', -1, -1, e, t, -i, n, r, 5), this.setIndex(new Ci.BufferAttribute(R, 1)), this.addAttribute('position', new Ci.BufferAttribute(P, 3)), this.addAttribute('normal', new Ci.BufferAttribute(O, 3)), this.addAttribute('uv', new Ci.BufferAttribute(L, 2)) }), (Ci.BoxBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.BoxBufferGeometry.prototype.constructor = Ci.BoxBufferGeometry), (Ci.CircleGeometry = function (e, t, i, n) { Ci.Geometry.call(this), (this.type = 'CircleGeometry'), (this.parameters = { radius: e, segments: t, thetaStart: i, thetaLength: n }), this.fromBufferGeometry(new Ci.CircleBufferGeometry(e, t, i, n)) }), (Ci.CircleGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.CircleGeometry.prototype.constructor = Ci.CircleGeometry), (Ci.CircleBufferGeometry = function (e, t, i, n) { Ci.BufferGeometry.call(this), (this.type = 'CircleBufferGeometry'), (this.parameters = { radius: e, segments: t, thetaStart: i, thetaLength: n }), (e = e || 50), (t = void 0 !== t ? Math.max(3, t) : 8), (i = void 0 !== i ? i : 0), (n = void 0 !== n ? n : 2 * Math.PI) var r = t + 2, o = new Float32Array(3 * r), a = new Float32Array(3 * r), s = new Float32Array(2 * r) ;(a[2] = 1), (s[0] = 0.5), (s[1] = 0.5) for (var l = 0, c = 3, h = 2; l <= t; l++, c += 3, h += 2) { var u = i + (l / t) * n ;(o[c] = e * Math.cos(u)), (o[c + 1] = e * Math.sin(u)), (a[c + 2] = 1), (s[h] = (o[c] / e + 1) / 2), (s[h + 1] = (o[c + 1] / e + 1) / 2) } var d = [] for (c = 1; c <= t; c++) d.push(c, c + 1, 0) this.setIndex(new Ci.BufferAttribute(new Uint16Array(d), 1)), this.addAttribute('position', new Ci.BufferAttribute(o, 3)), this.addAttribute('normal', new Ci.BufferAttribute(a, 3)), this.addAttribute('uv', new Ci.BufferAttribute(s, 2)), (this.boundingSphere = new Ci.Sphere(new Ci.Vector3(), e)) }), (Ci.CircleBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.CircleBufferGeometry.prototype.constructor = Ci.CircleBufferGeometry), (Ci.CylinderBufferGeometry = function (p, f, g, m, v, e, y, A) { function t(e) { var t, i, n, r = new Ci.Vector2(), o = new Ci.Vector3(), a = !0 === e ? p : f, s = !0 === e ? 1 : -1 for (i = b, t = 1; t <= m; t++) I.setXYZ(b, 0, x * s, 0), E.setXYZ(b, 0, s, 0), !0 === e ? ((r.x = t / m), (r.y = 0)) : ((r.x = (t - 1) / m), (r.y = 1)), _.setXY(b, r.x, r.y), b++ for (n = b, t = 0; t <= m; t++) { var l = t / m ;(o.x = a * Math.sin(l * A + y)), (o.y = x * s), (o.z = a * Math.cos(l * A + y)), I.setXYZ(b, o.x, o.y, o.z), E.setXYZ(b, 0, s, 0), _.setXY(b, l, !0 === e ? 1 : 0), b++ } for (t = 0; t < m; t++) { var c = i + t, h = n + t !0 === e ? (C.setX(w, h), w++, C.setX(w, h + 1)) : (C.setX(w, h + 1), w++, C.setX(w, h)), w++, C.setX(w, c), w++ } } Ci.BufferGeometry.call(this), (this.type = 'CylinderBufferGeometry'), (this.parameters = { radiusTop: p, radiusBottom: f, height: g, radialSegments: m, heightSegments: v, openEnded: e, thetaStart: y, thetaLength: A }), (p = void 0 !== p ? p : 20), (f = void 0 !== f ? f : 20), (g = void 0 !== g ? g : 100), (m = Math.floor(m) || 8), (v = Math.floor(v) || 1), (e = void 0 !== e && e), (y = void 0 !== y ? y : 0), (A = void 0 !== A ? A : 2 * Math.PI) var i, n, r = ((n = (m + 1) * (v + 1)), !1 === e && (n += 2 * (m + 1) + 2 * m), n), o = ((i = m * v * 2 * 3), !1 === e && (i += 2 * m * 3), i), C = new Ci.BufferAttribute(new (65535 < o ? Uint32Array : Uint16Array)(o), 1), I = new Ci.BufferAttribute(new Float32Array(3 * r), 3), E = new Ci.BufferAttribute(new Float32Array(3 * r), 3), _ = new Ci.BufferAttribute(new Float32Array(2 * r), 2), b = 0, w = 0, T = [], x = g / 2 ;(function () { var e, t, i = new Ci.Vector3(), n = new Ci.Vector3(), r = (f - p) / g for (t = 0; t <= v; t++) { var o = [], a = t / v, s = a * (f - p) + p for (e = 0; e <= m; e++) { var l = e / m ;(n.x = s * Math.sin(l * A + y)), (n.y = -a * g + x), (n.z = s * Math.cos(l * A + y)), I.setXYZ(b, n.x, n.y, n.z), i.copy(n), ((0 === p && 0 === t) || (0 === f && t === v)) && ((i.x = Math.sin(l * A + y)), (i.z = Math.cos(l * A + y))), i.setY(Math.sqrt(i.x * i.x + i.z * i.z) * r).normalize(), E.setXYZ(b, i.x, i.y, i.z), _.setXY(b, l, 1 - a), o.push(b), b++ } T.push(o) } for (e = 0; e < m; e++) for (t = 0; t < v; t++) { var c = T[t][e], h = T[t + 1][e], u = T[t + 1][e + 1], d = T[t][e + 1] C.setX(w, c), w++, C.setX(w, h), w++, C.setX(w, d), w++, C.setX(w, h), w++, C.setX(w, u), w++, C.setX(w, d), w++ } })(), !1 === e && (0 < p && t(!0), 0 < f && t(!1)), this.setIndex(C), this.addAttribute('position', I), this.addAttribute('normal', E), this.addAttribute('uv', _) }), (Ci.CylinderBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.CylinderBufferGeometry.prototype.constructor = Ci.CylinderBufferGeometry), (Ci.CylinderGeometry = function (e, t, i, n, r, o, a, s) { Ci.Geometry.call(this), (this.type = 'CylinderGeometry'), (this.parameters = { radiusTop: e, radiusBottom: t, height: i, radialSegments: n, heightSegments: r, openEnded: o, thetaStart: a, thetaLength: s }), this.fromBufferGeometry(new Ci.CylinderBufferGeometry(e, t, i, n, r, o, a, s)), this.mergeVertices() }), (Ci.CylinderGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.CylinderGeometry.prototype.constructor = Ci.CylinderGeometry), (Ci.EdgesGeometry = function (e, t) { function i(e, t) { return e - t } Ci.BufferGeometry.call(this), (t = void 0 !== t ? t : 1) var n, r = Math.cos(Ci.Math.degToRad(t)), o = [0, 0], a = {}, s = ['a', 'b', 'c'] e instanceof Ci.BufferGeometry ? (n = new Ci.Geometry()).fromBufferGeometry(e) : (n = e.clone()), n.mergeVertices(), n.computeFaceNormals() for (var l = n.vertices, c = n.faces, h = 0, u = c.length; h < u; h++) for (var d = c[h], p = 0; p < 3; p++) { ;(o[0] = d[s[p]]), (o[1] = d[s[(p + 1) % 3]]), o.sort(i), void 0 === a[(g = o.toString())] ? (a[g] = { vert1: o[0], vert2: o[1], face1: h, face2: void 0 }) : (a[g].face2 = h) } var f = [] for (var g in a) { var m = a[g] if (void 0 === m.face2 || c[m.face1].normal.dot(c[m.face2].normal) <= r) { var v = l[m.vert1] f.push(v.x), f.push(v.y), f.push(v.z), (v = l[m.vert2]), f.push(v.x), f.push(v.y), f.push(v.z) } } this.addAttribute('position', new Ci.BufferAttribute(new Float32Array(f), 3)) }), (Ci.EdgesGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.EdgesGeometry.prototype.constructor = Ci.EdgesGeometry), (Ci.ExtrudeGeometry = function (e, t) { return void 0 === e ? void (e = []) : (Ci.Geometry.call(this), (this.type = 'ExtrudeGeometry'), (e = Array.isArray(e) ? e : [e]), this.addShapeList(e, t), void this.computeFaceNormals()) }) ;(Ci.ExtrudeGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.ExtrudeGeometry.prototype.constructor = Ci.ExtrudeGeometry), (Ci.ExtrudeGeometry.prototype.addShapeList = function (e, t) { for (var i = e.length, n = 0; n < i; n++) { var r = e[n] this.addShape(r, t) } }), (Ci.ExtrudeGeometry.prototype.addShape = function (e, t) { function i(e, t, i) { return t || console.error('THREE.ExtrudeGeometry: vec does not exist'), t.clone().multiplyScalar(i).add(e) } function n(e, t, i) { var n, r, o = 1, a = e.x - t.x, s = e.y - t.y, l = i.x - e.x, c = i.y - e.y, h = a * a + s * s, u = a * c - s * l if (Math.abs(u) > Number.EPSILON) { var d = Math.sqrt(h), p = Math.sqrt(l * l + c * c), f = t.x - s / d, g = t.y + a / d, m = ((i.x - c / p - f) * c - (i.y + l / p - g) * l) / (a * c - s * l), v = (n = f + a * m - e.x) * n + (r = g + s * m - e.y) * r if (v <= 2) return new Ci.Vector2(n, r) o = Math.sqrt(v / 2) } else { var y = !1 a > Number.EPSILON ? l > Number.EPSILON && (y = !0) : a < -Number.EPSILON ? l < -Number.EPSILON && (y = !0) : Math.sign(s) === Math.sign(c) && (y = !0), (o = y ? ((n = -s), (r = a), Math.sqrt(h)) : ((n = a), (r = s), Math.sqrt(h / 2))) } return new Ci.Vector2(n / o, r / o) } function r(e, t) { var i, n for (G = e.length; 0 <= --G; ) { ;(n = (i = G) - 1) < 0 && (n = e.length - 1) var r = 0, o = A + 2 * m for (r = 0; r < o; r++) { var a = U * r, s = U * (r + 1) l(t + i + a, t + n + a, t + n + s, t + i + s, e, r, o, i, n) } } } function o(e, t, i) { T.vertices.push(new Ci.Vector3(e, t, i)) } function a(e, t, i) { ;(e += x), (t += x), (i += x), T.faces.push(new Ci.Face3(e, t, i, null, null, 0)) var n = E.generateTopUV(T, e, t, i) T.faceVertexUvs[0].push(n) } function l(e, t, i, n) { ;(e += x), (t += x), (i += x), (n += x), T.faces.push(new Ci.Face3(e, t, n, null, null, 1)), T.faces.push(new Ci.Face3(t, i, n, null, null, 1)) var r = E.generateSideWallUV(T, e, t, i, n) T.faceVertexUvs[0].push([r[0], r[1], r[3]]), T.faceVertexUvs[0].push([r[1], r[2], r[3]]) } var s, c, h, u, d, p = void 0 !== t.amount ? t.amount : 100, f = void 0 !== t.bevelThickness ? t.bevelThickness : 6, g = void 0 !== t.bevelSize ? t.bevelSize : f - 2, m = void 0 !== t.bevelSegments ? t.bevelSegments : 3, v = void 0 === t.bevelEnabled || t.bevelEnabled, y = void 0 !== t.curveSegments ? t.curveSegments : 12, A = void 0 !== t.steps ? t.steps : 1, C = t.extrudePath, I = !1, E = void 0 !== t.UVGenerator ? t.UVGenerator : Ci.ExtrudeGeometry.WorldUVGenerator C && ((s = C.getSpacedPoints(A)), (v = !(I = !0)), (c = void 0 !== t.frames ? t.frames : new Ci.TubeGeometry.FrenetFrames(C, A, !1)), (h = new Ci.Vector3()), (u = new Ci.Vector3()), (d = new Ci.Vector3())), v || (g = f = m = 0) var _, b, w, T = this, x = this.vertices.length, S = e.extractPoints(y), M = S.shape, R = S.holes, P = !Ci.ShapeUtils.isClockWise(M) if (P) { for (M = M.reverse(), b = 0, w = R.length; b < w; b++) (_ = R[b]), Ci.ShapeUtils.isClockWise(_) && (R[b] = _.reverse()) P = !1 } var O = Ci.ShapeUtils.triangulateShape(M, R), L = M for (b = 0, w = R.length; b < w; b++) (_ = R[b]), (M = M.concat(_)) for (var D, N, F, B, V, k, U = M.length, H = O.length, z = [], G = 0, W = L.length, j = W - 1, Y = G + 1; G < W; G++, j++, Y++) j === W && (j = 0), Y === W && (Y = 0), (z[G] = n(L[G], L[j], L[Y])) var q, X, Z = [], K = z.concat() for (b = 0, w = R.length; b < w; b++) { for (_ = R[b], q = [], G = 0, j = (W = _.length) - 1, Y = G + 1; G < W; G++, j++, Y++) j === W && (j = 0), Y === W && (Y = 0), (q[G] = n(_[G], _[j], _[Y])) Z.push(q), (K = K.concat(q)) } for (D = 0; D < m; D++) { for (B = f * (1 - (F = D / m)), N = g * Math.sin((F * Math.PI) / 2), G = 0, W = L.length; G < W; G++) o((V = i(L[G], z[G], N)).x, V.y, -B) for (b = 0, w = R.length; b < w; b++) for (_ = R[b], q = Z[b], G = 0, W = _.length; G < W; G++) o((V = i(_[G], q[G], N)).x, V.y, -B) } for (N = g, G = 0; G < U; G++) (V = v ? i(M[G], K[G], N) : M[G]), I ? (u.copy(c.normals[0]).multiplyScalar(V.x), h.copy(c.binormals[0]).multiplyScalar(V.y), d.copy(s[0]).add(u).add(h), o(d.x, d.y, d.z)) : o(V.x, V.y, 0) for (X = 1; X <= A; X++) for (G = 0; G < U; G++) (V = v ? i(M[G], K[G], N) : M[G]), I ? (u.copy(c.normals[X]).multiplyScalar(V.x), h.copy(c.binormals[X]).multiplyScalar(V.y), d.copy(s[X]).add(u).add(h), o(d.x, d.y, d.z)) : o(V.x, V.y, (p / A) * X) for (D = m - 1; 0 <= D; D--) { for (B = f * (1 - (F = D / m)), N = g * Math.sin((F * Math.PI) / 2), G = 0, W = L.length; G < W; G++) o((V = i(L[G], z[G], N)).x, V.y, p + B) for (b = 0, w = R.length; b < w; b++) for (_ = R[b], q = Z[b], G = 0, W = _.length; G < W; G++) (V = i(_[G], q[G], N)), I ? o(V.x, V.y + s[A - 1].y, s[A - 1].x + B) : o(V.x, V.y, p + B) } ;(function () { if (v) { var e = 0, t = U * e for (G = 0; G < H; G++) a((k = O[G])[2] + t, k[1] + t, k[0] + t) for (t = U * (e = A + 2 * m), G = 0; G < H; G++) a((k = O[G])[0] + t, k[1] + t, k[2] + t) } else { for (G = 0; G < H; G++) a((k = O[G])[2], k[1], k[0]) for (G = 0; G < H; G++) a((k = O[G])[0] + U * A, k[1] + U * A, k[2] + U * A) } })(), (function () { var e = 0 for (r(L, e), e += L.length, b = 0, w = R.length; b < w; b++) r((_ = R[b]), e), (e += _.length) })() }), (Ci.ExtrudeGeometry.WorldUVGenerator = { generateTopUV: function (e, t, i, n) { var r = e.vertices, o = r[t], a = r[i], s = r[n] return [new Ci.Vector2(o.x, o.y), new Ci.Vector2(a.x, a.y), new Ci.Vector2(s.x, s.y)] }, generateSideWallUV: function (e, t, i, n, r) { var o = e.vertices, a = o[t], s = o[i], l = o[n], c = o[r] return Math.abs(a.y - s.y) < 0.01 ? [new Ci.Vector2(a.x, 1 - a.z), new Ci.Vector2(s.x, 1 - s.z), new Ci.Vector2(l.x, 1 - l.z), new Ci.Vector2(c.x, 1 - c.z)] : [new Ci.Vector2(a.y, 1 - a.z), new Ci.Vector2(s.y, 1 - s.z), new Ci.Vector2(l.y, 1 - l.z), new Ci.Vector2(c.y, 1 - c.z)] } }), (Ci.ShapeGeometry = function (e, t) { Ci.Geometry.call(this), !(this.type = 'ShapeGeometry') === Array.isArray(e) && (e = [e]), this.addShapeList(e, t), this.computeFaceNormals() }), (Ci.ShapeGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.ShapeGeometry.prototype.constructor = Ci.ShapeGeometry), (Ci.ShapeGeometry.prototype.addShapeList = function (e, t) { for (var i = 0, n = e.length; i < n; i++) this.addShape(e[i], t) return this }), (Ci.ShapeGeometry.prototype.addShape = function (e, t) { void 0 === t && (t = {}) var i, n, r, o = void 0 !== t.curveSegments ? t.curveSegments : 12, a = t.material, s = void 0 === t.UVGenerator ? Ci.ExtrudeGeometry.WorldUVGenerator : t.UVGenerator, l = this.vertices.length, c = e.extractPoints(o), h = c.shape, u = c.holes, d = !Ci.ShapeUtils.isClockWise(h) if (d) { for (h = h.reverse(), i = 0, n = u.length; i < n; i++) (r = u[i]), Ci.ShapeUtils.isClockWise(r) && (u[i] = r.reverse()) d = !1 } var p = Ci.ShapeUtils.triangulateShape(h, u) for (i = 0, n = u.length; i < n; i++) (r = u[i]), (h = h.concat(r)) var f, g, m = h.length, v = p.length for (i = 0; i < m; i++) (f = h[i]), this.vertices.push(new Ci.Vector3(f.x, f.y, 0)) for (i = 0; i < v; i++) { var y = (g = p[i])[0] + l, A = g[1] + l, C = g[2] + l this.faces.push(new Ci.Face3(y, A, C, null, null, a)), this.faceVertexUvs[0].push(s.generateTopUV(this, y, A, C)) } }), (Ci.LatheBufferGeometry = function (e, t, i, n) { Ci.BufferGeometry.call(this), (this.type = 'LatheBufferGeometry'), (this.parameters = { points: e, segments: t, phiStart: i, phiLength: n }), (t = Math.floor(t) || 12), (i = i || 0), (n = n || 2 * Math.PI), (n = Ci.Math.clamp(n, 0, 2 * Math.PI)) var r, o, a, s = (t + 1) * e.length, l = t * e.length * 2 * 3, c = new Ci.BufferAttribute(new (65535 < l ? Uint32Array : Uint16Array)(l), 1), h = new Ci.BufferAttribute(new Float32Array(3 * s), 3), u = new Ci.BufferAttribute(new Float32Array(2 * s), 2), d = 0, p = 0, f = (e.length, 1 / t), g = new Ci.Vector3(), m = new Ci.Vector2() for (o = 0; o <= t; o++) { var v = i + o * f * n, y = Math.sin(v), A = Math.cos(v) for (a = 0; a <= e.length - 1; a++) (g.x = e[a].x * y), (g.y = e[a].y), (g.z = e[a].x * A), h.setXYZ(d, g.x, g.y, g.z), (m.x = o / t), (m.y = a / (e.length - 1)), u.setXY(d, m.x, m.y), d++ } for (o = 0; o < t; o++) for (a = 0; a < e.length - 1; a++) { var C = (r = a + o * e.length), I = r + e.length, E = r + e.length + 1, _ = r + 1 c.setX(p, C), p++, c.setX(p, I), p++, c.setX(p, _), p++, c.setX(p, I), p++, c.setX(p, E), p++, c.setX(p, _), p++ } if ((this.setIndex(c), this.addAttribute('position', h), this.addAttribute('uv', u), this.computeVertexNormals(), n === 2 * Math.PI)) { var b = this.attributes.normal.array, w = new Ci.Vector3(), T = new Ci.Vector3(), x = new Ci.Vector3() for (r = t * e.length * 3, a = o = 0; o < e.length; o++, a += 3) (w.x = b[a + 0]), (w.y = b[a + 1]), (w.z = b[a + 2]), (T.x = b[r + a + 0]), (T.y = b[r + a + 1]), (T.z = b[r + a + 2]), x.addVectors(w, T).normalize(), (b[a + 0] = b[r + a + 0] = x.x), (b[a + 1] = b[r + a + 1] = x.y), (b[a + 2] = b[r + a + 2] = x.z) } }), (Ci.LatheBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.LatheBufferGeometry.prototype.constructor = Ci.LatheBufferGeometry), (Ci.LatheGeometry = function (e, t, i, n) { Ci.Geometry.call(this), (this.type = 'LatheGeometry'), (this.parameters = { points: e, segments: t, phiStart: i, phiLength: n }), this.fromBufferGeometry(new Ci.LatheBufferGeometry(e, t, i, n)), this.mergeVertices() }), (Ci.LatheGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.LatheGeometry.prototype.constructor = Ci.LatheGeometry), (Ci.PlaneGeometry = function (e, t, i, n) { Ci.Geometry.call(this), (this.type = 'PlaneGeometry'), (this.parameters = { width: e, height: t, widthSegments: i, heightSegments: n }), this.fromBufferGeometry(new Ci.PlaneBufferGeometry(e, t, i, n)) }), (Ci.PlaneGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.PlaneGeometry.prototype.constructor = Ci.PlaneGeometry), (Ci.PlaneBufferGeometry = function (e, t, i, n) { Ci.BufferGeometry.call(this), (this.type = 'PlaneBufferGeometry'), (this.parameters = { width: e, height: t, widthSegments: i, heightSegments: n }) for ( var r = e / 2, o = t / 2, a = Math.floor(i) || 1, s = Math.floor(n) || 1, l = a + 1, c = s + 1, h = e / a, u = t / s, d = new Float32Array(l * c * 3), p = new Float32Array(l * c * 3), f = new Float32Array(l * c * 2), g = 0, m = 0, v = 0; v < c; v++ ) for (var y = v * u - o, A = 0; A < l; A++) { var C = A * h - r ;(d[g] = C), (d[g + 1] = -y), (p[g + 2] = 1), (f[m] = A / a), (f[m + 1] = 1 - v / s), (g += 3), (m += 2) } g = 0 var I = new (65535 < d.length / 3 ? Uint32Array : Uint16Array)(a * s * 6) for (v = 0; v < s; v++) for (A = 0; A < a; A++) { var E = A + l * v, _ = A + l * (v + 1), b = A + 1 + l * (v + 1), w = A + 1 + l * v ;(I[g] = E), (I[g + 1] = _), (I[g + 2] = w), (I[g + 3] = _), (I[g + 4] = b), (I[g + 5] = w), (g += 6) } this.setIndex(new Ci.BufferAttribute(I, 1)), this.addAttribute('position', new Ci.BufferAttribute(d, 3)), this.addAttribute('normal', new Ci.BufferAttribute(p, 3)), this.addAttribute('uv', new Ci.BufferAttribute(f, 2)) }), (Ci.PlaneBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.PlaneBufferGeometry.prototype.constructor = Ci.PlaneBufferGeometry), (Ci.RingBufferGeometry = function (e, t, i, n, r, o) { Ci.BufferGeometry.call(this), (this.type = 'RingBufferGeometry'), (this.parameters = { innerRadius: e, outerRadius: t, thetaSegments: i, phiSegments: n, thetaStart: r, thetaLength: o }), (e = e || 20), (t = t || 50), (r = void 0 !== r ? r : 0), (o = void 0 !== o ? o : 2 * Math.PI) var a, s, l, c = ((i = void 0 !== i ? Math.max(3, i) : 8) + 1) * ((n = void 0 !== n ? Math.max(1, n) : 1) + 1), h = i * n * 2 * 3, u = new Ci.BufferAttribute(new (65535 < h ? Uint32Array : Uint16Array)(h), 1), d = new Ci.BufferAttribute(new Float32Array(3 * c), 3), p = new Ci.BufferAttribute(new Float32Array(3 * c), 3), f = new Ci.BufferAttribute(new Float32Array(2 * c), 2), g = 0, m = 0, v = e, y = (t - e) / n, A = new Ci.Vector3(), C = new Ci.Vector2() for (s = 0; s <= n; s++) { for (l = 0; l <= i; l++) (a = r + (l / i) * o), (A.x = v * Math.cos(a)), (A.y = v * Math.sin(a)), d.setXYZ(g, A.x, A.y, A.z), p.setXYZ(g, 0, 0, 1), (C.x = (A.x / t + 1) / 2), (C.y = (A.y / t + 1) / 2), f.setXY(g, C.x, C.y), g++ v += y } for (s = 0; s < n; s++) { var I = s * (i + 1) for (l = 0; l < i; l++) { var E = (a = l + I), _ = a + i + 1, b = a + i + 2, w = a + 1 u.setX(m, E), m++, u.setX(m, _), m++, u.setX(m, b), m++, u.setX(m, E), m++, u.setX(m, b), m++, u.setX(m, w), m++ } } this.setIndex(u), this.addAttribute('position', d), this.addAttribute('normal', p), this.addAttribute('uv', f) }), (Ci.RingBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.RingBufferGeometry.prototype.constructor = Ci.RingBufferGeometry), (Ci.RingGeometry = function (e, t, i, n, r, o) { Ci.Geometry.call(this), (this.type = 'RingGeometry'), (this.parameters = { innerRadius: e, outerRadius: t, thetaSegments: i, phiSegments: n, thetaStart: r, thetaLength: o }), this.fromBufferGeometry(new Ci.RingBufferGeometry(e, t, i, n, r, o)) }), (Ci.RingGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.RingGeometry.prototype.constructor = Ci.RingGeometry), (Ci.SphereGeometry = function (e, t, i, n, r, o, a) { Ci.Geometry.call(this), (this.type = 'SphereGeometry'), (this.parameters = { radius: e, widthSegments: t, heightSegments: i, phiStart: n, phiLength: r, thetaStart: o, thetaLength: a }), this.fromBufferGeometry(new Ci.SphereBufferGeometry(e, t, i, n, r, o, a)) }), (Ci.SphereGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.SphereGeometry.prototype.constructor = Ci.SphereGeometry), (Ci.SphereBufferGeometry = function (e, t, i, n, r, o, a) { Ci.BufferGeometry.call(this), (this.type = 'SphereBufferGeometry'), (this.parameters = { radius: e, widthSegments: t, heightSegments: i, phiStart: n, phiLength: r, thetaStart: o, thetaLength: a }), (e = e || 50), (t = Math.max(3, Math.floor(t) || 8)), (i = Math.max(2, Math.floor(i) || 6)), (n = void 0 !== n ? n : 0), (r = void 0 !== r ? r : 2 * Math.PI) for ( var s = (o = void 0 !== o ? o : 0) + (a = void 0 !== a ? a : Math.PI), l = (t + 1) * (i + 1), c = new Ci.BufferAttribute(new Float32Array(3 * l), 3), h = new Ci.BufferAttribute(new Float32Array(3 * l), 3), u = new Ci.BufferAttribute(new Float32Array(2 * l), 2), d = 0, p = [], f = new Ci.Vector3(), g = 0; g <= i; g++ ) { for (var m = [], v = g / i, y = 0; y <= t; y++) { var A = y / t, C = -e * Math.cos(n + A * r) * Math.sin(o + v * a), I = e * Math.cos(o + v * a), E = e * Math.sin(n + A * r) * Math.sin(o + v * a) f.set(C, I, E).normalize(), c.setXYZ(d, C, I, E), h.setXYZ(d, f.x, f.y, f.z), u.setXY(d, A, 1 - v), m.push(d), d++ } p.push(m) } var _ = [] for (g = 0; g < i; g++) for (y = 0; y < t; y++) { var b = p[g][y + 1], w = p[g][y], T = p[g + 1][y], x = p[g + 1][y + 1] ;(0 !== g || 0 < o) && _.push(b, w, x), (g !== i - 1 || s < Math.PI) && _.push(w, T, x) } this.setIndex(new (65535 < c.count ? Ci.Uint32Attribute : Ci.Uint16Attribute)(_, 1)), this.addAttribute('position', c), this.addAttribute('normal', h), this.addAttribute('uv', u), (this.boundingSphere = new Ci.Sphere(new Ci.Vector3(), e)) }), (Ci.SphereBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.SphereBufferGeometry.prototype.constructor = Ci.SphereBufferGeometry), (Ci.TextGeometry = function (e, t) { var i = (t = t || {}).font if (i instanceof Ci.Font == 0) return console.error('THREE.TextGeometry: font parameter is not an instance of THREE.Font.'), new Ci.Geometry() var n = i.generateShapes(e, t.size, t.curveSegments) ;(t.amount = void 0 !== t.height ? t.height : 50), void 0 === t.bevelThickness && (t.bevelThickness = 10), void 0 === t.bevelSize && (t.bevelSize = 8), void 0 === t.bevelEnabled && (t.bevelEnabled = !1), Ci.ExtrudeGeometry.call(this, n, t), (this.type = 'TextGeometry') }), (Ci.TextGeometry.prototype = Object.create(Ci.ExtrudeGeometry.prototype)), (Ci.TextGeometry.prototype.constructor = Ci.TextGeometry), (Ci.TorusBufferGeometry = function (e, t, i, n, r) { Ci.BufferGeometry.call(this), (this.type = 'TorusBufferGeometry'), (this.parameters = { radius: e, tube: t, radialSegments: i, tubularSegments: n, arc: r }), (e = e || 100), (t = t || 40), (i = Math.floor(i) || 8), (n = Math.floor(n) || 6), (r = r || 2 * Math.PI) var o, a, s = (i + 1) * (n + 1), l = i * n * 2 * 3, c = new (65535 < l ? Uint32Array : Uint16Array)(l), h = new Float32Array(3 * s), u = new Float32Array(3 * s), d = new Float32Array(2 * s), p = 0, f = 0, g = 0, m = new Ci.Vector3(), v = new Ci.Vector3(), y = new Ci.Vector3() for (o = 0; o <= i; o++) for (a = 0; a <= n; a++) { var A = (a / n) * r, C = (o / i) * Math.PI * 2 ;(v.x = (e + t * Math.cos(C)) * Math.cos(A)), (v.y = (e + t * Math.cos(C)) * Math.sin(A)), (v.z = t * Math.sin(C)), (h[p] = v.x), (h[p + 1] = v.y), (h[p + 2] = v.z), (m.x = e * Math.cos(A)), (m.y = e * Math.sin(A)), y.subVectors(v, m).normalize(), (u[p] = y.x), (u[p + 1] = y.y), (u[p + 2] = y.z), (d[f] = a / n), (d[f + 1] = o / i), (p += 3), (f += 2) } for (o = 1; o <= i; o++) for (a = 1; a <= n; a++) { var I = (n + 1) * o + a - 1, E = (n + 1) * (o - 1) + a - 1, _ = (n + 1) * (o - 1) + a, b = (n + 1) * o + a ;(c[g] = I), (c[g + 1] = E), (c[g + 2] = b), (c[g + 3] = E), (c[g + 4] = _), (c[g + 5] = b), (g += 6) } this.setIndex(new Ci.BufferAttribute(c, 1)), this.addAttribute('position', new Ci.BufferAttribute(h, 3)), this.addAttribute('normal', new Ci.BufferAttribute(u, 3)), this.addAttribute('uv', new Ci.BufferAttribute(d, 2)) }), (Ci.TorusBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.TorusBufferGeometry.prototype.constructor = Ci.TorusBufferGeometry), (Ci.TorusGeometry = function (e, t, i, n, r) { Ci.Geometry.call(this), (this.type = 'TorusGeometry'), (this.parameters = { radius: e, tube: t, radialSegments: i, tubularSegments: n, arc: r }), this.fromBufferGeometry(new Ci.TorusBufferGeometry(e, t, i, n, r)) }), (Ci.TorusGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.TorusGeometry.prototype.constructor = Ci.TorusGeometry), (Ci.TorusKnotBufferGeometry = function (e, t, i, n, r, o) { function a(e, t, i, n, r) { var o = Math.cos(e), a = Math.sin(e), s = (i / t) * e, l = Math.cos(s) ;(r.x = n * (2 + l) * 0.5 * o), (r.y = n * (2 + l) * a * 0.5), (r.z = n * Math.sin(s) * 0.5) } Ci.BufferGeometry.call(this), (this.type = 'TorusKnotBufferGeometry'), (this.parameters = { radius: e, tube: t, tubularSegments: i, radialSegments: n, p: r, q: o }), (e = e || 100), (t = t || 40), (i = Math.floor(i) || 64), (r = r || 2), (o = o || 3) var s, l, c = ((n = Math.floor(n) || 8) + 1) * (i + 1), h = n * i * 2 * 3, u = new Ci.BufferAttribute(new (65535 < h ? Uint32Array : Uint16Array)(h), 1), d = new Ci.BufferAttribute(new Float32Array(3 * c), 3), p = new Ci.BufferAttribute(new Float32Array(3 * c), 3), f = new Ci.BufferAttribute(new Float32Array(2 * c), 2), g = 0, m = 0, v = new Ci.Vector3(), y = new Ci.Vector3(), A = new Ci.Vector2(), C = new Ci.Vector3(), I = new Ci.Vector3(), E = new Ci.Vector3(), _ = new Ci.Vector3(), b = new Ci.Vector3() for (s = 0; s <= i; ++s) { var w = (s / i) * r * Math.PI * 2 for (a(w, r, o, e, C), a(0.01 + w, r, o, e, I), _.subVectors(I, C), b.addVectors(I, C), E.crossVectors(_, b), b.crossVectors(E, _), E.normalize(), b.normalize(), l = 0; l <= n; ++l) { var T = (l / n) * Math.PI * 2, x = -t * Math.cos(T), S = t * Math.sin(T) ;(v.x = C.x + (x * b.x + S * E.x)), (v.y = C.y + (x * b.y + S * E.y)), (v.z = C.z + (x * b.z + S * E.z)), d.setXYZ(g, v.x, v.y, v.z), y.subVectors(v, C).normalize(), p.setXYZ(g, y.x, y.y, y.z), (A.x = s / i), (A.y = l / n), f.setXY(g, A.x, A.y), g++ } } for (l = 1; l <= i; l++) for (s = 1; s <= n; s++) { var M = (n + 1) * (l - 1) + (s - 1), R = (n + 1) * l + (s - 1), P = (n + 1) * l + s, O = (n + 1) * (l - 1) + s u.setX(m, M), m++, u.setX(m, R), m++, u.setX(m, O), m++, u.setX(m, R), m++, u.setX(m, P), m++, u.setX(m, O), m++ } this.setIndex(u), this.addAttribute('position', d), this.addAttribute('normal', p), this.addAttribute('uv', f) }), (Ci.TorusKnotBufferGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.TorusKnotBufferGeometry.prototype.constructor = Ci.TorusKnotBufferGeometry), (Ci.TorusKnotGeometry = function (e, t, i, n, r, o, a) { Ci.Geometry.call(this), (this.type = 'TorusKnotGeometry'), (this.parameters = { radius: e, tube: t, tubularSegments: i, radialSegments: n, p: r, q: o }), void 0 !== a && console.warn('THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.'), this.fromBufferGeometry(new Ci.TorusKnotBufferGeometry(e, t, i, n, r, o)), this.mergeVertices() }), (Ci.TorusKnotGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.TorusKnotGeometry.prototype.constructor = Ci.TorusKnotGeometry), (Ci.TubeGeometry = function (e, t, i, n, r, o) { Ci.Geometry.call(this), (this.type = 'TubeGeometry'), (this.parameters = { path: e, segments: t, radius: i, radialSegments: n, closed: r, taper: o }), (t = t || 64), (i = i || 1), (n = n || 8), (r = r || !1), (o = o || Ci.TubeGeometry.NoTaper) var a, s, l, c, h, u, d, p, f, g, m, v, y, A, C, I, E, _, b, w, T, x, S, M = [], R = this, P = t + 1, O = new Ci.Vector3(), L = new Ci.TubeGeometry.FrenetFrames(e, t, r), D = L.tangents, N = L.normals, F = L.binormals for (this.tangents = D, this.normals = N, this.binormals = F, f = 0; f < P; f++) for (M[f] = [], l = f / (P - 1), p = e.getPointAt(l), D[f], a = N[f], s = F[f], h = i * o(l), g = 0; g < n; g++) (c = (g / n) * 2 * Math.PI), (u = -h * Math.cos(c)), (d = h * Math.sin(c)), O.copy(p), (O.x += u * a.x + d * s.x), (O.y += u * a.y + d * s.y), (O.z += u * a.z + d * s.z), (M[f][g] = ((T = O.x), (x = O.y), (S = O.z), R.vertices.push(new Ci.Vector3(T, x, S)) - 1)) for (f = 0; f < t; f++) for (g = 0; g < n; g++) (m = r ? (f + 1) % t : f + 1), (v = (g + 1) % n), (y = M[f][g]), (A = M[m][g]), (C = M[m][v]), (I = M[f][v]), (E = new Ci.Vector2(f / t, g / n)), (_ = new Ci.Vector2((f + 1) / t, g / n)), (b = new Ci.Vector2((f + 1) / t, (g + 1) / n)), (w = new Ci.Vector2(f / t, (g + 1) / n)), this.faces.push(new Ci.Face3(y, A, I)), this.faceVertexUvs[0].push([E, _, w]), this.faces.push(new Ci.Face3(A, C, I)), this.faceVertexUvs[0].push([_.clone(), b, w.clone()]) this.computeFaceNormals(), this.computeVertexNormals() }), (Ci.TubeGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.TubeGeometry.prototype.constructor = Ci.TubeGeometry), (Ci.TubeGeometry.NoTaper = function (e) { return 1 }), (Ci.TubeGeometry.SinusoidalTaper = function (e) { return Math.sin(Math.PI * e) }), (Ci.TubeGeometry.FrenetFrames = function (e, t, i) { var n, r, o, a, s, l, c, h = new Ci.Vector3(), u = [], d = [], p = [], f = new Ci.Vector3(), g = new Ci.Matrix4(), m = t + 1 for (this.tangents = u, this.normals = d, this.binormals = p, l = 0; l < m; l++) (c = l / (m - 1)), (u[l] = e.getTangentAt(c)), u[l].normalize() for ( d[0] = new Ci.Vector3(), p[0] = new Ci.Vector3(), r = Number.MAX_VALUE, o = Math.abs(u[0].x), a = Math.abs(u[0].y), s = Math.abs(u[0].z), o <= r && ((r = o), h.set(1, 0, 0)), a <= r && ((r = a), h.set(0, 1, 0)), s <= r && h.set(0, 0, 1), f.crossVectors(u[0], h).normalize(), d[0].crossVectors(u[0], f), p[0].crossVectors(u[0], d[0]), l = 1; l < m; l++ ) (d[l] = d[l - 1].clone()), (p[l] = p[l - 1].clone()), f.crossVectors(u[l - 1], u[l]), f.length() > Number.EPSILON && (f.normalize(), (n = Math.acos(Ci.Math.clamp(u[l - 1].dot(u[l]), -1, 1))), d[l].applyMatrix4(g.makeRotationAxis(f, n))), p[l].crossVectors(u[l], d[l]) if (i) for (n = Math.acos(Ci.Math.clamp(d[0].dot(d[m - 1]), -1, 1)), n /= m - 1, 0 < u[0].dot(f.crossVectors(d[0], d[m - 1])) && (n = -n), l = 1; l < m; l++) d[l].applyMatrix4(g.makeRotationAxis(u[l], n * l)), p[l].crossVectors(u[l], d[l]) }), (Ci.PolyhedronGeometry = function (e, t, i, n) { function f(e) { var t = e.normalize().clone() t.index = m.vertices.push(t) - 1 var i = a(e) / 2 / Math.PI + 0.5, n = (function (e) { return Math.atan2(-e.y, Math.sqrt(e.x * e.x + e.z * e.z)) })(e) / Math.PI + 0.5 return (t.uv = new Ci.Vector2(i, 1 - n)), t } function g(e, t, i, n) { var r = new Ci.Face3(e.index, t.index, i.index, [e.clone(), t.clone(), i.clone()], void 0, n) m.faces.push(r), y.copy(e).add(t).add(i).divideScalar(3) var o = a(y) m.faceVertexUvs[0].push([s(e.uv, e, o), s(t.uv, t, o), s(i.uv, i, o)]) } function r(e, t) { for (var i = Math.pow(2, t), n = f(m.vertices[e.a]), r = f(m.vertices[e.b]), o = f(m.vertices[e.c]), a = [], s = e.materialIndex, l = 0; l <= i; l++) { a[l] = [] for (var c = f(n.clone().lerp(o, l / i)), h = f(r.clone().lerp(o, l / i)), u = i - l, d = 0; d <= u; d++) a[l][d] = 0 === d && l === i ? c : f(c.clone().lerp(h, d / u)) } for (l = 0; l < i; l++) for (d = 0; d < 2 * (i - l) - 1; d++) { var p = Math.floor(d / 2) d % 2 == 0 ? g(a[l][p + 1], a[l + 1][p], a[l][p], s) : g(a[l][p + 1], a[l + 1][p + 1], a[l + 1][p], s) } } function a(e) { return Math.atan2(e.z, -e.x) } function s(e, t, i) { return i < 0 && 1 === e.x && (e = new Ci.Vector2(e.x - 1, e.y)), 0 === t.x && 0 === t.z && (e = new Ci.Vector2(i / 2 / Math.PI + 0.5, e.y)), e.clone() } Ci.Geometry.call(this), (this.type = 'PolyhedronGeometry'), (this.parameters = { vertices: e, indices: t, radius: i, detail: n }), (i = i || 1), (n = n || 0) for (var m = this, o = 0, l = e.length; o < l; o += 3) f(new Ci.Vector3(e[o], e[o + 1], e[o + 2])) var c = this.vertices, h = [], u = ((o = 0), 0) for (l = t.length; o < l; o += 3, u++) { var d = c[t[o]], p = c[t[o + 1]], v = c[t[o + 2]] h[u] = new Ci.Face3(d.index, p.index, v.index, [d.clone(), p.clone(), v.clone()], void 0, u) } var y = new Ci.Vector3() for (o = 0, l = h.length; o < l; o++) r(h[o], n) for (o = 0, l = this.faceVertexUvs[0].length; o < l; o++) { var A = this.faceVertexUvs[0][o], C = A[0].x, I = A[1].x, E = A[2].x, _ = Math.max(C, I, E), b = Math.min(C, I, E) 0.9 < _ && b < 0.1 && (C < 0.2 && (A[0].x += 1), I < 0.2 && (A[1].x += 1), E < 0.2 && (A[2].x += 1)) } for (o = 0, l = this.vertices.length; o < l; o++) this.vertices[o].multiplyScalar(i) this.mergeVertices(), this.computeFaceNormals(), (this.boundingSphere = new Ci.Sphere(new Ci.Vector3(), i)) }), (Ci.PolyhedronGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.PolyhedronGeometry.prototype.constructor = Ci.PolyhedronGeometry), (Ci.DodecahedronGeometry = function (e, t) { var i = (1 + Math.sqrt(5)) / 2, n = 1 / i, r = [ -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -n, -i, 0, -n, i, 0, n, -i, 0, n, i, -n, -i, 0, -n, i, 0, n, -i, 0, n, i, 0, -i, 0, -n, i, 0, -n, -i, 0, n, i, 0, n ] Ci.PolyhedronGeometry.call( this, r, [ 3, 11, 7, 3, 7, 15, 3, 15, 13, 7, 19, 17, 7, 17, 6, 7, 6, 15, 17, 4, 8, 17, 8, 10, 17, 10, 6, 8, 0, 16, 8, 16, 2, 8, 2, 10, 0, 12, 1, 0, 1, 18, 0, 18, 16, 6, 10, 2, 6, 2, 13, 6, 13, 15, 2, 16, 18, 2, 18, 3, 2, 3, 13, 18, 1, 9, 18, 9, 11, 18, 11, 3, 4, 14, 12, 4, 12, 0, 4, 0, 8, 11, 9, 5, 11, 5, 19, 11, 19, 7, 19, 5, 14, 19, 14, 4, 19, 4, 17, 1, 12, 14, 1, 14, 5, 1, 5, 9 ], e, t ), (this.type = 'DodecahedronGeometry'), (this.parameters = { radius: e, detail: t }) }), (Ci.DodecahedronGeometry.prototype = Object.create(Ci.PolyhedronGeometry.prototype)), (Ci.DodecahedronGeometry.prototype.constructor = Ci.DodecahedronGeometry), (Ci.IcosahedronGeometry = function (e, t) { var i = (1 + Math.sqrt(5)) / 2, n = [-1, i, 0, 1, i, 0, -1, -i, 0, 1, -i, 0, 0, -1, i, 0, 1, i, 0, -1, -i, 0, 1, -i, i, 0, -1, i, 0, 1, -i, 0, -1, -i, 0, 1] Ci.PolyhedronGeometry.call( this, n, [ 0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1 ], e, t ), (this.type = 'IcosahedronGeometry'), (this.parameters = { radius: e, detail: t }) }), (Ci.IcosahedronGeometry.prototype = Object.create(Ci.PolyhedronGeometry.prototype)), (Ci.IcosahedronGeometry.prototype.constructor = Ci.IcosahedronGeometry), (Ci.OctahedronGeometry = function (e, t) { Ci.PolyhedronGeometry.call(this, [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1], [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2], e, t), (this.type = 'OctahedronGeometry'), (this.parameters = { radius: e, detail: t }) }), (Ci.OctahedronGeometry.prototype = Object.create(Ci.PolyhedronGeometry.prototype)), (Ci.OctahedronGeometry.prototype.constructor = Ci.OctahedronGeometry), (Ci.TetrahedronGeometry = function (e, t) { Ci.PolyhedronGeometry.call(this, [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1], [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1], e, t), (this.type = 'TetrahedronGeometry'), (this.parameters = { radius: e, detail: t }) }), (Ci.TetrahedronGeometry.prototype = Object.create(Ci.PolyhedronGeometry.prototype)), (Ci.TetrahedronGeometry.prototype.constructor = Ci.TetrahedronGeometry), (Ci.ParametricGeometry = function (e, t, i) { Ci.Geometry.call(this), (this.type = 'ParametricGeometry'), (this.parameters = { func: e, slices: t, stacks: i }) var n, r, o, a, s, l, c, h, u, d, p, f, g = this.vertices, m = this.faces, v = this.faceVertexUvs[0], y = t + 1 for (n = 0; n <= i; n++) for (a = n / i, r = 0; r <= t; r++) (o = e(r / t, a)), g.push(o) for (n = 0; n < i; n++) for (r = 0; r < t; r++) (l = (s = n * y + r) + 1), (c = (n + 1) * y + r + 1), (h = (n + 1) * y + r), (u = new Ci.Vector2(r / t, n / i)), (d = new Ci.Vector2((r + 1) / t, n / i)), (p = new Ci.Vector2((r + 1) / t, (n + 1) / i)), (f = new Ci.Vector2(r / t, (n + 1) / i)), m.push(new Ci.Face3(s, l, h)), v.push([u, d, f]), m.push(new Ci.Face3(l, c, h)), v.push([d.clone(), p, f.clone()]) this.computeFaceNormals(), this.computeVertexNormals() }), (Ci.ParametricGeometry.prototype = Object.create(Ci.Geometry.prototype)), (Ci.ParametricGeometry.prototype.constructor = Ci.ParametricGeometry), (Ci.WireframeGeometry = function (e) { function t(e, t) { return e - t } Ci.BufferGeometry.call(this) var i = [0, 0], n = {}, r = ['a', 'b', 'c'] if (e instanceof Ci.Geometry) { for (var o = e.vertices, a = e.faces, s = 0, l = new Uint32Array(6 * a.length), c = 0, h = a.length; c < h; c++) for (var u = a[c], d = 0; d < 3; d++) { ;(i[0] = u[r[d]]), (i[1] = u[r[(d + 1) % 3]]), i.sort(t), void 0 === n[(E = i.toString())] && ((l[2 * s] = i[0]), (l[2 * s + 1] = i[1]), (n[E] = !0), s++) } var p = new Float32Array(2 * s * 3) for (c = 0, h = s; c < h; c++) for (d = 0; d < 2; d++) { var f = o[l[2 * c + d]] ;(p[(_ = 6 * c + 3 * d) + 0] = f.x), (p[_ + 1] = f.y), (p[_ + 2] = f.z) } this.addAttribute('position', new Ci.BufferAttribute(p, 3)) } else if (e instanceof Ci.BufferGeometry) if (null !== e.index) { var g = e.index.array, m = ((o = e.attributes.position), e.groups) s = 0 0 === m.length && e.addGroup(0, g.length) l = new Uint32Array(2 * g.length) for (var v = 0, y = m.length; v < y; ++v) for (var A = m[v], C = A.start, I = ((c = C), C + A.count); c < I; c += 3) for (d = 0; d < 3; d++) { var E ;(i[0] = g[c + d]), (i[1] = g[c + ((d + 1) % 3)]), i.sort(t), void 0 === n[(E = i.toString())] && ((l[2 * s] = i[0]), (l[2 * s + 1] = i[1]), (n[E] = !0), s++) } for (p = new Float32Array(2 * s * 3), c = 0, h = s; c < h; c++) for (d = 0; d < 2; d++) { var _ = 6 * c + 3 * d, b = l[2 * c + d] ;(p[_ + 0] = o.getX(b)), (p[_ + 1] = o.getY(b)), (p[_ + 2] = o.getZ(b)) } this.addAttribute('position', new Ci.BufferAttribute(p, 3)) } else { var w = (s = (o = e.attributes.position.array).length / 3) / 3 for (p = new Float32Array(2 * s * 3), c = 0, h = w; c < h; c++) for (d = 0; d < 3; d++) { var T = 9 * c + 3 * d ;(p[(_ = 18 * c + 6 * d) + 0] = o[T]), (p[_ + 1] = o[1 + T]), (p[_ + 2] = o[2 + T]) b = 9 * c + ((d + 1) % 3) * 3 ;(p[_ + 3] = o[b]), (p[_ + 4] = o[b + 1]), (p[_ + 5] = o[b + 2]) } this.addAttribute('position', new Ci.BufferAttribute(p, 3)) } }), (Ci.WireframeGeometry.prototype = Object.create(Ci.BufferGeometry.prototype)), (Ci.WireframeGeometry.prototype.constructor = Ci.WireframeGeometry), (Ci.AxisHelper = function (e) { e = e || 1 var t = new Float32Array([0, 0, 0, e, 0, 0, 0, 0, 0, 0, e, 0, 0, 0, 0, 0, 0, e]), i = new Float32Array([1, 0, 0, 1, 0.6, 0, 0, 1, 0, 0.6, 1, 0, 0, 0, 1, 0, 0.6, 1]), n = new Ci.BufferGeometry() n.addAttribute('position', new Ci.BufferAttribute(t, 3)), n.addAttribute('color', new Ci.BufferAttribute(i, 3)) var r = new Ci.LineBasicMaterial({ vertexColors: Ci.VertexColors }) Ci.LineSegments.call(this, n, r) }), (Ci.AxisHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.AxisHelper.prototype.constructor = Ci.AxisHelper), (Ci.ArrowHelper = (function () { var a = new Ci.Geometry() a.vertices.push(new Ci.Vector3(0, 0, 0), new Ci.Vector3(0, 1, 0)) var s = new Ci.CylinderGeometry(0, 0.5, 1, 5, 1) return ( s.translate(0, -0.5, 0), function (e, t, i, n, r, o) { Ci.Object3D.call(this), void 0 === n && (n = 16776960), void 0 === i && (i = 1), void 0 === r && (r = 0.2 * i), void 0 === o && (o = 0.2 * r), this.position.copy(t), (this.line = new Ci.Line( a, new Ci.LineBasicMaterial({ color: n }) )), (this.line.matrixAutoUpdate = !1), this.add(this.line), (this.cone = new Ci.Mesh( s, new Ci.MeshBasicMaterial({ color: n }) )), (this.cone.matrixAutoUpdate = !1), this.add(this.cone), this.setDirection(e), this.setLength(i, r, o) } ) })()), (Ci.ArrowHelper.prototype = Object.create(Ci.Object3D.prototype)), (Ci.ArrowHelper.prototype.constructor = Ci.ArrowHelper), (Ci.ArrowHelper.prototype.setDirection = ((Ai = new Ci.Vector3()), function (e) { 0.99999 < e.y ? this.quaternion.set(0, 0, 0, 1) : e.y < -0.99999 ? this.quaternion.set(1, 0, 0, 0) : (Ai.set(e.z, 0, -e.x).normalize(), (yi = Math.acos(e.y)), this.quaternion.setFromAxisAngle(Ai, yi)) })), (Ci.ArrowHelper.prototype.setLength = function (e, t, i) { void 0 === t && (t = 0.2 * e), void 0 === i && (i = 0.2 * t), this.line.scale.set(1, Math.max(0, e - t), 1), this.line.updateMatrix(), this.cone.scale.set(i, t, i), (this.cone.position.y = e), this.cone.updateMatrix() }), (Ci.ArrowHelper.prototype.setColor = function (e) { this.line.material.color.set(e), this.cone.material.color.set(e) }), (Ci.BoxHelper = function (e) { var t = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), i = new Float32Array(24), n = new Ci.BufferGeometry() n.setIndex(new Ci.BufferAttribute(t, 1)), n.addAttribute('position', new Ci.BufferAttribute(i, 3)), Ci.LineSegments.call( this, n, new Ci.LineBasicMaterial({ color: 16776960 }) ), void 0 !== e && this.update(e) }), (Ci.BoxHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.BoxHelper.prototype.constructor = Ci.BoxHelper), (Ci.BoxHelper.prototype.update = ((vi = new Ci.Box3()), function (e) { if ((vi.setFromObject(e), !vi.isEmpty())) { var t = vi.min, i = vi.max, n = this.geometry.attributes.position, r = n.array ;(r[0] = i.x), (r[1] = i.y), (r[2] = i.z), (r[3] = t.x), (r[4] = i.y), (r[5] = i.z), (r[6] = t.x), (r[7] = t.y), (r[8] = i.z), (r[9] = i.x), (r[10] = t.y), (r[11] = i.z), (r[12] = i.x), (r[13] = i.y), (r[14] = t.z), (r[15] = t.x), (r[16] = i.y), (r[17] = t.z), (r[18] = t.x), (r[19] = t.y), (r[20] = t.z), (r[21] = i.x), (r[22] = t.y), (r[23] = t.z), (n.needsUpdate = !0), this.geometry.computeBoundingSphere() } })), (Ci.BoundingBoxHelper = function (e, t) { var i = void 0 !== t ? t : 8947848 ;(this.object = e), (this.box = new Ci.Box3()), Ci.Mesh.call( this, new Ci.BoxGeometry(1, 1, 1), new Ci.MeshBasicMaterial({ color: i, wireframe: !0 }) ) }), (Ci.BoundingBoxHelper.prototype = Object.create(Ci.Mesh.prototype)), (Ci.BoundingBoxHelper.prototype.constructor = Ci.BoundingBoxHelper), (Ci.BoundingBoxHelper.prototype.update = function () { this.box.setFromObject(this.object), this.box.size(this.scale), this.box.center(this.position) }), (Ci.CameraHelper = function (e) { function t(e, t, i) { n(e, i), n(t, i) } function n(e, t) { i.vertices.push(new Ci.Vector3()), i.colors.push(new Ci.Color(t)), void 0 === o[e] && (o[e] = []), o[e].push(i.vertices.length - 1) } var i = new Ci.Geometry(), r = new Ci.LineBasicMaterial({ color: 16777215, vertexColors: Ci.FaceColors }), o = {}, a = 16755200, s = 16711680, l = 3355443 t('n1', 'n2', a), t('n2', 'n4', a), t('n4', 'n3', a), t('n3', 'n1', a), t('f1', 'f2', a), t('f2', 'f4', a), t('f4', 'f3', a), t('f3', 'f1', a), t('n1', 'f1', a), t('n2', 'f2', a), t('n3', 'f3', a), t('n4', 'f4', a), t('p', 'n1', s), t('p', 'n2', s), t('p', 'n3', s), t('p', 'n4', s), t('u1', 'u2', 43775), t('u2', 'u3', 43775), t('u3', 'u1', 43775), t('c', 't', 16777215), t('p', 'c', l), t('cn1', 'cn2', l), t('cn3', 'cn4', l), t('cf1', 'cf2', l), t('cf3', 'cf4', l), Ci.LineSegments.call(this, i, r), (this.camera = e), this.camera.updateProjectionMatrix(), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1), (this.pointMap = o), this.update() }), (Ci.CameraHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.CameraHelper.prototype.constructor = Ci.CameraHelper), (Ci.CameraHelper.prototype.update = ((gi = new Ci.Vector3()), (mi = new Ci.Camera()), function () { ;(pi = this.geometry), (fi = this.pointMap), mi.projectionMatrix.copy(this.camera.projectionMatrix), Ni('c', 0, 0, -1), Ni('t', 0, 0, 1), Ni('n1', -1, -1, -1), Ni('n2', 1, -1, -1), Ni('n3', -1, 1, -1), Ni('n4', 1, 1, -1), Ni('f1', -1, -1, 1), Ni('f2', 1, -1, 1), Ni('f3', -1, 1, 1), Ni('f4', 1, 1, 1), Ni('u1', 0.7, 1.1, -1), Ni('u2', -0.7, 1.1, -1), Ni('u3', 0, 2, -1), Ni('cf1', -1, 0, 1), Ni('cf2', 1, 0, 1), Ni('cf3', 0, -1, 1), Ni('cf4', 0, 1, 1), Ni('cn1', -1, 0, -1), Ni('cn2', 1, 0, -1), Ni('cn3', 0, -1, -1), Ni('cn4', 0, 1, -1), (pi.verticesNeedUpdate = !0) })), (Ci.DirectionalLightHelper = function (e, t) { Ci.Object3D.call(this), (this.light = e), this.light.updateMatrixWorld(), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1), (t = t || 1) var i = new Ci.Geometry() i.vertices.push(new Ci.Vector3(-t, t, 0), new Ci.Vector3(t, t, 0), new Ci.Vector3(t, -t, 0), new Ci.Vector3(-t, -t, 0), new Ci.Vector3(-t, t, 0)) var n = new Ci.LineBasicMaterial({ fog: !1 }) n.color.copy(this.light.color).multiplyScalar(this.light.intensity), (this.lightPlane = new Ci.Line(i, n)), this.add(this.lightPlane), (i = new Ci.Geometry()).vertices.push(new Ci.Vector3(), new Ci.Vector3()), (n = new Ci.LineBasicMaterial({ fog: !1 })).color .copy(this.light.color) .multiplyScalar(this.light.intensity), (this.targetLine = new Ci.Line(i, n)), this.add(this.targetLine), this.update() }), (Ci.DirectionalLightHelper.prototype = Object.create(Ci.Object3D.prototype)), (Ci.DirectionalLightHelper.prototype.constructor = Ci.DirectionalLightHelper), (Ci.DirectionalLightHelper.prototype.dispose = function () { this.lightPlane.geometry.dispose(), this.lightPlane.material.dispose(), this.targetLine.geometry.dispose(), this.targetLine.material.dispose() }), (Ci.DirectionalLightHelper.prototype.update = ((hi = new Ci.Vector3()), (ui = new Ci.Vector3()), (di = new Ci.Vector3()), function () { hi.setFromMatrixPosition(this.light.matrixWorld), ui.setFromMatrixPosition(this.light.target.matrixWorld), di.subVectors(ui, hi), this.lightPlane.lookAt(di), this.lightPlane.material.color.copy(this.light.color).multiplyScalar(this.light.intensity), this.targetLine.geometry.vertices[1].copy(di), (this.targetLine.geometry.verticesNeedUpdate = !0), this.targetLine.material.color.copy(this.lightPlane.material.color) })), (Ci.EdgesHelper = function (e, t, i) { var n = void 0 !== t ? t : 16777215 Ci.LineSegments.call( this, new Ci.EdgesGeometry(e.geometry, i), new Ci.LineBasicMaterial({ color: n }) ), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1) }), (Ci.EdgesHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.EdgesHelper.prototype.constructor = Ci.EdgesHelper), (Ci.FaceNormalsHelper = function (e, t, i, n) { ;(this.object = e), (this.size = void 0 !== t ? t : 1) var r = void 0 !== i ? i : 16776960, o = void 0 !== n ? n : 1, a = 0, s = this.object.geometry s instanceof Ci.Geometry ? (a = s.faces.length) : console.warn('THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.') var l = new Ci.BufferGeometry(), c = new Ci.Float32Attribute(2 * a * 3, 3) l.addAttribute('position', c), Ci.LineSegments.call( this, l, new Ci.LineBasicMaterial({ color: r, linewidth: o }) ), (this.matrixAutoUpdate = !1), this.update() }), (Ci.FaceNormalsHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.FaceNormalsHelper.prototype.constructor = Ci.FaceNormalsHelper), (Ci.FaceNormalsHelper.prototype.update = ((si = new Ci.Vector3()), (li = new Ci.Vector3()), (ci = new Ci.Matrix3()), function () { this.object.updateMatrixWorld(!0), ci.getNormalMatrix(this.object.matrixWorld) for (var e = this.object.matrixWorld, t = this.geometry.attributes.position, i = this.object.geometry, n = i.vertices, r = i.faces, o = 0, a = 0, s = r.length; a < s; a++) { var l = r[a], c = l.normal si.copy(n[l.a]).add(n[l.b]).add(n[l.c]).divideScalar(3).applyMatrix4(e), li.copy(c).applyMatrix3(ci).normalize().multiplyScalar(this.size).add(si), t.setXYZ(o, si.x, si.y, si.z), (o += 1), t.setXYZ(o, li.x, li.y, li.z), (o += 1) } return (t.needsUpdate = !0), this })), (Ci.GridHelper = function (e, t) { var i = new Ci.Geometry(), n = new Ci.LineBasicMaterial({ vertexColors: Ci.VertexColors }) ;(this.color1 = new Ci.Color(4473924)), (this.color2 = new Ci.Color(8947848)) for (var r = -e; r <= e; r += t) { i.vertices.push(new Ci.Vector3(-e, 0, r), new Ci.Vector3(e, 0, r), new Ci.Vector3(r, 0, -e), new Ci.Vector3(r, 0, e)) var o = 0 === r ? this.color1 : this.color2 i.colors.push(o, o, o, o) } Ci.LineSegments.call(this, i, n) }), (Ci.GridHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.GridHelper.prototype.constructor = Ci.GridHelper), (Ci.GridHelper.prototype.setColors = function (e, t) { this.color1.set(e), this.color2.set(t), (this.geometry.colorsNeedUpdate = !0) }), (Ci.HemisphereLightHelper = function (e, t) { Ci.Object3D.call(this), (this.light = e), this.light.updateMatrixWorld(), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1), (this.colors = [new Ci.Color(), new Ci.Color()]) var i = new Ci.SphereGeometry(t, 4, 2) i.rotateX(-Math.PI / 2) for (var n = 0; n < 8; n++) i.faces[n].color = this.colors[n < 4 ? 0 : 1] var r = new Ci.MeshBasicMaterial({ vertexColors: Ci.FaceColors, wireframe: !0 }) ;(this.lightSphere = new Ci.Mesh(i, r)), this.add(this.lightSphere), this.update() }), (Ci.HemisphereLightHelper.prototype = Object.create(Ci.Object3D.prototype)), (Ci.HemisphereLightHelper.prototype.constructor = Ci.HemisphereLightHelper), (Ci.HemisphereLightHelper.prototype.dispose = function () { this.lightSphere.geometry.dispose(), this.lightSphere.material.dispose() }), (Ci.HemisphereLightHelper.prototype.update = ((ai = new Ci.Vector3()), function () { this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity), this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity), this.lightSphere.lookAt(ai.setFromMatrixPosition(this.light.matrixWorld).negate()), (this.lightSphere.geometry.colorsNeedUpdate = !0) })), (Ci.PointLightHelper = function (e, t) { ;(this.light = e), this.light.updateMatrixWorld() var i = new Ci.SphereGeometry(t, 4, 2), n = new Ci.MeshBasicMaterial({ wireframe: !0, fog: !1 }) n.color.copy(this.light.color).multiplyScalar(this.light.intensity), Ci.Mesh.call(this, i, n), (this.matrix = this.light.matrixWorld), (this.matrixAutoUpdate = !1) }), (Ci.PointLightHelper.prototype = Object.create(Ci.Mesh.prototype)), (Ci.PointLightHelper.prototype.constructor = Ci.PointLightHelper), (Ci.PointLightHelper.prototype.dispose = function () { this.geometry.dispose(), this.material.dispose() }), (Ci.PointLightHelper.prototype.update = function () { this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity) }), (Ci.SkeletonHelper = function (e) { this.bones = this.getBoneList(e) for (var t = new Ci.Geometry(), i = 0; i < this.bones.length; i++) { this.bones[i].parent instanceof Ci.Bone && (t.vertices.push(new Ci.Vector3()), t.vertices.push(new Ci.Vector3()), t.colors.push(new Ci.Color(0, 0, 1)), t.colors.push(new Ci.Color(0, 1, 0))) } t.dynamic = !0 var n = new Ci.LineBasicMaterial({ vertexColors: Ci.VertexColors, depthTest: !1, depthWrite: !1, transparent: !0 }) Ci.LineSegments.call(this, t, n), (this.root = e), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1), this.update() }), (Ci.SkeletonHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.SkeletonHelper.prototype.constructor = Ci.SkeletonHelper), (Ci.SkeletonHelper.prototype.getBoneList = function (e) { var t = [] e instanceof Ci.Bone && t.push(e) for (var i = 0; i < e.children.length; i++) t.push.apply(t, this.getBoneList(e.children[i])) return t }), (Ci.SkeletonHelper.prototype.update = function () { for (var e = this.geometry, t = new Ci.Matrix4().getInverse(this.root.matrixWorld), i = new Ci.Matrix4(), n = 0, r = 0; r < this.bones.length; r++) { var o = this.bones[r] o.parent instanceof Ci.Bone && (i.multiplyMatrices(t, o.matrixWorld), e.vertices[n].setFromMatrixPosition(i), i.multiplyMatrices(t, o.parent.matrixWorld), e.vertices[n + 1].setFromMatrixPosition(i), (n += 2)) } ;(e.verticesNeedUpdate = !0), e.computeBoundingSphere() }), (Ci.SpotLightHelper = function (e) { Ci.Object3D.call(this), (this.light = e), this.light.updateMatrixWorld(), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1) var t = new Ci.CylinderGeometry(0, 1, 1, 8, 1, !0) t.translate(0, -0.5, 0), t.rotateX(-Math.PI / 2) var i = new Ci.MeshBasicMaterial({ wireframe: !0, fog: !1 }) ;(this.cone = new Ci.Mesh(t, i)), this.add(this.cone), this.update() }), (Ci.SpotLightHelper.prototype = Object.create(Ci.Object3D.prototype)), (Ci.SpotLightHelper.prototype.constructor = Ci.SpotLightHelper), (Ci.SpotLightHelper.prototype.dispose = function () { this.cone.geometry.dispose(), this.cone.material.dispose() }), (Ci.SpotLightHelper.prototype.update = ((ri = new Ci.Vector3()), (oi = new Ci.Vector3()), function () { var e = this.light.distance ? this.light.distance : 1e4, t = e * Math.tan(this.light.angle) this.cone.scale.set(t, t, e), ri.setFromMatrixPosition(this.light.matrixWorld), oi.setFromMatrixPosition(this.light.target.matrixWorld), this.cone.lookAt(oi.sub(ri)), this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity) })), (Ci.VertexNormalsHelper = function (e, t, i, n) { ;(this.object = e), (this.size = void 0 !== t ? t : 1) var r = void 0 !== i ? i : 16711680, o = void 0 !== n ? n : 1, a = 0, s = this.object.geometry s instanceof Ci.Geometry ? (a = 3 * s.faces.length) : s instanceof Ci.BufferGeometry && (a = s.attributes.normal.count) var l = new Ci.BufferGeometry(), c = new Ci.Float32Attribute(2 * a * 3, 3) l.addAttribute('position', c), Ci.LineSegments.call( this, l, new Ci.LineBasicMaterial({ color: r, linewidth: o }) ), (this.matrixAutoUpdate = !1), this.update() }), (Ci.VertexNormalsHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.VertexNormalsHelper.prototype.constructor = Ci.VertexNormalsHelper), (Ci.VertexNormalsHelper.prototype.update = ((ti = new Ci.Vector3()), (ii = new Ci.Vector3()), (ni = new Ci.Matrix3()), function () { var e = ['a', 'b', 'c'] this.object.updateMatrixWorld(!0), ni.getNormalMatrix(this.object.matrixWorld) var t = this.object.matrixWorld, i = this.geometry.attributes.position, n = this.object.geometry if (n instanceof Ci.Geometry) for (var r = n.vertices, o = n.faces, a = 0, s = 0, l = o.length; s < l; s++) for (var c = o[s], h = 0, u = c.vertexNormals.length; h < u; h++) { var d = r[c[e[h]]], p = c.vertexNormals[h] ti.copy(d).applyMatrix4(t), ii.copy(p).applyMatrix3(ni).normalize().multiplyScalar(this.size).add(ti), i.setXYZ(a, ti.x, ti.y, ti.z), (a += 1), i.setXYZ(a, ii.x, ii.y, ii.z), (a += 1) } else if (n instanceof Ci.BufferGeometry) { var f = n.attributes.position, g = n.attributes.normal for (h = a = 0, u = f.count; h < u; h++) ti.set(f.getX(h), f.getY(h), f.getZ(h)).applyMatrix4(t), ii.set(g.getX(h), g.getY(h), g.getZ(h)), ii.applyMatrix3(ni).normalize().multiplyScalar(this.size).add(ti), i.setXYZ(a, ti.x, ti.y, ti.z), (a += 1), i.setXYZ(a, ii.x, ii.y, ii.z), (a += 1) } return (i.needsUpdate = !0), this })), (Ci.WireframeHelper = function (e, t) { var i = void 0 !== t ? t : 16777215 Ci.LineSegments.call( this, new Ci.WireframeGeometry(e.geometry), new Ci.LineBasicMaterial({ color: i }) ), (this.matrix = e.matrixWorld), (this.matrixAutoUpdate = !1) }), (Ci.WireframeHelper.prototype = Object.create(Ci.LineSegments.prototype)), (Ci.WireframeHelper.prototype.constructor = Ci.WireframeHelper), (Ci.ImmediateRenderObject = function (e) { Ci.Object3D.call(this), (this.material = e), (this.render = function (e) {}) }), (Ci.ImmediateRenderObject.prototype = Object.create(Ci.Object3D.prototype)), (Ci.ImmediateRenderObject.prototype.constructor = Ci.ImmediateRenderObject), (Ci.MorphBlendMesh = function (e, t) { Ci.Mesh.call(this, e, t), (this.animationsMap = {}), (this.animationsList = []) var i = this.geometry.morphTargets.length, n = i - 1, r = i / 1 this.createAnimation('__default', 0, n, r), this.setAnimationWeight('__default', 1) }), (Ci.MorphBlendMesh.prototype = Object.create(Ci.Mesh.prototype)), (Ci.MorphBlendMesh.prototype.constructor = Ci.MorphBlendMesh), (Ci.MorphBlendMesh.prototype.createAnimation = function (e, t, i, n) { var r = { start: t, end: i, length: i - t + 1, fps: n, duration: (i - t) / n, lastFrame: 0, currentFrame: 0, active: !1, time: 0, direction: 1, weight: 1, directionBackwards: !1, mirroredLoop: !1 } ;(this.animationsMap[e] = r), this.animationsList.push(r) }), (Ci.MorphBlendMesh.prototype.autoCreateAnimations = function (e) { for (var t, i = /([a-z]+)_?(\d+)/i, n = {}, r = this.geometry, o = 0, a = r.morphTargets.length; o < a; o++) { var s = r.morphTargets[o].name.match(i) if (s && 1 < s.length) n[(l = s[1])] || (n[l] = { start: 1 / 0, end: -1 / 0 }), o < (c = n[l]).start && (c.start = o), o > c.end && (c.end = o), (t = t || l) } for (var l in n) { var c = n[l] this.createAnimation(l, c.start, c.end, e) } this.firstAnimation = t }), (Ci.MorphBlendMesh.prototype.setAnimationDirectionForward = function (e) { var t = this.animationsMap[e] t && ((t.direction = 1), (t.directionBackwards = !1)) }), (Ci.MorphBlendMesh.prototype.setAnimationDirectionBackward = function (e) { var t = this.animationsMap[e] t && ((t.direction = -1), (t.directionBackwards = !0)) }), (Ci.MorphBlendMesh.prototype.setAnimationFPS = function (e, t) { var i = this.animationsMap[e] i && ((i.fps = t), (i.duration = (i.end - i.start) / i.fps)) }), (Ci.MorphBlendMesh.prototype.setAnimationDuration = function (e, t) { var i = this.animationsMap[e] i && ((i.duration = t), (i.fps = (i.end - i.start) / i.duration)) }), (Ci.MorphBlendMesh.prototype.setAnimationWeight = function (e, t) { var i = this.animationsMap[e] i && (i.weight = t) }), (Ci.MorphBlendMesh.prototype.setAnimationTime = function (e, t) { var i = this.animationsMap[e] i && (i.time = t) }), (Ci.MorphBlendMesh.prototype.getAnimationTime = function (e) { var t = 0, i = this.animationsMap[e] return i && (t = i.time), t }), (Ci.MorphBlendMesh.prototype.getAnimationDuration = function (e) { var t = -1, i = this.animationsMap[e] return i && (t = i.duration), t }), (Ci.MorphBlendMesh.prototype.playAnimation = function (e) { var t = this.animationsMap[e] t ? ((t.time = 0), (t.active = !0)) : console.warn('THREE.MorphBlendMesh: animation[' + e + '] undefined in .playAnimation()') }), (Ci.MorphBlendMesh.prototype.stopAnimation = function (e) { var t = this.animationsMap[e] t && (t.active = !1) }), (Ci.MorphBlendMesh.prototype.update = function (e) { for (var t = 0, i = this.animationsList.length; t < i; t++) { var n = this.animationsList[t] if (n.active) { var r = n.duration / n.length ;(n.time += n.direction * e), n.mirroredLoop ? (n.time > n.duration || n.time < 0) && ((n.direction *= -1), n.time > n.duration && ((n.time = n.duration), (n.directionBackwards = !0)), n.time < 0 && ((n.time = 0), (n.directionBackwards = !1))) : ((n.time = n.time % n.duration), n.time < 0 && (n.time += n.duration)) var o = n.start + Ci.Math.clamp(Math.floor(n.time / r), 0, n.length - 1), a = n.weight o !== n.currentFrame && ((this.morphTargetInfluences[n.lastFrame] = 0), (this.morphTargetInfluences[n.currentFrame] = 1 * a), (this.morphTargetInfluences[o] = 0), (n.lastFrame = n.currentFrame), (n.currentFrame = o)) var s = (n.time % r) / r n.directionBackwards && (s = 1 - s), n.currentFrame !== n.lastFrame ? ((this.morphTargetInfluences[n.currentFrame] = s * a), (this.morphTargetInfluences[n.lastFrame] = (1 - s) * a)) : (this.morphTargetInfluences[n.currentFrame] = a) } } }), void 0 !== i ? (void 0 !== t && t.exports && (i = t.exports = Ci), (i.THREE = Ci)) : (this.THREE = Ci) window.THREE = Ci getObjLoader() initByTHREE(THREE) }, {} ] }, {}, [116] )