vendor: 52,696 bytes, lines 1-857
1// Pannellum 2.5.6, https://github.com/mpetroff/pannellum 2window.libpannellum = function (E, g, p) { 3 function Ba(K) { 4 function ja(a, e) { 5 return 1 == a.level && 1 != e.level ? -1 : 1 == e.level && 1 != a.level ? 1 : e.timestamp - a.timestamp 6 } 7 8 function Q(a, e) { 9 return a.level != e.level ? a.level - e.level : a.diff - e.diff 10 } 11 12 function ka(a, e, c, g, l, h) { 13 this.vertices = a; 14 this.side = e; 15 this.level = c; 16 this.x = g; 17 this.y = l; 18 this.path = h.replace("%s", e).replace("%l", c).replace("%x", g).replace("%y", l) 19 } 20 21 function Ja(a, e, g, p, l) { 22 var h; 23 var d = e.vertices; 24 h = la(a, d.slice(0, 3)); 25 var u = la(a, d.slice(3, 6)), x = la(a, d.slice(6, 9)), d = la(a, d.slice(9, 26 12)), t = h[0] + u[0] + x[0] + d[0]; 27 -4 == t || 4 == t ? h = !1 : (t = h[1] + u[1] + x[1] + d[1], h = -4 == t || 4 == t ? !1 : 4 != h[2] + u[2] + x[2] + d[2]); 28 if (h) { 29 h = e.vertices; 30 u = h[0] + h[3] + h[6] + h[9]; 31 x = h[1] + h[4] + h[7] + h[10]; 32 d = h[2] + h[5] + h[8] + h[11]; 33 t = Math.sqrt(u * u + x * x + d * d); 34 d = Math.asin(d / t); 35 u = Math.atan2(x, u) - p; 36 u += u > Math.PI ? -2 * Math.PI : u < -Math.PI ? 2 * Math.PI : 0; 37 u = Math.abs(u); 38 e.diff = Math.acos(Math.sin(g) * Math.sin(d) + Math.cos(g) * Math.cos(d) * Math.cos(u)); 39 u = !1; 40 for (x = 0; x < c.nodeCache.length; x++) if (c.nodeCache[x].path == e.path) { 41 u = !0; 42 c.nodeCache[x].timestamp = c.nodeCacheTimestamp++; 43 c.nodeCache[x].diff = e.diff; 44 c.currentNodes.push(c.nodeCache[x]); 45 break 46 } 47 u || (e.timestamp = c.nodeCacheTimestamp++, c.currentNodes.push(e), c.nodeCache.push(e)); 48 if (e.level < c.level) { 49 var d = m.cubeResolution * Math.pow(2, e.level - m.maxLevel), 50 u = Math.ceil(d * m.invTileResolution) - 1, x = d % m.tileResolution * 2, 51 k = 2 * d % m.tileResolution; 52 0 === k && (k = m.tileResolution); 53 0 === x && (x = 2 * m.tileResolution); 54 t = 0.5; 55 if (e.x == u || e.y == u) t = 1 - m.tileResolution / (m.tileResolution + k); 56 var y = 1 - t, d = [], s = t, z = t, D = t, I = y, A = y, B = y; 57 if (k < m.tileResolution) if (e.x == 58 u && e.y != u) { 59 if (A = z = 0.5, "d" == e.side || "u" == e.side) B = D = 0.5 60 } else e.x != u && e.y == u && (I = s = 0.5, "l" == e.side || "r" == e.side) && (B = D = 0.5); 61 x <= m.tileResolution && (e.x == u && (s = 0, I = 1, "l" == e.side || "r" == e.side) && (D = 0, B = 1), e.y == u && (z = 0, A = 1, "d" == e.side || "u" == e.side) && (D = 0, B = 1)); 62 k = [h[0], h[1], h[2], h[0] * s + h[3] * I, h[1] * t + h[4] * y, h[2] * D + h[5] * B, h[0] * s + h[6] * I, h[1] * z + h[7] * A, h[2] * D + h[8] * B, h[0] * t + h[9] * y, h[1] * z + h[10] * A, h[2] * D + h[11] * B]; 63 k = new ka(k, e.side, e.level + 1, 2 * e.x, 2 * e.y, m.fullpath); 64 d.push(k); 65 e.x == u && x <= m.tileResolution || (k = [h[0] * s + 66 h[3] * I, h[1] * t + h[4] * y, h[2] * D + h[5] * B, h[3], h[4], h[5], h[3] * t + h[6] * y, h[4] * z + h[7] * A, h[5] * D + h[8] * B, h[0] * s + h[6] * I, h[1] * z + h[7] * A, h[2] * D + h[8] * B], k = new ka(k, e.side, e.level + 1, 2 * e.x + 1, 2 * e.y, m.fullpath), d.push(k)); 67 e.x == u && x <= m.tileResolution || e.y == u && x <= m.tileResolution || (k = [h[0] * s + h[6] * I, h[1] * z + h[7] * A, h[2] * D + h[8] * B, h[3] * t + h[6] * y, h[4] * z + h[7] * A, h[5] * D + h[8] * B, h[6], h[7], h[8], h[9] * s + h[6] * I, h[10] * t + h[7] * y, h[11] * D + h[8] * B], k = new ka(k, e.side, e.level + 1, 2 * e.x + 1, 2 * e.y + 1, m.fullpath), d.push(k)); 68 e.y == u && x <= m.tileResolution || 69 (k = [h[0] * t + h[9] * y, h[1] * z + h[10] * A, h[2] * D + h[11] * B, h[0] * s + h[6] * I, h[1] * z + h[7] * A, h[2] * D + h[8] * B, h[9] * s + h[6] * I, h[10] * t + h[7] * y, h[11] * D + h[8] * B, h[9], h[10], h[11]], k = new ka(k, e.side, e.level + 1, 2 * e.x, 2 * e.y + 1, m.fullpath), d.push(k)); 70 for (e = 0; e < d.length; e++) Ja(a, d[e], g, p, l) 71 } 72 } 73 } 74 75 function ta() { 76 return [-1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1] 77 } 78 79 function ua(a, e, c) { 80 var g = Math.sin(e); 81 e = Math.cos(e); 82 if ("x" == c) return [a[0], e * a[1] + g * a[2], e * a[2] - g * a[1], a[3], e * a[4] + g * a[5], e * a[5] - g * a[4], a[6], e * a[7] + g * a[8], e * a[8] - g * a[7]]; 83 if ("y" == c) return [e * a[0] - g * a[2], a[1], e * a[2] + g * a[0], e * a[3] - g * a[5], a[4], e * a[5] + g * a[3], e * a[6] - g * a[8], a[7], e * a[8] + g * a[6]]; 84 if ("z" == c) return [e * a[0] + g * a[1], e * a[1] - g * a[0], a[2], e * a[3] + g * a[4], e * a[4] - g * a[3], a[5], e * a[6] + g * a[7], e * a[7] - g * a[6], a[8]] 85 } 86 87 function ma(a) { 88 return [a[0], a[4], a[8], a[12], a[1], a[5], a[9], a[13], a[2], a[6], a[10], a[14], a[3], a[7], a[11], a[15]] 89 } 90 91 function Ka(a) { 92 La(a, a.path + "." + m.extension, 93 function (e, c) { 94 a.texture = e; 95 a.textureLoaded = c ? 2 : 1 96 }, va.crossOrigin) 97 } 98 99 function la(a, e) { 100 var c = [a[0] * e[0] + a[1] * e[1] + a[2] * e[2], a[4] * e[0] + a[5] * e[1] + a[6] * e[2], a[11] + a[8] * e[0] + a[9] * e[1] + a[10] * e[2], 1 / (a[12] * e[0] + a[13] * e[1] + a[14] * e[2])], 101 g = c[0] * c[3], l = c[1] * c[3], c = c[2] * c[3], h = [0, 0, 0]; 102 -1 > g && (h[0] = -1); 103 1 < g && (h[0] = 1); 104 -1 > l && (h[1] = -1); 105 1 < l && (h[1] = 1); 106 if (-1 > c || 1 < c) h[2] = 1; 107 return h 108 } 109 110 function Ea() { 111 console.log("Reducing canvas size due to error 1286!"); 112 A.width = Math.round(A.width / 2); 113 A.height = Math.round(A.height / 2) 114 } 115 116 var A = g.createElement("canvas"); 117 A.style.width = A.style.height = "100%"; 118 K.appendChild(A); 119 var c, a, U, V, $, R, wa, ga, m, z, F, ca, Fa, Y, na, va; 120 this.init = function (L, e, Ca, H, l, h, d, u) { 121 function x(a) { 122 if (E) { 123 var e = a * a * 4, h = new Uint8ClampedArray(e), 124 c = u.backgroundColor ? u.backgroundColor : [0, 0, 0]; 125 c[0] *= 255; 126 c[1] *= 255; 127 c[2] *= 255; 128 for (var b = 0; b < e; b++) h[b++] = c[0], h[b++] = c[1], h[b++] = c[2]; 129 a = new ImageData(h, a, a); 130 for (t = 0; 6 > t; t++) 0 == m[t].width && (m[t] = a) 131 } 132 } 133 134 e === p && (e = "equirectangular"); 135 if ("equirectangular" != e && "cubemap" != e && "multires" != e) throw console.log("Error: invalid image type specified!"), 136 {type: "config error"}; 137 z = e; 138 m = L; 139 F = Ca; 140 va = u || {}; 141 if (c) { 142 U && (a.detachShader(c, U), a.deleteShader(U)); 143 V && (a.detachShader(c, V), a.deleteShader(V)); 144 a.bindBuffer(a.ARRAY_BUFFER, null); 145 a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, null); 146 c.texture && a.deleteTexture(c.texture); 147 if (c.nodeCache) for (L = 0; L < c.nodeCache.length; L++) a.deleteTexture(c.nodeCache[L].texture); 148 a.deleteProgram(c); 149 c = p 150 } 151 ga = p; 152 var t, E = !1, y; 153 if ("cubemap" == z) for (t = 0; 6 > t; t++) 0 < m[t].width ? (y === p && (y = m[t].width), y != m[t].width && console.log("Cube faces have inconsistent widths: " + 154 y + " vs. " + m[t].width)) : E = !0; 155 "cubemap" == z && 0 !== (y & y - 1) && (navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/) || navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 9_/) || navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 10_/) || navigator.userAgent.match(/Trident.*rv[ :]*11\./)) || (a || (a = A.getContext("experimental-webgl", { 156 alpha: !1, 157 depth: !1 158 })), a && 1286 == a.getError() && Ea()); 159 if (!a && ("multires" == z && m.hasOwnProperty("fallbackPath") || "cubemap" == z) && ("WebkitAppearance" in 160 g.documentElement.style || navigator.userAgent.match(/Trident.*rv[ :]*11\./) || -1 !== navigator.appVersion.indexOf("MSIE 10"))) { 161 R && K.removeChild(R); 162 R = g.createElement("div"); 163 R.className = "pnlm-world"; 164 H = m.basePath ? m.basePath + m.fallbackPath : m.fallbackPath; 165 var Q = "frblud".split(""), S = 0; 166 l = function () { 167 var a = g.createElement("canvas"); 168 a.className = "pnlm-face pnlm-" + Q[this.side] + "face"; 169 R.appendChild(a); 170 var e = a.getContext("2d"); 171 a.style.width = this.width + 4 + "px"; 172 a.style.height = this.height + 4 + "px"; 173 a.width = this.width + 4; 174 a.height = 175 this.height + 4; 176 e.drawImage(this, 2, 2); 177 var h = e.getImageData(0, 0, a.width, a.height), c = h.data, b, d; 178 for (b = 2; b < a.width - 2; b++) for (d = 0; 4 > d; d++) c[4 * (b + a.width) + d] = c[4 * (b + 2 * a.width) + d], c[4 * (b + a.width * (a.height - 2)) + d] = c[4 * (b + a.width * (a.height - 3)) + d]; 179 for (b = 2; b < a.height - 2; b++) for (d = 0; 4 > d; d++) c[4 * (b * a.width + 1) + d] = c[4 * (b * a.width + 2) + d], c[4 * ((b + 1) * a.width - 2) + d] = c[4 * ((b + 1) * a.width - 3) + d]; 180 for (d = 0; 4 > d; d++) c[4 * (a.width + 1) + d] = c[4 * (2 * a.width + 2) + d], c[4 * (2 * a.width - 2) + d] = c[4 * (3 * a.width - 3) + d], c[4 * (a.width * (a.height - 2) + 1) + d] = c[4 * 181 (a.width * (a.height - 3) + 2) + d], c[4 * (a.width * (a.height - 1) - 2) + d] = c[4 * (a.width * (a.height - 2) - 3) + d]; 182 for (b = 1; b < a.width - 1; b++) for (d = 0; 4 > d; d++) c[4 * b + d] = c[4 * (b + a.width) + d], c[4 * (b + a.width * (a.height - 1)) + d] = c[4 * (b + a.width * (a.height - 2)) + d]; 183 for (b = 1; b < a.height - 1; b++) for (d = 0; 4 > d; d++) c[b * a.width * 4 + d] = c[4 * (b * a.width + 1) + d], c[4 * ((b + 1) * a.width - 1) + d] = c[4 * ((b + 1) * a.width - 2) + d]; 184 for (d = 0; 4 > d; d++) c[d] = c[4 * (a.width + 1) + d], c[4 * (a.width - 1) + d] = c[4 * (2 * a.width - 2) + d], c[a.width * (a.height - 1) * 4 + d] = c[4 * (a.width * (a.height - 2) + 1) + d], c[4 * (a.width * 185 a.height - 1) + d] = c[4 * (a.width * (a.height - 1) - 2) + d]; 186 e.putImageData(h, 0, 0); 187 D.call(this) 188 }; 189 var D = function () { 190 0 < this.width ? ($ === p && ($ = this.width), $ != this.width && console.log("Fallback faces have inconsistent widths: " + $ + " vs. " + this.width)) : E = !0; 191 S++; 192 6 == S && ($ = this.width, K.appendChild(R), d()) 193 }, E = !1; 194 for (t = 0; 6 > t; t++) h = new Image, h.crossOrigin = va.crossOrigin ? va.crossOrigin : "anonymous", h.side = t, h.onload = l, h.onerror = D, h.src = "multires" == z ? H.replace("%s", Q[t]) + "." + m.extension : m[t].src; 195 x($) 196 } else { 197 if (!a) throw console.log("Error: no WebGL support detected!"), 198 {type: "no webgl"}; 199 "cubemap" == z && x(y); 200 m.fullpath = m.basePath ? m.basePath + m.path : m.path; 201 m.invTileResolution = 1 / m.tileResolution; 202 L = ta(); 203 wa = []; 204 for (t = 0; 6 > t; t++) wa[t] = L.slice(12 * t, 12 * t + 12), L = ta(); 205 L = 0; 206 if ("equirectangular" == z) { 207 if (L = a.getParameter(a.MAX_TEXTURE_SIZE), Math.max(m.width / 2, m.height) > L) throw console.log("Error: The image is too big; it's " + m.width + "px wide, but this device's maximum supported size is " + 2 * L + "px."), { 208 type: "webgl size error", 209 width: m.width, 210 maxWidth: 2 * L 211 }; 212 } else if ("cubemap" == z && y > a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE)) throw console.log("Error: The image is too big; it's " + 213 y + "px wide, but this device's maximum supported size is " + L + "px."), { 214 type: "webgl size error", 215 width: y, 216 maxWidth: L 217 }; 218 u === p || u.horizonPitch === p && u.horizonRoll === p || (ga = [u.horizonPitch == p ? 0 : u.horizonPitch, u.horizonRoll == p ? 0 : u.horizonRoll]); 219 y = a.TEXTURE_2D; 220 a.viewport(0, 0, a.drawingBufferWidth, a.drawingBufferHeight); 221 a.getShaderPrecisionFormat && (e = a.getShaderPrecisionFormat(a.FRAGMENT_SHADER, a.HIGH_FLOAT)) && 1 > e.precision && (oa = oa.replace("highp", "mediump")); 222 U = a.createShader(a.VERTEX_SHADER); 223 e = s; 224 "multires" == z && 225 (e = k); 226 a.shaderSource(U, e); 227 a.compileShader(U); 228 V = a.createShader(a.FRAGMENT_SHADER); 229 e = pa; 230 "cubemap" == z ? (y = a.TEXTURE_CUBE_MAP, e = qa) : "multires" == z && (e = bb); 231 a.shaderSource(V, e); 232 a.compileShader(V); 233 c = a.createProgram(); 234 a.attachShader(c, U); 235 a.attachShader(c, V); 236 a.linkProgram(c); 237 a.getShaderParameter(U, a.COMPILE_STATUS) || console.log(a.getShaderInfoLog(U)); 238 a.getShaderParameter(V, a.COMPILE_STATUS) || console.log(a.getShaderInfoLog(V)); 239 a.getProgramParameter(c, a.LINK_STATUS) || console.log(a.getProgramInfoLog(c)); 240 a.useProgram(c); 241 c.drawInProgress = !1; 242 e = u.backgroundColor ? u.backgroundColor : [0, 0, 0]; 243 a.clearColor(e[0], e[1], e[2], 1); 244 a.clear(a.COLOR_BUFFER_BIT); 245 c.texCoordLocation = a.getAttribLocation(c, "a_texCoord"); 246 a.enableVertexAttribArray(c.texCoordLocation); 247 "multires" != z ? (ca || (ca = a.createBuffer()), a.bindBuffer(a.ARRAY_BUFFER, ca), a.bufferData(a.ARRAY_BUFFER, new Float32Array([-1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1]), a.STATIC_DRAW), a.vertexAttribPointer(c.texCoordLocation, 2, a.FLOAT, !1, 0, 0), c.aspectRatio = a.getUniformLocation(c, "u_aspectRatio"), 248 a.uniform1f(c.aspectRatio, a.drawingBufferWidth / a.drawingBufferHeight), c.psi = a.getUniformLocation(c, "u_psi"), c.theta = a.getUniformLocation(c, "u_theta"), c.f = a.getUniformLocation(c, "u_f"), c.h = a.getUniformLocation(c, "u_h"), c.v = a.getUniformLocation(c, "u_v"), c.vo = a.getUniformLocation(c, "u_vo"), c.rot = a.getUniformLocation(c, "u_rot"), a.uniform1f(c.h, H / (2 * Math.PI)), a.uniform1f(c.v, l / Math.PI), a.uniform1f(c.vo, h / Math.PI * 2), "equirectangular" == z && (c.backgroundColor = a.getUniformLocation(c, "u_backgroundColor"), a.uniform4fv(c.backgroundColor, 249 e.concat([1]))), c.texture = a.createTexture(), a.bindTexture(y, c.texture), "cubemap" == z ? (a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, m[1]), a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_X, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, m[3]), a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, m[4]), a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, m[5]), a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, m[0]), a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Z, 250 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, m[2])) : m.width <= L ? (a.uniform1i(a.getUniformLocation(c, "u_splitImage"), 0), a.texImage2D(y, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, m)) : (a.uniform1i(a.getUniformLocation(c, "u_splitImage"), 1), H = g.createElement("canvas"), H.width = m.width / 2, H.height = m.height, H = H.getContext("2d"), H.drawImage(m, 0, 0), l = H.getImageData(0, 0, m.width / 2, m.height), a.texImage2D(y, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, l), c.texture2 = a.createTexture(), a.activeTexture(a.TEXTURE1), a.bindTexture(y, c.texture2), a.uniform1i(a.getUniformLocation(c, 251 "u_image1"), 1), H.drawImage(m, -m.width / 2, 0), l = H.getImageData(0, 0, m.width / 2, m.height), a.texImage2D(y, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, l), a.texParameteri(y, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(y, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.texParameteri(y, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(y, a.TEXTURE_MAG_FILTER, a.LINEAR), a.activeTexture(a.TEXTURE0)), a.texParameteri(y, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(y, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.texParameteri(y, a.TEXTURE_MIN_FILTER, 252 a.LINEAR), a.texParameteri(y, a.TEXTURE_MAG_FILTER, a.LINEAR)) : (c.vertPosLocation = a.getAttribLocation(c, "a_vertCoord"), a.enableVertexAttribArray(c.vertPosLocation), Fa || (Fa = a.createBuffer()), Y || (Y = a.createBuffer()), na || (na = a.createBuffer()), a.bindBuffer(a.ARRAY_BUFFER, Y), a.bufferData(a.ARRAY_BUFFER, new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]), a.STATIC_DRAW), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, na), a.bufferData(a.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 0, 2, 3]), a.STATIC_DRAW), c.perspUniform = a.getUniformLocation(c, 253 "u_perspMatrix"), c.cubeUniform = a.getUniformLocation(c, "u_cubeMatrix"), c.level = -1, c.currentNodes = [], c.nodeCache = [], c.nodeCacheTimestamp = 0); 254 H = a.getError(); 255 if (0 !== H) throw console.log("Error: Something went wrong with WebGL!", H), {type: "webgl error"}; 256 d() 257 } 258 }; 259 this.destroy = function () { 260 K !== p && (A !== p && K.contains(A) && K.removeChild(A), R !== p && K.contains(R) && K.removeChild(R)); 261 if (a) { 262 var c = a.getExtension("WEBGL_lose_context"); 263 c && c.loseContext() 264 } 265 }; 266 this.resize = function () { 267 var g = E.devicePixelRatio || 1; 268 A.width = A.clientWidth * 269 g; 270 A.height = A.clientHeight * g; 271 a && (1286 == a.getError() && Ea(), a.viewport(0, 0, a.drawingBufferWidth, a.drawingBufferHeight), "multires" != z && a.uniform1f(c.aspectRatio, A.clientWidth / A.clientHeight)) 272 }; 273 this.resize(); 274 this.setPose = function (a, c) { 275 ga = [a, c] 276 }; 277 this.render = function (g, e, k, s) { 278 var l, h = 0; 279 s === p && (s = {}); 280 s.roll && (h = s.roll); 281 if (ga !== p) { 282 l = ga[0]; 283 var d = ga[1], u = g, x = e, 284 t = Math.cos(d) * Math.sin(g) * Math.sin(l) + Math.cos(g) * (Math.cos(l) * Math.cos(e) + Math.sin(d) * Math.sin(l) * Math.sin(e)), 285 E = -Math.sin(g) * Math.sin(d) + Math.cos(g) * 286 Math.cos(d) * Math.sin(e); 287 g = Math.cos(d) * Math.cos(l) * Math.sin(g) + Math.cos(g) * (-Math.cos(e) * Math.sin(l) + Math.cos(l) * Math.sin(d) * Math.sin(e)); 288 g = Math.asin(Math.max(Math.min(g, 1), -1)); 289 e = Math.atan2(E, t); 290 l = [Math.cos(u) * (Math.sin(d) * Math.sin(l) * Math.cos(x) - Math.cos(l) * Math.sin(x)), Math.cos(u) * Math.cos(d) * Math.cos(x), Math.cos(u) * (Math.cos(l) * Math.sin(d) * Math.cos(x) + Math.sin(x) * Math.sin(l))]; 291 d = [-Math.cos(g) * Math.sin(e), Math.cos(g) * Math.cos(e)]; 292 d = Math.acos(Math.max(Math.min((l[0] * d[0] + l[1] * d[1]) / (Math.sqrt(l[0] * 293 l[0] + l[1] * l[1] + l[2] * l[2]) * Math.sqrt(d[0] * d[0] + d[1] * d[1])), 1), -1)); 294 0 > l[2] && (d = 2 * Math.PI - d); 295 h += d 296 } 297 if (a || "multires" != z && "cubemap" != z) { 298 if ("multires" != z) k = 2 * Math.atan(Math.tan(0.5 * k) / (a.drawingBufferWidth / a.drawingBufferHeight)), k = 1 / Math.tan(0.5 * k), a.uniform1f(c.psi, e), a.uniform1f(c.theta, g), a.uniform1f(c.rot, h), a.uniform1f(c.f, k), !0 === F && "equirectangular" == z && (a.bindTexture(a.TEXTURE_2D, c.texture), a.texImage2D(a.TEXTURE_2D, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, m)), a.drawArrays(a.TRIANGLES, 0, 6); else { 299 l = a.drawingBufferWidth / 300 a.drawingBufferHeight; 301 d = 2 * Math.atan(Math.tan(k / 2) * a.drawingBufferHeight / a.drawingBufferWidth); 302 d = 1 / Math.tan(d / 2); 303 l = [d / l, 0, 0, 0, 0, d, 0, 0, 0, 0, 100.1 / -99.9, 20 / -99.9, 0, 0, -1, 0]; 304 for (d = 1; d < m.maxLevel && a.drawingBufferWidth > m.tileResolution * Math.pow(2, d - 1) * Math.tan(k / 2) * 0.707;) d++; 305 c.level = d; 306 d = [1, 0, 0, 0, 1, 0, 0, 0, 1]; 307 d = ua(d, -h, "z"); 308 d = ua(d, -g, "x"); 309 d = ua(d, e, "y"); 310 d = [d[0], d[1], d[2], 0, d[3], d[4], d[5], 0, d[6], d[7], d[8], 0, 0, 0, 0, 1]; 311 a.uniformMatrix4fv(c.perspUniform, !1, new Float32Array(ma(l))); 312 a.uniformMatrix4fv(c.cubeUniform, 313 !1, new Float32Array(ma(d))); 314 h = [l[0] * d[0], l[0] * d[1], l[0] * d[2], 0, l[5] * d[4], l[5] * d[5], l[5] * d[6], 0, l[10] * d[8], l[10] * d[9], l[10] * d[10], l[11], -d[8], -d[9], -d[10], 0]; 315 c.nodeCache.sort(ja); 316 if (200 < c.nodeCache.length && c.nodeCache.length > c.currentNodes.length + 50) for (l = c.nodeCache.splice(200, c.nodeCache.length - 200), d = 0; d < l.length; d++) a.deleteTexture(l[d].texture); 317 c.currentNodes = []; 318 d = "fbudlr".split(""); 319 for (l = 0; 6 > l; l++) u = new ka(wa[l], d[l], 1, 0, 0, m.fullpath), Ja(h, u, g, e, k); 320 c.currentNodes.sort(Q); 321 for (g = S.length - 1; 0 <= 322 g; g--) -1 === c.currentNodes.indexOf(S[g].node) && (S[g].node.textureLoad = !1, S.splice(g, 1)); 323 if (0 === S.length) for (g = 0; g < c.currentNodes.length; g++) if (e = c.currentNodes[g], !e.texture && !e.textureLoad) { 324 e.textureLoad = !0; 325 setTimeout(Ka, 0, e); 326 break 327 } 328 if (!c.drawInProgress) { 329 c.drawInProgress = !0; 330 a.clear(a.COLOR_BUFFER_BIT); 331 for (g = 0; g < c.currentNodes.length; g++) 1 < c.currentNodes[g].textureLoaded && (a.bindBuffer(a.ARRAY_BUFFER, Fa), a.bufferData(a.ARRAY_BUFFER, new Float32Array(c.currentNodes[g].vertices), a.STATIC_DRAW), a.vertexAttribPointer(c.vertPosLocation, 332 3, a.FLOAT, !1, 0, 0), a.bindBuffer(a.ARRAY_BUFFER, Y), a.vertexAttribPointer(c.texCoordLocation, 2, a.FLOAT, !1, 0, 0), a.bindTexture(a.TEXTURE_2D, c.currentNodes[g].texture), a.drawElements(a.TRIANGLES, 6, a.UNSIGNED_SHORT, 0)); 333 c.drawInProgress = !1 334 } 335 } 336 if (s.returnImage !== p) return A.toDataURL("image/png") 337 } else for (l = $ / 2, s = { 338 f: "translate3d(-" + (l + 2) + "px, -" + (l + 2) + "px, -" + l + "px)", 339 b: "translate3d(" + (l + 2) + "px, -" + (l + 2) + "px, " + l + "px) rotateX(180deg) rotateZ(180deg)", 340 u: "translate3d(-" + (l + 2) + "px, -" + l + "px, " + (l + 2) + "px) rotateX(270deg)", 341 d: "translate3d(-" + (l + 2) + "px, " + l + "px, -" + (l + 2) + "px) rotateX(90deg)", 342 l: "translate3d(-" + l + "px, -" + (l + 2) + "px, " + (l + 2) + "px) rotateX(180deg) rotateY(90deg) rotateZ(180deg)", 343 r: "translate3d(" + l + "px, -" + (l + 2) + "px, -" + (l + 2) + "px) rotateY(270deg)" 344 }, k = 1 / Math.tan(k / 2), k = k * A.clientWidth / 2 + "px", e = "perspective(" + k + ") translateZ(" + k + ") rotateX(" + g + "rad) rotateY(" + e + "rad) ", k = Object.keys(s), g = 0; 6 > g; g++) if (h = R.querySelector(".pnlm-" + k[g] + "face")) h.style.webkitTransform = e + s[k[g]], h.style.transform = e + s[k[g]] 345 }; 346 this.isLoading = 347 function () { 348 if (a && "multires" == z) for (var g = 0; g < c.currentNodes.length; g++) if (!c.currentNodes[g].textureLoaded) return !0; 349 return !1 350 }; 351 this.getCanvas = function () { 352 return A 353 }; 354 var S = [], La = function () { 355 function c() { 356 var d = this; 357 this.texture = this.callback = null; 358 this.image = new Image; 359 this.image.crossOrigin = l ? l : "anonymous"; 360 var e = function () { 361 if (0 < d.image.width && 0 < d.image.height) { 362 var c = d.image; 363 a.bindTexture(a.TEXTURE_2D, d.texture); 364 a.texImage2D(a.TEXTURE_2D, 0, a.RGB, a.RGB, a.UNSIGNED_BYTE, c); 365 a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, 366 a.LINEAR); 367 a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR); 368 a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE); 369 a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE); 370 a.bindTexture(a.TEXTURE_2D, null); 371 d.callback(d.texture, !0) 372 } else d.callback(d.texture, !1); 373 S.length ? (c = S.shift(), d.loadTexture(c.src, c.texture, c.callback)) : k[g++] = d 374 }; 375 this.image.addEventListener("load", e); 376 this.image.addEventListener("error", e) 377 } 378 379 function e(a, c, e, g) { 380 this.node = a; 381 this.src = c; 382 this.texture = e; 383 this.callback = 384 g 385 } 386 387 var g = 4, k = {}, l; 388 c.prototype.loadTexture = function (a, c, e) { 389 this.texture = c; 390 this.callback = e; 391 this.image.src = a 392 }; 393 for (var h = 0; h < g; h++) k[h] = new c; 394 return function (c, h, m, p) { 395 l = p; 396 p = a.createTexture(); 397 g ? k[--g].loadTexture(h, p, m) : S.push(new e(c, h, p, m)); 398 return p 399 } 400 }() 401 } 402 403 var s = "attribute vec2 a_texCoord;varying vec2 v_texCoord;void main() {gl_Position = vec4(a_texCoord, 0.0, 1.0);v_texCoord = a_texCoord;}", 404 k = "attribute vec3 a_vertCoord;attribute vec2 a_texCoord;uniform mat4 u_cubeMatrix;uniform mat4 u_perspMatrix;varying mediump vec2 v_texCoord;void main(void) {gl_Position = u_perspMatrix * u_cubeMatrix * vec4(a_vertCoord, 1.0);v_texCoord = a_texCoord;}", 405 oa = "precision highp float;\nuniform float u_aspectRatio;\nuniform float u_psi;\nuniform float u_theta;\nuniform float u_f;\nuniform float u_h;\nuniform float u_v;\nuniform float u_vo;\nuniform float u_rot;\nconst float PI = 3.14159265358979323846264;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nuniform bool u_splitImage;\nuniform samplerCube u_imageCube;\nvarying vec2 v_texCoord;\nuniform vec4 u_backgroundColor;\nvoid main() {\nfloat x = v_texCoord.x * u_aspectRatio;\nfloat y = v_texCoord.y;\nfloat sinrot = sin(u_rot);\nfloat cosrot = cos(u_rot);\nfloat rot_x = x * cosrot - y * sinrot;\nfloat rot_y = x * sinrot + y * cosrot;\nfloat sintheta = sin(u_theta);\nfloat costheta = cos(u_theta);\nfloat a = u_f * costheta - rot_y * sintheta;\nfloat root = sqrt(rot_x * rot_x + a * a);\nfloat lambda = atan(rot_x / root, a / root) + u_psi;\nfloat phi = atan((rot_y * costheta + u_f * sintheta) / root);", 406 qa = oa + "float cosphi = cos(phi);\ngl_FragColor = textureCube(u_imageCube, vec3(cosphi*sin(lambda), sin(phi), cosphi*cos(lambda)));\n}", 407 pa = oa + "lambda = mod(lambda + PI, PI * 2.0) - PI;\nvec2 coord = vec2(lambda / PI, phi / (PI / 2.0));\nif(coord.x < -u_h || coord.x > u_h || coord.y < -u_v + u_vo || coord.y > u_v + u_vo)\ngl_FragColor = u_backgroundColor;\nelse {\nif(u_splitImage) {\nif(coord.x < 0.0)\ngl_FragColor = texture2D(u_image0, vec2((coord.x + u_h) / u_h, (-coord.y + u_v + u_vo) / (u_v * 2.0)));\nelse\ngl_FragColor = texture2D(u_image1, vec2((coord.x + u_h) / u_h - 1.0, (-coord.y + u_v + u_vo) / (u_v * 2.0)));\n} else {\ngl_FragColor = texture2D(u_image0, vec2((coord.x + u_h) / (u_h * 2.0), (-coord.y + u_v + u_vo) / (u_v * 2.0)));\n}\n}\n}", 408 bb = "varying mediump vec2 v_texCoord;uniform sampler2D u_sampler;void main(void) {gl_FragColor = texture2D(u_sampler, v_texCoord);}"; 409 return { 410 renderer: function (g, k, p, s) { 411 return new Ba(g, k, p, s) 412 } 413 } 414}(window, document); 415window.pannellum = function (E, g, p) { 416 function Ba(s, k) { 417 function oa() { 418 var a = g.createElement("div"); 419 a.innerHTML = "\x3c!--[if lte IE 9]><i></i><![endif]--\x3e"; 420 if (1 == a.getElementsByTagName("i").length) K(); else { 421 ra = b.hfov; 422 Ga = b.pitch; 423 var f; 424 if ("cubemap" == b.type) { 425 P = []; 426 for (a = 0; 6 > a; a++) P.push(new Image), P[a].crossOrigin = b.crossOrigin; 427 q.load.lbox.style.display = "block"; 428 q.load.lbar.style.display = "none" 429 } else if ("multires" == b.type) a = JSON.parse(JSON.stringify(b.multiRes)), b.basePath && b.multiRes.basePath && !/^(?:[a-z]+:)?\/\//i.test(b.multiRes.basePath) ? 430 a.basePath = b.basePath + b.multiRes.basePath : b.multiRes.basePath ? a.basePath = b.multiRes.basePath : b.basePath && (a.basePath = b.basePath), P = a; else if (!0 === b.dynamic) P = b.panorama; else { 431 if (b.panorama === p) { 432 K(b.strings.noPanoramaError); 433 return 434 } 435 P = new Image 436 } 437 if ("cubemap" == b.type) for (var n = 6, c = function () { 438 n--; 439 0 === n && pa() 440 }, d = function (a) { 441 var ea = g.createElement("a"); 442 ea.href = a.target.src; 443 ea.textContent = ea.href; 444 K(b.strings.fileAccessError.replace("%s", ea.outerHTML)) 445 }, a = 0; a < P.length; a++) f = b.cubeMap[a], "null" == f ? (console.log("Will use background instead of missing cubemap face " + 446 a), c()) : (b.basePath && !qa(f) && (f = b.basePath + f), P[a].onload = c, P[a].onerror = d, P[a].src = I(f)); else if ("multires" == b.type) pa(); else if (f = "", b.basePath && (f = b.basePath), !0 !== b.dynamic) { 447 f = qa(b.panorama) ? b.panorama : f + b.panorama; 448 P.onload = function () { 449 E.URL.revokeObjectURL(this.src); 450 pa() 451 }; 452 var e = new XMLHttpRequest; 453 e.onloadend = function () { 454 if (200 != e.status) { 455 var a = g.createElement("a"); 456 a.href = f; 457 a.textContent = a.href; 458 K(b.strings.fileAccessError.replace("%s", a.outerHTML)) 459 } 460 Ba(this.response); 461 q.load.msg.innerHTML = "" 462 }; 463 e.onprogress = 464 function (a) { 465 if (a.lengthComputable) { 466 q.load.lbarFill.style.width = a.loaded / a.total * 100 + "%"; 467 var b, ea; 468 1E6 < a.total ? (b = "MB", ea = (a.loaded / 1E6).toFixed(2), a = (a.total / 1E6).toFixed(2)) : 1E3 < a.total ? (b = "kB", ea = (a.loaded / 1E3).toFixed(1), a = (a.total / 1E3).toFixed(1)) : (b = "B", ea = a.loaded, a = a.total); 469 q.load.msg.innerHTML = ea + " / " + a + " " + b 470 } else q.load.lbox.style.display = "block", q.load.lbar.style.display = "none" 471 }; 472 try { 473 e.open("GET", f, !0) 474 } catch (h) { 475 K(b.strings.malformedURLError) 476 } 477 e.responseType = "blob"; 478 e.setRequestHeader("Accept", 479 "image/*,*/*;q=0.9"); 480 e.withCredentials = "use-credentials" === b.crossOrigin; 481 e.send() 482 } 483 b.draggable && J.classList.add("pnlm-grab"); 484 J.classList.remove("pnlm-grabbing"); 485 Ma = !0 === b.dynamicUpdate; 486 b.dynamic && Ma && (P = b.panorama, pa()) 487 } 488 } 489 490 function qa(a) { 491 return /^(?:[a-z]+:)?\/\//i.test(a) || "/" == a[0] || "blob:" == a.slice(0, 5) 492 } 493 494 function pa() { 495 C || (C = new libpannellum.renderer(M)); 496 Sa || (Sa = !0, W.addEventListener("mousedown", ka, !1), g.addEventListener("mousemove", ua, !1), g.addEventListener("mouseup", ma, !1), b.mouseZoom && (J.addEventListener("mousewheel", 497 U, !1), J.addEventListener("DOMMouseScroll", U, !1)), b.doubleClickZoom && W.addEventListener("dblclick", Ja, !1), s.addEventListener("mozfullscreenchange", d, !1), s.addEventListener("webkitfullscreenchange", d, !1), s.addEventListener("msfullscreenchange", d, !1), s.addEventListener("fullscreenchange", d, !1), E.addEventListener("resize", z, !1), E.addEventListener("orientationchange", z, !1), b.disableKeyboardCtrl || (s.addEventListener("keydown", V, !1), s.addEventListener("keyup", R, !1), s.addEventListener("blur", $, !1)), g.addEventListener("mouseleave", 498 ma, !1), "" === g.documentElement.style.pointerAction && "" === g.documentElement.style.touchAction ? (W.addEventListener("pointerdown", A, !1), W.addEventListener("pointermove", c, !1), W.addEventListener("pointerup", a, !1), W.addEventListener("pointerleave", a, !1)) : (W.addEventListener("touchstart", Ka, !1), W.addEventListener("touchmove", la, !1), W.addEventListener("touchend", Ea, !1)), E.navigator.pointerEnabled && (s.style.touchAction = "none")); 499 va(); 500 x(b.hfov); 501 setTimeout(function () { 502 }, 500) 503 } 504 505 function Ba(a) { 506 var f = new FileReader; 507 f.addEventListener("loadend", function () { 508 var n = f.result; 509 if (navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)) { 510 var c = n.indexOf("\u00ff\u00c2"); 511 (0 > c || 65536 < c) && K(b.strings.iOS8WebGLError) 512 } 513 c = n.indexOf("<x:xmpmeta"); 514 if (-1 < c && !0 !== b.ignoreGPanoXMP) { 515 var d = n.substring(c, n.indexOf("</x:xmpmeta>") + 12), e = function (a) { 516 var b; 517 0 <= d.indexOf(a + '="') ? (b = d.substring(d.indexOf(a + '="') + a.length + 2), b = b.substring(0, b.indexOf('"'))) : 0 <= d.indexOf(a + ">") && (b = d.substring(d.indexOf(a + ">") + a.length + 1), b = b.substring(0, 518 b.indexOf("<"))); 519 return b !== p ? Number(b) : null 520 }, n = e("GPano:FullPanoWidthPixels"), c = e("GPano:CroppedAreaImageWidthPixels"), 521 g = e("GPano:FullPanoHeightPixels"), h = e("GPano:CroppedAreaImageHeightPixels"), 522 l = e("GPano:CroppedAreaTopPixels"), k = e("GPano:PoseHeadingDegrees"), 523 m = e("GPano:PosePitchDegrees"), e = e("GPano:PoseRollDegrees"); 524 null !== n && null !== c && null !== g && null !== h && null !== l && (0 > aa.indexOf("haov") && (b.haov = c / n * 360), 0 > aa.indexOf("vaov") && (b.vaov = h / g * 180), 0 > aa.indexOf("vOffset") && (b.vOffset = -180 * ((l + h / 2) / g - 525 0.5)), null !== k && 0 > aa.indexOf("northOffset") && (b.northOffset = k, !1 !== b.compass && (b.compass = !0)), null !== m && null !== e && (0 > aa.indexOf("horizonPitch") && (b.horizonPitch = m), 0 > aa.indexOf("horizonRoll") && (b.horizonRoll = e))) 526 } 527 P.src = E.URL.createObjectURL(a) 528 }); 529 f.readAsBinaryString !== p ? f.readAsBinaryString(a) : f.readAsText(a) 530 } 531 532 function K(a) { 533 a === p && (a = b.strings.genericWebGLError); 534 q.errorMsg.innerHTML = "<p>" + a + "</p>"; 535 v.load.style.display = "none"; 536 q.load.box.style.display = "none"; 537 q.errorMsg.style.display = "table"; 538 Na = !0; 539 G = 540 p; 541 M.style.display = "none"; 542 B("error", a) 543 } 544 545 function ja(a) { 546 var b = Q(a); 547 fa.style.left = b.x + "px"; 548 fa.style.top = b.y + "px"; 549 clearTimeout(ja.t1); 550 clearTimeout(ja.t2); 551 fa.style.display = "block"; 552 fa.style.opacity = 1; 553 ja.t1 = setTimeout(function () { 554 fa.style.opacity = 0 555 }, 2E3); 556 ja.t2 = setTimeout(function () { 557 fa.style.display = "none" 558 }, 2500); 559 a.preventDefault() 560 } 561 562 function Q(a) { 563 var b = s.getBoundingClientRect(), n = {}; 564 n.x = (a.clientX || a.pageX) - b.left; 565 n.y = (a.clientY || a.pageY) - b.top; 566 return n 567 } 568 569 function ka(a) { 570 a.preventDefault(); 571 s.focus(); 572 if (G && b.draggable) { 573 var f = 574 Q(a); 575 if (b.hotSpotDebug) { 576 var n = ta(a); 577 console.log("Pitch: " + n[0] + ", Yaw: " + n[1] + ", Center Pitch: " + b.pitch + ", Center Yaw: " + b.yaw + ", HFOV: " + b.hfov) 578 } 579 t(); 580 Da(); 581 b.roll = 0; 582 w.hfov = 0; 583 ha = !0; 584 N = Date.now(); 585 xa = f.x; 586 ya = f.y; 587 Oa = b.yaw; 588 Pa = b.pitch; 589 J.classList.add("pnlm-grabbing"); 590 J.classList.remove("pnlm-grab"); 591 B("mousedown", a); 592 F() 593 } 594 } 595 596 function Ja(a) { 597 b.minHfov === b.hfov ? da.setHfov(ra, 1E3) : (a = ta(a), da.lookAt(a[0], a[1], b.minHfov, 1E3)) 598 } 599 600 function ta(a) { 601 var f = Q(a); 602 a = C.getCanvas(); 603 var n = a.clientWidth, c = a.clientHeight; 604 a = f.x / n * 2 - 605 1; 606 var c = (1 - f.y / c * 2) * c / n, e = 1 / Math.tan(b.hfov * Math.PI / 360), 607 d = Math.sin(b.pitch * Math.PI / 180), g = Math.cos(b.pitch * Math.PI / 180), f = e * g - c * d, 608 n = Math.sqrt(a * a + f * f), c = 180 * Math.atan((c * g + e * d) / n) / Math.PI; 609 a = 180 * Math.atan2(a / n, f / n) / Math.PI + b.yaw; 610 -180 > a && (a += 360); 611 180 < a && (a -= 360); 612 return [c, a] 613 } 614 615 function ua(a) { 616 if (ha && G) { 617 N = Date.now(); 618 var f = C.getCanvas(), n = f.clientWidth, f = f.clientHeight; 619 a = Q(a); 620 var c = 180 * (Math.atan(xa / n * 2 - 1) - Math.atan(a.x / n * 2 - 1)) / Math.PI * b.hfov / 90 + Oa; 621 w.yaw = (c - b.yaw) % 360 * 0.2; 622 b.yaw = c; 623 n = 360 * Math.atan(Math.tan(b.hfov / 624 360 * Math.PI) * f / n) / Math.PI; 625 n = 180 * (Math.atan(a.y / f * 2 - 1) - Math.atan(ya / f * 2 - 1)) / Math.PI * n / 90 + Pa; 626 w.pitch = 0.2 * (n - b.pitch); 627 b.pitch = n 628 } 629 } 630 631 function ma(a) { 632 ha && (ha = !1, 15 < Date.now() - N && (w.pitch = w.yaw = 0), J.classList.add("pnlm-grab"), J.classList.remove("pnlm-grabbing"), N = Date.now(), B("mouseup", a)) 633 } 634 635 function Ka(a) { 636 if (G && b.draggable) { 637 t(); 638 Da(); 639 b.roll = 0; 640 w.hfov = 0; 641 var f = Q(a.targetTouches[0]); 642 xa = f.x; 643 ya = f.y; 644 if (2 == a.targetTouches.length) { 645 var n = Q(a.targetTouches[1]); 646 xa += 0.5 * (n.x - f.x); 647 ya += 0.5 * (n.y - f.y); 648 Ha = Math.sqrt((f.x - n.x) * 649 (f.x - n.x) + (f.y - n.y) * (f.y - n.y)) 650 } 651 ha = !0; 652 N = Date.now(); 653 Oa = b.yaw; 654 Pa = b.pitch; 655 B("touchstart", a); 656 F() 657 } 658 } 659 660 function la(a) { 661 if (b.draggable && (a.preventDefault(), G && (N = Date.now()), ha && G)) { 662 var f = Q(a.targetTouches[0]), n = f.x, c = f.y; 663 2 == a.targetTouches.length && -1 != Ha && (a = Q(a.targetTouches[1]), n += 0.5 * (a.x - f.x), c += 0.5 * (a.y - f.y), f = Math.sqrt((f.x - a.x) * (f.x - a.x) + (f.y - a.y) * (f.y - a.y)), x(b.hfov + 0.1 * (Ha - f)), Ha = f); 664 f = b.hfov / 360 * b.touchPanSpeedCoeffFactor; 665 n = (xa - n) * f + Oa; 666 w.yaw = (n - b.yaw) % 360 * 0.2; 667 b.yaw = n; 668 c = (c - ya) * f + Pa; 669 w.pitch = 0.2 * (c - b.pitch); 670 b.pitch = c 671 } 672 } 673 674 function Ea() { 675 ha = !1; 676 150 < Date.now() - N && (w.pitch = w.yaw = 0); 677 Ha = -1; 678 N = Date.now(); 679 B("touchend", event) 680 } 681 682 function A(a) { 683 "touch" == a.pointerType && G && b.draggable && (ia.push(a.pointerId), za.push({ 684 clientX: a.clientX, 685 clientY: a.clientY 686 }), a.targetTouches = za, Ka(a), a.preventDefault()) 687 } 688 689 function c(a) { 690 if ("touch" == a.pointerType && b.draggable) for (var f = 0; f < ia.length; f++) if (a.pointerId == ia[f]) { 691 za[f].clientX = a.clientX; 692 za[f].clientY = a.clientY; 693 a.targetTouches = za; 694 la(a); 695 a.preventDefault(); 696 break 697 } 698 } 699 700 function a(a) { 701 if ("touch" == 702 a.pointerType) { 703 for (var b = !1, n = 0; n < ia.length; n++) a.pointerId == ia[n] && (ia[n] = p), ia[n] && (b = !0); 704 b || (ia = [], za = [], Ea()); 705 a.preventDefault() 706 } 707 } 708 709 function U(a) { 710 G && ("fullscreenonly" != b.mouseZoom || Aa) && (a.preventDefault(), t(), N = Date.now(), a.wheelDeltaY ? (x(b.hfov - 0.05 * a.wheelDeltaY), w.hfov = 0 > a.wheelDelta ? 1 : -1) : a.wheelDelta ? (x(b.hfov - 0.05 * a.wheelDelta), w.hfov = 0 > a.wheelDelta ? 1 : -1) : a.detail && (x(b.hfov + 1.5 * a.detail), w.hfov = 0 < a.detail ? 1 : -1), F()) 711 } 712 713 function V(a) { 714 t(); 715 N = Date.now(); 716 Da(); 717 b.roll = 0; 718 var f = a.which || a.keycode; 719 0 > 720 b.capturedKeyNumbers.indexOf(f) || (a.preventDefault(), 27 == f ? Aa && h() : wa(f, !0)) 721 } 722 723 function $() { 724 for (var a = 0; 10 > a; a++) r[a] = !1 725 } 726 727 function R(a) { 728 var f = a.which || a.keycode; 729 0 > b.capturedKeyNumbers.indexOf(f) || (a.preventDefault(), wa(f, !1)) 730 } 731 732 function wa(a, b) { 733 var n = !1; 734 switch (a) { 735 case 109: 736 case 189: 737 case 17: 738 case 173: 739 r[0] != b && (n = !0); 740 r[0] = b; 741 break; 742 case 107: 743 case 187: 744 case 16: 745 case 61: 746 r[1] != b && (n = !0); 747 r[1] = b; 748 break; 749 case 38: 750 r[2] != b && (n = !0); 751 r[2] = b; 752 break; 753 case 87: 754 r[6] != b && (n = !0); 755 r[6] = b; 756 break; 757 case 40: 758 r[3] != b && (n = !0); 759 r[3] = b; 760 break; 761 case 83: 762 r[7] != 763 b && (n = !0); 764 r[7] = b; 765 break; 766 case 37: 767 r[4] != b && (n = !0); 768 r[4] = b; 769 break; 770 case 65: 771 r[8] != b && (n = !0); 772 r[8] = b; 773 break; 774 case 39: 775 r[5] != b && (n = !0); 776 r[5] = b; 777 break; 778 case 68: 779 r[9] != b && (n = !0), r[9] = b 780 } 781 n && b && (ba = "undefined" !== typeof performance && performance.now() ? performance.now() : Date.now(), F()) 782 } 783 784 function ga() { 785 if (G) { 786 var a = !1, f = b.pitch, n = b.yaw, c = b.hfov, e; 787 e = "undefined" !== typeof performance && performance.now() ? performance.now() : Date.now(); 788 ba === p && (ba = e); 789 var d = (e - ba) * b.hfov / 1700, d = Math.min(d, 1); 790 r[0] && !0 === b.keyboardZoom && (x(b.hfov + (0.8 * w.hfov + 791 0.5) * d), a = !0); 792 r[1] && !0 === b.keyboardZoom && (x(b.hfov + (0.8 * w.hfov - 0.2) * d), a = !0); 793 if (r[2] || r[6]) b.pitch += (0.8 * w.pitch + 0.2) * d, a = !0; 794 if (r[3] || r[7]) b.pitch += (0.8 * w.pitch - 0.2) * d, a = !0; 795 if (r[4] || r[8]) b.yaw += (0.8 * w.yaw - 0.2) * d, a = !0; 796 if (r[5] || r[9]) b.yaw += (0.8 * w.yaw + 0.2) * d, a = !0; 797 a && (N = Date.now()); 798 if (b.autoRotate) { 799 if (0.001 < e - ba) { 800 var a = (e - ba) / 1E3, g = (w.yaw / a * d - 0.2 * b.autoRotate) * a, 801 g = (0 < -b.autoRotate ? 1 : -1) * Math.min(Math.abs(b.autoRotate * a), Math.abs(g)); 802 b.yaw += g 803 } 804 b.autoRotateStopDelay && (b.autoRotateStopDelay -= e - ba, 0 >= b.autoRotateStopDelay && 805 (b.autoRotateStopDelay = !1, Z = b.autoRotate, b.autoRotate = 0)) 806 } 807 O.pitch && (m("pitch"), f = b.pitch); 808 O.yaw && (m("yaw"), n = b.yaw); 809 O.hfov && (m("hfov"), c = b.hfov); 810 0 < d && !b.autoRotate && (a = 1 - b.friction, r[4] || r[5] || r[8] || r[9] || O.yaw || (b.yaw += w.yaw * d * a), r[2] || r[3] || r[6] || r[7] || O.pitch || (b.pitch += w.pitch * d * a), r[0] || r[1] || O.hfov || x(b.hfov + w.hfov * d * a)); 811 ba = e; 812 0 < d && (w.yaw = 0.8 * w.yaw + (b.yaw - n) / d * 0.2, w.pitch = 0.8 * w.pitch + (b.pitch - f) / d * 0.2, w.hfov = 0.8 * w.hfov + (b.hfov - c) / d * 0.2, f = b.autoRotate ? Math.abs(b.autoRotate) : 5, w.yaw = Math.min(f, 813 Math.max(w.yaw, -f)), w.pitch = Math.min(f, Math.max(w.pitch, -f)), w.hfov = Math.min(f, Math.max(w.hfov, -f))); 814 r[0] && r[1] && (w.hfov = 0); 815 (r[2] || r[6]) && (r[3] || r[7]) && (w.pitch = 0); 816 (r[4] || r[8]) && (r[5] || r[9]) && (w.yaw = 0) 817 } 818 } 819 820 function m(a) { 821 var f = O[a], n = Math.min(1, Math.max((Date.now() - f.startTime) / 1E3 / (f.duration / 1E3), 0)), 822 n = f.startPosition + b.animationTimingFunction(n) * (f.endPosition - f.startPosition); 823 if (f.endPosition > f.startPosition && n >= f.endPosition || f.endPosition < f.startPosition && n <= f.endPosition || f.endPosition === f.startPosition) n = 824 f.endPosition, w[a] = 0, delete O[a]; 825 b[a] = n 826 } 827 828 function z() { 829 d("resize") 830 } 831 832 function F() { 833 Ta || (Ta = !0, ca()) 834 } 835 836 function ca() { 837 if (!Za) if (Fa(), Qa && clearTimeout(Qa), ha || !0 === X) requestAnimationFrame(ca); else if (r[0] || r[1] || r[2] || r[3] || r[4] || r[5] || r[6] || r[7] || r[8] || r[9] || b.autoRotate || O.pitch || O.yaw || O.hfov || 0.01 < Math.abs(w.yaw) || 0.01 < Math.abs(w.pitch) || 0.01 < Math.abs(w.hfov)) ga(), 0 <= b.autoRotateInactivityDelay && Z && Date.now() - N > b.autoRotateInactivityDelay && !b.autoRotate && (b.autoRotate = Z, da.lookAt(Ga, p, ra, 3E3)), requestAnimationFrame(ca); 838 else if (C && (C.isLoading() || !0 === b.dynamic && Ma)) requestAnimationFrame(ca); else { 839 B("animatefinished", {pitch: da.getPitch(), yaw: da.getYaw(), hfov: da.getHfov()}); 840 Ta = !1; 841 ba = p; 842 var a = b.autoRotateInactivityDelay - (Date.now() - N); 843 0 < a ? Qa = setTimeout(function () { 844 b.autoRotate = Z; 845 da.lookAt(Ga, p, ra, 3E3); 846 F() 847 }, a) : 0 <= b.autoRotateInactivityDelay && Z && (b.autoRotate = Z, da.lookAt(Ga, p, ra, 3E3), F()) 848 } 849 } 850 851 function Fa() { 852 var a; 853 if (G) { 854 var f = C.getCanvas(); 855 !1 !== b.autoRotate && (360 < b.yaw ? b.yaw -= 360 : -360 > b.yaw && (b.yaw += 360)); 856 a = b.yaw; 857 var n = 0;
vendor: 7,288 bytes, lines 858-995
858 if (b.avoidShowingBackground) { 859 var c = 860 b.hfov / 2, d = 180 * Math.atan2(Math.tan(c / 180 * Math.PI), f.width / f.height) / Math.PI; 861 b.vaov > b.haov ? Math.min(Math.cos((b.pitch - c) / 180 * Math.PI), Math.cos((b.pitch + c) / 180 * Math.PI)) : n = c * (1 - Math.min(Math.cos((b.pitch - d) / 180 * Math.PI), Math.cos((b.pitch + d) / 180 * Math.PI))) 862 } 863 var c = b.maxYaw - b.minYaw, d = -180, e = 180; 864 360 > c && (d = b.minYaw + b.hfov / 2 + n, e = b.maxYaw - b.hfov / 2 - n, c < b.hfov && (d = e = (d + e) / 2), b.yaw = Math.max(d, Math.min(e, b.yaw))); 865 !1 === b.autoRotate && (360 < b.yaw ? b.yaw -= 360 : -360 > b.yaw && (b.yaw += 360)); 866 !1 !== b.autoRotate && a != b.yaw && ba !== 867 p && (b.autoRotate *= -1); 868 a = 2 * Math.atan(Math.tan(b.hfov / 180 * Math.PI * 0.5) / (f.width / f.height)) / Math.PI * 180; 869 f = b.minPitch + a / 2; 870 n = b.maxPitch - a / 2; 871 b.maxPitch - b.minPitch < a && (f = n = (f + n) / 2); 872 isNaN(f) && (f = -90); 873 isNaN(n) && (n = 90); 874 b.pitch = Math.max(f, Math.min(n, b.pitch)); 875 C.render(b.pitch * Math.PI / 180, b.yaw * Math.PI / 180, b.hfov * Math.PI / 180, {roll: b.roll * Math.PI / 180}); 876 b.hotSpots.forEach(Ca); 877 b.compass && (Ia.style.transform = "rotate(" + (-b.yaw - b.northOffset) + "deg)", Ia.style.webkitTransform = "rotate(" + (-b.yaw - b.northOffset) + "deg)") 878 } 879 } 880 881 function Y(a, b, c, d) { 882 this.w = a; 883 this.x = b; 884 this.y = c; 885 this.z = d 886 } 887 888 function na(a) { 889 var f; 890 f = a.alpha; 891 var c = a.beta; 892 a = a.gamma; 893 c = [c ? c * Math.PI / 180 / 2 : 0, a ? a * Math.PI / 180 / 2 : 0, f ? f * Math.PI / 180 / 2 : 0]; 894 f = [Math.cos(c[0]), Math.cos(c[1]), Math.cos(c[2])]; 895 c = [Math.sin(c[0]), Math.sin(c[1]), Math.sin(c[2])]; 896 f = new Y(f[0] * f[1] * f[2] - c[0] * c[1] * c[2], c[0] * f[1] * f[2] - f[0] * c[1] * c[2], f[0] * c[1] * f[2] + c[0] * f[1] * c[2], f[0] * f[1] * c[2] + c[0] * c[1] * f[2]); 897 f = f.multiply(new Y(Math.sqrt(0.5), -Math.sqrt(0.5), 0, 0)); 898 c = E.orientation ? -E.orientation * Math.PI / 180 / 2 : 899 0; 900 f = f.multiply(new Y(Math.cos(c), 0, -Math.sin(c), 0)).toEulerAngles(); 901 "number" == typeof X && 10 > X ? X += 1 : 10 === X ? ($a = f[2] / Math.PI * 180 + b.yaw, X = !0, requestAnimationFrame(ca)) : (b.pitch = f[0] / Math.PI * 180, b.roll = -f[1] / Math.PI * 180, b.yaw = -f[2] / Math.PI * 180 + $a) 902 } 903 904 function va() { 905 try { 906 var a = {}; 907 b.horizonPitch !== p && (a.horizonPitch = b.horizonPitch * Math.PI / 180); 908 b.horizonRoll !== p && (a.horizonRoll = b.horizonRoll * Math.PI / 180); 909 b.backgroundColor !== p && (a.backgroundColor = b.backgroundColor); 910 C.init(P, b.type, b.dynamic, b.haov * Math.PI / 180, 911 b.vaov * Math.PI / 180, b.vOffset * Math.PI / 180, S, a); 912 !0 !== b.dynamic && (P = p) 913 } catch (f) { 914 if ("webgl error" == f.type || "no webgl" == f.type) K(); else if ("webgl size error" == f.type) K(b.strings.textureSizeError.replace("%s", f.width).replace("%s", f.maxWidth)); else throw K(b.strings.unknownError), f; 915 } 916 } 917 918 function S() { 919 if (b.sceneFadeDuration && C.fadeImg !== p) { 920 C.fadeImg.style.opacity = 0; 921 var a = C.fadeImg; 922 delete C.fadeImg; 923 setTimeout(function () { 924 M.removeChild(a); 925 B("scenechangefadedone") 926 }, b.sceneFadeDuration) 927 } 928 Ia.style.display = b.compass ? 929 "inline" : "none"; 930 L(); 931 q.load.box.style.display = "none"; 932 sa !== p && (M.removeChild(sa), sa = p); 933 G = !0; 934 B("load"); 935 F() 936 } 937 938 function La(a) { 939 a.pitch = Number(a.pitch) || 0; 940 a.yaw = Number(a.yaw) || 0; 941 var f = g.createElement("div"); 942 f.className = "pnlm-hotspot-base"; 943 f.className = a.cssClass ? f.className + (" " + a.cssClass) : f.className + (" pnlm-hotspot pnlm-sprite pnlm-" + D(a.type)); 944 var c = g.createElement("span"); 945 a.text && (c.innerHTML = D(a.text)); 946 var d; 947 if (a.video) { 948 d = g.createElement("video"); 949 var e = a.video; 950 b.basePath && !qa(e) && (e = b.basePath + e); 951 d.src = 952 I(e); 953 d.controls = !0; 954 d.style.width = a.width + "px"; 955 M.appendChild(f); 956 c.appendChild(d) 957 } else if (a.image) { 958 e = a.image; 959 b.basePath && !qa(e) && (e = b.basePath + e); 960 d = g.createElement("a"); 961 d.href = I(a.URL ? a.URL : e, !0); 962 d.target = "_blank"; 963 c.appendChild(d); 964 var h = g.createElement("img"); 965 h.src = I(e); 966 h.style.width = a.width + "px"; 967 h.style.paddingTop = "5px"; 968 M.appendChild(f); 969 d.appendChild(h); 970 c.style.maxWidth = "initial" 971 } else if (a.URL) { 972 d = g.createElement("a"); 973 d.href = I(a.URL, !0); 974 if (a.attributes) for (e in a.attributes) d.setAttribute(e, a.attributes[e]); 975 else d.target = "_blank"; 976 M.appendChild(d); 977 f.className += " pnlm-pointer"; 978 c.className += " pnlm-pointer"; 979 d.appendChild(f) 980 } else a.sceneId && (f.onclick = f.ontouchend = function () { 981 f.clicked || (f.clicked = !0, y(a.sceneId, a.targetPitch, a.targetYaw, a.targetHfov)); 982 return !1 983 }, f.className += " pnlm-pointer", c.className += " pnlm-pointer"), M.appendChild(f); 984 if (a.createTooltipFunc) a.createTooltipFunc(f, a.createTooltipArgs); else if (a.text || a.video || a.image) f.classList.add("pnlm-tooltip"), f.appendChild(c), c.style.width = c.scrollWidth - 985 20 + "px", c.style.marginLeft = -(c.scrollWidth - f.offsetWidth) / 2 + "px", c.style.marginTop = -c.scrollHeight - 12 + "px"; 986 a.clickHandlerFunc && (f.addEventListener("click", function (b) { 987 a.clickHandlerFunc(b, a.clickHandlerArgs) 988 }, "false"), f.className += " pnlm-pointer", c.className += " pnlm-pointer"); 989 a.div = f 990 } 991 992 function L() { 993 Ua || (b.hotSpots ? (b.hotSpots = b.hotSpots.sort(function (a, b) { 994 return a.pitch < b.pitch 995 }
vendor: 30,163 bytes, lines 995-1657
995), b.hotSpots.forEach(La)) : b.hotSpots = [], Ua = !0, b.hotSpots.forEach(Ca)) 996 } 997 998 function e() { 999 var a = b.hotSpots; 1000 Ua = !1; 1001 delete b.hotSpots; 1002 if (a) for (var f = 0; f < a.length; f++) { 1003 var c = a[f].div; 1004 if (c) { 1005 for (; c.parentNode && c.parentNode != M;) c = c.parentNode; 1006 M.removeChild(c) 1007 } 1008 delete a[f].div 1009 } 1010 } 1011 1012 function Ca(a) { 1013 var f = Math.sin(a.pitch * Math.PI / 180), c = Math.cos(a.pitch * Math.PI / 180), 1014 d = Math.sin(b.pitch * Math.PI / 180), e = Math.cos(b.pitch * Math.PI / 180), 1015 g = Math.cos((-a.yaw + b.yaw) * Math.PI / 180), h = f * d + c * g * e; 1016 if (90 >= a.yaw && -90 < a.yaw && 0 >= h || (90 < a.yaw || -90 >= a.yaw) && 0 >= h) a.div.style.visibility = "hidden"; else { 1017 var l = Math.sin((-a.yaw + b.yaw) * Math.PI / 180), k = Math.tan(b.hfov * Math.PI / 1018 360); 1019 a.div.style.visibility = "visible"; 1020 var m = C.getCanvas(), p = m.clientWidth, m = m.clientHeight, 1021 f = [-p / k * l * c / h / 2, -p / k * (f * e - c * g * d) / h / 2], 1022 c = Math.sin(b.roll * Math.PI / 180), d = Math.cos(b.roll * Math.PI / 180), 1023 f = [f[0] * d - f[1] * c, f[0] * c + f[1] * d]; 1024 f[0] += (p - a.div.offsetWidth) / 2; 1025 f[1] += (m - a.div.offsetHeight) / 2; 1026 p = "translate(" + f[0] + "px, " + f[1] + "px) translateZ(9999px) rotate(" + b.roll + "deg)"; 1027 a.scale && (p += " scale(" + ra / b.hfov / h + ")"); 1028 a.div.style.webkitTransform = p; 1029 a.div.style.MozTransform = p; 1030 a.div.style.transform = p 1031 } 1032 } 1033 1034 function H(a) { 1035 b = 1036 {}; 1037 var f, c, d = "haov vaov vOffset northOffset horizonPitch horizonRoll".split(" "); 1038 aa = []; 1039 for (f in Va) Va.hasOwnProperty(f) && (b[f] = Va[f]); 1040 for (f in k.default) if (k.default.hasOwnProperty(f)) if ("strings" == f) for (c in k.default.strings) k.default.strings.hasOwnProperty(c) && (b.strings[c] = D(k.default.strings[c])); else b[f] = k.default[f], 0 <= d.indexOf(f) && aa.push(f); 1041 if (null !== a && "" !== a && k.scenes && k.scenes[a]) { 1042 var e = k.scenes[a]; 1043 for (f in e) if (e.hasOwnProperty(f)) if ("strings" == f) for (c in e.strings) e.strings.hasOwnProperty(c) && 1044 (b.strings[c] = D(e.strings[c])); else b[f] = e[f], 0 <= d.indexOf(f) && aa.push(f); 1045 b.scene = a 1046 } 1047 for (f in k) if (k.hasOwnProperty(f)) if ("strings" == f) for (c in k.strings) k.strings.hasOwnProperty(c) && (b.strings[c] = D(k.strings[c])); else b[f] = k[f], 0 <= d.indexOf(f) && aa.push(f) 1048 } 1049 1050 function l(a) { 1051 if ((a = a ? a : !1) && "preview" in b) { 1052 var c = b.preview; 1053 b.basePath && !qa(c) && (c = b.basePath + c); 1054 sa = g.createElement("div"); 1055 sa.className = "pnlm-preview-img"; 1056 sa.style.backgroundImage = "url('" + I(c).replace(/"/g, "%22").replace(/'/g, "%27") + "')"; 1057 M.appendChild(sa) 1058 } 1059 var c = 1060 b.title, d = b.author; 1061 a && ("previewTitle" in b && (b.title = b.previewTitle), "previewAuthor" in b && (b.author = b.previewAuthor)); 1062 b.hasOwnProperty("title") || (q.title.innerHTML = ""); 1063 b.hasOwnProperty("author") || (q.author.innerHTML = ""); 1064 b.hasOwnProperty("title") || b.hasOwnProperty("author") || (q.container.style.display = "none"); 1065 v.load.innerHTML = "<p>" + b.strings.loadButtonLabel + "</p>"; 1066 q.load.boxp.innerHTML = b.strings.loadingLabel; 1067 for (var e in b) if (b.hasOwnProperty(e)) switch (e) { 1068 case "title": 1069 q.title.innerHTML = D(b[e]); 1070 q.container.style.display = 1071 "inline"; 1072 break; 1073 case "author": 1074 var h = D(b[e]); 1075 b.authorURL && (h = g.createElement("a"), h.href = I(b.authorURL, !0), h.target = "_blank", h.innerHTML = D(b[e]), h = h.outerHTML); 1076 q.author.innerHTML = b.strings.bylineLabel.replace("%s", h); 1077 q.container.style.display = "inline"; 1078 break; 1079 case "fallback": 1080 h = g.createElement("a"); 1081 h.href = I(b[e], !0); 1082 h.target = "_blank"; 1083 h.textContent = "Click here to view this panorama in an alternative viewer."; 1084 var k = g.createElement("p"); 1085 k.textContent = "Your browser does not support WebGL."; 1086 k.appendChild(g.createElement("br")); 1087 k.appendChild(h); 1088 q.errorMsg.innerHTML = ""; 1089 q.errorMsg.appendChild(k); 1090 break; 1091 case "hfov": 1092 x(Number(b[e])); 1093 break; 1094 case "autoLoad": 1095 !0 === b[e] && C === p && (q.load.box.style.display = "inline", v.load.style.display = "none", oa()); 1096 break; 1097 case "showZoomCtrl": 1098 v.zoom.style.display = b[e] && !1 != b.showControls ? "block" : "none"; 1099 break; 1100 case "showFullscreenCtrl": 1101 v.fullscreen.style.display = b[e] && !1 != b.showControls && ("fullscreen" in g || "mozFullScreen" in g || "webkitIsFullScreen" in g || "msFullscreenElement" in g) ? "block" : "none"; 1102 break; 1103 case "hotSpotDebug": 1104 Wa.style.display = 1105 b[e] ? "block" : "none"; 1106 break; 1107 case "showControls": 1108 b[e] || (v.orientation.style.display = "none", v.zoom.style.display = "none", v.fullscreen.style.display = "none"); 1109 break; 1110 case "orientationOnByDefault": 1111 b[e] && Ra() 1112 } 1113 a && (c ? b.title = c : delete b.title, d ? b.author = d : delete b.author) 1114 } 1115 1116 function h() { 1117 if (G && !Na) if (Aa) g.exitFullscreen ? g.exitFullscreen() : g.mozCancelFullScreen ? g.mozCancelFullScreen() : g.webkitCancelFullScreen ? g.webkitCancelFullScreen() : g.msExitFullscreen && g.msExitFullscreen(); else try { 1118 s.requestFullscreen ? s.requestFullscreen() : 1119 s.mozRequestFullScreen ? s.mozRequestFullScreen() : s.msRequestFullscreen ? s.msRequestFullscreen() : s.webkitRequestFullScreen() 1120 } catch (a) { 1121 } 1122 } 1123 1124 function d(a) { 1125 g.fullscreenElement || g.fullscreen || g.mozFullScreen || g.webkitIsFullScreen || g.msFullscreenElement ? (v.fullscreen.classList.add("pnlm-fullscreen-toggle-button-active"), Aa = !0) : (v.fullscreen.classList.remove("pnlm-fullscreen-toggle-button-active"), Aa = !1); 1126 "resize" !== a && B("fullscreenchange", Aa); 1127 C.resize(); 1128 x(b.hfov); 1129 F() 1130 } 1131 1132 function u(a) { 1133 var c = b.minHfov; 1134 "multires" == 1135 b.type && C && !b.multiResMinHfov && (c = Math.min(c, C.getCanvas().width / (b.multiRes.cubeResolution / 90 * 0.9))); 1136 if (c > b.maxHfov) return console.log("HFOV bounds do not make sense (minHfov > maxHfov)."), b.hfov; 1137 var d = b.hfov, d = a < c ? c : a > b.maxHfov ? b.maxHfov : a; 1138 b.avoidShowingBackground && C && (a = C.getCanvas(), d = Math.min(d, 360 * Math.atan(Math.tan((b.maxPitch - b.minPitch) / 360 * Math.PI) / a.height * a.width) / Math.PI)); 1139 return d 1140 } 1141 1142 function x(a) { 1143 b.hfov = u(a); 1144 B("zoomchange", b.hfov) 1145 } 1146 1147 function t() { 1148 O = {}; 1149 Z = b.autoRotate ? b.autoRotate : Z; 1150 b.autoRotate = 1151 !1 1152 } 1153 1154 function Ya() { 1155 Na && (q.load.box.style.display = "none", q.errorMsg.style.display = "none", Na = !1, M.style.display = "block", B("errorcleared")); 1156 G = !1; 1157 v.load.style.display = "none"; 1158 q.load.box.style.display = "inline"; 1159 oa() 1160 } 1161 1162 function y(a, c, d, h, g) { 1163 G || (g = !0); 1164 G = !1; 1165 O = {}; 1166 var m, q; 1167 if (b.sceneFadeDuration && !g && (m = C.render(b.pitch * Math.PI / 180, b.yaw * Math.PI / 180, b.hfov * Math.PI / 180, {returnImage: !0}), m !== p)) { 1168 g = new Image; 1169 g.className = "pnlm-fade-img"; 1170 g.style.transition = "opacity " + b.sceneFadeDuration / 1E3 + "s"; 1171 g.style.width = "100%"; 1172 g.style.height = 1173 "100%"; 1174 g.onload = function () { 1175 y(a, c, d, h, !0) 1176 }; 1177 g.src = m; 1178 M.appendChild(g); 1179 C.fadeImg = g; 1180 return 1181 } 1182 g = "same" === c ? b.pitch : c; 1183 m = "same" === d ? b.yaw : "sameAzimuth" === d ? b.yaw + (b.northOffset || 0) - (k.scenes[a].northOffset || 0) : d; 1184 q = "same" === h ? b.hfov : h; 1185 e(); 1186 H(a); 1187 w.yaw = w.pitch = w.hfov = 0; 1188 l(); 1189 g !== p && (b.pitch = g); 1190 m !== p && (b.yaw = m); 1191 q !== p && (b.hfov = q); 1192 B("scenechange", a); 1193 Ya() 1194 } 1195 1196 function Da() { 1197 E.removeEventListener("deviceorientation", na); 1198 v.orientation.classList.remove("pnlm-orientation-button-active"); 1199 X = !1 1200 } 1201 1202 function Ra() { 1203 "function" === typeof DeviceMotionEvent.requestPermission ? 1204 DeviceOrientationEvent.requestPermission().then(function (a) { 1205 "granted" == a && (X = 1, E.addEventListener("deviceorientation", na), v.orientation.classList.add("pnlm-orientation-button-active")) 1206 }) : (X = 1, E.addEventListener("deviceorientation", na), v.orientation.classList.add("pnlm-orientation-button-active")) 1207 } 1208 1209 function D(a) { 1210 return k.escapeHTML ? String(a).split(/&/g).join("&").split('"').join(""").split("'").join("'").split("<").join("<").split(">").join(">").split("/").join("/").split("\n").join("<br>") : 1211 String(a).split("\n").join("<br>") 1212 } 1213 1214 function I(a, b) { 1215 try { 1216 var c = decodeURIComponent(ab(a)).replace(/[^\w:]/g, "").toLowerCase() 1217 } catch (d) { 1218 return "about:blank" 1219 } 1220 return 0 === c.indexOf("javascript:") || 0 === c.indexOf("vbscript:") ? (console.log("Script URL removed."), "about:blank") : b && 0 === c.indexOf("data:") ? (console.log("Data URI removed from link."), "about:blank") : a 1221 } 1222 1223 function ab(a) { 1224 return a.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, function (a, b) { 1225 b = b.toLowerCase(); 1226 return "colon" === b ? ":" : "#" === b.charAt(0) ? 1227 "x" === b.charAt(1) ? String.fromCharCode(parseInt(b.substring(2), 16)) : String.fromCharCode(+b.substring(1)) : "" 1228 }) 1229 } 1230 1231 function B(a) { 1232 if (a in T) for (var b = T[a].length; 0 < b; b--) T[a][T[a].length - b].apply(null, [].slice.call(arguments, 1)) 1233 } 1234 1235 var da = this, b, C, sa, ha = !1, N = Date.now(), xa = 0, ya = 0, Ha = -1, Oa = 0, Pa = 0, r = Array(10), 1236 Aa = !1, G, Na = !1, Sa = !1, P, ba, w = {yaw: 0, pitch: 0, hfov: 0}, Ta = !1, X = !1, $a = 0, Qa, Z = 0, 1237 ra, Ga, O = {}, T = {}, aa = [], Ma = !1, Ua = !1, Za = !1, Va = { 1238 hfov: 100, 1239 minHfov: 50, 1240 multiResMinHfov: !1, 1241 maxHfov: 120, 1242 pitch: 0, 1243 minPitch: p, 1244 maxPitch: p, 1245 yaw: 0, 1246 minYaw: -180, 1247 maxYaw: 180, 1248 roll: 0, 1249 haov: 360, 1250 vaov: 180, 1251 vOffset: 0, 1252 autoRotate: !1, 1253 autoRotateInactivityDelay: -1, 1254 autoRotateStopDelay: p, 1255 type: "equirectangular", 1256 northOffset: 0, 1257 showFullscreenCtrl: !0, 1258 dynamic: !1, 1259 dynamicUpdate: !1, 1260 doubleClickZoom: !0, 1261 keyboardZoom: !0, 1262 mouseZoom: !0, 1263 showZoomCtrl: !0, 1264 autoLoad: !1, 1265 showControls: !0, 1266 orientationOnByDefault: !1, 1267 hotSpotDebug: !1, 1268 backgroundColor: [0, 0, 0], 1269 avoidShowingBackground: !1, 1270 animationTimingFunction: function (a) { 1271 return 0.5 > a ? 2 * a * a : -1 + (4 - 2 * a) * a 1272 }, 1273 draggable: !0, 1274 disableKeyboardCtrl: !1, 1275 crossOrigin: "anonymous", 1276 touchPanSpeedCoeffFactor: 1, 1277 capturedKeyNumbers: [16, 17, 27, 37, 38, 39, 40, 61, 65, 68, 83, 87, 107, 109, 173, 187, 189], 1278 friction: 0.15, 1279 strings: { 1280 loadButtonLabel: "Click to<br>Load<br>Panorama", 1281 loadingLabel: "Loading...", 1282 bylineLabel: "by %s", 1283 noPanoramaError: "No panorama image was specified.", 1284 fileAccessError: "The file %s could not be accessed.", 1285 malformedURLError: "There is something wrong with the panorama URL.", 1286 iOS8WebGLError: "Due to iOS 8's broken WebGL implementation, only progressive encoded JPEGs work for your device (this panorama uses standard encoding).", 1287 genericWebGLError: "Your browser does not have the necessary WebGL support to display this panorama.", 1288 textureSizeError: "This panorama is too big for your device! It's %spx wide, but your device only supports images up to %spx wide. Try another device. (If you're the author, try scaling down the image.)", 1289 unknownError: "Unknown error. Check developer console." 1290 } 1291 }; 1292 s = "string" === typeof s ? g.getElementById(s) : s; 1293 s.classList.add("pnlm-container"); 1294 s.tabIndex = 0; 1295 var J = g.createElement("div"); 1296 J.className = "pnlm-ui"; 1297 s.appendChild(J); 1298 var M = g.createElement("div"); 1299 M.className = "pnlm-render-container"; 1300 s.appendChild(M); 1301 var W = g.createElement("div"); 1302 W.className = "pnlm-dragfix"; 1303 J.appendChild(W); 1304 var fa = g.createElement("span"); 1305 fa.className = "pnlm-about-msg"; 1306 fa.innerHTML = '<a href="https://pannellum.org/" target="_blank">Pannellum</a> 2.5.6'; 1307 J.appendChild(fa); 1308 W.addEventListener("contextmenu", ja); 1309 var q = {}, Wa = g.createElement("div"); 1310 Wa.className = "pnlm-sprite pnlm-hot-spot-debug-indicator"; 1311 J.appendChild(Wa); 1312 q.container = g.createElement("div"); 1313 q.container.className = "pnlm-panorama-info"; 1314 q.title = g.createElement("div"); 1315 q.title.className = "pnlm-title-box"; 1316 q.container.appendChild(q.title); 1317 q.author = g.createElement("div"); 1318 q.author.className = "pnlm-author-box"; 1319 q.container.appendChild(q.author); 1320 J.appendChild(q.container); 1321 q.load = {}; 1322 q.load.box = g.createElement("div"); 1323 q.load.box.className = "pnlm-load-box"; 1324 q.load.boxp = g.createElement("p"); 1325 q.load.box.appendChild(q.load.boxp); 1326 q.load.lbox = g.createElement("div"); 1327 q.load.lbox.className = "pnlm-lbox"; 1328 q.load.lbox.innerHTML = 1329 '<div class="pnlm-loading"></div>'; 1330 q.load.box.appendChild(q.load.lbox); 1331 q.load.lbar = g.createElement("div"); 1332 q.load.lbar.className = "pnlm-lbar"; 1333 q.load.lbarFill = g.createElement("div"); 1334 q.load.lbarFill.className = "pnlm-lbar-fill"; 1335 q.load.lbar.appendChild(q.load.lbarFill); 1336 q.load.box.appendChild(q.load.lbar); 1337 q.load.msg = g.createElement("p"); 1338 q.load.msg.className = "pnlm-lmsg"; 1339 q.load.box.appendChild(q.load.msg); 1340 J.appendChild(q.load.box); 1341 q.errorMsg = g.createElement("div"); 1342 q.errorMsg.className = "pnlm-error-msg pnlm-info-box"; 1343 J.appendChild(q.errorMsg); 1344 var v = {}; 1345 v.container = g.createElement("div"); 1346 v.container.className = "pnlm-controls-container"; 1347 J.appendChild(v.container); 1348 v.load = g.createElement("div"); 1349 v.load.className = "pnlm-load-button"; 1350 v.load.addEventListener("click", function () { 1351 l(); 1352 Ya() 1353 }); 1354 J.appendChild(v.load); 1355 v.zoom = g.createElement("div"); 1356 v.zoom.className = "pnlm-zoom-controls pnlm-controls"; 1357 v.zoomIn = g.createElement("div"); 1358 v.zoomIn.className = "pnlm-zoom-in pnlm-sprite pnlm-control"; 1359 v.zoomIn.addEventListener("click", function () { 1360 G && 1361 (x(b.hfov - 5), F()) 1362 }); 1363 v.zoom.appendChild(v.zoomIn); 1364 v.zoomOut = g.createElement("div"); 1365 v.zoomOut.className = "pnlm-zoom-out pnlm-sprite pnlm-control"; 1366 v.zoomOut.addEventListener("click", function () { 1367 G && (x(b.hfov + 5), F()) 1368 }); 1369 v.zoom.appendChild(v.zoomOut); 1370 v.container.appendChild(v.zoom); 1371 v.fullscreen = g.createElement("div"); 1372 v.fullscreen.addEventListener("click", h); 1373 v.fullscreen.className = "pnlm-fullscreen-toggle-button pnlm-sprite pnlm-fullscreen-toggle-button-inactive pnlm-controls pnlm-control"; 1374 (g.fullscreenEnabled || 1375 g.mozFullScreenEnabled || g.webkitFullscreenEnabled || g.msFullscreenEnabled) && v.container.appendChild(v.fullscreen); 1376 v.orientation = g.createElement("div"); 1377 v.orientation.addEventListener("click", function (a) { 1378 X ? Da() : Ra() 1379 }); 1380 v.orientation.addEventListener("mousedown", function (a) { 1381 a.stopPropagation() 1382 }); 1383 v.orientation.addEventListener("touchstart", function (a) { 1384 a.stopPropagation() 1385 }); 1386 v.orientation.addEventListener("pointerdown", function (a) { 1387 a.stopPropagation() 1388 }); 1389 v.orientation.className = "pnlm-orientation-button pnlm-orientation-button-inactive pnlm-sprite pnlm-controls pnlm-control"; 1390 var Xa = !1; 1391 E.DeviceOrientationEvent && "https:" == location.protocol && 0 <= navigator.userAgent.toLowerCase().indexOf("mobi") && (v.container.appendChild(v.orientation), Xa = !0); 1392 var Ia = g.createElement("div"); 1393 Ia.className = "pnlm-compass pnlm-controls pnlm-control"; 1394 J.appendChild(Ia); 1395 k.firstScene ? H(k.firstScene) : k.default && k.default.firstScene ? H(k.default.firstScene) : H(null); 1396 l(!0); 1397 var ia = [], za = []; 1398 Y.prototype.multiply = function (a) { 1399 return new Y(this.w * a.w - this.x * a.x - this.y * a.y - this.z * a.z, this.x * a.w + this.w * a.x + this.y * 1400 a.z - this.z * a.y, this.y * a.w + this.w * a.y + this.z * a.x - this.x * a.z, this.z * a.w + this.w * a.z + this.x * a.y - this.y * a.x) 1401 }; 1402 Y.prototype.toEulerAngles = function () { 1403 var a = Math.atan2(2 * (this.w * this.x + this.y * this.z), 1 - 2 * (this.x * this.x + this.y * this.y)), 1404 b = Math.asin(2 * (this.w * this.y - this.z * this.x)), 1405 c = Math.atan2(2 * (this.w * this.z + this.x * this.y), 1 - 2 * (this.y * this.y + this.z * this.z)); 1406 return [a, b, c] 1407 }; 1408 this.isLoaded = function () { 1409 return Boolean(G) 1410 }; 1411 this.getPitch = function () { 1412 return b.pitch 1413 }; 1414 this.setPitch = function (a, c, d, e) { 1415 N = Date.now(); 1416 if (1E-6 >= 1417 Math.abs(a - b.pitch)) return "function" == typeof d && d(e), this; 1418 (c = c == p ? 1E3 : Number(c)) ? (O.pitch = { 1419 startTime: Date.now(), 1420 startPosition: b.pitch, 1421 endPosition: a, 1422 duration: c 1423 }, "function" == typeof d && setTimeout(function () { 1424 d(e) 1425 }, c)) : b.pitch = a; 1426 F(); 1427 return this 1428 }; 1429 this.getPitchBounds = function () { 1430 return [b.minPitch, b.maxPitch] 1431 }; 1432 this.setPitchBounds = function (a) { 1433 b.minPitch = Math.max(-90, Math.min(a[0], 90)); 1434 b.maxPitch = Math.max(-90, Math.min(a[1], 90)); 1435 return this 1436 }; 1437 this.getYaw = function () { 1438 return (b.yaw + 540) % 360 - 180 1439 }; 1440 this.setYaw = function (a, 1441 c, d, e) { 1442 N = Date.now(); 1443 if (1E-6 >= Math.abs(a - b.yaw)) return "function" == typeof d && d(e), this; 1444 c = c == p ? 1E3 : Number(c); 1445 a = (a + 180) % 360 - 180; 1446 c ? (180 < b.yaw - a ? a += 360 : 180 < a - b.yaw && (a -= 360), O.yaw = { 1447 startTime: Date.now(), 1448 startPosition: b.yaw, 1449 endPosition: a, 1450 duration: c 1451 }, "function" == typeof d && setTimeout(function () { 1452 d(e) 1453 }, c)) : b.yaw = a; 1454 F(); 1455 return this 1456 }; 1457 this.getYawBounds = function () { 1458 return [b.minYaw, b.maxYaw] 1459 }; 1460 this.setYawBounds = function (a) { 1461 b.minYaw = Math.max(-360, Math.min(a[0], 360)); 1462 b.maxYaw = Math.max(-360, Math.min(a[1], 360)); 1463 return this 1464 }; 1465 this.getHfov = function () { 1466 return b.hfov 1467 }; 1468 this.setHfov = function (a, c, d, e) { 1469 N = Date.now(); 1470 if (1E-6 >= Math.abs(a - b.hfov)) return "function" == typeof d && d(e), this; 1471 (c = c == p ? 1E3 : Number(c)) ? (O.hfov = { 1472 startTime: Date.now(), 1473 startPosition: b.hfov, 1474 endPosition: u(a), 1475 duration: c 1476 }, "function" == typeof d && setTimeout(function () { 1477 d(e) 1478 }, c)) : x(a); 1479 F(); 1480 return this 1481 }; 1482 this.getHfovBounds = function () { 1483 return [b.minHfov, b.maxHfov] 1484 }; 1485 this.setHfovBounds = function (a) { 1486 b.minHfov = Math.max(0, a[0]); 1487 b.maxHfov = Math.max(0, a[1]); 1488 return this 1489 }; 1490 this.lookAt = function (a, 1491 c, d, e, g, h) { 1492 e = e == p ? 1E3 : Number(e); 1493 a !== p && 1E-6 < Math.abs(a - b.pitch) && (this.setPitch(a, e, g, h), g = p); 1494 c !== p && 1E-6 < Math.abs(c - b.yaw) && (this.setYaw(c, e, g, h), g = p); 1495 d !== p && 1E-6 < Math.abs(d - b.hfov) && (this.setHfov(d, e, g, h), g = p); 1496 "function" == typeof g && g(h); 1497 return this 1498 }; 1499 this.getNorthOffset = function () { 1500 return b.northOffset 1501 }; 1502 this.setNorthOffset = function (a) { 1503 b.northOffset = Math.min(360, Math.max(0, a)); 1504 F(); 1505 return this 1506 }; 1507 this.getHorizonRoll = function () { 1508 return b.horizonRoll 1509 }; 1510 this.setHorizonRoll = function (a) { 1511 b.horizonRoll = Math.min(90, 1512 Math.max(-90, a)); 1513 C.setPose(b.horizonPitch * Math.PI / 180, b.horizonRoll * Math.PI / 180); 1514 F(); 1515 return this 1516 }; 1517 this.getHorizonPitch = function () { 1518 return b.horizonPitch 1519 }; 1520 this.setHorizonPitch = function (a) { 1521 b.horizonPitch = Math.min(90, Math.max(-90, a)); 1522 C.setPose(b.horizonPitch * Math.PI / 180, b.horizonRoll * Math.PI / 180); 1523 F(); 1524 return this 1525 }; 1526 this.startAutoRotate = function (a, c) { 1527 a = a || Z || 1; 1528 c = c === p ? Ga : c; 1529 b.autoRotate = a; 1530 da.lookAt(c, p, ra, 3E3); 1531 F(); 1532 return this 1533 }; 1534 this.stopAutoRotate = function () { 1535 Z = b.autoRotate ? b.autoRotate : Z; 1536 b.autoRotate = !1; 1537 b.autoRotateInactivityDelay = 1538 -1; 1539 return this 1540 }; 1541 this.stopMovement = function () { 1542 t(); 1543 w = {yaw: 0, pitch: 0, hfov: 0} 1544 }; 1545 this.getRenderer = function () { 1546 return C 1547 }; 1548 this.setUpdate = function (a) { 1549 Ma = !0 === a; 1550 C === p ? pa() : F(); 1551 return this 1552 }; 1553 this.mouseEventToCoords = function (a) { 1554 return ta(a) 1555 }; 1556 this.loadScene = function (a, b, c, d) { 1557 !1 !== G && y(a, b, c, d); 1558 return this 1559 }; 1560 this.getScene = function () { 1561 return b.scene 1562 }; 1563 this.addScene = function (a, b) { 1564 k.scenes[a] = b; 1565 return this 1566 }; 1567 this.removeScene = function (a) { 1568 if (b.scene === a || !k.scenes.hasOwnProperty(a)) return !1; 1569 delete k.scenes[a]; 1570 return !0 1571 }; 1572 this.toggleFullscreen = 1573 function () { 1574 h(); 1575 return this 1576 }; 1577 this.getConfig = function () { 1578 return b 1579 }; 1580 this.getContainer = function () { 1581 return s 1582 }; 1583 this.addHotSpot = function (a, c) { 1584 if (c === p && b.scene === p) b.hotSpots.push(a); else { 1585 var d = c !== p ? c : b.scene; 1586 if (k.scenes.hasOwnProperty(d)) k.scenes[d].hasOwnProperty("hotSpots") || (k.scenes[d].hotSpots = [], d == b.scene && (b.hotSpots = k.scenes[d].hotSpots)), k.scenes[d].hotSpots.push(a); else throw"Invalid scene ID!"; 1587 } 1588 if (c === p || b.scene == c) La(a), G && Ca(a); 1589 return this 1590 }; 1591 this.removeHotSpot = function (a, c) { 1592 if (c === p || b.scene == 1593 c) { 1594 if (!b.hotSpots) return !1; 1595 for (var d = 0; d < b.hotSpots.length; d++) if (b.hotSpots[d].hasOwnProperty("id") && b.hotSpots[d].id === a) { 1596 for (var e = b.hotSpots[d].div; e.parentNode != M;) e = e.parentNode; 1597 M.removeChild(e); 1598 delete b.hotSpots[d].div; 1599 b.hotSpots.splice(d, 1); 1600 return !0 1601 } 1602 } else if (k.scenes.hasOwnProperty(c)) { 1603 if (!k.scenes[c].hasOwnProperty("hotSpots")) return !1; 1604 for (d = 0; d < k.scenes[c].hotSpots.length; d++) if (k.scenes[c].hotSpots[d].hasOwnProperty("id") && k.scenes[c].hotSpots[d].id === a) return k.scenes[c].hotSpots.splice(d, 1605 1), !0 1606 } else return !1 1607 }; 1608 this.resize = function () { 1609 C && z() 1610 }; 1611 this.isLoaded = function () { 1612 return G 1613 }; 1614 this.isOrientationSupported = function () { 1615 return Xa || !1 1616 }; 1617 this.stopOrientation = function () { 1618 Da() 1619 }; 1620 this.startOrientation = function () { 1621 Xa && Ra() 1622 }; 1623 this.isOrientationActive = function () { 1624 return Boolean(X) 1625 }; 1626 this.on = function (a, b) { 1627 T[a] = T[a] || []; 1628 T[a].push(b); 1629 return this 1630 }; 1631 this.off = function (a, b) { 1632 if (!a) return T = {}, this; 1633 if (b) { 1634 var c = T[a].indexOf(b); 1635 0 <= c && T[a].splice(c, 1); 1636 0 == T[a].length && delete T[a] 1637 } else delete T[a]; 1638 return this 1639 }; 1640 this.destroy = 1641 function () { 1642 Za = !0; 1643 clearTimeout(Qa); 1644 C && C.destroy(); 1645 Sa && (g.removeEventListener("mousemove", ua, !1), g.removeEventListener("mouseup", ma, !1), s.removeEventListener("mozfullscreenchange", d, !1), s.removeEventListener("webkitfullscreenchange", d, !1), s.removeEventListener("msfullscreenchange", d, !1), s.removeEventListener("fullscreenchange", d, !1), E.removeEventListener("resize", z, !1), E.removeEventListener("orientationchange", z, !1), s.removeEventListener("keydown", V, !1), s.removeEventListener("keyup", R, !1), s.removeEventListener("blur", 1646 $, !1), g.removeEventListener("mouseleave", ma, !1)); 1647 s.innerHTML = ""; 1648 s.classList.remove("pnlm-container") 1649 } 1650 } 1651 1652 return { 1653 viewer: function (g, k) { 1654 return new Ba(g, k) 1655 } 1656 } 1657}(window, document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.