1/*! For license information please see 6.js.LICENSE.txt */ 2(self.webpackChunksiteref_mgs=self.webpackChunksiteref_mgs||[]).push([[6,136,149,504,638,683,736,887,899,942],{725(){},6436(t,e,n){"use strict";n.d(e,{$6:()=>a,F4:()=>l,JB:()=>o,RK:()=>c});var i=n(6228),r=n(2304);function s(t){if(!t||"string"!=typeof t)return null;const e=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;const[,n,i,r]=e.map(Number),s=new Date(n,i-1,r);return isNaN(s.getTime())?null:s}function o(){let t=localStorage.getItem("arrivee");const e=s(t)||(t?new Date(t):null),n=!e||isNaN(e.getTime())||(0,i.H$)(e,new Date,"<");if(!t||"Invalid Date"===t||n){const t=new Date,e=(0,i.Yq)(t,"YYYY-MM-DD");return localStorage.removeItem("arrivee"),e&&a(t),e||void 0}return t}function a(t,e=!0){const n=(0,i.Yq)(t,"YYYY-MM-DD");if(n){const t=localStorage.getItem("arrivee");localStorage.setItem("arrivee",n),e&&t!==n&&(0,i.Pt)(r.YR,{dateArrivee:n},this)}}function l(){let t=localStorage.getItem("depart");const e=s(t)||(t?new Date(t):null),n=!e||isNaN(e.getTime())||(0,i.H$)(e,new Date,"<");if(!t||"Invalid Date"===t||n){const t=new Date;t.setDate(t.getDate()+1);const e=(0,i.Yq)(t,"YYYY-MM-DD");return localStorage.removeItem("depart"),e&&c(t),e||void 0}return t}function c(t,e=!0){const n=(0,i.Yq)(t,"YYYY-MM-DD");if(n){const t=localStorage.getItem("depart");localStorage.setItem("depart",n),e&&t!==n&&(0,i.Pt)(r.YR,{dateDepart:n},this)}}},8504(t,e){!function(t){"use strict";var e="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},n={weekdays:{shorthand:["So","Mo","Di","Mi","Do","Fr","Sa"],longhand:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},months:{shorthand:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],longhand:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},firstDayOfWeek:1,weekAbbreviation:"KW",rangeSeparator:" bis ",scrollTitle:"Zum Ãndern scrollen",toggleTitle:"Zum Umschalten klicken",time_24hr:!0};e.l10ns.de=n;var i=e.l10ns;t.German=n,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},2942(t,e){!function(t){"use strict";var e={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};t.default=e,t.english=e,Object.defineProperty(t,"__esModule",{value:!0})}(e)},3899(t,e){!function(t){"use strict";var e="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},n={weekdays:{shorthand:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],longhand:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},months:{shorthand:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],longhand:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]},ordinal:function(){return"º"},firstDayOfWeek:1,rangeSeparator:" a ",time_24hr:!0};e.l10ns.es=n;var i=e.l10ns;t.Spanish=n,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},9887(t,e){!function(t){"use strict";var e="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},n={firstDayOfWeek:1,weekdays:{shorthand:["dim","lun","mar","mer","jeu","ven","sam"],longhand:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},months:{shorthand:["janv","févr","mars","avr","mai","juin","juil","août","sept","oct","nov","déc"],longhand:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},ordinal:function(t){return t>1?"":"er"},rangeSeparator:" au ",weekAbbreviation:"Sem",scrollTitle:"Défiler pour augmenter la valeur",toggleTitle:"Cliquer pour basculer",time_24hr:!0};e.l10ns.fr=n;var i=e.l10ns;
2t.French=n,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},638(t,e){!function(t){"use strict";var e="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},n={weekdays:{shorthand:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],longhand:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},months:{shorthand:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],longhand:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},firstDayOfWeek:1,ordinal:function(){return"°"},rangeSeparator:" al ",weekAbbreviation:"Se",scrollTitle:"Scrolla per aumentare",toggleTitle:"Clicca per cambiare",time_24hr:!0};e.l10ns.it=n;var i=e.l10ns;t.Italian=n,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},3149(t,e){!function(t){"use strict";var e="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},n={weekdays:{shorthand:["zo","ma","di","wo","do","vr","za"],longhand:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},months:{shorthand:["jan","feb","mrt","apr","mei","jun","jul","aug","sept","okt","nov","dec"],longhand:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]},firstDayOfWeek:1,weekAbbreviation:"wk",rangeSeparator:" t/m ",scrollTitle:"Scroll voor volgende / vorige",toggleTitle:"Klik om te wisselen",time_24hr:!0,ordinal:function(t){return 1===t||8===t||t>=20?"ste":"de"}};e.l10ns.nl=n;var i=e.l10ns;t.Dutch=n,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},5183(t,e,n){var i;!function(r,s,o,a){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],h=s.createElement("div"),u=Math.round,d=Math.abs,p=Date.now;function f(t,e,n){return setTimeout(b(t,n),e)}function m(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function v(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=r.console&&(r.console.warn||r.console.log);return s&&s.call(r.console,i,n),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var _=v(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),y=v(function(t,e){return _(t,e,!0)},"merge","Use `assign`.");function x(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&l(i,n)}function b(t,e){return function(){return t.apply(e,arguments)}}function M(t,e){return"function"==typeof t?t.apply(e&&e[0]||a,e):t}function w(t,e){return t===a?e:t}function S(t,e,n){g(C(e),function(e){t.addEventListener(e,n,!1)})}function T(t,e,n){g(C(e),function(e){t.removeEventListener(e,n,!1)})}function E(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function A(t,e){return t.indexOf(e)>-1}function C(t){return t.trim().split(/\s+/g)}function R(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function L(t){return Array.prototype.slice.call(t,0)}function P(t,e,n){for(var i=[],r=[],s=0;s<t.length;){var o=e?t[s][e]:t[s];R(r,o)<0&&i.push(t[s]),r[s]=o,s++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function I(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),s=0;s<c.length;){if((i=(n=c[s])?n+r:e)in t)return i;s++}return a}var D=1;function O(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var N="ontouchstart"in r,U=I(r,"PointerEvent")!==a,k=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F="touch",z="mouse",B=24,H=["x","y"],V=["clientX","clientY"];function G(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){M(t.o
vendor: 6,320 bytes, line 2
2ptions.enable,[t])&&n.handler(e)},this.init()}function W(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,s=1&e&&i-r===0,o=12&e&&i-r===0;n.isFirst=!!s,n.isFinal=!!o,s&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=j(e));r>1&&!n.firstMultiple?n.firstMultiple=j(e):1===r&&(n.firstMultiple=!1);var s=n.firstInput,o=n.firstMultiple,l=o?o.center:s.center,c=e.center=X(i);e.timeStamp=p(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=J(l,c),e.distance=Z(l,c),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(r=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=q(e.deltaX,e.deltaY);var h=Y(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=d(h.x)>d(h.y)?h.x:h.y,e.scale=o?(u=o.pointers,f=i,Z(f[0],f[1],V)/Z(u[0],u[1],V)):1,e.rotation=o?function(t,e){return J(e[1],e[0],V)+J(t[1],t[0],V)}(o.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,s,o=t.lastInterval||e,l=e.timeStamp-o.timeStamp;if(8!=e.eventType&&(l>25||o.velocity===a)){var c=e.deltaX-o.deltaX,h=e.deltaY-o.deltaY,u=Y(l,c,h);i=u.x,r=u.y,n=d(u.x)>d(u.y)?u.x:u.y,s=q(c,h),t.lastInterval=e}else n=o.velocity,i=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=s}(n,e);var u,f;var m=t.element;E(e.srcEvent.target,m)&&(m=e.srcEvent.target);e.target=m}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function j(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:u(t.pointers[n].clientX),clientY:u(t.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:e,center:X(e),deltaX:t.deltaX,deltaY:t.deltaY}}function X(t){var e=t.length;if(1===e)return{x:u(t[0].clientX),y:u(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:u(n/e),y:u(i/e)}}function Y(t,e,n){return{x:e/t||0,y:n/t||0}}function q(t,e){return t===e?1:d(t)>=d(e)?t<0?2:4:e<0?8:16}function Z(t,e,n){n||(n=H);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function J(t,e,n){n||(n=H);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}G.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(O(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(O(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4},$="mousedown",Q="mousemove mouseup";function tt(){this.evEl=$,this.evWin=Q,this.pressed=!1,G.apply(this,arguments)}x(tt,G,{handler:function(t){var e=K[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:z,srcEvent:t}))}});var et={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},nt={2:F,3:"pen",4:z,5:"kinect"},it="pointerdown",rt="pointermove pointerup pointercancel";function st(){this.evEl=it,this.evWin=rt,G.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(it="MSPointerDown",rt="MSPointerMove MSPointerUp MSPointerCancel"),x(st,G,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=et[i],s=nt[t.pointerType]||t.pointerType,o=s==F,a=R(e,t.pointerId,"pointerId");1&r&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):12&r&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),n&&e.splice(a,1))}});var ot={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function at(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,G.apply(this,arguments)}function lt(t,e){var n=L(t.touches),i=L(t.changedTouches);return 12&e&&(n=P(n.concat(i),"identifier",!0)),[n,i]}x(at,G,{handler:function(t){var e=ot[t.type];if(1===e&&(this.started=!0),this.started){var n=lt.call(this,t,e);12&e&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}}});var ct={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ht="touchstart touchmove touchend touchcancel";function ut(){this.evTarget=ht,this.targetIds={},G.apply(this,arguments)}function dt(t,e){var n=L(t.touches),i=this.targetIds;if(3&e&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,s,o=L(t.changedTouches),a=[],l=this.target;if(s=n.filter(function(t){return E(t.target,l)}),1===e)for(r=0;r<s.length;)i[s[r].identifier]=!0,r++;for(r=0;r<o.length;)i[o[r].identifier]&&a.push(o[r]),12&e&&delete i[o[r].identifier],r++;return a.length?[P(s.concat(a),"identifier",!0),a]:void 0}x(ut,G,{handler:function(t){var e=ct[t.type],n=dt.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}});function pt(){G.apply(this,arguments);var t=b(this.handler,this);this.touch=new ut(this.manager,t),this.mouse=new tt(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function ft(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,mt.call(this,e)):12&t&&mt.call(this,e)}function mt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout(function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)},2500)}}function gt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],s=Math.abs(e-r.x),o=Math.abs(n-r.y);if(s<=25&&o<=25)return!0}return!1}x(pt,G,{handler:function(t,e,n){var i=n.pointerType==F,r=n.pointerType==z;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)ft.call(this,e,n);else if(r&>.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var vt=I(h.style,"touchAction"),_t=vt!==a,yt="compute",xt="auto",bt="mani
2pulation",Mt="none",wt="pan-x",St="pan-y",Tt=function(){if(!_t)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}();function Et(t,e){this.manager=t,this.set(e)}Et.prototype={set:function(t){t==yt&&(t=this.compute()),_t&&this.manager.element.style&&Tt[t]&&(this.manager.element.style[vt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,function(e){M(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(A(t,Mt))return Mt;var e=A(t,wt),n=A(t,St);if(e&&n)return Mt;if(e||n)return e?wt:St;if(A(t,bt))return bt;return xt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=A(i,Mt)&&!Tt[Mt],s=A(i,St)&&!Tt[St],o=A(i,wt)&&!Tt[wt];if(r){var a=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(a&&l&&c)return}if(!o||!s)return r||s&&6&n||o&&n&B?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var At=32;function Ct(t){this.options=l({},this.defaults,t||{}),this.id=D++,this.manager=null,this.options.enable=w(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Rt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Lt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function Pt(t,e){var n=e.manager;return n?n.get(t):t}function It(){Ct.apply(this,arguments)}function Dt(){It.apply(this,arguments),this.pX=null,this.pY=null}function Ot(){It.apply(this,arguments)}function Nt(){Ct.apply(this,arguments),this._timer=null,this._input=null}function Ut(){It.apply(this,arguments)}function kt(){It.apply(this,arguments)}function Ft(){Ct.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function zt(t,e){return(e=e||{}).recognizers=w(e.recognizers,zt.defaults.preset),new Bt(t,e)}Ct.prototype={defaults:{},set:function(t){return l(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(m(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Pt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return m(t,"dropRecognizeWith",this)||(t=Pt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(m(t,"requireFailure",this))return this;var e=this.requireFail;return-1===R(e,t=Pt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(m(t,"dropRequireFailure",this))return this;t=Pt(t,this);var e=R(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+Rt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+Rt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=At},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=l({},t);if(!M(this.options.enable,[this,e]))return this.reset(),void(this.state=At);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},x(It,Ct,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(8&n||!r)?16|e:i||r?4&n?8|e:2&e?4|e:2:At}}),x(Dt,It,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(St),t&B&&e.push(wt),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(6&e.direction?(r=0===s?1:s<0?2:4,n=s!=this.pX,i=Math.abs(t.deltaX)):(r=0===o?1:o<0?8:16,n=o!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return It.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Lt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),x(Ot,It,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Mt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),x(Nt,Ct,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[xt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=f(function(){this.state=8,this.tryEmit()},e.time,this);else if(4&t.eventType)return 8;return At},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),x(Ut,It,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Mt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),x(kt,It,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Dt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:n&B&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&d(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=Lt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}
2),x(Ft,Ct,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[bt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<e.interval,o=!this.pCenter||Z(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,o&&s?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=f(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return At},failTimeout:function(){return this._timer=f(function(){this.state=At},this.options.interval,this),At},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),zt.VERSION="2.0.7",zt.defaults={domEvents:!1,touchAction:yt,enable:!0,inputTarget:null,inputClass:null,preset:[[Ut,{enable:!1}],[Ot,{enable:!1},["rotate"]],[kt,{direction:6}],[Dt,{direction:6},["swipe"]],[Ft],[Ft,{event:"doubletap",taps:2},["tap"]],[Nt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Bt(t,e){var n;this.options=l({},zt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(U?st:k?ut:N?pt:tt))(n,W),this.touchAction=new Et(this,this.options.touchAction),Ht(this,!0),g(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Ht(t,e){var n,i=t.element;i.style&&(g(t.options.cssProps,function(r,s){n=I(i.style,s),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}Bt.prototype={set:function(t){return l(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var s=0;s<i.length;)n=i[s],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),s++}},get:function(t){if(t instanceof Ct)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(m(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(m(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=R(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return g(C(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return g(C(t),function(t){e?n[t]&&n[t].splice(R(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=s.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&Ht(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(zt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:At,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:B,DIRECTION_ALL:30,Manager:Bt,Input:G,TouchAction:Et,TouchInput:ut,MouseInput:tt,PointerEventInput:st,TouchMouseInput:pt,SingleTouchInput:at,Recognizer:Ct,AttrRecognizer:It,Tap:Ft,Pan:Dt,Swipe:kt,Pinch:Ot,Rotate:Ut,Press:Nt,on:S,off:T,each:g,merge:y,extend:_,assign:l,inherit:x,bindFn:b,prefixed:I}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=zt,(i=function(){return zt}.call(e,n,e,t))===a||(t.exports=i)}(window,document)},9520(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(799),r=n.n(i)()(function(t){return t[1]});r.push([t.id,'/*!\n * Photo Sphere Viewer 4.8.1\n * @copyright 2014-2015 Jérémy Heleine\n * @copyright 2015-2022 Damien "Mistic" Sorel\n * @licence MIT (https://
2opensource.org/licenses/MIT)\n */.psv-container{background:radial-gradient(#fff 0,#fdfdfd 16%,#fbfbfb 33%,#f8f8f8 49%,#efefef 66%,#dfdfdf 82%,#bfbfbf 100%);height:100%;margin:0;overflow:hidden;padding:0;position:relative;width:100%}.psv-container--fullscreen{bottom:0;left:0;position:fixed;right:0;top:0}.psv-canvas-container{left:0;position:absolute;top:0;transition:opacity .1s linear;z-index:0}.psv-canvas{display:block}.psv-loader-container{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:80}.psv-loader{border:10px solid transparent;color:rgba(61,61,61,.7);height:150px;position:relative;text-align:center;width:150px}.psv-loader:before{content:"";height:100%}.psv-loader,.psv-loader-image,.psv-loader-text,.psv-loader:before{display:inline-block;vertical-align:middle}.psv-loader-canvas{height:100%;left:0;position:absolute;top:0;width:100%}.psv-loader-text{font:14px sans-serif}.psv-navbar{background:rgba(61,61,61,.5);bottom:-40px;display:flex;height:40px;left:0;position:absolute;transition:bottom .1s ease-in-out;width:100%;z-index:90}.psv-navbar--open{bottom:0}.psv-navbar,.psv-navbar *{box-sizing:initial}.psv-caption{color:hsla(0,0%,100%,.7);flex:1 1 100%;overflow:hidden;text-align:center}.psv-caption-icon{cursor:pointer;height:20px;width:20px}.psv-caption-icon *{fill:hsla(0,0%,100%,.7)}.psv-caption-content{display:inline-block;font:16px sans-serif;padding:10px;white-space:nowrap}.psv-button{background:transparent;color:hsla(0,0%,100%,.7);cursor:pointer;flex:0 0 auto;height:20px;padding:10px;position:relative;width:20px}.psv-button--active{background:hsla(0,0%,100%,.2)}.psv-button--disabled{opacity:.5;pointer-events:none}.psv-button-svg{transform:scale(1);transition:transform .2s ease;width:100%}.psv-button:not(.psv-button--disabled):focus-visible{outline:2px solid #007cff;outline-offset:-2px}.psv-container:not(.psv--is-touch) .psv-button--hover-scale:not(.psv-button--disabled):hover .psv-button-svg{transform:scale(1.2)}.psv-move-button+.psv-move-button{margin-left:-10px}.psv-custom-button{width:auto}.psv-autorotate-button.psv-button{height:25px;padding:7.5px;width:25px}.psv-zoom-range.psv-button{height:1px;margin:10px 0;max-width:600px;padding:9.5px 0;width:80px}.psv-zoom-range-line{background:hsla(0,0%,100%,.7);height:1px;position:relative;transition:all .3s ease;width:80px}.psv-zoom-range-handle{background:hsla(0,0%,100%,.7);border-radius:50%;height:7px;position:absolute;top:-3px;transform:scale(1);transition:transform .3s ease;width:7px}.psv-zoom-range:not(.psv-button--disabled):hover .psv-zoom-range-line{box-shadow:0 0 2px hsla(0,0%,100%,.7)}.psv-zoom-range:not(.psv-button--disabled):hover .psv-zoom-range-handle{transform:scale(1.3)}.psv-notification{bottom:-40px;box-sizing:border-box;display:flex;justify-content:center;opacity:0;padding:0 2em;position:absolute;transition-duration:.2s;transition-property:opacity,bottom;transition-timing-function:ease-in-out;width:100%;z-index:100}.psv-notification-content{background-color:rgba(61,61,61,.8);border-radius:4px;color:#fff;font:14px sans-serif;max-width:50em;padding:.5em 1em}.psv-notification--visible{bottom:80px;opacity:1}.psv-overlay{align-items:center;background:radial-gradient(#fff 0,#fdfdfd 16%,#fbfbfb 33%,#f8f8f8 49%,#efefef 66%,#dfdfdf 82%,#bfbfbf 100%);bottom:0;color:#000;display:flex;flex-direction:column;justify-content:center;left:0;opacity:.8;position:absolute;right:0;top:0;z-index:110}.psv-overlay-image{margin-bottom:4vh}.psv-overlay-image svg{width:50vw}@media (orientation:landscape){.psv-overlay-image svg{width:25vw}}.psv-overlay-text{font:30px sans-serif;text-align:center}.psv-overlay-subtext{font:20px sans-serif;opacity:.8;text-align:center}.psv-panel{background:hsla(0,0%,4%,.7);cursor:default;height:100%;margin-left:9px;max-width:calc(100% - 24px);opacity:0;position:absolute;right:0;transform:translate3d(100%,0,0);transition-duration:.1s;transition-property:opacity,transform;transition-timing-function:ease-in-out;width:400px;z-index:90}.psv--has-navbar .psv-panel{height:calc(100% - 40px)}.psv-panel-close-button{background:rgba(0,0,0,.9);display:none;height:24px;left:-24px;position:absolute;top:0;width:24px}.psv-panel-close-button:after,.psv-panel-close-button:before{background-color:#fff;content:"";height:1px;left:4px;position:absolute;top:50%;transition:.2s ease-in-out;transition-property:width,left,transform;width:15px}.psv-panel-close-button:before{transform:rotate(45deg)}.psv-panel-close-button:after{transform:rotate(-45deg)}.psv-panel-close-button:hover:after,.psv-panel-close-button:hover:before{left:0;width:23px}.psv-panel-close-button:hover:before{transform:rotate(135deg)}.psv-panel-close-button:hover:after{transform:rotate(45deg)}.psv-panel-resizer{background-color:rgba(0,0,0,.9);cursor:col-resize;display:none;height:100%;left:-9px;position:absolute;top:0;width:9px}.psv-panel-resizer:before{background:transparent;box-shadow:1px 0 #fff,3px 0 #fff,5px 0 #fff,1px 2px #fff,3px 2px #fff,5px 2px #fff,1px 4px #fff,3px 4px #fff,5px 4px #fff,1px 6px #fff,3px 6px #fff,5px 6px #fff,1px 8px #fff,3px 8px #fff,5px 8px #fff,1px 10px #fff,3px 10px #fff,5px 10px #fff,1px 12px #fff,3px 12px #fff,5px 12px #fff,1px 14px #fff,3px 14px #fff,5px 14px #fff,1px 16px #fff,3px 16px #fff,5px 16px #fff,1px 18px #fff,3px 18px #fff,5px 18px #fff,1px 20px #fff,3px 20px #fff,5px 20px #fff,1px 22px #fff,3px 22px #fff,5px 22px #fff,1px 24px #fff,3px 24px #fff,5px 24px #fff,1px 26px #fff,3px 26px #fff,5px 26px #fff,1px 28px #fff,3px 28px #fff,5px 28px #fff;content:"";height:1px;left:1px;margin-top:-14.5px;position:absolute;top:50%;width:1px}.psv-panel-content{box-sizing:border-box;color:#dcdcdc;
2font:16px sans-serif;height:100%;overflow:auto;width:100%}.psv-panel-content:not(.psv-panel-content--no-margin){padding:1em}.psv-panel-content--no-interaction{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.psv-panel--open{opacity:1;transform:translateZ(0);transition-duration:.2s}.psv-panel--open .psv-panel-close-button,.psv-panel--open .psv-panel-resizer{display:block}@media screen and (max-width:400px){.psv-panel{max-width:none;width:100%}.psv-panel-resizer{display:none}.psv-panel-close-button{left:0}}.psv-panel-menu{display:flex;flex-direction:column;height:100%}.psv-panel-menu-title{align-items:center;display:flex;flex:none;font:24px sans-serif;margin:24px 12px}.psv-panel-menu-title svg{height:24px;margin-right:12px;width:24px}.psv-panel-menu-list{flex:1;list-style:none;margin:0;overflow-x:hidden;padding:0}.psv-panel-menu-item{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;min-height:1.5em;padding:.5em 1em;transition:background .1s ease-in-out}.psv-panel-menu-item--active{outline:1px solid currentcolor;outline-offset:-1px}.psv-panel-menu-item-icon{flex:none;height:1.5em;margin-right:.5em;width:1.5em}.psv-panel-menu-item-icon img{max-height:100%;max-width:100%}.psv-panel-menu-item-icon svg{height:100%;width:100%}.psv-panel-menu-item:focus-visible{outline:2px solid #007cff;outline-offset:-2px}.psv-panel-menu--stripped .psv-panel-menu-item:hover{background:hsla(0,0%,100%,.2)}.psv-panel-menu--stripped .psv-panel-menu-item:nth-child(odd),.psv-panel-menu--stripped .psv-panel-menu-item:nth-child(odd):before{background:hsla(0,0%,100%,.1)}.psv-panel-menu--stripped .psv-panel-menu-item:nth-child(2n),.psv-panel-menu--stripped .psv-panel-menu-item:nth-child(2n):before{background:transparent}.psv-container:not(.psv--is-touch) .psv-panel-menu-item:hover{background:hsla(0,0%,100%,.2)}.psv-tooltip{background-color:rgba(61,61,61,.8);border-radius:4px;box-sizing:border-box;max-width:200px;opacity:0;padding:.5em 1em;position:absolute;transition-duration:.1s;transition-property:opacity,transform;transition-timing-function:ease-in-out;z-index:50}.psv-tooltip-content{color:#fff;font:14px sans-serif;text-shadow:0 1px #000}.psv-tooltip-arrow{border:7px solid transparent;height:0;position:absolute;width:0}.psv-tooltip--top-center,.psv-tooltip--top-left,.psv-tooltip--top-right{transform:translate3d(0,5px,0)}.psv-tooltip--top-center .psv-tooltip-arrow,.psv-tooltip--top-left .psv-tooltip-arrow,.psv-tooltip--top-right .psv-tooltip-arrow{border-top-color:rgba(61,61,61,.8)}.psv-tooltip--bottom-center,.psv-tooltip--bottom-left,.psv-tooltip--bottom-right{transform:translate3d(0,-5px,0)}.psv-tooltip--bottom-center .psv-tooltip-arrow,.psv-tooltip--bottom-left .psv-tooltip-arrow,.psv-tooltip--bottom-right .psv-tooltip-arrow{border-bottom-color:rgba(61,61,61,.8)}.psv-tooltip--center-left,.psv-tooltip--left-bottom,.psv-tooltip--left-top{transform:translate3d(5px,0,0)}.psv-tooltip--center-left .psv-tooltip-arrow,.psv-tooltip--left-bottom .psv-tooltip-arrow,.psv-tooltip--left-top .psv-tooltip-arrow{border-left-color:rgba(61,61,61,.8)}.psv-tooltip--center-right,.psv-tooltip--right-bottom,.psv-tooltip--right-top{transform:translate3d(-5px,0,0)}.psv-tooltip--center-right .psv-tooltip-arrow,.psv-tooltip--right-bottom .psv-tooltip-arrow,.psv-tooltip--right-top .psv-tooltip-arrow{border-right-color:rgba(61,61,61,.8)}.psv-tooltip--left-top,.psv-tooltip--top-left{box-shadow:-3px -3px 0 rgba(90,90,90,.7)}.psv-tooltip--top-center{box-shadow:0 -3px 0 rgba(90,90,90,.7)}.psv-tooltip--right-top,.psv-tooltip--top-right{box-shadow:3px -3px 0 rgba(90,90,90,.7)}.psv-tooltip--bottom-left,.psv-tooltip--left-bottom{box-shadow:-3px 3px 0 rgba(90,90,90,.7)}.psv-tooltip--bottom-center{box-shadow:0 3px 0 rgba(90,90,90,.7)}.psv-tooltip--bottom-right,.psv-tooltip--right-bottom{box-shadow:3px 3px 0 rgba(90,90,90,.7)}.psv-tooltip--center-left{box-shadow:-3px 0 0 rgba(90,90,90,.7)}.psv-tooltip--center-right{box-shadow:3px 0 0 rgba(90,90,90,.7)}.psv-tooltip--visible{opacity:1;transform:translateZ(0);transition-duration:.1s}',""]);const s=r},7229(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(799),r=n.n(i)()(function(t){return t[1]});r.push([t.id,'/*!\n * Photo Sphere Viewer 4.8.1\n * @copyright 2014-2015 Jérémy Heleine\n * @copyright 2015-2022 Damien "Mistic" Sorel\n * @licence MIT (https://
2opensource.org/licenses/MIT)\n */.psv-markers{-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.psv-markers,.psv-markers-svg-container{height:100%;position:absolute;width:100%}.psv-markers-svg-container{left:0;top:0;z-index:20}.psv-marker{display:none}.psv-marker--normal{background-repeat:no-repeat;background-size:contain;left:0;position:absolute;top:0;z-index:30}.psv-marker--transparent{display:block;opacity:0}.psv-marker--visible{display:block}.psv-marker--has-content,.psv-marker--has-tooltip{cursor:pointer}',""]);const s=r},7486(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(799),r=n.n(i)()(function(t){return t[1]});r.push([t.id,".blurry[data-v-47fd1548]{height:100%;margin:auto;width:100%}.fullbg[data-v-47fd1548],.lowbg[data-v-47fd1548]{background:no-repeat 50%;background-size:cover;height:100%;position:absolute;width:100%}.lowbg[data-v-47fd1548]{background:#fff no-repeat 50% 0;background-size:cover!important;filter:blur(25px)}.fullbg[data-v-47fd1548]{opacity:0}.blurry-enhanced .fullbg[data-v-47fd1548]{opacity:1;transition:all 1s}",""]);const s=r},9388(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(799),r=n.n(i)()(function(t){return t[1]});r.push([t.id,".fade-enter[data-v-6c0bee80],.fade-leave-to[data-v-6c0bee80]{opacity:0}.fade-enter-active[data-v-6c0bee80]{transition:opacity .5s ease-in-out .3s}.fade-leave[data-v-6c0bee80]{opacity:1}.fade-leave-active[data-v-6c0bee80]{transition:none}",""]);const s=r},6466(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(799),r=n.n(i)()(function(t){return t[1]});r.push([t.id,".hidden[data-v-127f72fe]{display:none;visibility:hidden}",""]);const s=r},799(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n}).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var s=0;s<this.length;s++){var o=this[s][0];null!=o&&(r[o]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);i&&r[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},9952(t,e,n){var i;t=n.nmd(t),function(){var r,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,c=32,h=64,u=128,d=256,p=1/0,f=9007199254740991,m=NaN,g=4294967295,v=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",h],["rearg",d]],_="[object Arguments]",y="[object Array]",x="[object Boolean]",b="[object Date]",M="[object Error]",w="[object Function]",S="[object GeneratorFunction]",T="[object Map]",E="[object Number]",A="[object Object]",C="[object Promise]",R="[object RegExp]",L="[object Set]",P="[object String]",I="[object Symbol]",D="[object WeakMap]",O="[object ArrayBuffer]",N="[object DataView]",U="[object Float32Array]",k="[object Float64Array]",F="[object Int8Array]",z="[object Int16Array]",B="[object Int32Array]",H="[object Uint8Array]",V="[object Uint8ClampedArray]",G="[object Uint16Array]",W="[object Uint32Array]",j=/\b__p \+= '';/g,X=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,J=RegExp(q.source),K=RegExp(Z.source),$=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,st=RegExp(rt.source),ot=/^\s+/,at=/\s/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,ht=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dt=/[()=,{}\[\]\/\s]/,pt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 69,369 bytes, line 2
27f]/g,Mt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,St="\\ud800-\\udfff",Tt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Et="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Ct="A-Z\\xc0-\\xd6\\xd8-\\xde",Rt="\\ufe0e\\ufe0f",Lt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pt="['â]",It="["+St+"]",Dt="["+Lt+"]",Ot="["+Tt+"]",Nt="\\d+",Ut="["+Et+"]",kt="["+At+"]",Ft="[^"+St+Lt+Nt+Et+At+Ct+"]",zt="\\ud83c[\\udffb-\\udfff]",Bt="[^"+St+"]",Ht="(?:\\ud83c[\\udde6-\\uddff]){2}",Vt="[\\ud800-\\udbff][\\udc00-\\udfff]",Gt="["+Ct+"]",Wt="\\u200d",jt="(?:"+kt+"|"+Ft+")",Xt="(?:"+Gt+"|"+Ft+")",Yt="(?:['â](?:d|ll|m|re|s|t|ve))?",qt="(?:['â](?:D|LL|M|RE|S|T|VE))?",Zt="(?:"+Ot+"|"+zt+")"+"?",Jt="["+Rt+"]?",Kt=Jt+Zt+("(?:"+Wt+"(?:"+[Bt,Ht,Vt].join("|")+")"+Jt+Zt+")*"),$t="(?:"+[Ut,Ht,Vt].join("|")+")"+Kt,Qt="(?:"+[Bt+Ot+"?",Ot,Ht,Vt,It].join("|")+")",te=RegExp(Pt,"g"),ee=RegExp(Ot,"g"),ne=RegExp(zt+"(?="+zt+")|"+Qt+Kt,"g"),ie=RegExp([Gt+"?"+kt+"+"+Yt+"(?="+[Dt,Gt,"$"].join("|")+")",Xt+"+"+qt+"(?="+[Dt,Gt+jt,"$"].join("|")+")",Gt+"?"+jt+"+"+Yt,Gt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nt,$t].join("|"),"g"),re=RegExp("["+Wt+St+Tt+Rt+"]"),se=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,le={};le[U]=le[k]=le[F]=le[z]=le[B]=le[H]=le[V]=le[G]=le[W]=!0,le[_]=le[y]=le[O]=le[x]=le[N]=le[b]=le[M]=le[w]=le[T]=le[E]=le[A]=le[R]=le[L]=le[P]=le[D]=!1;var ce={};ce[_]=ce[y]=ce[O]=ce[N]=ce[x]=ce[b]=ce[U]=ce[k]=ce[F]=ce[z]=ce[B]=ce[T]=ce[E]=ce[A]=ce[R]=ce[L]=ce[P]=ce[I]=ce[H]=ce[V]=ce[G]=ce[W]=!0,ce[M]=ce[w]=ce[D]=!1;var he={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ue=parseFloat,de=parseInt,pe="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,fe="object"==typeof self&&self&&self.Object===Object&&self,me=pe||fe||Function("return this")(),ge=e&&!e.nodeType&&e,ve=ge&&t&&!t.nodeType&&t,_e=ve&&ve.exports===ge,ye=_e&&pe.process,xe=function(){try{var t=ve&&ve.require&&ve.require("util").types;return t||ye&&ye.binding&&ye.binding("util")}catch(t){}}(),be=xe&&xe.isArrayBuffer,Me=xe&&xe.isDate,we=xe&&xe.isMap,Se=xe&&xe.isRegExp,Te=xe&&xe.isSet,Ee=xe&&xe.isTypedArray;function Ae(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ce(t,e,n,i){for(var r=-1,s=null==t?0:t.length;++r<s;){var o=t[r];e(i,o,n(o),t)}return i}function Re(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}function Le(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Pe(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function Ie(t,e){for(var n=-1,i=null==t?0:t.length,r=0,s=[];++n<i;){var o=t[n];e(o,n,t)&&(s[r++]=o)}return s}function De(t,e){return!!(null==t?0:t.length)&&Ge(t,e,0)>-1}function Oe(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)if(n(e,t[i]))return!0;return!1}function Ne(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}function Ue(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}function ke(t,e,n,i){var r=-1,s=null==t?0:t.length;for(i&&s&&(n=t[++r]);++r<s;)n=e(n,t[r],r,t);return n}function Fe(t,e,n,i){var r=null==t?0:t.length;for(i&&r&&(n=t[--r]);r--;)n=e(n,t[r],r,t);return n}function ze(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var Be=Ye("length");function He(t,e,n){var i;return n(t,function(t,n,r){if(e(t,n,r))return i=n,!1}),i}function Ve(t,e,n,i){for(var r=t.length,s=n+(i?1:-1);i?s--:++s<r;)if(e(t[s],s,t))return s;return-1}function Ge(t,e,n){return e==e?function(t,e,n){var i=n-1,r=t.length;for(;++i<r;)if(t[i]===e)return i;return-1}(t,e,n):Ve(t,je,n)}function We(t,e,n,i){for(var r=n-1,s=t.length;++r<s;)if(i(t[r],e))return r;return-1}function je(t){return t!=t}function Xe(t,e){var n=null==t?0:t.length;return n?Je(t,e)/n:m}function Ye(t){return function(e){return null==e?r:e[t]}}function qe(t){return function(e){return null==t?r:t[e]}}function Ze(t,e,n,i,r){return r(t,function(t,r,s){n=i?(i=!1,t):e(n,t,r,s)}),n}function Je(t,e){for(var n,i=-1,s=t.length;++i<s;){var o=e(t[i]);o!==r&&(n=n===r?o:n+o)}return n}function Ke(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function $e(t){return t?t.slice(0,gn(t)+1).replace(ot,""):t}function Qe(t){return function(e){return t(e)}}function tn(t,e){return Ne(e,function(e){return t[e]})}function en(t,e){return t.has(e)}function nn(t,e){for(var n=-1,i=t.length;++n<i&&Ge(e,t[n],0)>-1;);return n}function rn(t,e){for(var n=t.length;n--&&Ge(e,t[n],0)>-1;);return n}var sn=qe({Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã
:"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä
:"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å
:"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"}),on=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(t){return"\\"+he[t]}function ln(t){return re.test(t)}function cn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,i){n[++e]=[i,t]}),n}function hn(t,e){return function(n){return t(e(n))}}function un(t,e){for(var n=-1,i=t.length,r=0,s=[];++n<i;){var o=t[n];o!==e&&o!==a||(t[n]=a,s[r++]=n)}return s}function dn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function fn(t){return ln(t)?function(t){var e=ne.lastIndex=0;for(;ne.test(t);)++e;return e}(t):Be(t)}function mn(t){return ln(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.split("")}(t)}function gn(t){for(var e=t.length;e--&&at.test(t.charAt(e)););return e}var vn=qe({"&":"&","<":"<",">":">",""":'"',"'":"'"});var _n=function t(e){var n,i=(e=null==e?me:_n.defaults(me.Object(),e,_n.pick(me,oe))).Array,at=e.Date,St=e.Error,Tt=e.Function,Et=e.Math,At=e.Object,Ct=e.RegExp,Rt=e.String,Lt=e.TypeError,Pt=i.prototype,It=Tt.prototype,Dt=At.prototype,Ot=e["__core-js_shared__"],Nt=It.toString,Ut=Dt.hasOwnProperty,kt=0,Ft=(n=/[^.]+$/.exec(Ot&&Ot.keys&&Ot.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",zt=Dt.toString,Bt=Nt.call(At),Ht=me._,Vt=Ct("^"+Nt.call(Ut).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gt=_e?e.Buffer:r,Wt=e.Symbol,jt=e.Uint8Array,Xt=Gt?Gt.allocUnsafe:r,Yt=hn(At.getPrototypeOf,At),qt=At.create,Zt=Dt.propertyIsEnumerable,Jt=Pt.splice,Kt=Wt?Wt.isConcatSpreadable:r,$t=Wt?Wt.iterator:r,Qt=Wt?Wt.toStringTag:r,ne=function(){try{var t=ds(At,"defineProperty");return t({},"",{}),t}catch(t){}}(),re=e.clearTimeout!==me.clearTimeout&&e.clearTimeout,he=at&&at.now!==me.Date.now&&at.now,pe=e.setTimeout!==me.setTimeout&&e.setTimeout,fe=Et.ceil,ge=Et.floor,ve=At.getOwnPropertySymbols,ye=Gt?Gt.isBuffer:r,xe=e.isFinite,Be=Pt.join,qe=hn(At.keys,At),yn=Et.max,xn=Et.min,bn=at.now,Mn=e.parseInt,wn=Et.random,Sn=Pt.reverse,Tn=ds(e,"DataView"),En=ds(e,"Map"),An=ds(e,"Promise"),Cn=ds(e,"Set"),Rn=ds(e,"WeakMap"),Ln=ds(At,"create"),Pn=Rn&&new Rn,In={},Dn=Fs(Tn),On=Fs(En),Nn=Fs(An),Un=Fs(Cn),kn=Fs(Rn),Fn=Wt?Wt.prototype:r,zn=Fn?Fn.valueOf:r,Bn=Fn?Fn.toString:r;function Hn(t){if(na(t)&&!jo(t)&&!(t instanceof jn)){if(t instanceof Wn)return t;if(Ut.call(t,"__wrapped__"))return zs(t)}return new Wn(t)}var Vn=function(){function t(){}return function(e){if(!ea(e))return{};if(qt)return qt(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function Gn(){}function Wn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function jn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Xn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new qn;++e<n;)this.add(t[e])}function Jn(t){var e=this.__data__=new Yn(t);this.size=e.size}function Kn(t,e){var n=jo(t),i=!n&&Wo(t),r=!n&&!i&&Zo(t),s=!n&&!i&&!r&&ha(t),o=n||i||r||s,a=o?Ke(t.length,Rt):[],l=a.length;for(var c in t)!e&&!Ut.call(t,c)||o&&("length"==c||r&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ys(c,l))||a.push(c);return a}function $n(t){var e=t.length;return e?t[Zi(0,e-1)]:r}function Qn(t,e){return Ns(Lr(t),li(e,0,t.length))}function ti(t){return Ns(Lr(t))}function ei(t,e,n){(n!==r&&!Ho(t[e],n)||n===r&&!(e in t))&&oi(t,e,n)}function ni(t,e,n){var i=t[e];Ut.call(t,e)&&Ho(i,n)&&(n!==r||e in t)||oi(t,e,n)}function ii(t,e){for(var n=t.length;n--;)if(Ho(t[n][0],e))return n;return-1}function ri(t,e,n,i){return pi(t,function(t,r,s){e(i,t,n(t),s)}),i}function si(t,e){return t&&Pr(e,Ia(e),t)}function oi(t,e,n){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ai(t,e){for(var n=-1,s=e.length,o=i(s),a=null==t;++n<s;)o[n]=a?r:Aa(t,e[n]);return o}function li(t,e,n){return t==t&&(n!==r&&(t=t<=n?t:n),e!==r&&(t=t>=e?t:e)),t}function ci(t,e,n,i,s,o){var a,l=1&e,c=2&e,h=4&e;if(n&&(a=s?n(t,i,s,o):n(t)),a!==r)return a;if(!ea(t))return t;var u=jo(t);if(u){if(a=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Ut.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!l)return Lr(t,a)}else{var d=ms(t),p=d==w||d==S;if(Zo(t))return Sr(t,l);if(d==A||d==_||p&&!s){if(a=c||p?{}:vs(t),!l)return c?function(t,e){return Pr(t,fs(t),e)}(t,function(t,e){return t&&Pr(e,Da(e),t)}(a,t)):function(t,e){return Pr(t,ps(t),e)}(t,si(a,t))}else{if(!ce[d])return s?t:{};a=function(t,e,n){var i=t.constructor;switch(e){case O:return Tr(t);case x:case b:return new i(+t);case N:return function(t,e){var n=e?Tr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case U:case k:case F:case z:case B:case H:case V:case G:case W:return Er(t,n);case T:return new i;case E:case P:return new i(t);case R:return function(t){var e=new t.constructor(t.source,mt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case L:return new i;case I:return r=t,zn?At(zn.call(r)):{}}var r}(t,d,l)}}o||(o=new Jn);var f=o.get(t);if(f)return f;o.set(t,a),aa(t)?t.forEach(function(i){a.add(ci(i,e,n,i,t,o))}):ia(t)&&t.forEach(function(i,r){a.set(r,ci(i,e,n,r,t,o))});var m=u?r:(h?c?ss:rs:c?Da:Ia)(t);return Re(m||t,function(i,r){m&&(i=t[r=i]),ni(a,r,ci(i,e,n,r,t,o))}),a}function hi(t,e,n){var i=n.length;if(null==t)return!i;for(t=At(t);i--;){var s=n[i],o=e[s],a=t[s];if(a===r&&!(s in t)||!o(a))return!1}return!0}function ui(t,e,n){if("function"!=typeof t)throw new Lt(s);return Ps(function(){t.apply(r,n)},e)}function di(t,e,n,i){var r=-1,s=De,o=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=Ne(e,Qe(n))),i?(s=Oe,o=!1):e.length>=200&&(s=en,o=!1,e=new Zn(e));t:for(;++r<a;){var h=t[r],u=null==n?h:n(h);if(h=i||0!==h?h:0,o&&u==u){for(var d=c;d--;)if(e[d]===u)continue t;l.push(h)}else s(e,u,i)||l.push(h)}return l}Hn.templateSettings={escape:$,evaluate:Q,interpolate:tt,variable:"",imports:{_:Hn}},Hn.prototype=Gn.prototype,Hn.prototype.constructor=Hn,Wn.prototype=Vn(Gn.prototype),Wn.prototype.constructor=Wn,jn.prototype=Vn(Gn.prototype),jn.prototype.constructor=jn,Xn.prototype.clear=function(){this.__data__=Ln?Ln(null):{},this.size=0},Xn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Xn.prototype.get=function(t){var e=this.__data__;if(Ln){var n=e[t];return n===o?r:n}return Ut.call(e,t)?e[t]:r},Xn.prototype.has=function(t){var e=this.__data__;return Ln?e[t]!==r:Ut.call(e,t)},Xn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ln&&e===r?o:e,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=ii(e,t);return!(n<0)&&(n==e.length-1?e.pop():Jt.call(e,n,1),--this.size,!0)},Yn.prototype.get=function(t){var e=this.__data__,n=ii(e,t);return n<0?r:e[n][1]},Yn.prototype.has=function(t){return ii(this.__data__,t)>-1},Yn.prototype.set=function(t,e){var n=this.__data__,i=ii(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Xn,map:new(En||Yn),string:new Xn}},qn.prototype.delete=function(t){var e=hs(this,t).delete(t);return this.size-=e?1:0,e},qn.prototype.get=function(t){return hs(this,t).get(t)},qn.prototype.has=function(t){return hs(this,t).has(t)},qn.prototype.set=function(t,e){var n=hs(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Zn.prototype.add=Zn.prototype.push=function(t){return this.__data__.set(t,o),this},Zn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Jn.prototype.get=function(t){return this.__data__.get(t)},Jn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Yn){var i=n.__data__;if(!En||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new qn(i)}return n.set(t,e),this.size=n.size,this};var pi=Or(bi),fi=Or(Mi,!0);function mi(t,e){var n=!0;return pi(t,function(t,i,r){return n=!!e(t,i,r)}),n}function gi(t,e,n){for(var i=-1,s=t.length;++i<s;){var o=t[i],a=e(o);if(null!=a&&(l===r?a==a&&!ca(a):n(a,l)))var l=a,c=o}return c}function vi(t,e){var n=[];return pi(t,function(t,i,r){e(t,i,r)&&n.push(t)}),n}function _i(t,e,n,i,r){var s=-1,o=t.length;for(n||(n=_s),r||(r=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?_i(a,e-1,n,i,r):Ue(r,a):i||(r[r.length]=a)}return r}var yi=Nr(),xi=Nr(!0);function bi(t,e){return t&&yi(t,e,Ia)}function Mi(t,e){return t&&xi(t,e,Ia)}function wi(t,e){return Ie(e,function(e){return $o(t[e])})}function Si(t,e){for(var n=0,i=(e=xr(e,t)).length;null!=t&&n<i;)t=t[ks(e[n++])];return n&&n==i?t:r}function Ti(t,e,n){var i=e(t);return jo(t)?i:Ue(i,n(t))}function Ei(t){return null==t?t===r?"[object Undefined]":"[object Null]":Qt&&Qt in At(t)?function(t){var e=Ut.call(t,Qt),n=t[Qt];try{t[Qt]=r;var i=!0}catch(t){}var s=zt.call(t);i&&(e?t[Qt]=n:delete t[Qt]);return s}(t):function(t){return zt.call(t)}(t)}function Ai(t,e){return t>e}function Ci(t,e){return null!=t&&Ut.call(t,e)}function Ri(t,e){return null!=t&&e in At(t)}function Li(t,e,n){for(var s=n?Oe:De,o=t[0].length,a=t.length,l=a,c=i(a),h=1/0,u=[];l--;){var d=t[l];l&&e&&(d=Ne(d,Qe(e))),h=xn(d.length,h),c[l]=!n&&(e||o>=120&&d.length>=120)?new Zn(l&&d):r}d=t[0];var p=-1,f=c[0];t:for(;++p<o&&u.length<h;){var m=d[p],g=e?e(m):m;if(m=n||0!==m?m:0,!(f?en(f,g):s(u,g,n))){for(l=a;--l;){var v=c[l];if(!(v?en(v,g):s(t[l],g,n)))continue t}f&&f.push(g),u.push(m)}}return u}function Pi(t,e,n){var i=null==(t=Cs(t,e=xr(e,t)))?t:t[ks(Js(e))];return null==i?r:Ae(i,t,n)}function Ii(t){return na(t)&&Ei(t)==_}function Di(t,e,n,i,s){return t===e||(null==t||null==e||!na(t)&&!na(e)?t!=t&&e!=e:function(t,e,n,i,s,o){var a=jo(t),l=jo(e),c=a?y:ms(t),h=l?y:ms(e),u=(c=c==_?A:c)==A,d=(h=h==_?A:h)==A,p=c==h;if(p&&Zo(t)){if(!Zo(e))return!1;a=!0,u=!1}if(p&&!u)return o||(o=new Jn),a||ha(t)?ns(t,e,n,i,s,o):function(t,e,n,i,r,s,o){switch(n){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case O:return!(t.byteLength!=e.byteLength||!s(new jt(t),new jt(e)));case x:case b:case E:return Ho(+t,+e);case M:return t.name==e.name&&t.message==e.message;case R:case P:return t==e+"";case T:var a=cn;case L:var l=1&i;if(a||(a=dn),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;i|=2,o.set(t,e);var h=ns(a(t),a(e),i,r,s,o);return o.delete(t),h;case I:if(zn)return zn.call(t)==zn.call(e)}return!1}(t,e,c,n,i,s,o);if(!(1&n)){var f=u&&Ut.call(t,"__wrapped__"),m=d&&Ut.call(e,"__wrapped__");if(f||m){var g=f?t.value():t,v=m?e.value():e;return o||(o=new Jn),s(g,v,n,i,o)}}if(!p)return!1;return o||(o=new Jn),function(t,e,n,i,s,o){var a=1&n,l=rs(t),c=l.length,h=rs(e),u=h.length;if(c!=u&&!a)return!1;var d=c;for(;d--;){var p=l[d];if(!(a?p in e:Ut.call(e,p)))return!1}var f=o.get(t),m=o.get(e);if(f&&m)return f==e&&m==t;var g=!0;o.set(t,e),o.set(e,t);var v=a;for(;++d<c;){var _=t[p=l[d]],y=e[p];if(i)var x=a?i(y,_,p,e,t,o):i(_,y,p,t,e,o);if(!(x===r?_===y||s(_,y,n,i,o):x)){g=!1;break}v||(v="constructor"==p)}if(g&&!v){var b=t.constructor,M=e.constructor;b==M||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof M&&M instanceof M||(g=!1)}return o.delete(t),o.delete(e),g}(t,e,n,i,s,o)}(t,e,n,i,Di,s))}function Oi(t,e,n,i){var s=n.length,o=s,a=!i;if(null==t)return!o;for(t=At(t);s--;){var l=n[s];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++s<o;){var c=(l=n[s])[0],h=t[c],u=l[1];if(a&&l[2]){if(h===r&&!(c in t))return!1}else{var d=new Jn;if(i)var p=i(h,u,c,t,e,d);if(!(p===r?Di(u,h,3,i,d):p))return!1}}return!0}function Ni(t){return!(!ea(t)||(e=t,Ft&&Ft in e))&&($o(t)?Vt:_t).test(Fs(t));var e}function Ui(t){return"function"==typeof t?t:null==t?rl:"object"==typeof t?jo(t)?Vi(t[0],t[1]):Hi(t):pl(t)}function ki(t){if(!Ss(t))return qe(t);var e=[];for(var n in At(t))Ut.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Fi(t){if(!ea(t))return function(t){var e=[];if(null!=t)for(var n in At(t))e.push(n);return e}(t);var e=Ss(t),n=[];for(var i in t)("constructor"!=i||!e&&Ut.call(t,i))&&n.push(i);return n}function zi(t,e){return t<e}function Bi(t,e){var n=-1,r=Yo(t)?i(t.length):[];return pi(t,function(t,i,s){r[++n]=e(t,i,s)}),r}function Hi(t){var e=us(t);return 1==e.length&&e[0][2]?Es(e[0][0],e[0][1]):function(n){return n===t||Oi(n,t,e)}}function Vi(t,e){return bs(t)&&Ts(e)?Es(ks(t),e):function(n){var i=Aa(n,t);return i===r&&i===e?Ca(n,t):Di(e,i,3)}}function Gi(t,e,n,i,s){t!==e&&yi(e,function(o,a){if(s||(s=new Jn),ea(o))!function(t,e,n,i,s,o,a){var l=Rs(t,n),c=Rs(e,n),h=a.get(c);if(h)return void ei(t,n,h);var u=o?o(l,c,n+"",t,e,a):r,d=u===r;if(d){var p=jo(c),f=!p&&Zo(c),m=!p&&!f&&ha(c);u=c,p||f||m?jo(l)?u=l:qo(l)?u=Lr(l):f?(d=!1,u=Sr(c,!0)):m?(d=!1,u=Er(c,!0)):u=[]:sa(c)||Wo(c)?(u=l,Wo(l)?u=_a(l):ea(l)&&!$o(l)||(u=vs(c))):d=!1}d&&(a.set(c,u),s(u,c,i,o,a),a.delete(c));ei(t,n,u)}(t,e,a,n,Gi,i,s);else{var l=i?i(Rs(t,a),o,a+"",t,e,s):r;l===r&&(l=o),ei(t,a,l)}},Da)}function Wi(t,e){var n=t.length;if(n)return ys(e+=e<0?n:0,n)?t[e]:r}function ji(t,e,n){e=e.length?Ne(e,function(t){return jo(t)?function(e){return Si(e,1===t.length?t[0]:t)}:t}):[rl];var i=-1;e=Ne(e,Qe(cs()));var r=Bi(t,function(t,n,r){var s=Ne(e,function(e){return e(t)});return{criteria:s,index:++i,value:t}});return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(r,function(t,e){return function(t,e,n){var i=-1,r=t.criteria,s=e.criteria,o=r.length,a=n.length;for(;++i<o;){var l=Ar(r[i],s[i]);if(l)return i>=a?l:l*("desc"==n[i]?-1:1)}return t.index-e.index}(t,e,n)})}function Xi(t,e,n){for(var i=-1,r=e.length,s={};++i<r;){var o=e[i],a=Si(t,o);n(a,o)&&tr(s,xr(o,t),a)}return s}function Yi(t,e,n,i){var r=i?We:Ge,s=-1,o=e.length,a=t;for(t===e&&(e=Lr(e)),n&&(a=Ne(t,Qe(n)));++s<o;)for(var l=0,c=e[s],h=n?n(c):c;(l=r(a,h,l,i))>-1;)a!==t&&Jt.call(a,l,1),Jt.call(t,l,1);return t}function qi(t,e){for(var n=t?e.length:0,i=n-1;n--;){var r=e[n];if(n==i||r!==s){var s=r;ys(r)?Jt.call(t,r,1):dr(t,r)}}return t}function Zi(t,e){return t+ge(wn()*(e-t+1))}function Ji(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Ki(t,e){return Is(As(t,e,rl),t+"")}function $i(t){return $n(Ha(t))}function Qi(t,e){var n=Ha(t);return Ns(n,li(e,0,n.length))}function tr(t,e,n,i){if(!ea(t))return t;for(var s=-1,o=(e=xr(e,t)).length,a=o-1,l=t;null!=l&&++s<o;){var c=ks(e[s]),h=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(s!=a){var u=l[c];(h=i?i(u,c,l):r)===r&&(h=ea(u)?u:ys(e[s+1])?[]:{})}ni(l,c,h),l=l[c]}return t}var er=Pn?function(t,e){return Pn.set(t,e),t}:rl,nr=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:el(e),writable:!0})}:rl;function ir(t){return Ns(Ha(t))}function rr(t,e,n){var r=-1,s=t.length;e<0&&(e=-e>s?0:s+e),(n=n>s?s:n)<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var o=i(s);++r<s;)o[r]=t[r+e];return o}function sr(t,e){var n;return pi(t,function(t,i,r){return!(n=e(t,i,r))}),!!n}function or(t,e,n){var i=0,r=null==t?i:t.length;if("number"==typeof e&&e==e&&r<=2147483647){for(;i<r;){var s=i+r>>>1,o=t[s];null!==o&&!ca(o)&&(n?o<=e:o<e)?i=s+1:r=s}return r}return ar(t,e,rl,n)}function ar(t,e,n,i){var s=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!=e,l=null===e,c=ca(e),h=e===r;s<o;){var u=ge((s+o)/2),d=n(t[u]),p=d!==r,f=null===d,m=d==d,g=ca(d);if(a)var v=i||m;else v=h?m&&(i||p):l?m&&p&&(i||!f):c?m&&p&&!f&&(i||!g):!f&&!g&&(i?d<=e:d<e);v?s=u+1:o=u}return xn(o,4294967294)}function lr(t,e){for(var n=-1,i=t.length,r=0,s=[];++n<i;){var o=t[n],a=e?e(o):o;if(!n||!Ho(a,l)){var l=a;s[r++]=0===o?0:o}}return s}function cr(t){return"number"==typeof t?t:ca(t)?m:+t}function hr(t){if("string"==typeof t)return t;if(jo(t))return Ne(t,hr)+"";if(ca(t))return Bn?Bn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ur(t,e,n){var i=-1,r=De,s=t.length,o=!0,a=[],l=a;if(n)o=!1,r=Oe;else if(s>=200){var c=e?null:Jr(t);if(c)return dn(c);o=!1,r=en,l=new Zn}else l=e?[]:a;t:for(;++i<s;){var h=t[i],u=e?e(h):h;if(h=n||0!==h?h:0,o&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue t;e&&l.push(u),a.push(h)}else r(l,u,n)||(l!==a&&l.push(u),a.push(h))}return a}function dr(t,e){var n=-1,i=(e=xr(e,t)).length;if(!i)return!0;for(;++n<i;){var r=ks(e[n]);if("__proto__"===r&&!Ut.call(t,"__proto__"))return!1;if(("constructor"===r||"prototype"===r)&&n<i-1)return!1}var s=Cs(t,e);return null==s||delete s[ks(Js(e))]}function pr(t,e,n,i){return tr(t,e,n(Si(t,e)),i)}function fr(t,e,n,i){for(var r=t.length,s=i?r:-1;(i?s--:++s<r)&&e(t[s],s,t););return n?rr(t,i?0:s,i?s+1:r):rr(t,i?s+1:0,i?r:s)}function mr(t,e){var n=t;return n instanceof jn&&(n=n.value()),ke(e,function(t,e){return e.func.apply(e.thisArg,Ue([t],e.args))},n)}function gr(t,e,n){var r=t.length;if(r<2)return r?ur(t[0]):[];for(var s=-1,o=i(r);++s<r;)for(var a=t[s],l=-1;++l<r;)l!=s&&(o[s]=di(o[s]||a,t[l],e,n));return ur(_i(o,1),e,n)}function vr(t,e,n){for(var i=-1,s=t.length,o=e.length,a={};++i<s;){var l=i<o?e[i]:r;n(a,t[i],l)}return a}function _r(t){return qo(t)?t:[]}function yr(t){return"function"==typeof t?t:rl}function xr(t,e){return jo(t)?t:bs(t,e)?[t]:Us(ya(t))}var br=Ki;function Mr(t,e,n){var i=t.length;return n=n===r?i:n,!e&&n>=i?t:rr(t,e,n)}var wr=re||function(t){return me.clearTimeout(t)};function Sr(t,e){if(e)return t.slice();var n=t.length,i=Xt?Xt(n):new t.constructor(n);return t.copy(i),i}function Tr(t){var e=new t.constructor(t.byteLength);return new jt(e).set(new jt(t)),e}function Er(t,e){var n=e?Tr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ar(t,e){if(t!==e){var n=t!==r,i=null===t,s=t==t,o=ca(t),a=e!==r,l=null===e,c=e==e,h=ca(e);if(!l&&!h&&!o&&t>e||o&&a&&c&&!l&&!h||i&&a&&c||!n&&c||!s)return 1;if(!i&&!o&&!h&&t<e||h&&n&&s&&!i&&!o||l&&n&&s||!a&&s||!c)return-1}return 0}function Cr(t,e,n,r){for(var s=-1,o=t.length,a=n.length,l=-1,c=e.length,h=yn(o-a,0),u=i(c+h),d=!r;++l<c;)u[l]=e[l];for(;++s<a;)(d||s<o)&&(u[n[s]]=t[s]);for(;h--;)u[l++]=t[s++];return u}function Rr(t,e,n,r){for(var s=-1,o=t.length,a=-1,l=n.length,c=-1,h=e.length,u=yn(o-l,0),d=i(u+h),p=!r;++s<u;)d[s]=t[s];for(var f=s;++c<h;)d[f+c]=e[c];for(;++a<l;)(p||s<o)&&(d[f+n[a]]=t[s++]);return d}function Lr(t,e){var n=-1,r=t.length;for(e||(e=i(r));++n<r;)e[n]=t[n];return e}function Pr(t,e,n,i){var s=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var l=e[o],c=i?i(n[l],t[l],l,n,t):r;c===r&&(c=t[l]),s?oi(n,l,c):ni(n,l,c)}return n}function Ir(t,e){return function(n,i){var r=jo(n)?Ce:ri,s=e?e():{};return r(n,t,cs(i,2),s)}}function Dr(t){return Ki(function(e,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=t.length>3&&"function"==typeof o?(s--,o):r,a&&xs(n[0],n[1],a)&&(o=s<3?r:o,s=1),e=At(e);++i<s;){var l=n[i];l&&t(e,l,i,o)}return e})}function Or(t,e){return function(n,i){if(null==n)return n;if(!Yo(n))return t(n,i);for(var r=n.length,s=e?r:-1,o=At(n);(e?s--:++s<r)&&!1!==i(o[s],s,o););return n}}function Nr(t){return function(e,n,i){for(var r=-1,s=At(e),o=i(e),a=o.length;a--;){var l=o[t?a:++r];if(!1===n(s[l],l,s))break}return e}}function Ur(t){return function(e){var n=ln(e=ya(e))?mn(e):r,i=n?n[0]:e.charAt(0),s=n?Mr(n,1).join(""):e.slice(1);return i[t]()+s}}function kr(t){return function(e){return ke($a(Wa(e).replace(te,"")),t,"")}}function Fr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),i=t.apply(n,e);return ea(i)?i:n}}function zr(t){return function(e,n,i){var s=At(e);if(!Yo(e)){var o=cs(n,3);e=Ia(e),n=function(t){return o(s[t],t,s)}}var a=t(e,n,i);return a>-1?s[o?e[a]:a]:r}}function Br(t){return is(function(e){var n=e.length,i=n,o=Wn.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new Lt(s);if(o&&!l&&"wrapper"==as(a))var l=new Wn([],!0)}for(i=l?i:n;++i<n;){var c=as(a=e[i]),h="wrapper"==c?os(a):r;l=h&&Ms(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?l[as(h[0])].apply(l,h[3]):1==a.length&&Ms(a)?l[c]():l.thru(a)}return function(){var t=arguments,i=t[0];if(l&&1==t.length&&jo(i))return l.plant(i).value();for(var r=0,s=n?e[r].apply(this,t):i;++r<n;)s=e[r].call(this,s);return s}})}function Hr(t,e,n,s,o,a,l,c,h,d){var p=e&u,f=1&e,m=2&e,g=24&e,v=512&e,_=m?r:Fr(t);return function u(){for(var y=arguments.length,x=i(y),b=y;b--;)x[b]=arguments[b];if(g)var M=ls(u),w=function(t,e){for(var n=t.length,i=0;n--;)t[n]===e&&++i;return i}(x,M);if(s&&(x=Cr(x,s,o,g)),a&&(x=Rr(x,a,l,g)),y-=w,g&&y<d){var S=un(x,M);return qr(t,e,Hr,u.placeholder,n,x,S,c,h,d-y)}var T=f?n:this,E=m?T[t]:t;return y=x.length,c?x=function(t,e){var n=t.length,i=xn(e.length,n),s=Lr(t);for(;i--;){var o=e[i];t[i]=ys(o,n)?s[o]:r}return t}(x,c):v&&y>1&&x.reverse(),p&&h<y&&(x.length=h),this&&this!==me&&this instanceof u&&(E=_||Fr(E)),E.apply(T,x)}}function Vr(t,e){return function(n,i){return function(t,e,n,i){return bi(t,function(t,r,s){e(i,n(t),r,s)}),i}(n,t,e(i),{})}}function Gr(t,e){return function(n,i){var s;if(n===r&&i===r)return e;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=hr(n),i=hr(i)):(n=cr(n),i=cr(i)),s=t(n,i)}return s}}function Wr(t){return is(function(e){return e=Ne(e,Qe(cs())),Ki(function(n){var i=this;return t(e,function(t){return Ae(t,i,n)})})})}function jr(t,e){var n=(e=e===r?" ":hr(e)).length;if(n<2)return n?Ji(e,t):e;var i=Ji(e,fe(t/fn(e)));return ln(e)?Mr(mn(i),0,t).join(""):i.slice(0,t)}function Xr(t){return function(e,n,s){return s&&"number"!=typeof s&&xs(e,n,s)&&(n=s=r),e=fa(e),n===r?(n=e,e=0):n=fa(n),function(t,e,n,r){for(var s=-1,o=yn(fe((e-t)/(n||1)),0),a=i(o);o--;)a[r?o:++s]=t,t+=n;return a}(e,n,s=s===r?e<n?1:-1:fa(s),t)}}function Yr(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=va(e),n=va(n)),t(e,n)}}function qr(t,e,n,i,s,o,a,l,u,d){var p=8&e;e|=p?c:h,4&(e&=~(p?h:c))||(e&=-4);var f=[t,e,s,p?o:r,p?a:r,p?r:o,p?r:a,l,u,d],m=n.apply(r,f);return Ms(t)&&Ls(m,f),m.placeholder=i,Ds(m,t,e)}function Zr(t){var e=Et[t];return function(t,n){if(t=va(t),(n=null==n?0:xn(ma(n),292))&&xe(t)){var i=(ya(t)+"e").split("e");return+((i=(ya(e(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return e(t)}}var Jr=Cn&&1/dn(new Cn([,-0]))[1]==p?function(t){return new Cn(t)}:cl;function Kr(t){return function(e){var n=ms(e);return n==T?cn(e):n==L?pn(e):function(t,e){return Ne(e,function(e){return[e,t[e]]})}(e,t(e))}}function $r(t,e,n,o,p,f,m,g){var v=2&e;if(!v&&"function"!=typeof t)throw new Lt(s);var _=o?o.length:0;if(_||(e&=-97,o=p=r),m=m===r?m:yn(ma(m),0),g=g===r?g:ma(g),_-=p?p.length:0,e&h){var y=o,x=p;o=p=r}var b=v?r:os(t),M=[t,e,n,o,p,y,x,f,m,g];if(b&&function(t,e){var n=t[1],i=e[1],r=n|i,s=r<131,o=i==u&&8==n||i==u&&n==d&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==n;if(!s&&!o)return t;1&i&&(t[2]=e[2],r|=1&n?0:4);var l=e[3];if(l){var c=t[3];t[3]=c?Cr(c,l,e[4]):l,t[4]=c?un(t[3],a):e[4]}(l=e[5])&&(c=t[5],t[5]=c?Rr(c,l,e[6]):l,t[6]=c?un(t[5],a):e[6]);(l=e[7])&&(t[7]=l);i&u&&(t[8]=null==t[8]?e[8]:xn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=r}(M,b),t=M[0],e=M[1],n=M[2],o=M[3],p=M[4],!(g=M[9]=M[9]===r?v?0:t.length:yn(M[9]-_,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||e==l?function(t,e,n){var s=Fr(t);return function o(){for(var a=arguments.length,l=i(a),c=a,h=ls(o);c--;)l[c]=arguments[c];var u=a<3&&l[0]!==h&&l[a-1]!==h?[]:un(l,h);return(a-=u.length)<n?qr(t,e,Hr,o.placeholder,r,l,u,r,r,n-a):Ae(this&&this!==me&&this instanceof o?s:t,this,l)}}(t,e,g):e!=c&&33!=e||p.length?Hr.apply(r,M):function(t,e,n,r){var s=1&e,o=Fr(t);return function e(){for(var a=-1,l=arguments.length,c=-1,h=r.length,u=i(h+l),d=this&&this!==me&&this instanceof e?o:t;++c<h;)u[c]=r[c];for(;l--;)u[c++]=arguments[++a];return Ae(d,s?n:this,u)}}(t,e,n,o);else var w=function(t,e,n){var i=1&e,r=Fr(t);return function e(){return(this&&this!==me&&this instanceof e?r:t).apply(i?n:this,arguments)}}(t,e,n);return Ds((b?er:Ls)(w,M),t,e)}function Qr(t,e,n,i){return t===r||Ho(t,Dt[n])&&!Ut.call(i,n)?e:t}function ts(t,e,n,i,s,o){return ea(t)&&ea(e)&&(o.set(e,t),Gi(t,e,r,ts,o),o.delete(e)),t}function es(t){return sa(t)?r:t}function ns(t,e,n,i,s,o){var a=1&n,l=t.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var h=o.get(t),u=o.get(e);if(h&&u)return h==e&&u==t;var d=-1,p=!0,f=2&n?new Zn:r;for(o.set(t,e),o.set(e,t);++d<l;){var m=t[d],g=e[d];if(i)var v=a?i(g,m,d,e,t,o):i(m,g,d,t,e,o);if(v!==r){if(v)continue;p=!1;break}if(f){if(!ze(e,function(t,e){if(!en(f,e)&&(m===t||s(m,t,n,i,o)))return f.push(e)})){p=!1;break}}else if(m!==g&&!s(m,g,n,i,o)){p=!1;break}}return o.delete(t),o.delete(e),p}function is(t){return Is(As(t,r,js),t+"")}function rs(t){return Ti(t,Ia,ps)}function ss(t){return Ti(t,Da,fs)}var os=Pn?function(t){return Pn.get(t)}:cl;function as(t){for(var e=t.name+"",n=In[e],i=Ut.call(In,e)?n.length:0;i--;){var r=n[i],s=r.func;if(null==s||s==t)return r.name}return e}function ls(t){return(Ut.call(Hn,"placeholder")?Hn:t).placeholder}function cs(){var t=Hn.iteratee||sl;return t=t===sl?Ui:t,arguments.length?t(arguments[0],arguments[1]):t}function hs(t,e){var n,i,r=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function us(t){for(var e=Ia(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,Ts(r)]}return e}function ds(t,e){var n=function(t,e){return null==t?r:t[e]}(t,e);return Ni(n)?n:r}var ps=ve?function(t){return null==t?[]:(t=At(t),Ie(ve(t),function(e){return Zt.call(t,e)}))}:gl,fs=ve?function(t){for(var e=[];t;)Ue(e,ps(t)),t=Yt(t);return e}:gl,ms=Ei;function gs(t,e,n){for(var i=-1,r=(e=xr(e,t)).length,s=!1;++i<r;){var o=ks(e[i]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++i!=r?s:!!(r=null==t?0:t.length)&&ta(r)&&ys(o,r)&&(jo(t)||Wo(t))}function vs(t){return"function"!=typeof t.constructor||Ss(t)?{}:Vn(Yt(t))}function _s(t){return jo(t)||Wo(t)||!!(Kt&&t&&t[Kt])}function ys(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&&xt.test(t))&&t>-1&&t%1==0&&t<e}function xs(t,e,n){if(!ea(n))return!1;var i=typeof e;return!!("number"==i?Yo(n)&&ys(e,n.length):"string"==i&&e in n)&&Ho(n[e],t)}function bs(t,e){if(jo(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ca(t))||(nt.test(t)||!et.test(t)||null!=e&&t in At(e))}function Ms(t){var e=as(t),n=Hn[e];if("function"!=typeof n||!(e in jn.prototype))return!1;if(t===n)return!0;var i=os(n);return!!i&&t===i[0]}(Tn&&ms(new Tn(new ArrayBuffer(1)))!=N||En&&ms(new En)!=T||An&&ms(An.resolve())!=C||Cn&&ms(new Cn)!=L||Rn&&ms(new Rn)!=D)&&(ms=function(t){var e=Ei(t),n=e==A?t.constructor:r,i=n?Fs(n):"";if(i)switch(i){case Dn:return N;case On:return T;case Nn:return C;case Un:return L;case kn:return D}return e});var ws=Ot?$o:vl;function Ss(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Dt)}function Ts(t){return t==t&&!ea(t)}function Es(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==r||t in At(n)))}}function As(t,e,n){return e=yn(e===r?t.length-1:e,0),function(){for(var r=arguments,s=-1,o=yn(r.length-e,0),a=i(o);++s<o;)a[s]=r[e+s];s=-1;for(var l=i(e+1);++s<e;)l[s]=r[s];return l[e]=n(a),Ae(t,this,l)}}function Cs(t,e){return e.length<2?t:Si(t,rr(e,0,-1))}function Rs(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ls=Os(er),Ps=pe||function(t,e){return me.setTimeout(t,e)},Is=Os(nr);function Ds(t,e,n){var i=e+"";return Is(t,function(t,e){var n=e.length;if(!n)return t;var i=n-1;return e[i]=(n>1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(lt,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return Re(v,function(n){var i="_."+n[0];e&n[1]&&!De(t,i)&&t.push(i)}),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(ht):[]}(i),n)))}function Os(t){var e=0,n=0;return function(){var i=bn(),s=16-(i-n);if(n=i,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(r,arguments)}}function Ns(t,e){var n=-1,i=t.length,s=i-1;for(e=e===r?i:e;++n<e;){var o=Zi(n,s),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var Us=function(t){var e=No(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(it,function(t,n,i,r){e.push(i?r.replace(pt,"$1"):n||t)}),e});function ks(t){if("string"==typeof t||ca(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fs(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function zs(t){if(t instanceof jn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=Lr(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Bs=Ki(function(t,e){return qo(t)?di(t,_i(e,1,qo,!0)):[]}),Hs=Ki(function(t,e){var n=Js(e);return qo(n)&&(n=r),qo(t)?di(t,_i(e,1,qo,!0),cs(n,2)):[]}),Vs=Ki(function(t,e){var n=Js(e);return qo(n)&&(n=r),qo(t)?di(t,_i(e,1,qo,!0),r,n):[]});function Gs(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=yn(i+r,0)),Ve(t,cs(e,3),r)}function Ws(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var s=i-1;return n!==r&&(s=ma(n),s=n<0?yn(i+s,0):xn(s,i-1)),Ve(t,cs(e,3),s,!0)}function js(t){return(null==t?0:t.length)?_i(t,1):[]}function Xs(t){return t&&t.length?t[0]:r}var Ys=Ki(function(t){var e=Ne(t,_r);return e.length&&e[0]===t[0]?Li(e):[]}),qs=Ki(function(t){var e=Js(t),n=Ne(t,_r);return e===Js(n)?e=r:n.pop(),n.length&&n[0]===t[0]?Li(n,cs(e,2)):[]}),Zs=Ki(function(t){var e=Js(t),n=Ne(t,_r);return(e="function"==typeof e?e:r)&&n.pop(),n.length&&n[0]===t[0]?Li(n,r,e):[]});function Js(t){var e=null==t?0:t.length;return e?t[e-1]:r}var Ks=Ki($s);function $s(t,e){return t&&t.length&&e&&e.length?Yi(t,e):t}var Qs=is(function(t,e){var n=null==t?0:t.length,i=ai(t,e);return qi(t,Ne(e,function(t){return ys(t,n)?+t:t}).sort(Ar)),i});function to(t){return null==t?t:Sn.call(t)}var eo=Ki(function(t){return ur(_i(t,1,qo,!0))}),no=Ki(function(t){var e=Js(t);return qo(e)&&(e=r),ur(_i(t,1,qo,!0),cs(e,2))}),io=Ki(function(t){var e=Js(t);return e="function"==typeof e?e:r,ur(_i(t,1,qo,!0),r,e)});function ro(t){if(!t||!t.length)return[];var e=0;return t=Ie(t,function(t){if(qo(t))return e=yn(t.length,e),!0}),Ke(e,function(e){return Ne(t,Ye(e))})}function so(t,e){if(!t||!t.length)return[];var n=ro(t);return null==e?n:Ne(n,function(t){return Ae(e,r,t)})}var oo=Ki(function(t,e){return qo(t)?di(t,e):[]}),ao=Ki(function(t){return gr(Ie(t,qo))}),lo=Ki(function(t){var e=Js(t);return qo(e)&&(e=r),gr(Ie(t,qo),cs(e,2))}),co=Ki(function(t){var e=Js(t);return e="function"==typeof e?e:r,gr(Ie(t,qo),r,e)}),ho=Ki(ro);var uo=Ki(function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,so(t,n)});function po(t){var e=Hn(t);return e.__chain__=!0,e}function fo(t,e){return e(t)}var mo=is(function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,s=function(e){return ai(e,t)};return!(e>1||this.__actions__.length)&&i instanceof jn&&ys(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:fo,args:[s],thisArg:r}),new Wn(i,this.__chain__).thru(function(t){return e&&!t.length&&t.push(r),t})):this.thru(s)});var go=Ir(function(t,e,n){Ut.call(t,n)?++t[n]:oi(t,n,1)});var vo=zr(Gs),_o=zr(Ws);function yo(t,e){return(jo(t)?Re:pi)(t,cs(e,3))}function xo(t,e){return(jo(t)?Le:fi)(t,cs(e,3))}var bo=Ir(function(t,e,n){Ut.call(t,n)?t[n].push(e):oi(t,n,[e])});var Mo=Ki(function(t,e,n){var r=-1,s="function"==typeof e,o=Yo(t)?i(t.length):[];return pi(t,function(t){o[++r]=s?Ae(e,t,n):Pi(t,e,n)}),o}),wo=Ir(function(t,e,n){oi(t,n,e)});function So(t,e){return(jo(t)?Ne:Bi)(t,cs(e,3))}var To=Ir(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Eo=Ki(function(t,e){if(null==t)return[];var n=e.length;return n>1&&xs(t,e[0],e[1])?e=[]:n>2&&xs(e[0],e[1],e[2])&&(e=[e[0]]),ji(t,_i(e,1),[])}),Ao=he||function(){return me.Date.now()};function Co(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,$r(t,u,r,r,r,r,e)}function Ro(t,e){var n;if("function"!=typeof e)throw new Lt(s);return t=ma(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var Lo=Ki(function(t,e,n){var i=1;if(n.length){var r=un(n,ls(Lo));i|=c}return $r(t,i,e,n,r)}),Po=Ki(function(t,e,n){var i=3;if(n.length){var r=un(n,ls(Po));i|=c}return $r(e,i,t,n,r)});function Io(t,e,n){var i,o,a,l,c,h,u=0,d=!1,p=!1,f=!0;if("function"!=typeof t)throw new Lt(s);function m(e){var n=i,s=o;return i=o=r,u=e,l=t.apply(s,n)}function g(t){var n=t-h;return h===r||n>=e||n<0||p&&t-u>=a}function v(){var t=Ao();if(g(t))return _(t);c=Ps(v,function(t){var n=e-(t-h);return p?xn(n,a-(t-u)):n}(t))}function _(t){return c=r,f&&i?m(t):(i=o=r,l)}function y(){var t=Ao(),n=g(t);if(i=arguments,o=this,h=t,n){if(c===r)return function(t){return u=t,c=Ps(v,e),d?m(t):l}(h);if(p)return wr(c),c=Ps(v,e),m(h)}return c===r&&(c=Ps(v,e)),l}return e=va(e)||0,ea(n)&&(d=!!n.leading,a=(p="maxWait"in n)?yn(va(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){c!==r&&wr(c),u=0,i=h=o=c=r},y.flush=function(){return c===r?l:_(Ao())},y}var Do=Ki(function(t,e){return ui(t,1,e)}),Oo=Ki(function(t,e,n){return ui(t,va(e)||0,n)});function No(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Lt(s);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=t.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(No.Cache||qn),n}function Uo(t){if("function"!=typeof t)throw new Lt(s);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}No.Cache=qn;var ko=br(function(t,e){var n=(e=1==e.length&&jo(e[0])?Ne(e[0],Qe(cs())):Ne(_i(e,1),Qe(cs()))).length;return Ki(function(i){for(var r=-1,s=xn(i.length,n);++r<s;)i[r]=e[r].call(this,i[r]);return Ae(t,this,i)})}),Fo=Ki(function(t,e){var n=un(e,ls(Fo));return $r(t,c,r,e,n)}),zo=Ki(function(t,e){var n=un(e,ls(zo));return $r(t,h,r,e,n)}),Bo=is(function(t,e){return $r(t,d,r,r,r,e)});function Ho(t,e){return t===e||t!=t&&e!=e}var Vo=Yr(Ai),Go=Yr(function(t,e){return t>=e}),Wo=Ii(function(){return arguments}())?Ii:function(t){return na(t)&&Ut.call(t,"callee")&&!Zt.call(t,"callee")},jo=i.isArray,Xo=be?Qe(be):function(t){return na(t)&&Ei(t)==O};function Yo(t){return null!=t&&ta(t.length)&&!$o(t)}function qo(t){return na(t)&&Yo(t)}var Zo=ye||vl,Jo=Me?Qe(Me):function(t){return na(t)&&Ei(t)==b};function Ko(t){if(!na(t))return!1;var e=Ei(t);return e==M||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!sa(t)}function $o(t){if(!ea(t))return!1;var e=Ei(t);return e==w||e==S||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qo(t){return"number"==typeof t&&t==ma(t)}function ta(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function ea(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function na(t){return null!=t&&"object"==typeof t}var ia=we?Qe(we):function(t){return na(t)&&ms(t)==T};function ra(t){return"number"==typeof t||na(t)&&Ei(t)==E}function sa(t){if(!na(t)||Ei(t)!=A)return!1;var e=Yt(t);if(null===e)return!0;var n=Ut.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==Bt}var oa=Se?Qe(Se):function(t){return na(t)&&Ei(t)==R};var aa=Te?Qe(Te):function(t){return na(t)&&ms(t)==L};function la(t){return"string"==typeof t||!jo(t)&&na(t)&&Ei(t)==P}function ca(t){return"symbol"==typeof t||na(t)&&Ei(t)==I}var ha=Ee?Qe(Ee):function(t){return na(t)&&ta(t.length)&&!!le[Ei(t)]};var ua=Yr(zi),da=Yr(function(t,e){return t<=e});function pa(t){if(!t)return[];if(Yo(t))return la(t)?mn(t):Lr(t);if($t&&t[$t])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[$t]());var e=ms(t);return(e==T?cn:e==L?dn:Ha)(t)}function fa(t){return t?(t=va(t))===p||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ma(t){var e=fa(t),n=e%1;return e==e?n?e-n:e:0}function ga(t){return t?li(ma(t),0,g):0}function va(t){if("number"==typeof t)return t;if(ca(t))return m;if(ea(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ea(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=$e(t);var n=vt.test(t);return n||yt.test(t)?de(t.slice(2),n?2:8):gt.test(t)?m:+t}function _a(t){return Pr(t,Da(t))}function ya(t){return null==t?"":hr(t)}var xa=Dr(function(t,e){if(Ss(e)||Yo(e))Pr(e,Ia(e),t);else for(var n in e)Ut.call(e,n)&&ni(t,n,e[n])}),ba=Dr(function(t,e){Pr(e,Da(e),t)}),Ma=Dr(function(t,e,n,i){Pr(e,Da(e),t,i)}),wa=Dr(function(t,e,n,i){Pr(e,Ia(e),t,i)}),Sa=is(ai);var Ta=Ki(function(t,e){t=At(t);var n=-1,i=e.length,s=i>2?e[2]:r;for(s&&xs(e[0],e[1],s)&&(i=1);++n<i;)for(var o=e[n],a=Da(o),l=-1,c=a.length;++l<c;){var h=a[l],u=t[h];(u===r||Ho(u,Dt[h])&&!Ut.call(t,h))&&(t[h]=o[h])}return t}),Ea=Ki(function(t){return t.push(r,ts),Ae(Na,r,t)});function Aa(t,e,n){var i=null==t?r:Si(t,e);return i===r?n:i}function Ca(t,e){return null!=t&&gs(t,e,Ri)}var Ra=Vr(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=zt.call(e)),t[e]=n},el(rl)),La=Vr(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=zt.call(e)),Ut.call(t,e)?t[e].push(n):t[e]=[n]},cs),Pa=Ki(Pi);function Ia(t){return Yo(t)?Kn(t):ki(t)}function Da(t){return Yo(t)?Kn(t,!0):Fi(t)}var Oa=Dr(function(t,e,n){Gi(t,e,n)}),Na=Dr(function(t,e,n,i){Gi(t,e,n,i)}),Ua=is(function(t,e){var n={};if(null==t)return n;var i=!1;e=Ne(e,function(e){return e=xr(e,t),i||(i=e.length>1),e}),Pr(t,ss(t),n),i&&(n=ci(n,7,es));for(var r=e.length;r--;)dr(n,e[r]);return n});var ka=is(function(t,e){return null==t?{}:function(t,e){return Xi(t,e,function(e,n){return Ca(t,n)})}(t,e)});function Fa(t,e){if(null==t)return{};var n=Ne(ss(t),function(t){return[t]});return e=cs(e),Xi(t,n,function(t,n){return e(t,n[0])})}var za=Kr(Ia),Ba=Kr(Da);function Ha(t){return null==t?[]:tn(t,Ia(t))}var Va=kr(function(t,e,n){return e=e.toLowerCase(),t+(n?Ga(e):e)});function Ga(t){return Ka(ya(t).toLowerCase())}function Wa(t){return(t=ya(t))&&t.replace(bt,sn).replace(ee,"")}var ja=kr(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Xa=kr(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Ya=Ur("toLowerCase");var qa=kr(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var Za=kr(function(t,e,n){return t+(n?" ":"")+Ka(e)});var Ja=kr(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ka=Ur("toUpperCase");function $a(t,e,n){return t=ya(t),(e=n?r:e)===r?function(t){return se.test(t)}(t)?function(t){return t.match(ie)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Qa=Ki(function(t,e){try{return Ae(t,r,e)}catch(t){return Ko(t)?t:new St(t)}}),tl=is(function(t,e){return Re(e,function(e){e=ks(e),oi(t,e,Lo(t[e],t))}),t});function el(t){return function(){return t}}var nl=Br(),il=Br(!0);function rl(t){return t}function sl(t){return Ui("function"==typeof t?t:ci(t,1))}var ol=Ki(function(t,e){return function(n){return Pi(n,t,e)}}),al=Ki(function(t,e){return function(n){return Pi(t,n,e)}});function ll(t,e,n){var i=Ia(e),r=wi(e,i);null!=n||ea(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=wi(e,Ia(e)));var s=!(ea(n)&&"chain"in n&&!n.chain),o=$o(t);return Re(r,function(n){var i=e[n];t[n]=i,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Lr(this.__actions__)).push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,Ue([this.value()],arguments))})}),t}function cl(){}var hl=Wr(Ne),ul=Wr(Pe),dl=Wr(ze);function pl(t){return bs(t)?Ye(ks(t)):function(t){return function(e){return Si(e,t)}}(t)}var fl=Xr(),ml=Xr(!0);function gl(){return[]}function vl(){return!1}var _l=Gr(function(t,e){return t+e},0),yl=Zr("ceil"),xl=Gr(function(t,e){return t/e},1),bl=Zr("floor");var Ml,wl=Gr(function(t,e){return t*e},1),Sl=Zr("round"),Tl=Gr(function(t,e){return t-e},0);return Hn.after=function(t,e){if("function"!=typeof e)throw new Lt(s);return t=ma(t),function(){if(--t<1)return e.apply(this,arguments)}},Hn.ary=Co,Hn.assign=xa,Hn.assignIn=ba,Hn.assignInWith=Ma,Hn.assignWith=wa,Hn.at=Sa,Hn.before=Ro,Hn.bind=Lo,Hn.bindAll=tl,Hn.bindKey=Po,Hn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return jo(t)?t:[t]},Hn.chain=po,Hn.chunk=function(t,e,n){e=(n?xs(t,e,n):e===r)?1:yn(ma(e),0);var s=null==t?0:t.length;if(!s||e<1)return[];for(var o=0,a=0,l=i(fe(s/e));o<s;)l[a++]=rr(t,o,o+=e);return l},Hn.compact=function(t){for(var e=-1,n=null==t?0:t.length,i=0,r=[];++e<n;){var s=t[e];s&&(r[i++]=s)}return r},Hn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=i(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Ue(jo(n)?Lr(n):[n],_i(e,1))},Hn.cond=function(t){var e=null==t?0:t.length,n=cs();return t=e?Ne(t,function(t){if("function"!=typeof t[1])throw new Lt(s);return[n(t[0]),t[1]]}):[],Ki(function(n){for(var i=-1;++i<e;){var r=t[i];if(Ae(r[0],this,n))return Ae(r[1],this,n)}})},Hn.conforms=function(t){return function(t){var e=Ia(t);return function(n){return hi(n,t,e)}}(ci(t,1))},Hn.constant=el,Hn.countBy=go,Hn.create=function(t,e){var n=Vn(t);return null==e?n:si(n,e)},Hn.curry=function t(e,n,i){var s=$r(e,8,r,r,r,r,r,n=i?r:n);return s.placeholder=t.placeholder,s},Hn.curryRight=function t(e,n,i){var s=$r(e,l,r,r,r,r,r,n=i?r:n);return s.placeholder=t.placeholder,s},Hn.debounce=Io,Hn.defaults=Ta,Hn.defaultsDeep=Ea,Hn.defer=Do,Hn.delay=Oo,Hn.difference=Bs,Hn.differenceBy=Hs,Hn.differenceWith=Vs,Hn.drop=function(t,e,n){var i=null==t?0:t.length;return i?rr(t,(e=n||e===r?1:ma(e))<0?0:e,i):[]},Hn.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?rr(t,0,(e=i-(e=n||e===r?1:ma(e)))<0?0:e):[]},Hn.dropRightWhile=function(t,e){return t&&t.length?fr(t,cs(e,3),!0,!0):[]},Hn.dropWhile=function(t,e){return t&&t.length?fr(t,cs(e,3),!0):[]},Hn.fill=function(t,e,n,i){var s=null==t?0:t.length;return s?(n&&"number"!=typeof n&&xs(t,e,n)&&(n=0,i=s),function(t,e,n,i){var s=t.length;for((n=ma(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:ma(i))<0&&(i+=s),i=n>i?0:ga(i);n<i;)t[n++]=e;return t}(t,e,n,i)):[]},Hn.filter=function(t,e){return(jo(t)?Ie:vi)(t,cs(e,3))},Hn.flatMap=function(t,e){return _i(So(t,e),1)},Hn.flatMapDeep=function(t,e){return _i(So(t,e),p)},Hn.flatMapDepth=function(t,e,n){return n=n===r?1:ma(n),_i(So(t,e),n)},Hn.flatten=js,Hn.flattenDeep=function(t){return(null==t?0:t.length)?_i(t,p):[]},Hn.flattenDepth=function(t,e){return(null==t?0:t.length)?_i(t,e=e===r?1:ma(e)):[]},Hn.flip=function(t){return $r(t,512)},Hn.flow=nl,Hn.flowRight=il,Hn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var r=t[e];oi(i,r[0],r[1])}return i},Hn.functions=function(t){return null==t?[]:wi(t,Ia(t))},Hn.functionsIn=function(t){return null==t?[]:wi(t,Da(t))},Hn.groupBy=bo,Hn.initial=function(t){return(null==t?0:t.length)?rr(t,0,-1):[]},Hn.intersection=Ys,Hn.intersectionBy=qs,Hn.intersectionWith=Zs,Hn.invert=Ra,Hn.invertBy=La,Hn.invokeMap=Mo,Hn.iteratee=sl,Hn.keyBy=wo,Hn.keys=Ia,Hn.keysIn=Da,Hn.map=So,Hn.mapKeys=function(t,e){var n={};return e=cs(e,3),bi(t,function(t,i,r){oi(n,e(t,i,r),t)}),n},Hn.mapValues=function(t,e){var n={};return e=cs(e,3),bi(t,function(t,i,r){oi(n,i,e(t,i,r))}),n},Hn.matches=function(t){return Hi(ci(t,1))},Hn.matchesProperty=function(t,e){return Vi(t,ci(e,1))},Hn.memoize=No,Hn.merge=Oa,Hn.mergeWith=Na,Hn.method=ol,Hn.methodOf=al,Hn.mixin=ll,Hn.negate=Uo,Hn.nthArg=function(t){return t=ma(t),Ki(function(e){return Wi(e,t)})},Hn.omit=Ua,Hn.omitBy=function(t,e){return Fa(t,Uo(cs(e)))},Hn.once=function(t){return Ro(2,t)},Hn.orderBy=function(t,e,n,i){return null==t?[]:(jo(e)||(e=null==e?[]:[e]),jo(n=i?r:n)||(n=null==n?[]:[n]),ji(t,e,n))},Hn.over=hl,Hn.overArgs=ko,Hn.overEvery=ul,Hn.overSome=dl,Hn.partial=Fo,Hn.partialRight=zo,Hn.partition=To,Hn.pick=ka,Hn.pickBy=Fa,Hn.property=pl,Hn.propertyOf=function(t){return function(e){return null==t?r:Si(t,e)}},Hn.pull=Ks,Hn.pullAll=$s,Hn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Yi(t,e,cs(n,2)):t},Hn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Yi(t,e,r,n):t},Hn.pullAt=Qs,Hn.range=fl,Hn.rangeRight=ml,Hn.rearg=Bo,Hn.reject=function(t,e){return(jo(t)?Ie:vi)(t,Uo(cs(e,3)))},Hn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var i=-1,r=[],s=t.length;for(e=cs(e,3);++i<s;){var o=t[i];e(o,i,t)&&(n.push(o),r.push(i))}return qi(t,r),n},Hn.rest=function(t,e){if("function"!=typeof t)throw new Lt(s);return Ki(t,e=e===r?e:ma(e))},Hn.reverse=to,Hn.sampleSize=function(t,e,n){return e=(n?xs(t,e,n):e===r)?1:ma(e),(jo(t)?Qn:Qi)(t,e)},Hn.set=function(t,e,n){return null==t?t:tr(t,e,n)},Hn.setWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:tr(t,e,n,i)},Hn.shuffle=function(t){return(jo(t)?ti:ir)(t)},Hn.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&xs(t,e,n)?(e=0,n=i):(e=null==e?0:ma(e),n=n===r?i:ma(n)),rr(t,e,n)):[]},Hn.sortBy=Eo,Hn.sortedUniq=function(t){return t&&t.length?lr(t):[]},Hn.sortedUniqBy=function(t,e){return t&&t.length?lr(t,cs(e,2)):[]},Hn.split=function(t,e,n){return n&&"number"!=typeof n&&xs(t,e,n)&&(e=n=r),(n=n===r?g:n>>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!oa(e))&&!(e=hr(e))&&ln(t)?Mr(mn(t),0,n):t.split(e,n):[]},Hn.spread=function(t,e){if("function"!=typeof t)throw new Lt(s);return e=null==e?0:yn(ma(e),0),Ki(function(n){var i=n[e],r=Mr(n,0,e);return i&&Ue(r,i),Ae(t,this,r)})},Hn.tail=function(t){var e=null==t?0:t.length;return e?rr(t,1,e):[]},Hn.take=function(t,e,n){return t&&t.length?rr(t,0,(e=n||e===r?1:ma(e))<0?0:e):[]},Hn.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?rr(t,(e=i-(e=n||e===r?1:ma(e)))<0?0:e,i):[]},Hn.takeRightWhile=function(t,e){return t&&t.length?fr(t,cs(e,3),!1,!0):[]},Hn.takeWhile=function(t,e){return t&&t.length?fr(t,cs(e,3)):[]},Hn.tap=function(t,e){return e(t),t},Hn.throttle=function(t,e,n){var i=!0,r=!0;if("function"!=typeof t)throw new Lt(s);return ea(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Io(t,e,{leading:i,maxWait:e,trailing:r})},Hn.thru=fo,Hn.toArray=pa,Hn.toPairs=za,Hn.toPairsIn=Ba,Hn.toPath=function(t){return jo(t)?Ne(t,ks):ca(t)?[t]:Lr(Us(ya(t)))},Hn.toPlainObject=_a,Hn.transform=function(t,e,n){var i=jo(t),r=i||Zo(t)||ha(t);if(e=cs(e,4),null==n){var s=t&&t.constructor;n=r?i?new s:[]:ea(t)&&$o(s)?Vn(Yt(t)):{}}return(r?Re:bi)(t,function(t,i,r){return e(n,t,i,r)}),n},Hn.unary=function(t){return Co(t,1)},Hn.union=eo,Hn.unionBy=no,Hn.unionWith=io,Hn.uniq=function(t){return t&&t.length?ur(t):[]},Hn.uniqBy=function(t,e){return t&&t.length?ur(t,cs(e,2)):[]},Hn.uniqWith=function(t,e){return e="function"==typeof e?e:r,t&&t.length?ur(t,r,e):[]},Hn.unset=function(t,e){return null==t||dr(t,e)},Hn.unzip=ro,Hn.unzipWith=so,Hn.update=function(t,e,n){return null==t?t:pr(t,e,yr(n))},Hn.updateWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:pr(t,e,yr(n),i)},Hn.values=Ha,Hn.valuesIn=function(t){return null==t?[]:tn(t,Da(t))},Hn.without=oo,Hn.words=$a,Hn.wrap=function(t,e){return Fo(yr(e),t)},Hn.xor=ao,Hn.xorBy=lo,Hn.xorWith=co,Hn.zip=ho,Hn.zipObject=function(t,e){return vr(t||[],e||[],ni)},Hn.zipObjectDeep=function(t,e){return vr(t||[],e||[],tr)},Hn.zipWith=uo,Hn.entries=za,Hn.entriesIn=Ba,Hn.extend=ba,Hn.extendWith=Ma,ll(Hn,Hn),Hn.add=_l,Hn.attempt=Qa,Hn.camelCase=Va,Hn.capitalize=Ga,Hn.ceil=yl,Hn.clamp=function(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=(n=va(n))==n?n:0),e!==r&&(e=(e=va(e))==e?e:0),li(va(t),e,n)},Hn.clone=function(t){return ci(t,4)},Hn.cloneDeep=function(t){return ci(t,5)},Hn.cloneDeepWith=function(t,e){return ci(t,5,e="function"==typeof e?e:r)},Hn.cloneWith=function(t,e){return ci(t,4,e="function"==typeof e?e:r)},Hn.conformsTo=function(t,e){return null==e||hi(t,e,Ia(e))},Hn.deburr=Wa,Hn.defaultTo=function(t,e){return null==t||t!=t?e:t},Hn.divide=xl,Hn.endsWith=function(t,e,n){t=ya(t),e=hr(e);var i=t.length,s=n=n===r?i:li(ma(n),0,i);return(n-=e.length)>=0&&t.slice(n,s)==e},Hn.eq=Ho,Hn.escape=function(t){return(t=ya(t))&&K.test(t)?t.replace(Z,on):t},Hn.escapeRegExp=function(t){return(t=ya(t))&&st.test(t)?t.replace(rt,"\\$&"):t},Hn.every=function(t,e,n){var i=jo(t)?Pe:mi;return n&&xs(t,e,n)&&(e=r),i(t,cs(e,3))},Hn.find=vo,Hn.findIndex=Gs,Hn.findKey=function(t,e){return He(t,cs(e,3),bi)},Hn.findLast=_o,Hn.findLastIndex=Ws,Hn.findLastKey=function(t,e){return He(t,cs(e,3),Mi)},Hn.floor=bl,Hn.forEach=yo,Hn.forEachRight=xo,Hn.forIn=function(t,e){return null==t?t:yi(t,cs(e,3),Da)},Hn.forInRight=function(t,e){return null==t?t:xi(t,cs(e,3),Da)},Hn.forOwn=function(t,e){return t&&bi(t,cs(e,3))},Hn.forOwnRight=function(t,e){return t&&Mi(t,cs(e,3))},Hn.get=Aa,Hn.gt=Vo,Hn.gte=Go,Hn.has=function(t,e){return null!=t&&gs(t,e,Ci)},Hn.hasIn=Ca,Hn.head=Xs,Hn.identity=rl,Hn.includes=function(t,e,n,i){t=Yo(t)?t:Ha(t),n=n&&!i?ma(n):0;var r=t.length;return n<0&&(n=yn(r+n,0)),la(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&Ge(t,e,n)>-1},Hn.indexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:ma(n);return r<0&&(r=yn(i+r,0)),Ge(t,e,r)},Hn.inRange=function(t,e,n){return e=fa(e),n===r?(n=e,e=0):n=fa(n),function(t,e,n){return t>=xn(e,n)&&t<yn(e,n)}(t=va(t),e,n)},Hn.invoke=Pa,Hn.isArguments=Wo,Hn.isArray=jo,Hn.isArrayBuffer=Xo,Hn.isArrayLike=Yo,Hn.isArrayLikeObject=qo,Hn.isBoolean=function(t){return!0===t||!1===t||na(t)&&Ei(t)==x},Hn.isBuffer=Zo,Hn.isDate=Jo,Hn.isElement=function(t){return na(t)&&1===t.nodeType&&!sa(t)},Hn.isEmpty=function(t){if(null==t)return!0;if(Yo(t)&&(jo(t)||"string"==typeof t||"function"==typeof t.splice||Zo(t)||ha(t)||Wo(t)))return!t.length;var e=ms(t);if(e==T||e==L)return!t.size;if(Ss(t))return!ki(t).length;for(var n in t)if(Ut.call(t,n))return!1;return!0},Hn.isEqual=function(t,e){return Di(t,e)},Hn.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:r)?n(t,e):r;return i===r?Di(t,e,r,n):!!i},Hn.isError=Ko,Hn.isFinite=function(t){return"number"==typeof t&&xe(t)},Hn.isFunction=$o,Hn.isInteger=Qo,Hn.isLength=ta,Hn.isMap=ia,Hn.isMatch=function(t,e){return t===e||Oi(t,e,us(e))},Hn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:r,Oi(t,e,us(e),n)},Hn.isNaN=function(t){return ra(t)&&t!=+t},Hn.isNative=function(t){if(ws(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ni(t)},Hn.isNil=function(t){return null==t},Hn.isNull=function(t){return null===t},Hn.isNumber=ra,Hn.isObject=ea,Hn.isObjectLike=na,Hn.isPlainObject=sa,Hn.isRegExp=oa,Hn.isSafeInteger=function(t){return Qo(t)&&t>=-9007199254740991&&t<=f},Hn.isSet=aa,Hn.isString=la,Hn.isSymbol=ca,Hn.isTypedArray=ha,Hn.isUndefined=function(t){return t===r},Hn.isWeakMap=function(t){return na(t)&&ms(t)==D},Hn.isWeakSet=function(t){return na(t)&&"[object WeakSet]"==Ei(t)},Hn.join=function(t,e){return null==t?"":Be.call(t,e)},Hn.kebabCase=ja,Hn.last=Js,Hn.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=ma(n))<0?yn(i+s,0):xn(s,i-1)),e==e?function(t,e,n){for(var i=n+1;i--;)if(t[i]===e)return i;return i}(t,e,s):Ve(t,je,s,!0)},Hn.lowerCase=Xa,Hn.lowerFirst=Ya,Hn.lt=ua,Hn.lte=da,Hn.max=function(t){return t&&t.length?gi(t,rl,Ai):r},Hn.maxBy=function(t,e){return t&&t.length?gi(t,cs(e,2),Ai):r},Hn.mean=function(t){return Xe(t,rl)},Hn.meanBy=function(t,e){return Xe(t,cs(e,2))},Hn.min=function(t){return t&&t.length?gi(t,rl,zi):r},Hn.minBy=function(t,e){return t&&t.length?gi(t,cs(e,2),zi):r},Hn.stubArray=gl,Hn.stubFalse=vl,Hn.stubObject=function(){return{}},Hn.stubString=function(){return""},Hn.stubTrue=function(){return!0},Hn.multiply=wl,Hn.nth=function(t,e){return t&&t.length?Wi(t,ma(e)):r},Hn.noConflict=function(){return me._===this&&(me._=Ht),this},Hn.noop=cl,Hn.now=Ao,Hn.pad=function(t,e,n){t=ya(t);var i=(e=ma(e))?fn(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return jr(ge(r),n)+t+jr(fe(r),n)},Hn.padEnd=function(t,e,n){t=ya(t);var i=(e=ma(e))?fn(t):0;return e&&i<e?t+jr(e-i,n):t},Hn.padStart=function(t,e,n){t=ya(t);var i=(e=ma(e))?fn(t):0;return e&&i<e?jr(e-i,n)+t:t},Hn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Mn(ya(t).replace(ot,""),e||0)},Hn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&xs(t,e,n)&&(e=n=r),n===r&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),t===r&&e===r?(t=0,e=1):(t=fa(t),e===r?(e=t,t=0):e=fa(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var s=wn();return xn(t+s*(e-t+ue("1e-"+((s+"").length-1))),e)}return Zi(t,e)},Hn.reduce=function(t,e,n){var i=jo(t)?ke:Ze,r=arguments.length<3;return i(t,cs(e,4),n,r,pi)},Hn.reduceRight=function(t,e,n){var i=jo(t)?Fe:Ze,r=arguments.length<3;return i(t,cs(e,4),n,r,fi)},Hn.repeat=function(t,e,n){return e=(n?xs(t,e,n):e===r)?1:ma(e),Ji(ya(t),e)},Hn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Hn.result=function(t,e,n){var i=-1,s=(e=xr(e,t)).length;for(s||(s=1,t=r);++i<s;){var o=null==t?r:t[ks(e[i])];o===r&&(i=s,o=n),t=$o(o)?o.call(t):o}return t},Hn.round=Sl,Hn.runInContext=t,Hn.sample=function(t){return(jo(t)?$n:$i)(t)},Hn.size=function(t){if(null==t)return 0;if(Yo(t))return la(t)?fn(t):t.length;var e=ms(t);return e==T||e==L?t.size:ki(t).length},Hn.snakeCase=qa,Hn.some=function(t,e,n){var i=jo(t)?ze:sr;return n&&xs(t,e,n)&&(e=r),i(t,cs(e,3))},Hn.sortedIndex=function(t,e){return or(t,e)},Hn.sortedIndexBy=function(t,e,n){return ar(t,e,cs(n,2))},Hn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var i=or(t,e);if(i<n&&Ho(t[i],e))return i}return-1},Hn.sortedLastIndex=function(t,e){return or(t,e,!0)},Hn.sortedLastIndexBy=function(t,e,n){return ar(t,e,cs(n,2),!0)},Hn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=or(t,e,!0)-1;if(Ho(t[n],e))return n}return-1},Hn.startCase=Za,Hn.startsWith=function(t,e,n){return t=ya(t),n=null==n?0:li(ma(n),0,t.length),e=hr(e),t.slice(n,n+e.length)==e},Hn.subtract=Tl,Hn.sum=function(t){return t&&t.length?Je(t,rl):0},Hn.sumBy=function(t,e){return t&&t.length?Je(t,cs(e,2)):0},Hn.template=function(t,e,n){var i=Hn.templateSettings;n&&xs(t,e,n)&&(e=r),t=ya(t),e=wa({},e,i,Qr);var s=wa({},e.imports,i.imports,Qr),o=Ia(s),a=tn(s,o);Re(o,function(t){if(dt.test(t))throw new St("Invalid `imports` option passed into `_.template`")});var l,c,h=0,u=e.interpolate||Mt,d="__p += '",p=Ct((e.escape||Mt).source+"|"+u.source+"|"+(u===tt?ft:Mt).source+"|"+(e.evaluate||Mt).source+"|$","g"),f="//# sourceURL="+(Ut.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ae+"]")+"\n";t.replace(p,function(e,n,i,r,s,o){return i||(i=r),d+=t.slice(h,o).replace(wt,an),n&&(l=!0,d+="' +\n__e("+n+") +\n'"),s&&(c=!0,d+="';\n"+s+";\n__p += '"),i&&(d+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),h=o+e.length,e}),d+="';\n";var m=Ut.call(e,"variable")&&e.variable;if(m){if(dt.test(m))throw new St("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(c?d.replace(j,""):d).replace(X,"$1").replace(Y,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(l?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Qa(function(){return Tt(o,f+"return "+d).apply(r,a)});if(g.source=d,Ko(g))throw g;return g},Hn.times=function(t,e){if((t=ma(t))<1||t>f)return[];var n=g,i=xn(t,g);e=cs(e),t-=g;for(var r=Ke(i,e);++n<t;)e(n);return r},Hn.toFinite=fa,Hn.toInteger=ma,Hn.toLength=ga,Hn.toLower=function(t){return ya(t).toLowerCase()},Hn.toNumber=va,Hn.toSafeInteger=function(t){return t?li(ma(t),-9007199254740991,f):0===t?t:0},Hn.toString=ya,Hn.toUpper=function(t){return ya(t).toUpperCase()},Hn.trim=function(t,e,n){if((t=ya(t))&&(n||e===r))return $e(t);if(!t||!(e=hr(e)))return t;var i=mn(t),s=mn(e);return Mr(i,nn(i,s),rn(i,s)+1).join("")},Hn.trimEnd=function(t,e,n){if((t=ya(t))&&(n||e===r))return t.slice(0,gn(t)+1);if(!t||!(e=hr(e)))return t;var i=mn(t);return Mr(i,0,rn(i,mn(e))+1).join("")},Hn.trimStart=function(t,e,n){if((t=ya(t))&&(n||e===r))return t.replace(ot,"");if(!t||!(e=hr(e)))return t;var i=mn(t);return Mr(i,nn(i,mn(e))).join("")},Hn.truncate=function(t,e){var n=30,i="...";if(ea(e)){var s="separator"in e?e.separator:s;n="length"in e?ma(e.length):n,i="omission"in e?hr(e.omission):i}var o=(t=ya(t)).length;if(ln(t)){var a=mn(t);o=a.length}if(n>=o)return t;var l=n-fn(i);if(l<1)return i;var c=a?Mr(a,0,l).join(""):t.slice(0,l);if(s===r)return c+i;if(a&&(l+=c.length-l),oa(s)){if(t.slice(l).search(s)){var h,u=c;for(s.global||(s=Ct(s.source,ya(mt.exec(s))+"g")),s.lastIndex=0;h=s.exec(u);)var d=h.index;c=c.slice(0,d===r?l:d)}}else if(t.indexOf(hr(s),l)!=l){var p=c.lastIndexOf(s);p>-1&&(c=c.slice(0,p))}return c+i},Hn.unescape=function(t){return(t=ya(t))&&J.test(t)?t.replace(q,vn):t},Hn.uniqueId=function(t){var e=++kt;return ya(t)+e},Hn.upperCase=Ja,Hn.upperFirst=Ka,Hn.each=yo,Hn.eachRight=xo,Hn.first=Xs,ll(Hn,(Ml={},bi(Hn,function(t,e){Ut.call(Hn.prototype,e)||(Ml[e]=t)}),Ml),{chain:!1}),Hn.VERSION="4.18.1",Re(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Hn[t].placeholder=Hn}),Re(["drop","take"],function(t,e){jn.prototype[t]=function(n){n=n===r?1:yn(ma(n),0);var i=this.__filtered__&&!e?new jn(this):this.clone();return i.__filtered__?i.__takeCount__=xn(n,i.__takeCount__):i.__views__.push({size:xn(n,g),type:t+(i.__dir__<0?"Right":"")}),i},jn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Re(["filter","map","takeWhile"],function(t,e){var n=e+1,i=1==n||3==n;jn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:cs(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}}),Re(["head","last"],function(t,e){var n="take"+(e?"Right":"");jn.prototype[t]=function(){return this[n](1).value()[0]}}),Re(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");jn.prototype[t]=function(){return this.__filtered__?new jn(this):this[n](1)}}),jn.prototype.compact=function(){return this.filter(rl)},jn.prototype.find=function(t){return this.filter(t).head()},jn.prototype.findLast=function(t){return this.reverse().find(t)},jn.prototype.invokeMap=Ki(function(t,e){return"function"==typeof t?new jn(this):this.map(function(n){return Pi(n,t,e)})}),jn.prototype.reject=function(t){return this.filter(Uo(cs(t)))},jn.prototype.slice=function(t,e){t=ma(t);var n=this;return n.__filtered__&&(t>0||e<0)?new jn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(n=(e=ma(e))<0?n.dropRight(-e):n.take(e-t)),n)},jn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},jn.prototype.toArray=function(){return this.take(g)},bi(jn.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),s=Hn[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);s&&(Hn.prototype[e]=function(){var e=this.__wrapped__,a=i?[1]:arguments,l=e instanceof jn,c=a[0],h=l||jo(e),u=function(t){var e=s.apply(Hn,Ue([t],a));return i&&d?e[0]:e};h&&n&&"function"==typeof c&&1!=c.length&&(l=h=!1);var d=this.__chain__,p=!!this.__actions__.length,f=o&&!d,m=l&&!p;if(!o&&h){e=m?e:new jn(this);var g=t.apply(e,a);return g.__actions__.push({func:fo,args:[u],thisArg:r}),new Wn(g,d)}return f&&m?t.apply(this,a):(g=this.thru(u),f?i?g.value()[0]:g.value():g)})}),Re(["pop","push","shift","sort","splice","unshift"],function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Hn.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(jo(r)?r:[],t)}return this[n](function(n){return e.apply(jo(n)?n:[],t)})}}),bi(jn.prototype,function(t,e){var n=Hn[e];if(n){var i=n.name+"";Ut.call(In,i)||(In[i]=[]),In[i].push({name:e,func:n})}}),In[Hr(r,2).name]=[{name:"wrapper",func:r}],jn.prototype.clone=function(){var t=new jn(this.__wrapped__);return t.__actions__=Lr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Lr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Lr(this.__views__),t},jn.prototype.reverse=function(){if(this.__filtered__){var t=new jn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},jn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=jo(t),i=e<0,r=n?t.length:0,s=function(t,e,n){var i=-1,r=n.length;for(;++i<r;){var s=n[i],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=xn(e,t+o);break;case"takeRight":t=yn(t,e-o)}}return{start:t,end:e}}(0,r,this.__views__),o=s.start,a=s.end,l=a-o,c=i?a:o-1,h=this.__iteratees__,u=h.length,d=0,p=xn(l,this.__takeCount__);if(!n||!i&&r==l&&p==l)return mr(t,this.__actions__);var f=[];t:for(;l--&&d<p;){for(var m=-1,g=t[c+=e];++m<u;){var v=h[m],_=v.iteratee,y=v.type,x=_(g);if(2==y)g=x;else if(!x){if(1==y)continue t;break t}}f[d++]=g}return f},Hn.prototype.at=mo,Hn.prototype.chain=function(){return po(this)},Hn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Hn.prototype.next=function(){this.__values__===r&&(this.__values__=pa(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?r:this.__values__[this.__index__++]}},Hn.prototype.plant=function(t){for(var e,n=this;n instanceof Gn;){var i=zs(n);i.__index__=0,i.__values__=r,e?s.__wrapped__=i:e=i;var s=i;n=n.__wrapped__}return s.__wrapped__=t,e},Hn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof jn){var e=t;return this.__actions__.length&&(e=new jn(this)),(e=e.reverse()).__actions__.push({func:fo,args:[to],thisArg:r}),new Wn(e,this.__chain__)}return this.thru(to)},Hn.prototype.toJSON=Hn.prototype.valueOf=Hn.prototype.value=function(){return mr(this.__wrapped__,this.__actions__)},Hn.prototype.first=Hn.prototype.head,$t&&(Hn.prototype[$t]=function(){return this}),Hn}();me._=_n,(i=function(){return _n}.call(e,n,e,t))===r||(t.exports=i)}.call(this)},2367(t,e,n){!function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},s.apply(this,arguments)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}
2function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t){this.message=t,"captureStackTrace"in Error?Error.captureStackTrace(this,c):this.stack=(new Error).stack}c.prototype=Object.create(Error.prototype),c.prototype.name="PSVError",c.prototype.constructor=c;var h=function(){function t(t){this.psv=t}var n=t.prototype;return n.destroy=function(){delete this.psv},n.supportsTransition=function(t){return!1},n.supportsPreload=function(t){return!1},n.loadTexture=function(t,e,n){throw new c("loadTexture not implemented")},n.createMesh=function(t){throw new c("createMesh not implemented")},n.setTexture=function(t,e,n){throw new c("setTexture not implemented")},n.setTextureOpacity=function(t,e){throw new c("setTextureOpacity not implemented")},n.disposeTexture=function(t){throw new c("disposeTexture not implemented")},n.setOverlay=function(t,e,n){throw new c("setOverlay not implemented")},t.createOverlayMaterial=function(n){var i,r=void 0===n?{}:n,o=r.additionalUniforms,a=r.overrideVertexShader;return new e.ShaderMaterial({uniforms:s({},o,(i={},i[t.OVERLAY_UNIFORMS.panorama]={value:new e.Texture},i[t.OVERLAY_UNIFORMS.overlay]={value:new e.Texture},i[t.OVERLAY_UNIFORMS.globalOpacity]={value:1},i[t.OVERLAY_UNIFORMS.overlayOpacity]={value:1},i)),vertexShader:a||"\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"\nuniform sampler2D "+t.OVERLAY_UNIFORMS.panorama+";\nuniform sampler2D "+t.OVERLAY_UNIFORMS.overlay+";\nuniform float "+t.OVERLAY_UNIFORMS.globalOpacity+";\nuniform float "+t.OVERLAY_UNIFORMS.overlayOpacity+";\n\nvarying vec2 vUv;\n\nvoid main() {\n vec4 tColor1 = texture2D( "+t.OVERLAY_UNIFORMS.panorama+", vUv );\n vec4 tColor2 = texture2D( "+t.OVERLAY_UNIFORMS.overlay+", vUv );\n gl_FragColor = vec4(\n mix( tColor1.rgb, tColor2.rgb, tColor2.a * "+t.OVERLAY_UNIFORMS.overlayOpacity+" ),\n "+t.OVERLAY_UNIFORMS.globalOpacity+"\n );\n}"})},t}();h.id=null,h.supportsDownload=!1,h.supportsOverlay=!1,h.OVERLAY_UNIFORMS={panorama:"panorama",overlay:"overlay",globalOpacity:"globalOpacity",overlayOpacity:"overlayOpacity"};var u=1500,d=500,p=4,f=300,m=500,g=100,v=2e3,_=300,y=10,x="photoSphereViewer",b="psvSphere",M={ROTATE_LAT_UP:"rotateLatitudeUp",ROTATE_LAT_DOWN:"rotateLatitudeDown",ROTATE_LONG_RIGHT:"rotateLongitudeRight",ROTATE_LONG_LEFT:"rotateLongitudeLeft",ZOOM_IN:"zoomIn",ZOOM_OUT:"zoomOut",TOGGLE_AUTOROTATE:"toggleAutorotate"},w={AUTOROTATE:"autorotate",BEFORE_RENDER:"before-render",BEFORE_ROTATE:"before-rotate",CLICK:"click",CLOSE_PANEL:"close-panel",CONFIG_CHANGED:"config-changed",DOUBLE_CLICK:"dblclick",FULLSCREEN_UPDATED:"fullscreen-updated",HIDE_NOTIFICATION:"hide-notification",HIDE_OVERLAY:"hide-overlay",HIDE_TOOLTIP:"hide-tooltip",KEY_PRESS:"key-press",LOAD_PROGRESS:"load-progress",OPEN_PANEL:"open-panel",PANORAMA_LOADED:"panorama-loaded",POSITION_UPDATED:"position-updated",READY:"ready",RENDER:"render",SHOW_NOTIFICATION:"show-notification",SHOW_OVERLAY:"show-overlay",SHOW_TOOLTIP:"show-tooltip",SIZE_UPDATED:"size-updated",STOP_ALL:"stop-all",ZOOM_UPDATED:"zoom-updated"},S={GET_ANIMATE_POSITION:"get-animate-position",GET_ROTATE_POSITION:"get-rotate-position"},T={ENTER_OBJECT:"enter-object",HOVER_OBJECT:"hover-object",LEAVE_OBJECT:"leave-object"},E={MENU:"menu",TWO_FINGERS:"twoFingers",CTRL_ZOOM:"ctrlZoom",ERROR:"error",DESCRIPTION:"description"},A={linear:function(t){return t},inQuad:function(t){return t*t},outQuad:function(t){return t*(2-t)},inOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},inCubic:function(t){return t*t*t},outCubic:function(t){return--t*t*t+1},inOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},inQuart:function(t){return t*t*t*t},outQuart:function(t){return 1- --t*t*t*t},inOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},inQuint:function(t){return t*t*t*t*t},outQuint:function(t){return 1+--t*t*t*t*t},inOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},inSine:function(t){return 1-Math.cos(t*(Math.PI/2))},outSine:function(t){return Math.sin(t*(Math.PI/2))},inOutSine:function(t){return.5-.5*Math.cos(Math.PI*t)},inExpo:function(t){return Math.pow(2,10*(t-1))},outExpo:function(t){return 1-Math.pow(2,-10*t)},inOutExpo:function(t){return(t=2*t-1)<0?.5*Math.pow(2,10*t):1-.5*Math.pow(2,-10*t)},inCirc:function(t){return 1-Math.sqrt(1-t*t)},outCirc:function(t){return Math.sqrt(1-(t-1)*(t-1))},inOutCirc:function(t){return(t*=2)<1?.5-.5*Math.sqrt(1-t*t):.5+.5*Math.sqrt(1-(t-=2)*t)}},C={Enter:"Enter",Control:"Control",Escape:"Escape",Space:" ",PageUp:"PageUp",PageDown:"PageDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Delete:"Delete",Plus:"+",Minus:"-"},R=Object.freeze({__proto__:null,DEFAULT_TRANSITION:u,ANIMATION_MIN_DURATION:d,MOVE_THRESHOLD:p,DBLCLICK_DELAY:f,LONGTOUCH_DELAY:m,TWOFINGERSOVERLAY_DELAY:g,CTRLZOOM_TIMEOUT:v,INERTIA_WINDOW:_,
2SPHERE_RADIUS:y,VIEWER_DATA:x,MESH_USER_DATA:b,ACTIONS:M,EVENTS:w,CHANGE_EVENTS:S,OBJECT_EVENTS:T,IDS:E,EASINGS:A,KEY_CODES:C}),L=x+"_touchSupport",P={loaded:!1,pixelRatio:1,isWebGLSupported:!1,isTouchEnabled:null,maxTextureWidth:0,mouseWheelEvent:null,fullscreenEvent:null,load:function(){if(!P.loaded){var t=D();P.loaded=!0,P.pixelRatio=window.devicePixelRatio||1,P.isWebGLSupported=null!=t,P.isTouchEnabled=O(),P.maxTextureWidth=N(t),P.mouseWheelEvent=k(),P.fullscreenEvent=z()}}},I=null;function D(){var t=document.createElement("canvas"),e=["webgl","experimental-webgl","moz-webgl","webkit-3d"],n=null;return t.getContext&&e.some(function(e){try{return null!==(n=t.getContext(e))}catch(t){return!1}})?n:null}function O(){var t="ontouchstart"in window||navigator.maxTouchPoints>0;L in localStorage&&(t="true"===localStorage[L]);var e=new Promise(function(e){var n,i=function(){n(),localStorage[L]=!1,e(!1)},r=function(){n(),localStorage[L]=!0,e(!0)},s=function(){n(),localStorage[L]=t,e(t)};window.addEventListener("mousedown",i,!1),window.addEventListener("touchstart",r,!1);var o=setTimeout(s,1e4);n=function(){window.removeEventListener("mousedown",i),window.removeEventListener("touchstart",r),clearTimeout(o)}});return{initial:t,promise:e}}function N(t){return null!==t?t.getParameter(t.MAX_TEXTURE_SIZE):0}function U(t){var e=document.createElement("canvas"),n=e.getContext("2d");for(e.width=t,e.height=t/2;e.width>1024;){n.fillStyle="white",n.fillRect(0,0,1,1);try{if(n.getImageData(0,0,1,1).data[0]>0)return e.width}catch(t){}e.width/=2,e.height/=2}throw new c("Unable to detect system capabilities")}function k(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"}P.getMaxCanvasWidth=function(){return null===I&&(I=U(P.maxTextureWidth)),I};var F={exitFullscreen:"fullscreenchange",webkitExitFullscreen:"webkitfullscreenchange",mozCancelFullScreen:"mozfullscreenchange",msExitFullscreen:"MSFullscreenChange"};function z(){var t=Object.keys(F).filter(function(t){return t in document});return t.length?F[t[0]]:null}function B(t,e,n){void 0===n?t.classList.toggle(e):n?t.classList.add(e):n||t.classList.remove(e)}function H(t,e){var n;(n=t.classList).add.apply(n,e.split(" "))}function V(t,e){var n;(n=t.classList).remove.apply(n,e.split(" "))}function G(t,e){var n=t;do{if(n===e)return!0;n=n.parentNode}while(n);return!1}function W(t,e){if(null==t||!t.matches)return null;var n=t;do{if(n.matches(e))return n;n=n instanceof SVGElement?n.parentNode:n.parentElement}while(n);return null}function j(t){for(var e=0,n=0,i=t;i;)e+=i.offsetLeft-i.scrollLeft+i.clientLeft,n+=i.offsetTop-i.scrollTop+i.clientTop,i=i.offsetParent;return{left:e,top:n}}function X(t){return(document.fullscreenElement||document.webkitFullscreenElement)===t}function Y(t){(t.requestFullscreen||t.webkitRequestFullscreen).call(t)}function q(){(document.exitFullscreen||document.webkitExitFullscreen).call(document)}function Z(t,e){return window.getComputedStyle(t,null)[e]}function J(t){var e=10,n=40,i=800,r=0,s=0,o=0,a=0;return"detail"in t&&(s=t.detail),"wheelDelta"in t&&(s=-t.wheelDelta/120),"wheelDeltaY"in t&&(s=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(r=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(r=s,s=0),o=r*e,a=s*e,"deltaY"in t&&(a=t.deltaY),"deltaX"in t&&(o=t.deltaX),(o||a)&&t.deltaMode&&(1===t.deltaMode?(o*=n,a*=n):(o*=i,a*=i)),o&&!r&&(r=o<1?-1:1),a&&!s&&(s=a<1?-1:1),{spinX:r,spinY:s,pixelX:o,pixelY:a}}function K(t,n,i){return e.MathUtils.clamp(t,n,i)}function $(t,e){var n=t%e;return n<0&&(n+=e),n}function Q(t){return e.MathUtils.isPowerOfTwo(t)}function tt(t){return t.reduce(function(t,e){return t+e},0)}function et(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function nt(t,e){return[0,2*Math.PI,2*-Math.PI].reduce(function(n,i){var r=e-t+i;return Math.abs(r)<Math.abs(n)?r:n},1/0)}function it(t,e){return Math.acos(Math.cos(t.latitude)*Math.cos(e.latitude)*Math.cos(t.longitude-e.longitude)+Math.sin(t.latitude)*Math.sin(e.latitude))}function rt(t,e){var n=t[0],i=t[1],r=e[0],s=e[1],o=(r-n)*Math.cos((i+s)/2),a=s-i;return Math.sqrt(o*o+a*a)}function st(t){return t.replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,function(t,e){return(e>0?"-":"")+t.toLowerCase()})}function ot(t,e){var n,i,r,s,o=0,a=function(){o=Date.now(),s=void 0,r=t.apply(n,i),s||(n=i=null)};return function(){var l=Date.now();o||(o=l);var c=e-(l-o);return n=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=void 0),o=l,r=t.apply(n,i),s||(n=i=null)):s||(s=setTimeout(a,c)),r}}function at(t){if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1}function lt(t,e){var n=e;return function t(e,i){return Array.isArray(i)?(e&&Array.isArray(e)?e.length=0:e=[],i.forEac
2h(function(n,i){e[i]=t(null,n)})):"object"==typeof i?(e&&!Array.isArray(e)||(e={}),Object.keys(i).forEach(function(r){"object"==typeof i[r]&&i[r]&&at(i[r])?i[r]!=n&&(e[r]?t(e[r],i[r]):e[r]=t(null,i[r])):e[r]=i[r]})):e=i,e}(t,e)}function ct(t){return lt(null,t)}function ht(t){return!t||0===Object.keys(t).length&&t.constructor===Object}function ut(t,e){Object.keys(t).forEach(function(n){e(t[n],n)})}function dt(t){return null==t}function pt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var i=0,r=e;i<r.length;i++){var s=r[i];if(!dt(s))return s}}function ft(t,e){if(t===e)return!0;if(mt(t)&&mt(e)){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];if(!ft(t[r],e[r]))return!1}return!0}return!1}function mt(t){return"object"==typeof t&&null!=t}function gt(t,e){if(t)for(var n=0,i=[["_",t]].concat(Object.entries(t));n<i.length;n++){var r=i[n][1];if(r.prototype instanceof e)return r}return null}function vt(){var t=new Error("Loading was aborted.");return t.name="AbortError",t}function _t(t){return"AbortError"===(null==t?void 0:t.name)}function yt(t){console.warn("PhotoSphereViewer: "+t)}function xt(t){return[["x","y"],["longitude","latitude"]].some(function(e){var n=e[0],i=e[1];return void 0!==t[n]&&void 0!==t[i]})}function bt(t,e){var n=t.match("<GPano:"+e+">(.*)</GPano:"+e+">");if(null!==n){var i=parseInt(n[1],10);return isNaN(i)?null:i}if(null!==(n=t.match("GPano:"+e+'="(.*?)"'))){var r=parseInt(n[1],10);return isNaN(r)?null:r}return null}var Mt={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"};function wt(t){if(!t)return{x:.5,y:.5};if("object"==typeof t)return t;var e=t.toLocaleLowerCase().split(" ").slice(0,2);1===e.length&&(e=void 0!==Mt[e[0]]?[e[0],"center"]:[e[0],e[0]]);var n="left"!==e[1]&&"right"!==e[1]&&"top"!==e[0]&&"bottom"!==e[0];e=e.map(function(t){return Mt[t]||t}),n||e.reverse();var i=e.join(" ").match(/^([0-9.]+)% ([0-9.]+)%$/);return i?{x:parseFloat(i[1])/100,y:parseFloat(i[2])/100}:{x:.5,y:.5}}var St=["left","center","right"],Tt=["top","center","bottom"],Et=[].concat(St,Tt),At="center";function Ct(t,e){var n=void 0===e?{allowCenter:!0,cssOrder:!0}:e,i=n.allowCenter,r=n.cssOrder;return t?("string"==typeof t&&(t=t.split(" ")),1===t.length&&(t[0]===At?t=[At,At]:-1!==St.indexOf(t[0])?t=[At,t[0]]:-1!==Tt.indexOf(t[0])&&(t=[t[0],At])),2!==t.length||-1===Et.indexOf(t[0])||-1===Et.indexOf(t[1])?(yt("Unparsable position "+t),null):i||t[0]!==At||t[1]!==At?(r&&!Rt(t)&&(t=[t[1],t[0]]),t[1]===At&&-1!==St.indexOf(t[0])&&(t=[At,t[0]]),t[0]===At&&-1!==Tt.indexOf(t[1])&&(t=[t[1],At]),t):(yt("Invalid position center center"),null)):null}function Rt(t){return-1!==Tt.indexOf(t[0])&&-1!==St.indexOf(t[1])}function Lt(t){var n;if("string"==typeof t){var i=t.toString().trim(),r=parseFloat(i.replace(/^(-?[0-9]+(?:\.[0-9]*)?).*$/,"$1")),s=i.replace(/^-?[0-9]+(?:\.[0-9]*)?(.*)$/,"$1").trim();switch(s.match(/(pm|per minute)$/)&&(r/=60),s){case"dpm":case"degrees per minute":case"dps":case"degrees per second":n=e.MathUtils.degToRad(r);break;case"rdpm":case"radians per minute":case"rdps":case"radians per second":n=r;break;case"rpm":case"revolutions per minute":case"rps":case"revolutions per second":n=r*Math.PI*2;break;default:throw new c('Unknown speed unit "'+s+'"')}}else n=t;return n}function Pt(t,n,i){var r;if(void 0===n&&(n=!1),void 0===i&&(i=n),"string"==typeof t){var s=t.toLowerCase().trim().match(/^(-?[0-9]+(?:\.[0-9]*)?)(.*)$/);if(!s)throw new c('Unknown angle "'+t+'"');var o=parseFloat(s[1]),a=s[2];if(a)switch(a){case"deg":case"degs":r=e.MathUtils.degToRad(o);break;case"rad":case"rads":r=o;break;default:throw new c('Unknown angle unit "'+a+'"')}else r=o}else{if("number"!=typeof t||isNaN(t))throw new c('Unknown angle "'+t+'"');r=t}return r=$(n?r+Math.PI:r,2*Math.PI),n?e.MathUtils.clamp(r-Math.PI,-Math.PI/(i?2:1),Math.PI/(i?2:1)):r}function It(t){var n=new e.Texture(t);return n.needsUpdate=!0,n.minFilter=e.LinearFilter,n.generateMipmaps=!1,n}var Dt=new e.Quaternion;function Ot(t,e){Dt.setFromEuler(e).invert(),t.applyQuaternion(Dt)}var Nt=function(){function t(t){var e=this;this.__callbacks=[],t?(t.easing&&"string"!=typeof t.easing||(t.easing=A[t.easing||"linear"]),this.__start=null,this.options=t,t.delay?this.__delayTimeout=setTimeout(function(){e.__delayTimeout=null,e.__animationFrame=window.requestAnimationFrame(function(t){return e.__run(t)})},t.delay):this.__animationFrame=window.requestAnimationFrame(function(t){return e.__run(t)})):this.__resolved=!0}var e=t.prototype;return e.__run=function(t){var e=this;if(!this.__cancelled){null===this.__start&&(this.__start=t);var n=(t-this.__start)/this.options.duration,i={};n<1?(ut(this.options.properties,function(t,r){t&&(i[r]=t.start+(t.end-t.start)*e.options.easing(n))}
2),this.options.onTick(i,n),this.__animationFrame=window.requestAnimationFrame(function(t){return e.__run(t)})):(ut(this.options.properties,function(t,e){t&&(i[e]=t.end)}),this.options.onTick(i,1),this.__animationFrame=window.requestAnimationFrame(function(){e.__resolved=!0,e.__resolve(!0)}))}},e.__resolve=function(t){this.__callbacks.forEach(function(e){return e(t)}),this.__callbacks.length=0},e.then=function(t){var e=this;return this.__resolved||this.__cancelled?Promise.resolve(this.__resolved).then(t):new Promise(function(t){e.__callbacks.push(t)}).then(t)},e.cancel=function(){this.__cancelled||this.__resolved||(this.__cancelled=!0,this.__resolve(!1),this.__delayTimeout&&(window.clearTimeout(this.__delayTimeout),this.__delayTimeout=null),this.__animationFrame&&(window.cancelAnimationFrame(this.__animationFrame),this.__animationFrame=null))},t}(),Ut=function(){function t(e,n,i,r,s){if(void 0===n&&(n=0),void 0===i&&(i=-1/0),void 0===r&&(r=1/0),void 0===s&&(s=!1),this.fn=e,this.mode=t.STOP,this.speed=0,this.speedMult=1,this.currentSpeed=0,this.target=0,this.current=n,this.min=i,this.max=r,this.loopValue=s,s&&0!==i)throw new c("invalid config");this.fn&&this.fn(n)}var n=t.prototype;return n.setSpeed=function(t){this.speed=t},n.goto=function(n,i){void 0===i&&(i=1),this.mode=t.POSITION,this.target=this.loopValue?$(n,this.max):e.MathUtils.clamp(n,this.min,this.max),this.speedMult=i},n.step=function(e,n){void 0===n&&(n=1),this.mode!==t.POSITION&&(this.target=this.current),this.goto(this.target+e,n)},n.roll=function(e,n){void 0===e&&(e=!1),void 0===n&&(n=1),this.mode=t.INFINITE,this.target=e?-1/0:1/0,this.speedMult=n},n.stop=function(){this.mode=t.STOP},n.setValue=function(n){return this.target=this.loopValue?$(n,this.max):e.MathUtils.clamp(n,this.min,this.max),this.mode=t.STOP,this.target!==this.current&&(this.current=this.target,this.fn&&this.fn(this.current),!0)},n.update=function(n){if(this.mode===t.POSITION){this.loopValue&&Math.abs(this.target-this.current)>this.max/2&&(this.current=this.current<this.target?this.current+this.max:this.current-this.max);var i=this.currentSpeed*this.currentSpeed/(this.speed*this.speedMult*4);Math.abs(this.target-this.current)<=i&&(this.mode=t.STOP)}var r=this.mode===t.STOP?0:this.speed*this.speedMult;this.target<this.current&&(r=-r),this.currentSpeed<r?this.currentSpeed=Math.min(r,this.currentSpeed+n/1e3*this.speed*this.speedMult*2):this.currentSpeed>r&&(this.currentSpeed=Math.max(r,this.currentSpeed-n/1e3*this.speed*this.speedMult*2));var s=null;return this.current>this.target&&this.currentSpeed?s=Math.max(this.target,this.current+this.currentSpeed*n/1e3):this.current<this.target&&this.currentSpeed&&(s=Math.min(this.target,this.current+this.currentSpeed*n/1e3)),null!==s&&(s=this.loopValue?$(s,this.max):e.MathUtils.clamp(s,this.min,this.max))!==this.current&&(this.current=s,this.fn&&this.fn(this.current),!0)},t}();Ut.STOP=0,Ut.INFINITE=1,Ut.POSITION=2;var kt=function(){function t(t,e){this.fn=e,this.dynamics=t,this.fn&&this.fn(this.current)}var e=t.prototype;return e.setSpeed=function(t){ut(this.dynamics,function(e){e.setSpeed(t)})},e.goto=function(t,e){var n=this;void 0===e&&(e=1),ut(t,function(t,i){n.dynamics[i].goto(t,e)})},e.step=function(t,e){var n=this;void 0===e&&(e=1),ut(t,function(t,i){n.dynamics[i].step(t,e)})},e.roll=function(t,e){var n=this;void 0===e&&(e=1),ut(t,function(t,i){n.dynamics[i].roll(t,e)})},e.stop=function(){ut(this.dynamics,function(t){return t.stop()})},e.setValue=function(t){var e=this,n=!1;return ut(t,function(t,i){n|=e.dynamics[i].setValue(t)}),n&&this.fn&&this.fn(this.current),n},e.update=function(t){var e=!1;return ut(this.dynamics,function(n){e|=n.update(t)}),e&&this.fn&&this.fn(this.current),e},r(t,[{key:"current",get:function(){var t={};return ut(this.dynamics,function(e,n){t[n]=e.current}),t}}]),t}(),Ft=function(t){function e(e){var n,i=e.psv,r=e.container,s=e.direction,o=e.onUpdate;return(n=t.call(this)||this).psv=i,n.container=r,n.prop={onUpdate:o,direction:s,mousedown:!1,mouseover:!1},n.container.addEventListener("click",l(n)),n.container.addEventListener("mousedown",l(n)),n.container.addEventListener("mouseenter",l(n)),n.container.addEventListener("mouseleave",l(n)),n.container.addEventListener("touchstart",l(n)),n.container.addEventListener("mousemove",l(n),!0),n.container.addEventListener("touchmove",l(n),!0),window.addEventListener("mouseup",l(n)),window.addEventListener("touchend",l(n)),n}o(e,t);var n=e.prototype;return n.destroy=function(){window.removeEventListener("mouseup",this),window.removeEventListener("touchend",this)},n.handleEvent=function(t){switch(t.type){case"click":t.stopPropagation();break;case"mousedown":this.__onMouseDown(t);break;case"mouseenter":this.__onMouseEnter(t);break;case"mouseleave":this.__onMouseLeave(t);break;case"touchstart":this.__onTouchStart(t);break;case"mousemove":this.__onMouseMove(t);break;case"touchmove":this.__onTouchMove(t);break;case"mouseup":this.__onMouseUp(t);break;case"touchend":this.__onTouchEnd(t)}},n.__onMouseDown=function(t){this.prop.mousedown=!0,this.__update(t,!0)},n.__onMouseEnter=function(t){this.prop.mouseover=!0,this.__update(t,!0)},n.__onTouchStart=function(t){this.prop.mouseover=!0,this.prop.mousedown=!0,this.__update(t.changedTouches[0],!0)},n.__onMouseMove=function(t){(this.prop.mousedown||this.prop.mouseover)&&(t.stopPropagation(),this.__update(t,!0))},n.__onTouchMove=function(t){(this.prop.mousedown||this.prop.mouseover)&&(t.stopPropagation(),this.__update(t.changedTouches[0],!0))},n.__onMouseUp=function(t){this.prop.mousedown&&(this.prop.mousedown=!1,this.__update(t,!1))},n.__onMouseLeave=function(t){this.prop.mouseover&&(this.prop.mouseover=!1,this.__update(t,!0))},n.__onTouchEnd=function(t){this.prop.mousedown&&(this.prop.mouseover=!1,this.prop.mousedown=!1,this.__update(t.changedTouches[0],!1))},n.__update=function(t,e){var n=this.container.getBoundingClientRect(),i=t[this.vertical?"clientY":"clientX"],r=n[this.vertical?"bottom":"left"],s=n[this.vertical?"height":"width"],o=Math.abs((r-i)/s);this.prop.onUpdate({value:o,click:!e,mousedown:this.prop.mousedown,mouseover:this.prop.mouseover,cursor:t})},r(e,[{key:"vertical",get:function(){return this.prop.direction===e.VERTICAL}}]),e}(n.EventEmitter);Ft.VERTICAL=1,Ft.HORIZONTAL=2;var zt=Object.freeze({__proto__:null,toggleClass:B,addClasses:H,removeClasses:V,hasParent:G,getClosest:W,getPosition:j,isFullscreenEnabled:X,requestFullscreen:Y,exitFullscreen:q,getStyle:Z,normalizeWheel:J,bound:K,loop:$,isPowerOfTwo:Q,sum:tt,distance:et,getShortestArc:nt,getAngle:it,greatArcDistance:rt,dasherize:st,throttle:ot,isPlainObject:at,deepmerge:lt,clone:ct,isEmpty:ht,each:ut,isNil
2:dt,firstNonNull:pt,deepEqual:ft,pluginInterop:gt,getAbortError:vt,isAbortError:_t,logWarn:yt,isExtendedPosition:xt,getXMPValue:bt,parsePosition:wt,cleanPosition:Ct,positionIsOrdered:Rt,parseSpeed:Lt,parseAngle:Pt,createTexture:It,applyEulerInverse:Ot,Animation:Nt,Dynamic:Ut,MultiDynamic:kt,Slider:Ft}),Bt=function(t){function n(n,i){var r;if((r=t.call(this,n)||this).config=s({resolution:64},i),!e.MathUtils.isPowerOfTwo(r.config.resolution))throw new c("EquirectangularAdapter resolution must be power of two");return r.SPHERE_SEGMENTS=r.config.resolution,r.SPHERE_HORIZONTAL_SEGMENTS=r.SPHERE_SEGMENTS/2,r}o(n,t);var i=n.prototype;return i.supportsTransition=function(){return!0},i.supportsPreload=function(){return!0},i.loadTexture=function(t,e,n){var i=this;return void 0===n&&(n=this.psv.config.useXmpData),"string"!=typeof t?((Array.isArray(t)||"object"==typeof t&&t.left)&&yt("Cubemap support now requires an additional adapter, see https://photo-sphere-viewer.js.org/guide/adapters"),Promise.reject(new c("Invalid panorama url, are you using the right adapter?"))):(n?this.__loadXMP(t,function(t){return i.psv.loader.setProgress(t)}).then(function(e){return i.psv.textureLoader.loadImage(t).then(function(t){return{img:t,xmpPanoData:e}})}):this.psv.textureLoader.loadImage(t,function(t){return i.psv.loader.setProgress(t)}).then(function(t){return{img:t,xmpPanoData:null}})).then(function(n){var r,s,o,a,l,c,h,u,d,p=n.img,f=n.xmpPanoData;"function"==typeof e&&(e=e(p));var m={fullWidth:pt(null==(r=e)?void 0:r.fullWidth,null==f?void 0:f.fullWidth,p.width),fullHeight:pt(null==(s=e)?void 0:s.fullHeight,null==f?void 0:f.fullHeight,p.height),croppedWidth:pt(null==(o=e)?void 0:o.croppedWidth,null==f?void 0:f.croppedWidth,p.width),croppedHeight:pt(null==(a=e)?void 0:a.croppedHeight,null==f?void 0:f.croppedHeight,p.height),croppedX:pt(null==(l=e)?void 0:l.croppedX,null==f?void 0:f.croppedX,0),croppedY:pt(null==(c=e)?void 0:c.croppedY,null==f?void 0:f.croppedY,0),poseHeading:pt(null==(h=e)?void 0:h.poseHeading,null==f?void 0:f.poseHeading,0),posePitch:pt(null==(u=e)?void 0:u.posePitch,null==f?void 0:f.posePitch,0),poseRoll:pt(null==(d=e)?void 0:d.poseRoll,null==f?void 0:f.poseRoll,0)};m.croppedWidth===p.width&&m.croppedHeight===p.height||yt("Invalid panoData, croppedWidth and/or croppedHeight is not coherent with loaded image.\n panoData: "+m.croppedWidth+"x"+m.croppedHeight+", image: "+p.width+"x"+p.height),(e||f)&&m.fullWidth!==2*m.fullHeight&&yt("Invalid panoData, fullWidth should be twice fullHeight");var g=i.__createEquirectangularTexture(p,m);return{panorama:t,texture:g,panoData:m}})},i.__loadXMP=function(t,e){var n=this;return this.psv.textureLoader.loadFile(t,e).then(function(t){return n.__loadBlobAsString(t)}).then(function(t){var e=t.indexOf("<x:xmpmeta"),n=t.indexOf("</x:xmpmeta>"),i=t.substring(e,n);return-1!==e&&-1!==n&&i.includes("GPano:")?{fullWidth:bt(i,"FullPanoWidthPixels"),fullHeight:bt(i,"FullPanoHeightPixels"),croppedWidth:bt(i,"CroppedAreaImageWidthPixels"),croppedHeight:bt(i,"CroppedAreaImageHeightPixels"),croppedX:bt(i,"CroppedAreaLeftPixels"),croppedY:bt(i,"CroppedAreaTopPixels"),poseHeading:bt(i,"PoseHeadingDegrees"),posePitch:bt(i,"PosePitchDegrees"),poseRoll:bt(i,"PoseRollDegrees")}:null})},i.__loadBlobAsString=function(t){return new Promise(function(e,n){var i=new FileReader;i.onload=function(){return e(i.result)},i.onerror=n,i.readAsText(t)})},i.__createEquirectangularTexture=function(t,e){if(e.fullWidth>P.maxTextureWidth||e.croppedWidth!==e.fullWidth||e.croppedHeight!==e.fullHeight){var n=P.getMaxCanvasWidth()/e.fullWidth,i=s({},e);n<1&&(i.fullWidth*=n,i.fullHeight*=n,i.croppedWidth*=n,i.croppedHeight*=n,i.croppedX*=n,i.croppedY*=n);var r=document.createElement("canvas");return r.width=i.fullWidth,r.height=i.fullHeight,r.getContext("2d").drawImage(t,i.croppedX,i.croppedY,i.croppedWidth,i.croppedHeight),It(r)}return It(t)},i.createMesh=function(t){void 0===t&&(t=1);var n=new e.SphereGeometry(y*t,this.SPHERE_SEGMENTS,this.SPHERE_HORIZONTAL_SEGMENTS,-Math.PI/2).scale(-1,1,1),i=h.createOverlayMaterial();return new e.Mesh(n,i)},i.setTexture=function(t,e){this.__setUniform(t,h.OVERLAY_UNIFORMS.panorama,e.texture),this.setOverlay(t,null)},i.setOverlay=function(t,n,i){this.__setUniform(t,h.OVERLAY_UNIFORMS.overlayOpacity,i),n?this.__setUniform(t,h.OVERLAY_UNIFORMS.overlay,n.texture):this.__setUniform(t,h.OVERLAY_UNIFORMS.overlay,new e.Texture)},i.setTextureOpacity=function(t,e){this.__setUniform(t,h.OVERLAY_UNIFORMS.globalOpacity,e),t.material.transparent=e<1},i.disposeTexture=function(t){var e;null==(e=t.texture)||e.dispose()},i.__setUniform=function(t,n,i){t.material.uniforms[n].value instanceof e.Texture&&t.material.uniforms[n].value.dispose(),t.material.uniforms[n].value=i},n}(h);Bt.id="equirectangular",Bt.supportsDownload=!0,Bt.supportsOverlay=!0;var Ht=function(){function t(t,e){this.psv=t.psv||t,this.parent=t,this.parent.children.push(this),this.children=[],this.prop={visible:!0},this.container=document.createElement("div"),this.container.className=e,this.parent.container.appendChild(this.container)}var e=t.prototype;return e.destroy=function(){this.parent.container.removeChild(this.container);var t=this.parent.children.indexOf(this);-1!==t&&this.parent.children.splice(t,1),this.children.slice().forEac
2h(function(t){return t.destroy()}),this.children.length=0,delete this.container,delete this.parent,delete this.psv,delete this.prop},e.refreshUi=function(){var t=this;this.children.every(function(e){return e.refreshUi(),!0===t.psv.prop.uiRefresh})},e.toggle=function(t){!1===t||void 0===t&&this.isVisible()?this.hide():(!0===t||void 0===t&&!this.isVisible())&&this.show()},e.hide=function(){this.container.style.display="none",this.prop.visible=!1},e.show=function(){this.container.style.display="",this.prop.visible=!0},e.isVisible=function(){return this.prop.visible},t}(),Vt=function(t){function e(e,n,i,r){var o;return void 0===n&&(n=""),void 0===i&&(i=!1),void 0===r&&(r=!0),(o=t.call(this,e,"psv-button "+n)||this).prop=s({},o.prop,{id:o.constructor.id,collapsable:i,enabled:!0,supported:!0,collapsed:!1,active:!1,width:o.container.offsetWidth}),o.constructor.icon&&o.__setIcon(o.constructor.icon),o.prop.id&&o.psv.config.lang[o.prop.id]&&(o.container.title=o.psv.config.lang[o.prop.id]),r&&(o.container.tabIndex=0),o.container.addEventListener("click",function(t){o.prop.enabled&&o.onClick(),t.stopPropagation()}),o.container.addEventListener("keydown",function(t){t.key===C.Enter&&o.prop.enabled&&(o.onClick(),t.stopPropagation())}),o}o(e,t);var n=e.prototype;return n.checkSupported=function(){var t=this,e=this.isSupported();at(e)?(!1===e.initial&&(this.hide(),this.prop.supported=!1),e.promise.then(function(e){t.prop&&(t.prop.supported=e,t.toggle(e))})):(this.prop.supported=e,e||this.hide())},n.isSupported=function(){return!0},n.toggleActive=function(t){this.prop.active=void 0!==t?t:!this.prop.active,B(this.container,"psv-button--active",this.prop.active),this.constructor.iconActive&&this.__setIcon(this.prop.active?this.constructor.iconActive:this.constructor.icon)},n.show=function(t){void 0===t&&(t=!0),this.isVisible()||(this.prop.visible=!0,this.prop.collapsed||(this.container.style.display=""),t&&this.psv.refreshUi("show button "+this.prop.id))},n.hide=function(t){void 0===t&&(t=!0),this.isVisible()&&(this.prop.visible=!1,this.container.style.display="none",t&&this.psv.refreshUi("hide button "+this.prop.id))},n.disable=function(){this.container.classList.add("psv-button--disabled"),this.prop.enabled=!1},n.enable=function(){this.container.classList.remove("psv-button--disabled"),this.prop.enabled=!0},n.collapse=function(){this.prop.collapsed=!0,this.container.style.display="none"},n.uncollapse=function(){this.prop.collapsed=!1,this.prop.visible&&(this.container.style.display="")},n.__setIcon=function(t,e){void 0===e&&(e=this.container),t?(e.innerHTML=t,e.querySelector("svg").classList.add("psv-button-svg")):e.innerHTML=""},n.onClick=function(){throw new c('onClick not implemented for button "'+this.prop.id+'".')},e}(Ht);Vt.id=null,Vt.groupId=null,Vt.icon=null,Vt.iconActive=null;var Gt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41"><path fill="currentColor" d="M40.5 14.1c-.1-.1-1.2-.5-2.898-1-.102 0-.202-.1-.202-.2C34.5 6.5 28 2 20.5 2S6.6 6.5 3.7 12.9c0 .1-.1.1-.2.2-1.7.6-2.8 1-2.9 1l-.6.3v12.1l.6.2c.1 0 1.1.399 2.7.899.1 0 .2.101.2.199C6.3 34.4 12.9 39 20.5 39c7.602 0 14.102-4.6 16.9-11.1 0-.102.1-.102.199-.2 1.699-.601 2.699-1 2.801-1l.6-.3V14.3l-.5-.2zM6.701 11.5C9.7 7 14.8 4 20.5 4c5.8 0 10.9 3 13.8 7.5.2.3-.1.6-.399.5-3.799-1-8.799-2-13.6-2-4.7 0-9.5 1-13.2 2-.3.1-.5-.2-.4-.5zM25.1 20.3L18.7 24c-.3.2-.7 0-.7-.5v-7.4c0-.4.4-.6.7-.4l6.399 3.8c.301.1.301.6.001.8zm9.4 8.901A16.421 16.421 0 0 1 20.5 37c-5.9 0-11.1-3.1-14-7.898-.2-.302.1-.602.4-.5 3.9 1 8.9 2.1 13.6 2.1 5 0 9.9-1 13.602-2 .298-.1.5.198.398.499z"/>\x3c!--Created by Nick Bluth from the Noun Project--\x3e</svg>\n',Wt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41"><path fill="currentColor" d="M40.5 14.1c-.1-.1-1.2-.5-2.899-1-.101 0-.2-.1-.2-.2C34.5 6.5 28 2 20.5 2S6.6 6.5 3.7 12.9c0 .1-.1.1-.2.2-1.7.6-2.8 1-2.9 1l-.6.3v12.1l.6.2c.1 0 1.1.4 2.7.9.1 0 .2.1.2.199C6.3 34.4 12.9 39 20.5 39c7.601 0 14.101-4.6 16.9-11.1 0-.101.1-.101.2-.2 1.699-.6 2.699-1 2.8-1l.6-.3V14.3l-.5-.2zM20.5 4c5.8 0 10.9 3 13.8 7.5.2.3-.1.6-.399.5-3.8-1-8.8-2-13.6-2-4.7 0-9.5 1-13.2 2-.3.1-.5-.2-.4-.5C9.7 7 14.8 4 20.5 4zm0 33c-5.9 0-11.1-3.1-14-7.899-.2-.301.1-.
2601.4-.5 3.9 1 8.9 2.1 13.6 2.1 5 0 9.9-1 13.601-2 .3-.1.5.2.399.5A16.422 16.422 0 0 1 20.5 37zm18.601-12.1c0 .1-.101.3-.2.3-2.5.9-10.4 3.6-18.4 3.6-7.1 0-15.6-2.699-18.3-3.6C2.1 25.2 2 25 2 24.9V16c0-.1.1-.3.2-.3 2.6-.9 10.6-3.6 18.2-3.6 7.5 0 15.899 2.7 18.5 3.6.1 0 .2.2.2.3v8.9z"/><path fill="currentColor" d="M18.7 24l6.4-3.7c.3-.2.3-.7 0-.8l-6.4-3.8c-.3-.2-.7 0-.7.4v7.4c0 .5.4.7.7.5z"/>\x3c!--Created by Nick Bluth from the Noun Project--\x3e</svg>\n',jt=function(t){function e(e){var n;return(n=t.call(this,e,"psv-button--hover-scale psv-autorotate-button",!0)||this).psv.on(w.AUTOROTATE,l(n)),n}o(e,t);var n=e.prototype;return n.destroy=function(){this.psv.off(w.AUTOROTATE,this),t.prototype.destroy.call(this)},n.handleEvent=function(t){t.type===w.AUTOROTATE&&this.toggleActive(t.args[0])},n.onClick=function(){this.psv.isAutorotateEnabled()&&(this.psv.config.autorotateIdle=!1,this.psv.resetIdleTimer()),this.psv.toggleAutorotate()},e}(Vt);jt.id="autorotate",jt.icon=Wt,jt.iconActive=Gt;var Xt=function(t){function e(e,n){var i;return(i=t.call(this,e,"psv-custom-button",!1!==n.collapsable,!1!==n.tabbable)||this).config=n,i.config.id?i.prop.id=i.config.id:i.prop.id="psvButton-"+Math.random().toString(36).substr(2,9),i.config.className&&H(i.container,i.config.className),i.config.title&&(i.container.title=i.config.title),i.config.content&&(i.container.innerHTML=i.config.content),i.prop.width=i.container.offsetWidth,!1===i.config.enabled&&i.disable(),!1===i.config.visible&&i.hide(),i}o(e,t);var n=e.prototype;return n.destroy=function(){delete this.config,t.prototype.destroy.call(this)},n.onClick=function(){this.config.onClick&&this.config.onClick.call(this.psv,this.psv)},e}(Vt),Yt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="currentColor" d="M28.3 26.1c-1 2.6-1.9 4.8-2.6 7-2.5 7.4-5 14.7-7.2 22-1.3 4.4.5 7.2 4.3 7.8 1.3.2 2.8.2 4.2-.1 8.2-2 11.9-8.6 15.7-15.2l-2.2 2a18.8 18.8 0 0 1-7.4 5.2 2 2 0 0 1-1.6-.2c-.2-.1 0-1 0-1.4l.8-1.8L41.9 28c.5-1.4.9-3 .7-4.4-.2-2.6-3-4.4-6.3-4.4-8.8.2-15 4.5-19.5 11.8-.2.3-.2.6-.3 1.3 3.7-2.8 6.8-6.1 11.8-6.2z"/><circle fill="currentColor" cx="39.3" cy="9.2" r="8.2"/>\x3c!--Created by Arafat Uddin from the Noun Project--\x3e</svg>\n',qt=1,Zt=2,Jt=function(t){function e(e){var n;return(n=t.call(this,e,"psv-button--hover-scale psv-description-button")||this).prop=s({},n.prop,{mode:null}),n.psv.on(w.HIDE_NOTIFICATION,l(n)),n.psv.on(w.SHOW_NOTIFICATION,l(n)),n.psv.on(w.CLOSE_PANEL,l(n)),n.psv.on(w.OPEN_PANEL,l(n)),n}o(e,t);var n=e.prototype;return n.destroy=function(){this.psv.off(w.HIDE_NOTIFICATION,this),this.psv.off(w.SHOW_NOTIFICATION,this),this.psv.off(w.CLOSE_PANEL,this),this.psv.off(w.OPEN_PANEL,this),t.prototype.destroy.call(this)},n.handleEvent=function(t){if(this.prop.mode){var e=!1;switch(t.type){case w.HIDE_NOTIFICATION:e=this.prop.mode===qt;break;case w.SHOW_NOTIFICATION:e=this.prop.mode===qt&&t.args[0]!==E.DESCRIPTION;break;case w.CLOSE_PANEL:e=this.prop.mode===Zt;break;case w.OPEN_PANEL:e=this.prop.mode===Zt&&t.args[0]!==E.DESCRIPTION}e&&(this.toggleActive(!1),this.prop.mode=null)}},n.hide=function(e){t.prototype.hide.call(this,e),this.prop.mode&&this.__close()},n.refreshUi=function(t){if(void 0===t&&(t=!1),t){var e=this.psv.navbar.getButton("caption",!1),n=e&&!e.isVisible(),i=!!this.psv.config.description;n||i?this.show(!1):this.hide(!1)}},n.onClick=function(){this.prop.mode?this.__close():this.__open()},n.__close=function(){switch(this.prop.mode){case qt:this.psv.notification.hide(E.DESCRIPTION);break;case Zt:this.psv.panel.hide(E.DESCRIPTION)}},n.__open=function(){this.toggleActive(!0),this.psv.config.description?(this.prop.mode=Zt,this.psv.panel.show({id:E.DESCRIPTION,content:(this.psv.config.caption?"<p>"+this.psv.config.caption+"</p>":"")+this.psv.config.description})):(this.prop.mode=qt,this.psv.notification.show({id:E.DESCRIPTION,content:this.psv.config.caption}))},e}(Vt);Jt.id="description",Jt.icon=Yt;var Kt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M83.3 35.6h-17V3H32.2v32.6H16.6l33.6 32.7 33-32.7z"/>
2<path fill="currentColor" d="M83.3 64.2v16.3H16.6V64.2H-.1v32.6H100V64.2H83.3z"/>\x3c!--Created by Michael Zenaty from the Noun Project--\x3e</svg>\n',$t=function(t){function e(e){return t.call(this,e,"psv-button--hover-scale psv-download-button",!0)||this}o(e,t);var n=e.prototype;return n.onClick=function(){var t=this,e=document.createElement("a");e.href=this.psv.config.downloadUrl||this.psv.config.panorama,e.download=e.href.split("/").pop(),this.psv.container.appendChild(e),e.click(),setTimeout(function(){t.psv.container.removeChild(e)},100)},n.refreshUi=function(){var t=this.psv.adapter.constructor.supportsDownload||this.psv.config.downloadUrl;t&&!this.prop.visible?this.show():!t&&this.prop.visible&&this.hide()},e}(Vt);$t.id="download",$t.icon=Kt;var Qt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M100 40H87.1V18.8h-21V6H100zM100 93.2H66V80.3h21.1v-21H100zM34 93.2H0v-34h12.9v21.1h21zM12.9 40H0V6h34v12.9H12.8z"/>\x3c!--Created by Garrett Knoll from the Noun Project--\x3e</svg>\n',te='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M66 7h13v21h21v13H66zM66 60.3h34v12.9H79v21H66zM0 60.3h34v34H21V73.1H0zM21 7h13v34H0V28h21z"/>\x3c!--Created by Garrett Knoll from the Noun Project--\x3e</svg>\n',ee=function(t){function e(e){var n;return(n=t.call(this,e,"psv-button--hover-scale psv-fullscreen-button")||this).psv.on(w.FULLSCREEN_UPDATED,l(n)),n}o(e,t);var n=e.prototype;return n.destroy=function(){this.psv.off(w.FULLSCREEN_UPDATED,this),t.prototype.destroy.call(this)},n.handleEvent=function(t){t.type===w.FULLSCREEN_UPDATED&&this.toggleActive(t.args[0])},n.onClick=function(){this.psv.toggleFullscreen()},e}(Vt);ee.id="fullscreen",ee.icon=Qt,ee.iconActive=te;var ne='<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 80 80"><g fill="currentColor"><circle r="10" cx="20" cy="20"/><circle r="10" cx="50" cy="20"/><circle r="10" cx="80" cy="20"/><circle r="10" cx="20" cy="50"/><circle r="10" cx="50" cy="50"/><circle r="10" cx="80" cy="50"/><circle r="10" cx="20" cy="80"/><circle r="10" cx="50" cy="80"/><circle r="10" cx="80" cy="80"/></g>\x3c!-- Created by Richard Kunák from the Noun Project--\x3e</svg>\n',ie=function(t){function e(e){var n;return(n=t.call(this,e,"psv-button--hover-scale psv-menu-button")||this).psv.on(w.OPEN_PANEL,l(n)),n.psv.on(w.CLOSE_PANEL,l(n)),t.prototype.hide.call(l(n)),n}o(e,t);var n=e.prototype;return n.destroy=function(){this.psv.off(w.OPEN_PANEL,this),this.psv.off(w.CLOSE_PANEL,this),t.prototype.destroy.call(this)},n.handleEvent=function(t){switch(t.type){case w.OPEN_PANEL:this.toggleActive(t.args[0]===E.MENU);break;case w.CLOSE_PANEL:this.toggleActive(!1)}},n.hide=function(e){t.prototype.hide.call(this,e),this.__hideMenu()},n.show=function(e){t.prototype.show.call(this,e),this.prop.active&&this.__showMenu()},n.onClick=function(){this.prop.active?this.__hideMenu():this.__showMenu()},n.__showMenu=function(){var t=this;this.psv.panel.show({id:E.MENU,content:e.MENU_TEMPLATE(this.parent.collapsed,this.psv,st(e.BUTTON_DATA)),noMargin:!0,clickHandler:function(n){var i=n.target?W(n.target,"li"):void 0,r=i?i.dataset[e.BUTTON_DATA]:void 0;r&&(t.parent.getButton(r).onClick(),t.__hideMenu())}})},n.__hideMenu=function(){this.psv.panel.hide(E.MENU)},e}(Vt);ie.id="menu",ie.icon=ne,ie.BUTTON_DATA="psvButton",ie.MENU_TEMPLATE=function(t,e,n){return'\n<div class="psv-panel-menu psv-panel-menu--stripped">\n <h1 class="psv-panel-menu-title">'+ne+" "+e.config.lang.menu+'</h1>\n <ul class="psv-panel-menu-list">\n '+t.map(function(t){return"\n <li data-"+n+'="'+t.prop.id+'" class="psv-panel-menu-item" tabindex="0">
2\n <span class="psv-panel-menu-item-icon">'+t.container.innerHTML+'</span>\n <span class="psv-panel-menu-item-label">'+t.container.title+"</span>\n </li>\n "}).join("")+"\n </ul>\n</div>\n"};var re='<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 40 432 432"><g transform="rotate(0, 256, 256)"><path fill="currentColor" d="M425.23 210.55H227.39a5 5 0 01-3.53-8.53l56.56-56.57a45.5 45.5 0 000-64.28 45.15 45.15 0 00-32.13-13.3 45.15 45.15 0 00-32.14 13.3L41.32 256l174.83 174.83a45.15 45.15 0 0032.14 13.3 45.15 45.15 0 0032.13-13.3 45.5 45.5 0 000-64.28l-56.57-56.57a5 5 0 013.54-8.53h197.84c25.06 0 45.45-20.39 45.45-45.45s-20.4-45.45-45.45-45.45z"/></g>\x3c!-- Created by Flatart from the Noun Project --\x3e</svg>\n',se=function(){function t(t){void 0===t&&(t=200),this.delay=t,this.time=0,this.timeout=null}var e=t.prototype;return e.down=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.time=(new Date).getTime()},e.up=function(t){var e=this;this.time&&((new Date).getTime()-this.time<this.delay?this.timeout=setTimeout(function(){t(),e.timeout=null,e.time=0},this.delay):(t(),this.time=0))},t}();function oe(t){var e=0;switch(t){case"up":e=90;break;case"right":e=180;break;case"down":e=-90;break;default:e=0}return re.replace("rotate(0","rotate("+e)}var ae=function(t){function e(e,n){var i;return(i=t.call(this,e,"psv-button--hover-scale psv-move-button")||this).container.title=i.psv.config.lang.move,i.prop=s({},i.prop,{value:n,handler:new se}),i.container.addEventListener("mousedown",l(i)),i.container.addEventListener("keydown",l(i)),i.container.addEventListener("keyup",l(i)),i.psv.container.addEventListener("mouseup",l(i)),i.psv.container.addEventListener("touchend",l(i)),i}o(e,t);var n=e.prototype;return n.destroy=function(){this.__onMouseUp(),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),t.prototype.destroy.call(this)},n.handleEvent=function(t){switch(t.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":t.key===C.Enter&&this.__onMouseDown();break;case"keyup":t.key===C.Enter&&this.__onMouseUp()}},n.isSupported=function(){return{initial:!P.isTouchEnabled.initial,promise:P.isTouchEnabled.promise.then(function(t){return!t})}},n.onClick=function(){},n.__onMouseDown=function(){this.prop.enabled&&(this.psv.__stopAll(),this.psv.dynamics.position.roll(this.prop.value),this.prop.handler.down())},n.__onMouseUp=function(){var t=this;this.prop.enabled&&this.prop.handler.up(function(){t.psv.dynamics.position.stop(),t.psv.resetIdleTimer()})},e}(Vt);ae.groupId="move";var le=function(t){function e(e){return t.call(this,e,{latitude:!0})||this}return o(e,t),e}(ae);le.id="moveDown",le.icon=oe("down");var ce=function(t){function e(e){return t.call(this,e,{longitude:!0})||this}return o(e,t),e}(ae);ce.id="moveLeft",ce.icon=oe("left");var he=function(t){function e(e){return t.call(this,e,{longitude:!1})||this}return o(e,t),e}(ae);he.id="moveRight",he.icon=oe("right");var ue=function(t){function e(e){return t.call(this,e,{latitude:!1})||this}return o(e,t),e}(ae);ue.id="moveUp",ue.icon=oe("up");var de=function(t){function e(e,n){var i;return(i=t.call(this,e,"psv-button--hover-scale psv-zoom-button")||this).prop=s({},i.prop,{value:n,handler:new se}),i.container.addEventListener("mousedown",l(i)),i.container.addEventListener("keydown",l(i)),i.container.addEventListener("keyup",l(i)),i.psv.container.addEventListener("mouseup",l(i)),i.psv.container.addEventListener("touchend",l(i)),i}o(e,t);var n=e.prototype;return n.destroy=function(){this.__onMouseUp(),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),t.prototype.destroy.call(this)},n.handleEvent=function(t){switch(t.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":t.key===C.Enter&&this.__onMouseDown();break;case"keyup":t.key===C.Enter&&this.__onMouseUp()}},n.isSupported=function(){return{initial:!P.isTouchEnabled.initial,promise:P.isTouchEnabled.promise.then(function(t){return!t})}},n.onClick=function(){},n.__onMouseDown=function(){this.prop.enabled&&(this.psv.dynamics.zoom.roll(this.prop.value),this.prop.handler.down())},n.__onMouseUp=function(){var t=this;this.prop.enabled&&this.prop.handler.up(function(){return t.psv.dynamics.zoom.stop()})},e}(Vt);de.groupId="zoom";var pe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
2<path fill="currentColor" d="M14.043 12.22a7.738 7.738 0 1 0-1.823 1.822l4.985 4.985c.503.504 1.32.504 1.822 0a1.285 1.285 0 0 0 0-1.822l-4.984-4.985zm-6.305 1.043a5.527 5.527 0 1 1 0-11.053 5.527 5.527 0 0 1 0 11.053z"/><path fill="currentColor" d="M8.728 4.009H6.744v2.737H4.006V8.73h2.738v2.736h1.984V8.73h2.737V6.746H8.728z"/>\x3c!--Created by Ryan Canning from the Noun Project--\x3e</svg>\n',fe=function(t){function e(e){return t.call(this,e,!1)||this}return o(e,t),e}(de);fe.id="zoomIn",fe.icon=pe;var me='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" d="M14.043 12.22a7.738 7.738 0 1 0-1.823 1.822l4.985 4.985c.503.504 1.32.504 1.822 0a1.285 1.285 0 0 0 0-1.822l-4.984-4.985zm-6.305 1.043a5.527 5.527 0 1 1 0-11.053 5.527 5.527 0 0 1 0 11.053z"/><path fill="currentColor" d="M4.006 6.746h7.459V8.73H4.006z"/>\x3c!--Created by Ryan Canning from the Noun Project--\x3e</svg>\n',ge=function(t){function e(e){return t.call(this,e,!0)||this}return o(e,t),e}(de);ge.id="zoomOut",ge.icon=me;var ve=function(t){function e(e){var n;return(n=t.call(this,e,"psv-zoom-range",!1,!1)||this).prop=s({},n.prop,{mediaMinWidth:0}),n.zoomRange=document.createElement("div"),n.zoomRange.className="psv-zoom-range-line",n.container.appendChild(n.zoomRange),n.zoomValue=document.createElement("div"),n.zoomValue.className="psv-zoom-range-handle",n.zoomRange.appendChild(n.zoomValue),n.slider=new Ft({container:n.container,direction:Ft.HORIZONTAL,onUpdate:function(t){return n.__onSliderUpdate(t)}}),n.prop.mediaMinWidth=parseInt(Z(n.container,"maxWidth"),10),n.psv.on(w.ZOOM_UPDATED,l(n)),n.psv.prop.ready?n.__moveZoomValue(n.psv.getZoomLevel()):n.psv.once(w.READY,l(n)),n.refreshUi(),n}o(e,t);var n=e.prototype;return n.destroy=function(){this.slider.destroy(),delete this.zoomRange,delete this.zoomValue,this.psv.off(w.ZOOM_UPDATED,this),this.psv.off(w.READY,this),t.prototype.destroy.call(this)},n.handleEvent=function(t){switch(t.type){case w.ZOOM_UPDATED:this.__moveZoomValue(t.args[0]);break;case w.READY:this.__moveZoomValue(this.psv.getZoomLevel())}},n.isSupported=function(){return{initial:!P.isTouchEnabled.initial,promise:P.isTouchEnabled.promise.then(function(t){return!t})}},n.refreshUi=function(){this.prop.supported&&(this.psv.prop.size.width<=this.prop.mediaMinWidth&&this.prop.visible?this.hide():this.psv.prop.size.width>this.prop.mediaMinWidth&&!this.prop.visible&&this.show())},n.onClick=function(){},n.__moveZoomValue=function(t){this.zoomValue.style.left=t/100*this.zoomRange.offsetWidth-this.zoomValue.offsetWidth/2+"px"},n.__onSliderUpdate=function(t){t.mousedown&&this.psv.zoom(100*t.value)},e}(Vt);ve.id="zoomRange",ve.groupId="zoom";var _e,ye=function(t){function e(e){var n;return(n=t.call(this)||this).psv=e,n}o(e,t);var n=e.prototype;return n.init=function(){},n.destroy=function(){delete this.psv},e}(n.EventEmitter);ye.id=null;var xe={panorama:null,overlay:null,overlayOpacity:1,container:null,adapter:null,plugins:[],caption:null,description:null,downloadUrl:null,loadingImg:null,loadingTxt:"Loading...",size:null,fisheye:!1,minFov:30,maxFov:90,defaultZoomLvl:50,defaultLong:0,defaultLat:0,sphereCorrection:null,moveSpeed:1,zoomSpeed:1,autorotateDelay:null,autorotateIdle:!1,autorotateSpeed:"2rpm",autorotateLat:null,autorotateZoomLvl:null,moveInertia:!0,mousewheel:!0,mousemove:!0,mousewheelCtrlKey:!1,touchmoveTwoFingers:!1,useXmpData:!0,panoData:null,requestHeaders:null,canvasBackground:"#000",withCredentials:!1,navbar:["autorotate","zoom","move","download","description","caption","fullscreen"],lang:{autorotate:"Automatic rotation",zoom:"Zoom",zoomOut:"Zoom out",zoomIn:"Zoom in",move:"Move",download:"Download",fullscreen:"Fullscreen",menu:"Menu",twoFingers:"Use two fingers to navigate",ctrlZoom:"Use ctrl + scroll to zoom the image",loadError:"The panorama can't be loaded"},keyboard:(_e={},_e[C.ArrowUp]=M.ROTATE_LAT_UP,_e[C.ArrowDown]=M.ROTATE_LAT_DOWN,_e[C.ArrowRight]=M.ROTATE_LONG_RIGHT,_e[C.ArrowLeft]=M.ROTATE_LONG_LEFT,_e[C.PageUp]=M.ZOOM_IN,_e[C.PageDown]=M.ZOOM_OUT,_e[C.Plus]=M.ZOOM_IN,_e[C.Minus]=M.ZOOM_OUT,_e[C.Space]=M.TOGGLE_AUTOROTATE,_e)},be={panorama:"Use setPanorama method to change the panorama",panoData:"Use setPanorama method to change the panorama",container:"Cannot change viewer container",adapter:"Cannot change adapter",plugins:"Cannot change plugins"},Me={captureCursor:"captureCursor is deprecated"},we={container:function(t){if(!t)throw new c("No value given for container.");return t},adapter:function(t){if(!(t=t?Array.isArray(t)?[gt(t[0],h),t[1]]:[gt(t,h)]:[Bt])[0])throw new c("Un undefined value with given for adapter.");return t},overlayOpacity:function(t){return e.MathUtils.clamp(t,0,1)},defaultLong:function(t){return Pt(t)},defaultLat:function(t){return Pt(t,!0)},defaultZoomLvl:function(t){return e.MathUtils.clamp(t,0,100)},minFov:function(t,n){return n.maxFov<t&&(yt("maxFov cannot be lower than minFov"),t=n.maxFov),e.MathUtils.clamp(t,1,179)},maxFov:function(t,n){return t<n.minFov&&(t=n.minFov),e.MathUtils.clamp(t,1,179)},lang:function(t){return Array.isArray(t.twoFingers)&&(yt("lang.twoFingers must not be an array"),t.twoFingers=t.twoFingers[0]),s({},xe.lang,t)},keyboard:function(t){return!0===t?ct(xe.keyboard):t},autorotateLat:function(t,e){return Pt(null===t?e.defaultLat:t,!0)},autorotateZoomLvl:function(t){return dt(t)?null:e.MathUtils.clamp(t,0,100)},autorotateSpeed:function(t){return Lt(t)},autorotateIdle:function(t,e){return t&&dt(e.autorotateDelay)?(yt("autorotateIdle requires a non null autorotateDelay"),!1):t},fisheye:function(t){return!0===t?1:!1===t?0:t},plugins:function(t){return t.map(function(t){if(!(t=Array.isArray(t)?[gt(t[0],ye),t[1]]:[gt(t,ye)])[0])throw new c("Un undefined value was given for plugins.");return t})}};function Se(t){var e=ct(xe);lt(e,t);var n={};return ut(e,function(t,i){if(Me[i])yt(Me[i]);else{if(!Object.prototype.hasOwnProperty.call(xe,i))throw new c("Unknown option "+i);we[i]?n[i]=we[i](t,e):n[i]=t}}),n}var Te=function(t){function e(e,n){var i;return(i=t.call(this,e,"psv-caption")||this).prop=s({},i.prop,{id:i.constructor.id,collapsable:!1,width:0,contentWidth:0}),i.content=document.createElement("div"),i.content.className="psv-caption-content",i.container.appendChild(i.content),i.setCaption(n),i}o(e,t);var n=e.prototype;return n.destroy=function(){delete this.content,t.prototype.destroy.call(this)},n.setCaption=function(t){this.show(),this.content.innerHTML=t,this.prop.contentWidth=t?this.content.offsetWidth:0,this.refreshUi()},n.refreshUi=function(){this.toggle(this.container.offsetWidth>=this.prop.contentWidth),this.__refreshButton()},n.hide=function(){this.content.style.display="none",this.prop.visible=!1},n.show=function(){this.content.style.display="",this.prop.visible=!0},n.__refreshButton=function(){var t;null==(t=this.psv.navbar.getButton(Jt.id,!1))||t.refreshUi(!0)},e}(Ht);Te.id="caption";var Ee={},Ae={};function Ce(t,e){if(!t.id)throw new c("Button ID is required");if(Ee[t.id]=t,t.groupId&&(Ae[t.groupId]=Ae[t.groupId]||[],Ae[t.groupId].push(t)),"string"==typeof e)switch(e){case"start":xe.navbar.unshift(t.id);break;case"end":xe.navbar.push(t.id);break;default:var n=e.split(":"),i=n[0],r=n[1];
2xe.navbar.splice(xe.navbar.indexOf(i)+("right"===r?1:0),0,t.id)}}[jt,ge,ve,fe,Jt,$t,ee,ce,he,ue,le].forEach(Ce);var Re=function(t){function e(e){var n;return(n=t.call(this,e,"psv-navbar psv--capture-event")||this).children=[],n.collapsed=[],n}o(e,t);var n=e.prototype;return n.setButtons=function(t){var e=this;this.children.slice().forEach(function(t){return t.destroy()}),this.children.length=0;var n=this.__cleanButtons(t);-1!==n.indexOf(Te.id)&&-1===n.indexOf(Jt.id)&&n.splice(n.indexOf(Te.id),0,Jt.id),n.forEach(function(t){if("object"==typeof t)new Xt(e,t);else if(Ee[t])new Ee[t](e);else if(Ae[t])Ae[t].forEach(function(t){return new t(e)});else{if(t!==Te.id)throw new c("Unknown button "+t);new Te(e,e.psv.config.caption)}}),new ie(this),this.children.forEach(function(t){"function"==typeof t.checkSupported&&t.checkSupported()})},n.setCaption=function(t){var e=this.getButton(Te.id,!1);null==e||e.setCaption(t)},n.getButton=function(t,e){void 0===e&&(e=!0);var n=null;return this.children.some(function(e){return e.prop.id===t&&(n=e,!0)}),!n&&e&&yt('button "'+t+'" not found in the navbar'),n},n.show=function(){this.container.classList.add("psv-navbar--open"),this.prop.visible=!0},n.hide=function(){this.container.classList.remove("psv-navbar--open"),this.prop.visible=!1},n.refreshUi=function(){if(t.prototype.refreshUi.call(this),!0===this.psv.prop.uiRefresh){var e=this.container.offsetWidth,n=0,i=[],r=[];if(this.children.forEach(function(t){t.prop.visible&&(n+=t.prop.width,i.push(t),t.prop.collapsable&&r.push(t))}),!i.length)return;e<n&&r.length>0?(r.forEach(function(t){return t.collapse()}),this.collapsed=r,this.getButton(ie.id).show(!1)):e>=n&&this.collapsed.length>0&&(this.collapsed.forEach(function(t){return t.uncollapse()}),this.collapsed=[],this.getButton(ie.id).hide(!1));var s=this.getButton(Te.id,!1);s&&s.refreshUi()}},n.__cleanButtons=function(t){return!0===t?ct(xe.navbar):"string"==typeof t?t.split(/[ ,]/):t||[]},e}(Ht),Le=function(t){function n(e){var n;return(n=t.call(this,e,"psv-loader-container")||this).loader=document.createElement("div"),n.loader.className="psv-loader",n.container.appendChild(n.loader),n.canvas=document.createElement("canvas"),n.canvas.className="psv-loader-canvas",n.canvas.width=n.loader.clientWidth*P.pixelRatio,n.canvas.height=n.loader.clientWidth*P.pixelRatio,n.loader.appendChild(n.canvas),n.prop=s({},n.prop,{tickness:(n.loader.offsetWidth-n.loader.clientWidth)/2*P.pixelRatio,current:null}),n.refreshUi(),n.hide(),n}o(n,t);var i=n.prototype;return i.destroy=function(){delete this.loader,delete this.canvas,t.prototype.destroy.call(this)},i.refreshUi=function(){if(this.prop.current!==(this.psv.config.loadingImg||this.psv.config.loadingTxt)){var t;if(this.prop.current&&this.loader.removeChild(this.loader.lastChild),this.psv.config.loadingImg?((t=document.createElement("img")).className="psv-loader-image",t.src=this.psv.config.loadingImg):this.psv.config.loadingTxt&&((t=document.createElement("div")).className="psv-loader-text",t.innerHTML=this.psv.config.loadingTxt),t){var e=Math.round(Math.sqrt(2*Math.pow((this.canvas.width/2-this.prop.tickness/2)/P.pixelRatio,2)));t.style.maxWidth=e+"px",t.style.maxHeight=e+"px",this.loader.appendChild(t)}this.prop.current=this.psv.config.loadingImg||this.psv.config.loadingTxt}},i.setProgress=function(t){var n=this.canvas.getContext("2d");n.clearRect(0,0,this.canvas.width,this.canvas.height),n.lineWidth=this.prop.tickness,n.strokeStyle=Z(this.loader,"color"),n.beginPath(),n.arc(this.canvas.width/2,this.canvas.height/2,this.canvas.width/2-this.prop.tickness/2,-Math.PI/2,e.MathUtils.clamp(t,0,100)/100*2*Math.PI-Math.PI/2),n.stroke(),this.psv.trigger(w.LOAD_PROGRESS,Math.round(t))},n}(Ht),Pe=function(t){function e(e){var n;return(n=t.call(this,e,"psv-notification")||this).prop=s({},n.prop,{visible:!1,contentId:void 0,timeout:null}),n.content=document.createElement("div"),n.content.className="psv-notification-content",n.container.appendChild(n.content),n.content.addEventListener("click",function(){return n.hide()}),n}o(e,t);var n=e.prototype;return n.destroy=function(){delete this.content,t.prototype.destroy.call(this)},n.isVisible=function(t){return this.prop.visible&&(!t||!this.prop.contentId||this.prop.contentId===t)},n.toggle=function(){throw new c("Notification cannot be toggled")},n.show=function(t){var e=this;this.prop.timeout&&(clearTimeout(this.prop.timeout),this.prop.timeout=null),"string"==typeof t&&(t={content:t}),this.prop.contentId=t.id,this.content.innerHTML=t.content,this.container.classList.add("psv-notification--visible"),this.prop.visible=!0,this.psv.trigger(w.SHOW_NOTIFICATION,t.id),t.timeout&&(this.prop.timeout=setTimeout(function(){return e.hide(t.id)},t.timeout))},n.hide=function(t){if(this.isVisible(t)){var e=this.prop.contentId;this.container.classList.remove("psv-notification--visible"),this.prop.visible=!1,this.prop.contentId=void 0,this.psv.trigger(w.HIDE_NOTIFICATION,e)}},e}(Ht),Ie=function(t){function e(e){var n;
2return(n=t.call(this,e,"psv-overlay")||this).prop=s({},n.prop,{contentId:void 0,dissmisable:!0}),n.image=document.createElement("div"),n.image.className="psv-overlay-image",n.container.appendChild(n.image),n.text=document.createElement("div"),n.text.className="psv-overlay-text",n.container.appendChild(n.text),n.subtext=document.createElement("div"),n.subtext.className="psv-overlay-subtext",n.container.appendChild(n.subtext),n.psv.on(w.CLICK,l(n)),n.psv.on(w.KEY_PRESS,l(n)),t.prototype.hide.call(l(n)),n}o(e,t);var n=e.prototype;return n.destroy=function(){this.psv.off(w.CLICK,this),this.psv.off(w.KEY_PRESS,this),delete this.image,delete this.text,delete this.subtext,t.prototype.destroy.call(this)},n.handleEvent=function(t){switch(t.type){case w.CLICK:this.isVisible()&&this.prop.dissmisable&&(this.hide(),t.stopPropagation());break;case w.KEY_PRESS:this.isVisible()&&this.prop.dissmisable&&t.args[0]===C.Escape&&(this.hide(),t.preventDefault())}},n.isVisible=function(t){return this.prop.visible&&(!t||!this.prop.contentId||this.prop.contentId===t)},n.toggle=function(){throw new c("Overlay cannot be toggled")},n.show=function(e){"string"==typeof e&&(e={text:e}),this.prop.contentId=e.id,this.prop.dissmisable=!1!==e.dissmisable,this.image.innerHTML=e.image||"",this.text.innerHTML=e.text||"",this.subtext.innerHTML=e.subtext||"",t.prototype.show.call(this),this.psv.trigger(w.SHOW_OVERLAY,e.id)},n.hide=function(e){if(this.isVisible(e)){var n=this.prop.contentId;t.prototype.hide.call(this),this.prop.contentId=void 0,this.psv.trigger(w.HIDE_OVERLAY,n)}},e}(Ht),De=200,Oe=function(t){function e(e){var n;(n=t.call(this,e,"psv-panel psv--capture-event")||this).prop=s({},n.prop,{visible:!1,contentId:void 0,mouseX:0,mouseY:0,mousedown:!1,clickHandler:null,keyHandler:null,width:{}});var i=document.createElement("div");i.className="psv-panel-resizer",n.container.appendChild(i);var r=document.createElement("div");return r.className="psv-panel-close-button",n.container.appendChild(r),n.content=document.createElement("div"),n.content.className="psv-panel-content",n.container.appendChild(n.content),n.container.addEventListener(P.mouseWheelEvent,function(t){return t.stopPropagation()}),r.addEventListener("click",function(){return n.hide()}),i.addEventListener("mousedown",l(n)),i.addEventListener("touchstart",l(n)),n.psv.container.addEventListener("mouseup",l(n)),n.psv.container.addEventListener("touchend",l(n)),n.psv.container.addEventListener("mousemove",l(n)),n.psv.container.addEventListener("touchmove",l(n)),n.psv.on(w.KEY_PRESS,l(n)),n}o(e,t);var n=e.prototype;return n.destroy=function(){this.psv.off(w.KEY_PRESS,this),this.psv.container.removeEventListener("mousemove",this),this.psv.container.removeEventListener("touchmove",this),this.psv.container.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchend",this),delete this.prop,delete this.content,t.prototype.destroy.call(this)},n.handleEvent=function(t){switch(t.type){case"mousedown":this.__onMouseDown(t);break;case"touchstart":this.__onTouchStart(t);break;case"mousemove":this.__onMouseMove(t);break;case"touchmove":this.__onTouchMove(t);break;case"mouseup":case"touchend":this.__onMouseUp(t);break;case w.KEY_PRESS:this.isVisible()&&t.args[0]===C.Escape&&(this.hide(),t.preventDefault())}},n.isVisible=function(t){return this.prop.visible&&(!t||!this.prop.contentId||this.prop.contentId===t)},n.toggle=function(){throw new c("Panel cannot be toggled")},n.show=function(t){var e=this,n=this.isVisible(t.id);"string"==typeof t&&(t={content:t}),this.prop.contentId=t.id,this.prop.visible=!0,this.prop.clickHandler&&(this.content.removeEventListener("click",this.prop.clickHandler),this.content.removeEventListener("keydown",this.prop.keyHandler),this.prop.clickHandler=null,this.prop.keyHandler=null),t.id&&this.prop.width[t.id]?this.container.style.width=this.prop.width[t.id]:t.width?this.container.style.width=t.width:this.container.style.width=null,this.content.innerHTML=t.content,this.content.scrollTop=0,this.container.classList.add("psv-panel--open"),B(this.content,"psv-panel-content--no-margin",!0===t.noMargin),t.clickHandler&&(this.prop.clickHandler=t.clickHandler,this.prop.keyHandler=function(e){e.key===C.Enter&&t.clickHandler(e)},this.content.addEventListener("click",this.prop.clickHandler),this.content.addEventListener("keydown",this.prop.keyHandler),n||setTimeout(function(){var t;null==(t=e.content.querySelector("a,button,[tabindex]"))||t.focu
2s()},300)),this.psv.trigger(w.OPEN_PANEL,t.id)},n.hide=function(t){if(this.isVisible(t)){var e=this.prop.contentId;this.prop.visible=!1,this.prop.contentId=void 0,this.content.innerHTML=null,this.container.classList.remove("psv-panel--open"),this.prop.clickHandler&&(this.content.removeEventListener("click",this.prop.clickHandler),this.prop.clickHandler=null),this.psv.trigger(w.CLOSE_PANEL,e)}},n.__onMouseDown=function(t){t.stopPropagation(),this.__startResize(t)},n.__onTouchStart=function(t){t.stopPropagation(),this.__startResize(t.changedTouches[0])},n.__onMouseUp=function(t){this.prop.mousedown&&(t.stopPropagation(),this.prop.mousedown=!1,this.content.classList.remove("psv-panel-content--no-interaction"))},n.__onMouseMove=function(t){this.prop.mousedown&&(t.stopPropagation(),this.__resize(t))},n.__onTouchMove=function(t){this.prop.mousedown&&this.__resize(t.touches[0])},n.__startResize=function(t){this.prop.mouseX=t.clientX,this.prop.mouseY=t.clientY,this.prop.mousedown=!0,this.content.classList.add("psv-panel-content--no-interaction")},n.__resize=function(t){var e=t.clientX,n=t.clientY,i=Math.max(De,this.container.offsetWidth-(e-this.prop.mouseX))+"px";this.prop.contentId&&(this.prop.width[this.prop.contentId]=i),this.container.style.width=i,this.prop.mouseX=e,this.prop.mouseY=n},e}(Ht),Ne='<svg xmlns="http://www.w3.org/2000/svg" viewBox="15 15 70 70"><path fill="currentColor" d="M50,16.2c-18.6,0-33.8,15.1-33.8,33.8S31.4,83.7,50,83.7S83.8,68.6,83.8,50S68.6,16.2,50,16.2z M50,80.2c-16.7,0-30.2-13.6-30.2-30.2S33.3,19.7,50,19.7S80.3,33.3,80.3,50S66.7,80.2,50,80.2z"/><rect fill="currentColor" x="48" y="31.7" width="4" height="28"/><rect fill="currentColor" x="48" y="63.2" width="4" height="5"/>\x3c!--Created by Shastry from the Noun Project--\x3e</svg>\n',Ue=function(){function t(t){this.psv=t,this.config=t.config,this.prop=t.prop}return t.prototype.destroy=function(){delete this.psv,delete this.config,delete this.prop},t}(),ke=new e.Vector2,Fe=new e.Vector3,ze=new e.Euler(0,0,0,"ZXY"),Be=function(t){function n(e){return t.call(this,e)||this}o(n,t);var i=n.prototype;return i.fovToZoomLevel=function(t){var e=Math.round((t-this.config.minFov)/(this.config.maxFov-this.config.minFov)*100);return e-2*(e-50)},i.zoomLevelToFov=function(t){return this.config.maxFov+t/100*(this.config.minFov-this.config.maxFov)},i.vFovToHFov=function(t){return e.MathUtils.radToDeg(2*Math.atan(Math.tan(e.MathUtils.degToRad(t)/2)*this.prop.aspect))},i.speedToDuration=function(t,e){if(t&&"number"==typeof t)return Math.abs(t);var n=t?Lt(t):this.config.autorotateSpeed;return e/Math.abs(n)*1e3},i.textureCoordsToSphericalCoords=function(t){var e=this.prop.panoData;if(!e)throw new c("Current adapter does not support texture coordinates.");var n=(t.x+e.croppedX)/e.fullWidth*Math.PI*2,i=(t.y+e.croppedY)/e.fullHeight*Math.PI,r={longitude:n>=Math.PI?n-Math.PI:n+Math.PI,latitude:Math.PI/2-i};return ze.equals(this.psv.renderer.mesh.rotation)&&ze.equals(this.psv.renderer.meshContainer.rotation)?r:(this.sphericalCoordsToVector3(r,Fe),Fe.applyEuler(this.psv.renderer.mesh.rotation),Fe.applyEuler(this.psv.renderer.meshContainer.rotation),this.vector3ToSphericalCoords(Fe))},i.sphericalCoordsToTextureCoords=function(t){var e=this.prop.panoData;if(!e)throw new c("Current adapter does not support texture coordinates.");ze.equals(this.psv.renderer.mesh.rotation)&&ze.equals(this.psv.renderer.meshContainer.rotation)||(this.sphericalCoordsToVector3(t,Fe),Ot(Fe,this.psv.renderer.meshContainer.rotation),Ot(Fe,this.psv.renderer.mesh.rotation),t=this.vector3ToSphericalCoords(Fe));var n=t.longitude/Math.PI/2*e.fullWidth,i=t.latitude/Math.PI*e.fullHeight;return{x:Math.round(t.longitude<Math.PI?n+e.fullWidth/2:n-e.fullWidth/2)-e.croppedX,y:Math.round(e.fullHeight/2-i)-e.croppedY}},i.sphericalCoordsToVector3=function(t,n){return n||(n=new e.Vector3),n.x=y*-Math.cos(t.latitude)*Math.sin(t.longitude),n.y=y*Math.sin(t.latitude),n.z=y*Math.cos(t.latitude)*Math.cos(t.longitude),n},i.vector3ToSphericalCoords=function(t){var e=Math.acos(t.y/Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z)),n=Math.atan2(t.x,t.z);return{longitude:n<0?-n:2*Math.PI-n,latitude:Math.PI/2-e}},i.viewerCoordsToVector3=function(t){var e=this.getIntersections(t).filter(function(t){return t.object.userData[b]});return e.length?e[0].point:null},i.vector3ToViewerCoords=function(t){var e=t.clone();return e.project(this.psv.renderer.camera),{x:Math.round((e.x+1)/2*this.prop.size.width),y:Math.round((1-e.y)/2*this.prop.size.height)}},i.sphericalCoordsToViewerCoords=function(t){return this.vector3ToViewerCoords(this.sphericalCoordsToVector3(t,Fe))},i.getIntersections=function(t){return ke.x=2*t.x/this.prop.size.width-1,ke.y=-2*t.y/this.prop.size.height+1,this.psv.renderer.raycaster.setFromCamera(ke,this.psv.renderer.camera),this.psv.renderer.raycaster.intersectObjects(this.psv.renderer.scene.children,!0).filter(function(t){return!!t.object.userData})},i.cleanPosition=function(t){return void 0!==t.x&&void 0!==t.y?this.textureCoordsToSphericalCoords(t):{longitude:Pt(t.longitude),latitude:Pt(t.latitude,!this.prop.littlePlanet)}},i.cleanSphereCorrection=function(t){return{pan:Pt((null==t?void 0:t.pan)||0),tilt:Pt((null==t?void 0:t.t
2ilt)||0,!0),roll:Pt((null==t?void 0:t.roll)||0,!0,!1)}},i.cleanPanoramaPose=function(t){return{pan:e.MathUtils.degToRad((null==t?void 0:t.poseHeading)||0),tilt:e.MathUtils.degToRad((null==t?void 0:t.posePitch)||0),roll:e.MathUtils.degToRad((null==t?void 0:t.poseRoll)||0)}},n}(Ue),He='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M33.38 33.2a1.96 1.96 0 0 0 1.5-3.23 10.61 10.61 0 0 1 7.18-17.51c.7-.06 1.31-.49 1.61-1.12a13.02 13.02 0 0 1 11.74-7.43c7.14 0 12.96 5.8 12.96 12.9 0 3.07-1.1 6.05-3.1 8.38-.7.82-.61 2.05.21 2.76.83.7 2.07.6 2.78-.22a16.77 16.77 0 0 0 4.04-10.91C72.3 7.54 64.72 0 55.4 0a16.98 16.98 0 0 0-14.79 8.7 14.6 14.6 0 0 0-12.23 14.36c0 3.46 1.25 6.82 3.5 9.45.4.45.94.69 1.5.69m45.74 43.55a22.13 22.13 0 0 1-5.23 12.4c-4 4.55-9.53 6.86-16.42 6.86-12.6 0-20.1-10.8-20.17-10.91a1.82 1.82 0 0 0-.08-.1c-5.3-6.83-14.55-23.82-17.27-28.87-.05-.1 0-.21.02-.23a6.3 6.3 0 0 1 8.24 1.85l9.38 12.59a1.97 1.97 0 0 0 3.54-1.17V25.34a4 4 0 0 1 1.19-2.87 3.32 3.32 0 0 1 2.4-.95c1.88.05 3.4 1.82 3.4 3.94v24.32a1.96 1.96 0 0 0 3.93 0v-33.1a3.5 3.5 0 0 1 7 0v35.39a1.96 1.96 0 0 0 3.93 0v-.44c.05-2.05 1.6-3.7 3.49-3.7 1.93 0 3.5 1.7 3.5 3.82v5.63c0 .24.04.48.13.71l.1.26a1.97 1.97 0 0 0 3.76-.37c.33-1.78 1.77-3.07 3.43-3.07 1.9 0 3.45 1.67 3.5 3.74l-1.77 18.1zM77.39 51c-1.25 0-2.45.32-3.5.9v-.15c0-4.27-3.33-7.74-7.42-7.74-1.26 0-2.45.33-3.5.9V16.69a7.42 7.42 0 0 0-14.85 0v1.86a7 7 0 0 0-3.28-.94 7.21 7.21 0 0 0-5.26 2.07 7.92 7.92 0 0 0-2.38 5.67v37.9l-5.83-7.82a10.2 10.2 0 0 0-13.35-2.92 4.1 4.1 0 0 0-1.53 5.48C20 64.52 28.74 80.45 34.07 87.34c.72 1.04 9.02 12.59 23.4 12.59 7.96 0 14.66-2.84 19.38-8.2a26.06 26.06 0 0 0 6.18-14.6l1.78-18.2v-.2c0-4.26-3.32-7.73-7.42-7.73z"/>\x3c!--Created by AomAm from the Noun Project--\x3e</svg>\n',Ve='<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 17 79 79"><path fill="currentColor" d="M38.1 29.27c-.24 0-.44.2-.44.45v10.7a.45.45 0 00.9 0v-10.7c0-.25-.2-.45-.45-.45zm10.2 26.66a11.54 11.54 0 01-8.48-6.14.45.45 0 10-.8.41 12.45 12.45 0 009.22 6.62.45.45 0 00.07-.9zm24.55-13.08a23.04 23.04 0 00-22.56-23v7.07l-.01.05a2.83 2.83 0 012.39 2.78v14.03l.09-.02h8.84v-9.22a.45.45 0 11.9 0v9.22h10.35v-.9zm0 27.33V44.66H62.5c-.02 2.01-.52 4-1.47 5.76a.45.45 0 01-.61.18.45.45 0 01-.19-.61 11.54 11.54 0 001.36-5.33h-8.83l-.1-.01a2.83 2.83 0 01-2.83 2.84h-.04-.04a2.83 2.83 0 01-2.83-2.83v-14.9a2.82 2.82 0 012.47-2.8v-7.11a23.04 23.04 0 00-22.57 23v.91h14.72V29.88a8.2 8.2 0 015.02-7.57c.22-.1.5.01.59.24.1.23-.01.5-.24.6a7.3 7.3 0 00-4.47 6.73v13.88h3.9a.45.45 0 110 .9h-3.9v.15a7.32 7.32 0 0011.23 6.17.45.45 0 01.49.76 8.22 8.22 0 01-12.62-6.93v-.15H26.82v25.52a23.04 23.04 0 0023.01 23.01 23.04 23.04 0 0023.02-23.01zm1.8-27.33v27.33A24.85 24.85 0 0149.84 95a24.85 24.85 0 01-24.82-24.82V42.85a24.85 24.85 0 0124.82-24.82 24.85 24.85 0 0124.83 24.82zM57.98 29.88v9.36a.45.45 0 11-.9 0v-9.36a7.28 7.28 0 00-3.4-6.17.45.45 0 01.49-.76 8.18 8.18 0 013.8 6.93z"/>\x3c!-- Created by Icon Island from the Noun Project --\x3e</svg>\n',Ge=0,We=1,je=2,Xe=function(t){function n(e){var n;return(n=t.call(this,e)||this).state={moveThreshold:p*P.pixelRatio,keyboardEnabled:!1,step:Ge,mousedown:!1,startMouseX:0,startMouseY:0,mouseX:0,mouseY:0,mouseHistory:[],pinchDist:0,keyHandler:new se,ctrlKeyDown:!1,dblclickData:null,dblclickTimeout:null,longtouchTimeout:null,twofingersTimeout:null,ctrlZoomTimeout:null},n.__onResize=ot(function(){return n.psv.autoSize()},50),n}o(n,t);var i=n.prototype;return i.init=function(){window.addEventListener("resize",this),window.addEventListener("keydown",this,{passive:!1}),window.addEventListener("keyup",this),this.psv.container.addEventListener("mousedown",this),window.addEventListener("mousemove",this,{passive:!1}),window.addEventListener("mouseup",this),this.psv.container.addEventListener("touchstart",this,{passive:!1}),window.addEventListener("touchmove",this,{passive:!1}),window.addEventListener("touchend",this,{passive:!1}),this.psv.container.addEventListener(P.mouseWheelEvent,this,{passive:!1}),P.fullscreenEvent&&document.addEventListener(P.fullscreenEvent,this)},i.destroy=function(){window.removeEventListener("resize",this),window.removeEventListener("keydown",this),window.removeEventListener("keyup",this),this.psv.container.removeEventListener("mousedown",this),window.removeEventListener("mousemove",this),window.removeEventListener("mouseup",this),this.psv.container.removeEventListener("touchstart",this),window.removeEventListener("touchmove",this),window.removeEventListener("touchend",this),this.psv.container.removeEventListener(P.mouseWheelEvent,this),P.fullscreenEvent&&document.removeEventListener(P.fullscreenEvent,this),clearTimeout(this.state.dblclickTimeout),clearTimeout(this.state.longtouchTimeout),clearTimeout(this.state.twofingersTimeout),clearTimeout(this.state.ctrlZoomTimeout),delete this.state,t.prototype.destroy.call(this)},i.handleEvent=function(t){switch(t.type){case"resize":this.__onResize();break;case"keydown":this.__onKeyDown(t);break;case"keyup":this.__onKeyUp();break;case"mousemove":this.__onMouseMove(t);break;case"mouseup":this.__onMouseUp(t);break;case"touchmove":this.__onTouchMove(t);break;case"touchend":this.__onTouchEnd(t);break;case P.fullscreenEvent:this.__fullscreenToggled()}if(!W(t.target,".psv--capture-event"))switch(t.type){case"mousedown":this.__onMouseDown(t);break;case"touchstart":this.__onTouchStart(t);break;case P.mouseWheelEvent:this.__onMouseWheel(t)}},i.enableKeyboard=function(){this.state.keyboardEnabled=!0},i.disableKeyboard=function(){this.state.keyboardEnabled=!1},i.__onKeyDown=function(t){if(this.config.mousewheelCtrlKey&&(this.state.ctrlKeyDown=t.key===C.Control,this.state.ctrlKeyDown&&(clearTimeout(this.state.ctrlZoomTimeout),this.psv.overlay.hide(E.CTRL_ZOOM))),!this.psv.trigger(w.KEY_PRESS,t.key).isDefaultPrevented()&&this.state.keyboardEnabled){var e=this.config.keyboard[t.key];if(e===M.TOGGLE_AUTOROTATE)this.psv.toggleAutorotate(),t.preventDefault();else if(e&&!this.state.keyHandler.time){switch(e!==M.ZOOM_IN&&e!==M.ZOOM_OUT&&this.psv.__stopAll(),e){case M.ROTATE_LAT_UP:this.psv.dynamics.position.roll({latitude:!1});break;case M.ROTATE_LAT_DOWN:this.psv.dynamics.position.roll({latitude:!0});break;case M.ROTATE_LONG_RIGHT:this.psv.dynamics.position.roll({longitude:!1});break;case M.ROTATE_LONG_LEFT:this.psv.dynamics.position.roll({longitude:!0});break;case M.ZOOM_IN:this.psv.dynamics.zoom.roll(!1);break;case M.ZOOM_OUT:this.psv.dynamics.zoom.roll(!0)}this.state.keyHandler.down(),t.preventDefault()}}},i.__onKeyUp=function(){var t=this;this.state.ctrlKeyDown=!1,this.state.keyboardEnabled&&this.state.keyHandler.up(function(){t.psv.dynamics.position.stop(),t.psv.dynamics.zoom.stop(),t.psv.resetIdleTimer()})},i.__onMouseDown=function(t){this.state.mousedown=!0,this.state.startMouseX=t.clientX,this.state.startMouseY=t.clientY},i.__onMouseUp=function(t){(this.state.mousedown||this.state.step===We)&&this.__stopMove(t.clientX,t.clientY,t.target,2===t.button)},i.__onMouseMove=function(t){if(this.config.mousemove&&(this.state.mousedown||this.state.step===We)&&(t.preventDefault(),this.__move(t.clientX,t.clientY)),!ht(this.prop.objectsObservers)&&G(t.target,this.psv.container)){var e=j(this.psv.container),n={x:t.clientX-e.left,y:t.clientY-e.top},i=this.psv.dataHelper.getIntersections(n),r=function(e,i,r){e.listener.handleEvent(new CustomEvent(r,{detail:{originalEvent:t,object:e.object,data:e.object.userData[i],viewerPoint:n}}))};ut(this.prop.objectsObservers,function(t,e){var n=i.find(function(t){return t.object.userData[e]});n?(t.object&&n.object!==t.object&&(r(t,e,T.LEAVE_OBJECT),delete t.object),t.object?r(t,e,T.HOVER_OBJECT):(t.object=n.object,r(t,e,T.ENTER_OBJECT))):t.object&&(r(t,e,T.LEAVE_OBJECT),delete t.object)})}},i.__onTouchStart=function(t){var e=this;1===t.touches.length?(this.state.mousedown=!0,this.state.startMouseX=t.touches[0].clientX,this.state.startMouseY=t.touches[0].clientY,this.prop.longtouchTimeout||(this.prop.longtouchTimeout=setTimeout(function(){var n=t.touches[0];e.__stopMove(n.clientX,n.clientY,n.target,!0),e.prop.longtouchTimeout=null},m))):2===t.touches.length&&(this.state.mousedown=!1,this.__cancelLongTouch(),this.config.mousemove&&(this.__cancelTwoFingersOverlay(),this.__startMoveZoom(t),t.preventDefault()))},i.__onTouchEnd=function(t){if(this.__cancelLongTouch(),this.state.mousedown||this.state.step===We)if(t.preventDefault(),this.__cancelTwoFingersOverlay(),1===t.touches.length)this.__stopMove(this.state.mouseX,this.state.mouseY);else if(0===t.touches.length){var e=t.changedTouches[0];this.__stopMove(e.clientX,e.clientY,e.target)}},i.__onTouchMove=function(t){var e=this;if(this.__cancelLongTouch(),this.config.mousemove)if(1===t.touches.length){if(this.config.touchmoveTwoFingers)this.state.mousedown&&!this.prop.twofingersTimeout&&(this.prop.twofingersTimeout=setTimeout(function(){e.psv.overlay.show({id:E.TWO_FINGERS,image:He,text:e.config.lang.twoFingers})},g));else if(this.state.mousedown||this.state.step===We){t.preventDefault();var n=t.touches[0];this.__move(n.clientX,n.clientY)}}else this.__moveZoom(t),this.__cancelTwoFingersOverlay()},i.__cancelLongTouch=function(){this.prop.longtouchTimeout&&(clearTimeout(this.prop.longtouchTimeout),this.prop.longtouchTimeout=null)},i.__cancelTwoFingersOverlay=function(){this.config.touchmoveTwoFingers&&(this.prop.twofingersTimeout&&(clearTimeout(this.prop.twofingersTimeout),this.prop.twofingersTimeout=null),this.psv.overlay.hide(E.TWO_FINGERS))},i.__onMouseWheel=function(t){var e=this;if(this.config.mousewheel){if(this.config.mousewheelCtrlKey&&!this.state.ctrlKeyDown)return this.psv.overlay.show({id:E.CTRL_ZOOM,image:Ve,text:this.config.lang.ctrlZoom}),clearTimeout(this.state.ctrlZoomTimeout),void(this.state.ctrlZoomTimeout=setTimeout(function(){return e.psv.overlay.hide(E.CTRL_ZOOM)},v));t.preventDefault(),t.stopPropagation();var n=5*J(t).spinY*this.config.zoomSpeed;0!==n&&this.psv.dynamics.zoom.step(-n,5)}},i.__fullscreenToggled=function(t){this.prop.fullscreen=void 0!==t?t:X(this.psv.container),this.config.keyboard&&(this.prop.fullscreen?this.psv.startKeyboardControl():this.psv.stopKeyboardControl()),this.psv.trigger(w.FULLSCREEN_UPDATED,this.prop.fullscreen)},i.__resetMove=function(){this.state.step=Ge,this.state.mousedown=!1,this.state.mouseX=0,this.state.mouseY=0,this.state.startMouseX=0,this.state.startMouseY=0,this.state.mouseHistory.length=0},i.__startMoveZoom=function(t){this.psv.__stopAll(),this.__resetMove();var e={x:t.touches[0].clientX,y:t.touches[0].clientY},n={x:t.touches[1].clientX,y:t.touches[1].clientY};this.state.step=We,this.state.pinchDist=et(e,n),this.state.mouseX=(e.x+n.x)/2,this.state.mouseY=(e.y+n.y)/2,this.__logMouseMove(this.state.mouseX,this.state.mouseY)},i.__stopMove=function(t,e,n,i){void 0===n&&(n=null),void 0===i&&(i=!1),this.state.step===We?this.config.moveInertia?(this.__logMouseMove(t,e),this.__stopMoveInertia(t,e)):(this.__resetMove(),this.psv.resetIdleTimer()):this.state.mousedown&&(this.psv.stopAnimation(),this.__click(t,e,n,i),this.__resetMove(),this.psv.resetIdleTimer())},i.__stopMoveInertia=function(t,n){var i=this,r=new e.SplineCurve(this.state.mouseHistory.map(function(t){var n=t[1],i=t[2];return new e.Vector2(n,i)})).getTangent(1),s=this.state.mouseHistory.slice(1).reduce(function(t,e){var n=t.total,i=t.prev;return{total:n+et({x:i[1],y:i[2]},{x:e[1],y:e[2]})/(e[0]-i[0]),prev:e}},{total:0,prev:this.state.mouseHistory[0]}).total/this.state.mouseHistory.length;if(!s)return this.__resetMove(),void this.psv.resetIdleTimer();this.state.step=je;var o=t,a=n;this.prop.animationPromise=new Nt({properties:{speed:{start:s,end:0}},duration:1e3,easing:"outQuad",onTick:function(t){o+=t.speed*r.x*3*P.pixelRatio,a+=t.speed*r.y*3*P.pixelRatio,i.__applyMove(o,a)}}),this.prop.animationPromise.then(function(t){i.prop.animationPromise=null,t&&(i.__resetMove(),i.psv.resetIdleTimer())})},i.__click=function(t,e,n,i){var r=this;void 0===i&&(i=!1);var s=this.psv.container.getBoundingClientRect(),o={rightclick:i,target:n,clientX:t,clientY:e,viewerX:t-s.left,viewerY:e-s.top},a=this.psv.dataHelper.getIntersections({x:o.viewerX,y:o.viewerY}),l=a.find(function(t){return t.object.userData[b]});if(l){var c=this.psv.dataHelper.vector3ToSphericalCoords(l.point);o.longitude=c.longitude,o.latitude=c.latitude,o.objects=a.map(function(t){return t.object}).filter(function(t){return!t.userData[b]});try{var h=this.psv.dataHelper.sphericalCoordsToTextureCoords(o);o.textureX=h.x,o.textureY=h.y}catch(t){o.textureX=NaN,o.textureY=NaN}this.state.dblclickTimeout?(Math.abs(this.state.dblclickData.clientX-o.clientX)<this.state.moveThreshold&&Math.abs(this.state.dblclickData.clientY-o.clientY)<this.state.moveThreshold&&this.psv.trigger(w.DOUBLE_CLICK,this.state.dblclickData),clearTimeout(this.state.dblclickTimeout),this.state.dblclickTimeout=null,this.state.dblclickData=null):(this.psv.trigger(w.CLICK,o),this.state.dblclickData=ct(o),this.state.dblclickTimeout=setTimeout(function(){r.state.dblclickTimeout=null,r.state.dblclickData=null},f))}},i.__move=function(t,e){this.state.mousedown&&(Math.abs(t-this.state.startMouseX)>=this.state.moveThreshold||Math.abs(e-this.state.startMouseY)>=this.state.moveThreshold)?(this.psv.__stopAll(),this.__resetMove(),this.state.step=We,this.state.mouseX=t,this.state.mouseY=e,this.__logMouseMove(t,e)):this.state.step===We&&(this.__applyMove(t,e),this.__logMouseMove(t,e))},i.__applyMove=function(t,n){var i={longitude:(t-this.state.mouseX)/this.prop.size.width*this.config.moveSpeed*e.MathUtils.degToRad(this.prop.littlePlanet?90:this.prop.hFov),latitude:(n-this.state.mouseY)/this.prop.size.height*this.config.moveSpeed*e.MathUtils.degToRad(this.prop.littlePlanet?90:this.prop.vFov)},r=this.psv.getPosition();this.psv.rotate({longitude:r.longitude-i.longitude,latitude:r.latitude+i.latitude}),this.state.mouseX=t,this.state.mouseY=n},i.__moveZoom=function(t){if(this.state.step===We){t.preventDefault();var e={x:t.touches[0].clientX,y:t.touches[0].clientY},n={x:t.touches[1].clientX,y:t.touches[1].clientY},i=et(e,n),r=(i-this.state.pinchDist)/P.pixelRatio*this.config.zoomSpeed;this.psv.zoom(this.psv.getZoomLevel()+r),this.__move((e.x+n.x)/2,(e.y+n.y)/2),this.state.pinchDist=i}},i.__logMouseMove=function(t,e){var n=Date.now(),i=this.state.mouseHistory.length?this.state.mouseHistory[this.state.mouseHistory.length-1]:[0,-1,-1];i[1]===t&&i[2]===e?i[0]=n:n===i[0]?(i[1]=t,i[2]=e):this.state.mouseHistory.push([n,t,e]);for(var r=null,s=0;s<this.state.mouseHistory.length;)this.state.mouseHistory[s][0]<n-_?this.state.mouseHistory.splice(s,1):r&&this.state.mouseHistory[s][0]-r>_/10?(this.state.mouseHistory.splice(0,s),s=0,r=this.state.mouseHistory[s][0]):(r=this.state.mouseHistory[s][0],s++)},n}(Ue),Ye=function(t){function n(n){var i,r;return(r=t.call(this,n)||this).renderer=new e.WebGLRenderer({alpha:!0,antialias:!0}),r.renderer.setPixelRatio(P.pixelRatio),r.renderer.domElement.className="psv-canvas",r.scene=new e.Scene,r.camera=new e.PerspectiveCamera(50,16/9,.1,2*y),r.mesh=r.psv.adapter.createMesh(),r.mesh.userData=((i={})[b]=!0,i),r.meshContainer=new e.Group,r.meshContainer.add(r.mesh),r.scene.add(r.meshContainer),r.raycaster=new e.Raycaster,r.timestamp=null,r.ready=!1,r.canvasContainer=document.createElement("div"),r.canvasContainer.className="psv-canvas-container",r.canvasContainer.style.background=r.psv.config.canvasBackgroun
2d,r.canvasContainer.style.cursor=r.psv.config.mousemove?"move":"default",r.canvasContainer.appendChild(r.renderer.domElement),r.psv.container.appendChild(r.canvasContainer),n.on(w.SIZE_UPDATED,l(r)),n.on(w.ZOOM_UPDATED,l(r)),n.on(w.POSITION_UPDATED,l(r)),n.on(w.CONFIG_CHANGED,l(r)),r.hide(),r}o(n,t);var i=n.prototype;return i.destroy=function(){this.renderer.setAnimationLoop(null),this.__cleanTHREEScene(this.scene),this.psv.container.removeChild(this.canvasContainer),delete this.canvasContainer,delete this.renderer,delete this.scene,delete this.camera,delete this.mesh,delete this.meshContainer,delete this.raycaster,t.prototype.destroy.call(this)},i.handleEvent=function(t){switch(t.type){case w.SIZE_UPDATED:this.__onSizeUpdated();break;case w.ZOOM_UPDATED:this.__onZoomUpdated();break;case w.POSITION_UPDATED:this.__onPositionUpdated();break;case w.CONFIG_CHANGED:t.args[0].includes("fisheye")&&this.__onPositionUpdated(),t.args[0].includes("mousemove")&&(this.canvasContainer.style.cursor=this.psv.config.mousemove?"move":"default")}},i.hide=function(){this.canvasContainer.style.opacity=0},i.show=function(){this.canvasContainer.style.opacity=1},i.__onSizeUpdated=function(){this.renderer.setSize(this.prop.size.width,this.prop.size.height),this.camera.aspect=this.prop.aspect,this.camera.updateProjectionMatrix(),this.prop.needsUpdate=!0},i.__onZoomUpdated=function(){this.camera.fov=this.prop.vFov,this.camera.updateProjectionMatrix(),this.prop.needsUpdate=!0},i.__onPositionUpdated=function(){this.camera.position.set(0,0,0),this.camera.lookAt(this.prop.direction),this.config.fisheye&&this.camera.position.copy(this.prop.direction).multiplyScalar(this.config.fisheye/2).negate(),this.prop.needsUpdate=!0},i.__renderLoop=function(t){var e=null!==this.timestamp?t-this.timestamp:0;this.timestamp=t,this.psv.trigger(w.BEFORE_RENDER,t,e),ut(this.psv.dynamics,function(t){return t.update(e)}),this.prop.idleTime>0&&t-this.prop.idleTime>this.config.autorotateDelay&&this.psv.startAutorotate(),this.prop.needsUpdate&&(this.render(),this.prop.needsUpdate=!1)},i.render=function(){this.renderer.render(this.scene,this.camera),this.psv.trigger(w.RENDER)},i.setTexture=function(t){var e=this;this.prop.panoData=t.panoData,this.psv.adapter.setTexture(this.mesh,t),this.ready||(this.renderer.setAnimationLoop(function(t){return e.__renderLoop(t)}),this.ready=!0),this.psv.needsUpdate(),this.psv.trigger(w.PANORAMA_LOADED,t)},i.setOverlay=function(t,e){this.psv.adapter.setOverlay(this.mesh,t,e),this.psv.needsUpdate()},i.setPanoramaPose=function(t,e){void 0===e&&(e=this.mesh);var n=this.psv.dataHelper.cleanPanoramaPose(t);e.rotation.set(-n.tilt,-n.pan,-n.roll,"ZXY")},i.setSphereCorrection=function(t,e){void 0===e&&(e=this.meshContainer);var n=this.psv.dataHelper.cleanSphereCorrection(t);e.rotation.set(n.tilt,n.pan,n.roll,"ZXY")},i.transition=function(t,n){var i=this,r=xt(n),s="zoom"in n,o=new e.Group,a=this.psv.adapter.createMesh(.5);if(this.psv.adapter.setTexture(a,t,!0),this.psv.adapter.setTextureOpacity(a,0),this.setPanoramaPose(t.panoData,a),this.setSphereCorrection(n.sphereCorrection,o),r){var l=this.psv.dataHelper.cleanPosition(n),c=this.psv.getPosition(),h=new e.Vector3(0,1,0);o.rotateOnWorldAxis(h,l.longitude-c.longitude);var u=new e.Vector3(0,1,0).cross(this.camera.getWorldDirection(new e.Vector3)).normalize();o.rotateOnWorldAxis(u,l.latitude-c.latitude)}o.add(a),this.scene.add(o);var d=new Nt({properties:{opacity:{start:0,end:1},zoom:s?{start:this.psv.getZoomLevel(),end:n.zoom}:void 0},duration:n.transition,easing:"outCubic",onTick:function(t){i.psv.adapter.setTextureOpacity(a,t.opacity),i.psv.adapter.setTextureOpacity(i.mesh,1-t.opacity),s&&i.psv.zoom(t.zoom),i.psv.needsUpdate()}});return d.then(function(e){e?(i.setTexture(t),i.psv.adapter.setTextureOpacity(i.mesh,1),i.setPanoramaPose(t.panoData),i.setSphereCorrection(n.sphereCorrection),r&&i.psv.rotate(n)):i.psv.adapter.disposeTexture(t),i.scene.remove(o),a.geometry.dispose(),a.geometry=null}),d},i.__cleanTHREEScene=function(t){var n=this;t.traverse(function(i){i.geometry&&i.geometry.dispose(),i.material&&(Array.isArray(i.material)?i.material.forEach(function(t){t.map&&t.map.dispose(),t.dis
2pose()}):(i.material.map&&i.material.map.dispose(),i.material.dispose())),!i.dispose||i instanceof e.Scene||i.dispose(),i!==t&&n.__cleanTHREEScene(i)})},n}(Ue),qe=function(t){function n(n){var i;return(i=t.call(this,n)||this).loader=new e.FileLoader,i.loader.setResponseType("blob"),i.config.withCredentials&&i.loader.setWithCredentials(!0),i.config.requestHeaders&&"object"==typeof i.config.requestHeaders&&i.loader.setRequestHeader(i.config.requestHeaders),i}o(n,t);var i=n.prototype;return i.destroy=function(){this.abortLoading(),t.prototype.destroy.call(this)},i.abortLoading=function(){},i.loadFile=function(t,e){var n=this;return this.config.requestHeaders&&"function"==typeof this.config.requestHeaders&&this.loader.setRequestHeader(this.config.requestHeaders(t)),new Promise(function(i,r){var s=0;null==e||e(s),n.loader.load(t,function(t){s=100,null==e||e(s),i(t)},function(t){if(t.lengthComputable){var n=t.loaded/t.total*100;n>s&&(s=n,null==e||e(s))}},function(t){r(t)})})},i.loadImage=function(t,e){return this.loadFile(t,e).then(function(t){return new Promise(function(e,n){var i=document.createElementNS("http://www.w3.org/1999/xhtml","img");i.onload=function(){URL.revokeObjectURL(i.src),e(i)},i.onerror=n,i.src=URL.createObjectURL(t)})})},i.preloadPanorama=function(t){return this.psv.adapter.supportsPreload(t)?this.psv.adapter.loadTexture(t):Promise.resolve()},n}(Ue),Ze={NONE:0,SHOWING:1,HIDING:2,READY:3},Je=function(t){function e(e,n){var i;return(i=t.call(this,e,"psv-tooltip")||this).prop=s({},i.prop,n,{state:Ze.NONE,width:0,height:0,pos:"",config:null,data:null}),i.content=document.createElement("div"),i.content.className="psv-tooltip-content",i.container.appendChild(i.content),i.arrow=document.createElement("div"),i.arrow.className="psv-tooltip-arrow",i.container.appendChild(i.arrow),i.container.addEventListener("transitionend",l(i)),i.container.style.top="-1000px",i.container.style.left="-1000px",i}o(e,t);var n=e.prototype;return n.destroy=function(){delete this.arrow,delete this.content,t.prototype.destroy.call(this)},n.handleEvent=function(t){"transitionend"===t.type&&this.__onTransitionEnd(t)},n.toggle=function(){throw new c("Tooltip cannot be toggled")},n.show=function(t){if(this.prop.state!==Ze.NONE)throw new c("Initialized tooltip cannot be re-initialized");t.className&&H(this.container,t.className),this.content.innerHTML=t.content;var e=this.container.getBoundingClientRect();this.prop.width=e.right-e.left,this.prop.height=e.bottom-e.top,this.prop.state=Ze.READY,this.move(t),this.prop.data=t.data,this.prop.state=Ze.SHOWING,this.psv.trigger(w.SHOW_TOOLTIP,this.prop.data,this),this.__waitImages()},n.move=function(t){if(this.prop.state!==Ze.SHOWING&&this.prop.state!==Ze.READY)throw new c("Uninitialized tooltip cannot be moved");t.box||(t.box={width:0,height:0}),this.config=t;var e=this.container,n=this.arrow,i={posClass:Ct(t.position,{allowCenter:!1,cssOrder:!1})||["top","center"],width:this.prop.width,height:this.prop.height,top:0,left:0,arrowTop:0,arrowLeft:0};this.__computeTooltipPosition(i,t);var r=null,s=null;if(i.top<0?r="bottom":i.top+i.height>this.psv.prop.size.height&&(r="top"),i.left<0?s="right":i.left+i.width>this.psv.prop.size.width&&(s="left"),s||r){var o=Rt(i.posClass);r&&(i.posClass[o?0:1]=r),s&&(i.posClass[o?1:0]=s),this.__computeTooltipPosition(i,t)}e.style.top=i.top+"px",e.style.left=i.left+"px",n.style.top=i.arrowTop+"px",n.style.left=i.arrowLeft+"px";var a=i.posClass.join("-");a!==this.prop.pos&&(e.classList.remove("psv-tooltip--"+this.prop.pos),this.prop.pos=a,e.classList.add("psv-tooltip--"+this.prop.pos))},n.hide=function(){this.container.classList.remove("psv-tooltip--visible"),this.prop.state=Ze.HIDING,this.psv.trigger(w.HIDE_TOOLTIP,this.prop.data)},n.__onTransitionEnd=function(t){if("transform"===t.propertyName)switch(this.prop.state){case Ze.SHOWING:this.container.classList.add("psv-tooltip--visible"),this.prop.state=Ze.READY;break;case Ze.HIDING:this.prop.state=Ze.NONE,this.destroy()}},n.__computeTooltipPosition=function(t,e){var n=this.prop.arrow,i=e.top,r=t.height,s=e.left,o=t.width,a=n+this.prop.border,l=e.box.width/2+2*n,c=e.box.height/2+2*n;switch(t.posClass.join("-")){case"top-left":t.top=i-c-r,t.left=s+a-o,t.arrowTop=r,t.arrowLeft=o-a-n;break;case"top-center":t.top=i-c-r,t.left=s-o/2,t.arrowTop=r,t.arrowLeft=o/2-n;break;case"top-right":t.top=i-c-r,t.left=s-a,t.arrowTop=r,t.arrowLeft=n;break;case"bottom-left":t.top=i+c,t.left=s+a-o,t.arrowTop=2*-n,t.arrowLeft=o-a-n;break;case"bottom-center":t.top=i+c,t.left=s-o/2,t.arrowTop=2*-n,t.arrowLeft=o/2-n;break;case"bottom-right":t.top=i+c,t.left=s-a,t.arrowTop=2*-n,t.arrowLeft=n;break;case"left-top":t.top=i+a-r,t.left=s-l-o,t.arrowTop=r-a-n,t.arrowLeft=o;break;case"center-left":t.top=i-r/2,t.left=s-l-o,t.arrowTop=r/2-n,t.arrowLeft=o;break;case"left-bottom":t.top=i-a,t.left=s-l-o,t.arrowTop=n,t.arrowLeft=o;break;case"right-top":t.top=i+a-r,t.left=s+l,t.arrowTop=r-a-n,t.arrowLeft=2*-n;break;case"center-right":t.top=i-r/2,t.left=s+l,t.arrowTop=r/2-n,t.arrowLeft=2*-n;break;case"right-bottom":t.top=i-a,t.left=s+l,t.arrowTop=n,t.arrowLeft=2*-n}},n.__waitImages=function(){var t=this,e=this.content.querySelectorAll("img");if(e.length>0){var n=[];e.forEach(function(t){n.push(new Promise(function(e){t.onload=e,t.onerror=e}))}),Promise.all(n).then(function(){if(t.prop.state===Ze.SHOWING||t.prop.state===Ze.READY){var e=t.container.getBoundingClientRect();t.prop.width=e.right-e.left,t.prop.height=e.bottom-e.top,t.move(t.config)}})}},e}(Ht),Ke=function(t){function e(e){var n;n=t.call(this,e)||this;var i=new Je(n.psv,{arrow:0,border:0});
2return n.size={arrow:parseInt(Z(i.arrow,"borderTopWidth"),10),border:parseInt(Z(i.container,"borderTopLeftRadius"),10)},i.destroy(),n}o(e,t);var n=e.prototype;return n.destroy=function(){delete this.size,t.prototype.destroy.call(this)},n.create=function(t){var e=new Je(this.psv,this.size);return e.show(t),e},e}(Ue);e.Cache.enabled=!0;var $e=function(t){function n(n){var i;if(i=t.call(this)||this,P.load(),!P.isWebGLSupported)throw new c("WebGL is not supported.");if(0===P.maxTextureWidth)throw new c("Unable to detect system capabilities");return i.prop={ready:!1,uiRefresh:!1,needsUpdate:!1,fullscreen:!1,direction:new e.Vector3(0,0,y),vFov:null,hFov:null,aspect:null,autorotateEnabled:!1,animationPromise:null,loadingPromise:null,littlePlanet:!1,idleTime:-1,objectsObservers:{},size:{width:0,height:0},panoData:{fullWidth:0,fullHeight:0,croppedWidth:0,croppedHeight:0,croppedX:0,croppedY:0,poseHeading:0,posePitch:0,poseRoll:0}},i.config=Se(n),i.parent="string"==typeof n.container?document.getElementById(n.container):n.container,i.parent[x]=l(i),i.container=document.createElement("div"),i.container.classList.add("psv-container"),i.parent.appendChild(i.container),i.adapter=new i.config.adapter[0](l(i),i.config.adapter[1]),i.children=[],i.plugins={},i.renderer=new Ye(l(i)),i.textureLoader=new qe(l(i)),i.eventsHandler=new Xe(l(i)),i.dataHelper=new Be(l(i)),i.loader=new Le(l(i)),i.navbar=new Re(l(i)),i.panel=new Oe(l(i)),i.tooltip=new Ke(l(i)),i.notification=new Pe(l(i)),i.overlay=new Ie(l(i)),i.dynamics={zoom:new Ut(function(t){i.prop.vFov=i.dataHelper.zoomLevelToFov(t),i.prop.hFov=i.dataHelper.vFovToHFov(i.prop.vFov),i.trigger(w.ZOOM_UPDATED,t)},i.config.defaultZoomLvl,0,100),position:new kt({longitude:new Ut(null,i.config.defaultLong,0,2*Math.PI,!0),latitude:i.prop.littlePlanet?new Ut(null,i.config.defaultLat,0,2*Math.PI,!0):new Ut(null,i.config.defaultLat,-Math.PI/2,Math.PI/2)},function(t){i.dataHelper.sphericalCoordsToVector3(t,i.prop.direction),i.trigger(w.POSITION_UPDATED,t)})},i.__updateSpeeds(),i.eventsHandler.init(),i.__resizeRefresh=ot(function(){return i.refreshUi("resize")},500),i.resize(i.config.size),i.config.plugins.forEach(function(t){var e=t[0],n=t[1];i.plugins[e.id]=new e(l(i),n)}),ut(i.plugins,function(t){return null==t.init?void 0:t.init()}),i.navbar.setButtons(i.config.navbar),i.config.panorama&&i.setPanorama(i.config.panorama),B(i.container,"psv--is-touch",P.isTouchEnabled.initial),P.isTouchEnabled.promise.then(function(t){return B(i.container,"psv--is-touch",t)}),i.once(w.RENDER,function(){i.config.navbar&&(i.container.classList.add("psv--has-navbar"),i.navbar.show()),dt(i.config.autorotateDelay)||(i.prop.idleTime=performance.now()),i.prop.ready=!0,setTimeout(function(){i.refreshUi("init"),i.trigger(w.READY)},0)}),i}o(n,t);var i=n.prototype;return i.destroy=function(){this.__stopAll(),this.stopKeyboardControl(),this.exitFullscreen(),ut(this.plugins,function(t){return t.destroy()}),delete this.plugins,this.children.slice().forEach(function(t){return t.destroy()}),this.children.length=0,this.eventsHandler.destroy(),this.renderer.destroy(),this.textureLoader.destroy(),this.dataHelper.destroy(),this.adapter.destroy(),this.parent.removeChild(this.container),delete this.parent[x],delete this.parent,delete this.container,delete this.loader,delete this.navbar,delete this.panel,delete this.tooltip,delete this.notification,delete this.overlay,delete this.dynamics,delete this.config},i.refreshUi=function(t){var e=this;this.prop.ready&&(this.prop.uiRefresh?"new"!==this.prop.uiRefresh&&(this.prop.uiRefresh="new",setTimeout(function(){e.prop.uiRefresh=!1,e.refreshUi(t)})):(this.prop.uiRefresh=!0,this.children.every(function(t){return t.refreshUi(),!0===e.prop.uiRefresh}),this.prop.uiRefresh=!1))},i.getPlugin=function(t){if("string"==typeof t)return this.plugins[t];var e=gt(t,ye);return e?this.plugins[e.id]:void 0},i.getPosition=function(){return this.dataHelper.cleanPosition(this.dynamics.position.current)},i.getZoomLevel=function(){return this.dynamics.zoom.current},i.getSize=function(){return s({},this.prop.size)},i.isAutorotateEnabled=function(){return this.prop.autorotateEnabled},i.isFullscreenEnabled=function(){return P.fullscreenEvent?X(this.container):this.prop.fullscreen},i.needsUpdate=function(){this.prop.needsUpdate=!0},i.autoSize=function(){this.container.clientWidth===this.prop.size.width&&this.container.clientHeight===this.prop.size.height||(this.prop.size.width=Math.round(this.container.clientWidth),this.prop.size.height=Math.round(this.container.clientHeight),this.prop.aspect=this.prop.size.width/this.prop.size.height,this.prop.hFov=this.dataHelper.vFovToHFov(this.prop.vFov),this.trigger(w.SIZE_UPDATED,this.get
2Size()),this.__resizeRefresh())},i.setPanorama=function(t,e){var n,i=this;void 0===e&&(e={}),this.textureLoader.abortLoading(),null==(n=this.prop.transitionAnimation)||n.cancel(),this.prop.ready||["sphereCorrection","panoData","overlay","overlayOpacity"].forEach(function(t){t in e||(e[t]=i.config[t])}),void 0!==e.transition&&!0!==e.transition||(e.transition=u),void 0===e.showLoader&&(e.showLoader=!0),void 0===e.caption&&(e.caption=this.config.caption),void 0===e.description&&(e.description=this.config.description),e.panoData||"function"!=typeof this.config.panoData||(e.panoData=this.config.panoData);var r=xt(e),s="zoom"in e;(r||s)&&this.__stopAll(),this.hideError(),this.config.panorama=t,this.config.caption=e.caption,this.config.description=e.description;var o=function(t){if(i.loader.hide(),i.prop.loadingPromise=null,_t(t))return!1;if(t)throw i.navbar.setCaption(""),i.showError(i.config.lang.loadError),console.error(t),t;return i.resetIdleTimer(),i.setOverlay(e.overlay,e.overlayOpacity),i.navbar.setCaption(i.config.caption),!0};this.navbar.setCaption("<em>"+(this.config.loadingTxt||"")+"</em>"),!e.showLoader&&this.prop.ready||this.loader.show();var a=this.adapter.loadTexture(this.config.panorama,e.panoData).then(function(t){if(t.panorama!==i.config.panorama)throw i.adapter.disposeTexture(t),vt();return t});return e.transition&&this.prop.ready&&this.adapter.supportsTransition(this.config.panorama)?this.prop.loadingPromise=a.then(function(t){return i.loader.hide(),i.prop.transitionAnimation=i.renderer.transition(t,e),i.prop.transitionAnimation}).then(function(t){if(i.prop.transitionAnimation=null,!t)throw vt()}).then(o,o):this.prop.loadingPromise=a.then(function(t){i.renderer.show(),i.renderer.setTexture(t),i.renderer.setPanoramaPose(t.panoData),i.renderer.setSphereCorrection(e.sphereCorrection),s&&i.zoom(e.zoom),r&&i.rotate(e)}).then(o,o),this.prop.loadingPromise},i.setOverlay=function(t,e){var n=this;
2return void 0===e&&(e=1),t?this.adapter.constructor.supportsOverlay?this.adapter.loadTexture(t,function(t){var e=n.prop.panoData,i=t.width/e.croppedWidth;return{fullWidth:i*e.fullWidth,fullHeight:i*e.fullHeight,croppedWidth:i*e.croppedWidth,croppedHeight:i*e.croppedHeight,croppedX:i*e.croppedX,croppedY:i*e.croppedY}},!1).then(function(t){n.renderer.setOverlay(t,e)}):Promise.reject(new c(this.adapter.constructor.id+" adapter does not supports overlay")):(this.adapter.constructor.supportsOverlay&&this.renderer.setOverlay(null,0),Promise.resolve())},i.setOptions=function(t){var e=this,n=s({},this.config,t);ut(t,function(t,i){if(Me[i])yt(Me[i]);else{if(!Object.prototype.hasOwnProperty.call(xe,i))throw new c("Unknown option "+i);if(be[i])throw new c(be[i]);switch(we[i]?e.config[i]=we[i](t,n):e.config[i]=t,i){case"overlay":case"overlayOpacity":e.setOverlay(e.config.overlay,e.config.overlayOpacity);break;case"caption":case"description":e.navbar.setCaption(e.config.caption);break;case"size":e.resize(t);break;case"sphereCorrection":e.renderer.setSphereCorrection(t);break;case"navbar":case"lang":e.navbar.setButtons(e.config.navbar);break;case"moveSpeed":case"zoomSpeed":e.__updateSpeeds();break;case"minFov":case"maxFov":e.dynamics.zoom.setValue(e.dataHelper.fovToZoomLevel(e.prop.vFov)),e.trigger(w.ZOOM_UPDATED,e.getZoomLevel());break;case"canvasBackground":e.renderer.canvasContainer.style.background=e.config.canvasBackground;break;case"autorotateIdle":e.resetIdleTimer()}}}),this.needsUpdate(),this.refreshUi("set options"),this.trigger(w.CONFIG_CHANGED,Object.keys(t))},i.setOption=function(t,e){var n;this.setOptions(((n={})[t]=e,n))},i.resetIdleTimer=function(){this.prop.idleTime=this.config.autorotateIdle?performance.now():-1},i.disableIdleTimer=function(){this.prop.idleTime=-1},i.startAutorotate=function(t){void 0===t&&(t=!1),t&&!this.isAutorotateEnabled()||!t&&this.isAutorotateEnabled()||(t||this.__stopAll(),this.dynamics.position.roll({longitude:this.config.autorotateSpeed<0},Math.abs(this.config.autorotateSpeed/this.config.moveSpeed)),this.dynamics.position.goto({latitude:this.config.autorotateLat},Math.abs(this.config.autorotateSpeed/this.config.moveSpeed)),null!==this.config.autorotateZoomLvl&&this.dynamics.zoom.goto(this.config.autorotateZoomLvl),this.prop.autorotateEnabled=!0,t||this.trigger(w.AUTOROTATE,!0))},i.stopAutorotate=function(){this.isAutorotateEnabled()&&(this.dynamics.position.stop(),this.dynamics.zoom.stop(),this.prop.autorotateEnabled=!1,this.trigger(w.AUTOROTATE,!1))},i.toggleAutorotate=function(){this.isAutorotateEnabled()?this.stopAutorotate():this.startAutorotate()},i.showError=function(t){this.overlay.show({id:E.ERROR,image:Ne,text:t,dissmisable:!1})},i.hideError=function(){this.overlay.hide(E.ERROR)},i.rotate=function(t){if(!this.trigger(w.BEFORE_ROTATE,t).isDefaultPrevented()){var e=this.change(S.GET_ROTATE_POSITION,this.dataHelper.cleanPosition(t));this.dynamics.position.setValue(e)}},i.animate=function(t){var e=this;this.__stopAll();var n,i=xt(t),r=void 0!==t.zoom,s={};if(i){var o=this.change(S.GET_ANIMATE_POSITION,this.dataHelper.cleanPosition(t)),a=this.getPosition(),l=nt(a.longitude,o.longitude);s.longitude={start:a.longitude,end:a.longitude+l},s.latitude={start:a.latitude,end:o.latitude},n=this.dataHelper.speedToDuration(t.speed,it(a,o))}if(r){var c=Math.abs(t.zoom-this.getZoomLevel());s.zoom={start:this.getZoomLevel(),end:t.zoom},n||(n=this.dataHelper.speedToDuration(t.speed,Math.PI/4*c/100))}return n?(this.prop.animationPromise=new Nt({properties:s,duration:Math.max(d,n),easing:"inOutSine",onTick:function(t){i&&e.rotate(t),r&&e.zoom(t.zoom)}}),this.prop.animationPromise.then(function(){e.prop.animationPromise=null,e.resetIdleTimer()}),this.prop.animationPromise):(i&&this.rotate(t),r&&this.zoom(t.zoom),new Nt)},i.stopAnimation=function(){return this.prop.animationPromise?(this.prop.animationPromise.cancel(),this.prop.animationPromise):Promise.resolve()},i.zoom=function(t){this.dynamics.zoom.setValue(t)},i.zoomIn=function(t){void 0===t&&(t=1),this.dynamics.zoom.step(t)},i.zoomOut=function(t){void 0===t&&(t=1),this.dynamics.zoom.step(-t)},i.resize=function(t){var e=this;["width","height"].forEach(function(n){t&&t[n]&&(/^[0-9.]+$/.test(t[n])&&(t[n]+="px"),e.parent.style[n]=t[n])}),this.autoSize()},i.enterFullscreen=function(){P.fullscreenEvent?Y(this.container):(this.container.classList.add("psv-container--fullscreen"),this.autoSize(),this.eventsHandler.__fullscreenToggled(!0))},i.exitFullscreen=function(){this.isFullscreenEnabled()&&(P.fullscreenEvent?q():(this.container.classList.remove("psv-container--fullscreen"),this.autoSize(),this.eventsHandler.__fullscreenToggled(!1)))},i.toggleFullscreen=function(){this.isFullscreenEnabled()?this.exitFullscreen():this.enterFullscreen()}
2,i.startKeyboardControl=function(){this.eventsHandler.enableKeyboard()},i.stopKeyboardControl=function(){this.eventsHandler.disableKeyboard()},i.observeObjects=function(t,e){var n=this;return this.prop.objectsObservers[t]={listener:e},function(){delete n.prop.objectsObservers[t]}},i.__stopAll=function(){return this.trigger(w.STOP_ALL),this.disableIdleTimer(),this.stopAutorotate(),this.stopAnimation()},i.__updateSpeeds=function(){this.dynamics.zoom.setSpeed(50*this.config.zoomSpeed),this.dynamics.position.setSpeed(e.MathUtils.degToRad(50*this.config.moveSpeed))},n}(n.EventEmitter);t.AbstractAdapter=h,t.AbstractButton=Vt,t.AbstractComponent=Ht,t.AbstractPlugin=ye,t.CONSTANTS=R,t.DEFAULTS=xe,t.EquirectangularAdapter=Bt,t.PSVError=c,t.SYSTEM=P,t.Viewer=$e,t.registerButton=Ce,t.utils=zt,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(2557),n(53))},150(t,e,n){!function(t,e,n){"use strict";function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},i.apply(this,arguments)}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,s(t,e)}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var a={GYROSCOPE_UPDATED:"gyroscope-updated"},l=new e.Vector3(0,0,1),c=new e.Euler,h=new e.Quaternion,u=new e.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),d=function(t){!1===window.isSecureContext&&console.error("THREE.DeviceOrientationControls: DeviceOrientationEvent is only available in secure contexts (https)");var n=this,i=1e-6,r=new e.Quaternion;this.object=t,this.object.rotation.reorder("YXZ"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alphaOffset=0;var s=function(t){n.deviceOrientation=t},o=function(){n.screenOrientation=window.orientation||0},a=function(t,e,n,i,r){c.set(n,e,-i,"YXZ"),t.setFromEuler(c),t.multiply(u),t.multiply(h.setFromAxisAngle(l,-r))};this.connect=function(){o(),void 0!==window.DeviceOrientationEvent&&"function"==typeof window.DeviceOrientationEvent.requestPermission?window.DeviceOrientationEvent.requestPermission().then(function(t){"granted"==t&&(window.addEventListener("orientationchange",o),window.addEventListener("deviceorientation",s))}).catch(function(t){console.error("THREE.DeviceOrientationControls: Unable to use DeviceOrientation API:",t)}):(window.addEventListener("orientationchange",o),window.addEventListener("deviceorientation",s)),n.enabled=!0},this.disconnect=function(){window.removeEventListener("orientationchange",o),window.removeEventListener("deviceorientation",s),n.enabled=!1},this.update=function(){if(!1!==n.enabled){var t=n.deviceOrientation;if(t){var s=t.alpha?e.MathUtils.degToRad(t.alpha)+n.alphaOffset:0,o=t.beta?e.MathUtils.degToRad(t.beta):0,l=t.gamma?e.MathUtils.degToRad(t.gamma):0,c=n.screenOrientation?e.MathUtils.degToRad(n.screenOrientation):0;a(n.object.quaternion,s,o,l,c),8*(1-r.dot(n.object.quaternion))>i&&r.copy(n.object.quaternion)}}},this.dispose=function(){n.disconnect()},this.connect()},p='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M50 0a50 50 0 1 0 0 100A50 50 0 0 0 50 0zm0 88.81a38.86 38.86 0 0 1-38.81-38.8 38.86 38.86 0 0 1 38.8-38.82A38.86 38.86 0 0 1 88.82 50 38.87 38.87 0 0 1 50 88.81z"/><path fill="currentColor" d="M72.07 25.9L40.25 41.06 27.92 74.12l31.82-15.18v-.01l12.32-33.03zM57.84 54.4L44.9 42.58l21.1-10.06-8.17 21.9z"/>\x3c!--Created by iconoci from the Noun Project--\x3e</svg>\n',f=function(t){function e(e){var n;return(n=t.call(this,e,"psv-button--hover-scale psv-gyroscope-button",!0)||this).plugin=n.psv.getPlugin("gyroscope"),n.plugin&&n.plugin.on(a.GYROSCOPE_UPDATED,o(n)),n}r(e,t);var n=e.prototype;return n.destroy=function(){this.plugin&&this.plugin.off(a.GYROSCOPE_UPDATED,this),delete this.plugin,t.prototype.destroy.call(this)},n.isSupported=function(){return!!this.plugin&&{initial:!1,promise:this.plugin.prop.isSupported}},n.handleEvent=function(t){t.type===a.GYROSCOPE_UPDATED&&this.toggleActive(t.args[0])},n.onClick=function(){this.plugin.toggle()},e}(n.AbstractButton);f.id="gyroscope",f.icon=p,n.DEFAULTS.lang[f.id]="Gyroscope",n.registerButton(f,"caption:right");var m=new e.Vector3,g=function(t){function s(e,n){var r;return(r=t.call(this,e)||this).prop={isSupported:r.__checkSupport(),alphaOffset:0,enabled:!1,config_moveInertia:!0},r.config=i({touchmove:!0,absolutePosition:!1,moveMode:"smooth"},n),r.controls=null,r}r(s,t);var o=s.prototype;return o.init=function(){t.prototype.init.call(this),this.psv.on(n.CONSTANTS.EVENTS.STOP_ALL,this),this.psv.on(n.CONSTANTS.EVENTS.BEFORE_ROTATE,this),this.psv.on(n.CONSTANTS.EVENTS.BEFORE_RENDER,this)},o.destroy=function(){this.psv.off(n.CONSTANTS.EVENTS.STOP_ALL,this),this.psv.off(n.CONSTANTS.EVENTS.BEFORE_ROTATE,this),this.psv.off(n.CONSTANTS.EVENTS.BEFORE_RENDER,this),this.stop(),delete this.controls,t.prototype.destroy.call(this)},o.handleEvent=function(t){switch(t.type){case n.CONSTANTS.EVENTS.STOP_ALL:this.stop();break;case n.CONSTANTS.EVENTS.BEFORE_RENDER:this.__onBeforeRender();break;case n.CONSTANTS.EVENTS.BEFORE_ROTATE:this.__onBeforeRotate(t)}},o.isEnabled=function(){return this.prop.enabled},o.start=function(){var t=this;return this.prop.isSupported.then(function(e){return e?t.__requestPermission():(n.utils.logWarn("gyroscope not available"),Promise.reject())}).then(function(t){return t?Promise.resolve():(n.utils.logWarn("gyroscope not allowed"),Promise.reject())}).then(function(){t.psv.__stopAll(),t.prop.config_moveInertia=t.psv.config.moveInertia,t.psv.config.moveInertia=!1,t.controls?t.controls.connect():t.controls=new d(new e.Object3D),t.controls.deviceOrientation=null,t.controls.screenOrientation=0,t.controls.alphaOffset=0,t.prop.alph
2aOffset=t.config.absolutePosition?0:null,t.prop.enabled=!0,t.trigger(a.GYROSCOPE_UPDATED,!0)})},o.stop=function(){this.isEnabled()&&(this.controls.disconnect(),this.prop.enabled=!1,this.psv.config.moveInertia=this.prop.config_moveInertia,this.trigger(a.GYROSCOPE_UPDATED,!1),this.psv.resetIdleTimer())},o.toggle=function(){this.isEnabled()?this.stop():this.start()},o.__onBeforeRender=function(){if(this.isEnabled()&&this.controls.deviceOrientation){var t=this.psv.getPosition();if(null===this.prop.alphaOffset){this.controls.update(),this.controls.object.getWorldDirection(m);var e=this.psv.dataHelper.vector3ToSphericalCoords(m);this.prop.alphaOffset=e.longitude-t.longitude}else{this.controls.alphaOffset=this.prop.alphaOffset,this.controls.update(),this.controls.object.getWorldDirection(m);var i=this.psv.dataHelper.vector3ToSphericalCoords(m),r={longitude:i.longitude,latitude:-i.latitude},s="smooth"===this.config.moveMode?3:10;this.psv.dynamics.position.goto(r,n.utils.getAngle(t,r)<.01?1:s)}}},o.__onBeforeRotate=function(t){this.isEnabled()&&(t.preventDefault(),this.config.touchmove&&(this.prop.alphaOffset-=t.args[0].longitude-this.psv.getPosition().longitude))},o.__checkSupport=function(){return"DeviceMotionEvent"in window&&"function"==typeof DeviceMotionEvent.requestPermission?Promise.resolve(!0):"DeviceOrientationEvent"in window?new Promise(function(t){var e=function e(n){t(n&&null!==n.alpha&&!isNaN(n.alpha)),window.removeEventListener("deviceorientation",e)};window.addEventListener("deviceorientation",e,!1),setTimeout(e,1e4)}):Promise.resolve(!1)},o.__requestPermission=function(){return"DeviceMotionEvent"in window&&"function"==typeof DeviceMotionEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(function(t){return"granted"===t}).catch(function(){return!1}):Promise.resolve(!0)},s}(n.AbstractPlugin);g.id="gyroscope",g.EVENTS=a,t.EVENTS=a,t.GyroscopePlugin=g,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(2557),n(2367))},6448(t,e,n){!function(t,e,n){"use strict";function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},i.apply(this,arguments)}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,s(t,e)}
2function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var a='<svg xmlns="http://www.w3.org/2000/svg" viewBox="9 9 81 81"><path fill="currentColor" d="M37.5 90S9.9 51.9 9.9 36.6 22.2 9 37.5 9s27.6 12.4 27.6 27.6S37.5 90 37.5 90zm0-66.3c-6.1 0-11 4.9-11 11s4.9 11 11 11 11-4.9 11-11-4.9-11-11-11zM86.7 55H70c-1.8 0-3.3-1.5-3.3-3.3s1.5-3.3 3.3-3.3h16.7c1.8 0 3.3 1.5 3.3 3.3S88.5 55 86.7 55zm0-25h-15a3.3 3.3 0 0 1-3.3-3.3c0-1.8 1.5-3.3 3.3-3.3h15c1.8 0 3.3 1.5 3.3 3.3 0 1.8-1.5 3.3-3.3 3.3zM56.5 73h30c1.8 0 3.3 1.5 3.3 3.3 0 1.8-1.5 3.3-3.3 3.3h-30a3.3 3.3 0 0 1-3.3-3.3 3.2 3.2 0 0 1 3.3-3.3z"/>\x3c!--Created by Rohith M S from the Noun Project--\x3e</svg>\n',l={MARKER_VISIBILITY:"marker-visibility",GOTO_MARKER_DONE:"goto-marker-done",LEAVE_MARKER:"leave-marker",OVER_MARKER:"over-marker",RENDER_MARKERS_LIST:"render-markers-list",SELECT_MARKER:"select-marker",SELECT_MARKER_LIST:"select-marker-list",UNSELECT_MARKER:"unselect-marker",HIDE_MARKERS:"hide-markers",SET_MARKERS:"set-markers",SHOW_MARKERS:"show-markers"},c={click:"click",hover:"hover"},h="http://www.w3.org/2000/svg",u="psvMarker",d="marker",p="markersList",f=n.utils.dasherize(u),m=function(t,e){return'\n<div class="psv-panel-menu psv-panel-menu--stripped">\n <h1 class="psv-panel-menu-title">'+a+" "+e+'</h1>\n <ul class="psv-panel-menu-list">\n '+t.map(function(t){return"\n <li data-"+f+'="'+t.config.id+'" class="psv-panel-menu-item" tabindex="0">\n '+("image"===t.type?'<span class="psv-panel-menu-item-icon"><img src="'+t.config.image+'"/></span>':"")+'\n <span class="psv-panel-menu-item-label">'+t.getListContent()+"</span>\n </li>\n "}).join("")+"\n </ul>\n</div>\n"};function g(t,e,i){var r=t[0],s=t[1],o=e[0],a=e[1],l=n.utils.greatArcDistance(t,e),c=Math.sin((1-i)*l)/Math.sin(l),h=Math.sin(i*l)/Math.sin(l),u=c*Math.cos(s)*Math.cos(r)+h*Math.cos(a)*Math.cos(o),d=c*Math.cos(s)*Math.sin(r)+h*Math.cos(a)*Math.sin(o),p=c*Math.sin(s)+h*Math.sin(a);return[Math.atan2(d,u),Math.atan2(p,Math.sqrt(u*u+d*d))]}function v(t){for(var e=[t[0]],i=0,r=1;r<t.length;r++){var s=t[r-1][0]-t[r][0];s>Math.PI?i+=1:s<-Math.PI&&(i-=1),e.push([t[r][0]+2*i*Math.PI,t[r][1]])}var o=e.reduce(function(t,e){return[t[0]+e[0],t[1]+e[1]]});return[n.utils.parseAngle(o[0]/t.length),o[1]/t.length]}function _(t){for(var e=0,i=[],r=0;r<t.length-1;r++){var s=n.utils.greatArcDistance(t[r],t[r+1])*n.CONSTANTS.SPHERE_RADIUS;i.push(s),e+=s}for(var o=0,a=0;a<t.length-1;a++){if(o+i[a]>e/2){var l=(e/2-o)/i[a];return g(t[a],t[a+1],l)}o+=i[a]}return t[Math.round(t.length/2)]}var y={image:"image",imageLayer:"imageLayer",html:"html",polygonPx:"polygonPx",polygonRad:"polygonRad",polylinePx:"polylinePx",polylineRad:"polylineRad",square:"square",rect:"rect",circle:"circle",ellipse:"ellipse",path:"path"},x=function(){function t(i,r){if(!i.id)throw new n.PSVError("missing marker id");if(this.psv=r,this.id=i.id,this.type=t.getType(i,!1),this.visible=!0,this.$el=null,this.config={},this.data=void 0,this.tooltip=null,this.props={dynamicSize:!1,anchor:null,visible:!1,staticTooltip:!1,position:null,position2D:null,positions3D:null,width:null,height:null,def:null},this.loader=null,this.is3d()&&(this.loader=new e.TextureLoader,this.psv.config.withCredentials&&this.loader.setWithCredentials(!0),this.psv.config.requestHeaders&&"object"==typeof this.psv.config.requestHeaders&&this.loader.setRequestHeader(this.psv.config.requestHeaders)),this.isNormal())this.$el=document.createElement("div");else if(this.isPolygon())this.$el=document.createElementNS(h,"polygon");else if(this.isPolyline())this.$el=document.createElementNS(h,"polyline");else if(this.isSvg()){var s="square"===this.type?"rect":this.type;this.$el=document.createElementNS(h,s)}this.is3d()||(this.$el.id="psv-marker-"+this.id,this.$el[u]=this),this.update(i)}var r=t.prototype;return r.destroy=function(){delete this.$el[u],delete this.$el,delete this.config,delete this.props,delete this.psv},r.is3d=function(){return this.type===y.imageLayer},r.isNormal=function(){return this.type===y.image||this.type===y.html},r.isPoly=function(){return this.isPolygon()||this.isPolyline()},r.isPolyPx=function(){return this.type===y.polygonPx||this.type===y.polylinePx},r.isPolyRad=function(){return this.type===y.polygonRad||this.type===y.polylineRad},r.isPolygon=function(){return this.type===y.polygonPx||this.type===y.polygonRad},r.isPolyline=function(){return this.type===y.polylinePx||this.type===y.polylineRad},r.isSvg=function(){return this.type===y.square||this.type===y.rect||this.type===y.circle||this.type===y.ellipse||this.type===y.path},r.getScale=function(t,i){if(!this.config.scale)return 1;if("function"==typeof this.config.scale)return this.config.scale(t,i);var r=1;if(Array.isArray(this.config.scale.zoom)){var s=this.config.scale.zoom;r*=s[0]+(s[1]-s[0])*n.CONSTANTS.EASINGS.inQuad(t/100)}if(Array.isArray(this.config.scale.longitude)){var o=this.config.scale.longitude,a=e.MathUtils.degToRad(this.psv.prop.hFov)/2,l=Math.abs(n.utils.getShortestArc(this.props.position.longitude,i.longitude));r*=o[1]+(o[0]-o[1])*n.CONSTANTS.EASINGS.outQuad(Math.max(0,(a-l)/a))}return r},r.getListContent=function(){return this.config.listContent?this.config.listContent:this.config.tooltip.content?this.config.tooltip.content:this.config.html?this.config.html:this.id},r.showTooltip=function(t){if(this.props.visible&&this.config.tooltip.content&&this.props.position2D){var e=i({},this.config.tooltip,{data:this});if(this.isPoly())if(t){var r=n.utils.getPosition(this.psv.container);e.top=t.clientY-r.top,e.left=t.clientX-r.left,e.box={width:20,height:20}}else e.top=this.props.position2D.y,e.left=this.props.position2D.x;else e.top=this.props.position2D.y+this.props.height/2,e.left=this.props.position2D.x+this.props.width/2,e.box={width:this.props.width,height:this.props.height};this.tooltip?this.tooltip.move(e):this.tooltip=this.psv.tooltip.create(e)}},r.refreshTooltip=function(){this.tooltip&&this.showTooltip()},r.hideTooltip=function(){this.tooltip&&(this.tooltip.hide(),this.tooltip=null)},r.update=function(e){var i,r=t.getType(e,!0);if(void 0!==r&&r!==this.type)throw new n.PSVError("cannot change marker type");
2n.utils.deepmerge(this.config,e),"string"==typeof this.config.tooltip&&(this.config.tooltip={content:this.config.tooltip}),this.config.tooltip||(this.config.tooltip={}),this.config.tooltip.trigger||(this.config.tooltip.trigger=c.hover),this.data=this.config.data,this.visible=!1!==this.config.visible,this.is3d()||(this.isNormal()?this.$el.className="psv-marker psv-marker--normal":this.$el.setAttribute("class","psv-marker psv-marker--svg"),this.config.className&&n.utils.addClasses(this.$el,this.config.className),this.config.tooltip&&this.$el.classList.add("psv-marker--has-tooltip"),this.config.content&&this.$el.classList.add("psv-marler--has-content"),this.$el.style.opacity=null!=(i=this.config.opacity)?i:1,this.config.style&&n.utils.deepmerge(this.$el.style,this.config.style)),this.props.anchor=n.utils.parsePosition(this.config.anchor),this.config.scale&&Array.isArray(this.config.scale)&&(this.config.scale={zoom:this.config.scale}),this.isNormal()?this.__updateNormal():this.isPoly()?this.__updatePoly():this.isSvg()?this.__updateSvg():this.is3d()&&this.__update3d()},r.__updateNormal=function(){if(!n.utils.isExtendedPosition(this.config))throw new n.PSVError("missing marker position, latitude/longitude or x/y");if(this.config.image&&(!this.config.width||!this.config.height))throw new n.PSVError("missing marker width/height");this.config.width&&this.config.height?(this.props.dynamicSize=!1,this.props.width=this.config.width,this.props.height=this.config.height,this.$el.style.width=this.config.width+"px",this.$el.style.height=this.config.height+"px"):this.props.dynamicSize=!0,this.config.image?(this.props.def=this.config.image,this.$el.style.backgroundImage="url("+this.config.image+")"):this.config.html&&(this.props.def=this.config.html,this.$el.innerHTML=this.config.html),this.$el.style.transformOrigin=100*this.props.anchor.x+"% "+100*this.props.anchor.y+"%",this.props.position=this.psv.dataHelper.cleanPosition(this.config),this.props.positions3D=[this.psv.dataHelper.sphericalCoordsToVector3(this.props.position)]},r.__updateSvg=function(){var t=this;if(!n.utils.isExtendedPosition(this.config))throw new n.PSVError("missing marker position, latitude/longitude or x/y");switch(this.props.dynamicSize=!0,this.type){case y.square:this.props.def={x:0,y:0,width:this.config.square,height:this.config.square};break;case y.rect:Array.isArray(this.config.rect)?this.props.def={x:0,y:0,width:this.config.rect[0],height:this.config.rect[1]}:this.props.def={x:0,y:0,width:this.config.rect.width,height:this.config.rect.height};break;case y.circle:this.props.def={cx:this.config.circle,cy:this.config.circle,r:this.config.circle};break;case y.ellipse:Array.isArray(this.config.ellipse)?this.props.def={cx:this.config.ellipse[0],cy:this.config.ellipse[1],rx:this.config.ellipse[0],ry:this.config.ellipse[1]}:this.props.def={cx:this.config.ellipse.rx,cy:this.config.ellipse.ry,rx:this.config.ellipse.rx,ry:this.config.ellipse.ry};break;case y.path:this.props.def={d:this.config.path}}n.utils.each(this.props.def,function(e,n){t.$el.setAttributeNS(null,n,e)}),this.config.svgStyle?n.utils.each(this.config.svgStyle,function(e,i){t.$el.setAttributeNS(null,n.utils.dasherize(i),e)}):this.$el.setAttributeNS(null,"fill","rgba(0,0,0,0.5)"),this.props.position=this.psv.dataHelper.cleanPosition(this.config),this.props.positions3D=[this.psv.dataHelper.sphericalCoordsToVector3(this.props.position)]},r.__updatePoly=function(){var t=this;this.props.dynamicSize=!0,this.config.svgStyle?(n.utils.each(this.config.svgStyle,function(e,i){t.$el.setAttributeNS(null,n.utils.dasherize(i),e)}),this.isPolyline()&&!this.config.svgStyle.fill&&this.$el.setAttributeNS(null,"fill","none")):this.isPolygon()?this.$el.setAttributeNS(null,"fill","rgba(0,0,0,0.5)"):this.isPolyline()&&(this.$el.setAttributeNS(null,"fill","none"),this.$el.setAttributeNS(null,"stroke","rgb(0,0,0)"));var e=this.config.polygonPx||this.config.polygonRad||this.config.polylinePx||this.config.polylineRad;if(!Array.isArray(e[0]))for(var i=0;i<e.length;i++)e.splice(i,2,[e[i],e[i+1]]);this.isPolyPx()?this.props.def=e.map(function(e){var n=t.psv.dataHelper.textureCoordsToSphericalCoords({x:e[0],y:e[1]});return[n.longitude,n.latitude]}):this.props.def=e.map(function(t){return[n.utils.parseAngle(t[0]),n.utils.parseAngle(t[1],!0)]});var r=this.isPolygon()?v(this.props.def):_(this.props.def);this.props.position={longitude:r[0],latitude:r[1]},this.props.positions3D=this.props.def.map(function(e){return t.psv.dataHelper.sphericalCoordsToVector3({longitude:e[0],latitude:e[1]})})},r.__update3d=function(){var t=this;if(!this.config.width||!this.config.height)throw new n.PSVError("missing marker width/height");if(this.props.dynamicSize=!1,this.props.width=this.config.width,this.props.height=this.config.height,this.props.position=this.psv.dataHelper.cleanPosition(this.config),this.props.positions3D=[this.psv.dataHelper.sphericalCoordsToVector3(this.props.position)],this.type===y.imageLayer){if(!this.$el){var i,r,s=new e.MeshBasicMaterial({transparent:!0,opacity:null!=(i=this.config.opacity)?i:1,depthTest:!1}),o=new e.PlaneGeometry(1,1),a=new e.Mesh(o,s);a.userData=((r={})[u]=this,r),this.$el=(new e.Group).add(a),Object.defineProperty(this.$el,"visible",{enumerable:!0,get:function(){return this.children[0].userData[u].visible},set:function(t){this.children[0].userData[u].visible=t}})}switch(this.props.def!==this.config.imageLayer&&(this.psv.config.requestHeaders&&"function"==typeof this.psv.config.requestHeaders&&this.loader.setRequestHeader(this.psv.config.requestHeaders(this.config.imageLayer)),this.$el.children[0].material.map=this.loader.load(this.config.imageLayer,function(e){e.anisotropy=4,t.psv.needsUpdate()}),this.props.def=this.config.imageLayer),this.$el.children[0].position.set(this.props.anchor.x-.5,this.props.anchor.y-.5,0),this.$el.position.copy(this.props.positions3D[0]),this.config.orientation){case"horizontal":this.$el.lookAt(0,this.$el.position.y,0),this.$el.rotateX(this.props.position.latitude<0?-Math.PI/2:Math.PI/2);break;case"vertical-left":this.$el.lookAt(0,0,0),this.$el.rotateY(.4*-Math.PI);break;case"vertical-right":this.$el.lookAt(0,0,0),this.$el.rotateY(.4*Math.PI);break;default:this.$el.lookAt(0,0,0)}this.$el.scale.set(this.config.width/100,this.config.height/100,1)}},t.getType=function(t,e){void 0===e&&(e=!1);var i=[];if(n.utils.each(y,function(e){t[e]&&i.push(e)}),0===i.length&&!e)throw new n.PSVError("missing marker content, either "+Object.keys(y).join(", "));if(i.length>1)throw new n.PSVError("multiple marker content, either "+Object.keys(y).join(", "));return i[0]},t}(),b='<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 9 81 81">
2<path fill="currentColor" d="M50.5 90S22.9 51.9 22.9 36.6 35.2 9 50.5 9s27.6 12.4 27.6 27.6S50.5 90 50.5 90zm0-66.3c-6.1 0-11 4.9-11 11s4.9 11 11 11 11-4.9 11-11-4.9-11-11-11z"/>\x3c!--Created by Rohith M S from the Noun Project--\x3e</svg>\n',M=function(t){function e(e){var n;return(n=t.call(this,e,"psv-button--hover-scale psv-markers-button",!0)||this).plugin=n.psv.getPlugin("markers"),n.plugin&&(n.plugin.on(l.SHOW_MARKERS,o(n)),n.plugin.on(l.HIDE_MARKERS,o(n)),n.toggleActive(!0)),n.hide(),n}r(e,t);var n=e.prototype;return n.destroy=function(){this.plugin&&(this.plugin.off(l.SHOW_MARKERS,this),this.plugin.off(l.HIDE_MARKERS,this)),t.prototype.destroy.call(this)},n.isSupported=function(){return!!this.plugin},n.handleEvent=function(t){switch(t.type){case l.SHOW_MARKERS:this.toggleActive(!0);break;case l.HIDE_MARKERS:this.toggleActive(!1)}},n.onClick=function(){this.plugin.prop.visible?this.plugin.hide():this.plugin.show()},e}(n.AbstractButton);M.id="markers",M.icon=b;var w=function(t){function e(e){var i;return(i=t.call(this,e,"psv-button--hover-scale psv-markers-list-button",!0)||this).plugin=i.psv.getPlugin("markers"),i.plugin&&(i.psv.on(n.CONSTANTS.EVENTS.OPEN_PANEL,o(i)),i.psv.on(n.CONSTANTS.EVENTS.CLOSE_PANEL,o(i))),i.hide(),i}r(e,t);var i=e.prototype;return i.destroy=function(){this.psv.off(n.CONSTANTS.EVENTS.OPEN_PANEL,this),this.psv.off(n.CONSTANTS.EVENTS.CLOSE_PANEL,this),t.prototype.destroy.call(this)},i.isSupported=function(){return!!this.plugin},i.handleEvent=function(t){switch(t.type){case n.CONSTANTS.EVENTS.OPEN_PANEL:this.toggleActive(t.args[0]===p);break;case n.CONSTANTS.EVENTS.CLOSE_PANEL:this.toggleActive(!1)}},i.onClick=function(){this.plugin.toggleMarkersList()},e}(n.AbstractButton);w.id="markersList",w.icon=a,n.DEFAULTS.lang[M.id]="Markers",n.DEFAULTS.lang[w.id]="Markers list",n.registerButton(M,"caption:left"),n.registerButton(w,"caption:left");var S=function(t){function s(e,n){var r;return(r=t.call(this,e)||this).markers={},r.prop={visible:!0,currentMarker:null,hoveringMarker:null,stopObserver:null},r.config=i({clickEventOnMarker:!1,gotoMarkerSpeed:"8rpm"},n),r.container=document.createElement("div"),r.container.className="psv-markers",r.container.style.cursor=r.psv.config.mousemove?"move":"default",r.svgContainer=document.createElementNS(h,"svg"),r.svgContainer.setAttribute("class","psv-markers-svg-container"),r.container.appendChild(r.svgContainer),r.container.addEventListener("mouseenter",o(r),!0),r.container.addEventListener("mouseleave",o(r),!0),r.container.addEventListener("mousemove",o(r),!0),r.container.addEventListener("contextmenu",o(r)),r}r(s,t);var a=s.prototype;return a.init=function(){var e=this;t.prototype.init.call(this),this.psv.container.appendChild(this.container),this.psv.on(n.CONSTANTS.EVENTS.CLICK,this),this.psv.on(n.CONSTANTS.EVENTS.DOUBLE_CLICK,this),this.psv.on(n.CONSTANTS.EVENTS.RENDER,this),this.psv.on(n.CONSTANTS.EVENTS.CONFIG_CHANGED,this),this.psv.once(n.CONSTANTS.EVENTS.READY,function(){e.config.markers&&(e.setMarkers(e.config.markers),delete e.config.markers)})},a.destroy=function(){var e,i;this.clearMarkers(!1),null==(e=(i=this.prop).stopObserver)||e.call(i),this.psv.off(n.CONSTANTS.EVENTS.CLICK,this),this.psv.off(n.CONSTANTS.EVENTS.DOUBLE_CLICK,this),this.psv.off(n.CONSTANTS.EVENTS.RENDER,this),this.psv.off(n.CONSTANTS.EVENTS.CONFIG_CHANGED,this),this.psv.container.removeChild(this.container),delete this.svgContainer,delete this.markers,delete this.container,t.prototype.destroy.call(this)},a.handleEvent=function(t){switch(t.type){case"mouseenter":this.__onMouseEnter(t,this.__getTargetMarker(t.target));break;case"mouseleave":this.__onMouseLeave(t,this.__getTargetMarker(t.target));break;case"mousemove":this.__onMouseMove(t,this.__getTargetMarker(t.target));break;case"contextmenu":t.preventDefault();break;case n.CONSTANTS.EVENTS.CLICK:this.__onClick(t,t.args[0],!1);break;case n.CONSTANTS.EVENTS.DOUBLE_CLICK:this.__onClick(t,t.args[0],!0);break;case n.CONSTANTS.EVENTS.RENDER:this.renderMarkers();break;case n.CONSTANTS.OBJECT_EVENTS.ENTER_OBJECT:this.__onMouseEnter(t.detail.originalEvent,t.detail.data);break;case n.CONSTANTS.OBJECT_EVENTS.LEAVE_OBJECT:this.__onMouseLeave(t.detail.originalEvent,t.detail.data);break;case n.CONSTANTS.OBJECT_EVENTS.HOVER_OBJECT:this.__onMouseMove(t.detail.originalEvent,t.detail.data);break;case n.CONSTANTS.EVENTS.CONFIG_CHANGED:this.container.style.cursor=this.psv.config.mousemove?"move":"default"}},a.show=function(){this.prop.visible=!0,this.renderMarkers(),this.trigger(l.SHOW_MARKERS)},a.hide=function(){this.prop.visible=!1,this.renderMarkers(),this.trigger(l.HIDE_MARKERS)},a.toggleAllTooltips=function(){this.prop.showAllTooltips?this.hideAllTooltips():this.showAllTooltips()},a.showAllTooltips=function(){this.prop.showAllTooltips=!0,n.utils.each(this.markers,function(t){t.props.staticTooltip=!0,t.showTooltip()})},a.hideAllTooltips=function(){this.prop.showAllTooltips=!1,n.utils.each(this.markers,function(t){t.props.staticTooltip=!1,t.hideTooltip()})},a.getNbMarkers=function(){return Object.keys(this.markers).length},a.getMarkers=function(){return Object.values(this.markers)},a.addMarker=function(t,e){if(void 0===e&&(e=!0),this.markers[t.id])throw new n.PSVError('marker "'+t.id+'" already exists');var i=new x(t,this.psv);return i.isNormal()?this.container.appendChild(i.$el):i.isPoly()||i.isSvg()?this.svgContainer.appendChild(i.$el):i.is3d()&&this.psv.renderer.scene.add(i.$el),this.markers[i.id]=i,e&&(this.renderMarkers(),this.__refreshUi(),this.__checkObjectsObserver(),this.trigger(l.SET_MARKERS,this.getMarkers())),i},a.getMarker=function(t){var e="object"==typeof t?t.id:t;if(!this.markers[e])throw new n.PSVError('cannot find marker "'+e+'"');return this.markers[e]},a.getCurrentMarker=function(){return this.prop.currentMarker},a.updateMarker=function(t,e){void 0===e&&(e=!0);var n=this.getMarker(t.id);return n.update(t),e&&(this.renderMarkers(),this.__refreshUi(),n.is3d()&&this.psv.needsUpdate(),this.trigger(l.SET_MARKERS,this.getMarkers())),n},a.removeMarker=function(t,e){void 0===e&&(e=!0);var n=this.getMarker(t);n.isNormal()?this.container.removeChild(n.$el):n.isPoly()||n.isSvg()?this.svgContainer.removeChild(n.$el):n.is3d()&&(this.psv.renderer.scene.remove(n.$el),this.psv.needsUpdate()),this.prop.hoveringMarker===n&&(this.prop.hoveringMarker=null),this.prop.currentMarker===n&&(this.prop.currentMarker=null),n.hideTooltip(),n.destroy(),delete this.markers[n.id],e&&(this.__refreshUi(),this.__checkObjectsObserver(),this.trigger(l.SET_MARKERS,this.getMarkers()))},a.removeMarkers=function(t,e){var n=this;void 0===e&&(e=!0),t.forEach(function(t){return n.removeMarker(t,!1)}),e&&(this.__refreshUi(),this.__checkObjectsObserver(),this.trigger(l.SET_MARKERS,this.getMarkers()))},a.setMarkers=function(t,e){var i=this;void 0===e&&(e=!0),this.clearMarkers(!1),n.utils.each(t,function(t){return i.addMarker(t,!1)}),e&&(this.renderMarkers(),this.__refreshUi(),this.__checkObjectsObserver(),this.trigger(l.SET_MARKERS,this.getMarkers()))},a.clearMarkers=function(t){var e=this;void 0===t&&(t=!0),n.utils.each(this.markers,function(t){return e.removeMarker(t,!1)}),t&&(this.renderMarkers(),this.__refreshUi(),this.__checkObjectsObserver(),this.trigger(l.SET_MARKERS,this.getMarkers()))},a.gotoMarker=function(t,e){var n=this;void 0===e&&(e=this.config.gotoMarkerSpeed);var r=this.getMarker(t);return this.psv.animate(i({},r.props.position,{zoom:r.config.zoomLvl,speed:e})).then(function(){n.trigger(l.GOTO_MARKER_DONE,r)})},a.hideMarker=function(t){this.toggleMarker(t,!1)},a.showMarker=function(t){this.toggleMarker(t,!0)},a.showMarkerTooltip=function(t){var e=this.getMarker(t);e.props.staticTooltip=!0,e.showTooltip()},a.hideMarkerTooltip=function(t){var e=this.getMarker(t);e.props.staticTooltip=!1,e.hideTooltip()},a.toggleMarker=function(t,e){void 0===e&&(e=null);var n=this.getMarker(t);n.visible=null===e?!n.visible:e,n.is3d()?this.psv.needsUpdate():this.renderMarkers()},a.showMarkerPanel=function(t){var e,n=this.getMarker(t);null!=n&&null!=(e=n.config)&&e.content?this.psv.panel.show({id:d,content:n.config.content}):this.psv.panel.hide(d)},a.toggleMarkersList=function(){this.psv.panel.prop.contentId===p?this.hideMarkersList():this.showMarkersList()},a.showMarkersList=function(){var t=this,e=[];n.utils.each(this.markers,function(t){t.visible&&!t.config.hideList&&e.push(t)}),e=this.change(l.RENDER_MARKERS_LIST,e),this.psv.panel.show({id:p,content:m(e,this.psv.config.lang[M.id]),noMargin:!0,clickHandler:function(e){var i=e.target?n.utils.getClosest(e.target,"li"):void 0,r=i?i.dataset[u]:void 0;if(r){var s=t.getMarker(r);t.trigger(l.SELECT_MARKER_LIST,s),t.gotoMarker(s),t.hideMarkersList()}}})},a.hideMarkersList=function(){this.psv.panel.hide(p)},a.renderMarkers=function(){var t=this,e=this.psv.getZoomLevel(),i=this.psv.getPosition();n.utils.each(this.markers,function(r){var s=t.prop.visible&&r.visible,o=!1,a=null;if(s&&r.is3d())a=t.__getMarkerPosition(r),s=t.__isMarkerVisible(r,a);else if(s&&r.isPoly()){var h=t.__getPolyPositions(r);if(s=h.length>(r.isPolygon()?2:1)){a=t.__getMarkerPosition(r);var u=h.map(function(t){return t.x-a.x+","+(t.y-a.y)}).join(" ");r.$el.setAttributeNS(null,"points",u),r.$el.setAttributeNS(null,"transform","translate("+a.x+" "+a.y+")")}}else if(s&&(r.props.dynamicSize&&t.__updateMarkerSize(r),a=t.__getMarkerPosition(r),s=t.__isMarkerVisible(r,a))){var d=r.getScale(e,i);if(r.isSvg()){var p=a.x+r.props.width*r.props.anchor.x*(1-d),f=a.y+r.props.height*r.props.anchor.y*(1-d);r.$el.setAttributeNS(null,"transform","translate("+p+", "+f+") scale("+d+", "+d+")")}else r.$el.style.transform="translate3D("+a.x+"px, "+a.y+"px, 0px) scale("+d+", "+d+")"}o=r.props.visible!==s,r.props.visible=s,r.props.position2D=s?a:null,r.is3d()||n.utils.toggleClass(r.$el,"psv-marker--visible",s),s?r.props.staticTooltip?r.showTooltip():r.config.tooltip.trigger===c.click||r===t.prop.hoveringMarker&&!r.isPoly()?r.refreshTooltip():r!==t.prop.hoveringMarker&&r.hideTooltip():r.hideTooltip(),o&&t.trigger(l.MARKER_VISIBILITY,r,s)})},a.__isMarkerVisible=function(t,e){return t.props.positions3D[0].dot(this.psv.prop.direction)>0&&e.x+t.props.width>=0&&e.x-t.props.width<=this.psv.prop.size.width&&e.y+t.props.height>=0&&e.y-t.props.height<=this.psv.prop.size.height},a.__updateMarkerSize=function(t){var e;
2t.$el.classList.add("psv-marker--transparent"),t.isSvg()?(e=t.$el.getAttributeNS(null,"transform"),t.$el.removeAttributeNS(null,"transform")):(e=t.$el.style.transform,t.$el.style.transform="");var n=t.$el.getBoundingClientRect();t.props.width=n.width,t.props.height=n.height,t.$el.classList.remove("psv-marker--transparent"),e&&(t.isSvg()?t.$el.setAttributeNS(null,"transform",e):t.$el.style.transform=e),t.props.dynamicSize=!1},a.__getMarkerPosition=function(t){if(t.isPoly())return this.psv.dataHelper.sphericalCoordsToViewerCoords(t.props.position);var e=this.psv.dataHelper.vector3ToViewerCoords(t.props.positions3D[0]);return e.x-=t.props.width*t.props.anchor.x,e.y-=t.props.height*t.props.anchor.y,e},a.__getPolyPositions=function(t){var e=this,n=t.props.positions3D.length,i=t.props.positions3D.map(function(t){return{vector:t,visible:t.dot(e.psv.prop.direction)>0}}),r=[];return i.forEach(function(t,e){t.visible||[0===e?i[n-1]:i[e-1],e===n-1?i[0]:i[e+1]].forEach(function(n){n.visible&&r.push({visible:n,invisible:t,index:e})})}),r.reverse().forEach(function(t){i.splice(t.index,0,{vector:e.__getPolyIntermediaryPoint(t.visible.vector,t.invisible.vector),visible:!0})}),i.filter(function(t){return t.visible}).map(function(t){return e.psv.dataHelper.vector3ToViewerCoords(t.vector)})},a.__getPolyIntermediaryPoint=function(t,i){var r=this.psv.prop.direction.clone().normalize(),s=(new e.Vector3).crossVectors(t,i).normalize(),o=(new e.Vector3).crossVectors(s,t).normalize(),a=t.clone().multiplyScalar(-r.dot(o)),l=o.clone().multiplyScalar(r.dot(t)),c=(new e.Vector3).addVectors(a,l).normalize(),h=(new e.Vector3).crossVectors(c,r);return c.applyAxisAngle(h,.01).multiplyScalar(n.CONSTANTS.SPHERE_RADIUS)},a.__getTargetMarker=function(t,e){void 0===e&&(e=!1);var i=e?n.utils.getClosest(t,".psv-marker"):t;return i?i[u]:void 0},a.__targetOnTooltip=function(t,e){return!(!t||!e)&&n.utils.hasParent(t,e.container)},a.__onMouseEnter=function(t,e){e&&!e.isPoly()&&(this.prop.hoveringMarker=e,this.trigger(l.OVER_MARKER,e),e.props.staticTooltip||e.config.tooltip.trigger!==c.hover||e.showTooltip(t))},a.__onMouseLeave=function(t,e){!e||e.isPoly()&&this.__targetOnTooltip(t.relatedTarget,e.tooltip)||(this.trigger(l.LEAVE_MARKER,e),this.prop.hoveringMarker=null,e.props.staticTooltip||e.config.tooltip.trigger!==c.hover||e.hideTooltip())},a.__onMouseMove=function(t,e){var n,i;null!=e&&e.isPoly()?i=e:this.prop.hoveringMarker&&this.__targetOnTooltip(t.target,this.prop.hoveringMarker.tooltip)&&(i=this.prop.hoveringMarker),i?(this.prop.hoveringMarker||(this.trigger(l.OVER_MARKER,i),this.prop.hoveringMarker=i),i.props.staticTooltip||i.showTooltip(t)):null!=(n=this.prop.hoveringMarker)&&n.isPoly()&&(this.trigger(l.LEAVE_MARKER,this.prop.hoveringMarker),this.prop.hoveringMarker.props.staticTooltip||this.prop.hoveringMarker.hideTooltip(),this.prop.hoveringMarker=null)},a.__onClick=function(t,e,n){var i,r=null==(i=e.objects.find(function(t){return t.userData[u]}))?void 0:i.userData[u];r||(r=this.__getTargetMarker(e.target,!0)),this.prop.currentMarker&&this.prop.currentMarker!==r&&(this.trigger(l.UNSELECT_MARKER,this.prop.currentMarker),this.psv.panel.hide(d),this.prop.showAllTooltips||this.prop.currentMarker.config.tooltip.trigger!==c.click||this.hideMarkerTooltip(this.prop.currentMarker),this.prop.currentMarker=null),r&&(this.prop.currentMarker=r,this.trigger(l.SELECT_MARKER,r,{dblclick:n,rightclick:e.rightclick}),this.config.clickEventOnMarker?e.marker=r:t.stopPropagation(),this.markers[r.id]&&(r.config.tooltip.trigger===c.click?r.tooltip?this.hideMarkerTooltip(r):this.showMarkerTooltip(r):this.showMarkerPanel(r.id)))},a.__refreshUi=function(){var t,e,n=Object.values(this.markers).filter(function(t){return!t.config.hideList}).length;0===n?(this.psv.panel.isVisible(p)||this.psv.panel.isVisible(d))&&this.psv.panel.hide():this.psv.panel.isVisible(p)?this.showMarkersList():this.psv.panel.isVisible(d)&&(this.prop.currentMarker?this.showMarkerPanel(this.prop.currentMarker):this.psv.panel.hide()),null==(t=this.psv.navbar.getButton(M.id,!1))||t.toggle(n>0),null==(e=this.psv.navbar.getButton(w.id,!1))||e.toggle(n>0)},a.__checkObjectsObserver=function(){var t=Object.values(this.markers).some(function(t){return t.is3d()});!t&&this.prop.stopObserver?(this.prop.stopObserver(),this.prop.stopObserver=null):t&&!this.prop.stopObserver&&(this.prop.stopObserver=this.psv.observeObjects(u,this))},s}(n.AbstractPlugin);S.id="markers",S.EVENTS=l,t.EVENTS=l,t.MarkersPlugin=S,Object.defineProperty(t,"__esMo
2dule",{value:!0})}(e,n(2557),n(2367))},3613(t,e,n){"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},s=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function a(t){for(var e=-1,n=0;n<o.length;n++)if(o[n].identifier===t){e=n;break}return e}function l(t,e){for(var n={},i=[],r=0;r<t.length;r++){var s=t[r],l=e.base?s[0]+e.base:s[0],c=n[l]||0,h="".concat(l," ").concat(c);n[l]=c+1;var u=a(h),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==u?(o[u].references++,o[u].updater(d)):o.push({identifier:h,updater:g(d,e),references:1}),i.push(h)}return i}function c(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var r=n.nc;r&&(i.nonce=r)}if(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),"function"==typeof t.insert)t.insert(e);else{var o=s(t.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(e)}return e}var h,u=(h=[],function(t,e){return h[t]=e,h.filter(Boolean).join("\n")});function d(t,e,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=u(e,r);else{var s=document.createTextNode(r),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(s,o[e]):t.appendChild(s)}}function p(t,e,n){var i=n.css,r=n.media,s=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var f=null,m=0;function g(t,e){var n,i,r;if(e.singleton){var s=m++;n=f||(f=c(e)),i=d.bind(null,n,s,!1),r=d.bind(null,n,s,!0)}else n=c(e),i=p.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var n=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var r=a(n[i]);o[r].references--}for(var s=l(t,e),c=0;c<n.length;c++){var h=a(n[c]);0===o[h].references&&(o[h].updater(),o.splice(h,1))}n=s}}}},53(t,e){!function(t){"use strict";var e=function(){return!0},n=function(){return!1},i=function(){function t(t,e,i){Object.defineProperties(this,{target:{get:function(){return t},set:function(){},enumerable:!0},type:{get:function(){return e},set:function(){},enumerable:!0},args:{get:function(){return i},set:function(){},enumerable:!0}}),this.isDefaultPrevented=n,this.isPropagationStopped=n}var i=t.prototype;return i.preventDefault=function(){this.isDefaultPrevented=e},i.stopPropagation=function(){this.isPropagationStopped=e},t}(),r=function(){function t(){}var e=t.prototype;return e.on=function(t,e){var n=this;if(this.__events=this.__events||{},"object"==typeof t)for(var i in t)t.hasOwnProperty(i)&&(this.__events[i]=this.__events[i]||[],this.__events[i].push(t[i]));else t.split(" ").forEach(function(t){n.__events[t]=n.__events[t]||[],n.__events[t].push(e)});return this},e.off=function(t,e){var n=this;if("object"==typeof t){for(var i in t)if(t.hasOwnProperty(i)){if(this.__events&&i in this.__events){var r=this.__events[i].indexOf(t[i]);-1!==r&&this.__events[i].splice(r,1)}if(this.__once&&i in this.__once){var s=this.__once[i].indexOf(t[i]);-1!==s&&this.__once[i].splice(s,1)}}}else t?t.split(" ").forEach(function(t){if(n.__events&&t in n.__events)if(e){var i=n.__events[t].indexOf(e);-1!==i&&n.__events[t].splice(i,1)}else n.__events[t].length=0;if(n.__once&&t in n.__once)if(e){var r=n.__once[t].indexOf(e);-1!==r&&n.__once[t].splice(r,1)}else n.__once[t].length=0}):(this.__events={},this.__once={});return this},e.once=function(t,e){var n=this;if(this.__once=this.__once||{},"object"==typeof t)for(var i in t)t.hasOwnProperty(i)&&(this.__once[i]=this.__once[i]||[],this.__once[i].push(t[i]));else t.split(" ").forEach(function(t){n.__once[t]=n.__once[t]||[],n.__once[t].push(e)});return this},e.trigger=function(t){var e=Array.prototype.slice.call(arguments,1
2),n=new i(this,t,e);if(this.__events&&t in this.__events)for(var r=0,s=this.__events[t].length;r<s;r++){var o=this.__events[t][r];if("object"==typeof o?o.handleEvent(n):o.call.apply(o,[this,n].concat(e)),n.isPropagationStopped())break}if(this.__once&&t in this.__once){for(var a=0,l=this.__once[t].length;a<l;a++){var c=this.__once[t][a];if("object"==typeof c?c.handleEvent(n):c.call.apply(c,[this,n].concat(e)),n.isPropagationStopped())break}delete this.__once[t]}return n},e.change=function(t,e){var n=Array.prototype.slice.call(arguments,2),r=new i(this,t,n);if(r.value=e,this.__events&&t in this.__events)for(var s=0,o=this.__events[t].length;s<o;s++){var a=this.__events[t][s];if(r.value="object"==typeof a?a.handleEvent(r):a.call.apply(a,[this,r,r.value].concat(n)),r.isPropagationStopped())break}return r.value},t}(),s=r;function o(t){return t="function"==typeof t?t.prototype:t,["on","off","once","trigger","change"].forEach(function(e){t[e]=s.prototype[e]}),t}var a={EventEmitter:s,Event:i,mixin:o},l=a.EventEmitter,c=a.Event,h=a.mixin;t.Event=c,t.EventEmitter=l,t.default=a,t.mixin=h,Object.defineProperty(t,"__esModule",{value:!0})}(e)},7683(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>c});var i=n(6228);const r={props:["src","bgClass","hiResManual","loResManual","manual"],data:function(){return{loResSrc:"/imagecache/blurry/"+this.src,hiResSrc:"",triggerWhenAppearOnScreen:!0}},mounted:function(){this.triggerWhenAppearOnScreen?this.watchVisibility():this.loadHiRes()},methods:{loadHiRes:function(){if(this.src||this.manual){let t,e,n,r,s,o,a;if(e=this.$el,a=e.clientWidth<e.clientHeight,o=e.clientWidth>e.clientHeight?e.clientWidth:e.clientHeight,r=e.querySelector(".fullbg"),s=this,t=new Image,a&&(o=(1.5*o).toFixed(0)),!("addEventListener"in window))return void(r.style.backgroundImage="url("+this.hiResSrc+")");if(n="blurry-enhanced",this.manual)this.hiResSrc=this.hiResManual,this.loResSrc=this.loResManual;else{const t=(0,i.Q8)()?2:(0,i.Tk)()?1.5:1;this.adaptativesize(o*t)}t.onload=function(){e.className+=" "+n,r.style.backgroundImage="url("+s.hiResSrc+")"},t.onerror=function(t){console.error(t)},t.src=this.hiResSrc}else console.error("Empty src for blurry")},adaptativesize:function(t){this.hiResSrc=t>1200?"/imagecache/fullwidth/"+this.src:t>760&&t<1200?"/imagecache/flex/"+this.src:t>480&&t<760||t>350&&t<480||t>200&&t<350?"/imagecache/larger/"+this.src:"/imagecache/fullwidth/"+this.src},watchVisibility:function(){let t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(this.loadHiRes(),t.disconnect())})});(this.src||this.manual)&&t.observe(this.$el)}}};var s=n(3613),o=n.n(s),a=n(7486),l={insert:"head",singleton:!1};o()(a.A,l);a.A.locals;const c=(0,n(707).A)(r,function(){var t=this,e=t._self._c;return e("div",{staticClass:"blurry"},[t.manual?e("div",{class:"lowbg "+(t.bgClass?t.bgClass:""),style:"background-image: url("+t.loResManual+");"}):t._e(),t._v(" "),t.src?e("div",{class:"lowbg "+(t.bgClass?t.bgClass:""),style:"background-image: url("+t.loResSrc+");"}):t._e(),t._v(" "),e("div",{class:"fullbg "+(t.bgClass?t.bgClass:"")}),t._v(" "),t._t("default")],2)},[],!1,null,"47fd1548",null).exports},2736(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>p});var i=n(3136),r=n(3871);const s={props:["sign"]};var o=n(707);const a=(0,o.A)(s,function(){var t=this,e=t._self._c;return e("svg",{staticStyle:{"enable-background":"new 0 0 230.453 230.453"},attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 230.453 230.453","xml:space":"preserve"}},[e("polygon",{attrs:{points:"177.169,43.534 177.169,58.534 204.845,58.534 135.896,127.479 92.36,83.947 0,176.312 10.606,186.918\n\t\t\t\t\t\t\t\t\t\t92.361,105.16 135.896,148.691 215.453,69.14 215.453,96.784 230.453,96.784 230.453,43.534 ",transform:t.sign<0?"scale(1,-1)":"","transform-origin":"center"}}),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g"),t._v(" "),e("g")])},[],!1,null,"13f39b34",null).exports;var l=n(2304),c=n(6228),h=n(6436);const u=jQuery.noConflict(),d={components:{SmartCalendar:i.default,Soustraction:r.default,ArrowChart:a},props:["idroomtypeneo","showotasneo","bookingenginesource","slugneo","idmoteurresaneo","strings"],data:function(){return{dateArrivee:"",dateDepart:"",chambre:[{adults:2,children:0,infants:0,selectorDisplayed:!1}],fetching:!0,csrfToken:window.Laravel.csrfToken,neoPlatform:null,otherPlatforms:[],flatpickrLocale:null,locale:u("meta[name=language]")?.attr("content")||"en"}},watch:{dateArrivee(t,e){this.renderDateArrivee()},dateDepart(t,e){this.renderDateDepart()},flatpickrLocale(){this.renderDateArrivee(),this.renderDateDepart()}},computed:{arrivalForInput(){return(0,c.Yq)(this.dateArrivee,"d/m/Y")},departureForInput(){return(0,c.Yq)(this.dateDepart,"d/m/Y")},roomForInput:()=>JSON.stringify([{adults:2}]),idroomtypeForInput(){return this.idroomtypeneo||-1}},mounted:function(){const t=this;this.dateArrivee=(0,h.JB)()||this.dateArrivee,this.dateDepart=(0,h.F4)()||this.dateDepart,document.addEventListener(l.YR,e=>{e.detail?.payload?.dateArrivee&&(t.dateArrivee=(0,h.JB)()),e.detail?.payload?.dateDepart&&(t.dateDepart=(0,h.F4)())})},methods:{renderDateArrivee(){const t=(0,c.Zj)(this.dateArrivee)||new Date(this.dateArrivee);if(t){const e=this.flatpickrLocale?.weekdays.shorthand[t.getDay()]+".",n=t.getDate();let i=this.flatpickrLocale?.months.shorthand[t.getMonth()];this.flatpickrLocale?.months.longhand[t.getMonth()].length>4&&(i+=".");const r=i?.charAt(0).toUpperCase()+i?.slice(1)+" "+t.getFullYear();u("#arrivee-form-day-name"+this.idroomtypeneo).html(e),u("#arrivee-form-day-number"+this.idroomtypeneo).html(n),u("#arrivee-form-month-year"+this.idroomtypeneo).html(r)}},renderDateDepart(){const t=(0,c.Zj)(this.dateDepart)||new Date(this.dateDepart);
2if(t){const e=this.flatpickrLocale?.weekdays.shorthand[t.getDay()]+".",n=t.getDate();let i=this.flatpickrLocale?.months.shorthand[t.getMonth()];this.flatpickrLocale?.months.longhand[t.getMonth()].length>4&&(i+=".");const r=i?.charAt(0).toUpperCase()+i?.slice(1)+" "+t.getFullYear();u("#depart-form-day-name"+this.idroomtypeneo).html(e),u("#depart-form-day-number"+this.idroomtypeneo).html(n),u("#depart-form-month-year"+this.idroomtypeneo).html(r)}},getSign:function(t,e){return t=parseInt(t.slice(0,t.length-4)),e=parseInt(e),Math.sign(e/t*100-100)},computePercent:function(t,e){t=parseInt(t.slice(0,t.length-4)),e=parseInt(e);let n=Math.floor(e/t*100-100);return n>=0?`+${n}%`:`${n}%`},onPricesFetched:function(t){this.neoPlatform=t.find(t=>"neo"===t?.platform),this.otherPlatforms=t.filter(t=>"neo"!=t?.platform),this.fetching=!1},onPricesFetching:function(){this.otherPlatforms=[],this.neoPlatform=null,this.fetching=!0},formatMessage:function(t){return t.split(".").reduce((t,e)=>t&&t[e]?t[e]:null,this.strings)||t},onFlatpickrInit:function(t){this.flatpickrLocale=t.config?.locale}}};const p=(0,o.A)(d,function(){var t=this,e=t._self._c;return e("form",{attrs:{method:"POST",action:"/reservation",target:"_self",id:"chambre-reservation-mgs"}},[e("div",{staticClass:"row",class:{invisible:t.fetching}},[e("input",{attrs:{hidden:"",name:"_token",type:"text"},domProps:{value:t.csrfToken}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.idmoteurresaneo,expression:"idmoteurresaneo"}],attrs:{hidden:"",name:"id_moteur_resa"},domProps:{value:t.idmoteurresaneo},on:{input:function(e){e.target.composing||(t.idmoteurresaneo=e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.arrivalForInput,expression:"arrivalForInput"}],attrs:{hidden:"",id:"arrivee",name:"arrivee"},domProps:{value:t.arrivalForInput},on:{input:function(e){e.target.composing||(t.arrivalForInput=e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.departureForInput,expression:"departureForInput"}],attrs:{hidden:"",id:"depart",name:"depart"},domProps:{value:t.departureForInput},on:{input:function(e){e.target.composing||(t.departureForInput=e.target.value)}}}),t._v(" "),e("input",{attrs:{hidden:"",name:"chambre",type:"text"},domProps:{value:t.roomForInput}}),t._v(" "),e("input",{attrs:{hidden:"",name:"id_roomtype_neo",type:"text"},domProps:{value:t.idroomtypeForInput}}),t._v(" "),e("div",{staticClass:"chambre-reservation-mgs-wrapper",attrs:{id:"smartcalendar-mgs-resa-detail-chambre-"+t.idroomtypeneo+"-"+t.idmoteurresaneo}},[e("SmartCalendar",{attrs:{id:"sc-detail-chambre",idmoteurresaneo:t.idmoteurresaneo,bookingenginesource:t.bookingenginesource,slugneo:t.slugneo,translations:t.strings.sc,idroomtype:t.idroomtypeneo,idtoggler:"sc-toggler-"+t.idroomtypeneo+"-"+t.idmoteurresaneo},on:{pricesFetched:t.onPricesFetched,pricesFetching:t.onPricesFetching,ready:t.onFlatpickrInit}}),t._v(" "),e("div",{staticClass:"smart-calendar-inputs",attrs:{id:"sc-toggler-"+t.idroomtypeneo+"-"+t.idmoteurresaneo}},[e("div",{staticClass:"smartcalendar-input-container",attrs:{"data-toggle":""}},[e("div",{staticClass:"arrivee-container"},[e("div",{staticClass:"arrivee-form-day-name",attrs:{id:"arrivee-form-day-name"+t.idroomtypeneo}}),t._v(" "),e("div",{staticClass:"arrivee-form-day-number",attrs:{id:"arrivee-form-day-number"+t.idroomtypeneo}}),t._v(" "),e("div",{staticClass:"arrivee-form-month-year",attrs:{id:"arrivee-form-month-year"+t.idroomtypeneo}})])]),t._v(" "),e("div",{staticClass:"smartcalendar-input-container",attrs:{"data-toggle":""}},[e("div",{staticClass:"depart-container"},[e("div",{staticClass:"depart-form-day-name",attrs:{id:"depart-form-day-name"+t.idroomtypeneo}}),t._v(" "),e("div",{staticClass:"depart-form-day-number",attrs:{id:"depart-form-day-number"+t.idroomtypeneo}}),t._v(" "),e("div",{staticClass:"depart-form-month-year",attrs:{id:"depart-form-month-year"+t.idroomtypeneo}})])])]),t._v(" "),e("div",{staticClass:"smartcalendar-main-price-container"},[e("div",{staticClass:"smartcalendar-main-price-text"},[e("div",{staticClass:"smartcalendar-main-price-text-title"},[t._v("\n\t\t\t\t\t\t"+t._s(t.formatMessage("formResa.siteoff"))+"\n\t\t\t\t\t\t"),e("Soustraction")],1),t._v(" "),e("div",{staticClass:"smartcalendar-main-price-text-subtitle"},[t._v("\n\t\t\t\t\t\t"+t._s(t.formatMessage("formResa.tarifgaranti"))+"\n\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"smartcalendar-main-price-value"},[t._v("\n\t\t\t\t\t"+t._s(t.neoPlatform?t.neoPlatform.price:"-")+"\n\t\t\t\t")])]),t._v(" "),t.otherPlatforms&&t.otherPlatforms.length&&t.showotasneo?e("div",{attrs:{id:"smartcalendar-subprice-container"}},[t._l(t.otherPlatforms,function({platform:n,price:i},r){return[e("div",{key:r,staticClass:"smartcalendar-subprice"},[e("div",{staticClass:"smartcalendar-subprice-text"},[t._v("\n\t\t\t\t\t\t\t"+t._s(n.charAt(0).toUpperCase()+n.slice(1))+"\n\t\t\t\t\t\t")]),t._v(" "),e("div",{staticClass:"smartcalendar-subprice-price"},[t.getSign(t.neoPlatform.price,i)>0?e("div",{staticClass:"smartcalendar-subprice-percent",style:t.getSign(t.neoPlatform.price,i)>=0?"background-color : rgb(216, 41, 41)":"background-color : #30b52c"},[e("ArrowChart",{attrs:{sign:t.getSign(t.neoPlatform.price,i)}}),t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.computePercent(t.neoPlatform.price,i))+"\n\t\t\t\t\t\t\t")],1):t._e(),t._v(" "),e("div",{staticClass:"smartcalendar-subprice-value"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(i)+"\n\t\t\t\t\t\t\t")])])])]})],2):t._e(),t._v(" "),e("div",{attrs:{id:"smartcalendar-fetch-container"}},[e("button",{staticClass:"btn resa-toggle",style:{border:"none"}},[e("div",{staticClass:"calendar"},[e("div",{staticClass:"btn-text"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.formatMessage("btn"))+"\n\t\t\t\t\t\t")]),t._v(" "),e("div",{staticClass:"btn-picto btn-picto-calendar"},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"17.513",height:"18.599",viewBox:"0 0 17.513 18.599"}},[e("g",{attrs:{transform:"translate(0 0)"}},[e("g",{attrs:{"data-name":"Groupe 51",transform:"translate(0)"}},[e("path",{attrs:{"data-name":"Tracé 91",d:"M19.735,45.333H17.9a.642.642,0,0,0,0,1.283h1.222V60.939H4.055V46.616H5.684a.642.642,0,0,0,0-1.283H3.444a.629.629,0,0,0-.611.641V61.58a.629.629,0,0,0,.611.641H19.735a.629.629,0,0,0,.611-.641V45.974A.628.628,0,0,0,19.735,45.333Z",transform:"translate(-2.833 -43.623)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 92",d:"M206.458,45.333h-1.817a.641.641,0,0,0,0,1.283h1.817a.641.641,0,0,0,0-1.283Z",transform:"translate(-196.844 -43.623)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 93",d:"M89.479,351.333H88.327a.5.5,0,0,0-.494.494v.823a.5.5,0,0,0,.494.494h1.152a.5.5,0,0,0,.494-.494v-.823A.5.5,0,0,0,89.479,351.333Z",transform:"translate(-84.588 -337.712)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 94",d:"M208.562,351.333h-1.235a.5.5,0,0,0-.494.494v.823a.5.5,0,0,0,.494.494h1.235a.5.5,0,0,0,.494-.494v-.823A.5.5,0,0,0,208.562,351.333Z",transform:"translate(-199.366 -337.712)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 95",d:"M89.973,258.327a.5.5,0,0,0-.494-.494H88.327a.5.5,0,0,0-.494.494v.823a.5.5,0,0,0,.494.494h1.152a.5.5,0,0,0,.494-.494Z",transform:"translate(-84.588 -247.935)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 96",d:"M209.055,258.327a.5.5,0,0,0-.494-.494h-1.235a.5.5,0,0,0-.494.494v.823a.5.5,0,0,0,.494.494h1.235a.5.5,0,0,0,.494-.494Z",transform:"translate(-199.366 -247.935)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 97",d:"M330.312,257.833H329.16a.5.5,0,0,0-.494.494v.823a.5.5,0,0,0,.494.494h1.152a.5.5,0,0,0,.494-.494v-.823A.5.5,0,0,0,330.312,257.833Z",transform:"translate(-316.894 -247.935)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 98",d:"M87.833,161.994v.823a.5.5,0,0,0,.494.494h1.152a.5.5,0,0,0,.494-.494v-.823a.5.5,0,0,0-.494-.494H88.327A.5.5,0,0,0,87.833,161.994Z",transform:"translate(-84.588 -155.407)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 99",d:"M209.055,161.994a.5.5,0,0,0-.494-.494h-1.235a.5.5,0,0,0-.494.494v.823a.5.5,0,0,0,.494.494h1.235a.5.5,0,0,0,.494-.494Z",transform:"translate(-199.366 -155.407)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 100",d:"M330.806,161.994a.5.5,0,0,0-.494-.494H329.16a.5.5,0,0,0-.494.494v.823a.5.5,0,0,0,.494.494h1.152a.5.5,0,0,0,.494-.494Z",transform:"translate(-316.894 -155.407)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 101",d:"M123.116,4.276a.643.643,0,0,0,.641-.641V.641A.643.643,0,0,0,123.116,0h-.641a.643.643,0,0,0-.641.641V3.634a.643.643,0,0,0,.641.641Z",transform:"translate(-117.581 0)"}}),t._v(" "),e("path",{attrs:{"data-name":"Tracé 102",d:"M318.616,0h-.641a.643.643,0,0,0-.641.641V3.634a.643.643,0,0,0,.641.641h.641a.643.643,0,0,0,.641-.641V.641A.643.643,0,0,0,318.616,0Z",transform:"translate(-306.097)"}}
2)])])])])])])])],1)]),t._v(" "),e("div",{staticClass:"row smartcalendar-spinner",class:{invisible:!t.fetching}},[e("div",{staticClass:"spinner-site"})])])},[],!1,null,null,null).exports},6006(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>b});var i=n(7683),r=n(2367),s=n(6448),o=n(150),a=n(3613),l=n.n(a),c=n(9520),h={insert:"head",singleton:!1};l()(c.A,h);c.A.locals;var u=n(7229),d={insert:"head",singleton:!1};l()(u.A,d);u.A.locals;var p=n(6228),f=n(2736),m=n(5183),g=n.n(m);const v=jQuery.noConflict(),_={components:{BlurryBackgroundLoader:i.default,Viewer:r.Viewer,MarkersPlugin:s.MarkersPlugin,GyroscopePlugin:o.GyroscopePlugin,ChambreReservationMGS:f.default},props:["chambre","tarifs","bookingenginesource","idmoteurresaneo","slugneo","reserver","strings"],data:function(){return{currentNumber:0,timer:null,photos:JSON.parse(this.chambre.urlsphotos),displayPanorama:!1,displayText:!0,displayContentAndOverlay:!0,displaySlider:!0,displayCloseBtn:!1,idRoomTypeNeo:null,panorama:null,isMobile:(0,p.Fr)()}},mounted:function(){if(this.isMobile){const t=this;this.hammerSwipeEvt=new(g())(document.getElementById("detail-chambre")),this.hammerSwipeEvt.get("swipe").set({direction:g().DIRECTION_HORIZONTAL}),this.hammerSwipeEvt.on("swipeleft swiperight",function(e){"swipeleft"===e.type?t.prev():"swiperight"===e.type&&t.next()})}else this.startRotation();this.checkNeoId()},methods:{togglePanorama:function(){this.displayText=!1,this.displayPanorama=!0,this.displayCloseBtn=!0,this.displayContentAndOverlay=!1,this.displaySlider=!1,setTimeout(this.initPano,500)},initPano:function(){const t=v("#panorama-"+this.chambre.id+"-"+this.chambre.panorama.id),e=[[s.MarkersPlugin,{markers:[{id:"bottom_img",longitude:0,latitude:-1.57,image:"/imagecache/original/logo2.png",width:250,height:250},{id:"bottom_circle",circle:300,longitude:0,latitude:-1.57,svgStyle:{fill:"rgb(255, 255, 255)"}}]}]];this.isMobile&&e.push(o.GyroscopePlugin);const n=new r.Viewer({container:"panorama-"+this.chambre.id+"-"+this.chambre.panorama.id,panorama:"/imagecache/original/"+t.attr("data-src"),caption:t.attr("data-title"),autorotateSpeed:"0.5rpm",mousewheel:!1,autorotateDelay:1e3,minFov:45,maxFov:90,defaultZoomLvl:80,loadingImg:"/imagecache/medium/logo2.png",navbar:["autorotate","zoom","caption","fullscreen"],plugins:e});this.panorama=n},showSlider:function(){this.displayText=!1,this.displayContentAndOverlay=!1,this.displayCloseBtn=!0,this.displaySlider=!0},showTextOverlay:function(){this.displayText=!0,this.displayContentAndOverlay=!0,this.displayCloseBtn=!1,this.displaySlider=!0,this.displayPanorama=!1,this.panorama.destroy(),this.panorama=null},startRotation:function(){let t=this;this.timer=setInterval(function(){t.currentNumber+=1},5e3)},stopRotation:function(){clearInterval(this.timer),this.timer=null},next:function(){this.stopRotation(),this.currentNumber+=1,this.startRotation()},prev:function(){this.stopRotation(),this.currentNumber-=1,this.startRotation()},show:function(t){this.stopRotation(),this.currentNumber=t,this.startRotation()},hasClass:function(t,e){return(" "+t.className+" ").indexOf(" "+e+" ")>-1},toggleMedia:function(){const t=document.getElementById("panorama-"+this.chambre.id+"-"+this.chambre.panorama.id),e=document.getElementById("chambre-modal-pic-container"+this.chambre.id);this.hasClass(t,"hidden")?(t.classList.remove("hidden"),e.className+=" hidden",this.toggleBtnPanorama="panorama"):(e.classList.remove("hidden"),t.className+=" hidden",this.toggleBtnContent="slider")},checkNeoId:function(){this.chambre&&this.chambre.id_roomtype_bookingengine&&(this.idRoomTypeNeo=this.chambre.id_roomtype_bookingengine)},goBack:function(){window.history.back()},formatMessage:function(t){return t.split(".").reduce((t,e)=>t&&t[e]?t[e]:null,this.strings)||t}}};var y=n(9388),x={insert:"head",singleton:!1};l()(y.A,x);y.A.locals;const b=(0,n(707).A)(_,function(){var t=this,e=t._self._c;return e("div",{staticClass:"detail"},[e("div",{class:"slider-photos-chambre "+(t.displayContentAndOverlay?"":"display-slider")},[e("transition",{attrs:{name:"fade"}},[t.displayContentAndOverlay?e("div",{staticClass:"overlay-slider-photos"}
2):t._e()]),t._v(" "),1===t.photos.length?[e("BlurryBackgroundLoader",{attrs:{src:t.photos[0],bgClass:""}})]:t.displaySlider?[t._l(t.photos,function(n,i){return[i===Math.abs(t.currentNumber).mod(t.photos.length)?[e("BlurryBackgroundLoader",{key:i,attrs:{src:n,bgClass:"slider-element fade-in"}})]:[e("BlurryBackgroundLoader",{key:i,attrs:{src:n,bgClass:"slider-element fade-out hidden-slide"}})]]}),t._v(" "),e("div",{staticClass:"dots-wrapper"},[e("ul",{class:"dots "+(t.displayContentAndOverlay?"hidden-xs":"")},[t._l(t.photos.length,function(n){return[(n-1).mod(t.photos.length)==Math.abs(t.currentNumber).mod(t.photos.length)?e("li",{staticClass:"selecteddot"},[e("div",{staticClass:"dot"}),t._v(" "),e("div",{staticClass:"number"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(n<10?"0"+n:n)+"\n\t\t\t\t\t\t\t")])]):e("li",{on:{click:function(e){return t.show(n-1)}}},[e("div",{staticClass:"dot"})])]})],2)])]:t._e()],2),t._v(" "),e("div",{staticClass:"btn-detail-container"},[e("transition",{attrs:{name:"fade"}},[t.chambre.panorama&&t.displayContentAndOverlay?e("div",{staticClass:"btn btn-display-pano",on:{click:function(e){return t.togglePanorama()}}},[e("div",{staticClass:"btn-picto"},[e("svg",{attrs:{id:"_360-view","data-name":"360-view",xmlns:"http://www.w3.org/2000/svg",width:"25.175",height:"22.224",viewBox:"0 0 25.175 22.224"}},[e("path",{attrs:{id:"Tracé_618","data-name":"Tracé 618",d:"M96.7,123.6c-2.626,0-5.181,1.49-7.812,4.555l-.412.481.412.48c2.631,3.065,5.186,4.555,7.812,4.555s5.189-1.489,7.84-4.553l.418-.482-.418-.483C101.886,125.087,99.321,123.6,96.7,123.6Zm0,8.6c-2.037,0-4.092-1.166-6.268-3.56,2.176-2.394,4.231-3.56,6.268-3.56s4.1,1.166,6.295,3.56C100.8,131.027,98.735,132.193,96.7,132.193Zm0,0",transform:"translate(-84.122 -117.52)",fill:"#fff"}}),t._v(" "),e("path",{attrs:{id:"Tracé_619","data-name":"Tracé 619",d:"M203.695,170.953a2.707,2.707,0,1,0,2.707,2.706A2.71,2.71,0,0,0,203.695,170.953Zm0,3.938a1.231,1.231,0,1,1,1.232-1.232A1.233,1.233,0,0,1,203.695,174.891Zm0,0",transform:"translate(-191.106 -162.547)",fill:"#fff"}}),t._v(" "),e("path",{attrs:{id:"Tracé_620","data-name":"Tracé 620",d:"M2.049,188.051,0,189.917l2.049,1.866v-1.129h1.37v-1.475H2.049Zm0,0",transform:"translate(0 -178.804)",fill:"#fff"}}),t._v(" "),e("path",{attrs:{id:"Tracé_621","data-name":"Tracé 621",d:"M445.88,189.917l-2.049-1.866v1.128h-1.37v1.475h1.37v1.129Zm0,0",transform:"translate(-420.705 -178.804)",fill:"#fff"}}),t._v(" "),e("path",{attrs:{id:"Tracé_622","data-name":"Tracé 622",d:"M219.175,3.419h1.475V2.049h1.129L219.913,0l-1.866,2.049h1.129Zm0,0",transform:"translate(-207.326)",fill:"#fff"}}),t._v(" "),e("path",{attrs:{id:"Tracé_623","data-name":"Tracé 623",d:"M220.651,382.457h-1.475v1.37h-1.129l1.866,2.049,1.866-2.049h-1.129Zm0,0",transform:"translate(-207.326 -363.652)",fill:"#fff"}})])]),t._v(" "),e("div",{staticClass:"btn-text hidden-xs"},[t._v("\n\t\t\t\t\t"+t._s(t.formatMessage("main.pano"))+"\n\t\t\t\t")])]):t._e()]),t._v(" "),e("transition",{attrs:{name:"fade"}},[t.chambre.urlsphotos&&t.displayContentAndOverlay?e("div",{staticClass:"btn btn-display-slider",on:{click:function(e){return t.showSlider()}}},[e("div",{staticClass:"btn-picto"},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"18.726",height:"15.757",viewBox:"0 0 18.726 15.757"}},[e("g",{attrs:{id:"photography-frame",transform:"translate(0 0)"}},[e("g",{attrs:{id:"Groupe_37","data-name":"Groupe 37"}},[e("path",{attrs:{id:"Tracé_64","data-name":"Tracé 64",d:"M18.726,37.518a.687.687,0,0,0-.685-.685H.685A.687.687,0,0,0,0,37.518V51.9a.687.687,0,0,0,.685.685H18.041a.687.687,0,0,0,.685-.685Zm-1.37.685v8.769l-4.019-2.82a.673.673,0,0,0-.856.069l-2.09,2.01L6.052,42.04a.
2681.681,0,0,0-1.016.069L1.382,46.8V38.2ZM1.37,51.22V49.028l4.27-5.469,4.27,4.122a.69.69,0,0,0,.948,0L13.005,45.6l4.35,3.049V51.22Z",transform:"translate(0 -36.833)"}}),t._v(" "),e("path",{attrs:{id:"Tracé_65","data-name":"Tracé 65",d:"M242.441,136.949a1.325,1.325,0,1,0-1.325-1.324A1.325,1.325,0,0,0,242.441,136.949Z",transform:"translate(-231.399 -130.372)"}})])])])]),t._v(" "),e("div",{staticClass:"btn-text hidden-xs"},[t._v("\n\t\t\t\t\t"+t._s(t.formatMessage("main.images"))+"\n\t\t\t\t")])]):t._e()]),t._v(" "),e("transition",{attrs:{name:"fade"}},[t.displayContentAndOverlay?e("div",{staticClass:"btn btn-retour",on:{click:function(e){return t.goBack()}}},[e("div",{staticClass:"btn-picto"},[e("svg",{attrs:{id:"icons_arrow_right-black_big","data-name":"icons/arrow_right-black big",xmlns:"http://www.w3.org/2000/svg",width:"18.13",height:"13.384",viewBox:"0 0 18.13 13.384"}},[e("g",{attrs:{id:"Group",transform:"translate(0)"}},[e("path",{attrs:{id:"Path_24","data-name":"Path 24",d:"M7.258.69,6.58,0,0,6.692l6.58,6.692.679-.69-5.9-6Z"}})]),t._v(" "),e("rect",{attrs:{id:"Rectangle_3","data-name":"Rectangle 3",width:"17.592",height:"0.977",transform:"translate(0.538 6.203)"}})])]),t._v(" "),e("div",{staticClass:"btn-text hidden-xs"},[t._v("\n\t\t\t\t\t"+t._s(t.formatMessage("main.retour"))+"\n\t\t\t\t")])]):t._e()])],1),t._v(" "),t.displayContentAndOverlay?e("div",{staticClass:"chambre-content"},[e("div",{staticClass:"row chambre-content-row",style:{overflowY:"auto"}},[e("div",{staticClass:"col-xs-12 col-sm-6"},[e("div",{staticClass:"subtitle-chambre"},[t.chambre.nb_pers||t.chambre.nb_pers_max&&t.chambre.nb_pers_min?e("span",[t._v(t._s(t.chambre.nb_pers_max&&t.chambre.nb_pers_min?t.chambre.nb_pers_min+" - "+t.chambre.nb_pers_max:t.chambre.nb_pers)+" "+t._s(t.chambre.nb_pers>1||t.chambre.nb_pers_max&&t.chambre.nb_pers_min?t.textpersonnes:t.textpersonne)+" ⢠")]):t._e(),t._v(" "),t.chambre.area?e("span",[t._v(t._s(t.chambre.area)+" m² ⢠")]):t._e(),t._v(" "),t.chambre.subtitle?e("span",[t._v(t._s(t.chambre.subtitle)+" ⢠")]):t._e(),t._v(" "),t.chambre.price?e("span",[t._v(t._s(t.chambre.price))]):t._e()]),t._v(" "),e("h1",{staticClass:"title-chambre"},[t._v("\n\t\t\t\t\t"+t._s(t.chambre.title)+"\n\t\t\t\t")]),t._v(" "),t.chambre.description&&t.displayText?e("div",{staticClass:"toggle-text"},[t.displayText&&t.chambre.description?e("div",{staticClass:"chambre-description",domProps:{innerHTML:t._s(t.chambre.description)}}):t._e(),t._v(" "),t.displayText&&t.chambre.caracteristiques?e("div",{staticClass:"chambre-carac",domProps:{innerHTML:t._s(t.chambre.caracteristiques)}}):t._e()]):t._e()]),t._v(" "),e("div",{staticClass:"col-xs-12 col-sm-6"},[e("div",{staticClass:"row"},[t.idRoomTypeNeo&&t.idmoteurresaneo?e("div",{staticClass:"col-xs-12"},[e("ChambreReservationMGS",{attrs:{idroomtypeneo:t.idRoomTypeNeo,showotasneo:t.chambre.roomtype_bookingengine_show_ota,bookingenginesource:t.bookingenginesource,slugneo:t.slugneo,idmoteurresaneo:t.idmoteurresaneo,strings:t.strings}}
2)],1):t._e(),t._v(" "),t.tarifs.periods?e("div",{staticClass:"col-xs-12 chambre-tarif"},[e("hr",{staticClass:"hr visible-xs"}),t._v(" "),e("div",{staticClass:"tarifs-content"},[e("div",{staticClass:"row periods-container"},[t._l(t.tarifs.periods,function(n,i){return e("div",{staticClass:"col-xs-12 period"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-xs-12 col-sm-8 period-text"},[e("div",{staticClass:"period-title"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t\t"+t._s(n.title)+"\n\t\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("div",{staticClass:"period-duration",domProps:{innerHTML:t._s(n.duration)}})]),t._v(" "),e("div",{staticClass:"col-xs-12 col-sm-4 period-price"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(n.price)+"\n\t\t\t\t\t\t\t\t\t\t")])])])}),t._v(" "),e("div",{staticClass:"col-xs-12 tarifs-text"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.tarifs.text)+"\n\t\t\t\t\t\t\t\t")])],2)])]):t._e()])])])]):t._e(),t._v(" "),t.chambre.panorama&&t.displayPanorama?[e("div",{staticClass:"panorama",attrs:{id:"panorama-"+t.chambre.id+"-"+t.chambre.panorama.id,"data-src":t.chambre.panorama.url,"data-title":t.chambre.title}})]:t._e(),t._v(" "),t.displayCloseBtn?e("div",{staticClass:"btn btn-fermer",on:{click:function(e){return t.showTextOverlay()}}},[e("div",{staticClass:"btn-text"},[t._v(t._s(t.formatMessage("main.fermer")))]),t._v(" "),e("div",{staticClass:"btn-picto"},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10.028",height:"10.042",viewBox:"0 0 10.028 10.042"}},[e("g",{attrs:{id:"Groupe_999","data-name":"Groupe 999",transform:"translate(0 0)"}},[e("path",{attrs:{id:"Tracé_191","data-name":"Tracé 191",d:"M128.493,138a.694.694,0,0,0,.492.211.675.675,0,0,0,.492-.211l3.821-3.822L137.121,138a.694.694,0,0,0,.492.211.675.675,0,0,0,.492-.211.715.715,0,0,0,0-1l-3.81-3.81,3.81-3.822a.715.715,0,0,0,0-1,.7.7,0,0,0-1,0L133.3,132.2l-3.821-3.81a.7.7,0,0,0-1,1l3.821,3.81-3.81,3.821A.68.68,0,0,0,128.493,138Z",transform:"translate(-128.279 -128.173)",fill:"#fff"}})])])])]):t._e()],2)},[],!1,null,"6c0bee80",null).exports},3136(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>_});var i=n(4058),r=n(6436),s=n(6228),o=n(2304);const a={name:"teleport",props:{to:{type:String,required:!0},where:{type:String,default:"after"},disabled:Boolean},data:()=>({nodes:[],waiting:!1,observer:null,parent:null}),watch:{to:"maybeMove",where:"maybeMove",disabled(t){t?(this.disable(),this.teardownObserver()):(this.bootObserver(),this.move())}},mounted(){this.nodes=Array.from(this.$el.childNodes),this.disabled||this.bootObserver(),this.maybeMove()},beforeDestroy(){this.disable(),this.teardownObserver()},computed:{classes(){return this.disabled?["teleporter"]:["teleporter","hidden"]}},methods:{maybeMove(){this.disabled||this.move()},move(){if(this.waiting=!1,this.parent=document.querySelector(this.to),!this.parent)return this.disable(),void(this.waiting=!0);"before"===this.where?this.parent.prepend(this.getFragment()):this.parent.appendChild(this.getFragment())},disable(){this.$el.appendChild(this.getFragment()),this.parent=null},getFragment(){const t=document.createDocumentFragment();return this.nodes.forEach(e=>t.appendChild(e)),t},onMutations(t){let e=!1;for(let n=0;n<t.length;n++){const i=t[n],r=Array.from(i.addedNodes).filter(t=>!this.nodes.includes(t));Array.from(i.removedNodes).includes(this.parent)?(this.disable(),this.waiting=!this.disabled):this.waiting&&r.length>0&&(e=!0)}e&&this.move()},bootObserver(){this.observer||(this.observer=new MutationObserver(t=>this.onMutations(t)),this.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1}))},teardownObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}}};var l=n(3613),c=n.n(l),h=n(6466),u={insert:"head",singleton:!1};c()(h.A,u);h.A.locals;var d=n(707);const p=(0,d.A)(a,function(){var t=this;return(0,t._self._c)("div",{class:t.classes},[t._t("default")],2)},[],!1,null,"127f72fe",null).exports;var f=n(3871),m=n(9952);let g=[];g.fr=n(9887).default.fr,g.it=n(638).default.it,g.es=n(3899).default.es,g.de=n(8504).default.de,g.nl=n(3149).default.nl,g.ru=n(3149).default.ru,g.en=n(2942).default;const v={components:{Soustraction:f.default,Teleport:p},props:["idmoteurresaneo","slugneo","bookingenginesource","roomtypes","translations","prevarrow","nextarrow","inline","manualsize","idroomtype","idtoggler"],data:function(){return{dateArrivee:"",dateDepart:"",chambres:[{adults:2,children:0,infants:0,selectorDisplayed:!1}],locale:"en",calendarID:null,loader:"-",tooltip:null,datesFetching:{},datesFetched:{},datesError:{},bestPriceFetching:!1,bestPriceFetched:!1,bestPrice:null,flatpickrInstance:null,size:0,flatpickrOptions:{mode:"range",minDate:"today",dateFormat:"Y-m-d",positionElement:this.idtoggler?document.getElementById(this.idtoggler):null,inline:!0},neo:{days:{},roomTypes:[],firstDayWithPrice:null,dateStartFetch:null,dateEndFetch:null,config:{}},container:null,dateArriveeEl:null,dateDepartEl:null,moment:null,flatpickr:null,observer:null,fallbackInitTimeout:null}},computed:{hasError(){const t=this.flatpickrInstance;return!!t&&t.getRenderedDates().some(t=>!!this.datesError[t])}},watch:{dateArrivee(t,e){this.dateArriveeEl||(this.dateArriveeEl=document.getElementById(`${this.calendarID}-arrivee`)?.querySelector(".smartcalendar-date-value")),this.dateArriveeEl&&(this.dateArriveeEl.innerHTML=((0,s.Zj)(t)||new Date(t)).toLocaleDateString())},dateDepart(t,e){if(this.dateDepartEl||(this.dateDepartEl=document.getElementById(`${this.calendarID}-depart`)?.querySelector(".smartcalendar-date-value")),this.dateDepartEl&&(this.dateDepartEl.innerHTML=((0,s.Zj)(t)||new Date(t)).toLocaleDateString()),t&&this.dateArrivee){this.fetchLowestPrice
2sForPeriod();const e=this.container;e.getBoundingClientRect();e?.classList.remove("show"),r.$6.bind(this)(this.dateArrivee),r.RK.bind(this)(t)}},"neo.firstDayWithPrice":function(t,e){if(t){const e=(0,s.Zj)(t)||new Date(t),n=(0,s.Zj)(this.dateArrivee)||new Date(this.dateArrivee);if(e&&n.getTime()<e.getTime()){const n=new Date(e);n.setDate(n.getDate()+1),this.flatpickrInstance?.setDate([t,n],!0)}}},"neo.config.ruleBestPrice":function(t,e){t&&this.dateArrivee&&this.dateDepart&&this.fetchLowestPricesForPeriod()},locale(t,e){this.moment.locale(t)},flatpickrOptions(t,e){}},mounted:async function(){const[t,e]=await Promise.all([(0,s.c8)(),(0,s.lV)()]);this.flatpickr=t.default,this.moment=e.default,this.locale=document.querySelector("meta[name=language]")?.content||this.locale,this.calendarID="smartcalendar-"+Math.random().toString(36).substring(2)+Date.now()+this.idmoteurresaneo,this.loader=this.inlineLoader?'<div class="sc-loader-inline"><div class="sc-loader-inline-component"></div><div class="sc-loader-inline-component"></div><div class="sc-loader-inline-component"></div><div class="sc-loader-inline-component"></div></div>':'<span class="sc-loader-circle"></span>',await this.fetchSmartCalendarConfig(),this.$nextTick(()=>{const t=this;this.container||(this.container=document.getElementById(this.calendarID)),this.initFlatpickr(),this.dateArriveeEl||(this.dateArriveeEl=document.getElementById(`${this.calendarID}-arrivee`)?.querySelector(".smartcalendar-date-value")),this.dateDepartEl||(this.dateDepartEl=document.getElementById(`${this.calendarID}-depart`)?.querySelector(".smartcalendar-date-value"));const e=this.container;if(this.dateStorageChanged=function(e){if(e.detail?.source!==t){const n=(0,r.JB)(),i=(0,r.F4)();e.detail?.payload?.dateArrivee&&t.flatpickrInstance?.setDate(n,!1,!0),e.detail?.payload?.dateDepart&&t.flatpickrInstance?.setDate([n,i],!1,!0),t.dateArrivee=n||t.dateArrivee,t.dateDepart=i||t.dateDepart}},document.addEventListener(o.YR,this.dateStorageChanged),t.idtoggler){document.getElementById(t.calendarID).style.top="0px",document.getElementById(t.idtoggler)?.addEventListener("click",function(){const e=document.getElementById(t.calendarID);let n=e.getBoundingClientRect();e?.classList.toggle("show");const i=document.getElementById(t.idtoggler).getBoundingClientRect();e.style.left=i.left+i.width/2-n.width/2+"px",e.style.top=`${window.scrollY+i.top+i.height}px`,n=e.getBoundingClientRect();const r=n.x+n.width-(0,s.vw)(100);r>0&&(e.style.left=n.x-r-50+"px",n=e.getBoundingClientRect());const o=-n.x;o>0&&(e.style.left=`${n.x+o+50}px`,n=e.getBoundingClientRect());const a=n.y+n.height-(0,s.vh)(100);a>0&&(e.style.top=parseFloat(e.style.top)-a-50+"px",n=e.getBoundingClientRect());const l=-n.y;l>0&&(e.style.top=`${parseFloat(e.style.top)+l+50}px`,n=e.getBoundingClientRect())}),(0,s.X2)(e,n=>{e.classList.contains("show")&&!n?.target.closest(`#${t.idtoggler}`)&&e.classList.remove("show")})}(0,s.b1)(e=>{t.sizeCheck()}),this.tooltip=document.createElement("div"),this.tooltip.classList.add("smartcalendar-tooltip"),e.appendChild(this.tooltip)})},created(){this.sizeCheckDebounced=(0,m.debounce)(()=>{this.sizeCheckFunc()},150)},beforeDestroy(){this.dateStorageChanged&&document.removeEventListener(o.YR,this.dateStorageChanged),this.flatpickrInstance&&this.flatpickrInstance.destroy(),this.observer&&this.observer.disconnect(),this.fallbackInitTimeout&&clearTimeout(this.fallbackInitTimeout)},methods:{sizeCheck:function(){this.flatpickrInstance&&this.sizeCheckDebounced()},sizeCheckFunc:function(){if(this.manualsize)switch(this.manualsize){case"md":case"lg":this.flatpickrInstance?.set("showMonths",2);break;default:this.flatpickrInstance?.set("showMonths",1)}const t=this.container;t&&this.flatpickrInstance&&(t.classList.remove("sc-sm"),t.classList.remove("sc-md"),t.classList.remove("sc-lg"),t.offsetWidth<=650&&(this.flatpickrInstance?.set("showMonths",1),t.classList.add("sc-sm"),this.size=1),t.offsetWidth>650&&(this.flatpickrInstance?.set("showMonths",2),t.classList.add("sc-md"),this.size=2),t.offsetWidth>950&&(this.flatpickrInstance?.set("showMonths",2),t.classList.add("sc-lg"),this.size=3))},showTooltip:function(t,e){if(e&&(this.tooltip.innerHTML=e,this.tooltip.classList.contains("show")||this.tooltip.classList.add("show")),t){const e=this.container.getBoundingClientRect(),n=t.getBoundingClientRect(),i=this.tooltip.getBoundingClientRect(),r={top:n.top-e.top,right:n.right-e.right,bottom:n.bottom-e.bottom,left:n.left-e.left};this.tooltip.style.left=r.left+n.width/2-i.width/2+"px",this.tooltip.style.top=r.top-i.height+"px"}},hideTooltip:function(){this.tooltip.innerHTML="",this.tooltip.classList.remove("show")},formatDay:function(t){const e=(0,s.Yq)(t.dateObj),n=this.neo.days[e],i=n?.price,r=this.datesFetching[e],o=this.datesFetched[e],a=this.datesError[e],l=t.classList.contains("inRange")||t.classList.contains("startRange")||t.classList.contains("endRange"),c=this;return{element:t,date:e,price:i?.price||null,currency:i?.room_type?.currency||"â¬",fetching:r,fetched:o,error:a,isHidden:i?.is_hidden,isEnabled:!t.classList.contains("flatpickr-disabled"),isSelected:l,isArrival:t.classList.contains("startRange"),isDeparture:t.classList.contains("endRange"),isToday:t.classList.contains("today"),isPrevMonth:t.classList.contains("prevMonthDay"),isNextMonth:t.classList.contains("nextMonthDay"),isBestPrice:i?.best_price||null,closedForDeparture:i?.closed_for_departure||null,availability:n?.availability||null,minStay:i?.min_stay||null,dayMinStay:n?.min_stay||null,dayCFA:n?.closed_for_arrival||null,dayCFD:n?.closed_for_departure||null,setTooltip:function(e,n=!1){!n&&l||t.addEventListener("mouseenter",n=>{c.showTooltip(t,e)}),t.addEventListener("mouseleave",t=>{c.hideTooltip()})}}},renderDay:function(t,e){const n=t.element.classList.contains("inRange");let i=t.element.querySelector(".day-label");i||(i=document.createElement("div"),i.classList.add("day-label"),t.element.innerHTML="",t.element.appendChild(i)),i.textContent=t.element?.dateObj?t.element.dateObj.getDate():((0,s.Zj)(t.date)||new Date(t.date)).getDate();let r=t.element.querySelector(".day-inner-element");r||(r=document.createElement("div"),r.classList.add("day-inner-element"),t.element.appendChild(r)),r.innerHTML="-";const a=this.neo.config;if(n&&!t.element.classList.contains("inRange")&&t.element.classList.add("inRange"),t.isPrevMonth||t.isNextMonth)return t.element.classList.add("flatpickr-disabled"),void t.element.classList.add("hidden");if(t.fetching&&!t.fetched)return t.element.classList.add("flatpickr-disabled"),void(r.innerHTML=this.loader);if(!t.error){const n=e?.selectedDates?.length?(0,s.Yq)(e.selectedDates[0]):void 0,i=e?.
2selectedDates?.length>1?(0,s.Yq)(e.selectedDates[1]):void 0,l=n?i?o.I9:o.pr:o.IA;if(t.price&&!t.isHidden&&(r.innerHTML=`${parseInt(t?.price)} ${t?.currency}`),t.isSelected){const e=this.manualsize&&this.manualsize<="sm"||this.size<=1;r.innerHTML=t.isArrival?e?`${this.translations.arrival?.slice(0,3)}.`:this.translations.arrival:t.isDeparture?e?`${this.translations.departure?.slice(0,3)}.`:this.translations.departure:""}if(a){if(a.ruleBestPrice&&t.isBestPrice&&(t.element.classList.add("bestPrice"),t.setTooltip(this.translations.tooltip_bestprice)),a.ruleAvailability&&a.availabilityThreshold&&t.availability&&t.availability<a.availabilityThreshold){const e=document.createElement("div");e.classList.add("sc-icon","sc-availability"),t.element.appendChild(e),t.setTooltip(this.translations.tooltip_availability)}if(a.ruleStay&&t.minStay>1){const e=document.createElement("div");e.classList.add("sc-icon","sc-minstay"),t.element.appendChild(e),t.setTooltip(`${this.translations.tooltip_minstay_p1} ${t.minStay} ${this.translations.tooltip_minstay_p2}`)}}const c=new Date(t.date).getTime(),h=n?new Date(n).getTime():null,u=c&&h?c>h:void 0,d=c&&h?c<h:void 0,p=n?this.neo.days[n]:null;if(l==o.pr&&(t.setTooltip(this.translations.tooltip_departure_select,!0),d&&t.setTooltip(this.translations.tooltip_new_arrival_select,!0),u&&t.dayCFD&&(t.element.classList.add("flatpickr-disabled"),t.setTooltip(this.translations.tooltip_nodeparture,!0)),c==h&&t.setTooltip(this.translations.tooltip_same_as_arrival,!0)),t.price||l==o.pr&&(l!=o.pr||u)||t.isHidden||(t.element.classList.add("flatpickr-disabled"),t.setTooltip(this.translations.tooltip_noarrival,!0)),p?.min_stay>1&&l==o.pr){const e=new Date(n);e.setDate(e.getDate()+p.min_stay),c<e.getTime()&&c>h&&(t.element.classList.add("flatpickr-disabled"),t.setTooltip(this.translations.tooltip_minstay_error,!0))}}},setDate:function(t){if(t instanceof Array){const e=t[0]?new Date(t[0]):null,n=t?.length>1?new Date(t[1]):null;e?.getTime()==n?.getTime()?this.flatpickrInstance.setDate([e]):(this.dateArrivee=(0,s.Yq)(e),this.dateDepart=(0,s.Yq)(n))}else this.dateArrivee=(0,s.Yq)(t),this.dateDepart=""},fetchBookingEngine:function(t,e){const n=i.A.create({transformRequest:[(t,e)=>(e&&e["X-CSRF-TOKEN"]&&delete e["X-CSRF-TOKEN"],e?.common&&e.common["X-CSRF-TOKEN"]&&delete e.common["X-CSRF-TOKEN"],t),...i.A.defaults.transformRequest]}),r=new URL(t,this.bookingenginesource);r.search=new URLSearchParams(e);const s=r.toString();return n.get(s).catch(n=>{throw console.error(`ERROR while fetchBookingEngine() [route: ${t}, data: ${JSON.stringify(e)}]: ${n.toString()}`),n})},fetchSmartCalendar:function(){const t=this.flatpickrInstance;if(!t)return;const e=t.getRenderedDates().filter(t=>!this.datesFetched[t]&&!this.datesFetching[t]||this.datesError[t]);if(!e?.length)return;e.forEach(t=>this.$set(this.datesFetching,t,!0));const n=this;t.redraw();let i=null;return i=this.idroomtype?this.fetchBookingEngine(`/api/public/smartcalendar/roomtype/${this.idroomtype}`,{dates:e}):this.fetchBookingEngine(`/api/public/smartcalendar/${this.slugneo}`,{dates:e}),i.then(t=>{const{days:e,firstDayWithPrice:i}=t?.data;Object.entries(e)?.forEach(([t,e])=>{n.$set(n.neo.days,t,{price:e.price,min_stay:e.min_stay,availability:e.availability,closed_for_departure:e.closed_for_departure,closed_for_arrival:e.closed_for_arrival})}),n.$set(n.neo,"firstDayWithPrice",i)}).then(()=>{e.forEach(t=>{n.$set(n.datesFetching,t,!1),n.$set(n.datesFetched,t,!0),n.$set(n.datesError,t,!1)})}).catch(t=>{e.forEach(t=>{n.$set(n.datesFetching,t,!1),n.$set(n.datesFetched,t,!1),n.$set(n.datesError,t,!0)}),console.error(`ERROR in fetchBookingEngine : ${t.toString()}`)}).finally(()=>{t.redraw()})},fetchSmartCalendarConfig:function(){const t=this,e=this.flatpickrInstance;return t.$emit("configFetching"),this.fetchBookingEngine(`/api/public/smartcalendar/config/${this.slugneo}`).then(n=>{const i=n.data;t.$set(t.neo,"config",i),t.$emit("configFetched",i),e&&e.redraw()}).catch(t=>{console.error(`ERROR in fetchSmartCalendarConfig : ${t.toString()}`)})},fetchLowestPricesForPeriod:function(){this.bestPriceFetching=!0;const t=this;let e=null;if(t.$emit("pricesFetching"),this.idroomtype)e=this.fetchBookingEngine(`/api/public/bestprice/roomtype/${this.idroomtype}`,{arrival:this.dateArrivee,departure:this.dateDepart}).then(e=>{const n=e?.data;if(n?.length){const e=n[0]?.price;
2t.bestPrice=e,t.bestPriceFetched=!0,t.bestPriceFetching=!1,t.$emit("pricesFetched",n)}else t.bestPrice=null,t.bestPriceFetched=!0,t.bestPriceFetching=!1,t.$emit("pricesFetched",[])});else{const n=this.roomtypes?.length?JSON.stringify(this.roomtypes):[],i={arrival:this.dateArrivee,departure:this.dateDepart};n?.length&&(i.roomtypes=n),e=this.fetchBookingEngine(`/api/public/bestprice/${this.slugneo}`,i).then(e=>{const n=e?.data;if(n?.length){const e=n[0].prices[0]?.price;t.bestPrice=e,t.bestPriceFetched=!0,t.bestPriceFetching=!1,t.$emit("pricesFetched",n)}})}return e.catch(e=>{console.error(`ERROR in fetchLowestPricesForPeriod : ${e.toString()}`),t.bestPriceFetching=!1,t.bestPriceFetched=!1})},initFlatpickr:function(){if(!this.container)return void console.error("SmartCalendar initFlatpickr: container not found !");let t=!1;const e=()=>{t||this._isDestroyed||(t=!0,this.observer&&(this.observer.disconnect(),this.observer=null),this.fallbackInitTimeout&&(clearTimeout(this.fallbackInitTimeout),this.fallbackInitTimeout=null),this.createFlatpickrInstance())};if(!("IntersectionObserver"in window))return void e();const n=t=>{this.observer=new IntersectionObserver(t=>{t[0].isIntersecting&&e()},{rootMargin:"100px 0px",threshold:.01}),this.observer.observe(t)};if(this.idtoggler){const t=i=>{if(this._isDestroyed)return;const r=document.getElementById(this.idtoggler);r?n(r):i>0?this.$nextTick(()=>t(i-1)):(console.error(`SmartCalendar: idtoggler "${this.idtoggler}" not found, initializing without a visibility check`),e())};t(2)}else n(this.container),this.inline||(this.fallbackInitTimeout=setTimeout(e,3e3))},createFlatpickrInstance:function(){const t=this,e=this.container.querySelector(".scfp-input-wrapper");if(!e)return void console.error("SmartCalendar initFlatpickr: container not found !");this.flatpickrInstance&&(this.flatpickrInstance.destroy(),this.flatpickrInstance=null);(window.requestIdleCallback||window.requestAnimationFrame)(()=>{this.flatpickrInstance=flatpickr(e,{mode:t.flatpickrOptions.mode,locale:g[t.locale]?g[t.locale]:g.en,minDate:t.flatpickrOptions.minDate,dateFormat:t.flatpickrOptions.dateFormat,inline:t.flatpickrOptions.inline,positionElement:document.getElementById(t.idtoggler)||null,monthSelectorType:"static",nextArrow:t.nextarrow?t.nextarrow:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 17 17"><g></g><path d="M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z"></path></svg>',prevArrow:t.prevarrow?t.prevarrow:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 17 17"><g></g><path d="M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z"></path></svg>',wrap:!0,onReady:function(e,n,i){i.calendarContainer.classList.add("smartcalendar-flatpickr","theme-triangles"),t.$emit("ready",i)},onDayCreate:function(e,n,i,r){const s=t.formatDay(r);s.element.className+=" sc-price-container",t.renderDay(s,i)},onMonthChange:function(e,n,i){const r=t.moment,s=r([i.currentYear,i.currentMonth]).startOf("month"),o=r(s).subtract(1,"month").startOf("month"),a=r(s).add(2,"month").endOf("month");(o.isSameOrBefore(t.dateStartFetch)||a.isSameOrAfter(t.dateEndFetch))&&t.fetchSmartCalendar()},onYearChange:function(e,n,i){t.fetchSmartCalendar()},onChange:function(e,n,i){const r=e?.length?new Date(e[0]).setHours(0,0,0,0):null,o=t.dateArrivee?.length?((0,s.Zj)(t.dateArrivee)||new Date(t.dateArrivee)).setHours(0,0,0,0):null;e?.length>1&&new Date(e[1]).setHours(0,0,0,0);r<o?(i.setDate([e[0]],!1),t.setDate([e[0]])):t.setDate(e)}}),this.flatpickrInstance.defaultSetDate=this.flatpickrInstance.setDate,this.flatpickrInstance.setDate=(t,e=!1,n=!1)=>{const i=this.flatpickrInstance,r=i.currentMonth,s=i.currentYear,o=new Date(s,r,1);i.defaultSetDate(t,e),n||i.jumpToDate(o)},this.flatpickrInstance.getRenderedDates=()=>{const t=this.flatpickrInstance.currentMonth,e=this.flatpickrInstance.currentYear,n=[];for(let i=0;i<this.flatpickrInstance.config.showMonths+2;++i){const r=(t+i-1)%12,o=t+i-1>11?e+1:e;n.push(...(0,s.PK)(r,o))}return n};const n=(0,r.JB)(),i=(0,r.F4)();
2this.flatpickrInstance?.setDate([n,i],!0,!0),this.dateArrivee=n||this.dateArrivee,this.dateDepart=i||this.dateDepart,this.sizeCheck(),this.fetchSmartCalendar()})}}};const _=(0,d.A)(v,function(){var t=this,e=t._self._c;return e("Teleport",{staticClass:"neo-smartcalendar-wrapper",attrs:{to:"body",disabled:t.inline}},[e("div",{staticClass:"neo-smartcalendar",class:{inline:t.inline,"manual-size":!!t.manualsize,"sc-sm":t.manualsize&&"sm"===t.manualsize,"sc-md":t.manualsize&&"md"===t.manualsize,"sc-lg":t.manualsize&&"lg"===t.manualsize},attrs:{id:t.calendarID}},[e("div",{staticClass:"smartcalendar-header"},[e("div",{staticClass:"smartcalendar-date smartcalendar-date-arrivee",attrs:{id:`${t.calendarID}-arrivee`}},[e("span",{staticClass:"smartcalendar-date-title"},[t._v(t._s(t.translations.arrival))]),t._v(" \n\t\t\t\t\t"),e("span",{staticClass:"smartcalendar-date-value"})]),t._v(" "),e("div",{staticClass:"smartcalendar-date smartcalendar-date-depart",attrs:{id:`${t.calendarID}-depart`}},[e("span",{staticClass:"smartcalendar-date-title"},[t._v(t._s(t.translations.departure))]),t._v(" \n\t\t\t\t\t"),e("span",{staticClass:"smartcalendar-date-value"})])]),t._v(" "),e("div",{staticClass:"smartcalendar-main-container"},[e("div",{staticClass:"scfp-input-wrapper",style:"display: none;"},[e("input",{attrs:{type:"text","data-input":""}})])]),t._v(" "),e("div",{staticClass:"smartcalendar-bottom-line"},[t._v("\n\t\t\t\t"+t._s(t.idroomtype?t.translations.legend_description_detail:t.translations.legend_description)+"\n\t\t\t")]),t._v(" "),t.hasError?e("div",{staticClass:"smartcalendar-bottom-line smartcalendar-error"},[t._v("\n\t\t\t\t"+t._s(t.translations.legend_error)+"\n\t\t\t")]):t._e(),t._v(" "),e("div",{staticClass:"smartcalendar-footer"},[e("div",{staticClass:"smartcalendar-footer-legend",attrs:{id:`${t.calendarID}-legend`}},[t.neo.config.ruleBestPrice?e("div",{staticClass:"smartcalendar-legend-item"},[e("span",{staticClass:"smartcalendar-legend-item-icon legend-color-green"},[t._v("â¬")]),t._v(" "),e("span",{staticClass:"smartcalendar-legend-item-title"},[t._v("\n "+t._s(t.translations.legend_bestprice)+"\n ")])]):t._e(),t._v(" "),t.neo.config.ruleAvailability?e("div",{staticClass:"smartcalendar-legend-item"},[e("span",{staticClass:"smartcalendar-legend-item-icon legend-icon legend-icon-dot legend-color-red"}),t._v(" "),e("span",{staticClass:"smartcalendar-legend-item-title"},[t._v("\n "+t._s(t.translations.legend_availability)+"\n ")])]):t._e(),t._v(" "),t.neo.config.ruleStay?e("div",{staticClass:"smartcalendar-legend-item"},[e("span",{staticClass:"smartcalendar-legend-item-icon legend-icon legend-icon-dotted-line legend-color-black"}),t._v(" "),e("span",{staticClass:"smartcalendar-legend-item-title"},[t._v("\n "+t._s(t.translations.legend_minstay)+"\n ")])]):t._e()]),t._v(" "),t.idroomtype?t._e():e("div",{staticClass:"smartcalendar-footer-price",attrs:{id:`${t.calendarID}-price`}},[e("div",{staticClass:"smartcalendar-footer-price-title"},[t._v("\n\t\t\t\t\t\t"+t._s(t.translations.price_from)+"\n\t\t\t\t\t")]),t._v(" "),e("div",{staticClass:"smartcalendar-footer-price-value",domProps:{innerHTML:t._s(t.bestPriceFetching?t.loader:t.bestPriceFetched&&t.bestPrice?t.bestPrice:"-")}}),t._v(" "),e("div",{staticClass:"smartcalendar-main-price-text"},[e("div",{staticClass:"smartcalendar-main-price-text-title"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.translations.siteoff)+"\n\t\t\t\t\t\t\t"),e("Soustraction")],1),t._v(" "),e("div",{staticClass:"smartcalendar-main-price-text-subtitle"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.translations.bestprice)+"\n\t\t\t\t\t\t")])])])])])])},[],!1,null,null,null).exports},3871(t,e,n){"use strict";n.d(e,{default:()=>s});var i=n(725);const r=n.n(i)();const s=(0,n(707).A)(r,function(){var t=this._self._c;this._self._setupProxy;return t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 31.006 31.008"}},[t("path",{attrs:{id:"Soustraction_2","data-name":"Soustraction 2",d:"M-9884-2210a4.177,4.177,0,0,1-2.1-.857,5.752,5.752,0,0,0-1.483-.75,4.063,4.063,0,0,0-1.067-.115c-.191,0-.387.006-.576.013h-.074c-.19.008-.43.016-.652.016a3.056,3.056,0,0,1-1.543-.313,4.13,4.13,0,0,1-1.367-1.769,5.821,5.821,0,0,0-.932-1.427,5.813,5.813,0,0,0-1.424-.932A4.157,4.157,0,0,1-9897-2217.5a4.078,4.078,0,0,1-.3-2.2v-.013a6.018,6.018,0,0,0-.094-1.705,5.711,5.711,0,0,0-.751-1.477A4.184,4.184,0,0,1-9899-2225a4.167,4.167,0,0,1,.861-2.1,5.766,5.766,0,0,0,.748-1.48,5.991,5.991,0,0,0,.095-1.706v-.014a4.1,4.1,0,0,1,.3-2.2,4.152,4.152,0,0,1,1.771-1.366,5.8,5.8,0,0,0,1.423-.929,5.833,5.833,0,0,0,.926-1.417v-.012A4.169,4.169,0,0,1-9891.5-2238a3.069,3.069,0,0,1,1.536-.31c.225,0,.464.01.658.016h.074c.19.006.388.014.58.014a4.036,4.036,0,0,0,1.065-.115,5.721,5.721,0,0,0,1.479-.75A4.173,4.173,0,0,1-9884-2240a4.158,4.158,0,0,1,2.1.858,5.819,5.819,0,0,0,1.491.758,3.967,3.967,0,0,0,1.061.115c.184,0,.367,0,.548-.013h.11c.205-.008.437-.016.66-.016a3.064,3.064,0,0,1,1.534.31,4.12,4.12,0,0,1,1.361,1.768,5.824,5.824,0,0,0,.936,1.433,5.782,5.782,0,0,0,1.422.925,4.14,4.14,0,0,1,1.772,1.375,4.134,4.134,0,0,1,.3,2.2v.012a6.034,6.034,0,0,0,.095,
21.708,5.7,5.7,0,0,0,.749,1.48A4.169,4.169,0,0,1-9869-2225a4.162,4.162,0,0,1-.86,2.11,5.7,5.7,0,0,0-.751,1.478,6.1,6.1,0,0,0-.094,1.707v.012a4.118,4.118,0,0,1-.3,2.2,4.139,4.139,0,0,1-1.771,1.365,5.93,5.93,0,0,0-1.423.93,5.766,5.766,0,0,0-.936,1.431,4.143,4.143,0,0,1-1.362,1.764,3.04,3.04,0,0,1-1.539.314c-.223,0-.453-.009-.655-.016h-.082c-.187,0-.382-.013-.572-.013a4.015,4.015,0,0,0-1.066.115,5.765,5.765,0,0,0-1.481.75A4.179,4.179,0,0,1-9884-2210Zm-6.187-14.977a1.5,1.5,0,0,0-1.124.508,1.5,1.5,0,0,0-.375,1.088,1.481,1.481,0,0,0,.5,1.029l4.694,4.144a1.522,1.522,0,0,0,1,.375h.118a1.545,1.545,0,0,0,1.039-.536l8.015-9.669a1.484,1.484,0,0,0,.34-1.1,1.48,1.48,0,0,0-.533-1.015,1.506,1.506,0,0,0-.958-.347,1.5,1.5,0,0,0-1.16.546l-7.025,8.477-3.536-3.125a1.5,1.5,0,0,0-1-.375Z",transform:"translate(9899.503 2240.503)",fill:"#07CF5E",stroke:"rgba(0,0,0,0)","stroke-miterlimit":"10","stroke-width":"1"}})])},[],!1,null,"f39b301a",null).exports},707(t,e,n){"use strict";function i(t,e,n,i,r,s,o,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(t,e){return l.call(e),h(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}n.d(e,{A:()=>i})},2557(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n="147",i=100,r=101,s=102,o=200,a=201,l=202,c=203,h=204,u=205,d=206,p=207,f=208,m=209,g=210,v=300,_=301,y=302,x=303,b=304,M=306,w=1e3,S=1001,T=1002,E=1003,A=1004,C=1005,R=1006,L=1007,P=1008,I=1009,D=1012,O=1014,N=1015,U=1016,k=1020,F=1023,z=1026,B=1027,H=33776,V=33777,G=33778,W=33779,j=35840,X=35841,Y=35842,q=35843,Z=37492,J=37496,K=37808,$=37809,Q=37810,tt=37811,et=37812,nt=37813,it=37814,rt=37815,st=37816,ot=37817,at=37818,lt=37819,ct=37820,ht=37821,ut=36492,dt=2300,pt=2301,ft=2302,mt=2400,gt=2401,vt=2402,_t=2500,yt=2501,xt=3e3,bt=3001,Mt="srgb",wt="srgb-linear",St=7680,Tt=35044,Et="300 es",At=1035;class Ct{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,i=n.length;e<i;e++)n[e].call(this,t);t.target=null}}}const Rt=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Lt=1234567;const Pt=Math.PI/180,It=180/Math.PI;function Dt(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(Rt[255&t]+Rt[t>>8&255]+Rt[t>>16&255]+Rt[t>>24&255]+"-"+Rt[255&e]+Rt[e>>8&255]+"-"+Rt[e>>16&15|64]+Rt[e>>24&255]+"-"+Rt[63&n|128]+Rt[n>>8&255]+"-"+Rt[n>>16&255]+Rt[n>>24&255]+Rt[255&i]+Rt[i>>8&255]+Rt[i>>16&255]+Rt[i>>24&255]).toLowerCase()}function Ot(t,e,n){return Math.max(e,Math.min(n,t))}function Nt(t,e){return(t%e+e)%e}function Ut(t,e,n){return(1-n)*t+n*e}function kt(t){return!(t&t-1)&&0!==t}function Ft(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function zt(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Bt(t,e){switch(e.constructor){case Float32Array:return t;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Ht(t,e){switch(e.constructor){case Float32Array:return t;case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}var Vt=Object.freeze({__proto__:null,DEG2RAD:Pt,RAD2DEG:It,generateUUID:Dt,clamp:Ot,euclideanModulo:Nt,mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},inverseLerp:function(t,e,n){return t!==e?(n-t)/(e-t):0},lerp:Ut,damp:function(t,e,n,i){return Ut(t,e,1-Math.exp(-n*i))},pingpong:function(t,e=1){return e-Math.abs(Nt(t,2*e)-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)}
vendor: 4,414 bytes, line 2
2,randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(Lt=t);let e=Lt+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*Pt},radToDeg:function(t){return t*It},isPowerOfTwo:kt,ceilPowerOfTwo:Ft,floorPowerOfTwo:zt,setQuaternionFromProperEuler:function(t,e,n,i,r){const s=Math.cos,o=Math.sin,a=s(n/2),l=o(n/2),c=s((e+i)/2),h=o((e+i)/2),u=s((e-i)/2),d=o((e-i)/2),p=s((i-e)/2),f=o((i-e)/2);switch(r){case"XYX":t.set(a*h,l*u,l*d,a*c);break;case"YZY":t.set(l*d,a*h,l*u,a*c);break;case"ZXZ":t.set(l*u,l*d,a*h,a*c);break;case"XZX":t.set(a*h,l*f,l*p,a*c);break;case"YXY":t.set(l*p,a*h,l*f,a*c);break;case"ZYZ":t.set(l*f,l*p,a*h,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:Ht,denormalize:Bt});class Gt{constructor(t=0,e=0){Gt.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*n-s*i+t.x,this.y=r*i+s*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Wt{constructor(){Wt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(t,e,n,i,r,s,o,a,l){const c=this.elements;
vendor: 3,251 bytes, line 2
2return c[0]=t,c[1]=i,c[2]=o,c[3]=e,c[4]=r,c[5]=a,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],o=n[3],a=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],f=i[0],m=i[3],g=i[6],v=i[1],_=i[4],y=i[7],x=i[2],b=i[5],M=i[8];return r[0]=s*f+o*v+a*x,r[3]=s*m+o*_+a*b,r[6]=s*g+o*y+a*M,r[1]=l*f+c*v+h*x,r[4]=l*m+c*_+h*b,r[7]=l*g+c*y+h*M,r[2]=u*f+d*v+p*x,r[5]=u*m+d*_+p*b,r[8]=u*g+d*y+p*M,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],l=t[7],c=t[8];return e*s*c-e*o*l-n*r*c+n*o*a+i*r*l-i*s*a}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],l=t[7],c=t[8],h=c*s-o*l,u=o*a-c*r,d=l*r-s*a,p=e*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return t[0]=h*f,t[1]=(i*l-c*n)*f,t[2]=(o*n-i*s)*f,t[3]=u*f,t[4]=(c*e-i*a)*f,t[5]=(i*r-o*e)*f,t[6]=d*f,t[7]=(n*a-l*e)*f,t[8]=(s*e-n*r)*f,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,s,o){const a=Math.cos(r),l=Math.sin(r);return this.set(n*a,n*l,-n*(a*s+l*o)+s+t,-i*l,i*a,-i*(-l*s+a*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(jt.makeScale(t,e)),this}rotate(t){return this.premultiply(jt.makeRotation(-t)),this}translate(t,e){return this.premultiply(jt.makeTranslation(t,e)),this}makeTranslation(t,e){return this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const jt=new Wt;function Xt(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const Yt={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function qt(t,e){return new Yt[t](e)}function Zt(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Jt(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}
vendor: 22,082 bytes, line 2
2function Kt(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}const $t={[Mt]:{[wt]:Jt},[wt]:{[Mt]:Kt}},Qt={legacyMode:!0,get workingColorSpace(){return wt},set workingColorSpace(t){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(t,e,n){if(this.legacyMode||e===n||!e||!n)return t;if($t[e]&&void 0!==$t[e][n]){const i=$t[e][n];return t.r=i(t.r),t.g=i(t.g),t.b=i(t.b),t}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this.workingColorSpace)}},te={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,rebeccapurple:6697881,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},ee={r:0,g:0,b:0},ne={h:0,s:0,l:0},ie={h:0,s:0,l:0};function re(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}function se(t,e){return e.r=t.r,e.g=t.g,e.b=t.b,e}class oe{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Mt){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Qt.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=Qt.workingColorSpace){return this.r=t,this.g=e,this.b=n,Qt.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=Qt.workingColorSpace){if(t=Nt(t,1),e=Ot(e,0,1),n=Ot(n,0,1),0===e)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+e):n+e-n*e,r=2*n-i;this.r=re(r,i,t+1/3),this.g=re(r,i,t),this.b=re(r,i,t-1/3)}return Qt.toWorkingColorSpace(this,i),this}setStyle(t,e=Mt){function n(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let t;const r=i[1],s=i[2];switch(r){case"rgb":case"rgba":if(t=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(t[1],10))/255,this.g=Math.min(255,parseInt(t[2],10))/255,this.b=Math.min(255,parseInt(t[3],10))/255,Qt.toWorkingColorSpace(this,e),n(t[4]),this;if(t=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(t[1],10))/100,this.g=Math.min(100,parseInt(t[2],10))/100,this.b=Math.min(100,parseInt(t[3],10))/100,Qt.toWorkingColorSpace(this,e),n(t[4]),this;break;case"hsl":case"hsla":if(t=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s)){const i=parseFloat(t[1])/360,r=parseFloat(t[2])/100,s=parseFloat(t[3])/100;return n(t[4]),this.setHSL(i,r,s,e)}}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){const t=i[1],n=t.length;if(3===n)return this.r=parseInt(t.charAt(0)+t.charAt(0),16)/255,this.g=parseInt(t.charAt(1)+t.charAt(1),16)/255,this.b=parseInt(t.charAt(2)+t.charAt(2),16)/255,Qt.toWorkingColorSpace(this,e),this;if(6===n)return this.r=parseInt(t.charAt(0)+t.charAt(1),16)/255,this.g=parseInt(t.charAt(2)+t.charAt(3),16)/255,this.b=parseInt(t.charAt(4)+t.charAt(5),16)/255,Qt.toWorkingColorSpace(this,e),this}return t&&t.length>0?this.setColorName(t,e):this}setColorName(t,e=Mt){const n=te[t.toLowerCase()];return void 0!==n?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Jt(t.r),this.g=Jt(t.g),this.b=Jt(t.b),this}copyLinearToSRGB(t){return this.r=Kt(t.r),this.g=Kt(t.g),this.b=Kt(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Mt){return Qt.fromWorkingColorSpace(se(this,ee),t),Ot(255*ee.r,0,255)<<16^Ot(255*ee.g,0,255)<<8^Ot(255*ee.b,0,255)}getHexString(t=Mt){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Qt.workingColorSpace){Qt.fromWorkingColorSpace(se(this,ee),e);const n=ee.r,i=ee.g,r=ee.b,s=Math.max(n,i,r),o=Math.min(n,i,r);let a,l;const c=(o+s)/2;if(o===s)a=0,l=0;else{const t=s-o;switch(l=c<=.5?t/(s+o):t/(2-s-o),s){case n:a=(i-r)/t+(i<r?6:0);break;case i:a=(r-n)/t+2;break;case r:a=(n-i)/t+4}a/=6}return t.h=a,t.s=l,t.l=c,t}getRGB(t,e=Qt.workingColorSpace){return Qt.fromWorkingColorSpace(se(this,ee),e),t.r=ee.r,t.g=ee.g,t.b=ee.b,t}getStyle(t=Mt){return Qt.fromWorkingColorSpace(se(this,ee),t),t!==Mt?`color(${t} ${ee.r} ${ee.g} ${ee.b})`:`rgb(${255*ee.r|0},${255*ee.g|0},${255*ee.b|0})`}offsetHSL(t,e,n){return this.getHSL(ne),ne.h+=t,ne.s+=e,ne.l+=n,this.setHSL(ne.h,ne.s,ne.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(ne),t.getHSL(ie);const n=Ut(ne.h,ie.h,e),i=Ut(ne.s,ie.s,e),r=Ut(ne.l,ie.l,e);return this.setHSL(n,i,r),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}let ae;oe.NAMES=te;class le{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===ae&&(ae=Zt("canvas")),ae.width=t.width,ae.height=t.height;const n=ae.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ae}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=Zt("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);const i=n.getImageData(0,0,t.width,t.height),r=i.data;for(let t=0;t<r.length;t++)r[t]=255*Jt(r[t]/255);return n.putImageData(i,0,0),e}if(t.data){const e=t.data.slice(0);for(let t=0;t<e.length;t++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[t]=Math.floor(255*Jt(e[t]/255)):e[t]=Jt(e[t]);return{data:e,width:t.width,height:t.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}class ce{constructor(t=null){this.isSource=!0,this.uuid=Dt(),this.data=t,this.version=0}set needsUpdate(t){!0===t&&this.version++}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.images[this.uuid])return t.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(null!==i){let t;if(Array.isArray(i)){t=[];for(let e=0,n=i.length;e<n;e++)i[e].isDataTexture?t.push(he(i[e].image)):t.push(he(i[e]))}else t=he(i);n.url=t}return e||(t.images[this.uuid]=n),n}}function he(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?le.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let ue=0;class de extends Ct{constructor(t=de.DEFAULT_IMAGE,e=de.DEFAULT_MAPPING,n=1001,i=1001,r=1006,s=1008,o=1023,a=1009,l=de.DEFAULT_ANISOTROPY,c=3e3){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:ue++}),this.uuid=Dt(),this.name="",this.source=new ce(t),this.mipmaps=[],this.mapping=e,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=a,this.offset=new Gt(0,0),this.repeat=new Gt(1,1),this.center=new Gt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Wt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(t){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==v)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case w:t.x=t.x-Math.floor(t.x);break;case S:t.x=t.x<0?0:1;break;case T:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case w:t.y=t.y-Math.floor(t.y);break;case S:t.y=t.y<0?0:1;break;case T:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}}de.DEFAULT_IMAGE=null,de.DEFAULT_MAPPING=v,de.DEFAULT_ANISOTROPY=1;class pe{constructor(t=0,e=0,n=0,i=1){pe.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,r;const s=.01,o=.1,a=t.elements,l=a[0],c=a[4],h=a[8],u=a[1],d=a[5],p=a[9],f=a[2],m=a[6],g=a[10];if(Math.abs(c-u)<s&&Math.abs(h-f)<s&&Math.abs(p-m)<s){if(Math.abs(c+u)<o&&Math.abs(h+f)<o&&Math.abs(p+m)<o&&Math.abs(l+d+g-3)<o)return this.set(1,0,0,0),this;e=Math.PI;const t=(l+1)/2,a=(d+1)/2,v=(g+1)/2,_=(c+u)/4,y=(h+f)/4,x=(p+m)/4;return t>a&&t>v?t<s?(n=0,i=.707106781,r=.707106781):(n=Math.sqrt(t),i=_/n,r=y/n):a>v?a<s?(n=.707106781,i=0,r=.707106781):(i=Math.sqrt(a),n=_/i,r=x/i):v<s?(n=.707106781,i=.707106781,r=0):(r=Math.sqrt(v),n=y/r,i=x/r),this.set(n,i,r,e),this}let v=Math.sqrt((m-p)*(m-p)+(h-f)*(h-f)+(u-c)*(u-c));return Math.abs(v)<.001&&(v=1),this.x=(m-p)/v,this.y=(h-f)/v,this.z=(u-c)/v,this.w=Math.acos((l+d+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){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(){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(){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(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class fe extends Ct{constructor(t=1,e=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new pe(0,0,t,e),this.scissorTest=!1,this.viewport=new pe(0,0,t,e);const i={width:t,height:e,depth:1};this.texture=new de(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:R,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(t,e,n=1){this.width===t&&this.height===e&&this.depth===n||(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return(new this.constructor).copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.isRenderTargetTexture=!0;const e=Object.assign({},t.texture.image);return this.texture.source=new ce(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,null!==t.depthTexture&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class me extends de{constructor(t=null,e=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=E,this.minFilter=E,this.wrapR=S,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ge extends de{constructor(t=null,e=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:i},this.magFilter=E,this.minFilter=E,this.wrapR=S,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ve{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,r,s,o){let a=n[i+0],l=n[i+1],c=n[i+2],h=n[i+3];const u=r[s+0],d=r[s+1],p=r[s+2],f=r[s+3];if(0===o)return t[e+0]=a,t[e+1]=l,t[e+2]=c,void(t[e+3]=h);if(1===o)return t[e+0]=u,t[e+1]=d,t[e+2]=p,void(t[e+3]=f);if(h!==f||a!==u||l!==d||c!==p){let t=1-o;const e=a*u+l*d+c*p+h*f,n=e>=0?1:-1,i=1-e*e;if(i>Number.EPSILON){const r=Math.sqrt(i),s=Math.atan2(r,e*n);t=Math.sin(t*s)/r,o=Math.sin(o*s)/r}const r=o*n;if(a=a*t+u*r,l=l*t+d*r,c=c*t+p*r,h=h*t+f*r,t===1-o){const t=1/Math.sqrt(a*a+l*l+c*c+h*h);a*=t,l*=t,c*=t,h*=t}}t[e]=a,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,r,s){const o=n[i],a=n[i+1],l=n[i+2],c=n[i+3],h=r[s],u=r[s+1],d=r[s+2],p=r[s+3];
vendor: 4,386 bytes, line 2
2return t[e]=o*p+c*h+a*d-l*u,t[e+1]=a*p+c*u+l*h-o*d,t[e+2]=l*p+c*d+o*u-a*h,t[e+3]=c*p-o*h-a*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){const n=t._x,i=t._y,r=t._z,s=t._order,o=Math.cos,a=Math.sin,l=o(n/2),c=o(i/2),h=o(r/2),u=a(n/2),d=a(i/2),p=a(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],s=e[1],o=e[5],a=e[9],l=e[2],c=e[6],h=e[10],u=n+o+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-a)*t,this._y=(r-l)*t,this._z=(s-i)*t}else if(n>o&&n>h){const t=2*Math.sqrt(1+n-o-h);this._w=(c-a)/t,this._x=.25*t,this._y=(i+s)/t,this._z=(r+l)/t}else if(o>h){const t=2*Math.sqrt(1+o-n-h);this._w=(r-l)/t,this._x=(i+s)/t,this._y=.25*t,this._z=(a+c)/t}else{const t=2*Math.sqrt(1+h-n-o);this._w=(s-i)/t,this._x=(r+l)/t,this._y=(a+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Ot(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,s=t._w,o=e._x,a=e._y,l=e._z,c=e._w;return this._x=n*c+s*o+i*l-r*a,this._y=i*c+s*a+r*o-n*l,this._z=r*c+s*l+n*a-i*o,this._w=s*c-n*o-i*a-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,i=this._y,r=this._z,s=this._w;let o=s*t._w+n*t._x+i*t._y+r*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=s,this._x=n,this._y=i,this._z=r,this;const a=1-o*o;if(a<=Number.EPSILON){const t=1-e;return this._w=t*s+e*this._w,this._x=t*n+e*this._x,this._y=t*i+e*this._y,this._z=t*r+e*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(a),c=Math.atan2(l,o),h=Math.sin((1-e)*c)/l,u=Math.sin(e*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=Math.random(),e=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),r
vendor: 13,609 bytes, line 2
2=2*Math.PI*Math.random();return this.set(e*Math.cos(i),n*Math.sin(r),n*Math.cos(r),e*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class _e{constructor(t=0,e=0,n=0){_e.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(xe.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(xe.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z,a=t.w,l=a*e+s*i-o*n,c=a*n+o*e-r*i,h=a*i+r*n-s*e,u=-r*e-s*n-o*i;return this.x=l*a+u*-r+c*-o-h*-s,this.y=c*a+u*-s+h*-r-l*-o,this.z=h*a+u*-o+l*-s-c*-r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return ye.copy(this).projectOnVector(t),this.sub(ye)}reflect(t){return this.sub(ye.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(Ot(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,n=Math.sqrt(1-t**2);return this.x=n*Math.cos(e),this.y=n*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ye=new _e,xe=new ve;class be{constructor(t=new _e(1/0,1/0,1/0),e=new _e(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,o=-1/0;for(let a=0,l=t.length;a<l;a+=3){const l=t[a],c=t[a+1],h=t[a+2];l<e&&(e=l),c<n&&(n=c),h<i&&(i=h),l>r&&(r=l),c>s&&(s=c),h>o&&(o=h)}return this.min.set(e,n,i),this.max.set(r,s,o),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,o=-1/0;for(let a=0,l=t.count;a<l;a++){const l=t.getX(a),c=t.getY(a),h=t.getZ(a);l<e&&(e=l),c<n&&(n=c),h<i&&(i=h),l>r&&(r=l),c>s&&(s=c),h>o&&(o=h)}return this.min.set(e,n,i),this.max.set(r,s,o),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=we.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){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(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const n=t.geometry;if(void 0!==n)if(e&&null!=n.attributes&&void 0!==n.attributes.position){const e=n.attributes.position;for(let n=0,i=e.count;n<i;n++)we.fromBufferAttribute(e,n).applyMatrix4(t.matrixWorld),this.expandByPoint(we)}else null===n.boundingBox&&n.computeBoundingBox(),Se.copy(n.boundingBox),Se.applyMatrix4(t.matrixWorld),this.union(Se);const i=t.children;for(let t=0,n=i.length;t<n;t++)this.expandByObject(i[t],e);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,we),we.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Pe),Ie.subVectors(this.max,Pe),Te.subVectors(t.a,Pe),Ee.subVectors(t.b,Pe),Ae.subVectors(t.c,Pe),Ce.subVectors(Ee,Te),Re.subVectors(Ae,Ee),Le.subVectors(Te,Ae);let e=[0,-Ce.z,Ce.y,0,-Re.z,Re.y,0,-Le.z,Le.y,Ce.z,0,-Ce.x,Re.z,0,-Re.x,Le.z,0,-Le.x,-Ce.y,Ce.x,0,-Re.y,Re.x,0,-Le.y,Le.x,0];return!!Ne(e,Te,Ee,Ae,Ie)&&(e=[1,0,0,0,1,0,0,0,1],!!Ne(e,Te,Ee,Ae,Ie)&&(De.crossVectors(Ce,Re),e=[De.x,De.y,De.z],Ne(e,Te,Ee,Ae,Ie)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return we.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=.5*this.getSize(we).length(),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Me[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Me[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Me[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Me[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Me[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Me[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Me[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Me[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Me)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Me=[new _e,new _e,new _e,new _e,new _e,new _e,new _e,new _e],we=new _e,Se=new be,Te=new _e,Ee=new _e,Ae=new _e,Ce=new _e,Re=new _e,Le=new _e,Pe=new _e,Ie=new _e,De=new _e,Oe=new _e;function Ne(t,e,n,i,r){for(let s=0,o=t.length-3;s<=o;s+=3){Oe.fromArray(t,s);const o=r.x*Math.abs(Oe.x)+r.y*Math.abs(Oe.y)+r.z*Math.abs(Oe.z),a=e.dot(Oe),l=n.dot(Oe),c=i.dot(Oe);if(Math.max(-Math.max(a,l,c),Math.min(a,l,c))>o)return!1}return!0}const Ue=new be,ke=new _e,Fe=new _e;class ze{constructor(t=new _e,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):Ue.setFromPoints(t).getCenter(n);let i=0;for(let e=0,r=t.length;e<r;e++)i=Math.max(i,n.distanceToSquared(t[e]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const n=this.center.distanceToSquared(t);return e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}
vendor: 5,908 bytes, line 2
2applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;ke.subVectors(t,this.center);const e=ke.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.addScaledVector(ke,n/t),this.radius+=n}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(Fe.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(ke.copy(t.center).add(Fe)),this.expandByPoint(ke.copy(t.center).sub(Fe))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Be=new _e,He=new _e,Ve=new _e,Ge=new _e,We=new _e,je=new _e,Xe=new _e;class Ye{constructor(t=new _e,e=new _e(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Be)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Be.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Be.copy(this.direction).multiplyScalar(e).add(this.origin),Be.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){He.copy(t).add(e).multiplyScalar(.5),Ve.copy(e).sub(t).normalize(),Ge.copy(this.origin).sub(He);const r=.5*t.distanceTo(e),s=-this.direction.dot(Ve),o=Ge.dot(this.direction),a=-Ge.dot(Ve),l=Ge.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*a-o,u=s*o-a,p=r*c,h>=0)if(u>=-p)if(u<=p){const t=1/c;h*=t,u*=t,d=h*(h+s*u+2*o)+u*(s*h+u+2*a)+l}else u=r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;else u=-r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;else u<=-p?(h=Math.max(0,-(-s*r+o)),u=h>0?-r:Math.min(Math.max(-r,-a),r),d=-h*h+u*(u+2*a)+l):u<=p?(h=0,u=Math.min(Math.max(-r,-a),r),d=u*(u+2*a)+l):(h=Math.max(0,-(s*r+o)),u=h>0?r:Math.min(Math.max(-r,-a),r),d=-h*h+u*(u+2*a)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+o)),d=-h*h+u*(u+2*a)+l;return n&&n.copy(this.direction).multiplyScalar(h).add(this.origin),i&&i.copy(Ve).multiplyScalar(u).add(He),d}intersectSphere(t,e){Be.subVectors(t.center,this.origin);const n=Be.dot(this.direction),i=Be.dot(Be)-n*n,r=t.radius*t.radius;if(i>r)return null;const s=Math.sqrt(r-i),o=n-s,a=n+s;return o<0&&a<0?null:o<0?this.at(a,e):this.at(o,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,r,s,o,a;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),c>=0?(r=(t.min.y-u.y)*c,s=(t.max.y-u.y)*c):(r=(t.max.y-u.y)*c,s=(t.min.y-u.y)*c),n>s||r>i?null:((r>n||isNaN(n))&&(n=r),(s<i||isNaN(i))&&(i=s),h>=0?(o=(t.min.z-u.z)*h,a=(t.max.z-u.z)*h):(o=(t.max.z-u.z)*h,a=(t.min.z-u.z)*h),n>a||o>i?null:((o>n||n!=n)&&(n=o),(a<i||i!=i)&&(i=a),i<0?null:this.at(n>=0?n:i,e)))}intersectsBox(t){return null!==this.intersectBox(t,Be)}intersectTriangle(t,e,n,i,r){We.subVectors(e,t),je.subVectors(n,t),Xe.crossVectors(We,je);let s,o=this.direction.dot(Xe);if(o>0){if(i)return null;s=1}else{if(!(o<0))return null;s=-1,o=-o}Ge.subVectors(this.origin,t);const a=s*this.direction.dot(je.crossVectors(Ge,je));if(a<0)return null;const l=s*this.direction.dot(We.cross(Ge));if(l<0)return null;if(a+l>o)return null;const c=-s*Ge.dot(Xe);return c<0?null:this.at(c/o,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class qe{constructor(){qe.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(t,e,n,i,r,s,o,a,l,c,h,u,d,p,f,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=s,g[9]=o,g[13]=a,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new qe).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,i=1/Ze.setFromMatrixColumn(t,0).length(),r=1/Ze.setFromMatrixColumn(t,1).length(),s=1/Ze.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*s,e[9]=n[9]*s,e[10
vendor: 5,430 bytes, line 2
2]=n[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,n=t.x,i=t.y,r=t.z,s=Math.cos(n),o=Math.sin(n),a=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if("XYZ"===t.order){const t=s*c,n=s*h,i=o*c,r=o*h;e[0]=a*c,e[4]=-a*h,e[8]=l,e[1]=n+i*l,e[5]=t-r*l,e[9]=-o*a,e[2]=r-t*l,e[6]=i+n*l,e[10]=s*a}else if("YXZ"===t.order){const t=a*c,n=a*h,i=l*c,r=l*h;e[0]=t+r*o,e[4]=i*o-n,e[8]=s*l,e[1]=s*h,e[5]=s*c,e[9]=-o,e[2]=n*o-i,e[6]=r+t*o,e[10]=s*a}else if("ZXY"===t.order){const t=a*c,n=a*h,i=l*c,r=l*h;e[0]=t-r*o,e[4]=-s*h,e[8]=i+n*o,e[1]=n+i*o,e[5]=s*c,e[9]=r-t*o,e[2]=-s*l,e[6]=o,e[10]=s*a}else if("ZYX"===t.order){const t=s*c,n=s*h,i=o*c,r=o*h;e[0]=a*c,e[4]=i*l-n,e[8]=t*l+r,e[1]=a*h,e[5]=r*l+t,e[9]=n*l-i,e[2]=-l,e[6]=o*a,e[10]=s*a}else if("YZX"===t.order){const t=s*a,n=s*l,i=o*a,r=o*l;e[0]=a*c,e[4]=r-t*h,e[8]=i*h+n,e[1]=h,e[5]=s*c,e[9]=-o*c,e[2]=-l*c,e[6]=n*h+i,e[10]=t-r*h}else if("XZY"===t.order){const t=s*a,n=s*l,i=o*a,r=o*l;e[0]=a*c,e[4]=-h,e[8]=l*c,e[1]=t*h+r,e[5]=s*c,e[9]=n*h-i,e[2]=i*h-n,e[6]=o*c,e[10]=r*h+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Ke,t,$e)}lookAt(t,e,n){const i=this.elements;return en.subVectors(t,e),0===en.lengthSq()&&(en.z=1),en.normalize(),Qe.crossVectors(n,en),0===Qe.lengthSq()&&(1===Math.abs(n.z)?en.x+=1e-4:en.z+=1e-4,en.normalize(),Qe.crossVectors(n,en)),Qe.normalize(),tn.crossVectors(en,Qe),i[0]=Qe.x,i[4]=tn.x,i[8]=en.x,i[1]=Qe.y,i[5]=tn.y,i[9]=en.y,i[2]=Qe.z,i[6]=tn.z,i[10]=en.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],o=n[4],a=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],_=n[7],y=n[11],x=n[15],b=i[0],M=i[4],w=i[8],S=i[12],T=i[1],E=i[5],A=i[9],C=i[13],R=i[2],L=i[6],P=i[10],I=i[14],D=i[3],O=i[7],N=i[11],U=i[15];return r[0]=s*b+o*T+a*R+l*D,r[4]=s*M+o*E+a*L+l*O,r[8]=s*w+o*A+a*P+l*N,r[12]=s*S+o*C+a*I+l*U,r[1]=c*b+h*T+u*R+d*D,r[5]=c*M+h*E+u*L+d*O,r[9]=c*w+h*A+u*P+d*N,r[13]=c*S+h*C+u*I+d*U,r[2]=p*b+f*T+m*R+g*D,r[6]=p*M+f*E+m*L+g*O,r[10]=p*w+f*A+m*P+g*N,r[14]=p*S+f*C+m*I+g*U,r[3]=v*b+_*T+y*R+x*D,r[7]=v*M+_*E+y*L+x*O,r[11]=v*w+_*A+y*P+x*N,r[15]=v*S+_*C+y*I+x*U,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],s=t[1],o=t[5],a=t[9],l=t[13],c=t[2],h=t[6],u=t[10],d=t[14];return t[3]*(+r*a*h-i*l*h-r*o*u+n*l*u+i*o*d-n*a*d)+t[7]*(+e*a*d-e*l*u+r*s*u-i*s*d+i*l*c-r*a*c)+t[11]*(+e*l*h-e*o*d-r*s*h+n*s*d+r*o*c-n*l*c)+t[15]*(-i*o*c-e*a*h+e*o*u+i*s*h-n*s*u+n*a*c)}transpose(){const t=this.elements;let e;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}setPosition(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],l=t[7],c=t[8],h=t[9],u=t[10],d=t[11],p=t[12],f=t[13],m=t[14],g=t[15],v=h*m*l-f*u*l+f*a*d-o*m*d-h*a*g+o*u*g,_=p*u*l-c*m*l-p*a*d+s*m*d+c*a*g-s*u*g,y=c*f*l-p*h*l+p*o*d-s*f*d-c*o*g+s*h*g,x=p*h*a-c*f*a-p*o*u+s*f*u+c*o*m-s*h*m,b=e*v+n*_+i*y+r*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/b;return t[0]=v*M,t[1]=(f*u*r-h*m*r-f*i*d+n*m*d+h*i*g-n*u*g)*M,t[2]=(o*m*r-f*a*r+f*i*l-n*m*l-o*i*g+n*a*g)*M,t[3]=(h*a*r-o*u*r-h*i*l+n*u*l+o*i*d-n*a*d)*M,t[4]=_*M,t[5]=(c*m*r-p*u*r+p*i*d-e*m*d-c*i*g+e*u*g)*M,t[6]=(p*a*r-s*m*r-p*i*l+e*m*l+s*i*g-e*a*g)*M,t[7]=(s*u*r-c*a*r+c*i*l-e*u*l-s*i*d+e*a*d)*M,t[8]=y*M,t[9]=(p*h*r-c*f*r-p*n*d+e*f*d+c*n*g-e*h*g)*M,t[10]=(s*f*r-p*o*r+p*n*l-e*f*l-s*n*g+e*o*g)*M,t[11]=(c*o*r-s*h*r-c*n*l+e*h*l+s*n*d-e*o*d)*M,t[12]=x*M,t[13]=(c*f*i-p*h*i+p*n*u-e*f*u-c*n*m+e*h*m)*M,t[14]=(p*o*i-s*f*i-p*n*a+e*f*a+s*n*m-e*o*m)*M,t[15]=(s*h*i-c*o*i+c*n*a-e*h*a-s*n*u+e*o*u)*M,this}scale(t){const e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,o=t.y,a=t.z,l=r*s,c=r*o;return this.set(l*s+n,l*o-i*a,l*a+i*o,0,l*o+i*a,c*o+n,c*a-i*s,0,l*a-i*o,c*a+i*s,r*a*a+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,s){return this.set(1,n,r,0,t,1,s,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,r=e._x,s=e._y,o=e._z,a=e._w,l=r+r,c=s+s,h=o+o,u=r*l,d=r*c,p=r*h,f=s*c,m=s*h,g=o*h,v=a*l,_=a*c,y=a*h,x=n.x,b=n.y,M=n.z;return i[0]=(1-(f+g))*x,i[1]=(d+y)*x,i[2]=(p-_)*x,i[3]=0,i[4]=(d-y)*b,i[5]=(1-(u+g))*b,
vendor: 4,221 bytes, line 2
2i[6]=(m+v)*b,i[7]=0,i[8]=(p+_)*M,i[9]=(m-v)*M,i[10]=(1-(u+f))*M,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.elements;let r=Ze.set(i[0],i[1],i[2]).length();const s=Ze.set(i[4],i[5],i[6]).length(),o=Ze.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],Je.copy(this);const a=1/r,l=1/s,c=1/o;return Je.elements[0]*=a,Je.elements[1]*=a,Je.elements[2]*=a,Je.elements[4]*=l,Je.elements[5]*=l,Je.elements[6]*=l,Je.elements[8]*=c,Je.elements[9]*=c,Je.elements[10]*=c,e.setFromRotationMatrix(Je),n.x=r,n.y=s,n.z=o,this}makePerspective(t,e,n,i,r,s){const o=this.elements,a=2*r/(e-t),l=2*r/(n-i),c=(e+t)/(e-t),h=(n+i)/(n-i),u=-(s+r)/(s-r),d=-2*s*r/(s-r);return o[0]=a,o[4]=0,o[8]=c,o[12]=0,o[1]=0,o[5]=l,o[9]=h,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=d,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,n,i,r,s){const o=this.elements,a=1/(e-t),l=1/(n-i),c=1/(s-r),h=(e+t)*a,u=(n+i)*l,d=(s+r)*c;return o[0]=2*a,o[4]=0,o[8]=0,o[12]=-h,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*c,o[14]=-d,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}const Ze=new _e,Je=new qe,Ke=new _e(0,0,0),$e=new _e(1,1,1),Qe=new _e,tn=new _e,en=new _e,nn=new qe,rn=new ve;class sn{constructor(t=0,e=0,n=0,i=sn.DefaultOrder){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){const i=t.elements,r=i[0],s=i[4],o=i[8],a=i[1],l=i[5],c=i[9],h=i[2],u=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(Ot(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Ot(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Ot(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(a,r));break;case"ZYX":this._y=Math.asin(-Ot(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(a,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Ot(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(o,d));break;case"XZY":this._z=Math.asin(-Ot(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return nn.makeRotationFromQuaternion(t),this.setFromRotationMatrix(nn,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return rn.setFromEuler(this),this.setFromQuaternion(rn,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}
2toVector3(){console.error("THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead")}}sn.DefaultOrder="XYZ",sn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class on{constructor(){this.mask=1}set(t){this.mask=1<<t>>>0}enable(t){this.mask|=1<<t}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t}disable(t){this.mask&=~(1<<t)}disableAll(){this.mask=0}test(t){return 0!==(this.mask&t.mask)}isEnabled(t){return!!(this.mask&1<<t)}}let an=0;const ln=new _e,cn=new ve,hn=new qe,un=new _e,dn=new _e,pn=new _e,fn=new ve,mn=new _e(1,0,0),gn=new _e(0,1,0),vn=new _e(0,0,1),_n={type:"added"},yn={type:"removed"};class xn extends Ct{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:an++}),this.uuid=Dt(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=xn.DefaultUp.clone();const t=new _e,e=new sn,n=new ve,i=new _e(1,1,1);e._onChange(function(){n.setFromEuler(e,!1)}),n._onChange(function(){e.setFromQuaternion(n,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new qe},normalMatrix:{value:new Wt}}),this.matrix=new qe,this.matrixWorld=new qe,this.matrixAutoUpdate=xn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=xn.DefaultMatrixWorldAutoUpdate,this.layers=new on,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return cn.setFromAxisAngle(t,e),this.quaternion.multiply(cn),this}rotateOnWorldAxis(t,e){return cn.setFromAxisAngle(t,e),this.quaternion.premultiply(cn),this}rotateX(t){return this.rotateOnAxis(mn,t)}rotateY(t){return this.rotateOnAxis(gn,t)}rotateZ(t){return this.rotateOnAxis(vn,t)}translateOnAxis(t,e){return ln.copy(t).applyQuaternion(this.quaternion),this.position.add(ln.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(mn,t)}translateY(t){return this.translateOnAxis(gn,t)}translateZ(t){return this.translateOnAxis(vn,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(hn.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?un.copy(t):un.set(t,e,n);const i=this.parent;this.updateWorldMatrix(!0,!1),dn.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?hn.lookAt(dn,un,this.up):hn.lookAt(un,dn,this.up),this.quaternion.setFromRotationMatrix(hn),i&&(hn.extractRotation(i.matrixWorld),cn.setFromRotationMatrix(hn),this.quaternion.premultiply(cn.invert()))}add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(_n)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}const e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(yn)),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){for(let t=0;t<this.children.length;t++){const e=this.children[t];e.parent=null,e.dispatchEvent(yn)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),hn.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),hn.multiply(t.parent.matrixWorld)),t.applyM
vendor: 23,985 bytes, line 2
2atrix4(hn),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n].getObjectByProperty(t,e);if(void 0!==i)return i}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(dn,t,pn),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(dn,fn,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const e=this.children;for(let n=0,i=e.length;n<i;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let n=0,i=e.length;n<i;n++){const i=e[n];!0!==i.matrixWorldAutoUpdate&&!0!==t||i.updateMatrixWorld(t)}}updateWorldMatrix(t,e){const n=this.parent;if(!0===t&&null!==n&&!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e){const t=this.children;for(let e=0,n=t.length;e<n;e++){const n=t[e];!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!1,!0)}}}toJSON(t){const e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const i={};function r(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const n=e.shapes;if(Array.isArray(n))for(let e=0,i=n.length;e<i;e++){const i=n[e];r(t.shapes,i)}else r(t.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const e=[];for(let n=0,i=this.material.length;n<i;n++)e.push(r(t.materials,this.material[n]));i.material=e}else i.material=r(t.materials,this.material);if(this.children.length>0){i.children=[];for(let e=0;e<this.children.length;e++)i.children.push(this.children[e].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let e=0;e<this.animations.length;e++){const n=this.animations[e];i.animations.push(r(t.animations,n))}}if(e){const e=s(t.geometries),i=s(t.materials),r=s(t.textures),o=s(t.images),a=s(t.shapes),l=s(t.skeletons),c=s(t.animations),h=s(t.nodes);e.length>0&&(n.geometries=e),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),o.length>0&&(n.images=o),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),h.length>0&&(n.nodes=h)}return n.object=i,n;function s(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const n=t.children[e];this.add(n.clone())}return this}}xn.DefaultUp=new _e(0,1,0),xn.DefaultMatrixAutoUpdate=!0,xn.DefaultMatrixWorldAutoUpdate=!0;const bn=new _e,Mn=new _e,wn=new _e,Sn=new _e,Tn=new _e,En=new _e,An=new _e,Cn=new _e,Rn=new _e,Ln=new _e;class Pn{constructor(t=new _e,e=new _e,n=new _e){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,i){i.subVectors(n,e),bn.subVectors(t,e),i.cross(bn);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(t,e,n,i,r){bn.subVectors(i,e),Mn.subVectors(n,e),wn.subVectors(t,e);const s=bn.dot(bn),o=bn.dot(Mn),a=bn.dot(wn),l=Mn.dot(Mn),c=Mn.dot(wn),h=s*l-o*o;if(0===h)return r.set(-2,-1,-1);const u=1/h,d=(l*a-o*c)*u,p=(s*c-o*a)*u;return r.set(1-d-p,p,d)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,Sn),Sn.x>=0&&Sn.y>=0&&Sn.x+Sn.y<=1}static getUV(t,e,n,i,r,s,o,a){return this.getBarycoord(t,e,n,i,Sn),a.set(0,0),a.addScaledVector(r,Sn.x),a.addScaledVector(s,Sn.y),a.addScaledVector(o,Sn.z),a}static isFrontFacing(t,e,n,i){return bn.subVectors(n,e),Mn.subVectors(t,e),bn.cross(Mn).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return bn.subVectors(this.c,this.b),Mn.subVectors(this.a,this.b),.5*bn.cross(Mn).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Pn.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Pn.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,r){return Pn.getUV(t,this.a,this.b,this.c,e,n,i,r)}containsPoint(t){return Pn.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Pn.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,i=this.b,r=this.c;let s,o;Tn.subVectors(i,n),En.subVectors(r,n),Cn.subVectors(t,n);const a=Tn.dot(Cn),l=En.dot(Cn);if(a<=0&&l<=0)return e.copy(n);Rn.subVectors(t,i);const c=Tn.dot(Rn),h=En.dot(Rn);if(c>=0&&h<=c)return e.copy(i);const u=a*h-c*l;if(u<=0&&a>=0&&c<=0)return s=a/(a-c),e.copy(n).addScaledVector(Tn,s);Ln.subVectors(t,r);const d=Tn.dot(Ln),p=En.dot(Ln);if(p>=0&&d<=p)return e.copy(r);const f=d*l-a*p;if(f<=0&&l>=0&&p<=0)return o=l/(l-p),e.copy(n).addScaledVector(En,o);const m=c*p-d*h;if(m<=0&&h-c>=0&&d-p>=0)return An.subVectors(r,i),o=(h-c)/(h-c+(d-p)),e.copy(i).addScaledVector(An,o);const g=1/(m+f+u);return s=f*g,o=u*g,e.copy(n).addScaledVector(Tn,s).addScaledVector(En,o)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}let In=0;class Dn extends Ct{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:In++}),this.uuid=Dt(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=i,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=St,this.stencilZFail=St,this.stencilZPass=St,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}const i=this[e];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function i(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){const e=i(t.textures),r=i(t.images);e.length>0&&(n.textures=e),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let i=0;i!==t;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}class On extends Dn{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new oe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const Nn=new _e,Un=new Gt;class kn{constructor(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.usage=Tt,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[t+i]=e.array[n+i];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(2===this.itemSize)for(let e=0,n=this.count;e<n;e++)Un.fromBufferAttribute(this,e),Un.applyMatrix3(t),this.setXY(e,Un.x,Un.y);else if(3===this.itemSize)for(let e=0,n=this.count;e<n;e++)Nn.fromBufferAttribute(this,e),Nn.applyMatrix3(t),this.setXYZ(e,Nn.x,Nn.y,Nn.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Nn.fromBufferAttribute(this,e),Nn.applyMatrix4(t),this.setXYZ(e,Nn.x,Nn.y,Nn.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Nn.fromBufferAttribute(this,e),Nn.applyNormalMatrix(t),this.setXYZ(e,Nn.x,Nn.y,Nn.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Nn.fromBufferAttribute(this,e),Nn.transformDirection(t),this.setXYZ(e,Nn.x,Nn.y,Nn.z);return this}set(t,e=0){return this.array.set(t,e),this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Bt(e,this.array)),e}setX(t,e){return this.normalized&&(e=Ht(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Bt(e,this.array)),e}setY(t,e){return this.normalized&&(e=Ht(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Bt(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Ht(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Bt(e,this.array)),e}setW(t,e){return this.normalized&&(e=Ht(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Ht(e,this.array),n=Ht(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,i){return t*=this.itemSize,this.normalized&&(e=Ht(e,this.array),n=Ht(n,this.array),i=Ht(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t*=this.itemSize,this.normalized&&(e=Ht(e,this.array),n=Ht(n,this.array),i=Ht(i,this.array),r=Ht(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=r,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),this.usage!==Tt&&(t.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(t.updateRange=this.updateRange),t}copyColorsArray(){console.error("THREE.BufferAttribute: copyColorsArray() was removed in r144.")}copyVector2sArray(){console.error("THREE.BufferAttribute: copyVector2sArray() was removed in r144.")}copyVector3sArray(){console.error("THREE.BufferAttribute: copyVector3sArray() was removed in r144.")}copyVector4sArray(){console.error("THREE.BufferAttribute: copyVector4sArray() was removed in r144.")}}class Fn extends kn{constructor(t,e,n){super(new Uint16Array(t),e,n)}}class zn extends kn{constructor(t,e,n){super(new Uint32Array(t),e,n)}}class Bn extends kn{constructor(t,e,n){super(new Float32Array(t),e,n)}}let Hn=0;const Vn=new qe,Gn=new xn,Wn=new _e,jn=new be,Xn=new be,Yn=new _e;class qn extends Ct{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Hn++}),this.uuid=Dt(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(Xt(t)?zn:Fn)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return void 0!==this.attributes[t]}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;
vendor: 1,479 bytes, line 2
2void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const e=(new Wt).getNormalMatrix(t);n.applyNormalMatrix(e),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(t),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(t){return Vn.makeRotationFromQuaternion(t),this.applyMatrix4(Vn),this}rotateX(t){return Vn.makeRotationX(t),this.applyMatrix4(Vn),this}rotateY(t){return Vn.makeRotationY(t),this.applyMatrix4(Vn),this}rotateZ(t){return Vn.makeRotationZ(t),this.applyMatrix4(Vn),this}translate(t,e,n){return Vn.makeTranslation(t,e,n),this.applyMatrix4(Vn),this}scale(t,e,n){return Vn.makeScale(t,e,n),this.applyMatrix4(Vn),this}lookAt(t){return Gn.lookAt(t),Gn.updateMatrix(),this.applyMatrix4(Gn.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Wn).negate(),this.translate(Wn.x,Wn.y,Wn.z),this}setFromPoints(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[n];e.push(i.x,i.y,i.z||0)}return this.setAttribute("position",new Bn(e,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new be);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "fal
2se".',this),void this.boundingBox.set(new _e(-1/0,-1/0,-1/0),new _e(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];jn.setFromBufferAttribute(n),this.morphTargetsRelative?(Yn.addVectors(this.boundingBox.min,jn.min),this.boundingBox.expandByPoint(Yn),Yn.addVectors(this.boundingBox.max,jn.max),this.boundingBox.expandByPoint(Yn)):(this.boundingBox.expandByPoint(jn.min),this.boundingBox.expandByPoint(jn.max))}}else this.boundingBox.makeEmpty();(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(){null===this.boundingSphere&&(this.boundingSphere=new ze);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "fal
2se".',this),void this.boundingSphere.set(new _e,1/0);if(t){const n=this.boundingSphere.center;if(jn.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];Xn.setFromBufferAttribute(n),this.morphTargetsRelative?(Yn.addVectors(jn.min,Xn.min),jn.expandByPoint(Yn),Yn.addVectors(jn.max,Xn.max),jn.expandByPoint(Yn)):(jn.expandByPoint(Xn.min),jn.expandByPoint(Xn.max))}jn.getCenter(n);let i=0;for(let e=0,r=t.count;e<r;e++)Yn.fromBufferAttribute(t,e),i=Math.max(i,n.distanceToSquared(Yn));if(e)for(let r=0,s=e.length;r<s;r++){const s=e[r],o=this.morphTargetsRelative;for(let e=0,r=s.count;e<r;e++)Yn.fromBufferAttribute(s,e),o&&(Wn.fromBufferAttribute(t,e),Yn.add(Wn)),i=Math.max(i,n.distanceToSquared(Yn))}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)}}computeTangents(){const t=this.index,e=this.attributes;if(null===t||void 0===e.position||void 0===e.normal||void 0===e.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=t.array,i=e.position.array,r=e.normal.array,s=e.uv.array,o=i.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new kn(new Float32Array(4*o),4));const a=this.getAttribute("tangent").array,l=[],c=[];for(let t=0;t<o;t++)l[t]=new _e,c[t]=new _e;const h=new _e,u=new _e,d=new _e,p=new Gt,f=new Gt,m=new Gt,g=new _e,v=new _e;function _(t,e,n){h.fromArray(i,3*t),u.fromArray(i,3*e),d.fromArray(i,3*n),p.fromArray(s,2*t),f.fromArray(s,2*e),m.fromArray(s,2*n),u.sub(h),d.sub(h),f.sub(p),m.sub(p);const r=1/(f.x*m.y-m.x*f.y);isFinite(r)&&(g.copy(u).multiplyScalar(m.y).addScaledVector(d,-f.y).multiplyScalar(r),v.copy(d).multiplyScalar(f.x).addScaledVector(u,-m.x).multiplyScalar(r),l[t].add(g),l[e].add(g),l[n].add(g),c[t].add(v),c[e].add(v),c[n].add(v))}let y=this.groups;0===y.length&&(y=[{start:0,count:n.length}]);for(let t=0,e=y.length;t<e;++t){const e=y[t],i=e.start;for(let t=i,r=i+e.count;t<r;t+=3)_(n[t+0],n[t+1],n[t+2])}const x=new _e,b=new _e,M=new _e,w=new _e;function S(t){M.fromArray(r,3*t),w.copy(M);const e=l[t];x.copy(e),x.sub(M.multiplyScalar(M.dot(e))).normalize(),b.crossVectors(w,e);const n=b.dot(c[t])<0?-1:1;a[4*t]=x.x,a[4*t+1]=x.y,a[4*t+2]=x.z,a[4*t+3]=n}for(let t=0,e=y.length;t<e;++t){const e=y[t],i=e.start;for(let t=i,r=i+e.count;t<r;t+=3)S(n[t+0]),S(n[t+1]),S(n[t+2])}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(void 0!==e){let n=this.getAttribute("normal");if(void 0===n)n=new kn(new Float32Array(3*e.count),3),this.setAttribute("normal",n);else for(let t=0,e=n.count;t<e;t++)n.setXYZ(t,0,0,0);const i=new _e,r=new _e,s=new _e,o=new _e,a=new _e,l=new _e,c=new _e,h=new _e;if(t)for(let u=0,d=t.count;u<d;u+=3){const d=t.getX(u+0),p=t.getX(u+1),f=t.getX(u+2);i.fromBufferAttribute(e,d),r.fromBufferAttribute(e,p),s.fromBufferAttribute(e,f),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),o.fromBufferAttribute(n,d),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),o.add(c),a.add(c),l.add(c),n.setXYZ(d,o.x,o.y,o.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let t=0,o=e.count;t<o;t+=3)i.fromBufferAttribute(e,t+0),r.fromBufferAttribute(e,t+1),s.fromBufferAttribute(e,t+2),c.subVectors(s,r),h.subVectors(i,r),c.cross(h),n.setXYZ(t+0,c.x,c.y,c.z),n.setXYZ(t+1,c.x,c.y,c.z),n.setXYZ(t+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(){return console.error("THREE.BufferGeometry.merge() has been removed. Use THREE.BufferGeometryUtils.mergeBufferGeometries() instead."),this}normalizeNormals(){const t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)Yn.fromBufferAttribute(t,e),Yn.normalize(),t.setXYZ(e,Yn.x,Yn.y,Yn.z)}toNonIndexed(){function t(t,e){const n=t.array,i=t.itemSize,r=t.normalized,s=new n.constructor(e.length*i);let o=0,a=0;for(let r=0,l=e.length;r<l;r++){o=t.isInterleavedBufferAttribute?e[r]*t.data.stride+t.offset:e[r]*i;for(let t=0;t<i;t++)s[a++]=n[o++]}return new kn(s,i,r)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new qn,n=this.index.array,i=this.attributes;for(const r in i){const s=t(i[r],n);e.setAttribute(r,s)}const r=this.morphAttributes;for(const i in r){const s=[],o=r[i];for(let e=0,i=o.length;e<i;e++){const i=t(o[e],n);s.push(i)}e.morphAttributes[i]=s}e.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let t=0,n=s.length;t<n;t++){const n=s[t];e.addGroup(n.start,n.count,n.materialIndex)}return e}toJSON(){const t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 21,314 bytes, line 2
2if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const i=n[e];t.data.attributes[e]=i.toJSON(t.data)}const i={};let r=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],s=[];for(let e=0,i=n.length;e<i;e++){const i=n[e];s.push(i.toJSON(t.data))}s.length>0&&(i[e]=s,r=!0)}r&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const o=this.boundingSphere;return null!==o&&(t.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const i=t.attributes;for(const t in i){const n=i[t];this.setAttribute(t,n.clone(e))}const r=t.morphAttributes;for(const t in r){const n=[],i=r[t];for(let t=0,r=i.length;t<r;t++)n.push(i[t].clone(e));this.morphAttributes[t]=n}this.morphTargetsRelative=t.morphTargetsRelative;const s=t.groups;for(let t=0,e=s.length;t<e;t++){const e=s[t];this.addGroup(e.start,e.count,e.materialIndex)}const o=t.boundingBox;null!==o&&(this.boundingBox=o.clone());const a=t.boundingSphere;return null!==a&&(this.boundingSphere=a.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,void 0!==t.parameters&&(this.parameters=Object.assign({},t.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}}const Zn=new qe,Jn=new Ye,Kn=new ze,$n=new _e,Qn=new _e,ti=new _e,ei=new _e,ni=new _e,ii=new _e,ri=new _e,si=new _e,oi=new _e,ai=new Gt,li=new Gt,ci=new Gt,hi=new _e,ui=new _e;class di extends xn{constructor(t=new qn,e=new On){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t<e;t++){const e=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[e]=t}}}}raycast(t,e){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0===i)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),Kn.copy(n.boundingSphere),Kn.applyMatrix4(r),!1===t.ray.intersectsSphere(Kn))return;if(Zn.copy(r).invert(),Jn.copy(t.ray).applyMatrix4(Zn),null!==n.boundingBox&&!1===Jn.intersectsBox(n.boundingBox))return;let s;const o=n.index,a=n.attributes.position,l=n.morphAttributes.position,c=n.morphTargetsRelative,h=n.attributes.uv,u=n.attributes.uv2,d=n.groups,p=n.drawRange;if(null!==o)if(Array.isArray(i))for(let n=0,r=d.length;n<r;n++){const r=d[n],f=i[r.materialIndex];for(let n=Math.max(r.start,p.start),i=Math.min(o.count,Math.min(r.start+r.count,p.start+p.count));n<i;n+=3){const i=o.getX(n),d=o.getX(n+1),p=o.getX(n+2);s=pi(this,f,t,Jn,a,l,c,h,u,i,d,p),s&&(s.faceIndex=Math.floor(n/3),s.face.materialIndex=r.materialIndex,e.push(s))}}else{for(let n=Math.max(0,p.start),r=Math.min(o.count,p.start+p.count);n<r;n+=3){const r=o.getX(n),d=o.getX(n+1),p=o.getX(n+2);s=pi(this,i,t,Jn,a,l,c,h,u,r,d,p),s&&(s.faceIndex=Math.floor(n/3),e.push(s))}}else if(void 0!==a)if(Array.isArray(i))for(let n=0,r=d.length;n<r;n++){const r=d[n],o=i[r.materialIndex];for(let n=Math.max(r.start,p.start),i=Math.min(a.count,Math.min(r.start+r.count,p.start+p.count));n<i;n+=3){s=pi(this,o,t,Jn,a,l,c,h,u,n,n+1,n+2),s&&(s.faceIndex=Math.floor(n/3),s.face.materialIndex=r.materialIndex,e.push(s))}}else{for(let n=Math.max(0,p.start),r=Math.min(a.count,p.start+p.count);n<r;n+=3){s=pi(this,i,t,Jn,a,l,c,h,u,n,n+1,n+2),s&&(s.faceIndex=Math.floor(n/3),e.push(s))}}}}function pi(t,e,n,i,r,s,o,a,l,c,h,u){$n.fromBufferAttribute(r,c),Qn.fromBufferAttribute(r,h),ti.fromBufferAttribute(r,u);const d=t.morphTargetInfluences;if(s&&d){ri.set(0,0,0),si.set(0,0,0),oi.set(0,0,0);for(let t=0,e=s.length;t<e;t++){const e=d[t],n=s[t];0!==e&&(ei.fromBufferAttribute(n,c),ni.fromBufferAttribute(n,h),ii.fromBufferAttribute(n,u),o?(ri.addScaledVector(ei,e),si.addScaledVector(ni,e),oi.addScaledVector(ii,e)):(ri.addScaledVector(ei.sub($n),e),si.addScaledVector(ni.sub(Qn),e),oi.addScaledVector(ii.sub(ti),e)))}$n.add(ri),Qn.add(si),ti.add(oi)}t.isSkinnedMesh&&(t.boneTransform(c,$n),t.boneTransform(h,Qn),t.boneTransform(u,ti));const p=function(t,e,n,i,r,s,o,a){let l;if(l=1===e.side?i.intersectTriangle(o,s,r,!0,a):i.intersectTriangle(r,s,o,2!==e.side,a),null===l)return null;ui.copy(a),ui.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(ui);return c<n.near||c>n.far?null:{distance:c,point:ui.clone(),object:t}}(t,e,n,i,$n,Qn,ti,hi);if(p){a&&(ai.fromBufferAttribute(a,c),li.fromBufferAttribute(a,h),ci.fromBufferAttribute(a,u),p.uv=Pn.getUV(hi,$n,Qn,ti,ai,li,ci,new Gt)),l&&(ai.fromBufferAttribute(l,c),li.fromBufferAttribute(l,h),ci.fromBufferAttribute(l,u),p.uv2=Pn.getUV(hi,$n,Qn,ti,ai,li,ci,new Gt));const t={a:c,b:h,c:u,normal:new _e,materialIndex:0};Pn.getNormal($n,Qn,ti,t.normal),p.face=t}return p}class fi extends qn{constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const o=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const a=[],l=[],c=[],h=[];let u=0,d=0;function p(t,e,n,i,r,s,p,f,m,g,v){const _=s/m,y=p/g,x=s/2,b=p/2,M=f/2,w=m+1,S=g+1;let T=0,E=0;const A=new _e;for(let s=0;s<S;s++){const o=s*y-b;for(let a=0;a<w;a++){const u=a*_-x;A[t]=u*i,A[e]=o*r,A[n]=M,l.push(A.x,A.y,A.z),A[t]=0,A[e]=0,A[n]=f>0?1:-1,c.push(A.x,A.y,A.z),h.push(a/m),h.push(1-s/g),T+=1}}for(let t=0;t<g;t++)for(let e=0;e<m;e++){const n=u+e+w*t,i=u+e+w*(t+1),r=u+(e+1)+w*(t+1),s=u+(e+1)+w*t;a.push(n,i,s),a.push(i,r,s),E+=6}o.addGroup(d,E,v),d+=E,u+=T}p("z","y","x",-1,-1,n,e,t,s,r,0),p("z","y","x",1,-1,n,e,-t,s,r,1),p("x","z","y",1,1,t,n,e,i,s,2),p("x","z","y",1,-1,t,n,-e,i,s,3),p("x","y","z",1,-1,t,e,n,i,r,4),p("x","y","z",-1,-1,t,e,-n,i,r,5),this.setIndex(a),this.setAttribute("position",new Bn(l,3)),this.setAttribute("normal",new Bn(c,3)),this.setAttribute("uv",new Bn(h,2))}static fromJSON(t){return new fi(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function mi(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function gi(t){const e={};for(let n=0;n<t.length;n++){const i=mi(t[n]);for(const t in i)e[t]=i[t]}return e}function vi(t){return null===t.getRenderTarget()&&t.outputEncoding===bt?Mt:wt}const _i={clone:mi,merge:gi};class yi extends Dn{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],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.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!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,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=mi(t.uniforms),this.uniformsGroups=function(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const n in this.uniforms){const i=this.uniforms[n].value;i&&i.isTexture?e.uniforms[n]={type:"t",value:i.toJSON(t).uuid}:i&&i.isColor?e.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?e.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?e.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?e.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?e.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?e.uniforms[n]={type:"m4",value:i.toArray()}:e.uniforms[n]={value:i}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}class xi extends xn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new qe,this.projectionMatrix=new qe,this.projectionMatrixInverse=new qe}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class bi extends xi{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*It*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Pt*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*It*Math.atan(Math.tan(.5*Pt*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,r,s){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Pt*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,o=s.fullHeight;r+=s.offsetX*i/t,e-=s.offsetY*n/o,i*=s.width/t,n*=s.height/o}const o=this.filmOffset;0!==o&&(r+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const Mi=-90;class wi extends xn{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n;const i=new bi(Mi,1,t,e);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(1,0,0),this.add(i);const r=new bi(Mi,1,t,e);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(-1,0,0),this.add(r);const s=new bi(Mi,1,t,e);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(0,1,0),this.add(s);const o=new bi(Mi,1,t,e);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(0,-1,0),this.add(o);const a=new bi(Mi,1,t,e);a.layers=this.layers,a.up.set(0,1,0),a.lookAt(0,0,1),this.add(a);const l=new bi(Mi,1,t,e);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(t,e){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[i,r,s,o,a,l]=this.children,c=t.getRenderTarget(),h=t.toneMapping,u=t.xr.enabled;t.toneMapping=0,t.xr.enabled=!1;const d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,r),t.setRenderTarget(n,2),t.render(e,s),t.setRenderTarget(n,3),t.render(e,o),t.setRenderTarget(n,4),t.render(e,a),n.texture.generateMipmaps=d,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(c),t.toneMapping=h,t.xr.enabled=u,n.texture.needsPMREMUpdate=!0}}class Si extends de{constructor(t,e,n,i,r,s,o,a,l,c){super(t=void 0!==t?t:[],e=void 0!==e?e:_,n,i,r,s,o,a,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Ti extends fe{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];this.texture=new Si(i,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:R}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new fi(5,5,5),r=new yi({name:"CubemapFromEquirect",uniforms:mi(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=e;const s=new di(i,r),o=e.minFilter;e.minFilter===P&&(e.minFilter=R);return new wi(1,10,this).update(t,s),e.minFilter=o,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,n,i){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,n,i);t.setRenderTarget(r)}}const Ei=new _e,Ai=new _e,Ci=new Wt;class Ri{constructor(t=new _e(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const i=Ei.subVectors(n,e).cross(Ai.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){const n=t.delta(Ei),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:e.copy(n).multiplyScalar(r).add(t.start)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||Ci.getNormalMatrix(t),i=this.coplanarPoint(Ei).applyMatrix4(t),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Li=new ze,Pi=new _e;class Ii{constructor(t=new Ri,e=new Ri,n=new Ri,i=new Ri,r=new Ri,s=new Ri){this.planes=[t,e,n,i,r,s]}set(t,e,n,i,r,s){const o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(n),o[3].copy(i),o[4].copy(r),o[5].copy(s),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){const e=this.planes,n=t.elements,i=n[0],r=n[1],s=n[2],o=n[3],a=n[4],l=n[5],c=n[6],h=n[7],u=n[8],d=n[9],p=n[10],f=n[11],m=n[12],g=n[13],v=n[14],_=n[15];return e[0].setComponents(o-i,h-a,f-u,_-m).normalize(),e[1].setComponents(o+i,h+a,f+u,_+m).normalize(),e[2].setComponents(o+r,h+l,f+d,_+g).normalize(),e[3].setComponents(o-r,h-l,f-d,_-g).normalize(),e[4].setComponents(o-s,h-c,f-p,_-v).normalize(),e[5].setComponents(o+s,h+c,f+p,_+v).normalize(),this}intersectsObject(t){const e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),Li.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(Li)}intersectsSprite(t){return Li.center.set(0,0,0),Li.radius=.7071067811865476,Li.applyMatrix4(t.matrixWorld),this.intersectsSphere(Li)}intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(n)<i)return!1}return!0}intersectsBox(t){const e=this.planes;for(let n=0;n<6;n++){const i=e[n];if(Pi.x=i.normal.x>0?t.max.x:t.min.x,Pi.y=i.normal.y>0?t.max.y:t.min.y,Pi.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(Pi)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Di(){let t=null,e=!1,n=null,i=null;function r(e,s){n(e,s),i=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==n&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function Oi(t,e){const n=e.isWebGL2,i=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),i.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const n=i.get(e);n&&(t.deleteBuffer(n.buffer),i.delete(e))},update:function(e,r){if(e.isGLBufferAttribute){const t=i.get(e);return void((!t||t.version<e.version)&&i.set(e,{buffer:e.buffer,type:e.type,bytesPerElement:e.elementSize,version:e.version}))}e.isInterleavedBufferAttribute&&(e=e.data);const s=i.get(e);void 0===s?i.set(e,function(e,i){const r=e.array,s=e.usage,o=t.createBuffer();let a;if(t.bindBuffer(i,o),t.bufferData(i,r,s),e.onUploadCallback(),r instanceof Float32Array)a=t.FLOAT;else if(r instanceof Uint16Array)if(e.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");a=t.HALF_FLOAT}else a=t.UNSIGNED_SHORT;else if(r instanceof Int16Array)a=t.SHORT;else if(r instanceof Uint32Array)a=t.UNSIGNED_INT;else if(r instanceof Int32Array)a=t.INT;else if(r instanceof Int8Array)a=t.BYTE;else if(r instanceof Uint8Array)a=t.UNSIGNED_BYTE;else{if(!(r instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+r);a=t.UNSIGNED_BYTE}return{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}(e,r)):s.version<e.version&&(!function(e,i,r){const s=i.array,o=i.updateRange;t.bindBuffer(r,e),-1===o.count?t.bufferSubData(r,0,s):(n?t.bufferSubData(r,o.offset*s.BYTES_PER_ELEMENT,s,o.offset,o.count):t.bufferSubData(r,o.offset*s.BYTES_PER_ELEMENT,s.subarray(o.offset,o.offset+o.count)),o.count=-1),i.onUploadCallback()}(s.buffer,e,r),s.version=e.version)}}}class Ni extends qn{constructor(t=1,e=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:i};
vendor: 4,533 bytes, line 2
2const r=t/2,s=e/2,o=Math.floor(n),a=Math.floor(i),l=o+1,c=a+1,h=t/o,u=e/a,d=[],p=[],f=[],m=[];for(let t=0;t<c;t++){const e=t*u-s;for(let n=0;n<l;n++){const i=n*h-r;p.push(i,-e,0),f.push(0,0,1),m.push(n/o),m.push(1-t/a)}}for(let t=0;t<a;t++)for(let e=0;e<o;e++){const n=e+l*t,i=e+l*(t+1),r=e+1+l*(t+1),s=e+1+l*t;d.push(n,i,s),d.push(i,r,s)}this.setIndex(d),this.setAttribute("position",new Bn(p,3)),this.setAttribute("normal",new Bn(f,3)),this.setAttribute("uv",new Bn(m,2))}static fromJSON(t){return new Ni(t.width,t.height,t.widthSegments,t.heightSegments)}}const Ui={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",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.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n\t\tfloat x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n\t\tfloat x2 = x * x;\n\t\tfloat x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n\t\treturn ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\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_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\n#ifdef USE_IRIDESCENCE\n\tvec3 BRDF_GGX_Iridescence( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float iridescence, const in vec3 iridescenceFresnel, const in float roughness ) {\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = mix( F_Schlick( f0, f90, dotVH ), iridescenceFresnel, iridescence );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;
2\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\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_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,\t0.0556434,\n\t\t-1.5371385,\t1.8760108, -0.2040259,\n\t\t-0.4985314,\t0.0415560,\t
vendor: 13,848 bytes, line 2
21.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",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, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\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 ) * faceDirection;\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",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 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 max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\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#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\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}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn 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.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#el
2se\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\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",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t}
2 else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\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",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\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};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}
2\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};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\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 vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\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\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, 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_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong
vendor: 6,955 bytes, line 2
2",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, 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 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(
2\t\t0, 1,\t\t
vendor: 15,871 bytes, line 2
20 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness );\n\t#else\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\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}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx =
2dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\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 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 25
25.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\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\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\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( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), 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( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), 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 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;
2\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\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, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\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}
2\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if defined( USE_SHADOWMAP ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_COORDS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",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",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",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\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",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\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",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",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;
2\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(\t1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,\t1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,\t1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_L
2IGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = tex
vendor: 31,014 bytes, line 2
2Color;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\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 <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},
vendor: 604 bytes, line 2
2ki={common:{diffuse:{value:new oe(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Wt},uv2Transform:{value:new Wt},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Gt(1,1)}}
vendor: 6,609 bytes, line 2
2,displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new oe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new oe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Wt}},sprite:{diffuse:{value:new oe(16777215)},opacity:{value:1},center:{value:new Gt(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Wt}}},Fi={basic:{uniforms:gi([ki.common,ki.specularmap,ki.envmap,ki.aomap,ki.lightmap,ki.fog]),vertexShader:Ui.meshbasic_vert,fragmentShader:Ui.meshbasic_frag},lambert:{uniforms:gi([ki.common,ki.specularmap,ki.envmap,ki.aomap,ki.lightmap,ki.emissivemap,ki.bumpmap,ki.normalmap,ki.displacementmap,ki.fog,ki.lights,{emissive:{value:new oe(0)}}]),vertexShader:Ui.meshlambert_vert,fragmentShader:Ui.meshlambert_frag},phong:{uniforms:gi([ki.common,ki.specularmap,ki.envmap,ki.aomap,ki.lightmap,ki.emissivemap,ki.bumpmap,ki.normalmap,ki.displacementmap,ki.fog,ki.lights,{emissive:{value:new oe(0)},specular:{value:new oe(1118481)},shininess:{value:30}}]),vertexShader:Ui.meshphong_vert,fragmentShader:Ui.meshphong_frag},standard:{uniforms:gi([ki.common,ki.envmap,ki.aomap,ki.lightmap,ki.emissivemap,ki.bumpmap,ki.normalmap,ki.displacementmap,ki.roughnessmap,ki.metalnessmap,ki.fog,ki.lights,{emissive:{value:new oe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ui.meshphysical_vert,fragmentShader:Ui.meshphysical_frag},toon:{uniforms:gi([ki.common,ki.aomap,ki.lightmap,ki.emissivemap,ki.bumpmap,ki.normalmap,ki.displacementmap,ki.gradientmap,ki.fog,ki.lights,{emissive:{value:new oe(0)}}]),vertexShader:Ui.meshtoon_vert,fragmentShader:Ui.meshtoon_frag},matcap:{uniforms:gi([ki.common,ki.bumpmap,ki.normalmap,ki.displacementmap,ki.fog,{matcap:{value:null}}]),vertexShader:Ui.meshmatcap_vert,fragmentShader:Ui.meshmatcap_frag},points:{uniforms:gi([ki.points,ki.fog]),vertexShader:Ui.points_vert,fragmentShader:Ui.points_frag},dashed:{uniforms:gi([ki.common,ki.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ui.linedashed_vert,fragmentShader:Ui.linedashed_frag},depth:{uniforms:gi([ki.common,ki.displacementmap]),vertexShader:Ui.depth_vert,fragmentShader:Ui.depth_frag},normal:{uniforms:gi([ki.common,ki.bumpmap,ki.normalmap,ki.displacementmap,{opacity:{value:1}}]),vertexShader:Ui.meshnormal_vert,fragmentShader:Ui.meshnormal_frag},sprite:{uniforms:gi([ki.sprite,ki.fog]),vertexShader:Ui.sprite_vert,fragmentShader:Ui.sprite_frag},background:{uniforms:{uvTransform:{value:new Wt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ui.background_vert,fragmentShader:Ui.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Ui.backgroundCube_vert,fragmentShader:Ui.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ui.cube_vert,fragmentShader:Ui.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ui.equirect_vert,fragmentShader:Ui.equirect_frag},distanceRGBA:{uniforms:gi([ki.common,ki.displacementmap,{referencePosition:{value:new _e},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ui.distanceRGBA_vert,fragmentShader:Ui.distanceRGBA_frag},shadow:{uniforms:gi([ki.lights,ki.fog,{color:{value:new oe(0)},opacity:{value:1}}]),vertexShader:Ui.shadow_vert,fragmentShader:Ui.shadow_frag}};Fi.physical={uniforms:gi([Fi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Gt(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new oe(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Gt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new oe(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new oe(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Ui.meshphysical_vert,fragmentShader:Ui.meshphysical_frag};const zi={r:0,b:0,g:0};function Bi(t,e,n,i,r,s,o){const a=new oe(0);let l,c,h=!0===s?0:1,u=null,d=0,p=null;function f(e,n){e.getRGB(zi,vi(t)),i.buffers.color.setClear(zi.r,zi.g,zi.b,n,o)}return{getClearColor:function(){return a},setClearColor:function(t,e=1){a.set(t),h=e,f(a,h)},getClearAlpha:function(){return h},setClearAlpha:function(t){h=t,f(a,h)},render:function(i,s){let o=!1,m=!0===s.isScene?s.background:null;if(m&&m.isTexture){m=(s.backgroundBlurriness>0?n:e).get(m)}const g=t.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?f(a,h):m&&m.isColor&&(f(m,1),o=!0),(t.autoClear||o)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),m&&(m.isCubeTexture||m.mapping===M)?(void 0===c&&(c=new di(new fi(1,1,1),new yi({name:"Backgroun
2dCubeMaterial",uniforms:mi(Fi.backgroundCube.uniforms),vertexShader:Fi.backgroundCube.vertexShader,fragmentShader:Fi.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(c)),c.material.uniforms.envMap.value=m,c.material.uniforms.flipEnvMap.value=m.isCubeTexture&&!1===m.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=s.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=s.backgroundIntensity,u===m&&d===m.version&&p===t.toneMapping||(c.material.needsUpdate=!0,u=m,d=m.version,p=t.toneMapping),c.layers.enableAll(),i.unshift(c,c.geometry,c.material,0,0,null)):m&&m.isTexture&&(void 0===l&&(l=new di(new Ni(2,2),new yi({name:"BackgroundMaterial",uniforms:mi(Fi.background.uniforms),vertexShader:Fi.background.vertexShader,fragmentShader:Fi.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(l)),l.material.uniforms.t2D.value=m,l.material.uniforms.backgroundIntensity.value=s.backgroundIntensity,!0===m.matrixAutoUpdate&&m.updateMatrix(),l.material.uniforms.uvTransform.value.copy(m.matrix),u===m&&d===m.version&&p===t.toneMapping||(l.material.needsUpdate=!0,u=m,d=m.version,p=t.toneMapping),l.layers.enableAll(),i.unshift(l,l.geometry,l.material,0,0,null))}}}function Hi(t,e,n,i){const r=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||null!==s,a={},l=p(null);let c=l,h=!1;function u(e){return i.isWebGL2?t.bindVertexArray(e):s.bindVertexArrayOES(e)}function d(e){return i.isWebGL2?t.deleteVertexArray(e):s.deleteVertexArrayOES(e)}function p(t){const e=[],n=[],i=[];for(let t=0;t<r;t++)e[t]=0,n[t]=0,i[t]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:e,enabledAttributes:n,attributeDivisors:i,object:t,attributes:{},index:null}}function f(){const t=c.newAttributes;for(let e=0,n=t.length;e<n;e++)t[e]=0}function m(t){g(t,0)}function g(n,r){const s=c.newAttributes,o=c.enabledAttributes,a=c.attributeDivisors;if(s[n]=1,0===o[n]&&(t.enableVertexAttribArray(n),o[n]=1),a[n]!==r){(i.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,r),a[n]=r}}function v(){const e=c.newAttributes,n=c.enabledAttributes;for(let i=0,r=n.length;i<r;i++)n[i]!==e[i]&&(t.disableVertexAttribArray(i),n[i]=0)}function _(e,n,r,s,o,a){!0!==i.isWebGL2||r!==t.INT&&r!==t.UNSIGNED_INT?t.vertexAttribPointer(e,n,r,s,o,a):t.vertexAttribIPointer(e,n,r,o,a)}function y(){x(),h=!0,c!==l&&(c=l,u(c.object))}function x(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(r,l,d,y,x){let b=!1;if(o){const e=function(e,n,r){const o=!0===r.wireframe;let l=a[e.id];void 0===l&&(l={},a[e.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let h=c[o];void 0===h&&(h=p(i.isWebGL2?t.createVertexArray():s.createVertexArrayOES()),c[o]=h);return h}(y,d,l);c!==e&&(c=e,u(c.object)),b=function(t,e,n,i){const r=c.attributes,s=e.attributes;let o=0;const a=n.getAttributes();for(const e in a){if(a[e].location>=0){const n=r[e];let i=s[e];if(void 0===i&&("instanceMatrix"===e&&t.instanceMatrix&&(i=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(i=t.instanceColor)),void 0===n)return!0;if(n.attribute!==i)return!0;if(i&&n.data!==i.data)return!0;o++}}return c.attributesNum!==o||c.index!==i}(r,y,d,x),b&&function(t,e,n,i){const r={},s=e.attributes;let o=0;const a=n.getAttributes();for(const e in a){if(a[e].location>=0){let n=s[e];void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor));const i={};i.attribute=n,n&&n.data&&(i.data=n.data),r[e]=i,o++}}c.attributes=r,c.attributesNum=o,c.index=i}(r,y,d,x)}else{const t=!0===l.wireframe;c.geometry===y.id&&c.program===d.id&&c.wireframe===t||(c.geometry=y.id,c.program=d.id,c.wireframe=t,b=!0)}null!==x&&n.update(x,t.ELEMENT_ARRAY_BUFFER),(b||h)&&(h=!1,function(r,s,o,a){if(!1===i.isWebG
vendor: 2,266 bytes, line 2
2L2&&(r.isInstancedMesh||a.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;f();const l=a.attributes,c=o.getAttributes(),h=s.defaultAttributeValues;for(const e in c){const i=c[e];if(i.location>=0){let s=l[e];if(void 0===s&&("instanceMatrix"===e&&r.instanceMatrix&&(s=r.instanceMatrix),"instanceColor"===e&&r.instanceColor&&(s=r.instanceColor)),void 0!==s){const e=s.normalized,o=s.itemSize,l=n.get(s);if(void 0===l)continue;const c=l.buffer,h=l.type,u=l.bytesPerElement;if(s.isInterleavedBufferAttribute){const n=s.data,l=n.stride,d=s.offset;if(n.isInstancedInterleavedBuffer){for(let t=0;t<i.locationSize;t++)g(i.location+t,n.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let t=0;t<i.locationSize;t++)m(i.location+t);t.bindBuffer(t.ARRAY_BUFFER,c);for(let t=0;t<i.locationSize;t++)_(i.location+t,o/i.locationSize,h,e,l*u,(d+o/i.locationSize*t)*u)}else{if(s.isInstancedBufferAttribute){for(let t=0;t<i.locationSize;t++)g(i.location+t,s.meshPerAttribute);!0!==r.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=s.meshPerAttribute*s.count)}else for(let t=0;t<i.locationSize;t++)m(i.location+t);t.bindBuffer(t.ARRAY_BUFFER,c);for(let t=0;t<i.locationSize;t++)_(i.location+t,o/i.locationSize,h,e,o*u,o/i.locationSize*t*u)}}else if(void 0!==h){const n=h[e];if(void 0!==n)switch(n.length){case 2:t.vertexAttrib2fv(i.location,n);break;case 3:t.vertexAttrib3fv(i.location,n);break;case 4:t.vertexAttrib4fv(i.location,n);break;default:t.vertexAttrib1fv(i.location,n)}}}}v()}(r,l,d,y),null!==x&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(x).buffer))},reset:y,resetDefaultState:x,dispose:function(){y();for(const t in a){const e=a[t];for(const t in e){const n=e[t];for(const t in n)d(n[t].object),delete n[t];delete e[t]}delete a[t]}},releaseStatesOfGeometry:function(t){if(void 0===a[t.id])return;const e=a[t.id];for(const t in e){const n=e[t];for(const t in n)d(n[t].object),delete n[t];delete e[t]}delete a[t.id]},releaseStatesOfProgram:function(t){for(const e in a){const n=a[e];if(void 0===n[t.id])continue;const i=n[t.id];for(const t in i)d(i[t].object),delete i[t];delete n[t.id]}},initAttributes:f,enableAttribute:m,disableUnusedAttributes:v}}
vendor: 4,125 bytes, line 2
2function Vi(t,e,n,i){const r=i.isWebGL2;let s;this.setMode=function(t){s=t},this.render=function(e,i){t.drawArrays(s,e,i),n.update(i,s,1)},this.renderInstances=function(i,o,a){if(0===a)return;let l,c;if(r)l=t,c="drawArraysInstanced";else if(l=e.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](s,i,o,a),n.update(o,s,a)}}function Gi(t,e,n){let i;function r(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&t instanceof WebGL2ComputeRenderingContext;let o=void 0!==n.precision?n.precision:"highp";const a=r(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);const l=s||e.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),f=t.getParameter(t.MAX_VERTEX_ATTRIBS),m=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),_=u>0,y=s||e.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===e.has("EXT_texture_filter_anisotropic")){const n=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:r,precision:o,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:_,floatFragmentTextures:y,floatVertexTextures:_&&y,maxSamples:s?t.getParameter(t.MAX_SAMPLES):0}}function Wi(t){const e=this;let n=null,i=0,r=!1,s=!1;const o=new Ri,a=new Wt,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(t,n,i,r){const s=null!==t?t.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const e=i+4*s,r=n.matrixWorldInverse;a.getNormalMatrix(r),(null===c||c.length<e)&&(c=new Float32Array(e));for(let e=0,n=i;e!==s;++e,n+=4)o.copy(t[e]).applyMatrix4(r,a),o.normal.toArray(c,n),c[n+3]=o.constant}l.value=c,l.needsUpdate=!0}return e.numPlanes=s,e.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(t,e,s){const o=0!==t.length||e||0!==i||r;return r=e,n=h(t,s,0),i=t.length,o},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1,c()},this.setState=function(e,o,a){const u=e.clippingPlanes,d=e.clipIntersection,p=e.clipShadows,f=t.get(e);if(!r||null===u||0===u.length||s&&!p)s?h(null):c();else{const t=s?0:i,e=4*t;let r=f.clippingState||null;l.value=r,r=h(u,o,e,a);for(let t=0;t!==e;++t)r[t]=n[t];f.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function ji(t){let e=new WeakMap;function n(t,e){return e===x?t.mapping=_:e===b&&(t.mapping=y),t}function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture&&!1===r.isRenderTargetTexture){const s=r.mapping;if(s===x||s===b){if(e.has(r)){return n(e.get(r).texture,r.mapping)}{const s=r.image;if(s&&s.height>0){const o=new Ti(s.height/2);return o.fromEquirectangularTexture(t,r),e.set(r,o),r.addEventListener("dispose",i),n(o.texture,r.mapping)}return null}}}return r},dispose:function(){e=new WeakMap}}}class Xi extends xi{constructor(t=-1,e=1,n=1,i=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="Orthogra
2phicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-t,s=n+t,o=i+e,a=i-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=t*this.view.offsetX,s=r+t*this.view.width,o-=e*this.view.offsetY,a=o-e*this.view.height}this.projectionMatrix.makeOrthographic(r,s,o,a,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const Yi=[.125,.215,.35,.446,.526,.582],qi=20,Zi=new Xi,Ji=new oe;let Ki=null;const $i=(1+Math.sqrt(5))/2,Qi=1/$i,tr=[new _e(1,1,1),new _e(-1,1,1),new _e(1,1,-1),new _e(-1,1,-1),new _e(0,$i,Qi),new _e(0,$i,-Qi),new _e(Qi,0,$i),new _e(-Qi,0,$i),new _e($i,Qi,0),new _e(-$i,Qi,0)];class er{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,i=100){Ki=this._renderer.getRenderTarget(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(t,n,i,r),e>0&&this._blur(r,0,0,e),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=sr(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=rr(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;t<this._lodPlanes.length;t++)this._lodPlanes[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(Ki),t.scissorTest=!1,ir(t,0,0,t.width,t.height)}_fromTexture(t,e){t.mapping===_||t.mapping===y?this._setSize(0===t.image.length?16:t.image[0].width||t.image[0].image.width):this._setSize(t.image.width/4),Ki=this._renderer.getRenderTarget();const n=e||this._allocateTargets();return this._textureToCubeUV(t,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const t=3*Math.max(this._cubeSize,112),e=4*this._cubeSize,n={magFilter:R,minFilter:R,generateMipmaps:!1,type:U,format:F,encoding:xt,depthBuffer:!1},i=nr(t,e,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=nr(t,e,n);const{_lodMax:i}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(t){const e=[],n=[],i=[];let r=t;const s=t-4+1+Yi.length;for(let o=0;o<s;o++){const s=Math.pow(2,r);n.push(s);let a=1/s;o>t-4?a=Yi[o-t+4-1]:0===o&&(a=0),i.push(a);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,f=3,m=2,g=1,v=new Float32Array(f*p*d),_=new Float32Array(m*p*d),y=new Float32Array(g*p*d);for(let t=0;t<d;t++){const e=t%3*2/3-1,n=t>2?0:-1,i=[e,n,0,e+2/3,n,0,e+2/3,n+1,0,e,n,0,e+2/3,n+1,0,e,n+1,0];v.set(i,f*p*t),_.set(u,m*p*t);const r=[t,t,t,t,t,t];y.set(r,g*p*t)}const x=new qn;x.setAttribute("position",new kn(v,f)),x.setAttribute("uv",new kn(_,m)),x.setAttribute("faceIndex",new kn(y,g)),e.push(x),r>4&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}(i)),this._blurMaterial=function(t,e,n){const i=new Float32Array(qi),r=new _e(0,1,0),s=new yi({name:"SphericalGaussianBlur",defines:{n:qi,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:or(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return s}(i,t,e)}return i}_compileMaterial(t){const e=new di(this._lodPlanes[0],t);this._renderer.compile(e,Zi)}_sceneToCubeUV(t,e,n,i){const r=new bi(90,1,e,n),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],a=this._renderer,l=a.autoClear,c=a.toneMapping;a.getClearColor(Ji),a.toneMapping=0,a.autoClear=!1;
vendor: 26,132 bytes, line 2
2const h=new On({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),u=new di(new fi,h);let d=!1;const p=t.background;p?p.isColor&&(h.color.copy(p),t.background=null,d=!0):(h.color.copy(Ji),d=!0);for(let e=0;e<6;e++){const n=e%3;0===n?(r.up.set(0,s[e],0),r.lookAt(o[e],0,0)):1===n?(r.up.set(0,0,s[e]),r.lookAt(0,o[e],0)):(r.up.set(0,s[e],0),r.lookAt(0,0,o[e]));const l=this._cubeSize;ir(i,n*l,e>2?l:0,l,l),a.setRenderTarget(i),d&&a.render(u,r),a.render(t,r)}u.geometry.dispose(),u.material.dispose(),a.toneMapping=c,a.autoClear=l,t.background=p}_textureToCubeUV(t,e){const n=this._renderer,i=t.mapping===_||t.mapping===y;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=sr()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=rr());const r=i?this._cubemapMaterial:this._equirectMaterial,s=new di(this._lodPlanes[0],r);r.uniforms.envMap.value=t;const o=this._cubeSize;ir(e,0,0,3*o,2*o),n.setRenderTarget(e),n.render(s,Zi)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let e=1;e<this._lodPlanes.length;e++){const n=Math.sqrt(this._sigmas[e]*this._sigmas[e]-this._sigmas[e-1]*this._sigmas[e-1]),i=tr[(e-1)%tr.length];this._blur(t,e-1,e,n,i)}e.autoClear=n}_blur(t,e,n,i,r){const s=this._pingPongRenderTarget;this._halfBlur(t,s,e,n,i,"latitudinal",r),this._halfBlur(s,t,n,n,i,"longitudinal",r)}_halfBlur(t,e,n,i,r,s,o){const a=this._renderer,l=this._blurMaterial;"latitudinal"!==s&&"longitudinal"!==s&&console.error("blur direction must be either latitudinal or longitudinal!");const c=new di(this._lodPlanes[i],l),h=l.uniforms,u=this._sizeLods[n]-1,d=isFinite(r)?Math.PI/(2*u):2*Math.PI/39,p=r/d,f=isFinite(r)?1+Math.floor(3*p):qi;f>qi&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let t=0;t<qi;++t){const e=t/p,n=Math.exp(-e*e/2);m.push(n),0===t?g+=n:t<f&&(g+=2*n)}for(let t=0;t<m.length;t++)m[t]=m[t]/g;h.envMap.value=t.texture,h.samples.value=f,h.weights.value=m,h.latitudinal.value="latitudinal"===s,o&&(h.poleAxis.value=o);const{_lodMax:v}=this;h.dTheta.value=d,h.mipInt.value=v-n;const _=this._sizeLods[i];ir(e,3*_*(i>v-4?i-v+4:0),4*(this._cubeSize-_),3*_,2*_),a.setRenderTarget(e),a.render(c,Zi)}}function nr(t,e,n){const i=new fe(t,e,n);return i.texture.mapping=M,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function ir(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function rr(){return new yi({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:or(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function sr(){return new yi({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:or(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function or(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function ar(t){let e=new WeakMap,n=null;function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping,o=s===x||s===b,a=s===_||s===y;if(o||a){if(r.isRenderTargetTexture&&!0===r.needsPMREMUpdate){r.needsPMREMUpdate=!1;let i=e.get(r);return null===n&&(n=new er(t)),i=o?n.fromEquirectangular(r,i):n.fromCubemap(r,i),e.set(r,i),i.texture}if(e.has(r))return e.get(r).texture;{const s=r.image;if(o&&s&&s.height>0||a&&s&&function(t){let e=0;const n=6;for(let i=0;i<n;i++)void 0!==t[i]&&e++;return e===n}(s)){null===n&&(n=new er(t));const s=o?n.fromEquirectangular(r):n.fromCubemap(r);return e.set(r,s),r.addEventListener("dispose",i),s.texture}return null}}}return r},dispose:function(){e=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function lr(t){const e={};function n(n){if(void 0!==e[n])return e[n];let i;switch(n){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=t.getExtension(n)}return e[n]=i,i}return{has:function(t){return null!==n(t)},init:function(t){t.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(t){const e=n(t);return null===e&&console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e}}}function cr(t,e,n,i){const r={},s=new WeakMap;function o(t){const a=t.target;null!==a.index&&e.remove(a.index);for(const t in a.attributes)e.remove(a.attributes[t]);a.removeEventListener("dispose",o),delete r[a.id];const l=s.get(a);l&&(e.remove(l),s.delete(a)),i.releaseStatesOfGeometry(a),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(t){const n=[],i=t.index,r=t.attributes.position;let o=0;if(null!==i){const t=i.array;o=i.version;for(let e=0,i=t.length;e<i;e+=3){const i=t[e+0],r=t[e+1],s=t[e+2];n.push(i,r,r,s,s,i)}}else{const t=r.array;o=r.version;for(let e=0,i=t.length/3-1;e<i;e+=3){const t=e+0,i=e+1,r=e+2;n.push(t,i,i,r,r,t)}}const a=new(Xt(n)?zn:Fn)(n,1);a.version=o;const l=s.get(t);l&&e.remove(l),s.set(t,a)}return{get:function(t,e){return!0===r[e.id]||(e.addEventListener("dispose",o),r[e.id]=!0,n.memory.geometries++),e},update:function(n){const i=n.attributes;for(const n in i)e.update(i[n],t.ARRAY_BUFFER);const r=n.morphAttributes;for(const n in r){const i=r[n];for(let n=0,r=i.length;n<r;n++)e.update(i[n],t.ARRAY_BUFFER)}},getWireframeAttribute:function(t){const e=s.get(t);if(e){const n=t.index;null!==n&&e.version<n.version&&a(t)}else a(t);return s.get(t)}}}function hr(t,e,n,i){const r=i.isWebGL2;let s,o,a;this.setMode=function(t){s=t},this.setIndex=function(t){o=t.type,a=t.bytesPerElement},this.render=function(e,i){t.drawElements(s,i,o,e*a),n.update(i,s,1)},this.renderInstances=function(i,l,c){if(0===c)return;let h,u;if(r)h=t,u="drawElementsInstanced";else if(h=e.get("ANGLE_instanced_arrays"),u="drawElementsInstancedANGLE",null===h)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");h[u](s,l,o,i*a,c),n.update(l,s,c)}}function ur(t){const e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,i,r){switch(e.calls++,i){case t.TRIANGLES:e.triangles+=r*(n/3);break;case t.LINES:e.lines+=r*(n/2);break;case t.LINE_STRIP:e.lines+=r*(n-1);break;case t.LINE_LOOP:e.lines+=r*n;break;case t.POINTS:e.points+=r*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",i)}}}}function dr(t,e){return t[0]-e[0]}function pr(t,e){return Math.abs(e[1])-Math.abs(t[1])}function fr(t,e,n){const i={},r=new Float32Array(8),s=new WeakMap,o=new pe,a=[];for(let t=0;t<8;t++)a[t]=[t,0];return{update:function(l,c,h,u){const d=l.morphTargetInfluences;if(!0===e.isWebGL2){const p=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,f=void 0!==p?p.length:0;let m=s.get(c);if(void 0===m||m.count!==f){void 0!==m&&m.texture.dispose();const _=void 0!==c.morphAttributes.position,y=void 0!==c.morphAttributes.normal,x=void 0!==c.morphAttributes.color,b=c.morphAttributes.position||[],M=c.morphAttributes.normal||[],w=c.morphAttributes.color||[];let S=0;!0===_&&(S=1),!0===y&&(S=2),!0===x&&(S=3);let T=c.attributes.position.count*S,E=1;T>e.maxTextureSize&&(E=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);const A=new Float32Array(T*E*4*f),C=new me(A,T,E,f);C.type=N,C.needsUpdate=!0;const R=4*S;for(let P=0;P<f;P++){const I=b[P],D=M[P],O=w[P],U=T*E*4*P;for(let k=0;k<I.count;k++){const F=k*R;!0===_&&(o.fromBufferAttribute(I,k),A[U+F+0]=o.x,A[U+F+1]=o.y,A[U+F+2]=o.z,A[U+F+3]=0),!0===y&&(o.fromBufferAttribute(D,k),A[U+F+4]=o.x,A[U+F+5]=o.y,A[U+F+6]=o.z,A[U+F+7]=0),!0===x&&(o.fromBufferAttribute(O,k),A[U+F+8]=o.x,A[U+F+9]=o.y,A[U+F+10]=o.z,A[U+F+11]=4===O.itemSize?o.w:1)}}function L(){C.dispose(),s.delete(c),c.removeEventListener("dispose",L)}m={count:f,texture:C,size:new Gt(T,E)},s.set(c,m),c.addEventListener("dispose",L)}let g=0;for(let z=0;z<d.length;z++)g+=d[z];const v=c.morphTargetsRelative?1:1-g;u.getUniforms().setValue(t,"morphTargetBaseInfluence",v),u.getUniforms().setValue(t,"morphTargetInfluences",d),u.getUniforms().setValue(t,"morphTargetsTexture",m.texture,n),u.getUniforms().setValue(t,"morphTargetsTextureSize",m.size)}else{const B=void 0===d?0:d.length;let H=i[c.id];if(void 0===H||H.length!==B){H=[];for(let X=0;X<B;X++)H[X]=[X,0];i[c.id]=H}for(let Y=0;Y<B;Y++){const q=H[Y];q[0]=Y,q[1]=d[Y]}H.sort(pr);for(let Z=0;Z<8;Z++)Z<B&&H[Z][1]?(a[Z][0]=H[Z][0],a[Z][1]=H[Z][1]):(a[Z][0]=Number.MAX_SAFE_INTEGER,a[Z][1]=0);a.sort(dr);const V=c.morphAttributes.position,G=c.morphAttributes.normal;let W=0;for(let J=0;J<8;J++){const K=a[J],$=K[0],Q=K[1];$!==Number.MAX_SAFE_INTEGER&&Q?(V&&c.getAttribute("morphTarget"+J)!==V[$]&&c.setAttribute("morphTarget"+J,V[$]),G&&c.getAttribute("morphNormal"+J)!==G[$]&&c.setAttribute("morphNormal"+J,G[$]),r[J]=Q,W+=Q):(V&&!0===c.hasAttribute("morphTarget"+J)&&c.deleteAttribute("morphTarget"+J),G&&!0===c.hasAttribute("morphNormal"+J)&&c.deleteAttribute("morphNormal"+J),r[J]=0)}const j=c.morphTargetsRelative?1:1-W;u.getUniforms().setValue(t,"morphTargetBaseInfluence",j),u.getUniforms().setValue(t,"morphTargetInfluences",r)}}}}function mr(t,e,n,i){let r=new WeakMap;function s(t){const e=t.target;e.removeEventListener("dispose",s),n.remove(e.instanceMatrix),null!==e.instanceColor&&n.remove(e.instanceColor)}return{update:function(o){const a=i.render.frame,l=o.geometry,c=e.get(o,l);return r.get(c)!==a&&(e.update(c),r.set(c,a)),o.isInstancedMesh&&(!1===o.hasEventListener("dispose",s)&&o.addEventListener("dispose",s),n.update(o.instanceMatrix,t.ARRAY_BUFFER),null!==o.instanceColor&&n.update(o.instanceColor,t.ARRAY_BUFFER)),c},dispose:function(){r=new WeakMap}}}const gr=new de,vr=new me,_r=new ge,yr=new Si,xr=[],br=[],Mr=new Float32Array(16),wr=new Float32Array(9),Sr=new Float32Array(4);function Tr(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=xr[r];if(void 0===s&&(s=new Float32Array(r),xr[r]=s),0!==e){i.toArray(s,0);for(let i=1,r=0;i!==e;++i)r+=n,t[i].toArray(s,r)}return s}function Er(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function Ar(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function Cr(t,e){let n=br[e];void 0===n&&(n=new Int32Array(e),br[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function Rr(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function Lr(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Er(n,e))return;t.uniform2fv(this.addr,e),Ar(n,e)}}function Pr(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(void 0!==e.r)n[0]===e.r&&n[1]===e.g&&n[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(Er(n,e))return;t.uniform3fv(this.addr,e),Ar(n,e)}}function Ir(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Er(n,e))return;t.uniform4fv(this.addr,e),Ar(n,e)}}function Dr(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Er(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Ar(n,e)}else{if(Er(n,i))return;Sr.set(i),t.uniformMatrix2fv(this.addr,!1,Sr),Ar(n,i)}}function Or(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Er(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Ar(n,e)}else{if(Er(n,i))return;wr.set(i),t.uniformMatrix3fv(this.addr,!1,wr),Ar(n,i)}}function Nr(t,e){const n=this.cache,i=e.elements;if(void 0===i){if(Er(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Ar(n,e)}else{if(Er(n,i))return;Mr.set(i),t.uniformMatrix4fv(this.addr,!1,Mr),Ar(n,i)}}function Ur(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function kr(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Er(n,e))return;t.uniform2iv(this.addr,e),Ar(n,e)}}function Fr(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Er(n,e))return;t.uniform3iv(this.addr,e),Ar(n,e)}}function zr(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Er(n,e))return;t.uniform4iv(this.addr,e),Ar(n,e)}}function Br(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function Hr(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Er(n,e))return;t.uniform2uiv(this.addr,e),Ar(n,e)}}function Vr(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Er(n,e))return;t.uniform3uiv(this.addr,e),Ar(n,e)}}function Gr(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Er(n,e))return;t.uniform4uiv(this.addr,e),Ar(n,e)}}function Wr(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2D(e||gr,r)}function jr(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||_r,r)}function Xr(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(e||yr,r)}function Yr(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||vr,r)}function qr(t,e){t.uniform1fv(this.addr,e)}function Zr(t,e){const n=Tr(e,this.size,2);t.uniform2fv(this.addr,n)}function Jr(t,e){const n=Tr(e,this.size,3);t.uniform3fv(this.addr,n)}function Kr(t,e){const n=Tr(e,this.size,4);t.uniform4fv(this.addr,n)}function $r(t,e){const n=Tr(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function Qr(t,e){const n=Tr(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function ts(t,e){const n=Tr(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function es(t,e){t.uniform1iv(this.addr,e)}function ns(t,e){t.uniform2iv(this.addr,e)}function is(t,e){t.uniform3iv(this.addr,e)}function rs(t,e){t.uniform4iv(this.addr,e)}function ss(t,e){t.uniform1uiv(this.addr,e)}function os(t,e){t.uniform2uiv(this.addr,e)}function as(t,e){t.uniform3uiv(this.addr,e)}function ls(t,e){t.uniform4uiv(this.addr,e)}function cs(t,e,n){const i=this.cache,r=e.length,s=Cr(n,r);Er(i,s)||(t.uniform1iv(this.addr,s),Ar(i,s));for(let t=0;t!==r;++t)n.setTexture2D(e[t]||gr,s[t])}function hs(t,e,n){const i=this.cache,r=e.length,s=Cr(n,r);Er(i,s)||(t.uniform1iv(this.addr,s),Ar(i,s));for(let t=0;t!==r;++t)n.setTexture3D(e[t]||_r,s[t])}function us(t,e,n){const i=this.cache,r=e.length,s=Cr(n,r);Er(i,s)||(t.uniform1iv(this.addr,s),Ar(i,s));for(let t=0;t!==r;++t)n.setTextureCube(e[t]||yr,s[t])}function ds(t,e,n){const i=this.cache,r=e.length,s=Cr(n,r);Er(i,s)||(t.uniform1iv(this.addr,s),Ar(i,s));for(let t=0;t!==r;++t)n.setTexture2DArray(e[t]||vr,s[t])}class ps{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.setValue=function(t){switch(t){case 5126:return Rr;case 35664:return Lr;case 35665:return Pr;case 35666:return Ir;case 35674:return Dr;case 35675:return Or;case 35676:return Nr;case 5124:case 35670:return Ur;case 35667:case 35671:return kr;case 35668:case 35672:return Fr;case 35669:case 35673:return zr;case 5125:return Br;case 36294:return Hr;case 36295:return Vr;case 36296:return Gr;case 35678:case 36198:case 36298:case 36306:case 35682:return Wr;case 35679:case 36299:case 36307:return jr;case 35680:case 36300:case 36308:case 36293:return Xr;case 36289:case 36303:case 36311:case 36292:return Yr}}(e.type)}}class fs{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.size=e.size,this.setValue=function(t){switch(t){case 5126:return qr;case 35664:return Zr;case 35665:return Jr;case 35666:return Kr;case 35674:return $r;case 35675:return Qr;case 35676:return ts;case 5124:case 35670:return es;case 35667:case 35671:return ns;case 35668:case 35672:return is;case 35669:case 35673:return rs;case 5125:return ss;case 36294:return os;case 36295:return as;case 36296:return ls;case 35678:case 36198:case 36298:case 36306:case 35682:return cs;case 35679:case 36299:case 36307:return hs;case 35680:case 36300:case 36308:case 36293:return us;case 36289:case 36303:case 36311:case 36292:return ds}}(e.type)}}class ms{constructor(t){this.id=t,this.seq=[],this.map={}}setValue(t,e,n){const i=this.seq;for(let r=0,s=i.length;r!==s;++r){const s=i[r];s.setValue(t,e[s.id],n)}}}const gs=/(\w+)(\])?(\[|\.)?/g;function vs(t,e){t.seq.push(e),t.map[e.id]=e}function _s(t,e,n){const i=t.name,r=i.length;for(gs.lastIndex=0;;){const s=gs.exec(i),o=gs.lastIndex;let a=s[1];const l="]"===s[2],c=s[3];if(l&&(a|=0),void 0===c||"["===c&&o+2===r){vs(n,void 0===c?new ps(a,t,e):new fs(a,t,e));break}{let t=n.map[a];void 0===t&&(t=new ms(a),vs(n,t)),n=t}}}class ys{constructor(t,e){this.seq=[],this.map={};const n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const n=t.getActiveUniform(e,i);_s(n,t.getUniformLocation(e,n.name),this)}}setValue(t,e,n,i){const r=this.map[e];void 0!==r&&r.setValue(t,n,i)}setOptional(t,e,n){const i=e[n];void 0!==i&&this.setValue(t,n,i)}static upload(t,e,n,i){for(let r=0,s=e.length;r!==s;++r){const s=e[r],o=n[s.id];!1!==o.needsUpdate&&s.setValue(t,o.value,i)}}static seqWithValue(t,e){const n=[];for(let i=0,r=t.length;i!==r;++i){const r=t[i];r.id in e&&n.push(r)}return n}}function xs(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}let bs=0;function Ms(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),r=t.getShaderInfoLog(e).trim();if(i&&""===r)return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const i=parseInt(s[1]);return n.toUpperCase()+"\n\n"+r+"\n\n"+function(t,e){const n=t.split("\n"),i=[],r=Math.max(e-6,0),s=Math.min(e+6,n.length);for(let t=r;t<s;t++){const r=t+1;i.push(`${r===e?">":" "} ${r}: ${n[t]}`)}return i.join("\n")}(t.getShaderSource(e),i)}return r}function ws(t,e){const n=function(t){switch(t){case xt:return["Linear","( value )"];case bt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",t),["Linear","( value )"]}}(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Ss(t,e){let n;switch(e){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Ts(t){return""!==t}function Es(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function As(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Cs=/^[ \t]*#include +<([\w\d./]+)>/gm;function Rs(t){return t.replace(Cs,Ls)}function Ls(t,e){const n=Ui[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return Rs(n)}const Ps=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Is(t){return t.replace(Ps,Ds)}function Ds(t,e,n,i){let r="";for(let t=parseInt(e);t<parseInt(n);t++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+t+" ]").replace(/UNROLLED_LOOP_INDEX/g,t);return r}function Os(t){let e="precision "+t.precision+" float;\nprecision "+t.precision+" int;";return"highp"===t.precision?e+="\n#define HIGH_PRECISION":"mediump"===t.precision?e+="\n#define MEDIUM_PRECISION":"lowp"===t.precision&&(e+="\n#define LOW_PRECISION"),e}function Ns(t,e,n,i){const r=t.getContext(),s=n.defines;let o=n.vertexShader,a=n.fragmentShader;const l=function(t){let e="SHADOWMAP_TYPE_BASIC";return 1===t.shadowMapType?e="SHADOWMAP_TYPE_PCF":2===t.shadowMapType?e="SHADOWMAP_TYPE_PCF_SOFT":3===t.shadowMapType&&(e="SHADOWMAP_TYPE_VSM"),e}(n),c=function(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case _:case y:e="ENVMAP_TYPE_CUBE";break;case M:e="ENVMAP_TYPE_CUBE_UV"}return e}(n),h=function(t){let e="ENVMAP_MODE_REFLECTION";t.envMap&&t.envMapMode===y&&(e="ENVMAP_MODE_REFRACTION");return e}(n),u=function(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case 0:e="ENVMAP_BLENDING_MULTIPLY";break;case 1:e="ENVMAP_BLENDING_MIX";break;case 2:e="ENVMAP_BLENDING_ADD"}return e}(n),d=function(t){const e=t.envMapCubeUVHeight;if(null===e)return null;const n=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}}(n),p=n.isWebGL2?"":function(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading||"physical"===t.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Ts).join("\n")}(n),f=function(t){const e=[];for(const n in t){const i=t[n];!1!==i&&e.push("#define "+n+" "+i)}return e.join("\n")}(s),m=r.createProgram();let g,v,x=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=[f].filter(Ts).join("\n"),g.length>0&&(g+="\n"),v=[p,f].filter(Ts).join("\n"),v.length>0&&(v+="\n")):(g=[Os(n),"#define SHADER_NAME "+n.shaderName,f,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",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.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IR
2IDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\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(Ts).join("\n"),v=[p,Os(n),"#define SHADER_NAME "+n.shaderName,f,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+h:"",n.envMap?"#define "+u:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",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.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IR
2IDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?Ui.tonemapping_pars_fragment:"",0!==n.toneMapping?Ss("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ui.encodings_pars_fragment,ws("linearToOutputTexel",n.outputEncoding),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Ts).join("\n")),o=Rs(o),o=Es(o,n),o=As(o,n),a=Rs(a),a=Es(a,n),a=As(a,n),o=Is(o),a=Is(a),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(x="#version 300 es\n",g=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in",n.glslVersion===Et?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Et?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+v);const b=x+g+o,w=x+v+a,S=xs(r,r.VERTEX_SHADER,b),T=xs(r,r.FRAGMENT_SHADER,w);if(r.attachShader(m,S),r.attachShader(m,T),void 0!==n.index0AttributeName?r.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),t.debug.checkShaderErrors){const t=r.getProgramInfoLog(m).trim(),e=r.getShaderInfoLog(S).trim(),n=r.getShaderInfoLog(T).trim();let i=!0,s=!0;if(!1===r.getProgramParameter(m,r.LINK_STATUS)){i=!1;const e=Ms(r,S,"vertex"),n=Ms(r,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,r.VALIDATE_STATUS)+"\n\nProgram Info Log: "+t+"\n"+e+"\n"+n)}else""!==t?console.warn("THREE.WebGLProgram: Program Info Log:",t):""!==e&&""!==n||(s=!1);s&&(this.diagnostics={runnable:i,programLog:t,vertexShader:{log:e,prefix:g},fragmentShader:{log:n,prefix:v}})}let E,A;return r.deleteShader(S),r.deleteShader(T),this.getUniforms=function(){return void 0===E&&(E=new ys(r,m)),E},this.getAttributes=function(){return void 0===A&&(A=function(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const i=t.getActiveAttrib(e,r),s=i.name;let o=1;i.type===t.FLOAT_MAT2&&(o=2),i.type===t.FLOAT_MAT3&&(o=3),i.type===t.FLOAT_MAT4&&(o=4),n[s]={type:i.type,location:t.getAttribLocation(e,s),locationSize:o}}return n}(r,m)),A},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=bs++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=S,this.fragmentShader=T,this}let Us=0;class ks{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const e=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(e),r=this._getShaderStage(n),s=this._getShaderCacheForMaterial(t);return!1===s.has(i)&&(s.add(i),i.usedTimes++),!1===s.has(r)&&(s.add(r),r.usedTimes++),this}remove(t){const e=this.materialCache.get(t);for(const t of e)t.usedTimes--,0===t.usedTimes&&this.shaderCache.delete(t.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const e=this.materialCache;let n=e.get(t);return void 0===n&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){const e=this.shaderCache;let n=e.get(t);return void 0===n&&(n=new Fs(t),e.set(t,n)),n}}class Fs{constructor(t){this.id=Us++,this.code=t,this.usedTimes=0}}function zs(t,e,n,i,r,s,o){const a=new on,l=new ks,c=[],h=r.isWebGL2,u=r.logarithmicDepthBuffer,d=r.vertexTextures;let p=r.precision;const f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(s,a,c,m,g){const v=m.fog,_=g.geometry,y=s.isMeshStandardMaterial?m.environment:null,x=(s.isMeshStandardMaterial?n:e).get(s.envMap||y),b=x&&x.mapping===M?x.image.height:null,w=f[s.type];null!==s.precision&&(p=r.getMaxPrecision(s.precision),p!==s.precision&&console.warn("THREE.WebGLProgram.getParameters:",
vendor: 4,982 bytes, line 2
2s.precision,"not supported, using",p,"instead."));const S=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,T=void 0!==S?S.length:0;let E,A,C,R,L=0;if(void 0!==_.morphAttributes.position&&(L=1),void 0!==_.morphAttributes.normal&&(L=2),void 0!==_.morphAttributes.color&&(L=3),w){const t=Fi[w];E=t.vertexShader,A=t.fragmentShader}else E=s.vertexShader,A=s.fragmentShader,l.update(s),C=l.getVertexShaderID(s),R=l.getFragmentShaderID(s);const P=t.getRenderTarget(),I=s.alphaTest>0,D=s.clearcoat>0,O=s.iridescence>0;return{isWebGL2:h,shaderID:w,shaderName:s.type,vertexShader:E,fragmentShader:A,defines:s.defines,customVertexShaderID:C,customFragmentShaderID:R,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:p,instancing:!0===g.isInstancedMesh,instancingColor:!0===g.isInstancedMesh&&null!==g.instanceColor,supportsVertexTextures:d,outputEncoding:null===P?t.outputEncoding:!0===P.isXRRenderTarget?P.texture.encoding:xt,map:!!s.map,matcap:!!s.matcap,envMap:!!x,envMapMode:x&&x.mapping,envMapCubeUVHeight:b,lightMap:!!s.lightMap,aoMap:!!s.aoMap,emissiveMap:!!s.emissiveMap,bumpMap:!!s.bumpMap,normalMap:!!s.normalMap,objectSpaceNormalMap:1===s.normalMapType,tangentSpaceNormalMap:0===s.normalMapType,decodeVideoTexture:!!s.map&&!0===s.map.isVideoTexture&&s.map.encoding===bt,clearcoat:D,clearcoatMap:D&&!!s.clearcoatMap,clearcoatRoughnessMap:D&&!!s.clearcoatRoughnessMap,clearcoatNormalMap:D&&!!s.clearcoatNormalMap,iridescence:O,iridescenceMap:O&&!!s.iridescenceMap,iridescenceThicknessMap:O&&!!s.iridescenceThicknessMap,displacementMap:!!s.displacementMap,roughnessMap:!!s.roughnessMap,metalnessMap:!!s.metalnessMap,specularMap:!!s.specularMap,specularIntensityMap:!!s.specularIntensityMap,specularColorMap:!!s.specularColorMap,opaque:!1===s.transparent&&1===s.blending,alphaMap:!!s.alphaMap,alphaTest:I,gradientMap:!!s.gradientMap,sheen:s.sheen>0,sheenColorMap:!!s.sheenColorMap,sheenRoughnessMap:!!s.sheenRoughnessMap,transmission:s.transmission>0,transmissionMap:!!s.transmissionMap,thicknessMap:!!s.thicknessMap,combine:s.combine,vertexTangents:!!s.normalMap&&!!_.attributes.tangent,vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!_.attributes.color&&4===_.attributes.color.itemSize,vertexUvs:!!(s.map||s.bumpMap||s.normalMap||s.specularMap||s.alphaMap||s.emissiveMap||s.roughnessMap||s.metalnessMap||s.clearcoatMap||s.clearcoatRoughnessMap||s.clearcoatNormalMap||s.iridescenceMap||s.iridescenceThicknessMap||s.displacementMap||s.transmissionMap||s.thicknessMap||s.specularIntensityMap||s.specularColorMap||s.sheenColorMap||s.sheenRoughnessMap),uvsVertexOnly:!(s.map||s.bumpMap||s.normalMap||s.specularMap||s.alphaMap||s.emissiveMap||s.roughnessMap||s.metalnessMap||s.clearcoatNormalMap||s.iridescenceMap||s.iridescenceThicknessMap||s.transmission>0||s.transmissionMap||s.thicknessMap||s.specularIntensityMap||s.specularColorMap||s.sheen>0||s.sheenColorMap||s.sheenRoughnessMap||!s.displacementMap),fog:!!v,useFog:!0===s.fog,fogExp2:v&&v.isFogExp2,flatShading:!!s.flatShading,sizeAttenuation:s.sizeAttenuation,logarithmicDepthBuffer:u,skinning:!0===g.isSkinnedMesh,morphTargets:void 0!==_.morphAttributes.position,morphNormals:void 0!==_.morphAttributes.normal,morphColors:void 0!==_.morphAttributes.color,morphTargetsCount:T,morphTextureStride:L,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numSpotLightMaps:a.spotLightMap.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numSpotLightShadowsWithMaps:a.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:s.dithering,shadowMapEnabled:t.shadowMap.enabled&&c.length>0,shadowMapType:t.shadowMap.type,toneMapping:s.toneMapped?t.toneMapping:0,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:s.premultipliedAlpha,doubleSided:2===s.side,flipSided:1===s.side,useDepthPacking:!!s.depthPacking,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:s.extensions&&s.extensions.derivatives,extensionFragDepth:s.extensions&&s.extensions.fragDepth,extensionDrawBuffers:s.extensions&&s.extensions.drawBuffers,extensionShaderTextureLOD:s.extensions&&s.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||i.has("EXT_shader_texture_lod"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.customVertexShaderID),n.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(!function(t,e){t.push(e.precision),t.push(e.outputEncoding),t.push(e.envMapMode),t.pu
vendor: 5,176 bytes, line 2
2sh(e.envMapCubeUVHeight),t.push(e.combine),t.push(e.vertexUvs),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(n,e),function(t,e){a.disableAll(),e.isWebGL2&&a.enable(0);e.supportsVertexTextures&&a.enable(1);e.instancing&&a.enable(2);e.instancingColor&&a.enable(3);e.map&&a.enable(4);e.matcap&&a.enable(5);e.envMap&&a.enable(6);e.lightMap&&a.enable(7);e.aoMap&&a.enable(8);e.emissiveMap&&a.enable(9);e.bumpMap&&a.enable(10);e.normalMap&&a.enable(11);e.objectSpaceNormalMap&&a.enable(12);e.tangentSpaceNormalMap&&a.enable(13);e.clearcoat&&a.enable(14);e.clearcoatMap&&a.enable(15);e.clearcoatRoughnessMap&&a.enable(16);e.clearcoatNormalMap&&a.enable(17);e.iridescence&&a.enable(18);e.iridescenceMap&&a.enable(19);e.iridescenceThicknessMap&&a.enable(20);e.displacementMap&&a.enable(21);e.specularMap&&a.enable(22);e.roughnessMap&&a.enable(23);e.metalnessMap&&a.enable(24);e.gradientMap&&a.enable(25);e.alphaMap&&a.enable(26);e.alphaTest&&a.enable(27);e.vertexColors&&a.enable(28);e.vertexAlphas&&a.enable(29);e.vertexUvs&&a.enable(30);e.vertexTangents&&a.enable(31);e.uvsVertexOnly&&a.enable(32);t.push(a.mask),a.disableAll(),e.fog&&a.enable(0);e.useFog&&a.enable(1);e.flatShading&&a.enable(2);e.logarithmicDepthBuffer&&a.enable(3);e.skinning&&a.enable(4);e.morphTargets&&a.enable(5);e.morphNormals&&a.enable(6);e.morphColors&&a.enable(7);e.premultipliedAlpha&&a.enable(8);e.shadowMapEnabled&&a.enable(9);e.physicallyCorrectLights&&a.enable(10);e.doubleSided&&a.enable(11);e.flipSided&&a.enable(12);e.useDepthPacking&&a.enable(13);e.dithering&&a.enable(14);e.specularIntensityMap&&a.enable(15);e.specularColorMap&&a.enable(16);e.transmission&&a.enable(17);e.transmissionMap&&a.enable(18);e.thicknessMap&&a.enable(19);e.sheen&&a.enable(20);e.sheenColorMap&&a.enable(21);e.sheenRoughnessMap&&a.enable(22);e.decodeVideoTexture&&a.enable(23);e.opaque&&a.enable(24);t.push(a.mask)}(n,e),n.push(t.outputEncoding)),n.push(e.customProgramCacheKey),n.join()},getUniforms:function(t){const e=f[t.type];let n;if(e){const t=Fi[e];n=_i.clone(t.uniforms)}else n=t.uniforms;return n},acquireProgram:function(e,n){let i;for(let t=0,e=c.length;t<e;t++){const e=c[t];if(e.cacheKey===n){i=e,++i.usedTimes;break}}return void 0===i&&(i=new Ns(t,n,e,s),c.push(i)),i},releaseProgram:function(t){if(0===--t.usedTimes){const e=c.indexOf(t);c[e]=c[c.length-1],c.pop(),t.destroy()}},releaseShaderCache:function(t){l.remove(t)},programs:c,dispose:function(){l.dispose()}}}function Bs(){let t=new WeakMap;return{get:function(e){let n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,i){t.get(e)[n]=i},dispose:function(){t=new WeakMap}}}function Hs(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function Vs(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function Gs(){const t=[];let e=0;const n=[],i=[],r=[];function s(n,i,r,s,o,a){let l=t[e];return void 0===l?(l={id:n.id,object:n,geometry:i,material:r,groupOrder:s,renderOrder:n.renderOrder,z:o,group:a},t[e]=l):(l.id=n.id,l.object=n,l.geometry=i,l.material=r,l.groupOrder=s,l.renderOrder=n.renderOrder,l.z=o,l.group=a),e++,l}return{opaque:n,transmissive:i,transparent:r,init:function(){e=0,n.length=0,i.length=0,r.length=0},push:function(t,e,o,a,l,c){const h=s(t,e,o,a,l,c);o.transmission>0?i.push(h):!0===o.transparent?r.push(h):n.push(h)},unshift:function(t,e,o,a,l,c){const h=s(t,e,o,a,l,c);o.transmission>0?i.unshift(h):!0===o.transparent?r.unshift(h):n.unshift(h)},finish:function(){for(let n=e,i=t.length;n<i;n++){const e=t[n];if(null===e.id)break;e.id=null,e.object=null,e.geometry=null,e.material=null,e.group=null}},sort:function(t,e){n.length>1&&n.sort(t||Hs),i.length>1&&i.sort(e||Vs),r.length>1&&r.sort(e||Vs)}}}function Ws(){let t=new WeakMap;return{get:function(e,n){const i=t.get(e);let r;return void 0===i?(r=new Gs,t.set(e,[r])):n>=i.length?(r=new Gs,i.push(r)):r=i[n],r},dispose:function(){t=new WeakMap}}}function js(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new _e,color:new oe};break;case"SpotLight":n={position:new _e,direction:new _e,color:new oe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new _e,color:new oe,distance:0,decay:0};break;case"HemisphereLight":n={direction:new _e,skyColor:new oe,groundColor:new oe};break;case"RectAreaLight":n={color:new oe,position:new _e,halfWidth:new _e,halfHeight:new _e}}return t[e.id]=n,n}}}
vendor: 11,874 bytes, line 2
2let Xs=0;function Ys(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function qs(t,e){const n=new js,i=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Gt};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Gt,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let t=0;t<9;t++)r.probe.push(new _e);const s=new _e,o=new qe,a=new qe;return{setup:function(s,o){let a=0,l=0,c=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let h=0,u=0,d=0,p=0,f=0,m=0,g=0,v=0,_=0,y=0;s.sort(Ys);const x=!0!==o?Math.PI:1;for(let t=0,e=s.length;t<e;t++){const e=s[t],o=e.color,b=e.intensity,M=e.distance,w=e.shadow&&e.shadow.map?e.shadow.map.texture:null;if(e.isAmbientLight)a+=o.r*b*x,l+=o.g*b*x,c+=o.b*b*x;else if(e.isLightProbe)for(let t=0;t<9;t++)r.probe[t].addScaledVector(e.sh.coefficients[t],b);else if(e.isDirectionalLight){const t=n.get(e);if(t.color.copy(e.color).multiplyScalar(e.intensity*x),e.castShadow){const t=e.shadow,n=i.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,r.directionalShadow[h]=n,r.directionalShadowMap[h]=w,r.directionalShadowMatrix[h]=e.shadow.matrix,m++}r.directional[h]=t,h++}else if(e.isSpotLight){const t=n.get(e);t.position.setFromMatrixPosition(e.matrixWorld),t.color.copy(o).multiplyScalar(b*x),t.distance=M,t.coneCos=Math.cos(e.angle),t.penumbraCos=Math.cos(e.angle*(1-e.penumbra)),t.decay=e.decay,r.spot[d]=t;const s=e.shadow;if(e.map&&(r.spotLightMap[_]=e.map,_++,s.updateMatrices(e),e.castShadow&&y++),r.spotLightMatrix[d]=s.matrix,e.castShadow){const t=i.get(e);t.shadowBias=s.bias,t.shadowNormalBias=s.normalBias,t.shadowRadius=s.radius,t.shadowMapSize=s.mapSize,r.spotShadow[d]=t,r.spotShadowMap[d]=w,v++}d++}else if(e.isRectAreaLight){const t=n.get(e);t.color.copy(o).multiplyScalar(b),t.halfWidth.set(.5*e.width,0,0),t.halfHeight.set(0,.5*e.height,0),r.rectArea[p]=t,p++}else if(e.isPointLight){const t=n.get(e);if(t.color.copy(e.color).multiplyScalar(e.intensity*x),t.distance=e.distance,t.decay=e.decay,e.castShadow){const t=e.shadow,n=i.get(e);n.shadowBias=t.bias,n.shadowNormalBias=t.normalBias,n.shadowRadius=t.radius,n.shadowMapSize=t.mapSize,n.shadowCameraNear=t.camera.near,n.shadowCameraFar=t.camera.far,r.pointShadow[u]=n,r.pointShadowMap[u]=w,r.pointShadowMatrix[u]=e.shadow.matrix,g++}r.point[u]=t,u++}else if(e.isHemisphereLight){const t=n.get(e);t.skyColor.copy(e.color).multiplyScalar(b*x),t.groundColor.copy(e.groundColor).multiplyScalar(b*x),r.hemi[f]=t,f++}}p>0&&(e.isWebGL2||!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=ki.LTC_FLOAT_1,r.rectAreaLTC2=ki.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=ki.LTC_HALF_1,r.rectAreaLTC2=ki.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=a,r.ambient[1]=l,r.ambient[2]=c;const b=r.hash;b.directionalLength===h&&b.pointLength===u&&b.spotLength===d&&b.rectAreaLength===p&&b.hemiLength===f&&b.numDirectionalShadows===m&&b.numPointShadows===g&&b.numSpotShadows===v&&b.numSpotMaps===_||(r.directional.length=h,r.spot.length=d,r.rectArea.length=p,r.point.length=u,r.hemi.length=f,r.directionalShadow.length=m,r.directionalShadowMap.length=m,r.pointShadow.length=g,r.pointShadowMap.length=g,r.spotShadow.length=v,r.spotShadowMap.length=v,r.directionalShadowMatrix.length=m,r.pointShadowMatrix.length=g,r.spotLightMatrix.length=v+_-y,r.spotLightMap.length=_,r.numSpotLightShadowsWithMaps=y,b.directionalLength=h,b.pointLength=u,b.spotLength=d,b.rectAreaLength=p,b.hemiLength=f,b.numDirectionalShadows=m,b.numPointShadows=g,b.numSpotShadows=v,b.numSpotMaps=_,r.version=Xs++)},setupView:function(t,e){let n=0,i=0,l=0,c=0,h=0;const u=e.matrixWorldInverse;for(let e=0,d=t.length;e<d;e++){const d=t[e];if(d.isDirectionalLight){const t=r.directional[n];t.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),t.direction.sub(s),t.direction.transformDirection(u),n++}else if(d.isSpotLight){const t=r.spot[l];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),t.direction.setFromMatrixPosition(d.matrixWorld),s.setFromMatrixPosition(d.target.matrixWorld),t.direction.sub(s),t.direction.transformDirection(u),l++}else if(d.isRectAreaLight){const t=r.rectArea[c];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),a.identity(),o.copy(d.matrixWorld),o.premultiply(u),a.extractRotation(o),t.halfWidth.set(.5*d.width,0,0),t.halfHeight.set(0,.5*d.height,0),t.halfWidth.applyMatrix4(a),t.halfHeight.applyMatrix4(a),c++}else if(d.isPointLight){const t=r.point[i];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(u),i++}else if(d.isHemisphereLight){const t=r.hemi[h];t.direction.setFromMatrixPosition(d.matrixWorld),t.direction.transformDirection(u),h++}}},state:r}}function Zs(t,e){const n=new qs(t,e),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:function(t){n.setup(i,t)},setupLightsView:function(t){n.setupView(i,t)},pushLight:function(t){i.push(t)},pushShadow:function(t){r.push(t)}}}function Js(t,e){let n=new WeakMap;return{get:function(i,r=0){const s=n.get(i);let o;return void 0===s?(o=new Zs(t,e),n.set(i,[o])):r>=s.length?(o=new Zs(t,e),s.push(o)):o=s[r],o},dispose:function(){n=new WeakMap}}}class Ks extends Dn{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class $s extends Dn{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new _e,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function Qs(t,e,n){let i=new Ii;const r=new Gt,s=new Gt,o=new pe,a=new Ks({depthPacking:3201}),l=new $s,c={},h=n.maxTextureSize,u={0:1,1:0,2:2},d=new yi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Gt},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),p=d.clone();p.defines.HORIZONTAL_PASS=1;const f=new qn;f.setAttribute("position",new kn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new di(f,d),g=this;function v(n,i){const s=e.update(m);d.defines.VSM_SAMPLES!==n.blurSamples&&(d.defines.VSM_SAMPLES=n.blurSamples,p.defines.VSM_SAMPLES=n.blurSamples,d.needsUpdate=!0,p.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new fe(r.x,r.y)),d.uniforms.shadow_pass.value=n.map.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(i,null,s,d,m,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(i,null,s,p,m,null)}function _(e,n,i,r,s,o){let h=null;const d=!0===i.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(h=void 0!==d?d:!0===i.isPointLight?l:a,t.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const t=h.uuid,e=n.uuid;let i=c[t];void 0===i&&(i={},c[t]=i);let r=i[e];void 0===r&&(r=h.clone(),i[e]=r),h=r}return h.visible=n.visible,h.wireframe=n.wireframe,h.side=3===o?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:u[n.side],h.alphaMap=n.alphaMap,h.alphaTest=n.alphaTest,h.map=n.map,h.clipShadows=n.clipShadows,h.clippingPlanes=n.clippingPlanes,h.clipIntersection=n.clipIntersection,h.displacementMap=n.displacementMap,h.displacementScale=n.displacementScale,h.displacementBias=n.displacementBias,h.wireframeLinewidth=n.wireframeLinewidth,h.linewidth=n.linewidth,!0===i.isPointLight&&!0===h.isMeshDistanceMaterial&&(h.referencePosition.setFromMatrixPosition(i.matrixWorld),h.nearDistance=r,h.farDistance=s),h}function y(n,r,s,o,a){if(!1===n.visible)return;if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===a)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,n.matrixWorld);const i=e.update(n),r=n.material;if(Array.isArray(r)){const e=i.groups;for(let l=0,c=e.length;l<c;l++){const c=e[l],h=r[c.materialIndex];if(h&&h.visible){const e=_(n,h,o,s.near,s.far,a);t.renderBufferDirect(s,null,i,e,n,c)}}}else if(r.visible){const e=_(n,r,o,s.near,s.far,a);t.renderBufferDirect(s,null,i,e,n,null)}}const l=n.children;for(let t=0,e=l.length;t<e;t++)y(l[t],r,s,o,a)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(e,n,a){if(!1===g.enabled)return;if(!1===g.autoUpdate&&!1===g.needsUpdate)return;if(0===e.length)return;const l=t.getRenderTarget(),c=t.getActiveCubeFace(),u=t.getActiveMipmapLevel(),d=t.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(let l=0,c=e.length;l<c;l++){const c=e[l],u=c.shadow;if(void 0===u){console.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===u.autoUpdate&&!1===u.needsUpdate)continue;r.copy(u.mapSize);const p=u.getFrameExtents();
vendor: 5,828 bytes, line 2
2if(r.multiply(p),s.copy(u.mapSize),(r.x>h||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/p.x),r.x=s.x*p.x,u.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/p.y),r.y=s.y*p.y,u.mapSize.y=s.y)),null===u.map){const t=3!==this.type?{minFilter:E,magFilter:E}:{};u.map=new fe(r.x,r.y,t),u.map.texture.name=c.name+".shadowMap",u.camera.updateProjectionMatrix()}t.setRenderTarget(u.map),t.clear();const f=u.getViewportCount();for(let t=0;t<f;t++){const e=u.getViewport(t);o.set(s.x*e.x,s.y*e.y,s.x*e.z,s.y*e.w),d.viewport(o),u.updateMatrices(c,t),i=u.getFrustum(),y(n,a,u.camera,c,this.type)}!0!==u.isPointLightShadow&&3===this.type&&v(u,a),u.needsUpdate=!1}g.needsUpdate=!1,t.setRenderTarget(l,c,u)}}function to(t,e,n){const v=n.isWebGL2;const _=new function(){let e=!1;const n=new pe;let i=null;const r=new pe(0,0,0,0);return{setMask:function(n){i===n||e||(t.colorMask(n,n,n,n),i=n)},setLocked:function(t){e=t},setClear:function(e,i,s,o,a){!0===a&&(e*=o,i*=o,s*=o),n.set(e,i,s,o),!1===r.equals(n)&&(t.clearColor(e,i,s,o),r.copy(n))},reset:function(){e=!1,i=null,r.set(-1,0,0,0)}}},y=new function(){let e=!1,n=null,i=null,r=null;return{setTest:function(e){e?tt(t.DEPTH_TEST):et(t.DEPTH_TEST)},setMask:function(i){n===i||e||(t.depthMask(i),n=i)},setFunc:function(e){if(i!==e){switch(e){case 0:t.depthFunc(t.NEVER);break;case 1:t.depthFunc(t.ALWAYS);break;case 2:t.depthFunc(t.LESS);break;case 3:default:t.depthFunc(t.LEQUAL);break;case 4:t.depthFunc(t.EQUAL);break;case 5:t.depthFunc(t.GEQUAL);break;case 6:t.depthFunc(t.GREATER);break;case 7:t.depthFunc(t.NOTEQUAL)}i=e}},setLocked:function(t){e=t},setClear:function(e){r!==e&&(t.clearDepth(e),r=e)},reset:function(){e=!1,n=null,i=null,r=null}}},x=new function(){let e=!1,n=null,i=null,r=null,s=null,o=null,a=null,l=null,c=null;return{setTest:function(n){e||(n?tt(t.STENCIL_TEST):et(t.STENCIL_TEST))},setMask:function(i){n===i||e||(t.stencilMask(i),n=i)},setFunc:function(e,n,o){i===e&&r===n&&s===o||(t.stencilFunc(e,n,o),i=e,r=n,s=o)},setOp:function(e,n,i){o===e&&a===n&&l===i||(t.stencilOp(e,n,i),o=e,a=n,l=i)},setLocked:function(t){e=t},setClear:function(e){c!==e&&(t.clearStencil(e),c=e)},reset:function(){e=!1,n=null,i=null,r=null,s=null,o=null,a=null,l=null,c=null}}},b=new WeakMap,M=new WeakMap;let w={},S={},T=new WeakMap,E=[],A=null,C=!1,R=null,L=null,P=null,I=null,D=null,O=null,N=null,U=!1,k=null,F=null,z=null,B=null,H=null;const V=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let G=!1,W=0;const j=t.getParameter(t.VERSION);-1!==j.indexOf("WebGL")?(W=parseFloat(/^WebGL (\d)/.exec(j)[1]),G=W>=1):-1!==j.indexOf("OpenGL ES")&&(W=parseFloat(/^OpenGL ES (\d)/.exec(j)[1]),G=W>=2);let X=null,Y={};const q=t.getParameter(t.SCISSOR_BOX),Z=t.getParameter(t.VIEWPORT),J=(new pe).fromArray(q),K=(new pe).fromArray(Z);function $(e,n,i){const r=new Uint8Array(4),s=t.createTexture();t.bindTexture(e,s),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let e=0;e<i;e++)t.texImage2D(n+e,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,r);return s}const Q={};function tt(e){!0!==w[e]&&(t.enable(e),w[e]=!0)}function et(e){!1!==w[e]&&(t.disable(e),w[e]=!1)}Q[t.TEXTURE_2D]=$(t.TEXTURE_2D,t.TEXTURE_2D,1),Q[t.TEXTURE_CUBE_MAP]=$(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),_.setClear(0,0,0,1),y.setClear(1),x.setClear(0),tt(t.DEPTH_TEST),y.setFunc(3),st(!1),ot(1),tt(t.CULL_FACE),rt(0);const nt={[i]:t.FUNC_ADD,[r]:t.FUNC_SUBTRACT,[s]:t.FUNC_REVERSE_SUBTRACT};if(v)nt[103]=t.MIN,nt[104]=t.MAX;else{const t=e.get("EXT_blend_minmax");null!==t&&(nt[103]=t.MIN_EXT,nt[104]=t.MAX_EXT)}const it={[o]:t.ZERO,[a]:t.ONE,[l]:t.SRC_COLOR,[h]:t.SRC_ALPHA,[g]:t.SRC_ALPHA_SATURATE,[f]:t.DST_COLOR,[d]:t.DST_ALPHA,[c]:t.ONE_MINUS_SRC_COLOR,[u]:t.ONE_MINUS_SRC_ALPHA,[m]:t.ONE_MINUS_DST_COLOR,[p]:t.ONE_MINUS_DST_ALPHA};function rt(e,n,r,s,o,a,l,c){if(0!==e){if(!1===C&&(tt(t.BLEND),C=!0),5===e)o=o||n,a=a||r,l=l||s,n===L&&o===D||(t.blendEquationSeparate(nt[n],nt[o]),L=n,D=o),r===P&&s===I&&a===O&&l===N||(t.blendFuncSeparate(it[r],it[s],it[a],it[l]),P=r,I=s,O=a,N=l),R=e,U=!1;else if(e!==R||c!==U){if(L===i&&D===i||(t.blendEquation(t.FUNC_ADD),L=i,D=i),c)switch(e){case 1:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case 2:t.blendFunc(t.ONE,t.ONE);break;case 3:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case 4:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}else switch(e){case 1:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case 2:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case 3:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case 4:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}P=null,I=null,O=null,N=null,R=e,U=c}}else!0===C&&(et(t.BLEND),C=!1)}function st(e){k!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),k=e)}function ot(e){0!==e?(tt(t.CULL_FACE),e!==F&&(1===e?t.cullFace(t.BACK):2===e?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):et(t.CULL_FACE),F=e}function at(e,n,i){e?(tt(t.POLYGON_OFFSET_FILL),B===n&&H===i||(t.polygonOffset(n,i),B=n,H=i)):et(t.POLYGON_OFFSET_FILL)}return{buffers:{color:_,depth:y,stencil:x},enable:tt,disable:et,bindFramebuffer:function(e,n){return S[e]!==n&&(t.bindFramebuffer(e,n),S[e]=n,v&&(e===t.DRAW_FRAMEBUFFER&&(S[t.FRAMEBUFFER]=n),e===t.FRAMEBUFFER&&(S[t.DRAW_FRAMEBUFFER]=n)),!0)},drawBuffers:function(i,r){let s=E,o=!1;if(i)if(s=T.get(r),void 0===s&&(s=[],T.set(r,s)),i.isWebGLMultipleRenderTargets){const e=i.texture;if(s.length!==e.length||s[0]!==t.COLOR_ATTACHMENT0){for(let n=0,i=e.length;n<i;n++)s[n]=t.COLOR_ATTACHMENT0+n;s.length=e.length,o=!0}}else s[0]!==t.COLOR_ATTACHMENT0&&(s[0]=t.COLOR_ATTACHMENT0,o=!0);else s[0]!==t.BACK&&(s[0]=t.BACK,o=!0);
2o&&(n.isWebGL2?t.drawBuffers(s):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(s))},useProgram:function(e){return A!==e&&(t.useProgram(e),A=e,!0)},setBlending:rt,setMaterial:function(e,n){2===e.side?et(t.CULL_FACE):tt(t.CULL_FACE);let i=1===e.side;n&&(i=!i),st(i),1===e.blending&&!1===e.transparent?rt(0):rt(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),y.setFunc(e.depthFunc),y.setTest(e.depthTest),y.setMask(e.depthWrite),_.setMask(e.colorWrite);const r=e.stencilWrite;x.setTest(r),r&&(x.setMask(e.stencilWriteMask),x.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),x.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),at(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?tt(t.SAMPLE_ALPHA_TO_COVERAGE):et(t.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:st,setCullFace:ot,setLineWidth:function(e){e!==z&&(G&&t.lineWidth(e),z=e)},setPolygonOffset:at,setScissorTest:function(e){e?tt(t.SCISSOR_TEST):et(t.SCISSOR_TEST)},activeTexture:function(e){void 0===e&&(e=t.TEXTURE0+V-1),X!==e&&(t.activeTexture(e),X=e)},bindTexture:function(e,n,i){void 0===i&&(i=null===X?t.TEXTURE0+V-1:X);let r=Y[i];void 0===r&&(r={type:void 0,texture:void 0},Y[i]=r),r.type===e&&r.texture===n||(X!==i&&(t.activeTexture(i),X=i),t.bindTexture(e,n||Q[e]),r.type=e,r.texture=n)},unbindTexture:function(){const e=Y[X];void 0!==e&&void 0!==e.type&&(t.bindTexture(e.type,null),e.type=void 0,e.texture=void 0)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexImage3D:function(){try{t.compressedTexImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},updateUBOMapping:function(e,n){let i=M.get(n);void 0===i&&(i=new WeakMap,M.set(n,i));let r=i.get(e);void 0===r&&(r=t.getUniformBlockIndex(n,e.name),i.set(e,r))},uniformBlockBinding:function(e,n){const i=M.get(n).get(e);b.get(e)!==i&&(t.uniformBlockBinding(n,i,e.__bindingPointIndex),b.set(e,i))},texStorage2D:function(){try{t.texStorage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texStorage3D:function(){try{t.texStorage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texSubImage2D:function(){try{t.texSubImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texSubImage3D:function(){try{t.texSubImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexSubImage2D:function(){try{t.compressedTexSubImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexSubImage3D:function(){try{t.compressedTexSubImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===J.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),J.copy(e))},viewport:function(e){!1===K.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),K.copy(e))},reset:function(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),!0===v&&(t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null)),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),w={},X=null,Y={},S={},T=new WeakMap,E=[],A=null,C=!1,R=null,L=null,P=null,I=null,D=null,O=null,N=null,U=!1,k=null,F=null,z=null,B=null,H=null,J.set(0,0,t.canvas.width,t.canvas.height),K.set(0,0,t.canvas.width,t.canvas.height),_.reset(),y.reset(),x.reset()}}}function eo(t,e,n,i,r,s,o){const a=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,h=r.maxTextureSize,u=r.maxSamples,d=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,p="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),f=new WeakMap;let m;const g=new WeakMap;let v=!1;try{v="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(t){}function _(t,e){return v?new OffscreenCanvas(t,e):Zt("canvas")}function y(t,e,n,i){let r=1;if((t.width>i||t.height>i)&&(r=i/Math.max(t.width,t.height)),r<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const i=e?zt:Math.floor,s=i(r*t.width),o=i(r*t.height);void 0===m&&(m=_(s,o));const a=n?_(s,o):m;a.width=s,a.height=o;return a.getContext("2d").drawImage(t,0,0,s,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+s+"x"+o+")."),a}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function x(t){return kt(t.width)&&kt(t.height)}function b(t,e){return t.generateMipmaps&&e&&t.minFilter!==E&&t.minFilter!==R}function M(e){t.generateMipmap(e)}function H(n,i,r,s,o=!1){if(!1===a)return i;if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=i;return i===t.RED&&(r===t.FLOAT&&(l=t.R32F),r===t.HALF_FLOAT&&(l=t.R16F),r===t.UNSIGNED_BYTE&&(l=t.R8)),i===t.RG&&(r===t.FLOAT&&(l=t.RG32F),r===t.HALF_FLOAT&&(l=t.RG16F),r===t.UNSIGNED_BYTE&&(l=t.RG8)),i===t.RGBA&&(r===t.FLOAT&&(l=t.RGBA32F),r===t.HALF_FLOAT&&(l=t.RGBA16F),r===t.UNSIGNED_BYTE&&(l=s===bt&&!1===o?t.SRGB8_ALPHA8:t.RGBA8),r===t.UNSIGNED_SHORT_4_4_4_4&&(l=t.RGBA4),r===t.UNSIGNED_SHORT_5_5_5_1&&(l=t.RGB5_A1)),l!==t.R16F&&l!==t.R32F&&l!==t.RG16F&&l!==t.RG32F&&l!==t.RGBA16F&&l!==t.RGBA32F||e.get("EXT_color_buffer_float"),l}function V(t,e,n){return!0===b(t,n)||t.isFramebufferTexture&&t.minFilter!==E&&t.minFilter!==R?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function G(e){return e===E||e===A||e===C?t.NEAREST:t.LINEAR}function W(t){const e=t.target;e.removeEventListener("dispose",W),function(t){const e=i.get(t);if(void 0===e.__webglInit)return;const n=t.source,r=g.get(n);if(r){const i=r[e.__cacheKey];i.usedTimes--,0===i.usedTimes&&X(t),0===Object.keys(r).length&&g.delete(n)}i.remove(t)}(e),e.isVideoTexture&&f.delete(e)}function j(e){const n=e.target;n.removeEventListener("dispose",j),function(e){const n=e.texture,r=i.get(e),s=i.get(n);void 0!==s.__webglTexture&&(t.deleteTexture(s.__webglTexture),o.memory.textures--);e.depthTexture&&e.depthTexture.dispose();
2if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++)t.deleteFramebuffer(r.__webglFramebuffer[e]),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer[e]);else{if(t.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&t.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer)for(let e=0;e<r.__webglColorRenderbuffer.length;e++)r.__webglColorRenderbuffer[e]&&t.deleteRenderbuffer(r.__webglColorRenderbuffer[e]);r.__webglDepthRenderbuffer&&t.deleteRenderbuffer(r.__webglDepthRenderbuffer)}if(e.isWebGLMultipleRenderTargets)for(let e=0,r=n.length;e<r;e++){const r=i.get(n[e]);r.__webglTexture&&(t.deleteTexture(r.__webglTexture),o.memory.textures--),i.remove(n[e])}i.remove(n),i.remove(e)}(n)}function X(e){const n=i.get(e);t.deleteTexture(n.__webglTexture);const r=e.source;delete g.get(r)[n.__cacheKey],o.memory.textures--}let Y=0;function q(e,r){const s=i.get(e);if(e.isVideoTexture&&function(t){const e=o.render.frame;f.get(t)!==e&&(f.set(t,e),t.update())}(e),!1===e.isRenderTargetTexture&&e.version>0&&s.__version!==e.version){const t=e.image;if(null===t)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void Q(s,e,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(t.TEXTURE_2D,s.__webglTexture,t.TEXTURE0+r)}const Z={[w]:t.REPEAT,[S]:t.CLAMP_TO_EDGE,[T]:t.MIRRORED_REPEAT},J={[E]:t.NEAREST,[A]:t.NEAREST_MIPMAP_NEAREST,[C]:t.NEAREST_MIPMAP_LINEAR,[R]:t.LINEAR,[L]:t.LINEAR_MIPMAP_NEAREST,[P]:t.LINEAR_MIPMAP_LINEAR};function K(n,s,o){if(o?(t.texParameteri(n,t.TEXTURE_WRAP_S,Z[s.wrapS]),t.texParameteri(n,t.TEXTURE_WRAP_T,Z[s.wrapT]),n!==t.TEXTURE_3D&&n!==t.TEXTURE_2D_ARRAY||t.texParameteri(n,t.TEXTURE_WRAP_R,Z[s.wrapR]),t.texParameteri(n,t.TEXTURE_MAG_FILTER,J[s.magFilter]),t.texParameteri(n,t.TEXTURE_MIN_FILTER,J[s.minFilter])):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),n!==t.TEXTURE_3D&&n!==t.TEXTURE_2D_ARRAY||t.texParameteri(n,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),s.wrapS===S&&s.wrapT===S||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(n,t.TEXTURE_MAG_FILTER,G(s.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,G(s.minFilter)),s.minFilter!==E&&s.minFilter!==R&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===e.has("EXT_texture_filter_anisotropic")){const o=e.get("EXT_texture_filter_anisotropic");if(s.type===N&&!1===e.has("OES_texture_float_linear"))return;if(!1===a&&s.type===U&&!1===e.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||i.get(s).__currentAnisotropy)&&(t.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),i.get(s).__currentAnisotropy=s.anisotropy)}}function $(e,n){let i=!1;void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",W));const r=n.source;let s=g.get(r);void 0===s&&(s={},g.set(r,s));const a=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.encoding),e.join()}(n);if(a!==e.__cacheKey){void 0===s[a]&&(s[a]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,i=!0),s[a].usedTimes++;const r=s[e.__cacheKey];void 0!==r&&(s[e.__cacheKey].usedTimes--,0===r.usedTimes&&X(n)),e.__cacheKey=a,e.__webglTexture=s[a].texture}return i}function Q(e,r,o){let l=t.TEXTURE_2D;(r.isDataArrayTexture||r.isCompressedArrayTexture)&&(l=t.TEXTURE_2D_ARRAY),r.isData3DTexture&&(l=t.TEXTURE_3D);const c=$(e,r),u=r.source;n.bindTexture(l,e.__webglTexture,t.TEXTURE0+o);const d=i.get(u);if(u.version!==d.__version||!0===c){n.activeTexture(t.TEXTURE0+o),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE);const e=function(t){return!a&&(t.wrapS!==S||t.wrapT!==S||t.minFilter!==E&&t.minFilter!==R)}(r)&&!1===x(r.image);let i=y(r.image,e,!1,h);i=st(r,i);const p=x(i)||a,f=s.convert(r.format,r.encoding);let m,g=s.convert(r.type),v=H(r.internalFormat,f,g,r.encoding,r.isVideoTexture);K(l,r,p);const _=r.mipmaps,w=a&&!0!==r.isVideoTexture,T=void 0===d.__version||!0===c,A=V(r,i,p);if(r.isDepthTexture)v=t.DEPTH_COMPONENT,a?v=r.type===N?t.DEPTH_COMPONENT32F:r.type===O?t.DEPTH_COMPONENT24:r.type===k?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT16:r.type===N&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===z&&v===t.DEPTH_COMPONENT&&r.type!==D&&r.type!==O&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=O,g=s.convert(r.type)),r.format===B&&v===t.DEPTH_COMPONENT&&(v=t.DEPTH_STENCIL,r.type!==k&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=k,g=s.convert(r.type))),T&&(w?n.texStorage2D(t.TEXTURE_2D,1,v,i.width,i.height):n.texImage2D(t.TEXTURE_2D,0,v,i.width,i.height,0,f,g,null));else if(r.isDataTexture)if(_.length>0&&p){w&&T&&n.texStorage2D(t.TEXTURE_2D,A,v,_[0].width,_[0].height);for(let e=0,i=_.length;e<i;e++)m=_[e],w?n.texSubImage2D(t.TEXTURE_2D,e,0,0,m.width,m.height,f,g,m.data):n.texImage2D(t.TEXTURE_2D,e,v,m.width,m.height,0,f,g,m.data);r.generateMipmaps=!1}else w?(T&&n.texStorage2D(t.TEXTURE_2D,A,v,i.width,i.height),n.texSubImage2D(t.TEXTURE_2D,0,0,0,i.width,i.height,f,g,i.data)):n.texImage2D(t.TEXTURE_2D,0,v,i.width,i.height,0,f,g,i.data);else if(r.isCompressedTexture)if(r.isCompressedArrayTexture){w&&T&&n.texStorage3D(t.TEXTURE_2D_ARRAY,A,v,_[0].width,_[0].height,i.depth);for(let e=0,s=_.length;e<s;e++)m=_[e],r.format!==F?null!==f?w?n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,e,0,0,0,m.width,m.height,i.depth,f,m.data,0,0):n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,e,v,m.width,m.height,i.depth,0,m.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):w?n.texSubImage3D(t.TEXTURE_2D_ARRAY,e,0,0,0,m.width,m.height,i.depth,f,g,m.data):n.texImage3D(t.TEXTURE_2D_ARRAY,e,v,m.width,m.height,i.depth,0,f,g,m.data)}else{w&&T&&n.texStorage2D(t.TEXTURE_2D,A,v,_[0].width,_[0].height);for(let e=0,i=_.length;e<i;e++)m=_[e],r.format!==F?null!==f?w?n.compressedTexSubImage2D(t.TEXTURE_2D,e,0,0,m.width,m.height,f,m.data):n.compressedTexImage2D(t.TEXTURE_2D,e,v,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):w?n.texSubImage2D(t.TEXTURE_2D,e,0,0,m.width,m.height,f,g,m.data):n.texImage2D(t.TEXTURE_2D,e,v,m.width,m.height,0,f,g,m.data)}else if(r.isDataArrayTexture)w?(T&&n.texStorage3D(t.TEXTURE_2D_ARRAY,A,v,i.width,i.height,i.depth),n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,i.width,i.height,i.depth,f,g,i.data)):n.texImage3D(t.TEXTURE_2D_ARRAY,0,v,i.width,i.height,i.depth,0,f,g,i.data);else if(r.isData3DTexture)w?(T&&n.texStorage3D(t.TEXTURE_3D,A,v,i.width,i.height,i.depth),n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,i.width,i.height,i.depth,f,g,i.data)):n.texImage3D(t.TEXTURE_3D,0,v,i.width,i.height,i.depth,0,f,g,i.data);else if(r.isFramebufferTexture){if(T)if(w)n.texStorage2D(t.TEXTURE_2D,A,v,i.width,i.height);else{let e=i.width,r=i.height;for(let i=0;i<A;i++)n.texImage2D(t.TEXTURE_2D,i,v,e,r,0,f,g,null),e>>=1,r>>=1}}else if(_.length>0&&p){w&&T&&n.texStorage2D(t.TEXTURE_2D,A,v,_[0].width,_[0].height);for(let e=0,i=_.length;e<i;e++)m=_[e],w?n.texSubImage2D(t.TEXTURE_2D,e,0,0,f,g,m):n.texImage2D(t.TEXTURE_2D,e,v,f,g,m);r.generateMipmaps=!1}else w?(T&&n.texStorage2D(t.TEXTURE_2D,A,v,i.width,i.height),n.texSubImage2D(t.TEXTURE_2D,0,0,0,f,g,i)):n.texImage2D(t.TEXTURE_2D,0,v,f,g,i);b(r,p)&&M(l),d.__version=u.version,r.onUpdate&&r.onUpdate(r)}e.__version=r.version}function tt(e,r,o,a,l){const c=s.convert(o.format,o.encoding),h=s.convert(o.type),u=H(o.internalFormat,c,h,o.encoding);
vendor: 3,643 bytes, line 2
2i.get(r).__hasExternalTextures||(l===t.TEXTURE_3D||l===t.TEXTURE_2D_ARRAY?n.texImage3D(l,0,u,r.width,r.height,r.depth,0,c,h,null):n.texImage2D(l,0,u,r.width,r.height,0,c,h,null)),n.bindFramebuffer(t.FRAMEBUFFER,e),rt(r)?d.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,a,l,i.get(o).__webglTexture,0,it(r)):(l===t.TEXTURE_2D||l>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,a,l,i.get(o).__webglTexture,0),n.bindFramebuffer(t.FRAMEBUFFER,null)}function et(e,n,i){if(t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer){let r=t.DEPTH_COMPONENT16;if(i||rt(n)){const e=n.depthTexture;e&&e.isDepthTexture&&(e.type===N?r=t.DEPTH_COMPONENT32F:e.type===O&&(r=t.DEPTH_COMPONENT24));const i=it(n);rt(n)?d.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,i,r,n.width,n.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,i,r,n.width,n.height)}else t.renderbufferStorage(t.RENDERBUFFER,r,n.width,n.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)}else if(n.depthBuffer&&n.stencilBuffer){const r=it(n);i&&!1===rt(n)?t.renderbufferStorageMultisample(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,n.width,n.height):rt(n)?d.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,n.width,n.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)}else{const e=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let r=0;r<e.length;r++){const o=e[r],a=s.convert(o.format,o.encoding),l=s.convert(o.type),c=H(o.internalFormat,a,l,o.encoding),h=it(n);i&&!1===rt(n)?t.renderbufferStorageMultisample(t.RENDERBUFFER,h,c,n.width,n.height):rt(n)?d.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,h,c,n.width,n.height):t.renderbufferStorage(t.RENDERBUFFER,c,n.width,n.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function nt(e){const r=i.get(e),s=!0===e.isWebGLCubeRenderTarget;if(e.depthTexture&&!r.__autoAllocateDepthBuffer){if(s)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,r){if(r&&r.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,e),!r.depthTexture||!r.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");i.get(r.depthTexture).__webglTexture&&r.depthTexture.image.width===r.width&&r.depthTexture.image.height===r.height||(r.depthTexture.image.width=r.width,r.depthTexture.image.height=r.height,r.depthTexture.needsUpdate=!0),q(r.depthTexture,0);const s=i.get(r.depthTexture).__webglTexture,o=it(r);if(r.depthTexture.format===z)rt(r)?d.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,s,0,o):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,s,0);else{if(r.depthTexture.format!==B)throw new Error("Unknown depthTexture format");rt(r)?d.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,s,0,o):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,s,0)}}(r.__webglFramebuffer,e)}else if(s){r.__webglDepthbuffer=[];for(let i=0;i<6;i++)n.bindFramebuffer(t.FRAMEBUFFER,r.__webglFramebuffer[i]),r.__webglDepthbuffer[i]=t.createRenderbuffer(),et(r.__webglDepthbuffer[i],e,!1)}else n.bindFramebuffer(t.FRAMEBUFFER,r.__webglFramebuffer),r.__webglDepthbuffer=t.createRenderbuffer(),et(r.__webglDepthbuffer,e,!1);n.bindFramebuffer(t.FRAMEBUFFER,null)}function it(t){return Math.min(u,t.samples)}function rt(t){const n=i.get(t);
2return a&&t.samples>0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function st(t,n){const i=t.encoding,r=t.format,s=t.type;return!0===t.isCompressedTexture||!0===t.isVideoTexture||t.format===At||i!==xt&&(i===bt?!1===a?!0===e.has("EXT_sRGB")&&r===F?(t.format=At,t.minFilter=R,t.generateMipmaps=!1):n=le.sRGBToLinear(n):r===F&&s===I||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",i)),n}this.allocateTextureUnit=function(){const t=Y;return t>=l&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+l),Y+=1,t},this.resetTextureUnits=function(){Y=0},this.setTexture2D=q,this.setTexture2DArray=function(e,r){const s=i.get(e);e.version>0&&s.__version!==e.version?Q(s,e,r):n.bindTexture(t.TEXTURE_2D_ARRAY,s.__webglTexture,t.TEXTURE0+r)},this.setTexture3D=function(e,r){const s=i.get(e);e.version>0&&s.__version!==e.version?Q(s,e,r):n.bindTexture(t.TEXTURE_3D,s.__webglTexture,t.TEXTURE0+r)},this.setTextureCube=function(e,r){const o=i.get(e);e.version>0&&o.__version!==e.version?function(e,r,o){if(6!==r.image.length)return;const l=$(e,r),h=r.source;n.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+o);const u=i.get(h);if(h.version!==u.__version||!0===l){n.activeTexture(t.TEXTURE0+o),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE);const e=r.isCompressedTexture||r.image[0].isCompressedTexture,i=r.image[0]&&r.image[0].isDataTexture,d=[];for(let t=0;t<6;t++)d[t]=e||i?i?r.image[t].image:r.image[t]:y(r.image[t],!1,!0,c),d[t]=st(r,d[t]);const p=d[0],f=x(p)||a,m=s.convert(r.format,r.encoding),g=s.convert(r.type),v=H(r.internalFormat,m,g,r.encoding),_=a&&!0!==r.isVideoTexture,w=void 0===u.__version||!0===l;let S,T=V(r,p,f);if(K(t.TEXTURE_CUBE_MAP,r,f),e){_&&w&&n.texStorage2D(t.TEXTURE_CUBE_MAP,T,v,p.width,p.height);for(let e=0;e<6;e++){S=d[e].mipmaps;for(let i=0;i<S.length;i++){const s=S[i];r.format!==F?null!==m?_?n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i,0,0,s.width,s.height,m,s.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i,v,s.width,s.height,0,s.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):_?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i,0,0,s.width,s.height,m,g,s.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i,v,s.width,s.height,0,m,g,s.data)}}}else{S=r.mipmaps,_&&w&&(S.length>0&&T++,n.texStorage2D(t.TEXTURE_CUBE_MAP,T,v,d[0].width,d[0].height));for(let e=0;e<6;e++)if(i){_?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,d[e].width,d[e].height,m,g,d[e].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,v,d[e].width,d[e].height,0,m,g,d[e].data);for(let i=0;i<S.length;i++){const r=S[i].image[e].image;_?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i+1,0,0,r.width,r.height,m,g,r.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i+1,v,r.width,r.height,0,m,g,r.data)}}else{_?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,m,g,d[e]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,v,m,g,d[e]);for(let i=0;i<S.length;i++){const r=S[i];_?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i+1,0,0,m,g,r.image[e]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i+1,v,m,g,r.image[e])}}}b(r,f)&&M(t.TEXTURE_CUBE_MAP),u.__version=h.version,r.onUpdate&&r.onUpdate(r)}e.__version=r.version}(o,e,r):n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture,t.TEXTURE0+r)},this.rebindTextures=function(e,n,r){const s=i.get(e);void 0!==n&&tt(s.__webglFramebuffer,e,e.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),void 0!==r&&nt(e)},this.setupRenderTarget=function(e){const l=e.texture,c=i.get(e),h=i.get(l);e.addEventListener("dispose",j),!0!==e.isWebGLMultipleRenderTargets&&(void 0===h.__webglTexture&&(h.__webglTexture=t.createTexture()),h.__version=l.version,o.memory.textures++);
2const u=!0===e.isWebGLCubeRenderTarget,d=!0===e.isWebGLMultipleRenderTargets,p=x(e)||a;if(u){c.__webglFramebuffer=[];for(let e=0;e<6;e++)c.__webglFramebuffer[e]=t.createFramebuffer()}else{if(c.__webglFramebuffer=t.createFramebuffer(),d)if(r.drawBuffers){const n=e.texture;for(let e=0,r=n.length;e<r;e++){const r=i.get(n[e]);void 0===r.__webglTexture&&(r.__webglTexture=t.createTexture(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(a&&e.samples>0&&!1===rt(e)){const i=d?l:[l];c.__webglMultisampledFramebuffer=t.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let n=0;n<i.length;n++){const r=i[n];c.__webglColorRenderbuffer[n]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,c.__webglColorRenderbuffer[n]);const o=s.convert(r.format,r.encoding),a=s.convert(r.type),l=H(r.internalFormat,o,a,r.encoding,!0===e.isXRRenderTarget),h=it(e);t.renderbufferStorageMultisample(t.RENDERBUFFER,h,l,e.width,e.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+n,t.RENDERBUFFER,c.__webglColorRenderbuffer[n])}t.bindRenderbuffer(t.RENDERBUFFER,null),e.depthBuffer&&(c.__webglDepthRenderbuffer=t.createRenderbuffer(),et(c.__webglDepthRenderbuffer,e,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(u){n.bindTexture(t.TEXTURE_CUBE_MAP,h.__webglTexture),K(t.TEXTURE_CUBE_MAP,l,p);for(let n=0;n<6;n++)tt(c.__webglFramebuffer[n],e,l,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+n);b(l,p)&&M(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(d){const r=e.texture;for(let s=0,o=r.length;s<o;s++){const o=r[s],a=i.get(o);n.bindTexture(t.TEXTURE_2D,a.__webglTexture),K(t.TEXTURE_2D,o,p),tt(c.__webglFramebuffer,e,o,t.COLOR_ATTACHMENT0+s,t.TEXTURE_2D),b(o,p)&&M(t.TEXTURE_2D)}n.unbindTexture()}else{let i=t.TEXTURE_2D;(e.isWebGL3DRenderTarget||e.isWebGLArrayRenderTarget)&&(a?i=e.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(i,h.__webglTexture),K(i,l,p),tt(c.__webglFramebuffer,e,l,t.COLOR_ATTACHMENT0,i),b(l,p)&&M(i),n.unbindTexture()}e.depthBuffer&&nt(e)},this.updateRenderTargetMipmap=function(e){const r=x(e)||a,s=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let o=0,a=s.length;o<a;o++){const a=s[o];if(b(a,r)){const r=e.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,s=i.get(a).__webglTexture;n.bindTexture(r,s),M(r),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(e){if(a&&e.samples>0&&!1===rt(e)){const r=e.isWebGLMultipleRenderTargets?e.texture:[e.texture],s=e.width,o=e.height;let a=t.COLOR_BUFFER_BIT;const l=[],c=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,h=i.get(e),u=!0===e.isWebGLMultipleRenderTargets;if(u)for(let e=0;e<r.length;e++)n.bindFramebuffer(t.FRAMEBUFFER,h.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,h.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,h.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,h.__webglFramebuffer);for(let n=0;n<r.length;n++){l.push(t.COLOR_ATTACHMENT0+n),e.depthBuffer&&l.push(c);const d=void 0!==h.__ignoreDepthValues&&h.__ignoreDepthValues;if(!1===d&&(e.depthBuffer&&(a|=t.DEPTH_BUFFER_BIT),e.stencilBuffer&&(a|=t.STENCIL_BUFFER_BIT)),u&&t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,h.__webglColorRenderbuffer[n]),!0===d&&(t.invalidateFramebuffer(t.READ_FRAMEBUFFER,[c]),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[c])),u){const e=i.get(r[n]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0)}t.blitFramebuffer(0,0,s,o,0,0,s,o,a,t.NEAREST),p&&t.invalidateFramebuffer(t.READ_FRAMEBUFFER,l)}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),u)for(let e=0;e<r.length;e++){n.bindFramebuffer(t.FRAMEBUFFER,h.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.RENDERBUFFER,h.__webglColorRen
2derbuffer[e]);const s=i.get(r[e]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,h.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.TEXTURE_2D,s,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,h.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=nt,this.setupFrameBufferTexture=tt,this.useMultisampledRTT=rt}function no(t,e,n){const i=n.isWebGL2;return{convert:function(n,r=null){let s;if(n===I)return t.UNSIGNED_BYTE;if(1017===n)return t.UNSIGNED_SHORT_4_4_4_4;if(1018===n)return t.UNSIGNED_SHORT_5_5_5_1;if(1010===n)return t.BYTE;if(1011===n)return t.SHORT;if(n===D)return t.UNSIGNED_SHORT;if(1013===n)return t.INT;if(n===O)return t.UNSIGNED_INT;if(n===N)return t.FLOAT;if(n===U)return i?t.HALF_FLOAT:(s=e.get("OES_texture_half_float"),null!==s?s.HALF_FLOAT_OES:null);if(1021===n)return t.ALPHA;if(n===F)return t.RGBA;if(1024===n)return t.LUMINANCE;if(1025===n)return t.LUMINANCE_ALPHA;if(n===z)return t.DEPTH_COMPONENT;if(n===B)return t.DEPTH_STENCIL;if(1022===n)return console.warn("THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228"),t.RGBA;if(n===At)return s=e.get("EXT_sRGB"),null!==s?s.SRGB_ALPHA_EXT:null;if(1028===n)return t.RED;if(1029===n)return t.RED_INTEGER;if(1030===n)return t.RG;if(1031===n)return t.RG_INTEGER;if(1033===n)return t.RGBA_INTEGER;if(n===H||n===V||n===G||n===W)if(r===bt){if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),null===s)return null;if(n===H)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===V)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===G)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===W)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(s=e.get("WEBGL_compressed_texture_s3tc"),null===s)return null;if(n===H)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===V)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===G)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===W)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===j||n===X||n===Y||n===q){if(s=e.get("WEBGL_compressed_texture_pvrtc"),null===s)return null;if(n===j)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===X)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Y)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===q)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===n)return s=e.get("WEBGL_compressed_texture_etc1"),null!==s?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===Z||n===J){if(s=e.get("WEBGL_compressed_texture_etc"),null===s)return null;if(n===Z)return r===bt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===J)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}if(n===K||n===$||n===Q||n===tt||n===et||n===nt||n===it||n===rt||n===st||n===ot||n===at||n===lt||n===ct||n===ht){if(s=e.get("WEBGL_compressed_texture_astc"),null===s)return null;if(n===K)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===$)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Q)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===tt)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===et)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===nt)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===it)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===rt)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===st)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===ot)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===at)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===lt)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===ct)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===ht)return r===bt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===ut){if(s=e.get("EXT_texture_compression_bptc"),null===s)return null;if(n===ut)return r===bt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT}return n===k?i?t.UNSIGNED_INT_24_8:(s=e.get("WEBGL_depth_texture"),null!==s?s.UNSIGNED_INT_24_8_WEBGL:null):void 0!==t[n]?t[n]:null}}}class io extends bi{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}}class ro extends xn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const so={type:"move"};class oo{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new ro,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new ro,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new _e,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new _e),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new ro,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new _e,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new _e),this._grip}dispatchEvent(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const e=this._hand;if(e)for(const n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(t,e,n){let i=null,r=null,s=null;const o=this._targetRay,a=this._grip,l=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState){if(l&&t.hand){s=!0;
vendor: 4,367 bytes, line 2
2for(const i of t.hand.values()){const t=e.getJointPose(i,n),r=this._getHandJoint(l,i);null!==t&&(r.matrix.fromArray(t.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.jointRadius=t.radius),r.visible=null!==t}const i=l.joints["index-finger-tip"],r=l.joints["thumb-tip"],o=i.position.distanceTo(r.position),a=.02,c=.005;l.inputState.pinching&&o>a+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&o<=a-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==a&&t.gripSpace&&(r=e.getPose(t.gripSpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1));null!==o&&(i=e.getPose(t.targetRaySpace,n),null===i&&null!==r&&(i=r),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(so)))}return null!==o&&(o.visible=null!==i),null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==s),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const n=new ro;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class ao extends de{constructor(t,e,n,i,r,s,o,a,l,c){if((c=void 0!==c?c:z)!==z&&c!==B)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===z&&(n=O),void 0===n&&c===B&&(n=k),super(null,i,r,s,o,a,c,n,l),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=void 0!==o?o:E,this.minFilter=void 0!==a?a:E,this.flipY=!1,this.generateMipmaps=!1}}class lo extends Ct{constructor(t,e){super();const n=this;let i=null,r=1,s=null,o="local-floor",a=null,l=null,c=null,h=null,u=null,d=null;const p=e.getContextAttributes();let f=null,m=null;const g=[],v=[],_=new Set,y=new Map,x=new bi;x.layers.enable(1),x.viewport=new pe;const b=new bi;b.layers.enable(2),b.viewport=new pe;const M=[x,b],w=new io;w.layers.enable(1),w.layers.enable(2);let S=null,T=null;function E(t){const e=v.indexOf(t.inputSource);if(-1===e)return;const n=g[e];void 0!==n&&n.dispatchEvent({type:t.type,data:t.inputSource})}function A(){i.removeEventListener("select",E),i.removeEventListener("selectstart",E),i.removeEventListener("selectend",E),i.removeEventListener("squeeze",E),i.removeEventListener("squeezestart",E),i.removeEventListener("squeezeend",E),i.removeEventListener("end",A),i.removeEventListener("inputsourceschange",C);for(let t=0;t<g.length;t++){const e=v[t];null!==e&&(v[t]=null,g[t].disconnect(e))}S=null,T=null,t.setRenderTarget(f),u=null,h=null,c=null,i=null,m=null,N.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function C(t){for(let e=0;e<t.removed.length;e++){const n=t.removed[e],i=v.indexOf(n);i>=0&&(v[i]=null,g[i].disconnect(n))}for(let e=0;e<t.added.length;e++){const n=t.added[e];let i=v.indexOf(n);if(-1===i){for(let t=0;t<g.length;t++){if(t>=v.length){v.push(n),i=t;break}if(null===v[t]){v[t]=n,i=t;break}}if(-1===i)break}const r=g[i];r&&r.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=g[t];return void 0===e&&(e=new oo,g[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=g[t];return void 0===e&&(e=new oo,g[t]=e),e.getGripSpace()},this.getHand=function(t){let e=g[t];return void 0===e&&(e=new oo,g[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){r=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){o=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a||s},this.setReferenceSpace=function(t){a=t},this.getBaseLayer=function(){return null!==h?h:u},this.getBinding=function(){return c},this.getFrame=function(){return d}
2,this.getSession=function(){return i},this.setSession=async function(l){if(i=l,null!==i){if(f=t.getRenderTarget(),i.addEventListener("select",E),i.addEventListener("selectstart",E),i.addEventListener("selectend",E),i.addEventListener("squeeze",E),i.addEventListener("squeezestart",E),i.addEventListener("squeezeend",E),i.addEventListener("end",A),i.addEventListener("inputsourceschange",C),!0!==p.xrCompatible&&await e.makeXRCompatible(),void 0===i.renderState.layers||!1===t.capabilities.isWebGL2){const n={antialias:void 0!==i.renderState.layers||p.antialias,alpha:p.alpha,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:r};u=new XRWebGLLayer(i,e,n),i.updateRenderState({baseLayer:u}),m=new fe(u.framebufferWidth,u.framebufferHeight,{format:F,type:I,encoding:t.outputEncoding,stencilBuffer:p.stencil})}else{let n=null,s=null,o=null;p.depth&&(o=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,n=p.stencil?B:z,s=p.stencil?k:O);const a={colorFormat:e.RGBA8,depthFormat:o,scaleFactor:r};c=new XRWebGLBinding(i,e),h=c.createProjectionLayer(a),i.updateRenderState({layers:[h]}),m=new fe(h.textureWidth,h.textureHeight,{format:F,type:I,depthTexture:new ao(h.textureWidth,h.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:p.stencil,encoding:t.outputEncoding,samples:p.antialias?4:0});t.properties.get(m).__ignoreDepthValues=h.ignoreDepthValues}m.isXRRenderTarget=!0,this.setFoveation(1),a=null,s=await i.requestReferenceSpace(o),N.setContext(i),N.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const R=new _e,L=new _e;function P(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===i)return;w.near=b.near=x.near=t.near,w.far=b.far=x.far=t.far,S===w.near&&T===w.far||(i.updateRenderState({depthNear:w.near,depthFar:w.far}),S=w.near,T=w.far);const e=t.parent,n=w.cameras;P(w,e);for(let t=0;t<n.length;t++)P(n[t],e);w.matrixWorld.decompose(w.position,w.quaternion,w.scale),t.matrix.copy(w.matrix),t.matrix.decompose(t.position,t.quaternion,t.scale);const r=t.children;for(let t=0,e=r.length;t<e;t++)r[t].updateMatrixWorld(!0);2===n.length?function(t,e,n){R.setFromMatrixPosition(e.matrixWorld),L.setFromMatrixPosition(n.matrixWorld);const i=R.distanceTo(L),r=e.projectionMatrix.elements,s=n.projectionMatrix.elements,o=r[14]/(r[10]-1),a=r[14]/(r[10]+1),l=(r[9]+1)/r[5],c=(r[9]-1)/r[5],h=(r[8]-1)/r[0],u=(s[8]+1)/s[0],d=o*h,p=o*u,f=i/(-h+u),m=f*-h;e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(m),t.translateZ(f),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.copy(t.matrixWorld).invert();const g=o+f,v=a+f,_=d-m,y=p+(i-m),x=l*a/v*g,b=c*a/v*g;t.projectionMatrix.makePerspective(_,y,x,b,g,v)}(w,x,b):w.projectionMatrix.copy(x.projectionMatrix)},this.getCamera=function(){return w},this.getFoveation=function(){return null!==h?h.fixedFoveation:null!==u?u.fixedFoveation:void 0},this.setFoveation=function(t){null!==h&&(h.fixedFoveation=t),null!==u&&void 0!==u.fixedFoveation&&(u.fixedFoveation=t)},this.getPlanes=function(){return _};let D=null;const N=new Di;N.setAnimationLoop(function(e,i){if(l=i.getViewerPose(a||s),d=i,null!==l){const e=l.views;null!==u&&(t.setRenderTargetFramebuffer(m,u.framebuffer),t.setRenderTarget(m));let n=!1;e.length!==w.cameras.length&&(w.cameras.length=0,n=!0);for(let i=0;i<e.length;i++){const r=e[i];let s=null;if(null!==u)s=u.getViewport(r);else{const e=c.getViewSubImage(h,r);s=e.viewport,0===i&&(t.setRenderTargetTextures(m,e.colorTexture,h.ignoreDepthValues?void 0:e.depthStencilTexture),t.setRenderTarget(m))}let o=M[i];void 0===o&&(o=new bi,o.layers.enable(i),o.viewport=new pe,M[i]=o),o.matrix.fromArray(r.transform.matrix),o.projectionMatrix.fromArray(r.projectionMatrix),o.viewport.set(s.x,s.y,s.width,s.height),0===i&&w.matrix.copy(o.matrix),!0===n&&w.cameras.push(o)}}for(let t=0;t<g.length;t++){const e=v[t],n=g[t];null!==e&&void 0!==n&&n.update(e,i,a||s)}if(D&&D(e,i),i.detectedPlanes){n.dispatchEvent({type:"planesdetected",data:i.detectedPlanes});let t=null;for(const e of _)i.detectedPlanes.has(e)||(null===t&&(t=[]),t.push(e));if(null!==t)for(const e of t)_.delete(e),y.delete(e),n.dispatchEvent({type:"planeremoved",data:e});for(const t of i.detectedPlanes)if(_.has(t)){const e=y.get(t);t.lastChangedTime>e&&(y.set(t,t.lastChangedTime),n.dispatchEvent({type:"planechanged",data:t}))}else _.add(t),y.set(t,i.lastChangedTime),n.dispatchEvent({type:"planeadded",data:t})}d=null}),this.setAnimationLoop=function(t){D=t},this.dispose=function(){}}}function co(t,e){function n(n,i){n.opacity.value=i.opacity,i.color&&n.diffuse.value.copy(i.color),i.emissive&&n.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(n.map.value=i.map),i.alphaMap&&(n.alphaMap.value=i.alphaMap),i.bumpMap&&(n.bumpMap.value=i.bumpMap,n.bumpScale.value=i.bumpScale,1===i.side&&(n.bumpScale.value*=-1)),i.displacementMap&&(n.displacementMap.value=i.displacementMap,n.displacementScale.value=i.displacementScale,n.displacementBias.value=i.displacementBias),i.emissiveMap&&(n.emissiveMap.value=i.emissiveMap),i.normalMap&&(n.normalMap.value=i.normalMap,n.normalScale.value.copy(i.normalScale),1===i.side&&n.normalScale.value.negate()),i.specularMap&&(n.specularMap.value=i.specularMap),i.alphaTest>0&&(n.alphaTest.value=i.alphaTest);const r=e.get(i).envMap;
vendor: 15,166 bytes, line 2
2if(r&&(n.envMap.value=r,n.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,n.reflectivity.value=i.reflectivity,n.ior.value=i.ior,n.refractionRatio.value=i.refractionRatio),i.lightMap){n.lightMap.value=i.lightMap;const e=!0!==t.physicallyCorrectLights?Math.PI:1;n.lightMapIntensity.value=i.lightMapIntensity*e}let s,o;i.aoMap&&(n.aoMap.value=i.aoMap,n.aoMapIntensity.value=i.aoMapIntensity),i.map?s=i.map:i.specularMap?s=i.specularMap:i.displacementMap?s=i.displacementMap:i.normalMap?s=i.normalMap:i.bumpMap?s=i.bumpMap:i.roughnessMap?s=i.roughnessMap:i.metalnessMap?s=i.metalnessMap:i.alphaMap?s=i.alphaMap:i.emissiveMap?s=i.emissiveMap:i.clearcoatMap?s=i.clearcoatMap:i.clearcoatNormalMap?s=i.clearcoatNormalMap:i.clearcoatRoughnessMap?s=i.clearcoatRoughnessMap:i.iridescenceMap?s=i.iridescenceMap:i.iridescenceThicknessMap?s=i.iridescenceThicknessMap:i.specularIntensityMap?s=i.specularIntensityMap:i.specularColorMap?s=i.specularColorMap:i.transmissionMap?s=i.transmissionMap:i.thicknessMap?s=i.thicknessMap:i.sheenColorMap?s=i.sheenColorMap:i.sheenRoughnessMap&&(s=i.sheenRoughnessMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),n.uvTransform.value.copy(s.matrix)),i.aoMap?o=i.aoMap:i.lightMap&&(o=i.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),n.uv2Transform.value.copy(o.matrix))}return{refreshFogUniforms:function(e,n){n.color.getRGB(e.fogColor.value,vi(t)),n.isFog?(e.fogNear.value=n.near,e.fogFar.value=n.far):n.isFogExp2&&(e.fogDensity.value=n.density)},refreshMaterialUniforms:function(t,i,r,s,o){i.isMeshBasicMaterial||i.isMeshLambertMaterial?n(t,i):i.isMeshToonMaterial?(n(t,i),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,i)):i.isMeshPhongMaterial?(n(t,i),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,i)):i.isMeshStandardMaterial?(n(t,i),function(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap);n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap);const i=e.get(n).envMap;i&&(t.envMapIntensity.value=n.envMapIntensity)}(t,i),i.isMeshPhysicalMaterial&&function(t,e,n){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap));e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap),e.clearcoatNormalMap&&(t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),t.clearcoatNormalMap.value=e.clearcoatNormalMap,1===e.side&&t.clearcoatNormalScale.value.negate()));e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap));e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=n.texture,t.transmissionSamplerSize.value.set(n.width,n.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor));t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap);e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap)}(t,i,o)):i.isMeshMatcapMaterial?(n(t,i),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,i)):i.isMeshDepthMaterial?n(t,i):i.isMeshDistanceMaterial?(n(t,i),function(t,e){t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(t,i)):i.isMeshNormalMaterial?n(t,i):i.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity}(t,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,i)):i.isPointsMaterial?function(t,e,n,i){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*i,e.map&&(t.map.value=e.map);e.alphaMap&&(t.alphaMap.value=e.alphaMap);e.alphaTest>0&&(t.alphaTest.value=e.alphaTest);let r;e.map?r=e.map:e.alphaMap&&(r=e.alphaMap);void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix))}(t,i,r,s):i.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map);e.alphaMap&&(t.alphaMap.value=e.alphaMap);e.alphaTest>0&&(t.alphaTest.value=e.alphaTest);let n;e.map?n=e.map:e.alphaMap&&(n=e.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}(t,i):i.isShadowMaterial?(t.color.value.copy(i.color),t.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function ho(t,e,n,i){let r={},s={},o=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(t,e,n){const i=t.value;if(void 0===n[e])return n[e]="number"==typeof i?i:i.clone(),!0;if("number"==typeof i){if(n[e]!==i)return n[e]=i,!0}else{const t=n[e];if(!1===t.equals(i))return t.copy(i),!0}return!1}function c(t){const e=t.value,n={boundary:0,storage:0};return"number"==typeof e?(n.boundary=4,n.storage=4):e.isVector2?(n.boundary=8,n.storage=8):e.isVector3||e.isColor?(n.boundary=16,n.storage=12):e.isVector4?(n.boundary=16,n.storage=16):e.isMatrix3?(n.boundary=48,n.storage=48):e.isMatrix4?(n.boundary=64,n.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),n}function h(e){const n=e.target;n.removeEventListener("dispose",h);const i=o.indexOf(n.__bindingPointIndex);o.splice(i,1),t.deleteBuffer(r[n.id]),delete r[n.id],delete s[n.id]}return{bind:function(t,e){const n=e.program;i.uniformBlockBinding(t,n)},update:function(n,u){let d=r[n.id];void 0===d&&(!function(t){const e=t.uniforms;let n=0;const i=16;let r=0;for(let t=0,s=e.length;t<s;t++){const s=e[t],o=c(s);if(s.__data=new Float32Array(o.storage/Float32Array.BYTES_PER_ELEMENT),s.__offset=n,t>0){r=n%i;0!==r&&i-r-o.boundary<0&&(n+=i-r,s.__offset=n)}n+=o.storage}r=n%i,r>0&&(n+=i-r);t.__size=n,t.__cache={}}(n),d=function(e){const n=function(){for(let t=0;t<a;t++)if(-1===o.indexOf(t))return o.push(t),t;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();e.__bindingPointIndex=n;const i=t.createBuffer(),r=e.__size,s=e.usage;return t.bindBuffer(t.UNIFORM_BUFFER,i),t.bufferData(t.UNIFORM_BUFFER,r,s),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,n,i),i}(n),r[n.id]=d,n.addEventListener("dispose",h));const p=u.program;i.updateUBOMapping(n,p);const f=e.render.frame;s[n.id]!==f&&(!function(e){const n=r[e.id],i=e.uniforms,s=e.__cache;t.bindBuffer(t.UNIFORM_BUFFER,n);for(let e=0,n=i.length;e<n;e++){const n=i[e];if(!0===l(n,e,s)){const e=n.value,i=n.__offset;"number"==typeof e?(n.__data[0]=e,t.bufferSubData(t.UNIFORM_BUFFER,i,n.__data)):(n.value.isMatrix3?(n.__data[0]=n.value.elements[0],n.__data[1]=n.value.elements[1],n.__data[2]=n.value.elements[2],n.__data[3]=n.value.elements[0],n.__data[4]=n.value.elements[3],n.__data[5]=n.value.elements[4],n.__data[6]=n.value.elements[5],n.__data[7]=n.value.elements[0],n.__data[8]=n.value.elements[6],n.__data[9]=n.value.elements[7],n.__data[10]=n.value.elements[8],n.__data[11]=n.value.elements[0]):e.toArray(n.__data),t.bufferSubData(t.UNIFORM_BUFFER,i,n.__data))}}t.bindBuffer(t.UNIFORM_BUFFER,null)}(n),s[n.id]=f)},dispose:function(){for(const e in r)t.deleteBuffer(r[e]);o=[],r={},s={}}}}function uo(t={}){this.isWebGLRenderer=!0;const e=void 0!==t.canvas?t.canvas:function(){const t=Zt("canvas");return t.style.display="block",t}(),i=void 0!==t.context?t.context:null,r=void 0===t.depth||t.depth,s=void 0===t.stencil||t.stencil,o=void 0!==t.antialias&&t.antialias,a=void 0===t.premultipliedAlpha||t.premultipliedAlpha,l=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,c=void 0!==t.powerPreference?t.powerPreference:"default",h=void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat;let u;u=null!==i?i.getContextAttributes().alpha:void 0!==t.alpha&&t.alpha;let d=null,p=null;const f=[],m=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=xt,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const g=this;let v=!1,_=0,y=0,x=null,b=-1,M=null;const w=new pe,S=new pe;let T=null,E=e.width,A=e.height,C=1,R=null,L=null;const D=new pe(0,0,E,A),O=new pe(0,0,E,A);let k=!1;const z=new Ii;let B=!1,H=!1,V=null;const G=new qe,W=new Gt,j=new _e,X={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Y(){return null===x?C:1}let q,Z,J,K,$,Q,tt,et,nt,it,rt,st,ot,at,lt,ct,ht,ut,dt,pt,ft,mt,gt,vt,_t=i;function yt(t,n){for(let i=0;i<t.length;i++){const r=t[i],s=e.getContext(r,n);if(null!==s)return s}return null}try{const t={alpha:!0,depth:r,stencil:s,antialias:o,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:h};if("setAttribute"in e&&e.setAttribute("data-engine",`three.js r${n}`),e.addEventListener("webglcontextlost",wt,!1),e.addEventListener("webglcontextrestored",St,!1),e.addEventListener("webglcontextcreationerror",Tt,!1),null===_t){const e=["webgl2","webgl","experimental-webgl"];if(!0===g.isWebGL1Renderer&&e.shift(),_t=yt(e,t),null===_t)throw yt(e)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===_t.getShaderPrecisionFormat&&(_t.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){throw console.error("THREE.WebGLRenderer: "+t.message),t}function bt(){q=new lr(_t),Z=new Gi(_t,q,t),q.init(Z),mt=new no(_t,q,Z),J=new to(_t,q,Z),K=new ur(_t),$=new Bs,Q=new eo(_t,q,J,$,Z,mt,K),tt=new ji(g),et=new ar(g),nt=new Oi(_t,Z),gt=new Hi(_t,q,nt,Z),it=new cr(_t,nt,K,gt),rt=new mr(_t,it,nt,K),dt=new fr(_t,Z,Q),ct=new Wi($),st=new zs(g,tt,et,q,Z,gt,ct),ot=new co(g,$),at=new Ws,lt=new Js(q,Z),ut=new Bi(g,tt,et,J,rt,u,a),ht=new Qs(g,rt,Z),vt=new ho(_t,K,Z,J),pt=new Vi(_t,q,K,Z),ft=new hr(_t,q,K,Z),K.programs=st.programs,g.capabilities=Z,g.extensions=q,g.properties=$,g.renderLists=at,g.shadowMap=ht,g.state=J,g.info=K}bt();const Mt=new lo(g,_t);function wt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),v=!0}function St(){console.log("THREE.WebGLRenderer: Context Restored."),v=!1;const t=K.autoReset,e=ht.enabled,n=ht.autoUpdate,i=ht.needsUpdate,r=ht.type;bt(),K.autoReset=t,ht.enabled=e,ht.autoUpdate=n,ht.needsUpdate=i,ht.type=r}function Tt(t){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",t.statusMessage)}function Et(t){const e=t.target;e.removeEventListener("dispose",Et),function(t){(function(t){const e=$.get(t).programs;void 0!==e&&(e.forEach(function(t){st.releaseProgram(t)}),t.isShaderMaterial&&st.releaseShaderCache(t))})(t),$.remove(t)}(e)}this.xr=Mt,this.getContext=function(){return _t},this.getContextAttributes=function(){return _t.getContextAttributes()},this.forceContextLoss=function(){const t=q.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){const t=q.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return C},this.setPixelRatio=function(t){void 0!==t&&(C=t,this.setSize(E,A,!1))},this.getSize=function(t){return t.set(E,A)},this.setSize=function(t,n,i){Mt.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(E=t,A=n,e.width=Math.floor(t*C),e.height=Math.floor(n*C),!1!==i&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(t){return t.set(E*C,A*C).floor()},this.setDrawingBufferSize=function(t,n,i){E=t,A=n,C=i,e.width=Math.floor(t*i),e.height=Math.floor(n*i),this.setViewport(0,0,t,n)},this.getCurrentViewport=function(t){return t.copy(w)},this.getViewport=function(t){return t.copy(D)},this.setViewport=function(t,e,n,i){t.isVector4?D.set(t.x,t.y,t.z,t.w):D.set(t,e,n,i),J.viewport(w.copy(D).multiplyScalar(C).floor())},this.getScissor=function(t){return t.copy(O)},this.setScissor=function(t,e,n,i){t.isVector4?O.set(t.x,t.y,t.z,t.w):O.set(t,e,n,i),J.scissor(S.copy(O).multiplyScalar(C).floor())},this.getScissorTest=function(){return k},this.setScissorTest=function(t){J.setScissorTest(k=t)},this.setOpaqueSort=function(t){R=t},this.setTransparentSort=function(t){L=t},this.getClearColor=function(t){return t.copy(ut.getClearColor())},this.setClearColor=function(){ut.setClearColor.apply(ut,arguments)},this.getClearAlpha=function(){return ut.getClearAlpha()},this.setClearAlpha=function(){ut.setClearAlpha.apply(ut,arguments)},this.clear=function(t=!0,e=!0,n=!0){let i=0;t&&(i|=_t.COLOR_BUFFER_BIT),e&&(i|=_t.DEPTH_BUFFER_BIT),n&&(i|=_t.STENCIL_BUFFER_BIT),_t.clear(i)},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.dispose=function(){e.removeEventListener("webglcontextlost",wt,!1),e.removeEventListener("webglcontextrestored",St,!1),e.removeEventListener("webglcontextcreationerror",Tt,!1),at.dispose(),lt.dispose(),$.dispose(),tt.dispose(),et.dispose(),rt.dispose(),gt.dispose(),vt.dispose(),st.dispose(),Mt.dispose(),Mt.removeEventListener("sessionstart",Ct),Mt.removeEventListener("sessionend",Rt),V&&(V.dispose(),V=null),Lt.stop()},this.renderBufferDirect=function(t,e,n,i,r,s){null===e&&(e=X);const o=r.isMesh&&r.matrixWorld.determinant()<0,a=function(t,e,n,i,r){!0!==e.isScene&&(e=X);Q.resetTextureUnits();const s=e.fog,o=i.isMeshStandardMaterial?e.environment:null,a=null===x?g.outputEncoding:!0===x.isXRRenderTarget?x.texture.encoding:xt,l=(i.isMeshStandardMaterial?et:tt).get(i.envMap||o),c=!0===i.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,h=!!i.normalMap&&!!n.attributes.tangent,u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,f=!!n.morphAttributes.color,m=i.toneMapped?g.toneMapping:0,v=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,_=void 0!==v?v.length:0,y=$.get(i),w=p.state.lights;if(!0===B&&(!0===H||t!==M)){const e=t===M&&i.id===b;ct.setState(i,t,e)}let S=!1;i.version===y.__version?y.needsLights&&y.lightsStateVersion!==w.state.ver
2sion||y.outputEncoding!==a||r.isInstancedMesh&&!1===y.instancing?S=!0:r.isInstancedMesh||!0!==y.instancing?r.isSkinnedMesh&&!1===y.skinning?S=!0:r.isSkinnedMesh||!0!==y.skinning?y.envMap!==l||!0===i.fog&&y.fog!==s?S=!0:void 0===y.numClippingPlanes||y.numClippingPlanes===ct.numPlanes&&y.numIntersection===ct.numIntersection?(y.vertexAlphas!==c||y.vertexTangents!==h||y.morphTargets!==u||y.morphNormals!==d||y.morphColors!==f||y.toneMapping!==m||!0===Z.isWebGL2&&y.morphTargetsCount!==_)&&(S=!0):S=!0:S=!0:S=!0:(S=!0,y.__version=i.version);let T=y.currentProgram;!0===S&&(T=Nt(i,e,r));let E=!1,R=!1,L=!1;const P=T.getUniforms(),I=y.uniforms;J.useProgram(T.program)&&(E=!0,R=!0,L=!0);i.id!==b&&(b=i.id,R=!0);if(E||M!==t){if(P.setValue(_t,"projectionMatrix",t.projectionMatrix),Z.logarithmicDepthBuffer&&P.setValue(_t,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),M!==t&&(M=t,R=!0,L=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshStandardMaterial||i.envMap){const e=P.map.cameraPosition;void 0!==e&&e.setValue(_t,j.setFromMatrixPosition(t.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial)&&P.setValue(_t,"isOrthographic",!0===t.isOrthographicCamera),(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.isShadowMaterial||r.isSkinnedMesh)&&P.setValue(_t,"viewMatrix",t.matrixWorldInverse)}if(r.isSkinnedMesh){P.setOptional(_t,r,"bindMatrix"),P.setOptional(_t,r,"bindMatrixInverse");const t=r.skeleton;t&&(Z.floatVertexTextures?(null===t.boneTexture&&t.computeBoneTexture(),P.setValue(_t,"boneTexture",t.boneTexture,Q),P.setValue(_t,"boneTextureSize",t.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const D=n.morphAttributes;(void 0!==D.position||void 0!==D.normal||void 0!==D.color&&!0===Z.isWebGL2)&&dt.update(r,n,i,T);(R||y.receiveShadow!==r.receiveShadow)&&(y.receiveShadow=r.receiveShadow,P.setValue(_t,"receiveShadow",r.receiveShadow));i.isMeshGouraudMaterial&&null!==i.envMap&&(I.envMap.value=l,I.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);R&&(P.setValue(_t,"toneMappingExposure",g.toneMappingExposure),y.needsLights&&(N=L,(O=I).ambientLightColor.needsUpdate=N,O.lightProbe.needsUpdate=N,O.directionalLights.needsUpdate=N,O.directionalLightShadows.needsUpdate=N,O.pointLights.needsUpdate=N,O.pointLightShadows.needsUpdate=N,O.spotLights.needsUpdate=N,O.spotLightShadows.needsUpdate=N,O.rectAreaLights.needsUpdate=N,O.hemisphereLights.needsUpdate=N),s&&!0===i.fog&&ot.refreshFogUniforms(I,s),ot.refreshMaterialUniforms(I,i,C,A,V),ys.upload(_t,y.uniformsList,I,Q));var O,N;i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(ys.upload(_t,y.uniformsList,I,Q),i.uniformsNeedUpdate=!1);i.isSpriteMaterial&&P.setValue(_t,"center",r.center);if(P.setValue(_t,"modelViewMatrix",r.modelViewMatrix),P.setValue(_t,"normalMatrix",r.normalMatrix),P.setValue(_t,"modelMatrix",r.matrixWorld),i.isShaderMaterial||i.isRawShaderMaterial){const t=i.uniformsGroups;for(let e=0,n=t.length;e<n;e++)if(Z.isWebGL2){const n=t[e];vt.update(n,T),vt.bind(n,T)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return T}(t,e,n,i,r);J.setMaterial(i,o);let l=n.index,c=1;!0===i.wireframe&&(l=it.getWireframeAttribute(n),c=2);const h=n.drawRange,u=n.attributes.position;let d=h.start*c,f=(h.start+h.count)*c;null!==s&&(d=Math.max(d,s.start*c),f=Math.min(f,(s.start+s.count)*c)),null!==l?(d=Math.max(d,0),f=Math.min(f,l.count)):null!=u&&(d=Math.max(d,0),f=Math.min(f,u.count));const m=f-d;if(m<0||m===1/0)return;let v;gt.setup(r,i,a,n,l);let _=pt;if(null!==l&&(v=nt.get(l),_=ft,_.setIndex(v)),r.isMesh)!0===i.wireframe?(J.setLineWidth(i.wireframeLinewidth*Y()),_.setMode(_t.LINES)):_.setMode(_t.TRIANGLES);else if(r.isLine){let t=i.linewidth;void 0===t&&(t=1),J.setLineWidth(t*Y()),r.isLineSegments?_.setMode(_t.LINES):r.isLineLoop?_.setMode(_t.LINE_LOOP):_.setMode(_t.LINE_STRIP)}else r.isPoints?_.setMode(_t.POINTS):r.isSprite&&_.setMode(_t.TRIANGLES);if(r.isInstancedMesh)_.renderInstances(d,m,r.count);else if(n.isInstancedBufferGeometry){const t=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,e=Math.min(n.instanceCount,t);_.renderInstances(d,m,e)}else _.render(d,m)},this.compile=function(t,e){function n(t,e,n){!0===t.transparent&&2===t.side?(t.side=1,t.needsUpdate=!0,Nt(t,e,n),t.side=0,t.needsUpdate=!0,Nt(t,e,n),t.side=2):Nt(t,e,n)}p=lt.get(t),p.init(),m.push(p),t.traverseVisible(function(t){t.isLight&&t.layers.test(e.layers
vendor: 51,007 bytes, line 2
2)&&(p.pushLight(t),t.castShadow&&p.pushShadow(t))}),p.setupLights(g.physicallyCorrectLights),t.traverse(function(e){const i=e.material;if(i)if(Array.isArray(i))for(let r=0;r<i.length;r++){n(i[r],t,e)}else n(i,t,e)}),m.pop(),p=null};let At=null;function Ct(){Lt.stop()}function Rt(){Lt.start()}const Lt=new Di;function Pt(t,e,n,i){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)n=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)p.pushLight(t),t.castShadow&&p.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||z.intersectsSprite(t)){i&&j.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G);const e=rt.update(t),r=t.material;r.visible&&d.push(t,e,r,n,j.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==K.render.frame&&(t.skeleton.update(),t.skeleton.frame=K.render.frame),!t.frustumCulled||z.intersectsObject(t))){i&&j.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G);const e=rt.update(t),r=t.material;if(Array.isArray(r)){const i=e.groups;for(let s=0,o=i.length;s<o;s++){const o=i[s],a=r[o.materialIndex];a&&a.visible&&d.push(t,e,a,n,j.z,o)}}else r.visible&&d.push(t,e,r,n,j.z,null)}const r=t.children;for(let t=0,s=r.length;t<s;t++)Pt(r[t],e,n,i)}function It(t,e,n,i){const r=t.opaque,s=t.transmissive,a=t.transparent;p.setupLightsView(n),s.length>0&&function(t,e,n){const i=Z.isWebGL2;null===V&&(V=new fe(1,1,{generateMipmaps:!0,type:q.has("EXT_color_buffer_half_float")?U:I,minFilter:P,samples:i&&!0===o?4:0}));g.getDrawingBufferSize(W),i?V.setSize(W.x,W.y):V.setSize(zt(W.x),zt(W.y));const r=g.getRenderTarget();g.setRenderTarget(V),g.clear();const s=g.toneMapping;g.toneMapping=0,Dt(t,e,n),g.toneMapping=s,Q.updateMultisampleRenderTarget(V),Q.updateRenderTargetMipmap(V),g.setRenderTarget(r)}(r,e,n),i&&J.viewport(w.copy(i)),r.length>0&&Dt(r,e,n),s.length>0&&Dt(s,e,n),a.length>0&&Dt(a,e,n),J.buffers.depth.setTest(!0),J.buffers.depth.setMask(!0),J.buffers.color.setMask(!0),J.setPolygonOffset(!1)}function Dt(t,e,n){const i=!0===e.isScene?e.overrideMaterial:null;for(let r=0,s=t.length;r<s;r++){const s=t[r],o=s.object,a=s.geometry,l=null===i?s.material:i,c=s.group;o.layers.test(n.layers)&&Ot(o,e,n,a,l,c)}}function Ot(t,e,n,i,r,s){t.onBeforeRender(g,e,n,i,r,s),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),r.onBeforeRender(g,e,n,i,t,s),!0===r.transparent&&2===r.side?(r.side=1,r.needsUpdate=!0,g.renderBufferDirect(n,e,i,r,t,s),r.side=0,r.needsUpdate=!0,g.renderBufferDirect(n,e,i,r,t,s),r.side=2):g.renderBufferDirect(n,e,i,r,t,s),t.onAfterRender(g,e,n,i,r,s)}function Nt(t,e,n){!0!==e.isScene&&(e=X);const i=$.get(t),r=p.state.lights,s=p.state.shadowsArray,o=r.state.version,a=st.getParameters(t,r.state,s,e,n),l=st.getProgramCacheKey(a);let c=i.programs;i.environment=t.isMeshStandardMaterial?e.environment:null,i.fog=e.fog,i.envMap=(t.isMeshStandardMaterial?et:tt).get(t.envMap||i.environment),void 0===c&&(t.addEventListener("dispose",Et),c=new Map,i.programs=c);let h=c.get(l);if(void 0!==h){if(i.currentProgram===h&&i.lightsStateVersion===o)return Ut(t,a),h}else a.uniforms=st.getUniforms(t),t.onBuild(n,a,g),t.onBeforeCompile(a,g),h=st.acquireProgram(a,l),c.set(l,h),i.uniforms=a.uniforms;const u=i.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(u.clippingPlanes=ct.uniform),Ut(t,a),i.needsLights=function(t){return t.isMeshLambertMaterial||t.isMeshToonMaterial||t.isMeshPhongMaterial||t.isMeshStandardMaterial||t.isShadowMaterial||t.isShaderMaterial&&!0===t.lights}(t),i.lightsStateVersion=o,i.needsLights&&(u.ambientLightColor.value=r.state.ambient,u.lightProbe.value=r.state.probe,u.directionalLights.value=r.state.directional,u.directionalLightShadows.value=r.state.directionalShadow,u.spotLights.value=r.state.spot,u.spotLightShadows.value=r.state.spotShadow,u.rectAreaLights.value=r.state.rectArea,u.ltc_1.value=r.state.rectAreaLTC1,u.ltc_2.value=r.state.rectAreaLTC2,u.pointLights.value=r.state.point,u.pointLightShadows.value=r.state.pointShadow,u.hemisphereLights.value=r.state.hemi,u.directionalShadowMap.value=r.state.directionalShadowMap,u.directionalShadowMatrix.value=r.state.directionalShadowMatrix,u.spotShadowMap.value=r.state.spotShadowMap,u.spotLightMatrix.value=r.state.spotLightMatrix,u.spotLightMap.value=r.state.spotLightMap,u.pointShadowMap.value=r.state.pointShadowMap,u.pointShadowMatrix.value=r.state.pointShadowMatrix);const d=h.getUniforms(),f=ys.seqWithValue(d.seq,u);return i.currentProgram=h,i.uniformsList=f,h}function Ut(t,e){const n=$.get(t);n.outputEncoding=e.outputEncoding,n.instancing=e.instancing,n.skinning=e.skinning,n.morphTargets=e.morphTargets,n.morphNormals=e.morphNormals,n.morphColors=e.morphColors,n.morphTargetsCount=e.morphTargetsCount,n.numClippingPlanes=e.numClippingPlanes,n.numIntersection=e.numClipIntersection,n.vertexAlphas=e.vertexAlphas,n.vertexTangents=e.vertexTangents,n.toneMapping=e.toneMapping}Lt.setAnimationLoop(function(t){At&&At(t)}),"undefined"!=typeof self&&Lt.setContext(self),this.setAnimationLoop=function(t){At=t,Mt.setAnimationLoop(t),null===t?Lt.stop():Lt.start()},Mt.addEventListener("sessionstart",Ct),Mt.addEventListener("sessionend",Rt),this.render=function(t,e){if(void 0!==e&&!0!==e.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===v)return;!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),null===e.parent&&!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),!0===Mt.enabled&&!0===Mt.isPresenting&&(!0===Mt.cameraAutoUpdate&&Mt.updateCamera(e),e=Mt.getCamera()),!0===t.isScene&&t.onBeforeRender(g,t,e,x),p=lt.get(t,m.length),p.init(),m.push(p),G.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),z.setFromProjectionMatrix(G),H=this.localClippingEnabled,B=ct.init(this.clippingPlanes,H,e),d=at.get(t,f.length),d.init(),f.push(d),Pt(t,e,0,g.sortObjects),d.finish(),!0===g.sortObjects&&d.sort(R,L),!0===B&&ct.beginShadows();const n=p.state.shadowsArray;if(ht.render(n,t,e),!0===B&&ct.endShadows(),!0===this.info.autoReset&&this.info.reset(),ut.render(d,t),p.setupLights(g.physicallyCorrectLights),e.isArrayCamera){const n=e.cameras;for(let e=0,i=n.length;e<i;e++){const i=n[e];It(d,t,i,i.viewport)}}else It(d,t,e);null!==x&&(Q.updateMultisampleRenderTarget(x),Q.updateRenderTargetMipmap(x)),!0===t.isScene&&t.onAfterRender(g,t,e),gt.resetDefaultState(),b=-1,M=null,m.pop(),p=m.length>0?m[m.length-1]:null,f.pop(),d=f.length>0?f[f.length-1]:null},this.getActiveCubeFace=function(){return _},this.getActiveMipmapLevel=function(){return y},this.getRenderTarget=function(){return x},this.setRenderTargetTextures=function(t,e,n){$.get(t.texture).__webglTexture=e,$.get(t.depthTexture).__webglTexture=n;const i=$.get(t);i.__hasExternalTextures=!0,i.__hasExternalTextures&&(i.__autoAllocateDepthBuffer=void 0===n,i.__autoAllocateDepthBuffer||!0===q.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),i.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(t,e){const n=$.get(t);n.__webglFramebuffer=e,n.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,n=0){x=t,_=e,y=n;let i=!0,r=null,s=!1,o=!1;if(t){const n=$.get(t);void 0!==n.__useDefaultFramebuffer?(J.bindFramebuffer(_t.FRAMEBUFFER,null),i=!1):void 0===n.__webglFramebuffer?Q.setupRenderTarget(t):n.__hasExternalTextures&&Q.rebindTextures(t,$.get(t.texture).__webglTexture,$.get(t.depthTexture).__webglTexture);const a=t.texture;(a.isData3DTexture||a.isDataArrayTexture||a.isCompressedArrayTexture)&&(o=!0);const l=$.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(r=l[e],s=!0):r=Z.isWebGL2&&t.samples>0&&!1===Q.useMultisampledRTT(t)?$.get(t).__webglMultisampledFramebuffer:l,w.copy(t.viewport),S.copy(t.scissor),T=t.scissorTest}else w.copy(D).multiplyScalar(C).floor(),S.copy(O).multiplyScalar(C).floor(),T=k;if(J.bindFramebuffer(_t.FRAMEBUFFER,r)&&Z.drawBuffers&&i&&J.drawBuffers(t,r),J.viewport(w),J.scissor(S),J.setScissorTest(T),s){const i=$.get(t.texture);_t.framebufferTexture2D(_t.FRAMEBUFFER,_t.COLOR_ATTACHMENT0,_t.TEXTURE_CUBE_MAP_POSITIVE_X+e,i.__webglTexture,n)}else if(o){const i=$.get(t.texture),r=e||0;_t.framebufferTextureLayer(_t.FRAMEBUFFER,_t.COLOR_ATTACHMENT0,i.__webglTexture,n||0,r)}b=-1},this.readRenderTargetPixels=function(t,e,n,i,r,s,o){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=$.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==o&&(a=a[o]),a){J.bindFramebuffer(_t.FRAMEBUFFER,a);try{const o=t.texture,a=o.format,l=o.type;if(a!==F&&mt.convert(a)!==_t.getParameter(_t.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===U&&(q.has("EXT_color_buffer_half_float")||Z.isWebGL2&&q.has("EXT_color_buffer_float"));if(!(l===I||mt.convert(l)===_t.getParameter(_t.IMPLEMENTATION_COLOR_READ_TYPE)||l===N&&(Z.isWebGL2||q.has("OES_texture_float")||q.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-i&&n>=0&&n<=t.height-r&&_t.readPixels(e,n,i,r,mt.convert(a),mt.convert(l),s)}finally{const t=null!==x?$.get(x).__webglFramebuffer:null;J.bindFramebuffer(_t.FRAMEBUFFER,t)}}},this.copyFramebufferToTexture=function(t,e,n=0){const i=Math.pow(2,-n),r=Math.floor(e.image.width*i),s=Math.floor(e.image.height*i);Q.setTexture2D(e,0),_t.copyTexSubImage2D(_t.TEXTURE_2D,n,0,0,t.x,t.y,r,s),J.unbindTexture()},this.copyTextureToTexture=function(t,e,n,i=0){const r=e.image.width,s=e.image.height,o=mt.convert(n.format),a=mt.convert(n.type);Q.setTexture2D(n,0),_t.pixelStorei(_t.UNPACK_FLIP_Y_WEBGL,n.flipY),_t.pixelStorei(_t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),_t.pixelStorei(_t.UNPACK_ALIGNMENT,n.unpackAlignment),e.isDataTexture?_t.texSubImage2D(_t.TEXTURE_2D,i,t.x,t.y,r,s,o,a,e.image.data):e.isCompressedTexture?_t.compressedTexSubImage2D(_t.TEXTURE_2D,i,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,o,e.mipmaps[0].data):_t.texSubImage2D(_t.TEXTURE_2D,i,t.x,t.y,o,a,e.image),0===i&&n.generateMipmaps&&_t.generateMipmap(_t.TEXTURE_2D),J.unbindTexture()},this.copyTextureToTexture3D=function(t,e,n,i,r=0){if(g.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=t.max.x-t.min.x+1,o=t.max.y-t.min.y+1,a=t.max.z-t.min.z+1,l=mt.convert(i.format),c=mt.convert(i.type);let h;if(i.isData3DTexture)Q.setTexture3D(i,0),h=_t.TEXTURE_3D;else{if(!i.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Q.setTexture2DArray(i,0),h=_t.TEXTURE_2D_ARRAY}_t.pixelStorei(_t.UNPACK_FLIP_Y_WEBGL,i.flipY),_t.pixelStorei(_t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),_t.pixelStorei(_t.UNPACK_ALIGNMENT,i.unpackAlignment);const u=_t.getParameter(_t.UNPACK_ROW_LENGTH),d=_t.getParameter(_t.UNPACK_IMAGE_HEIGHT),p=_t.getParameter(_t.UNPACK_SKIP_PIXELS),f=_t.getParameter(_t.UNPACK_SKIP_ROWS),m=_t.getParameter(_t.UNPACK_SKIP_IMAGES),v=n.isCompressedTexture?n.mipmaps[0]:n.image;_t.pixelStorei(_t.UNPACK_ROW_LENGTH,v.width),_t.pixelStorei(_t.UNPACK_IMAGE_HEIGHT,v.height),_t.pixelStorei(_t.UNPACK_SKIP_PIXELS,t.min.x),_t.pixelStorei(_t.UNPACK_SKIP_ROWS,t.min.y),_t.pixelStorei(_t.UNPACK_SKIP_IMAGES,t.min.z),n.isDataTexture||n.isData3DTexture?_t.texSubImage3D(h,r,e.x,e.y,e.z,s,o,a,l,c,v.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),_t.compressedTexSubImage3D(h,r,e.x,e.y,e.z,s,o,a,l,v.data)):_t.texSubImage3D(h,r,e.x,e.y,e.z,s,o,a,l,c,v),_t.pixelStorei(_t.UNPACK_ROW_LENGTH,u),_t.pixelStorei(_t.UNPACK_IMAGE_HEIGHT,d),_t.pixelStorei(_t.UNPACK_SKIP_PIXELS,p),_t.pixelStorei(_t.UNPACK_SKIP_ROWS,f),_t.pixelStorei(_t.UNPACK_SKIP_IMAGES,m),0===r&&i.generateMipmaps&&_t.generateMipmap(h),J.unbindTexture()},this.initTexture=function(t){t.isCubeTexture?Q.setTextureCube(t,0):t.isData3DTexture?Q.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?Q.setTexture2DArray(t,0):Q.setTexture2D(t,0),J.unbindTexture()},this.resetState=function(){_=0,y=0,x=null,J.reset(),gt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class po extends uo{}po.prototype.isWebGL1Renderer=!0;class fo{constructor(t,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new oe(t),this.density=e}clone(){return new fo(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class mo{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new oe(t),this.near=e,this.far=n}clone(){return new mo(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class go extends xn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.backgroundIntensity=this.backgroundIntensity),e}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(t){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=t}}class vo{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Tt,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Dt()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let i=0,r=this.stride;i<r;i++)this.array[t+i]=e.array[n+i];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Dt()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(e,this.stride);return n.setUsage(this.usage),n}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Dt()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const _o=new _e;class yo{constructor(t,e,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,n=this.data.count;e<n;e++)_o.fromBufferAttribute(this,e),_o.applyMatrix4(t),this.setXYZ(e,_o.x,_o.y,_o.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)_o.fromBufferAttribute(this,e),_o.applyNormalMatrix(t),this.setXYZ(e,_o.x,_o.y,_o.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)_o.fromBufferAttribute(this,e),_o.transformDirection(t),this.setXYZ(e,_o.x,_o.y,_o.z);return this}setX(t,e){return this.normalized&&(e=Ht(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=Ht(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=Ht(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=Ht(e,this.array)),this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){let e=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(e=Bt(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=Bt(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=Bt(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=Bt(e,this.array)),e}setXY(t,e,n){return t=t*this.data.stride+this.offset,this.normalized&&(e=Ht(e,this.array),n=Ht(n,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=n,this}setXYZ(t,e,n,i){return t=t*this.data.stride+this.offset,this.normalized&&(e=Ht(e,this.array),n=Ht(n,this.array),i=Ht(i,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this}setXYZW(t,e,n,i,r){return t=t*this.data.stride+this.offset,this.normalized&&(e=Ht(e,this.array),n=Ht(n,this.array),i=Ht(i,this.array),r=Ht(r,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=i,this.data.array[t+3]=r,this}clone(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let e=0;e<this.count;e++){const n=e*this.data.stride+this.offset;for(let e=0;e<this.itemSize;e++)t.push(this.data.array[n+e])}return new kn(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new yo(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let e=0;e<this.count;e++){const n=e*this.data.stride+this.offset;for(let e=0;e<this.itemSize;e++)t.push(this.data.array[n+e])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class xo extends Dn{constructor(t){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new oe(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}let bo;const Mo=new _e,wo=new _e,So=new _e,To=new Gt,Eo=new Gt,Ao=new qe,Co=new _e,Ro=new _e,Lo=new _e,Po=new Gt,Io=new Gt,Do=new Gt;class Oo extends xn{constructor(t){if(super(),this.isSprite=!0,this.type="Sprite",void 0===bo){bo=new qn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),e=new vo(t,5);bo.setIndex([0,1,2,0,2,3]),bo.setAttribute("position",new yo(e,3,0,!1)),bo.setAttribute("uv",new yo(e,2,3,!1))}this.geometry=bo,this.material=void 0!==t?t:new xo,this.center=new Gt(.5,.5)}raycast(t,e){null===t.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),wo.setFromMatrixScale(this.matrixWorld),Ao.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),So.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&wo.multiplyScalar(-So.z);const n=this.material.rotation;let i,r;0!==n&&(r=Math.cos(n),i=Math.sin(n));const s=this.center;No(Co.set(-.5,-.5,0),So,s,wo,i,r),No(Ro.set(.5,-.5,0),So,s,wo,i,r),No(Lo.set(.5,.5,0),So,s,wo,i,r),Po.set(0,0),Io.set(1,0),Do.set(1,1);let o=t.ray.intersectTriangle(Co,Ro,Lo,!1,Mo);if(null===o&&(No(Ro.set(-.5,.5,0),So,s,wo,i,r),Io.set(0,1),o=t.ray.intersectTriangle(Co,Lo,Ro,!1,Mo),null===o))return;const a=t.ray.origin.distanceTo(Mo);a<t.near||a>t.far||e.push({distance:a,point:Mo.clone(),uv:Pn.getUV(Mo,Co,Ro,Lo,Po,Io,Do,new Gt),face:null,object:this})}copy(t,e){return super.copy(t,e),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function No(t,e,n,i,r,s){To.subVectors(t,n).addScalar(.5).multiply(i),void 0!==r?(Eo.x=s*To.x-r*To.y,Eo.y=r*To.x+s*To.y):Eo.copy(To),t.copy(e),t.x+=Eo.x,t.y+=Eo.y,t.applyMatrix4(Ao)}const Uo=new _e,ko=new _e;class Fo extends xn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let t=0,n=e.length;t<n;t++){const n=e[t];this.addLevel(n.object.clone(),n.distance,n.hysteresis)}return this.autoUpdate=t.autoUpdate,this}addLevel(t,e=0,n=0){e=Math.abs(e);const i=this.levels;let r;for(r=0;r<i.length&&!(e<i[r].distance);r++);return i.splice(r,0,{distance:e,hysteresis:n,object:t}),this.add(t),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(t){const e=this.levels;if(e.length>0){let n,i;for(n=1,i=e.length;n<i;n++){let i=e[n].distance;if(e[n].object.visible&&(i-=i*e[n].hysteresis),t<i)break}return e[n-1].object}return null}raycast(t,e){if(this.levels.length>0){Uo.setFromMatrixPosition(this.matrixWorld);const n=t.ray.origin.distanceTo(Uo);this.getObjectForDistance(n).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){Uo.setFromMatrixPosition(t.matrixWorld),ko.setFromMatrixPosition(this.matrixWorld);const n=Uo.distanceTo(ko)/t.zoom;let i,r;for(e[0].object.visible=!0,i=1,r=e.length;i<r;i++){let t=e[i].distance;if(e[i].object.visible&&(t-=t*e[i].hysteresis),!(n>=t))break;e[i-1].object.visible=!1,e[i].object.visible=!0}for(this._currentLevel=i-1;i<r;i++)e[i].object.visible=!1}}toJSON(t){const e=super.toJSON(t);!1===this.autoUpdate&&(e.object.autoUpdate=!1),e.object.levels=[];const n=this.levels;for(let t=0,i=n.length;t<i;t++){const i=n[t];e.object.levels.push({object:i.object.uuid,distance:i.distance,hysteresis:i.hysteresis})}return e}}const zo=new _e,Bo=new pe,Ho=new pe,Vo=new _e,Go=new qe;class Wo extends di{constructor(t,e){super(t,e),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new qe,this.bindMatrixInverse=new qe}copy(t,e){return super.copy(t,e),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,this}bind(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const t=new pe,e=this.geometry.attributes.skinWeight;for(let n=0,i=e.count;n<i;n++){t.fromBufferAttribute(e,n);const i=1/t.manhattanLength();i!==1/0?t.multiplyScalar(i):t.set(1,0,0,0),e.setXYZW(n,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(t,e){const n=this.skeleton,i=this.geometry;Bo.fromBufferAttribute(i.attributes.skinIndex,t),Ho.fromBufferAttribute(i.attributes.skinWeight,t),zo.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let t=0;t<4;t++){const i=Ho.getComponent(t);if(0!==i){const r=Bo.getComponent(t);Go.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),e.addScaledVector(Vo.copy(zo).applyMatrix4(Go),i)}}return e.applyMatrix4(this.bindMatrixInverse)}}class jo extends xn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Xo extends de{constructor(t=null,e=1,n=1,i,r,s,o,a,l=1003,c=1003,h,u){super(null,s,o,a,l,c,i,r,h,u),this.isDataTexture=!0,this.image={data:t,width:e,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Yo=new qe,qo=new qe;class Zo{constructor(t=[],e=[]){this.uuid=Dt(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(16*t.length),0===e.length)this.calculateInverses();else if(t.length!==e.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let t=0,e=this.bones.length;t<e;t++)this.boneInverses.push(new qe)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const e=new qe;this.bones[t]&&e.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(e)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&e.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const e=this.bones[t];e&&(e.parent&&e.parent.isBone?(e.matrix.copy(e.parent.matrixWorld).invert(),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))}}update(){const t=this.bones,e=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let i=0,r=t.length;i<r;i++){const r=t[i]?t[i].matrixWorld:qo;Yo.multiplyMatrices(r,e[i]),Yo.toArray(n,16*i)}null!==i&&(i.needsUpdate=!0)}clone(){return new Zo(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(4*this.bones.length);t=Ft(t),t=Math.max(t,4);const e=new Float32Array(t*t*4);e.set(this.boneMatrices);const n=new Xo(e,t,t,F,N);return n.needsUpdate=!0,this.boneMatrices=e,this.boneTexture=n,this.boneTextureSize=t,this}getBoneByName(t){for(let e=0,n=this.bones.length;e<n;e++){const n=this.bones[e];if(n.name===t)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let n=0,i=t.bones.length;n<i;n++){const i=t.bones[n];let r=e[i];void 0===r&&(console.warn("THREE.Skeleton: No bone found with UUID:",i),r=new jo),this.bones.push(r),this.boneInverses.push((new qe).fromArray(t.boneInverses[n]))}return this.init(),this}toJSON(){const t={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,n=this.boneInverses;for(let i=0,r=e.length;i<r;i++){const r=e[i];t.bones.push(r.uuid);const s=n[i];t.boneInverses.push(s.toArray())}return t}}class Jo extends kn{constructor(t,e,n,i=1){super(t,e,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}const Ko=new qe,$o=new qe,Qo=[],ta=new qe,ea=new di;class na extends di{constructor(t,e,n){super(t,e),this.isInstancedMesh=!0,this.instanceMatrix=new Jo(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1;for(let t=0;t<n;t++)this.setMatrixAt(t,ta)}copy(t,e){return super.copy(t,e),this.instanceMatrix.copy(t.instanceMatrix),null!==t.instanceColor&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,this}getColorAt(t,e){e.fromArray(this.instanceColor.array,3*t)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,16*t)}raycast(t,e){const n=this.matrixWorld,i=this.count;if(ea.geometry=this.geometry,ea.material=this.material,void 0!==ea.material)for(let r=0;r<i;r++){this.getMatrixAt(r,Ko),$o.multiplyMatrices(n,Ko),ea.matrixWorld=$o,ea.raycast(t,Qo);for(let t=0,n=Qo.length;t<n;t++){const n=Qo[t];n.instanceId=r,n.object=this,e.push(n)}Qo.length=0}}setColorAt(t,e){null===this.instanceColor&&(this.instanceColor=new Jo(new Float32Array(3*this.instanceMatrix.count),3)),e.toArray(this.instanceColor.array,3*t)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,16*t)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class ia extends Dn{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new oe(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const ra=new _e,sa=new _e,oa=new qe,aa=new Ye,la=new ze;class ca extends xn{constructor(t=new qn,e=new ia){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[0];for(let t=1,i=e.count;t<i;t++)ra.fromBufferAttribute(e,t-1),sa.fromBufferAttribute(e,t),n[t]=n[t-1],n[t]+=ra.distanceTo(sa);t.setAttribute("lineDistance",new Bn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Line.threshold,s=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),la.copy(n.boundingSphere),la.applyMatrix4(i),la.radius+=r,!1===t.ray.intersectsSphere(la))return;oa.copy(i).invert(),aa.copy(t.ray).applyMatrix4(oa);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,l=new _e,c=new _e,h=new _e,u=new _e,d=this.isLineSegments?2:1,p=n.index,f=n.attributes.position;if(null!==p){for(let n=Math.max(0,s.start),i=Math.min(p.count,s.start+s.count)-1;n<i;n+=d){const i=p.getX(n),r=p.getX(n+1);l.fromBufferAttribute(f,i),c.fromBufferAttribute(f,r);if(aa.distanceSqToSegment(l,c,u,h)>a)continue;u.applyMatrix4(this.matrixWorld);const s=t.ray.origin.distanceTo(u);s<t.near||s>t.far||e.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,s.start),i=Math.min(f.count,s.start+s.count)-1;n<i;n+=d){l.fromBufferAttribute(f,n),c.fromBufferAttribute(f,n+1);if(aa.distanceSqToSegment(l,c,u,h)>a)continue;u.applyMatrix4(this.matrixWorld);const i=t.ray.origin.distanceTo(u);i<t.near||i>t.far||e.push({distance:i,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t<e;t++){const e=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[e]=t}}}}}const ha=new _e,ua=new _e;class da extends ca{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let t=0,i=e.count;t<i;t+=2)ha.fromBufferAttribute(e,t),ua.fromBufferAttribute(e,t+1),n[t]=0===t?0:n[t-1],n[t+1]=n[t]+ha.distanceTo(ua);t.setAttribute("lineDistance",new Bn(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class pa extends ca{constructor(t,e){super(t,e),this.isLineLoop=!0,this.type="LineLoop"}}class fa extends Dn{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new oe(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}const ma=new qe,ga=new Ye,va=new ze,_a=new _e;class ya extends xn{constructor(t=new qn,e=new fa){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=t.material,this.geometry=t.geometry,this}raycast(t,e){const n=this.geometry,i=this.matrixWorld,r=t.params.Points.threshold,s=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),va.copy(n.boundingSphere),va.applyMatrix4(i),va.radius+=r,!1===t.ray.intersectsSphere(va))return;ma.copy(i).invert(),ga.copy(t.ray).applyMatrix4(ma);const o=r/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,l=n.index,c=n.attributes.position;if(null!==l){for(let n=Math.max(0,s.start),r=Math.min(l.count,s.start+s.count);n<r;n++){const r=l.getX(n);_a.fromBufferAttribute(c,r),xa(_a,r,a,i,t,e,this)}}else{for(let n=Math.max(0,s.start),r=Math.min(c.count,s.start+s.count);n<r;n++)_a.fromBufferAttribute(c,n),xa(_a,n,a,i,t,e,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t<e;t++){const e=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[e]=t}}}}}function xa(t,e,n,i,r,s,o){const a=ga.distanceSqToPoint(t);if(a<n){const n=new _e;ga.closestPointToPoint(t,n),n.applyMatrix4(i);const l=r.ray.origin.distanceTo(n);if(l<r.near||l>r.far)return;s.push({distance:l,distanceToRay:Math.sqrt(a),point:n,index:e,face:null,object:o})}}class ba extends de{constructor(t,e,n,i,r,s,o,a,l,c,h,u){super(null,s,o,a,l,c,i,r,h,u),this.isCompressedTexture=!0,this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class Ma{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)}getPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e}getSpacedPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let n,i=this.getPoint(0),r=0;e.push(0);for(let s=1;s<=t;s++)n=this.getPoint(s/t),r+=n.distanceTo(i),e.push(r),i=n;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const n=this.getLengths();let i=0;const r=n.length;let s;s=e||t*n[r-1];let o,a=0,l=r-1;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),o=n[i]-s,o<0)a=i+1;else{if(!(o>0)){l=i;break}l=i-1}if(i=l,n[i]===s)return i/(r-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}getTangent(t,e){const n=1e-4;let i=t-n,r=t+n;i<0&&(i=0),r>1&&(r=1);const s=this.getPoint(i),o=this.getPoint(r),a=e||(s.isVector2?new Gt:new _e);return a.copy(o).sub(s).normalize(),a}getTangentAt(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e){const n=new _e,i=[],r=[],s=[],o=new _e,a=new qe;for(let e=0;e<=t;e++){const n=e/t;i[e]=this.getTangentAt(n,new _e)}r[0]=new _e,s[0]=new _e;let l=Number.MAX_VALUE;const c=Math.abs(i[0].x),h=Math.abs(i[0].y),u=Math.abs(i[0].z);c<=l&&(l=c,n.set(1,0,0)),h<=l&&(l=h,n.set(0,1,0)),u<=l&&n.set(0,0,1),o.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],o),s[0].crossVectors(i[0],r[0]);for(let e=1;e<=t;e++){if(r[e]=r[e-1].clone(),s[e]=s[e-1].clone(),o.crossVectors(i[e-1],i[e]),o.length()>Number.EPSILON){o.normalize();const t=Math.acos(Ot(i[e-1].dot(i[e]),-1,1));r[e].applyMatrix4(a.makeRotationAxis(o,t))}s[e].crossVectors(i[e],r[e])}if(!0===e){let e=Math.acos(Ot(r[0].dot(r[t]),-1,1));e/=t,i[0].dot(o.crossVectors(r[0],r[t]))>0&&(e=-e);for(let n=1;n<=t;n++)r[n].applyMatrix4(a.makeRotationAxis(i[n],e*n)),s[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class wa extends Ma{constructor(t=0,e=0,n=1,i=1,r=0,s=2*Math.PI,o=!1,a=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=o,this.aRotation=a}getPoint(t,e){const n=e||new Gt,i=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(r=s?0:i),!0!==this.aClockwise||s||(r===i?r=-i:r-=i);const o=this.aStartAngle+t*r;let a=this.aX+this.xRadius*Math.cos(o),l=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){const t=Math.cos(this.aRotation),e=Math.sin(this.aRotation),n=a-this.aX,i=l-this.aY;a=n*t-i*e+this.aX,l=n*e+i*t+this.aY}return n.set(a,l)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){const t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}}class Sa extends wa{constructor(t,e,n,i,r,s){super(t,e,n,n,i,r,s),this.isArcCurve=!0,this.type="ArcCurve"}}function Ta(){let t=0,e=0,n=0,i=0;function r(r,s,o,a){t=r,e=o,n=-3*r+3*s-2*o-a,i=2*r-2*s+o+a}return{initCatmullRom:function(t,e,n,i,s){r(e,n,s*(n-t),s*(i-e))},initNonuniformCatmullRom:function(t,e,n,i,s,o,a){let l=(e-t)/s-(n-t)/(s+o)+(n-e)/o,c=(n-e)/o-(i-e)/(o+a)+(i-n)/a;l*=o,c*=o,r(e,n,l,c)},calc:function(r){const s=r*r;return t+e*r+n*s+i*(s*r)}}}const Ea=new _e,Aa=new Ta,Ca=new Ta,Ra=new Ta;class La extends Ma{constructor(t=[],e=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=t,this.closed=e,this.curveType=n,this.tension=i}getPoint(t,e=new _e){const n=e,i=this.points,r=i.length,s=(r-(this.closed?0:1))*t;let o,a,l=Math.floor(s),c=s-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/r)+1)*r:0===c&&l===r-1&&(l=r-2,c=1),this.closed||l>0?o=i[(l-1)%r]:(Ea.subVectors(i[0],i[1]).add(i[0]),o=Ea);const h=i[l%r],u=i[(l+1)%r];if(this.closed||l+2<r?a=i[(l+2)%r]:(Ea.subVectors(i[r-1],i[r-2]).add(i[r-1]),a=Ea),"centripetal"===this.curveType||"chordal"===this.curveType){const t="chordal"===this.curveType?.5:.25;let e=Math.pow(o.distanceToSquared(h),t),n=Math.pow(h.distanceToSquared(u),t),i=Math.pow(u.distanceToSquared(a),t);n<1e-4&&(n=1),e<1e-4&&(e=n),i<1e-4&&(i=n),Aa.initNonuniformCatmullRom(o.x,h.x,u.x,a.x,e,n,i),Ca.initNonuniformCatmullRom(o.y,h.y,u.y,a.y,e,n,i),Ra.initNonuniformCatmullRom(o.z,h.z,u.z,a.z,e,n,i)}else"catmullrom"===this.curveType&&(Aa.initCatmullRom(o.x,h.x,u.x,a.x,this.tension),Ca.initCatmullRom(o.y,h.y,u.y,a.y,this.tension),Ra.initCatmullRom(o.z,h.z,u.z,a.z,this.tension));return n.set(Aa.calc(c),Ca.calc(c),Ra.calc(c)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push(n.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,n=this.points.length;e<n;e++){const n=this.points[e];t.points.push(n.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push((new _e).fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}}function Pa(t,e,n,i,r){const s=.5*(i-e),o=.5*(r-n),a=t*t;return(2*n-2*i+s+o)*(t*a)+(-3*n+3*i-2*s-o)*a+s*t+n}function Ia(t,e,n,i){return function(t,e){const n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,i)}function Da(t,e,n,i,r){return function(t,e){const n=1-t;return n*n*n*e}(t,e)+function(t,e){const n=1-t;return 3*n*n*t*e}(t,n)+function(t,e){return 3*(1-t)*t*t*e}(t,i)+function(t,e){return t*t*t*e}(t,r)}class Oa extends Ma{constructor(t=new Gt,e=new Gt,n=new Gt,i=new Gt){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=n,this.v3=i}getPoint(t,e=new Gt){const n=e,i=this.v0,r=this.v1,s=this.v2,o=this.v3;return n.set(Da(t,i.x,r.x,s.x,o.x),Da(t,i.y,r.y,s.y,o.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}class Na extends Ma{constructor(t=new _e,e=new _e,n=new _e,i=new _e){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=n,this.v3=i}getPoint(t,e=new _e){const n=e,i=this.v0,r=this.v1,s=this.v2,o=this.v3;return n.set(Da(t,i.x,r.x,s.x,o.x),Da(t,i.y,r.y,s.y,o.y),Da(t,i.z,r.z,s.z,o.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}class Ua extends Ma{constructor(t=new Gt,e=new Gt){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new Gt){const n=e;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e){const n=e||new Gt;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class ka extends Ma{constructor(t=new _e,e=new _e){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=t,this.v2=e}getPoint(t,e=new _e){const n=e;return 1===t?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,e){return this.getPoint(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Fa extends Ma{constructor(t=new Gt,e=new Gt,n=new Gt){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=n}getPoint(t,e=new Gt){const n=e,i=this.v0,r=this.v1,s=this.v2;return n.set(Ia(t,i.x,r.x,s.x),Ia(t,i.y,r.y,s.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class za extends Ma{constructor(t=new _e,e=new _e,n=new _e){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=n}getPoint(t,e=new _e){const n=e,i=this.v0,r=this.v1,s=this.v2;return n.set(Ia(t,i.x,r.x,s.x),Ia(t,i.y,r.y,s.y),Ia(t,i.z,r.z,s.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Ba extends Ma{constructor(t=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=t}getPoint(t,e=new Gt){const n=e,i=this.points,r=(i.length-1)*t,s=Math.floor(r),o=r-s,a=i[0===s?s:s-1],l=i[s],c=i[s>i.length-2?i.length-1:s+1],h=i[s>i.length-3?i.length-1:s+2];return n.set(Pa(o,a.x,l.x,c.x,h.x),Pa(o,a.y,l.y,c.y,h.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push(n.clone())}return this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,n=this.points.length;e<n;e++){const n=this.points[e];t.points.push(n.toArray())}return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,n=t.points.length;e<n;e++){const n=t.points[e];this.points.push((new Gt).fromArray(n))}return this}}var Ha=Object.freeze({__proto__:null,ArcCurve:Sa,CatmullRomCurve3:La,CubicBezierCurve:Oa,CubicBezierCurve3:Na,EllipseCurve:wa,LineCurve:Ua,LineCurve3:ka,QuadraticBezierCurve:Fa,QuadraticBezierCurve3:za,SplineCurve:Ba});class Va extends Ma{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){const t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Ua(e,t))}getPoint(t,e){const n=t*this.getLength(),i=this.getCurveLengths();let r=0;for(;r<i.length;){if(i[r]>=n){const t=i[r]-n,s=this.curves[r],o=s.getLength(),a=0===o?0:1-t/o;return s.getPointAt(a,e)}r++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,i=this.curves.length;n<i;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t}getSpacedPoints(t=40){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e}getPoints(t=12){const e=[];let n;for(let i=0,r=this.curves;i<r.length;i++){const s=r[i],o=s.isEllipseCurve?2*t:s.isLineCurve||s.isLineCurve3?1:s.isSplineCurve?t*s.points.length:t,a=s.getPoints(o);for(let t=0;t<a.length;t++){const i=a[t];n&&n.equals(i)||(e.push(i),n=i)}}return this.autoClose&&e.length>1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e<n;e++){const n=t.curves[e];this.curves.push(n.clone())}return this.autoClose=t.autoClose,this}toJSON(){const t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let e=0,n=this.curves.length;e<n;e++){const n=this.curves[e];t.curves.push(n.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let e=0,n=t.curves.length;e<n;e++){const n=t.curves[e];this.curves.push((new Ha[n.type]).fromJSON(n))}return this}}class Ga extends Va{constructor(t){super(),this.type="Path",this.currentPoint=new Gt,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y);return this}moveTo(t,e){return this.currentPoint.set(t,e),this}lineTo(t,e){const n=new Ua(this.currentPoint.clone(),new Gt(t,e));return this.curves.push(n),this.currentPoint.set(t,e),this}quadraticCurveTo(t,e,n,i){const r=new Fa(this.currentPoint.clone(),new Gt(t,e),new Gt(n,i));return this.curves.push(r),this.currentPoint.set(n,i),this}bezierCurveTo(t,e,n,i,r,s){const o=new Oa(this.currentPoint.clone(),new Gt(t,e),new Gt(n,i),new Gt(r,s));return this.curves.push(o),this.currentPoint.set(r,s),this}splineThru(t){const e=[this.currentPoint.clone()].concat(t),n=new Ba(e);return this.curves.push(n),this.currentPoint.copy(t[t.length-1]),this}arc(t,e,n,i,r,s){const o=this.currentPoint.x,a=this.currentPoint.y;return this.absarc(t+o,e+a,n,i,r,s),this}absarc(t,e,n,i,r,s){return this.absellipse(t,e,n,n,i,r,s),this}ellipse(t,e,n,i,r,s,o,a){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(t+l,e+c,n,i,r,s,o,a),this}absellipse(t,e,n,i,r,s,o,a){const l=new wa(t,e,n,i,r,s,o,a);if(this.curves.length>0){const t=l.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class Wa extends qn{constructor(t=[new Gt(0,-.5),new Gt(.5,0),new Gt(0,.5)],e=12,n=0,i=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:i},e=Math.floor(e),i=Ot(i,0,2*Math.PI);const r=[],s=[],o=[],a=[],l=[],c=1/e,h=new _e,u=new Gt,d=new _e,p=new _e,f=new _e;let m=0,g=0;for(let e=0;e<=t.length-1;e++)switch(e){case 0:m=t[e+1].x-t[e].x,g=t[e+1].y-t[e].y,d.x=1*g,d.y=-m,d.z=0*g,f.copy(d),d.normalize(),a.push(d.x,d.y,d.z);break;case t.length-1:a.push(f.x,f.y,f.z);break;default:m=t[e+1].x-t[e].x,g=t[e+1].y-t[e].y,d.x=1*g,d.y=-m,d.z=0*g,p.copy(d),d.x+=f.x,d.y+=f.y,d.z+=f.z,d.normalize(),a.push(d.x,d.y,d.z),f.copy(p)}for(let r=0;r<=e;r++){const d=n+r*c*i,p=Math.sin(d),f=Math.cos(d);for(let n=0;n<=t.length-1;n++){h.x=t[n].x*p,h.y=t[n].y,h.z=t[n].x*f,s.push(h.x,h.y,h.z),u.x=r/e,u.y=n/(t.length-1),o.push(u.x,u.y);const i=a[3*n+0]*p,c=a[3*n+1],d=a[3*n+0]*f;l.push(i,c,d)}}for(let n=0;n<e;n++)for(let e=0;e<t.length-1;e++){const i=e+n*t.length,s=i,o=i+t.length,a=i+t.length+1,l=i+1;r.push(s,o,l),r.push(a,l,o)}this.setIndex(r),this.setAttribute("position",new Bn(s,3)),this.setAttribute("uv",new Bn(o,2)),this.setAttribute("normal",new Bn(l,3))}static fromJSON(t){return new Wa(t.points,t.segments,t.phiStart,t.phiLength)}}class ja extends Wa{constructor(t=1,e=1,n=4,i=8){const r=new Ga;r.absarc(0,-e/2,t,1.5*Math.PI,0),r.absarc(0,e/2,t,0,.5*Math.PI),super(r.getPoints(n),i),this.type="CapsuleGeometry",this.parameters={radiu
vendor: 2,479 bytes, line 2
2s:t,height:e,capSegments:n,radialSegments:i}}static fromJSON(t){return new ja(t.radius,t.length,t.capSegments,t.radialSegments)}}class Xa extends qn{constructor(t=1,e=8,n=0,i=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:i},e=Math.max(3,e);const r=[],s=[],o=[],a=[],l=new _e,c=new Gt;s.push(0,0,0),o.push(0,0,1),a.push(.5,.5);for(let r=0,h=3;r<=e;r++,h+=3){const u=n+r/e*i;l.x=t*Math.cos(u),l.y=t*Math.sin(u),s.push(l.x,l.y,l.z),o.push(0,0,1),c.x=(s[h]/t+1)/2,c.y=(s[h+1]/t+1)/2,a.push(c.x,c.y)}for(let t=1;t<=e;t++)r.push(t,t+1,0);this.setIndex(r),this.setAttribute("position",new Bn(s,3)),this.setAttribute("normal",new Bn(o,3)),this.setAttribute("uv",new Bn(a,2))}static fromJSON(t){return new Xa(t.radius,t.segments,t.thetaStart,t.thetaLength)}}class Ya extends qn{constructor(t=1,e=1,n=1,i=8,r=1,s=!1,o=0,a=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a};const l=this;i=Math.floor(i),r=Math.floor(r);const c=[],h=[],u=[],d=[];let p=0;const f=[],m=n/2;let g=0;function v(n){const r=p,s=new Gt,f=new _e;let v=0;const _=!0===n?t:e,y=!0===n?1:-1;for(let t=1;t<=i;t++)h.push(0,m*y,0),u.push(0,y,0),d.push(.5,.5),p++;const x=p;for(let t=0;t<=i;t++){const e=t/i*a+o,n=Math.cos(e),r=Math.sin(e);f.x=_*r,f.y=m*y,f.z=_*n,h.push(f.x,f.y,f.z),u.push(0,y,0),s.x=.5*n+.5,s.y=.5*r*y+.5,d.push(s.x,s.y),p++}for(let t=0;t<i;t++){const e=r+t,i=x+t;!0===n?c.push(i,i+1,e):c.push(i+1,i,e),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const s=new _e,v=new _e;let _=0;const y=(e-t)/n;for(let l=0;l<=r;l++){const c=[],g=l/r,_=g*(e-t)+t;for(let t=0;t<=i;t++){const e=t/i,r=e*a+o,l=Math.sin(r),f=Math.cos(r);v.x=_*l,v.y=-g*n+m,v.z=_*f,h.push(v.x,v.y,v.z),s.set(l,y,f).normalize(),u.push(s.x,s.y,s.z),d.push(e,1-g),c.push(p++)}f.push(c)}for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=f[e][t],i=f[e+1][t],r=f[e+1][t+1],s=f[e][t+1];c.push(n,i,s),c.push(i,r,s),_+=6}l.addGroup(g,_,0),g+=_}(),!1===s&&(t>0&&v(!0),e>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new Bn(h,3)),this.setAttribute("normal",new Bn(u,3)),this.setAttribute("uv",new Bn(d,2))}static fromJSON(t){return new Ya(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class qa extends Ya{constructor(t=1,e=1,n=8,i=1,r=!1,s=0,o=2*Math.PI){super(0,t,e,n,i,r,s,o),this.type="C
2oneGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:s,thetaLength:o}}static fromJSON(t){return new qa(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Za extends qn{constructor(t=[],e=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:i};const r=[],s=[];function o(t,e,n,i){const r=i+1,s=[];for(let i=0;i<=r;i++){s[i]=[];const o=t.clone().lerp(n,i/r),a=e.clone().lerp(n,i/r),l=r-i;for(let t=0;t<=l;t++)s[i][t]=0===t&&i===r?o:o.clone().lerp(a,t/l)}for(let t=0;t<r;t++)for(let e=0;e<2*(r-t)-1;e++){const n=Math.floor(e/2);e%2==0?(a(s[t][n+1]),a(s[t+1][n]),a(s[t][n])):(a(s[t][n+1]),a(s[t+1][n+1]),a(s[t+1][n]))}}function a(t){r.push(t.x,t.y,t.z)}function l(e,n){const i=3*e;n.x=t[i+0],n.y=t[i+1],n.z=t[i+2]}function c(t,e,n,i){i<0&&1===t.x&&(s[e]=t.x-1),0===n.x&&0===n.z&&(s[e]=i/2/Math.PI+.5)}function h(t){return Math.atan2(t.z,-t.x)}function u(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}!function(t){const n=new _e,i=new _e,r=new _e;for(let s=0;s<e.length;s+=3)l(e[s+0],n),l(e[s+1],i),l(e[s+2],r),o(n,i,r,t)}(i),function(t){const e=new _e;for(let n=0;n<r.length;n+=3)e.x=r[n+0],e.y=r[n+1],e.z=r[n+2],e.normalize().multiplyScalar(t),r[n+0]=e.x,r[n+1]=e.y,r[n+2]=e.z}(n),function(){const t=new _e;for(let e=0;e<r.length;e+=3){t.x=r[e+0],t.y=r[e+1],t.z=r[e+2];const n=h(t)/2/Math.PI+.5,i=u(t)/Math.PI+.5;s.push(n,1-i)}(function(){const t=new _e,e=new _e,n=new _e,i=new _e,o=new Gt,a=new Gt,l=new Gt;for(let u=0,d=0;u<r.length;u+=9,d+=6){t.set(r[u+0],r[u+1],r[u+2]),e.set(r[u+3],r[u+4],r[u+5]),n.set(r[u+6],r[u+7],r[u+8]),o.set(s[d+0],s[d+1]),a.set(s[d+2],s[d+3]),l.set(s[d+4],s[d+5]),i.copy(t).add(e).add(n).divideScalar(3);const p=h(i);c(o,d+0,t,p),c(a,d+2,e,p),c(l,d+4,n,p)}})(),function(){for(let t=0;t<s.length;t+=6){const e=s[t+0],n=s[t+2],i=s[t+4],r=Math.max(e,n,i),o=Math.min(e,n,i);r>.9&&o<.1&&(e<.2&&(s[t+0]+=1),n<.2&&(s[t+2]+=1),i<.2&&(s[t+4]+=1))}}()}(),this.setAttribute("position",new Bn(r,3)),this.setAttribute("normal",new Bn(r.slice(),3)),this.setAttribute("uv",new Bn(s,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(t){return new Za(t.vertices,t.indices,t.radius,t.details)}}class Ja extends Za{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-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,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[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,
vendor: 4,277 bytes, line 2
219,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Ja(t.radius,t.detail)}}const Ka=new _e,$a=new _e,Qa=new _e,tl=new Pn;class el extends qn{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},null!==t){const n=4,i=Math.pow(10,n),r=Math.cos(Pt*e),s=t.getIndex(),o=t.getAttribute("position"),a=s?s.count:o.count,l=[0,0,0],c=["a","b","c"],h=new Array(3),u={},d=[];for(let t=0;t<a;t+=3){s?(l[0]=s.getX(t),l[1]=s.getX(t+1),l[2]=s.getX(t+2)):(l[0]=t,l[1]=t+1,l[2]=t+2);const{a:e,b:n,c:a}=tl;if(e.fromBufferAttribute(o,l[0]),n.fromBufferAttribute(o,l[1]),a.fromBufferAttribute(o,l[2]),tl.getNormal(Qa),h[0]=`${Math.round(e.x*i)},${Math.round(e.y*i)},${Math.round(e.z*i)}`,h[1]=`${Math.round(n.x*i)},${Math.round(n.y*i)},${Math.round(n.z*i)}`,h[2]=`${Math.round(a.x*i)},${Math.round(a.y*i)},${Math.round(a.z*i)}`,h[0]!==h[1]&&h[1]!==h[2]&&h[2]!==h[0])for(let t=0;t<3;t++){const e=(t+1)%3,n=h[t],i=h[e],s=tl[c[t]],o=tl[c[e]],a=`${n}_${i}`,p=`${i}_${n}`;p in u&&u[p]?(Qa.dot(u[p].normal)<=r&&(d.push(s.x,s.y,s.z),d.push(o.x,o.y,o.z)),u[p]=null):a in u||(u[a]={index0:l[t],index1:l[e],normal:Qa.clone()})}}for(const t in u)if(u[t]){const{index0:e,index1:n}=u[t];Ka.fromBufferAttribute(o,e),$a.fromBufferAttribute(o,n),d.push(Ka.x,Ka.y,Ka.z),d.push($a.x,$a.y,$a.z)}this.setAttribute("position",new Bn(d,3))}}}class nl extends Ga{constructor(t){super(t),this.uuid=Dt(),this.type="Shape",this.holes=[]}getPointsHoles(t){const e=[];for(let n=0,i=this.holes.length;n<i;n++)e[n]=this.holes[n].getPoints(t);return e}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let e=0,n=t.holes.length;e<n;e++){const n=t.holes[e];this.holes.push(n.clone())}return this}toJSON(){const t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let e=0,n=this.holes.length;e<n;e++){const n=this.holes[e];t.holes.push(n.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let e=0,n=t.holes.length;e<n;e++){const n=t.holes[e];this.holes.push((new Ga).fromJSON(n))}return this}}const il=function(t,e,n=2){const i=e&&e.length,r=i?e[0]*n:t.length;let s=rl(t,0,r,n,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c,h,u,d,p;if(i&&(s=function(t,e,n,i){const r=[];let s,o,a,l,c;for(s=0,o=e.length;s<o;s++)a=e[s]*i,l=s<o-1?e[s+1]*i:t.length,c=rl(t,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(ml(c));for(r.sort(ul),s=0;s<r.length;s++)n=dl(r[s],n);return n}(t,e,s,n)),t.length>80*n){a=c=t[0],l=h=t[1];for(let e=n;e<r;e+=n)u=t[e],d=t[e+1],u<a&&(a=u),d<l&&(l=d),u>c&&(c=u),d>h&&(h=d);p=Math.max(c-a,h-l),p=0!==p?32767/p:0}return ol(s,o,n,a,l,p,0),o};function rl(t,e,n,i,r){let s,o;if(r===function(t,e,n,i){let r=0;for(let s=e,o=n-i;s<n;s+=i)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}(t,e,n,i)>0)for(s=e;s<n;s+=i)o=Tl(s,t[s],t[s+1],o);else for(s=n-i;s>=e;s-=i)o=Tl(s,t[s],t[s+1],o);return o&&yl(o,o.next)&&(El(o),o=o.next),o}function sl(t,e){if(!t)return t;e||(e=t);let n,i=t;do{if(n=!1,i.steiner||!yl(i,i.next)&&0!==_l(i.prev,i,i.next))i=i.next;else{if(El(i),i=e=i.prev,i===i.next)break;n=!0}}while(n||i!==e);return e}function ol(t,e,n,i,r,s,o){if(!t)return;!o&&s&&function(t,e,n,i){let r=t;do{0===r.z&&(r.z=fl(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){let e,n,i,r,s,o,a,l,c=1;do{for(n=t,t=null,s=null,o=0;n;){for(o++,i=n,a=0,e=0;e<c&&(a++,i=i.nextZ,i);e++);for(l=c;a>0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=i}s.nextZ=null,c*=2}while(o>1)}(r)}(t,i,r,s);let a,l,c=t;for(;t.prev!==t.next;)if(a=t.prev,l=t.next,s?ll(t,i,r,s):al(t))e.push(a.i/n|0),e.push(t.i/n|0),e.push(l.i/n|0),El(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?ol(t=cl(sl(t),e,n),e,n,i,r,s,2):2===o&&hl(t,e,n,i,r,s):ol(sl(t),e,n,i,r,s,1);break}}function al(t){const e=t.prev,n=t,i=t.next;if(_l(e,n,i)>=0)return!1;const r=e.x,s=n.x,o=i.x,a=e.y,l=n.y,c=i.y,h=r<s?r<o?r:o:s<o?s:o,u=a<l?a<c?a:c:l<c?l:c,d=r>s?r>o?r:o:s>o?s:o,p=a>l?a>c?a:c:l>c?l:c;let f=i.next;for(;f!==e;){if(f.x>=h&&f.x<=d&&f.y>=u&&f.y<=p&&gl(r,a,s,l,o,c,f.x,f.y)&&_l(f.prev,f,f.next)>=0)return!1;
vendor: 6,296 bytes, line 2
2f=f.next}return!0}function ll(t,e,n,i){const r=t.prev,s=t,o=t.next;if(_l(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,h=r.y,u=s.y,d=o.y,p=a<l?a<c?a:c:l<c?l:c,f=h<u?h<d?h:d:u<d?u:d,m=a>l?a>c?a:c:l>c?l:c,g=h>u?h>d?h:d:u>d?u:d,v=fl(p,f,e,n,i),_=fl(m,g,e,n,i);let y=t.prevZ,x=t.nextZ;for(;y&&y.z>=v&&x&&x.z<=_;){if(y.x>=p&&y.x<=m&&y.y>=f&&y.y<=g&&y!==r&&y!==o&&gl(a,h,l,u,c,d,y.x,y.y)&&_l(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==r&&x!==o&&gl(a,h,l,u,c,d,x.x,x.y)&&_l(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;y&&y.z>=v;){if(y.x>=p&&y.x<=m&&y.y>=f&&y.y<=g&&y!==r&&y!==o&&gl(a,h,l,u,c,d,y.x,y.y)&&_l(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;x&&x.z<=_;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==r&&x!==o&&gl(a,h,l,u,c,d,x.x,x.y)&&_l(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function cl(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!yl(r,s)&&xl(r,i,i.next,s)&&wl(r,s)&&wl(s,r)&&(e.push(r.i/n|0),e.push(i.i/n|0),e.push(s.i/n|0),El(i),El(i.next),i=t=s),i=i.next}while(i!==t);return sl(i)}function hl(t,e,n,i,r,s){let o=t;do{let t=o.next.next;for(;t!==o.prev;){if(o.i!==t.i&&vl(o,t)){let a=Sl(o,t);return o=sl(o,o.next),a=sl(a,a.next),ol(o,e,n,i,r,s,0),void ol(a,e,n,i,r,s,0)}t=t.next}o=o.next}while(o!==t)}function ul(t,e){return t.x-e.x}function dl(t,e){const n=function(t,e){let n,i=e,r=-1/0;const s=t.x,o=t.y;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){const t=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(t<=s&&t>r&&(r=t,n=i.x<i.next.x?i:i.next,t===s))return n}i=i.next}while(i!==e);if(!n)return null;const a=n,l=n.x,c=n.y;let h,u=1/0;i=n;do{s>=i.x&&i.x>=l&&s!==i.x&&gl(o<c?s:r,o,l,c,o<c?r:s,o,i.x,i.y)&&(h=Math.abs(o-i.y)/(s-i.x),wl(i,t)&&(h<u||h===u&&(i.x>n.x||i.x===n.x&&pl(n,i)))&&(n=i,u=h)),i=i.next}while(i!==a);return n}(t,e);if(!n)return e;const i=Sl(n,t);return sl(i,i.next),sl(n,n.next)}function pl(t,e){return _l(t.prev,t,e.prev)<0&&_l(e.next,t,t.next)<0}function fl(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function ml(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function gl(t,e,n,i,r,s,o,a){return(r-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(i-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(r-o)*(i-a)}function vl(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&xl(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(wl(t,e)&&wl(e,t)&&function(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(_l(t.prev,t,e.prev)||_l(t,e.prev,e))||yl(t,e)&&_l(t.prev,t,t.next)>0&&_l(e.prev,e,e.next)>0)}function _l(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function yl(t,e){return t.x===e.x&&t.y===e.y}function xl(t,e,n,i){const r=Ml(_l(t,e,n)),s=Ml(_l(t,e,i)),o=Ml(_l(n,i,t)),a=Ml(_l(n,i,e));return r!==s&&o!==a||(!(0!==r||!bl(t,n,e))||(!(0!==s||!bl(t,i,e))||(!(0!==o||!bl(n,t,i))||!(0!==a||!bl(n,e,i)))))}function bl(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Ml(t){return t>0?1:t<0?-1:0}function wl(t,e){return _l(t.prev,t,t.next)<0?_l(t,e,t.next)>=0&&_l(t,t.prev,e)>=0:_l(t,e,t.prev)<0||_l(t,t.next,e)<0}function Sl(t,e){const n=new Al(t.i,t.x,t.y),i=new Al(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function Tl(t,e,n,i){const r=new Al(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function El(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Al(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Cl{static area(t){const e=t.length;let n=0;for(let i=e-1,r=0;r<e;i=r++)n+=t[i].x*t[r].y-t[r].x*t[i].y;return.5*n}static isClockWise(t){return Cl.area(t)<0}static triangulateShape(t,e){const n=[],i=[],r=[];Rl(t),Ll(n,t);let s=t.length;e.forEach(Rl);for(let t=0;t<e.length;t++)i.push(s),s+=e[t].length,Ll(n,e[t]);const o=il(n,i);for(let t=0;t<o.length;t+=3)r.push(o.slice(t,t+3));return r}}function Rl(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Ll(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class Pl extends qn{constructor(t=new nl([new Gt(.5,.5),new Gt(-.5,.5),new Gt(-.5,-.5),new Gt(.5,-.5)]),e={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];const n=this,i=[],r=[];for(let e=0,n=t.length;e<n;e++){s(t[e])}function s(t){const s=[],o=void 0!==e.curveSegments?e.curveSegments:12,a=void 0!==e.steps?e.steps:1,l=void 0!==e.depth?e.depth:1;let c=void 0===e.bevelEnabled||e.bevelEnabled,h=void 0!==e.bevelThickness?e.bevelThickness:.2,u=void 0!==e.bevelSize?e.bevelSize:h-.1,d=void 0!==e.bevelOffset?e.bevelOffset:0,p=void 0!==e.bevelSegments?e.bevelSegments:3;const f=e.extrudePath,m=void 0!==e.UVGenerator?e.UVGenerator:Il;let g,v,_,y,x,b=!1;f&&(g=f.getSpacedPoints(a),b=!0,c=!1,v=f.computeFrenetFrames(a,!1),_=new _e,y=new _e,x=new _e),c||(p=0,h=0,u=0,d=0);const M=t.extractPoints(o);let w=M.shape;const S=M.holes;if(!Cl.isClockWise(w)){w=w.reverse();for(let t=0,e=S.length;t<e;t++){const e=S[t];Cl.isClockWise(e)&&(S[t]=e.reverse())}}const T=Cl.triangulateShape(w,S),E=w;for(let t=0,e=S.length;t<e;t++){const e=S[t];w=w.concat(e)}function A(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}const C=w.length,R=T.length;function L(t,e,n){let i,r,s;const o=t.x-e.x,a=t.y-e.y,l=n.x-t.x,c=n.y-t.y,h=o*o+a*a,u=o*c-a*l;if(Math.abs(u)>Number.EPSILON){const u=Math.sqrt(h),d=Math.sqrt(l*l+c*c),p=e.x-a/u,f=e.y+o/u,m=((n.x-c/d-p)*c-(n.y+l/d-f)*l)/(o*c-a*l);i=p+o*m-t.x,r=f+a*m-t.y;const g=i*i+r*r;if(g<=2)return new Gt(i,r);s=Math.sqrt(g/2)}else{let t=!1;o>Number.EPSILON?l>Number.EPSILON&&(t=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(t=!0):Math.sign(a)===Math.sign(c)&&(t=!0),t?(i=-a,r=o,s=Math.sqrt(h)):(i=o,r=a,s=Math.sqrt(h/2))}return new Gt(i/s,r/s)}const P=[];
vendor: 4,170 bytes, line 2
2for(let t=0,e=E.length,n=e-1,i=t+1;t<e;t++,n++,i++)n===e&&(n=0),i===e&&(i=0),P[t]=L(E[t],E[n],E[i]);const I=[];let D,O=P.concat();for(let t=0,e=S.length;t<e;t++){const e=S[t];D=[];for(let t=0,n=e.length,i=n-1,r=t+1;t<n;t++,i++,r++)i===n&&(i=0),r===n&&(r=0),D[t]=L(e[t],e[i],e[r]);I.push(D),O=O.concat(D)}for(let t=0;t<p;t++){const e=t/p,n=h*Math.cos(e*Math.PI/2),i=u*Math.sin(e*Math.PI/2)+d;for(let t=0,e=E.length;t<e;t++){const e=A(E[t],P[t],i);k(e.x,e.y,-n)}for(let t=0,e=S.length;t<e;t++){const e=S[t];D=I[t];for(let t=0,r=e.length;t<r;t++){const r=A(e[t],D[t],i);k(r.x,r.y,-n)}}}const N=u+d;for(let t=0;t<C;t++){const e=c?A(w[t],O[t],N):w[t];b?(y.copy(v.normals[0]).multiplyScalar(e.x),_.copy(v.binormals[0]).multiplyScalar(e.y),x.copy(g[0]).add(y).add(_),k(x.x,x.y,x.z)):k(e.x,e.y,0)}for(let t=1;t<=a;t++)for(let e=0;e<C;e++){const n=c?A(w[e],O[e],N):w[e];b?(y.copy(v.normals[t]).multiplyScalar(n.x),_.copy(v.binormals[t]).multiplyScalar(n.y),x.copy(g[t]).add(y).add(_),k(x.x,x.y,x.z)):k(n.x,n.y,l/a*t)}for(let t=p-1;t>=0;t--){const e=t/p,n=h*Math.cos(e*Math.PI/2),i=u*Math.sin(e*Math.PI/2)+d;for(let t=0,e=E.length;t<e;t++){const e=A(E[t],P[t],i);k(e.x,e.y,l+n)}for(let t=0,e=S.length;t<e;t++){const e=S[t];D=I[t];for(let t=0,r=e.length;t<r;t++){const r=A(e[t],D[t],i);b?k(r.x,r.y+g[a-1].y,g[a-1].x+n):k(r.x,r.y,l+n)}}}function U(t,e){let n=t.length;for(;--n>=0;){const i=n;let r=n-1;r<0&&(r=t.length-1);for(let t=0,n=a+2*p;t<n;t++){const n=C*t,s=C*(t+1);z(e+i+n,e+r+n,e+r+s,e+i+s)}}}function k(t,e,n){s.push(t),s.push(e),s.push(n)}function F(t,e,r){B(t),B(e),B(r);const s=i.length/3,o=m.generateTopUV(n,i,s-3,s-2,s-1);H(o[0]),H(o[1]),H(o[2])}function z(t,e,r,s){B(t),B(e),B(s),B(e),B(r),B(s);const o=i.length/3,a=m.generateSideWallUV(n,i,o-6,o-3,o-2,o-1);H(a[0]),H(a[1]),H(a[3]),H(a[1]),H(a[2]),H(a[3])}function B(t){i.push(s[3*t+0]),i.push(s[3*t+1]),i.push(s[3*t+2])}function H(t){r.push(t.x),r.push(t.y)}!function(){const t=i.length/3;if(c){let t=0,e=C*t;for(let t=0;t<R;t++){const n=T[t];F(n[2]+e,n[1]+e,n[0]+e)}t=a+2*p,e=C*t;for(let t=0;t<R;t++){const n=T[t];F(n[0]+e,n[1]+e,n[2]+e)}}else{for(let t=0;t<R;t++){const e=T[t];F(e[2],e[1],e[0])}for(let t=0;t<R;t++){const e=T[t];F(e[0]+C*a,e[1]+C*a,e[2]+C*a)}}n.addGroup(t,i.length/3-t,0)}(),function(){const t=i.length/3;let e=0;U(E,e),e+=E.length;for(let t=0,n=S.length;t<n;t++){const n=S[t];U(n,e),e+=n.length}n.addGroup(t,i.length/3-t,1)}()}this.setAttribute("position",new Bn(i,3)),this.setAttribute("uv",new Bn(r,2)),this.computeVertexNormals()}toJSON(){const t=super.toJSON();return function(t,e,n){if(n.shapes=[],Array.isArray(t))for(let e=0,i=t.length;e<i;e++){const i=t[e];n.shapes.push(i.uuid)}else n.shapes.push(t.uuid);n.options=Object.assign({},e),void 0!==e.extrudePath&&(n.options.extrudePath=e.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,t)}static fromJSON(t,e){const n=[];for(let i=0,r=t.shapes.length;i<r;i++){const r=e[t.shapes[i]];n.push(r)}const i=t.options.extrudePath;return void 0!==i&&(t.options.extrudePath=(new Ha[i.type]).fromJSON(i)),new Pl(n,t.options)}}const Il={generateTopUV:function(t,e,n,i,r){const s=e[3*n],o=e[3*n+1],a=e[3*i],l=e[3*i+1],c=e[3*r],h=e[3*r+1];return[new Gt(s,o),new Gt(a,l),new Gt(c,h)]},generateSideWallUV:function(t,e,n,i,r,s){const o=e[3*n],a=e[3*n+1],l=e[3*n+2],c=e[3*i],h=e[3*i+1],u=e[3*i+2],d=e[3*r],p=e[3*r+1],f=e[3*r+2],m=e[3*s],g=e[3*s+1],v=e[3*s+2];return Math.abs(a-h)<Math.abs(o-c)?[new Gt(o,1-l),new Gt(c,1-u),new Gt(d,1-f),new Gt(m,1-v)]:[new Gt(a,1-l),new Gt(h,1-u),new Gt(p,1-f),new Gt(g,1-v)]}};class Dl extends Za{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[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],t,e),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Dl(t.radius,t.detail)}}class Ol extends Za{constructor(t=1,e=0){super([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],t,e),this.type="OctahedronGeometry",this.parameters={radiu
vendor: 6,985 bytes, line 2
2s:t,detail:e}}static fromJSON(t){return new Ol(t.radius,t.detail)}}class Nl extends qn{constructor(t=.5,e=1,n=8,i=1,r=0,s=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:i,thetaStart:r,thetaLength:s},n=Math.max(3,n);const o=[],a=[],l=[],c=[];let h=t;const u=(e-t)/(i=Math.max(1,i)),d=new _e,p=new Gt;for(let t=0;t<=i;t++){for(let t=0;t<=n;t++){const i=r+t/n*s;d.x=h*Math.cos(i),d.y=h*Math.sin(i),a.push(d.x,d.y,d.z),l.push(0,0,1),p.x=(d.x/e+1)/2,p.y=(d.y/e+1)/2,c.push(p.x,p.y)}h+=u}for(let t=0;t<i;t++){const e=t*(n+1);for(let t=0;t<n;t++){const i=t+e,r=i,s=i+n+1,a=i+n+2,l=i+1;o.push(r,s,l),o.push(s,a,l)}}this.setIndex(o),this.setAttribute("position",new Bn(a,3)),this.setAttribute("normal",new Bn(l,3)),this.setAttribute("uv",new Bn(c,2))}static fromJSON(t){return new Nl(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}}class Ul extends qn{constructor(t=new nl([new Gt(0,.5),new Gt(-.5,-.5),new Gt(.5,-.5)]),e=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:e};const n=[],i=[],r=[],s=[];let o=0,a=0;if(!1===Array.isArray(t))l(t);else for(let e=0;e<t.length;e++)l(t[e]),this.addGroup(o,a,e),o+=a,a=0;function l(t){const o=i.length/3,l=t.extractPoints(e);let c=l.shape;const h=l.holes;!1===Cl.isClockWise(c)&&(c=c.reverse());for(let t=0,e=h.length;t<e;t++){const e=h[t];!0===Cl.isClockWise(e)&&(h[t]=e.reverse())}const u=Cl.triangulateShape(c,h);for(let t=0,e=h.length;t<e;t++){const e=h[t];c=c.concat(e)}for(let t=0,e=c.length;t<e;t++){const e=c[t];i.push(e.x,e.y,0),r.push(0,0,1),s.push(e.x,e.y)}for(let t=0,e=u.length;t<e;t++){const e=u[t],i=e[0]+o,r=e[1]+o,s=e[2]+o;n.push(i,r,s),a+=3}}this.setIndex(n),this.setAttribute("position",new Bn(i,3)),this.setAttribute("normal",new Bn(r,3)),this.setAttribute("uv",new Bn(s,2))}toJSON(){const t=super.toJSON();return function(t,e){if(e.shapes=[],Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const i=t[n];e.shapes.push(i.uuid)}else e.shapes.push(t.uuid);return e}(this.parameters.shapes,t)}static fromJSON(t,e){const n=[];for(let i=0,r=t.shapes.length;i<r;i++){const r=e[t.shapes[i]];n.push(r)}return new Ul(n,t.curveSegments)}}class kl extends qn{constructor(t=1,e=32,n=16,i=0,r=2*Math.PI,s=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:i,phiLength:r,thetaStart:s,thetaLength:o},e=Math.max(3,Math.floor(e)),n=Math.max(2,Math.floor(n));const a=Math.min(s+o,Math.PI);let l=0;const c=[],h=new _e,u=new _e,d=[],p=[],f=[],m=[];for(let d=0;d<=n;d++){const g=[],v=d/n;let _=0;0==d&&0==s?_=.5/e:d==n&&a==Math.PI&&(_=-.5/e);for(let n=0;n<=e;n++){const a=n/e;h.x=-t*Math.cos(i+a*r)*Math.sin(s+v*o),h.y=t*Math.cos(s+v*o),h.z=t*Math.sin(i+a*r)*Math.sin(s+v*o),p.push(h.x,h.y,h.z),u.copy(h).normalize(),f.push(u.x,u.y,u.z),m.push(a+_,1-v),g.push(l++)}c.push(g)}for(let t=0;t<n;t++)for(let i=0;i<e;i++){const e=c[t][i+1],r=c[t][i],o=c[t+1][i],l=c[t+1][i+1];(0!==t||s>0)&&d.push(e,r,l),(t!==n-1||a<Math.PI)&&d.push(r,o,l)}this.setIndex(d),this.setAttribute("position",new Bn(p,3)),this.setAttribute("normal",new Bn(f,3)),this.setAttribute("uv",new Bn(m,2))}static fromJSON(t){return new kl(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}}class Fl extends Za{constructor(t=1,e=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Fl(t.radius,t.detail)}}class zl extends qn{constructor(t=1,e=.4,n=8,i=6,r=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:i,arc:r},n=Math.floor(n),i=Math.floor(i);const s=[],o=[],a=[],l=[],c=new _e,h=new _e,u=new _e;for(let s=0;s<=n;s++)for(let d=0;d<=i;d++){const p=d/i*r,f=s/n*Math.PI*2;h.x=(t+e*Math.cos(f))*Math.cos(p),h.y=(t+e*Math.cos(f))*Math.sin(p),h.z=e*Math.sin(f),o.push(h.x,h.y,h.z),c.x=t*Math.cos(p),c.y=t*Math.sin(p),u.subVectors(h,c).normalize(),a.push(u.x,u.y,u.z),l.push(d/i),l.push(s/n)}for(let t=1;t<=n;t++)for(let e=1;e<=i;e++){const n=(i+1)*t+e-1,r=(i+1)*(t-1)+e-1,o=(i+1)*(t-1)+e,a=(i+1)*t+e;s.push(n,r,a),s.push(r,o,a)}this.setIndex(s),this.setAttribute("position",new Bn(o,3)),this.setAttribute("normal",new Bn(a,3)),this.setAttribute("uv",new Bn(l,2))}static fromJSON(t){return new zl(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc)}}class Bl extends qn{constructor(t=1,e=.4,n=64,i=8,r=2,s=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:i,p:r,q:s},n=Math.floor(n),i=Math.floor(i);const o=[],a=[],l=[],c=[],h=new _e,u=new _e,d=new _e,p=new _e,f=new _e,m=new _e,g=new _e;for(let o=0;o<=n;++o){const _=o/n*r*Math.PI*2;v(_,r,s,t,d),v(_+.01,r,s,t,p),m.subVectors(p,d),g.addVectors(p,d),f.crossVectors(m,g),g.crossVectors(f,m),f.normalize(),g.normalize();for(let t=0;t<=i;++t){const r=t/i*Math.PI*2,s=-e*Math.cos(r),p=e*Math.sin(r);h.x=d.x+(s*g.x+p*f.x),h.y=d.y+(s*g.y+p*f.y),h.z=d.z+(s*g.z+p*f.z),a.push(h.x,h.y,h.z),u.subVectors(h,d).normalize(),l.push(u.x,u.y,u.z),c.push(o/n),c.push(t/i)}}for(let t=1;t<=n;t++)for(let e=1;e<=i;e++){const n=(i+1)*(t-1)+(e-1),r=(i+1)*t+(e-1),s=(i+1)*t+e,a=(i+1)*(t-1)+e;o.push(n,r,a),o.push(r,s,a)}function v(t,e,n,i,r){const s=Math.cos(t),o=Math.sin(t),a=n/e*t,l=Math.cos(a);r.x=i*(2+l)*.5*s,r.y=i*(2+l)*o*.5,r.z=i*Math.sin(a)*.5}this.setIndex(o),this.setAttribute("position",new Bn(a,3)),this.setAttribute("normal",new Bn(l,3)),this.setAttribute("uv",new Bn(c,2))}static fromJSON(t){return new Bl(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}}class Hl extends qn{constructor(t=new za(new _e(-1,-1,0),new _e(-1,1,0),new _e(1,1,0)),e=64,n=1,i=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:i,closed:r};const s=t.computeFrenetFrames(e,r);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals;const o=new _e,a=new _e,l=new Gt;let c=new _e;const h=[],u=[],d=[],p=[];function f(r){c=t.getPointAt(r/e,c);const l=s.normals[r],d=s.binormals[r];for(let t=0;t<=i;t++){const e=t/i*Math.PI*2,r=Math.sin(e),s=-Math.cos(e);a.x=s*l.x+r*d.x,a.y=s*l.y+r*d.y,a.z=s*l.z+r*d.z,a.normalize(),u.push(a.x,a.y,a.z),o.x=c.x+n*a.x,o.y=c.y+n*a.y,o.z=c.z+n*a.z,h.push(o.x,o.y,o.z)}}!function(){for(let t=0;t<e;t++)f(t);f(!1===r?e:0),function(){for(let t=0;t<=e;t++)for(let n=0;n<=i;n++)l.x=t/e,l.y=n/i,d.push(l.x,l.y)}(),function(){for(let t=1;t<=e;t++)for(let e=1;e<=i;e++){const n=(i+1)*(t-1)+(e-1),r=(i+1)*t+(e-1),s=(i+1)*t+e,o=(i+1)*(t-1)+e;p.push(n,r,o),p.push(r,s,o)}}()}(),this.setIndex(p),this.setAttribute("position",new Bn(h,3)),this.setAttribute("normal",new Bn(u,3)),this.setAttribute("uv",new Bn(d,2))}toJSON(){const t=super.toJSON();return t.path=this.parameters.path.toJSON(),t}static fromJSON(t){return new Hl((new Ha[t.path.type]).fromJSON(t.path),t.tubularSegments,t.radiu
vendor: 26,383 bytes, line 2
2s,t.radialSegments,t.closed)}}class Vl extends qn{constructor(t=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:t},null!==t){const e=[],n=new Set,i=new _e,r=new _e;if(null!==t.index){const s=t.attributes.position,o=t.index;let a=t.groups;0===a.length&&(a=[{start:0,count:o.count,materialIndex:0}]);for(let t=0,l=a.length;t<l;++t){const l=a[t],c=l.start;for(let t=c,a=c+l.count;t<a;t+=3)for(let a=0;a<3;a++){const l=o.getX(t+a),c=o.getX(t+(a+1)%3);i.fromBufferAttribute(s,l),r.fromBufferAttribute(s,c),!0===Gl(i,r,n)&&(e.push(i.x,i.y,i.z),e.push(r.x,r.y,r.z))}}}else{const s=t.attributes.position;for(let t=0,o=s.count/3;t<o;t++)for(let o=0;o<3;o++){const a=3*t+o,l=3*t+(o+1)%3;i.fromBufferAttribute(s,a),r.fromBufferAttribute(s,l),!0===Gl(i,r,n)&&(e.push(i.x,i.y,i.z),e.push(r.x,r.y,r.z))}}this.setAttribute("position",new Bn(e,3))}}}function Gl(t,e,n){const i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`;return!0!==n.has(i)&&!0!==n.has(r)&&(n.add(i),n.add(r),!0)}var Wl=Object.freeze({__proto__:null,BoxGeometry:fi,CapsuleGeometry:ja,CircleGeometry:Xa,ConeGeometry:qa,CylinderGeometry:Ya,DodecahedronGeometry:Ja,EdgesGeometry:el,ExtrudeGeometry:Pl,IcosahedronGeometry:Dl,LatheGeometry:Wa,OctahedronGeometry:Ol,PlaneGeometry:Ni,PolyhedronGeometry:Za,RingGeometry:Nl,ShapeGeometry:Ul,SphereGeometry:kl,TetrahedronGeometry:Fl,TorusGeometry:zl,TorusKnotGeometry:Bl,TubeGeometry:Hl,WireframeGeometry:Vl});class jl extends Dn{constructor(t){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new oe(0),this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.fog=t.fog,this}}class Xl extends yi{constructor(t){super(t),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Yl extends Dn{constructor(t){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new oe(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new oe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Gt(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.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class ql extends Yl{constructor(t){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Gt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Ot(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new oe(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new oe(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new oe(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._iridescence=0,this._transmission=0,this.setValues(t)}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class Zl extends Dn{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new oe(16777215),this.specular=new oe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new oe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Gt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Jl extends Dn{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new oe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new oe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Gt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class Kl extends Dn{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Gt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class $l extends Dn{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new oe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new oe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Gt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Ql extends Dn{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new oe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Gt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class tc extends ia{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function ec(t,e,n){return ic(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)}function nc(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function ic(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function rc(t){const e=t.length,n=new Array(e);for(let t=0;t!==e;++t)n[t]=t;return n.sort(function(e,n){return t[e]-t[n]}),n}function sc(t,e,n){const i=t.length,r=new t.constructor(i);for(let s=0,o=0;o!==i;++s){const i=n[s]*e;for(let n=0;n!==e;++n)r[o++]=t[i+n]}return r}function oc(t,e,n,i){let r=1,s=t[0];for(;void 0!==s&&void 0===s[i];)s=t[r++];if(void 0===s)return;let o=s[i];if(void 0!==o)if(Array.isArray(o))do{o=s[i],void 0!==o&&(e.push(s.time),n.push.apply(n,o)),s=t[r++]}while(void 0!==s);else if(void 0!==o.toArray)do{o=s[i],void 0!==o&&(e.push(s.time),o.toArray(n,n.length)),s=t[r++]}while(void 0!==s);else do{o=s[i],void 0!==o&&(e.push(s.time),n.push(o)),s=t[r++]}while(void 0!==s)}var ac=Object.freeze({__proto__:null,arraySlice:ec,convertArray:nc,isTypedArray:ic,getKeyframeOrder:rc,sortedArray:sc,flattenJSON:oc,subclip:function(t,e,n,i,r=30){const s=t.clone();s.name=e;const o=[];for(let t=0;t<s.tracks.length;++t){const e=s.tracks[t],a=e.getValueSize(),l=[],c=[];for(let t=0;t<e.times.length;++t){const s=e.times[t]*r;if(!(s<n||s>=i)){l.push(e.times[t]);for(let n=0;n<a;++n)c.push(e.values[t*a+n])}}0!==l.length&&(e.times=nc(l,e.times.constructor),e.values=nc(c,e.values.constructor),o.push(e))}s.tracks=o;let a=1/0;for(let t=0;t<s.tracks.length;++t)a>s.tracks[t].times[0]&&(a=s.tracks[t].times[0]);for(let t=0;t<s.tracks.length;++t)s.tracks[t].shift(-1*a);return s.resetDuration(),s},makeClipAdditive:function(t,e=0,n=t,i=30){i<=0&&(i=30);const r=n.tracks.length,s=e/i;for(let e=0;e<r;++e){const i=n.tracks[e],r=i.ValueTypeName;if("bool"===r||"string"===r)continue;const o=t.tracks.find(function(t){return t.name===i.name&&t.ValueTypeName===r});if(void 0===o)continue;let a=0;const l=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(a=l/3);let c=0;const h=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=h/3);const u=i.times.length-1;let d;if(s<=i.times[0]){const t=a,e=l-a;d=ec(i.values,t,e)}else if(s>=i.times[u]){const t=u*l+a,e=t+l-a;d=ec(i.values,t,e)}else{const t=i.createInterpolant(),e=a,n=l-a;t.evaluate(s),d=ec(t.resultBuffer,e,n)}if("quaternion"===r){(new ve).fromArray(d).normalize().conjugate().toArray(d)}const p=o.times.length;for(let t=0;t<p;++t){const e=t*h+c;if("quaternion"===r)ve.multiplyQuaternionsFlat(o.values,e,d,0,o.values,e);else{const t=h-2*c;for(let n=0;n<t;++n)o.values[e+n]-=d[n]}}}return t.blendMode=yt,t}});class lc{constructor(t,e,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let n=this._cachedIndex,i=e[n],r=e[n-1];t:{e:{let s;n:{i:if(!(t<i)){for(let s=n+2;;){if(void 0===i){if(t<r)break i;return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===s)break;if(r=i,i=e[++n],t<i)break e}s=e.length;break n}if(!(t>=r)){const o=e[1];t<o&&(n=2,r=o);for(let s=n-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(n===s)break;if(i=r,r=e[--n-1],t>=r)break e}s=n,n=0;break n}break t}for(;n<s;){const i=n+s>>>1;t<e[i]?s=i:n=i+1}if(i=e[n],r=e[n-1],void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===i)return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=t*i;for(let t=0;t!==i;++t)e[t]=n[r+t];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class cc extends lc{constructor(t,e,n,i){super(t,e,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:mt,endingEnd:mt}}intervalChanged_(t,e,n){const i=this.parameterPositions;let r=t-2,s=t+1,o=i[r],a=i[s];if(void 0===o)switch(this.getSettings_().endingStart){case gt:r=t,o=2*e-n;break;case vt:r=i.length-2,o=e+i[r]-i[r+1];break;default:r=t,o=n}if(void 0===a)switch(this.getSettings_().endingEnd){case gt:s=t,a=2*n-e;break;case vt:s=1,a=n+i[1]-i[0];break;default:s=t-1,a=e}const l=.5*(n-e),c=this.valueSize;this._weightPrev=l/(e-o),this._weightNext=l/(a-n),this._offsetPrev=r*c,this._offsetNext=s*c}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=t*o,l=a-o,c=this._offsetPrev,h=this._offsetNext,u=this._weightPrev,d=this._weightNext,p=(n-e)/(i-e),f=p*p,m=f*p,g=-u*m+2*u*f-u*p,v=(1+u)*m+(-1.5-2*u)*f+(-.5+u)*p+1,_=(-1-d)*m+(1.5+d)*f+.5*p,y=d*m-d*f;for(let t=0;t!==o;++t)r[t]=g*s[c+t]+v*s[l+t]+_*s[a+t]+y*s[h+t];return r}}class hc extends lc{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=t*o,l=a-o,c=(n-e)/(i-e),h=1-c;for(let t=0;t!==o;++t)r[t]=s[l+t]*h+s[a+t]*c;return r}}class uc extends lc{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}}class dc{constructor(t,e,n,i){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=nc(e,this.TimeBufferType),this.values=nc(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:nc(t.times,Array),values:nc(t.values,Array)};const e=t.getInterpolation();e!==t.DefaultInterpolation&&(n.interpolation=e)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new uc(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new hc(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new cc(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case dt:e=this.InterpolantFactoryMethodDiscrete;break;case pt:e=this.InterpolantFactoryMethodLinear;break;case ft:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){const e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(e);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return dt;case this.InterpolantFactoryMethodLinear:return pt;case this.InterpolantFactoryMethodSmooth:return ft}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]+=t}return this}scale(t){if(1!==t){const e=this.times;for(let n=0,i=e.length;n!==i;++n)e[n]*=t}return this}trim(t,e){const n=this.times,i=n.length;let r=0,s=i-1;for(;r!==i&&n[r]<t;)++r;for(;-1!==s&&n[s]>e;)--s;if(++s,0!==r||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const t=this.getValueSize();this.times=ec(n,r,s),this.values=ec(this.values,r*t,s*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let e=0;e!==r;e++){const i=n[e];if("number"==typeof i&&isNaN(i)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,i),t=!1;break}if(null!==s&&s>i){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,i,s),t=!1;break}s=i}if(void 0!==i&&ic(i))for(let e=0,n=i.length;e!==n;++e){const n=i[e];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t}optimize(){const t=ec(this.times),e=ec(this.values),n=this.getValueSize(),i=this.getInterpolation()===ft,r=t.length-1;let s=1;for(let o=1;o<r;++o){let r=!1;const a=t[o];if(a!==t[o+1]&&(1!==o||a!==t[0]))if(i)r=!0;else{const t=o*n,i=t-n,s=t+n;for(let o=0;o!==n;++o){const n=e[t+o];if(n!==e[i+o]||n!==e[s+o]){r=!0;break}}}if(r){if(o!==s){t[s]=t[o];const i=o*n,r=s*n;for(let t=0;t!==n;++t)e[r+t]=e[i+t]}++s}}if(r>0){t[s]=t[r];for(let t=r*n,i=s*n,o=0;o!==n;++o)e[i+o]=e[t+o];++s}return s!==t.length?(this.times=ec(t,0,s),this.values=ec(e,0,s*n)):(this.times=t,this.values=e),this}clone(){const t=ec(this.times,0),e=ec(this.values,0),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}dc.prototype.TimeBufferType=Float32Array,dc.prototype.ValueBufferType=Float32Array,dc.prototype.DefaultInterpolation=pt;class pc extends dc{}pc.prototype.ValueTypeName="bool",pc.prototype.ValueBufferType=Array,pc.prototype.DefaultInterpolation=dt,pc.prototype.InterpolantFactoryMethodLinear=void 0,pc.prototype.InterpolantFactoryMethodSmooth=void 0;class fc extends dc{}fc.prototype.ValueTypeName="color";class mc extends dc{}mc.prototype.ValueTypeName="number";class gc extends lc{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,o=this.valueSize,a=(n-e)/(i-e);let l=t*o;for(let t=l+o;l!==t;l+=4)ve.slerpFlat(r,0,s,l-o,s,l,a);return r}}class vc extends dc{InterpolantFactoryMethodLinear(t){return new gc(this.times,this.values,this.getValueSize(),t)}}vc.prototype.ValueTypeName="quaternion",vc.prototype.DefaultInterpolation=pt,vc.prototype.InterpolantFactoryMethodSmooth=void 0;class _c extends dc{}_c.prototype.ValueTypeName="string",_c.prototype.ValueBufferType=Array,_c.prototype.DefaultInterpolation=dt,_c.prototype.InterpolantFactoryMethodLinear=void 0,_c.prototype.InterpolantFactoryMethodSmooth=void 0;class yc extends dc{}yc.prototype.ValueTypeName="vector";class xc{constructor(t,e=-1,n,i=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=i,this.uuid=Dt(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let t=0,r=n.length;t!==r;++t)e.push(bc(n[t]).scale(i));const r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r}static toJSON(t){const e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,i=n.length;t!==i;++t)e.push(dc.toJSON(n[t]));return i}static CreateFromMorphTargetSequence(t,e,n,i){const r=e.length,s=[];for(let t=0;t<r;t++){let o=[],a=[];o.push((t+r-1)%r,t,(t+1)%r),a.push(0,1,0);const l=rc(o);o=sc(o,1,l),a=sc(a,1,l),i||0!==o[0]||(o.push(r),a.push(a[0])),s.push(new mc(".morphTargetInfluences["+e[t].name+"]",o,a).scale(1/n))}return new this(t,-1,s)}static findByName(t,e){let n=t;if(!Array.isArray(t)){const e=t;n=e.geometry&&e.geometry.animations||e.animations}for(let t=0;t<n.length;t++)if(n[t].name===e)return n[t];return null}static CreateClipsFromMorphTargetSequences(t,e,n){const i={},r=/^([\w-]*?)([\d]+)$/;for(let e=0,n=t.length;e<n;e++){const n=t[e],s=n.name.match(r);if(s&&s.length>1){const t=s[1];let e=i[t];e||(i[t]=e=[]),e.push(n)}}const s=[];for(const t in i)s.push(this.CreateFromMorphTargetSequence(t,i[t],e,n));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(t,e,n,i,r){if(0!==n.length){const s=[],o=[];oc(n,s,o,i),0!==s.length&&r.push(new t(e,s,o))}},i=[],r=t.name||"default",s=t.fps||30,o=t.blendMode;let a=t.length||-1;const l=t.hierarchy||[];for(let t=0;t<l.length;t++){const r=l[t].keys;if(r&&0!==r.length)if(r[0].morphTargets){const t={};let e;for(e=0;e<r.length;e++)if(r[e].morphTargets)for(let n=0;n<r[e].morphTargets.length;n++)t[r[e].morphTargets[n]]=-1;for(const n in t){const t=[],s=[];for(let i=0;i!==r[e].morphTargets.length;++i){const i=r[e];t.push(i.time),s.push(i.morphTarget===n?1:0)}i.push(new mc(".morphTargetInfluence["+n+"]",t,s))}a=t.length*s}else{const s=".bones["+e[t].name+"]";n(yc,s+".position",r,"pos",i),n(vc,s+".quaternion",r,"rot",i),n(yc,s+".scale",r,"scl",i)}}if(0===i.length)return null;return new this(r,a,i,o)}resetDuration(){let t=0;for(let e=0,n=this.tracks.length;e!==n;++e){const n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());return new this.constructor(this.name,this.duration,t,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function bc(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return mc;
vendor: 9,575 bytes, line 2
2case"vector":case"vector2":case"vector3":case"vector4":return yc;case"color":return fc;case"quaternion":return vc;case"bool":case"boolean":return pc;case"string":return _c}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(t.type);if(void 0===t.times){const e=[],n=[];oc(t.keys,e,n,"value"),t.times=e,t.values=n}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const Mc={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class wc{constructor(t,e,n){const i=this;let r,s=!1,o=0,a=0;const l=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===s&&void 0!==i.onStart&&i.onStart(t,o,a),s=!0},this.itemEnd=function(t){o++,void 0!==i.onProgress&&i.onProgress(t,o,a),o===a&&(s=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(t){void 0!==i.onError&&i.onError(t)},this.resolveURL=function(t){return r?r(t):t},this.setURLModifier=function(t){return r=t,this},this.addHandler=function(t,e){return l.push(t,e),this},this.removeHandler=function(t){const e=l.indexOf(t);return-1!==e&&l.splice(e,2),this},this.getHandler=function(t){for(let e=0,n=l.length;e<n;e+=2){const n=l[e],i=l[e+1];if(n.global&&(n.lastIndex=0),n.test(t))return i}return null}}}const Sc=new wc;class Tc{constructor(t){this.manager=void 0!==t?t:Sc,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const n=this;return new Promise(function(i,r){n.load(t,i,e,r)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}const Ec={};class Ac extends Error{constructor(t,e){super(t),this.response=e}}class Cc extends Tc{constructor(t){super(t)}load(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=Mc.get(t);if(void 0!==r)return this.manager.itemStart(t),setTimeout(()=>{e&&e(r),this.manager.itemEnd(t)},0),r;if(void 0!==Ec[t])return void Ec[t].push({onLoad:e,onProgress:n,onError:i});Ec[t]=[],Ec[t].push({onLoad:e,onProgress:n,onError:i});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,a=this.responseType;fetch(s).then(e=>{if(200===e.status||0===e.status){if(0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;const n=Ec[t],i=e.body.getReader(),r=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),s=r?parseInt(r):0,o=0!==s;let a=0;const l=new ReadableStream({start(t){!function e(){i.read().then(({done:i,value:r})=>{if(i)t.close();else{a+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:o,loaded:a,total:s});for(let t=0,e=n.length;t<e;t++){const e=n[t];e.onProgress&&e.onProgress(i)}t.enqueue(r),e()}})}()}});return new Response(l)}throw new Ac(`fetch for "${e.url}" responded with ${e.status}: ${e.statusText}`,e)}).then(t=>{switch(a){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then(t=>(new DOMParser).parseFromString(t,o));case"json":return t.json();default:if(void 0===o)return t.text();{const e=/charset="?([^;"\s]*)"?/i.exec(o),n=e&&e[1]?e[1].toLowerCase():void 0,i=new TextDecoder(n);return t.arrayBuffer().then(t=>i.decode(t))}}}).then(e=>{Mc.add(t,e);const n=Ec[t];delete Ec[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onLoad&&i.onLoad(e)}}).catch(e=>{const n=Ec[t];if(void 0===n)throw this.manager.itemError(t),e;delete Ec[t];for(let t=0,i=n.length;t<i;t++){const i=n[t];i.onError&&i.onError(e)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class Rc extends Tc{constructor(t){super(t)}load(t,e,n,i){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Mc.get(t);if(void 0!==s)return r.manager.itemStart(t),setTimeout(function(){e&&e(s),r.manager.itemEnd(t)},0),s;const o=Zt("img");function a(){c(),Mc.add(t,this),e&&e(this),r.manager.itemEnd(t)}function l(e){c(),i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)}function c(){o.removeEventListener("load",a,!1),o.removeEventListener("error",l,!1)}return o.addEventListener("load",a,!1),o.addEventListener("error",l,!1),"data:"!==t.slice(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(t),o.src=t,o}}class Lc extends xn{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new oe(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}class Pc extends Lc{constructor(t,e,n){super(t,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(xn.DefaultUp),this.updateMatrix(),this.groundColor=new oe(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}}const Ic=new qe,Dc=new _e,Oc=new _e;class Nc{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Gt(512,512),this.map=null,this.mapPass=null,this.matrix=new qe,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ii,this._frameExtents=new Gt(1,1),this._viewportCount=1,this._viewports=[new pe(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,n=this.matrix;Dc.setFromMatrixPosition(t.matrixWorld),e.position.copy(Dc),Oc.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(Oc),e.updateMatrixWorld(),Ic.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ic),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Ic)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class Uc extends Nc{constructor(){super(new bi(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,n=2*It*t.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=t.distance||e.far;n===e.fov&&i===e.aspect&&r===e.far||(e.fov=n,e.aspect=i,e.far=r,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class kc extends Lc{constructor(t,e,n=0,i=Math.PI/3,r=0,s=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(xn.DefaultUp),this.updateMatrix(),this.target=new xn,this.distance=n,this.angle=i,this.penumbra=r,this.decay=s,this.map=null,this.shadow=new Uc}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}const Fc=new qe,zc=new _e,Bc=new _e;class Hc extends Nc{constructor(){super(new bi(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Gt(4,2),this._viewportCount=6,this._viewports=[new pe(2,1,1,1),new pe(0,1,1,1),new pe(3,1,1,1),new pe(1,1,1,1),new pe(3,0,1,1),new pe(1,0,1,1)],this._cubeDirections=[new _e(1,0,0),new _e(-1,0,0),new _e(0,0,1),new _e(0,0,-1),new _e(0,1,0),new _e(0,-1,0)],this._cubeUps=[new _e(0,1,0),new _e(0,1,0),new _e(0,1,0),new _e(0,1,0),new _e(0,0,1),new _e(0,0,-1)]}updateMatrices(t,e=0){const n=this.camera,i=this.matrix,r=t.distance||n.far;r!==n.far&&(n.far=r,n.updateProjectionMatrix()),zc.setFromMatrixPosition(t.matrixWorld),n.position.copy(zc),Bc.copy(n.position),Bc.add(this._cubeDirections[e]),n.up.copy(this._cubeUps[e]),n.lookAt(Bc),n.updateMatrixWorld(),i.makeTranslation(-zc.x,-zc.y,-zc.z),Fc.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Fc)}}class Vc extends Lc{constructor(t,e,n=0,i=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new Hc}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class Gc extends Nc{constructor(){super(new Xi(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}
vendor: 15,162 bytes, line 2
2}class Wc extends Lc{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(xn.DefaultUp),this.updateMatrix(),this.target=new xn,this.shadow=new Gc}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class jc extends Lc{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Xc extends Lc{constructor(t,e,n=10,i=10){super(t,e),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}class Yc{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new _e)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const n=t.x,i=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.282095),e.addScaledVector(s[1],.488603*i),e.addScaledVector(s[2],.488603*r),e.addScaledVector(s[3],.488603*n),e.addScaledVector(s[4],n*i*1.092548),e.addScaledVector(s[5],i*r*1.092548),e.addScaledVector(s[6],.315392*(3*r*r-1)),e.addScaledVector(s[7],n*r*1.092548),e.addScaledVector(s[8],.546274*(n*n-i*i)),e}getIrradianceAt(t,e){const n=t.x,i=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.886227),e.addScaledVector(s[1],1.023328*i),e.addScaledVector(s[2],1.023328*r),e.addScaledVector(s[3],1.023328*n),e.addScaledVector(s[4],.858086*n*i),e.addScaledVector(s[5],.858086*i*r),e.addScaledVector(s[6],.743125*r*r-.247708),e.addScaledVector(s[7],.858086*n*r),e.addScaledVector(s[8],.429043*(n*n-i*i)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(t.coefficients[n],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let n=0;n<9;n++)this.coefficients[n].lerp(t.coefficients[n],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(t,e+3*i);return this}toArray(t=[],e=0){const n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(t,e+3*i);return t}static getBasisAt(t,e){const n=t.x,i=t.y,r=t.z;e[0]=.282095,e[1]=.488603*i,e[2]=.488603*r,e[3]=.488603*n,e[4]=1.092548*n*i,e[5]=1.092548*i*r,e[6]=.315392*(3*r*r-1),e[7]=1.092548*n*r,e[8]=.546274*(n*n-i*i)}}class qc extends Lc{constructor(t=new Yc,e=1){super(void 0,e),this.isLightProbe=!0,this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}class Zc extends Tc{constructor(t){super(t),this.textures={}}load(t,e,n,i){const r=this,s=new Cc(r.manager);s.setPath(r.path),s.setRequestHeader(r.requestHeader),s.setWithCredentials(r.withCredentials),s.load(t,function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}},n,i)}parse(t){const e=this.textures;function n(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}const i=Zc.createMaterialFromType(t.type);if(void 0!==t.uuid&&(i.uuid=t.uuid),void 0!==t.name&&(i.name=t.name),void 0!==t.color&&void 0!==i.color&&i.color.setHex(t.color),void 0!==t.roughness&&(i.roughness=t.roughness),void 0!==t.metalness&&(i.metalness=t.metalness),void 0!==t.sheen&&(i.sheen=t.sheen),void 0!==t.sheenColor&&(i.sheenColor=(new oe).setHex(t.sheenColor)),void 0!==t.sheenRoughness&&(i.sheenRoughness=t.sheenRoughness),void 0!==t.emissive&&void 0!==i.emissive&&i.emissive.setHex(t.emissive),void 0!==t.specular&&void 0!==i.specular&&i.specular.setHex(t.specular),void 0!==t.specularIntensity&&(i.specularIntensity=t.specularIntensity),void 0!==t.specularColor&&void 0!==i.specularColor&&i.specularColor.setHex(t.specularColor),void 0!==t.shininess&&(i.shininess=t.shininess),void 0!==t.clearcoat&&(i.clearcoat=t.clearcoat),void 0!==t.clearcoatRoughness&&(i.clearcoatRoughness=t.clearcoatRoughness),void 0!==t.iridescence&&(i.iridescence=t.iridescence),void 0!==t.iridescenceIOR&&(i.iridescenceIOR=t.iridescenceIOR),void 0!==t.iridescenceThicknessRange&&(i.iridescenceThicknessRange=t.iridescenceThicknessRange),void 0!==t.transmission&&(i.transmission=t.transmission),void 0!==t.thickness&&(i.thickness=t.thickness),void 0!==t.attenuationDistance&&(i.attenuationDistance=t.attenuationDistance),void 0!==t.attenuationColor&&void 0!==i.attenuationColor&&i.attenuationColor.setHex(t.attenuationColor),void 0!==t.fog&&(i.fog=t.fog),void 0!==t.flatShading&&(i.flatShading=t.flatShading),void 0!==t.blending&&(i.blending=t.blending),void 0!==t.combine&&(i.combine=t.combine),void 0!==t.side&&(i.side=t.side),void 0!==t.shadowSide&&(i.shadowSide=t.shadowSide),void 0!==t.opacity&&(i.opacity=t.opacity),void 0!==t.transparent&&(i.transparent=t.transparent),void 0!==t.alphaTest&&(i.alphaTest=t.alphaTest),void 0!==t.depthTest&&(i.depthTest=t.depthTest),void 0!==t.depthWrite&&(i.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(i.colorWrite=t.colorWrite),void 0!==t.stencilWrite&&(i.stencilWrite=t.stencilWrite),void 0!==t.stencilWriteMask&&(i.stencilWriteMask=t.stencilWriteMask),void 0!==t.stencilFunc&&(i.stencilFunc=t.stencilFunc),void 0!==t.stencilRef&&(i.stencilRef=t.stencilRef),void 0!==t.stencilFuncMask&&(i.stencilFuncMask=t.stencilFuncMask),void 0!==t.stencilFail&&(i.stencilFail=t.stencilFail),void 0!==t.stencilZFail&&(i.stencilZFail=t.stencilZFail),void 0!==t.stencilZPass&&(i.stencilZPass=t.stencilZPass),void 0!==t.wireframe&&(i.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(i.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(i.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(i.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(i.rotation=t.rotation),1!==t.linewidth&&(i.linewidth=t.linewidth),void 0!==t.dashSize&&(i.dashSize=t.dashSize),void 0!==t.gapSize&&(i.gapSize=t.gapSize),void 0!==t.scale&&(i.scale=t.scale),void 0!==t.polygonOffset&&(i.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(i.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(i.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.dithering&&(i.dithering=t.dithering),void 0!==t.alphaToCoverage&&(i.alphaToCoverage=t.alphaToCoverage),void 0!==t.premultipliedAlpha&&(i.premultipliedAlpha=t.premultipliedAlpha),void 0!==t.visible&&(i.visible=t.visible),void 0!==t.toneMapped&&(i.toneMapped=t.toneMapped),void 0!==t.userData&&(i.userData=t.userData),void 0!==t.vertexColors&&("number"==typeof t.vertexColors?i.vertexColors=t.vertexColors>0:i.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const r=t.uniforms[e];switch(i.uniforms[e]={},r.type){case"t":i.uniforms[e].value=n(r.value);break;case"c":i.uniforms[e].value=(new oe).setHex(r.value);break;case"v2":i.uniforms[e].value=(new Gt).fromArray(r.value);break;case"v3":i.uniforms[e].value=(new _e).fromArray(r.value);break;case"v4":i.uniforms[e].value=(new pe).fromArray(r.value);break;case"m3":i.uniforms[e].value=(new Wt).fromArray(r.value);break;case"m4":i.uniforms[e].value=(new qe).fromArray(r.value);break;default:i.uniforms[e].value=r.value}}if(void 0!==t.defines&&(i.defines=t.defines),void 0!==t.vertexShader&&(i.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(i.fragmentShader=t.fragmentShader),void 0!==t.glslVersion&&(i.glslVersion=t.glslVersion),void 0!==t.extensions)for(const e in t.extensions)i.extensions[e]=t.extensions[e];if(void 0!==t.size&&(i.size=t.size),void 0!==t.sizeAttenuation&&(i.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(i.map=n(t.map)),void 0!==t.matcap&&(i.matcap=n(t.matcap)),void 0!==t.alphaMap&&(i.alphaMap=n(t.alphaMap)),void 0!==t.bumpMap&&(i.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(i.bumpScale=t.bumpScale),void 0!==t.normalMap&&(i.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(i.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),i.normalScale=(new Gt).fromArray(e)}return void 0!==t.displacementMap&&(i.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(i.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(i.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(i.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(i.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(i.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(i.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(i.specularMap=n(t.specularMap)),void 0!==t.specularIntensityMap&&(i.specularIntensityMap=n(t.specularIntensityMap)),void 0!==t.specularColorMap&&(i.specularColorMap=n(t.specularColorMap)),void 0!==t.envMap&&(i.envMap=n(t.envMap)),void 0!==t.envMapIntensity&&(i.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(i.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(i.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(i.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(i.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(i.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(i.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(i.gradientMap=n(t.gradientMap)),void 0!==t.clearcoatMap&&(i.clearcoatMap=n(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(i.clearcoatNormalScale=(new Gt).fromArray(t.clearcoatNormalScale)),void 0!==t.iridescenceMap&&(i.iridescenceMap=n(t.iridescenceMap)),void 0!==t.iridescenceThicknessMap&&(i.iridescenceThicknessMap=n(t.iridescenceThicknessMap)),void 0!==t.transmissionMap&&(i.transmissionMap=n(t.transmissionMap)),void 0!==t.thicknessMap&&(i.thicknessMap=n(t.thicknessMap)),void 0!==t.sheenColorMap&&(i.sheenColorMap=n(t.sheenColorMap)),void 0!==t.sheenRoughnessMap&&(i.sheenRoughnessMap=n(t.sheenRoughnessMap)),i}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){return new{ShadowMaterial:jl,SpriteMaterial:xo,RawShaderMaterial:Xl,ShaderMaterial:yi,PointsMaterial:fa,MeshPhysicalMaterial:ql,MeshStandardMaterial:Yl,MeshPhongMaterial:Zl,MeshToonMaterial:Jl,MeshNormalMaterial:Kl,MeshLambertMaterial:$l,MeshDepthMaterial:Ks,MeshDistanceMaterial:$s,MeshBasicMaterial:On,MeshMatcapMaterial:Ql,LineDashedMaterial:tc,LineBasicMaterial:ia,Material:Dn}[t]}}class Jc{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let n=0,i=t.length;n<i;n++)e+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(e))}catch(t){return e}}static extractUrlBase(t){const e=t.lastIndexOf("/");return-1===e?"./":t.slice(0,e+1)}static resolveURL(t,e){return"string"!=typeof t||""===t?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}}class Kc extends qn{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}toJSON(){const t=super.toJSON();return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}class $c extends Tc{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new Cc(r.manager);s.setPath(r.path),s.setRequestHeader(r.requestHeader),s.setWithCredentials(r.withCredentials),s.load(t,function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}},n,i)}parse(t){const e={},n={};function i(t,i){if(void 0!==e[i])return e[i];const r=t.interleavedBuffers[i],s=function(t,e){if(void 0!==n[e])return n[e];const i=t.arrayBuffers,r=i[e],s=new Uint32Array(r).buffer;return n[e]=s,s}(t,r.buffer),o=qt(r.type,s),a=new vo(o,r.stride);return a.uuid=r.uuid,e[i]=a,a}const r=t.isInstancedBufferGeometry?new Kc:new qn,s=t.data.index;if(void 0!==s){const t=qt(s.type,s.array);r.setIndex(new kn(t,1))}const o=t.data.attributes;for(const e in o){const n=o[e];let s;if(n.isInterleavedBufferAttribute){const e=i(t.data,n.data);s=new yo(e,n.itemSize,n.offset,n.normalized)}else{const t=qt(n.type,n.array);s=new(n.isInstancedBufferAttribute?Jo:kn)(t,n.itemSize,n.normalized)}void 0!==n.name&&(s.name=n.name),void 0!==n.usage&&s.setUsage(n.usage),void 0!==n.updateRange&&(s.updateRange.offset=n.updateRange.offset,s.updateRange.count=n.updateRange.count),r.setAttribute(e,s)}const a=t.data.morphAttributes;if(a)for(const e in a){const n=a[e],s=[];for(let e=0,r=n.length;e<r;e++){const r=n[e];let o;if(r.isInterleavedBufferAttribute){const e=i(t.data,r.data);o=new yo(e,r.itemSize,r.offset,r.normalized)}else{const t=qt(r.type,r.array);o=new kn(t,r.itemSize,r.normalized)}void 0!==r.name&&(o.name=r.name),s.push(o)}r.morphAttributes[e]=s}t.data.morphTargetsRelative&&(r.morphTargetsRelative=!0);const l=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==l)for(let t=0,e=l.length;t!==e;++t){const e=l[t];r.addGroup(e.start,e.count,e.materialIndex)}const c=t.data.boundingSphere;if(void 0!==c){const t=new _e;void 0!==c.center&&t.fromArray(c.center),r.boundingSphere=new ze(t,c.radius)}return t.name&&(r.name=t.name),t.userData&&(r.userData=t.userData),r}}const Qc={UVMapping:v,CubeReflectionMapping:_,CubeRefractionMapping:y,EquirectangularReflectionMapping:x,EquirectangularRefractionMapping:b,CubeUVReflectionMapping:M},th={RepeatWrapping:w,ClampToEdgeWrapping:S,MirroredRepeatWrapping:T},eh={NearestFilter:E,NearestMipmapNearestFilter:A,NearestMipmapLinearFilter:C,LinearFilter:R,LinearMipmapNearestFilter:L,LinearMipmapLinearFilter:P};let nh;class ih{static getContext(){return void 0===nh&&(nh=new(window.AudioContext||window.webkitAudioContext)),nh}static setContext(t){nh=t}}const rh=new qe,sh=new qe,oh=new qe;class ah{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=lh(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=lh();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function lh(){return("undefined"==typeof performance?Date:performance).now()}const ch=new _e,hh=new ve,uh=new _e,dh=new _e;class ph extends xn{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getIn
vendor: 5,860 bytes, line 2
2put()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+t;const e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(t){return t||(t=[]),!0===this._connected?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){if(this.detune=t,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}const fh=new _e,mh=new ve,gh=new _e,vh=new _e;class _h{constructor(t,e,n){let i,r,s;switch(this.binding=t,this.valueSize=n,e){case"quaternion":i=this._slerp,r=this._slerpAdditive,s=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,s=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:i=this._lerp,r=this._lerpAdditive,s=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=r,this._setIdentity=s,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){const n=this.buffer,i=this.valueSize,r=t*i+i;let s=this.cumulativeWeight;if(0===s){for(let t=0;t!==i;++t)n[r+t]=n[t];s=e}else{s+=e;const t=e/s;this._mixBufferRegion(n,r,0,t,i)}this.cumulativeWeight=s}accumulateAdditive(t){const e=this.buffer,n=this.valueSize,i=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(e,i,0,t,n),this.cumulativeWeightAdditive+=t}apply(t){const e=this.valueSize,n=this.buffer,i=t*e+e,r=this.cumulativeWeight,s=this.cumulativeWeightAdditive,o=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){const t=e*this._origIndex;this._mixBufferRegion(n,i,t,1-r,e)}s>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(n[t]!==n[t+e]){o.setValue(n,i);break}}saveOriginalState(){const t=this.binding,e=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(e,i);for(let t=n,r=i;t!==r;++t)e[t]=e[i+t%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;
vendor: 4,686 bytes, line 2
2for(let n=t;n<e;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const t=this._origIndex*this.valueSize,e=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[e+n]=this.buffer[t+n]}_select(t,e,n,i,r){if(i>=.5)for(let i=0;i!==r;++i)t[e+i]=t[n+i]}_slerp(t,e,n,i){ve.slerpFlat(t,e,t,e,t,n,i)}_slerpAdditive(t,e,n,i,r){const s=this._workIndex*r;ve.multiplyQuaternionsFlat(t,s,t,e,t,n),ve.slerpFlat(t,e,t,e,t,s,i)}_lerp(t,e,n,i,r){const s=1-i;for(let o=0;o!==r;++o){const r=e+o;t[r]=t[r]*s+t[n+o]*i}}_lerpAdditive(t,e,n,i,r){for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]+t[n+s]*i}}}const yh="\\[\\]\\.:\\/",xh=new RegExp("["+yh+"]","g"),bh="[^"+yh+"]",Mh="[^"+yh.replace("\\.","")+"]",wh=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",bh)+/(WCOD+)?/.source.replace("WCOD",Mh)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",bh)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",bh)+"$"),Sh=["material","materials","bones","map"];class Th{constructor(t,e,n){this.path=e,this.parsedPath=n||Th.parseTrackName(e),this.node=Th.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new Th.Composite(t,e,n):new Th(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(xh,"")}static parseTrackName(t){const e=wh.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const t=n.nodeName.substring(i+1);-1!==Sh.indexOf(t)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=t)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){const n=function(t){for(let i=0;i<t.length;i++){const r=t[i];if(r.name===e||r.uuid===e)return r;const s=n(r.children);if(s)return s}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)t[e++]=n[i]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,n=e.objectName,i=e.propertyName;let r=e.propertyIndex;if(t||(t=Th.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let i=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as no
2de does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let e=0;e<t.length;e++)if(t[e].name===i){i=e;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);t=t.material.map;break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==i){if(void 0===t[i])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[i]}}const s=t[i];if(void 0===s){const n=e.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+i+" but it wasn't found.",t)}let o=this.Versioning.None;this.targetObject=t,void 0!==t.needsUpdate?o=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(o=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===i){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[r]&&(r=t.morphTargetDictionary[r])}a=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(a=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Th.Composite=class{constructor(t,e,n){const i=n||Th.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,i)}getValue(t,e){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(t,e)}setValue(t,e){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},Th.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Th.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Th.prototype.GetterByBindingType=[Th.prototype._getValue_direct,Th.prototype._getValue_array,Th.prototype._getValue_arrayElement,Th.prototype._getValue_toArray],Th.prototype.SetterByBindingTypeAndVersioning=[[Th.prototype._setValue_direct,Th.prototype._setValue_direct_setNeedsUpdate,Th.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Th.prototype._setValue_array,Th.prototype._setValue_array_setNeedsUpdate,Th.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Th.prototype._setValue_arrayElement,Th.prototype._setValue_arrayElement_setNeedsUpdate,Th.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Th.prototype._setValue_fromArray,Th.prototype._setValue_fromArray_setNeedsUpdate,Th.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class Eh{constructor(t,e,n=null,i=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=n,this.blendMode=i;const r=e.tracks,s=r.length,o=new Array(s),a={endingStart:mt,endingEnd:mt};for(let t=0;t!==s;++t){const e=r[t].createInterpolant(null);o[t]=e,e.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,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}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){const n=this._clip.duration,i=t._clip.duration,r=i/n,s=n/i;t.warp(1,r,e),this.warp(s,1,e)}return this}crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}stopFading(){const t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,n){const i=this._mixer,r=i.time,s=this.timeScale;let o=this._timeScaleInterpolant;null===o&&(o=i._lendControlInterpolant(),this._timeScaleInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=r,a[1]=r+n,l[0]=t/s,l[1]=e/s,this}stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,n,i){if(!this.enabled)return void this._updateWeight(t);const r=this._startTime;if(null!==r){const i=(t-r)*n;i<0||0===n?e=0:(this._startTime=null,e=n*i)}e*=this._updateTimeScale(t);const s=this._updateTime(e),o=this._updateWeight(t);if(o>0){const t=this._interpolants,e=this._propertyBindings;if(this.blendMode===yt)for(let n=0,i=t.length;n!==i;++n)t[n].evaluate(s),e[n].accumulateAdditive(o);else for(let n=0,r=t.length;n!==r;++n)t[n].evaluate(s),e[n].accumulate(i,o)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,n=this.loop;let i=this.time+t,r=this._loopCount;const s=2202===n;if(0===t)return-1===r||!s||1&~r?i:e-i;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=e)i=e;else{if(!(i<0)){this.time=i;break t}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),i>=e||i<0){const n=Math.floor(i/e);i-=e*n,r+=Math.abs(n);const o=this.repetitions-r;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?e:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===o){const e=t<0;this._setEndings(e,!e,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(s&&!(1&~r))return e-i}return i}_setEndings(t,e,n){const i=this._interpolantSettings;n?(i.endingStart=gt,i.endingEnd=gt):(i.endingStart=t?this.zeroSlopeAtStart?gt:mt:vt,i.endingEnd=e?this.zeroSlopeAtEnd?gt:mt:vt)}_scheduleFading(t,e,n){const i=this._mixer,r=i.time;let s=this._weightInterpolant;null===s&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const o=s.parameterPositions,a=s.sampleValues;return o[0]=r,a[0]=e,o[1]=r+t,a[1]=n,this}}const Ah=new Float32Array(1);class Ch{constructor(t){this.value=t}clone(){return new Ch(void 0===this.value.clone?this.value:this.value.clone())}}let Rh=0;function Lh(t,e){return t.distance-e.distance}
2function Ph(t,e,n,i){if(t.layers.test(e.layers)&&t.raycast(e,n),!0===i){const i=t.children;for(let t=0,r=i.length;t<r;t++)Ph(i[t],e,n,!0)}}const Ih=new Gt;const Dh=new _e,Oh=new _e;const Nh=new _e;const Uh=new _e,kh=new qe,Fh=new qe;function zh(t){const e=[];!0===t.isBone&&e.push(t);for(let n=0;n<t.children.length;n++)e.push.apply(e,zh(t.children[n]));return e}const Bh=new _e,Hh=new oe,Vh=new oe;const Gh=new _e,Wh=new _e,jh=new _e;const Xh=new _e,Yh=new xi;function qh(t,e,n,i,r,s,o){Xh.set(r,s,o).unproject(i);const a=e[t];if(void 0!==a){const t=n.getAttribute("position");for(let e=0,n=a.length;e<n;e++)t.setXYZ(a[e],Xh.x,Xh.y,Xh.z)}}const Zh=new be;const Jh=new _e;let Kh,$h;const Qh=tu();function tu(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),i=new Uint32Array(512),r=new Uint32Array(512);for(let t=0;t<256;++t){const e=t-127;e<-27?(i[t]=0,i[256|t]=32768,r[t]=24,r[256|t]=24):e<-14?(i[t]=1024>>-e-14,i[256|t]=1024>>-e-14|32768,r[t]=-e-1,r[256|t]=-e-1):e<=15?(i[t]=e+15<<10,i[256|t]=e+15<<10|32768,r[t]=13,r[256|t]=13):e<128?(i[t]=31744,i[256|t]=64512,r[t]=24,r[256|t]=24):(i[t]=31744,i[256|t]=64512,r[t]=13,r[256|t]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let t=1;t<1024;++t){let e=t<<13,n=0;for(;!(8388608&e);)e<<=1,n-=8388608;e&=-8388609,n+=947912704,s[t]=e|n}for(let t=1024;t<2048;++t)s[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)o[t]=t<<23;o[31]=1199570944,o[32]=2147483648;for(let t=33;t<63;++t)o[t]=2147483648+(t-32<<23);o[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(a[t]=1024);return{floatView:e,uint32View:n,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}var eu=Object.freeze({__proto__:null,toHalfFloat:function(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Ot(t,-65504,65504),Qh.floatView[0]=t;const e=Qh.uint32View[0],n=e>>23&511;return Qh.baseTable[n]+((8388607&e)>>Qh.shiftTable[n])},fromHalfFloat:function(t){const e=t>>10;return Qh.uint32View[0]=Qh.mantissaTable[Qh.offsetTable[e]+(1023&t)]+Qh.exponentTable[e],Qh.floatView[0]}});"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:n}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=n),e.ACESFilmicToneMapping=4,e.AddEquation=i,e.AddOperation=2,e.AdditiveAnimationBlendMode=yt,e.AdditiveBlending=2,e.AlphaFormat=1021,e.AlwaysDepth=1,e.AlwaysStencilFunc=519,e.AmbientLight=jc,e.AmbientLightProbe=class extends qc{constructor(t,e=1){super(void 0,e),this.isAmbientLightProbe=!0;const n=(new oe).set(t);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}},e.AnimationClip=xc,e.AnimationLoader=class extends Tc{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new Cc(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}},n,i)}parse(t){const e=[];for(let n=0;n<t.length;n++){const i=xc.parse(t[n]);e.push(i)}return e}},e.AnimationMixer=class extends Ct{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const n=t._localRoot||this._root,i=t._clip.tracks,r=i.length,s=t._propertyBindings,o=t._interpolants,a=n.uuid,l=this._bindingsByRootAndName;let c=l[a];void 0===c&&(c={},l[a]=c);for(let t=0;t!==r;++t){const r=i[t],l=r.name;let h=c[l];if(void 0!==h)++h.referenceCount,s[t]=h;else{if(h=s[t],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,a,l));continue}const i=e&&e._propertyBindings[t].binding.parsedPath;h=new _h(Th.create(n,l,i),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,a,l),s[t]=h}o[t].resultBuffer=h.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,n=t._clip.uuid,i=this._actionsByClip[n];this._bindAction(t,i&&i.knownActions[0]),this._addInactiveAction(t,n,e)}const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0===n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0===--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e<this._nActiveActions}_addInactiveAction(t,e,n){const i=this._actions,r=this._actionsByClip;let s=r[e];if(void 0===s)s={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=s;else{const e=s.knownActions;t._byClipCacheIndex=e.length,e.push(t)}t._cacheIndex=i.length,i.push(t),s.actionByRoot[n]=t}_removeInactiveAction(t){const e=this._actions,n=e[e.length-1],i=t._cacheIndex;n._cacheIndex=i,e[i]=n,e.pop(),t._cacheIndex=null;const r=t._clip.uuid,s=this._actionsByClip,o=s[r],a=o.knownActions,l=a[a.length-1],c=t._byClipCacheIndex;l._byClipCacheIndex=c,a[c]=l,a.pop(),t._byClipCacheIndex=null;delete o.actionByRoot[(t._localRoot||this._root).uuid],0===a.length&&delete s[r],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0===--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(t){const e=this._actions,n=t._cacheIndex,i=this._nActiveActions++,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r}_takeBackAction(t){const e=this._actions,n=t._cacheIndex,i=--this._nActiveActions,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r}_addInactiveBinding(t,e,n){const i=this._bindingsByRootAndName,r=this._bindings;let s=i[e];void 0===s&&(s={},i[e]=s),s[n]=t,t._cacheIndex=r.length,r.push(t)}_removeInactiveBinding(t){const e=this._bindings,n=t.binding,i=n.rootNode.uuid,r=n.path,s=this._bindingsByRootAndName,o=s[i],a=e[e.length-1],l=t._cacheIndex;
vendor: 12,676 bytes, line 2
2a._cacheIndex=l,e[l]=a,e.pop(),delete o[r],0===Object.keys(o).length&&delete s[i]}_lendBinding(t){const e=this._bindings,n=t._cacheIndex,i=this._nActiveBindings++,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r}_takeBackBinding(t){const e=this._bindings,n=t._cacheIndex,i=--this._nActiveBindings,r=e[i];t._cacheIndex=i,e[i]=t,r._cacheIndex=n,e[n]=r}_lendControlInterpolant(){const t=this._controlInterpolants,e=this._nActiveControlInterpolants++;let n=t[e];return void 0===n&&(n=new hc(new Float32Array(2),new Float32Array(2),1,Ah),n.__cacheIndex=e,t[e]=n),n}_takeBackControlInterpolant(t){const e=this._controlInterpolants,n=t.__cacheIndex,i=--this._nActiveControlInterpolants,r=e[i];t.__cacheIndex=i,e[i]=t,r.__cacheIndex=n,e[n]=r}clipAction(t,e,n){const i=e||this._root,r=i.uuid;let s="string"==typeof t?xc.findByName(i,t):t;const o=null!==s?s.uuid:t,a=this._actionsByClip[o];let l=null;if(void 0===n&&(n=null!==s?s.blendMode:_t),void 0!==a){const t=a.actionByRoot[r];if(void 0!==t&&t.blendMode===n)return t;l=a.knownActions[0],null===s&&(s=l._clip)}if(null===s)return null;const c=new Eh(this,s,e,n);return this._bindAction(c,l),this._addInactiveAction(c,o,r),c}existingAction(t,e){const n=e||this._root,i=n.uuid,r="string"==typeof t?xc.findByName(n,t):t,s=r?r.uuid:t,o=this._actionsByClip[s];return void 0!==o&&o.actionByRoot[i]||null}stopAllAction(){const t=this._actions;for(let e=this._nActiveActions-1;e>=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions,i=this.time+=t,r=Math.sign(t),s=this._accuIndex^=1;for(let o=0;o!==n;++o){e[o]._update(i,t,r,s)}const o=this._bindings,a=this._nActiveBindings;for(let t=0;t!==a;++t)o[t].apply(s);return this}setTime(t){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){const e=this._actions,n=t.uuid,i=this._actionsByClip,r=i[n];if(void 0!==r){const t=r.knownActions;for(let n=0,i=t.length;n!==i;++n){const i=t[n];this._deactivateAction(i);const r=i._cacheIndex,s=e[e.length-1];i._cacheIndex=null,i._byClipCacheIndex=null,s._cacheIndex=r,e[r]=s,e.pop(),this._removeInactiveBindingsForAction(i)}delete i[n]}}uncacheRoot(t){const e=t.uuid,n=this._actionsByClip;for(const t in n){const i=n[t].actionByRoot[e];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}const i=this._bindingsByRootAndName[e];if(void 0!==i)for(const t in i){const e=i[t];e.restoreOriginalState(),this._removeInactiveBinding(e)}}uncacheAction(t,e){const n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}},e.AnimationObjectGroup=class{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Dt(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const t={};this._indicesByUUID=t;for(let e=0,n=arguments.length;e!==n;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const e=this;this.stats={objects:{get total(){return e._objects.length},get inUse(){return this.total-e.nCachedObjects_}},get bindingsPerObject(){return e._bindings.length}}}add(){const t=this._objects,e=this._indicesByUUID,n=this._paths,i=this._parsedPaths,r=this._bindings,s=r.length;let o,a=t.length,l=this.nCachedObjects_;for(let c=0,h=arguments.length;c!==h;++c){const h=arguments[c],u=h.uuid;let d=e[u];if(void 0===d){d=a++,e[u]=d,t.push(h);for(let t=0,e=s;t!==e;++t)r[t].push(new Th(h,n[t],i[t]))}else if(d<l){o=t[d];const a=--l,c=t[a];e[c.uuid]=d,t[d]=c,e[u]=a,t[a]=h;for(let t=0,e=s;t!==e;++t){const e=r[t],s=e[a];let o=e[d];e[d]=s,void 0===o&&(o=new Th(h,n[t],i[t])),e[a]=o}}else t[d]!==o&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_;for(let s=0,o=arguments.length;s!==o;++s){const o=arguments[s],a=o.uuid,l=e[a];if(void 0!==l&&l>=r){const s=r++,c=t[s];e[c.uuid]=l,t[l]=c,e[a]=s,t[s]=o;for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[s],r=e[l];e[l]=i,e[s]=r}}}this.nCachedObjects_=r}uncache(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,s=t.length;for(let o=0,a=arguments.length;o!==a;++o){const a=arguments[o].uuid,l=e[a];if(void 0!==l)if(delete e[a],l<r){const o=--r,a=t[o],c=--s,h=t[c];e[a.uuid]=l,t[l]=a,e[h.uuid]=o,t[o]=h,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[o],r=e[c];e[l]=i,e[o]=r,e.pop()}}else{const r=--s,o=t[r];r>0&&(e[o.uuid]=l),t[l]=o,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t];e[l]=e[r],e.pop()}}}this.nCachedObjects_=r}subscribe_(t,e){const n=this._bindingsIndicesByPath;let i=n[t];const r=this._bindings;if(void 0!==i)return r[i];const s=this._paths,o=this._parsedPaths,a=this._objects,l=a.length,c=this.nCachedObjects_,h=new Array(l);i=r.length,n[t]=i,s.push(t),o.push(e),r.push(h);for(let n=c,i=a.length;n!==i;++n){const i=a[n];h[n]=new Th(i,t,e)}return h}unsubscribe_(t){const e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){const i=this._paths,r=this._parsedPaths,s=this._bindings,o=s.length-1,a=s[o];e[t[o]]=n,s[n]=a,s.pop(),r[n]=r[o],r.pop(),i[n]=i[o],i.pop()}}},e.AnimationUtils=ac,e.ArcCurve=Sa,e.ArrayCamera=io,e.ArrowHelper=class extends xn{constructor(t=new _e(0,0,1),e=new _e(0,0,0),n=1,i=16776960,r=.2*n,s=.2*r){super(),this.type="ArrowHelper",void 0===Kh&&(Kh=new qn,Kh.setAttribute("position",new Bn([0,0,0,0,1,0],3)),$h=new Ya(0,.5,1,5,1),$h.translate(0,-.5,0)),this.position.copy(e),this.line=new ca(Kh,new ia({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new di($h,new On({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,r,s)}setDirection(t){if(t.y>.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{Jh.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(Jh,e)}}setLength(t,e=.2*t,n=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},e.Audio=ph,e.AudioAnalyser=class{constructor(t,e=2048){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0;const e=this.getFrequencyData();for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}},e.AudioContext=ih,e.AudioListener=class extends xn{constructor(){super(),this.type="AudioListener",this.context=ih.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new ah}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const e=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ch,hh,uh),dh.set(0,0,-1).applyQuaternion(hh),e.positionX){const t=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(ch.x,t),e.positionY.linearRampToValueAtTime(ch.y,t),e.positionZ.linearRampToValueAtTime(ch.z,t),e.forwardX.linearRampToValueAtTime(dh.x,t),e.forwardY.linearRampToValueAtTime(dh.y,t),e.forwardZ.linearRampToValueAtTime(dh.z,t),e.upX.linearRampToValueAtTime(n.x,t),e.upY.linearRampToValueAtTime(n.y,t),e.upZ.linearRampToValueAtTime(n.z,t)}else e.setPosition(ch.x,ch.y,ch.z),e.setOrientation(dh.x,dh.y,dh.z,n.x,n.y,n.z)}},e.AudioLoader=class extends Tc{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new Cc(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(n){try{const t=n.slice(0);ih.getContext().decodeAudioData(t,function(t){e(t)})}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}},n,i)}},e.AxesHelper=class extends da{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new qn;n.setAttribute("position",new Bn(e,3)),n.setAttribute("color",new Bn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));super(n,new ia({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(t,e,n){const i=new oe,r=this.geometry.attributes.color.array;return i.set(t),i.toArray(r,0),i.toArray(r,3),i.set(e),i.toArray(r,6),i.toArray(r,9),i.set(n),i.toArray(r,12),i.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},e.BackSide=1,e.BasicDepthPacking=3200,e.BasicShadowMap=0,e.Bone=jo,e.BooleanKeyframeTrack=pc,e.Box2=class{constructor(t=new Gt(1/0,1/0),e=new Gt(-1/0,-1/0)){this.isBox2=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=Ih.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return Ih.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},e.Box3=be,e.Box3Helper=class extends da{constructor(t,e=16776960){const n=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 qn;i.setIndex(new kn(n,1)),i.setAttribute("position",new Bn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(i,new ia({color:e,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){const e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}dispose(){this.geometry.dispose(),this.material.dispose()}},e.BoxBufferGeometry=class extends fi{constructor(t,e,n,i,r,s){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(t,e,n,i,r,s)}},e.BoxGeometry=fi,e.BoxHelper=class extends da{constructor(t,e=16776960){const n=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),r=new qn;r.setIndex(new kn(n,1)),r.setAttribute("position",new kn(i,3)),super(r,new ia({color:e,toneMapped:!1})),this.object=t,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(t){if(void 0!==t&&console.warn("THREE.BoxHelper: .update(
2) has no longer arguments."),void 0!==this.object&&Zh.setFromObject(this.object),Zh.isEmpty())return;const e=Zh.min,n=Zh.max,i=this.geometry.attributes.position,r=i.array;r[0]=n.x,r[1]=n.y,r[2]=n.z,r[3]=e.x,r[4]=n.y,r[5]=n.z,r[6]=e.x,r[7]=e.y,r[8]=n.z,r[9]=n.x,r[10]=e.y,r[11]=n.z,r[12]=n.x,r[13]=n.y,r[14]=e.z,r[15]=e.x,r[16]=n.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=n.x,r[22]=e.y,r[23]=e.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(t){return this.object=t,this.update(),this}copy(t,e){return super.copy(t,e),this.object=t.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}},e.BufferAttribute=kn,e.BufferGeometry=qn,e.BufferGeometryLoader=$c,e.ByteType=1010,e.Cache=Mc,e.Camera=xi,e.CameraHelper=class extends da{constructor(t){const e=new qn,n=new ia({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],r=[],s={};function o(t,e){a(t),a(e)}function a(t){i.push(0,0,0),r.push(0,0,0),void 0===s[t]&&(s[t]=[]),s[t].push(i.length/3-1)}o("n1","n2"),o("n2","n4"),o("n4","n3"),o("n3","n1"),o("f1","f2"),o("f2","f4"),o("f4","f3"),o("f3","f1"),o("n1","f1"),o("n2","f2"),o("n3","f3"),o("n4","f4"),o("p","n1"),o("p","n2"),o("p","n3"),o("p","n4"),o("u1","u2"),o("u2","u3"),o("u3","u1"),o("c","t"),o("p","c"),o("cn1","cn2"),o("cn3","cn4"),o("cf1","cf2"),o("cf3","cf4"),e.setAttribute("position",new Bn(i,3)),e.setAttribute("color",new Bn(r,3)),super(e,n),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update();const l=new oe(16755200),c=new oe(16711680),h=new oe(43775),u=new oe(16777215),d=new oe(3355443);this.setColors(l,c,h,u,d)}setColors(t,e,n,i,r){const s=this.geometry.getAttribute("color");s.setXYZ(0,t.r,t.g,t.b),s.setXYZ(1,t.r,t.g,t.b),s.setXYZ(2,t.r,t.g,t.b),s.setXYZ(3,t.r,t.g,t.b),s.setXYZ(4,t.r,t.g,t.b),s.setXYZ(5,t.r,t.g,t.b),s.setXYZ(6,t.r,t.g,t.b),s.setXYZ(7,t.r,t.g,t.b),s.setXYZ(8,t.r,t.g,t.b),s.setXYZ(9,t.r,t.g,t.b),s.setXYZ(10,t.r,t.g,t.b),s.setXYZ(11,t.r,t.g,t.b),s.setXYZ(12,t.r,t.g,t.b),s.setXYZ(13,t.r,t.g,t.b),s.setXYZ(14,t.r,t.g,t.b),s.setXYZ(15,t.r,t.g,t.b),s.setXYZ(16,t.r,t.g,t.b),s.setXYZ(17,t.r,t.g,t.b),s.setXYZ(18,t.r,t.g,t.b),s.setXYZ(19,t.r,t.g,t.b),s.setXYZ(20,t.r,t.g,t.b),s.setXYZ(21,t.r,t.g,t.b),s.setXYZ(22,t.r,t.g,t.b),s.setXYZ(23,t.r,t.g,t.b),s.setXYZ(24,e.r,e.g,e.b),s.setXYZ(25,e.r,e.g,e.b),s.setXYZ(26,e.r,e.g,e.b),s.setXYZ(27,e.r,e.g,e.b),s.setXYZ(28,e.r,e.g,e.b),s.setXYZ(29,e.r,e.g,e.b),s.setXYZ(30,e.r,e.g,e.b),s.setXYZ(31,e.r,e.g,e.b),s.setXYZ(32,n.r,n.g,n.b),s.setXYZ(33,n.r,n.g,n.b),s.setXYZ(34,n.r,n.g,n.b),s.setXYZ(35,n.r,n.g,n.b),s.setXYZ(36,n.r,n.g,n.b),s.setXYZ(37,n.r,n.g,n.b),s.setXYZ(38,i.r,i.g,i.b),s.setXYZ(39,i.r,i.g,i.b),s.setXYZ(40,r.r,r.g,r.b),s.setXYZ(41,r.r,r.g,r.b),s.setXYZ(42,r.r,r.g,r.b),s.setXYZ(43,r.r,r.g,r.b),s.setXYZ(44,r.r,r.g,r.b),s.setXYZ(45,r.r,r.g,r.b),s.setXYZ(46,r.r,r.g,r.b),s.setXYZ(47,r.r,r.g,r.b),s.setXYZ(48,r.r,r.g,r.b),s.setXYZ(49,r.r,r.g,r.b),s.needsUpdate=!0}update(){const t=this.geometry,e=this.pointMap;Yh.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),qh("c",e,t,Yh,0,0,-1),qh("t",e,t,Yh,0,0,1),qh("n1",e,t,Yh,-1,-1,-1),qh("n2",e,t,Yh,1,-1,-1),qh("n3",e,t,Yh,-1,1,-1),qh("n4",e,t,Yh,1,1,-1),qh("f1",e,t,Yh,-1,-1,1),qh("f2",e,t,Yh,1,-1,1),qh("f3",e,t,Yh,-1,1,1),qh("f4",e,t,Yh,1,1,1),qh("u1",e,t,Yh,.7,1.1,-1),qh("u2",e,t,Yh,-.7,1.1,-1),qh("u3",e,t,Yh,0,2,-1),qh("cf1",e,t,Yh,-1,0,1),qh("cf2",e,t,Yh,1,0,1),qh("cf3",e,t,Yh,0,-1,1),qh("cf4",e,t,Yh,0,1,1),qh("cn1",e,t,Yh,-1,0,-1),qh("cn2",e,t,Yh,1,0,-1),qh("cn3",e,t,Yh,0,-1,-1),qh("cn4",e,t,Yh,0,1,-1),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},e.CanvasTexture=class extends de{constructor(t,e,n,i,r,s,o,a,l){super(t,e,n,i,r,s,o,a,l),this.isCanvasTexture=!0,this.needsUpdate=!0}},e.CapsuleBufferGeometry=class extends ja{constructor(t,e,n,i){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(t,e,n,i)}},e.CapsuleGeometry=ja,e.CatmullRomCurve3=La,e.CineonToneMapping=3,e.CircleBufferGeometry=class extends Xa{constructor(t,e,n,i){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(t,e,n,i)}},e.CircleGeometry=Xa,e.ClampToEdgeWrapping=S,e.Clock=ah,e.Color=oe,e.ColorKeyframeTrack=fc,e.ColorManagement=Qt,e.CompressedArrayTexture=class extends ba{constructor(t,e,n,i,r,s){super(t,e,n,r,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=S}},e.CompressedTexture=ba,e.CompressedTextureLoader=class extends Tc{constructor(t){super(t)}load(t,e,n,i){const r=this,s=[],o=new ba,a=new Cc(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(r.withCredentials);let l=0;function c(c){a.load(t[c],function(t){const n=r.parse(t,!0);s[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(o.minFilter=R),o.image=s,o.format=n.format,o.needsUpdate=!0,e&&e(o))},n,i)}if(Array.isArray(t))for(let e=0,n=t.length;e<n;++e)c(e);else a.load(t,function(t){const n=r.parse(t,!0);if(n.isCubemap){const t=n.mipmaps.length/n.mipmapCount;for(let e=0;e<t;e++){s[e]={mipmaps:[]};for(let t=0;t<n.mipmapCount;t++)s[e].mipmaps.push(n.mipmaps[e*n.mipmapCount+t]),s[e].format=n.format,s[e].width=n.width,s[e].height=n.height}o.image=s}else o.image.width=n.width,o.image.height=n.height,o.mipmaps=n.mipmaps;1===n.mipmapCount&&(o.minFilter=R),o.format=n.format,o.needsUpdate=!0,e&&e(o)},n,i);return o}},e.ConeBufferGeometry=class extends qa{constructor(t,e,n,i,r,s,o){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(t,e,n,i,r,s,o)}},e.ConeGeometry=qa,e.CubeCamera=wi,e.CubeReflectionMapping=_,e.CubeRefractionMapping=y,e.CubeTexture=Si,e.CubeTextureLoader=class extends Tc{constructor(t){super(t)}load(t,e,n,i){const r=new Si,s=new Rc(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);let o=0;function a(n){s.load(t[n],function(t){r.images[n]=t,o++,6===o&&(r.needsUpdate=!0,e&&e(r))},void 0,i)}for(let e=0;e<t.length;++e)a(e);return r}},e.CubeUVReflectionMapping=M,e.CubicBezierCurve=Oa,e.CubicBezierCurve3=Na,e.CubicInterpolant=cc,e.CullFaceBack=1,e.CullFaceFront=2,e.CullFaceFrontBack=3,e.CullFaceNone=0,e.Curve=Ma,e.CurvePath=Va,e.CustomBlending=5,e.CustomToneMapping=5,e.CylinderBufferGeometry=class extends Ya{constructor(t,e,n,i,r,s,o,a){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(t,e,n,i,r,s,o,a)}},e.CylinderGeometry=Ya,e.Cylindrical=class{constructor(t=1,e=0,n=0){return this.radius=t,this.theta=e,this.y=n,this}set(t,e,n){return this.radius=t,this.theta=e,this.y=n,this}copy(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,n){return this.radius=Math.sqrt(t*t+n*n),this.theta=Math.atan2(t,n),this.y=e,this}clone(){return(new this.constructor).copy(this)}},e.Data3DTexture=ge,e.DataArrayTexture=me,e.DataTexture=Xo,e.DataTexture2DArray=class extends me{constructor(t,e,n,i){console.warn("THREE.DataTexture2DArray has been renamed to DataArrayTexture."),super(t,e,n,i)}},e.DataTexture3D=class extends ge{constructor(t,e,n,i){console.warn("THREE.DataTexture3D has been renamed to Data3DTexture."),super(t,e,n,i)}},e.DataTextureLoader=class extends Tc{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new Xo,o=new Cc(this.manager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(r.withCredentials),o.load(t,function(t){const n=r.parse(t);n&&(void 0!==n.image?s.image=n.image:void 0!==n.data&&(s.image.width=n.width,s.image.height=n.height,s.image.data=n.data),s.wrapS=void 0!==n.wrapS?n.wrapS:S,s.wrapT=void 0!==n.wrapT?n.wrapT:S,s.magFilter=void 0!==n.magFilter?n.magFilter:R,s.minFilter=void 0!==n.minFilter?n.minFilter:R,s.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(s.encoding=n.encoding),void 0!==n.flipY&&(s.flipY=n.flipY),void 0!==n.format&&(s.format=n.format),void 0!==n.t
2ype&&(s.type=n.type),void 0!==n.mipmaps&&(s.mipmaps=n.mipmaps,s.minFilter=P),1===n.mipmapCount&&(s.minFilter=R),void 0!==n.generateMipmaps&&(s.generateMipmaps=n.generateMipmaps),s.needsUpdate=!0,e&&e(s,n))},n,i),s}},e.DataUtils=eu,e.DecrementStencilOp=7683,e.DecrementWrapStencilOp=34056,e.DefaultLoadingManager=Sc,e.DepthFormat=z,e.DepthStencilFormat=B,e.DepthTexture=ao,e.DirectionalLight=Wc,e.DirectionalLightHelper=class extends xn{constructor(t,e,n){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",void 0===e&&(e=1);let i=new qn;i.setAttribute("position",new Bn([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));const r=new ia({fog:!1,toneMapped:!1});this.lightPlane=new ca(i,r),this.add(this.lightPlane),i=new qn,i.setAttribute("position",new Bn([0,0,0,0,0,1],3)),this.targetLine=new ca(i,r),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),Gh.setFromMatrixPosition(this.light.matrixWorld),Wh.setFromMatrixPosition(this.light.target.matrixWorld),jh.subVectors(Wh,Gh),this.lightPlane.lookAt(Wh),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Wh),this.targetLine.scale.z=jh.length()}},e.DiscreteInterpolant=uc,e.DodecahedronBufferGeometry=class extends Ja{constructor(t,e){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(t,e)}},e.DodecahedronGeometry=Ja,e.DoubleSide=2,e.DstAlphaFactor=206,e.DstColorFactor=208,e.DynamicCopyUsage=35050,e.DynamicDrawUsage=35048,e.DynamicReadUsage=35049,e.EdgesGeometry=el,e.EllipseCurve=wa,e.EqualDepth=4,e.EqualStencilFunc=514,e.EquirectangularReflectionMapping=x,e.EquirectangularRefractionMapping=b,e.Euler=sn,e.EventDispatcher=Ct,e.ExtrudeBufferGeometry=class extends Pl{constructor(t,e){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(t,e)}},e.ExtrudeGeometry=Pl,e.FileLoader=Cc,e.Float16BufferAttribute=class extends kn{constructor(t,e,n){super(new Uint16Array(t),e,n),this.isFloat16BufferAttribute=!0}},e.Float32BufferAttribute=Bn,e.Float64BufferAttribute=class extends kn{constructor(t,e,n){super(new Float64Array(t),e,n)}},e.FloatType=N,e.Fog=mo,e.FogExp2=fo,e.FramebufferTexture=class extends de{constructor(t,e,n){super({width:t,height:e}),this.isFramebufferTexture=!0,this.format=n,this.magFilter=E,this.minFilter=E,this.generateMipmaps=!1,this.needsUpdate=!0}},e.FrontSide=0,e.Frustum=Ii,e.GLBufferAttribute=class{constructor(t,e,n,i,r){this.isGLBufferAttribute=!0,this.buffer=t,this.type=e,this.itemSize=n,this.elementSize=i,this.count=r,this.version=0}set needsUpdate(t){!0===t&&this.version++}setBuffer(t){return this.buffer=t,this}setType(t,e){return this.type=t,this.elementSize=e,this}setItemSize(t){return this.itemSize=t,this}setCount(t){return this.count=t,this}},e.GLSL1="100",e.GLSL3=Et,e.GreaterDepth=6,e.GreaterEqualDepth=5,e.GreaterEqualStencilFunc=518,e.GreaterStencilFunc=516,e.GridHelper=class extends da{constructor(t=10,e=10,n=4473924,i=8947848){n=new oe(n),i=new oe(i);const r=e/2,s=t/e,o=t/2,a=[],l=[];for(let t=0,c=0,h=-o;t<=e;t++,h+=s){a.push(-o,0,h,o,0,h),a.push(h,0,-o,h,0,o);const e=t===r?n:i;e.toArray(l,c),c+=3,e.toArray(l,c),c+=3,e.toArray(l,c),c+=3,e.toArray(l,c),c+=3}const c=new qn;c.setAttribute("position",new Bn(a,3)),c.setAttribute("color",new Bn(l,3));super(c,new ia({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},e.Group=ro,e.HalfFloatType=U,e.HemisphereLight=Pc,e.HemisphereLightHelper=class extends xn{constructor(t,e,n){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const i=new Ol(e);i.rotateY(.5*Math.PI),this.material=new On({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const r=i.getAttribute("position"),s=new Float32Array(3*r.count);i.setAttribute("color",new kn(s,3)),this.add(new di(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const t=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const e=t.geometry.getAttribute("color");Hh.copy(this.light.color),Vh.copy(this.light.groundColor);for(let t=0,n=e.count;t<n;t++){const i=t<n/2?Hh:Vh;e.setXYZ(t,i.r,i.g,i.b)}e.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),t.lookAt(Bh.setFromMatrixPosition(this.light.matrixWorld).negate())}},e.HemisphereLightProbe=class extends qc{constructor(t,e,n=1){super(void 0,n),this.isHemisphereLightProbe=!0;const i=(new oe).set(t),r=(new oe).set(e),s=new _e(i.r,i.g,i.b),o=new _e(r.r,r.g,r.b),a=Math.sqrt(Math.PI),l=a*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(o).multiplyScalar(a),this.sh.coefficients[1].copy(s).sub(o).multiplyScalar(l)}},e.IcosahedronBufferGeometry=class extends Dl{constructor(t,e){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(t,e)}},e.IcosahedronGeometry=Dl,e.ImageBitmapLoader=class extends Tc{constructor(t){super(t),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,e,n,i){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Mc.get(t);if(void 0!==s)return r.manager.itemStart(t),setTimeout(function(){e&&e(s),r.manager.itemEnd(t)},0),s;const o={};o.credentials="anonymous"===this.crossOrigin?"same-origin":"include",o.headers=this.requestHeader,fetch(t,o).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(n){Mc.add(t,n),e&&e(n),r.manager.itemEnd(t)}
vendor: 20,509 bytes, line 2
2).catch(function(e){i&&i(e),r.manager.itemError(t),r.manager.itemEnd(t)}),r.manager.itemStart(t)}},e.ImageLoader=Rc,e.ImageUtils=le,e.ImmediateRenderObject=function(){console.error("THREE.ImmediateRenderObject has been removed.")},e.IncrementStencilOp=7682,e.IncrementWrapStencilOp=34055,e.InstancedBufferAttribute=Jo,e.InstancedBufferGeometry=Kc,e.InstancedInterleavedBuffer=class extends vo{constructor(t,e,n=1){super(t,e),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){const e=super.clone(t);return e.meshPerAttribute=this.meshPerAttribute,e}toJSON(t){const e=super.toJSON(t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}},e.InstancedMesh=na,e.Int16BufferAttribute=class extends kn{constructor(t,e,n){super(new Int16Array(t),e,n)}},e.Int32BufferAttribute=class extends kn{constructor(t,e,n){super(new Int32Array(t),e,n)}},e.Int8BufferAttribute=class extends kn{constructor(t,e,n){super(new Int8Array(t),e,n)}},e.IntType=1013,e.InterleavedBuffer=vo,e.InterleavedBufferAttribute=yo,e.Interpolant=lc,e.InterpolateDiscrete=dt,e.InterpolateLinear=pt,e.InterpolateSmooth=ft,e.InvertStencilOp=5386,e.KeepStencilOp=St,e.KeyframeTrack=dc,e.LOD=Fo,e.LatheBufferGeometry=class extends Wa{constructor(t,e,n,i){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(t,e,n,i)}},e.LatheGeometry=Wa,e.Layers=on,e.LessDepth=2,e.LessEqualDepth=3,e.LessEqualStencilFunc=515,e.LessStencilFunc=513,e.Light=Lc,e.LightProbe=qc,e.Line=ca,e.Line3=class{constructor(t=new _e,e=new _e){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){Dh.subVectors(t,this.start),Oh.subVectors(this.end,this.start);const n=Oh.dot(Oh);let i=Oh.dot(Dh)/n;return e&&(i=Ot(i,0,1)),i}closestPointToPoint(t,e,n){const i=this.closestPointToPointParameter(t,e);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}},e.LineBasicMaterial=ia,e.LineCurve=Ua,e.LineCurve3=ka,e.LineDashedMaterial=tc,e.LineLoop=pa,e.LineSegments=da,e.LinearEncoding=xt,e.LinearFilter=R,e.LinearInterpolant=hc,e.LinearMipMapLinearFilter=1008,e.LinearMipMapNearestFilter=1007,e.LinearMipmapLinearFilter=P,e.LinearMipmapNearestFilter=L,e.LinearSRGBColorSpace=wt,e.LinearToneMapping=1,e.Loader=Tc,e.LoaderUtils=Jc,e.LoadingManager=wc,e.LoopOnce=2200,e.LoopPingPong=2202,e.LoopRepeat=2201,e.LuminanceAlphaFormat=1025,e.LuminanceFormat=1024,e.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},e.Material=Dn,e.MaterialLoader=Zc,e.MathUtils=Vt,e.Matrix3=Wt,e.Matrix4=qe,e.MaxEquation=104,e.Mesh=di,e.MeshBasicMaterial=On,e.MeshDepthMaterial=Ks,e.MeshDistanceMaterial=$s,e.MeshLambertMaterial=$l,e.MeshMatcapMaterial=Ql,e.MeshNormalMaterial=Kl,e.MeshPhongMaterial=Zl,e.MeshPhysicalMaterial=ql,e.MeshStandardMaterial=Yl,e.MeshToonMaterial=Jl,e.MinEquation=103,e.MirroredRepeatWrapping=T,e.MixOperation=1,e.MultiplyBlending=4,e.MultiplyOperation=0,e.NearestFilter=E,e.NearestMipMapLinearFilter=1005,e.NearestMipMapNearestFilter=1004,e.NearestMipmapLinearFilter=C,e.NearestMipmapNearestFilter=A,e.NeverDepth=0,e.NeverStencilFunc=512,e.NoBlending=0,e.NoColorSpace="",e.NoToneMapping=0,e.NormalAnimationBlendMode=_t,e.NormalBlending=1,e.NotEqualDepth=7,e.NotEqualStencilFunc=517,e.NumberKeyframeTrack=mc,e.Object3D=xn,e.ObjectLoader=class extends Tc{constructor(t){super(t)}load(t,e,n,i){const r=this,s=""===this.path?Jc.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s;const o=new Cc(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(n){let s=null;try{s=JSON.parse(n)}catch(e){return void 0!==i&&i(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}const o=s.metadata;if(void 0===o||void 0===o.type||"geometry"===o.type.toLowerCase())return void 0!==i&&i(new Error("THREE.ObjectLoader: Can't load "+t)),void console.error("THREE.ObjectLoader: Can't load "+t);r.parse(s,e)},n,i)}async loadAsync(t,e){const n=""===this.path?Jc.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||n;const i=new Cc(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);const r=await i.loadAsync(t,e),s=JSON.parse(r),o=s.metadata;if(void 0===o||void 0===o.type||"geometry"===o.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+t);return await this.parseAsync(s)}parse(t,e){const n=this.parseAnimations(t.animations),i=this.parseShapes(t.shapes),r=this.parseGeometries(t.geometries,i),s=this.parseImages(t.images,function(){void 0!==e&&e(l)}),o=this.parseTextures(t.textures,s),a=this.parseMaterials(t.materials,o),l=this.parseObject(t.object,r,a,o,n),c=this.parseSkeletons(t.skeletons,l);if(this.bindSkeletons(l,c),void 0!==e){let t=!1;for(const e in s)if(s[e].data instanceof HTMLImageElement){t=!0;break}!1===t&&e(l)}return l}async parseAsync(t){const e=this.parseAnimations(t.animations),n=this.parseShapes(t.shapes),i=this.parseGeometries(t.geometries,n),r=await this.parseImagesAsync(t.images),s=this.parseTextures(t.textures,r),o=this.parseMaterials(t.materials,s),a=this.parseObject(t.object,i,o,s,e),l=this.parseSkeletons(t.skeletons,a);return this.bindSkeletons(a,l),a}parseShapes(t){const e={};if(void 0!==t)for(let n=0,i=t.length;n<i;n++){const i=(new nl).fromJSON(t[n]);e[i.uuid]=i}return e}parseSkeletons(t,e){const n={},i={};if(e.traverse(function(t){t.isBone&&(i[t.uuid]=t)}),void 0!==t)for(let e=0,r=t.length;e<r;e++){const r=(new Zo).fromJSON(t[e],i);n[r.uuid]=r}return n}parseGeometries(t,e){const n={};if(void 0!==t){const i=new $c;for(let r=0,s=t.length;r<s;r++){let s;const o=t[r];switch(o.type){case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(o);break;default:o.type in Wl?s=Wl[o.type].fromJSON(o,e):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${o.type}"`)}s.uuid=o.uuid,void 0!==o.name&&(s.name=o.name),!0===s.isBufferGeometry&&void 0!==o.userData&&(s.userData=o.userData),n[o.uuid]=s}}return n}parseMaterials(t,e){const n={},i={};if(void 0!==t){const r=new Zc;r.setTextures(e);for(let e=0,s=t.length;e<s;e++){const s=t[e];void 0===n[s.uuid]&&(n[s.uuid]=r.parse(s)),i[s.uuid]=n[s.uuid]}}return i}parseAnimations(t){const e={};if(void 0!==t)for(let n=0;n<t.length;n++){const i=t[n],r=xc.parse(i);e[r.uuid]=r}return e}parseImages(t,e){const n=this,i={};let r;function s(t){if("string"==typeof t){const e=t;return function(t){return n.manager.itemStart(t),r.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemError(t),n.manager.itemEnd(t)})}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:n.resourcePath+e)}return t.data?{data:qt(t.type,t.data),width:t.width,height:t.height}:null}if(void 0!==t&&t.length>0){const n=new wc(e);r=new Rc(n),r.setCrossOrigin(this.crossOrigin);for(let e=0,n=t.length;e<n;e++){const n=t[e],r=n.url;if(Array.isArray(r)){const t=[];for(let e=0,n=r.length;e<n;e++){const n=s(r[e]);null!==n&&(n instanceof HTMLImageElement?t.push(n):t.push(new Xo(n.data,n.width,n.height)))}i[n.uuid]=new ce(t)}else{const t=s(n.url);i[n.uuid]=new ce(t)}}}return i}async parseImagesAsync(t){const e=this,n={};let i;async function r(t){if("string"==typeof t){const n=t,r=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:e.resourcePath+n;return await i.loadAsync(r)}return t.data?{data:qt(t.type,t.data),width:t.width,height:t.height}:null}if(void 0!==t&&t.length>0){i=new Rc(this.manager),i.setCrossOrigin(this.crossOrigin);for(let e=0,i=t.length;e<i;e++){const i=t[e],s=i.url;if(Array.isArray(s)){const t=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],i=await r(n);null!==i&&(i instanceof HTMLImageElement?t.push(i):t.push(new Xo(i.data,i.width,i.height)))}n[i.uuid]=new ce(t)}else{const t=await r(i.url);n[i.uuid]=new ce(t)}}}return n}parseTextures(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}const i={};if(void 0!==t)for(let r=0,s=t.length;r<s;r++){const s=t[r];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===e[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);const o=e[s.image],a=o.data;let l;Array.isArray(a)?(l=new Si,6===a.length&&(l.needsUpdate=!0)):(l=a&&a.data?new Xo:new de,a&&(l.needsUpdate=!0)),l.source=o,l.uuid=s.uuid,void 0!==s.name&&(l.name=s.name),void 0!==s.mapping&&(l.mapping=n(s.mapping,Qc)),void 0!==s.offset&&l.offset.fromArray(s.offset),void 0!==s.repeat&&l.repeat.fromArray(s.repeat),void 0!==s.center&&l.center.fromArray(s.center),void 0!==s.rotation&&(l.rotation=s.rotation),void 0!==s.wrap&&(l.wrapS=n(s.wrap[0],th),l.wrapT=n(s.wrap[1],th)),void 0!==s.format&&(l.format=s.format),void 0!==s.type&&(l.type=s.type),void 0!==s.encoding&&(l.encoding=s.encoding),void 0!==s.minFilter&&(l.minFilter=n(s.minFilter,eh)),void 0!==s.magFilter&&(l.magFilter=n(s.magFilter,eh)),void 0!==s.anisotropy&&(l.anisotropy=s.anisotropy),void 0!==s.flipY&&(l.flipY=s.flipY),void 0!==s.premultiplyAlpha&&(l.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(l.unpackAlignment=s.unpackAlignment),void 0!==s.userData&&(l.userData=s.userData),i[s.uuid]=l}return i}parseObject(t,e,n,i,r){let s,o,a;function l(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function c(t){if(void 0!==t){if(Array.isArray(t)){const e=[];for(let i=0,r=t.length;i<r;i++){const r=t[i];void 0===n[r]&&console.warn("THREE.ObjectLoader: Undefined material",r),e.push(n[r])}return e}return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),n[t]}}function h(t){return void 0===i[t]&&console.warn("THREE.ObjectLoader: Undefined texture",t),i[t]}switch(t.type){case"Scene":s=new go,void 0!==t.background&&(Number.isInteger(t.background)?s.background=new oe(t.background):s.background=h(t.background)),void 0!==t.environment&&(s.environment=h(t.environment)),void 0!==t.fog&&("Fog"===t.fog.type?s.fog=new mo(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(s.fog=new fo(t.fog.color,t.fog.density))),void 0!==t.backgroundBlurriness&&(s.backgroundBlurriness=t.backgroundBlurriness);break;case"PerspectiveCamera":s=new bi(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(s.focus=t.focus),void 0!==t.zoom&&(s.zoom=t.zoom),void 0!==t.filmGauge&&(s.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(s.filmOffset=t.filmOffset),void 0!==t.view&&(s.view=Object.assign({},t.view));break;case"OrthographicCamera":s=new Xi(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(s.zoom=t.zoom),void 0!==t.view&&(s.view=Object.assign({},t.view));break;case"AmbientLight":s=new jc(t.color,t.intensity);break;case"DirectionalLight":s=new Wc(t.color,t.intensity);break;case"PointLight":s=new Vc(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":s=new Xc(t.color,t.intensity,t.width,t.height);break;case"SpotLight":s=new kc(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":s=new Pc(t.color,t.groundColor,t.intensity);break;case"LightProbe":s=(new qc).fromJSON(t);break;case"SkinnedMesh":o=l(t.geometry),a=c(t.material),s=new Wo(o,a),void 0!==t.bindMode&&(s.bindMode=t.bindMode),void 0!==t.bindMatrix&&s.bindMatrix.fromArray(t.bindMatrix),void 0!==t.skeleton&&(s.skeleton=t.skeleton);break;case"Mesh":o=l(t.geometry),a=c(t.material),s=new di(o,a);break;case"InstancedMesh":o=l(t.geometry),a=c(t.material);const e=t.count,n=t.instanceMatrix,i=t.instanceColor;s=new na(o,a,e),s.instanceMatrix=new Jo(new Float32Array(n.array),16),void 0!==i&&(s.instanceColor=new Jo(new Float32Array(i.array),i.itemSize));break;case"LOD":s=new Fo;break;case"Line":s=new ca(l(t.geometry),c(t.material));break;case"LineLoop":s=new pa(l(t.geometry),c(t.material));break;case"LineSegments":s=new da(l(t.geometry),c(t.material));break;case"PointCloud":case"Points":s=new ya(l(t.geometry),c(t.material));break;case"Sprite":s=new Oo(c(t.material));break;case"Group":s=new ro;break;case"Bone":s=new jo;break;default:s=new xn}if(s.uuid=t.uuid,void 0!==t.name&&(s.name=t.name),void 0!==t.matrix?(s.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(void 0!==t.position&&s.position.fromArray(t.position),void 0!==t.rotation&&s.rotation.fromArray(t.rotation),void 0!==t.quaternion&&s.quaternion.fromArray(t.quaternion),void 0!==t.scale&&s.scale.fromArray(t.scale)),void 0!==t.castShadow&&(s.castShadow=t.castShadow),void 0!==t.receiveShadow&&(s.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(s.shadow.bias=t.shadow.bias),void 0!==t.shadow.normalBias&&(s.shadow.normalBias=t.shadow.normalBias),void 0!==t.shadow.radius&&(s.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&s.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(s.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(s.visible=t.visible),void 0!==t.frustumCulled&&(s.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(s.renderOrder=t.renderOrder),void 0!==t.userData&&(s.userData=t.userData),void 0!==t.layers&&(s.layers.mask=t.layers),void 0!==t.children){const o=t.children;for(let t=0;t<o.length;t++)s.add(this.parseObject(o[t],e,n,i,r))}if(void 0!==t.animations){const e=t.animations;for(let t=0;t<e.length;t++){const n=e[t];s.animations.push(r[n])}}if("LOD"===t.type){void 0!==t.autoUpdate&&(s.autoUpdate=t.autoUpdate);const e=t.levels;for(let t=0;t<e.length;t++){const n=e[t],i=s.getObjectByProperty("uuid",n.object);void 0!==i&&s.addLevel(i,n.distance,n.hysteresis)}}return s}bindSkeletons(t,e){0!==Object.keys(e).length&&t.traverse(function(t){if(!0===t.isSkinnedMesh&&void 0!==t.skeleton){const n=e[t.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",t.skeleton):t.bind(n,t.bindMatrix)}})}},e.ObjectSpaceNormalMap=1,e.OctahedronBufferGeometry=class extends Ol{constructor(t,e){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(t,e)}},e.OctahedronGeometry=Ol,e.OneFactor=201,e.OneMinusDstAlphaFactor=207,e.OneMinusDstColorFactor=209,e.OneMinusSrcAlphaFactor=205,e.OneMinusSrcColorFactor=203,e.OrthographicCamera=Xi,e.PCFShadowMap=1,e.PCFSoftShadowMap=2,e.PMREMGenerator=er,e.Path=Ga,e.PerspectiveCamera=bi,e.Plane=Ri,e.PlaneBufferGeometry=class extends Ni{constructor(t,e,n,i){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(t,e,n,i)}},e.PlaneGeometry=Ni,e.PlaneHelper=class extends ca{constructor(t,e=1,n=16776960){const i=n,r=new qn;r.setAttribute("position",new Bn([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),r.computeBoundingSphere(),super(r,new ia({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=t,this.size=e;const s=new qn;s.setAttribute("position",new Bn([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),s.computeBoundingSphere(),this.add(new di(s,new On({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(t){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(t)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}},e.PointLight=Vc,e.PointLightHelper=class extends di{constructor(t,e,n){super(new kl(e,4,2),new On({wireframe:!0,fog:!1,toneMapped:!1})),this.light=t,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},e.Points=ya,e.PointsMaterial=fa,e.PolarGridHelper=class extends da{constructor(t=10,e=16,n=8,i=64,r=4473924,s=8947848){r=new oe(r),s=new oe(s);const o=[],a=[];if(e>1)for(let n=0;n<e;n++){const i=n/e*(2*Math.PI),l=Math.sin(i)*t,c=Math.cos(i)*t;o.push(0,0,0),o.push(l,0,c);const h=1&n?r:s;a.push(h.r,h.g,h.b),a.push(h.r,h.g,h.b)}for(let e=0;e<n;e++){const l=1&e?r:s,c=t-t/n*e;for(let t=0;t<i;t++){let e=t/i*(2*Math.PI),n=Math.sin(e)*c,r=Math.cos(e)*c;o.push(n,0,r),a.push(l.r,l.g,l.b),e=(t+1)/i*(2*Math.PI),n=Math.sin(e)*c,r=Math.cos(e)*c,o.push(n,0,r),a.push(l.r,l.g,l.b)}}const l=new qn;l.setAttribute("position",new Bn(o,3)),l.setAttribute("color",new Bn(a,3));super(l,new ia({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},e.PolyhedronBufferGeometry=class extends Za{constructor(t,e,n,i){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(t,e,n,i)}},e.PolyhedronGeometry=Za,e.PositionalAudio=class extends ph{constructor(t){super(t),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(t){return this.panner.refDistance=t,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(t){return this.panner.rolloffFactor=t,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(t){return this.panner.distanceModel=t,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(t){return this.panner.maxDistance=t,this}setDirectionalCone(t,e,n){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=n,this}updateMatrixWorld(t){if(super.updateMatrixWorld(t),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(fh,mh,gh),vh.set(0,0,1).applyQuaternion(mh);const e=this.panner;if(e.positionX){const t=this.context.currentTime+this.listener.timeDelta;e.positionX.linearRampToValueAtTime(fh.x,t),e.positionY.linearRampToValueAtTime(fh.y,t),e.positionZ.linearRampToValueAtTime(fh.z,t),e.orientationX.linearRampToValueAtTime(vh.x,t),e.orientationY.linearRampToValueAtTime(vh.y,t),e.orientationZ.linearRampToValueAtTime(vh.z,t)}else e.setPosition(fh.x,fh.y,fh.z),e.setOrientation(vh.x,vh.y,vh.z)}},e.PropertyBinding=Th,e.PropertyMixer=_h,e.QuadraticBezierCurve=Fa,e.QuadraticBezierCurve3=za,e.Quaternion=ve,e.QuaternionKeyframeTrack=vc,e.QuaternionLinearInterpolant=gc,e.REVISION=n,e.RGBADepthPacking=3201,e.RGBAFormat=F,e.RGBAIntegerFormat=1033,e.RGBA_ASTC_10x10_Format=lt,e.RGBA_ASTC_10x5_Format=st,e.RGBA_ASTC_10x6_Format=ot,e.RGBA_ASTC_10x8_Format=at,e.RGBA_ASTC_12x10_Format=ct,e.RGBA_ASTC_12x12_Format=ht,e.RGBA_ASTC_4x4_Format=K,e.RGBA_ASTC_5x4_Format=$,e.RGBA_ASTC_5x5_Format=Q,e.RGBA_ASTC_6x5_Format=tt,e.RGBA_ASTC_6x6_Format=et,e.RGBA_ASTC_8x5_Format=nt,e.RGBA_ASTC_8x6_Format=it,e.RGBA_ASTC_8x8_Format=rt,e.RGBA_BPTC_Format=ut,e.RGBA_ETC2_EAC_Format=J,e.RGBA_PVRTC_2BPPV1_Format=q,e.RGBA_PVRTC_4BPPV1_Format=Y,e.RGBA_S3TC_DXT1_Format=V,e.RGBA_S3TC_DXT3_Format=G,e.RGBA_S3TC_DXT5_Format=W,e.RGBFormat=1022,e.RGB_ETC1_Format=36196,e.RGB_ETC2_Format=Z,e.RGB_PVRTC_2BPPV1_Format=X,e.RGB_PVRTC_4BPPV1_Format=j,e.RGB_S3TC_DXT1_Format=H,e.RGFormat=1030,e.RGIntegerFormat=1031,e.RawShaderMaterial=Xl,e.Ray=Ye,e.Raycaster=class{constructor(t,e,n=0,i=1/0){this.ray=new Ye(t,e),this.near=n,this.far=i,this.camera=null,this.layers=new on,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):console.error("THREE.Raycaster:
2Unsupported camera type: "+e.type)}intersectObject(t,e=!0,n=[]){return Ph(t,this,n,e),n.sort(Lh),n}intersectObjects(t,e=!0,n=[]){for(let i=0,r=t.length;i<r;i++)Ph(t[i],this,n,e);return n.sort(Lh),n}},e.RectAreaLight=Xc,e.RedFormat=1028,e.RedIntegerFormat=1029,e.ReinhardToneMapping=2,e.RepeatWrapping=w,e.ReplaceStencilOp=7681,e.ReverseSubtractEquation=102,e.RingBufferGeometry=class extends Nl{constructor(t,e,n,i,r,s){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(t,e,n,i,r,s)}},e.RingGeometry=Nl,e.SRGBColorSpace=Mt,e.Scene=go,e.ShaderChunk=Ui,e.ShaderLib=Fi,e.ShaderMaterial=yi,e.ShadowMaterial=jl,e.Shape=nl,e.ShapeBufferGeometry=class extends Ul{constructor(t,e){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(t,e)}},e.ShapeGeometry=Ul,e.ShapePath=class{constructor(){this.type="ShapePath",this.color=new oe,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new Ga,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,n,i){return this.currentPath.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,s){return this.currentPath.bezierCurveTo(t,e,n,i,r,s),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function e(t,e){const n=e.length;let i=!1;for(let r=n-1,s=0;s<n;r=s++){let n=e[r],o=e[s],a=o.x-n.x,l=o.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=e[s],a=-a,o=e[r],l=-l),t.y<n.y||t.y>o.y)continue;if(t.y===n.y){if(t.x===n.x)return!0}else{const e=l*(t.x-n.x)-a*(t.y-n.y);if(0===e)return!0;if(e<0)continue;i=!i}}else{if(t.y!==n.y)continue;if(o.x<=t.x&&t.x<=n.x||n.x<=t.x&&t.x<=o.x)return!0}}return i}const n=Cl.isClockWise,i=this.subPaths;if(0===i.length)return[];let r,s,o;const a=[];if(1===i.length)return s=i[0],o=new nl,o.curves=s.curves,a.push(o),a;let l=!n(i[0].getPoints());l=t?!l:l;const c=[],h=[];let u,d,p=[],f=0;h[f]=void 0,p[f]=[];for(let e=0,o=i.length;e<o;e++)s=i[e],u=s.getPoints(),r=n(u),r=t?!r:r,r?(!l&&h[f]&&f++,h[f]={s:new nl,p:u},h[f].s.curves=s.curves,l&&f++,p[f]=[]):p[f].push({h:s,p:u[0]});if(!h[0])return function(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[n],r=new nl;r.curves=i.curves,e.push(r)}return e}(i);if(h.length>1){let t=!1,n=0;for(let t=0,e=h.length;t<e;t++)c[t]=[];for(let i=0,r=h.length;i<r;i++){const r=p[i];for(let s=0;s<r.length;s++){const o=r[s];let a=!0;for(let r=0;r<h.length;r++)e(o.p,h[r].p)&&(i!==r&&n++,a?(a=!1,c[r].push(o)):t=!0);a&&c[i].push(o)}}n>0&&!1===t&&(p=c)}for(let t=0,e=h.length;t<e;t++){o=h[t].s,a.push(o),d=p[t];for(let t=0,e=d.length;t<e;t++)o.holes.push(d[t].h)}return a}},e.ShapeUtils=Cl,e.ShortType=1011,e.Skeleton=Zo,e.SkeletonHelper=class extends da{constructor(t){const e=zh(t),n=new qn,i=[],r=[],s=new oe(0,0,1),o=new oe(0,1,0);for(let t=0;t<e.length;t++){const n=e[t];n.parent&&n.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(s.r,s.g,s.b),r.push(o.r,o.g,o.b))}n.setAttribute("position",new Bn(i,3)),n.setAttribute("color",new Bn(r,3));super(n,new ia({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){const e=this.bones,n=this.geometry,i=n.getAttribute("position");Fh.copy(this.root.matrixWorld).invert();for(let t=0,n=0;t<e.length;t++){const r=e[t];r.parent&&r.parent.isBone&&(kh.multiplyMatrices(Fh,r.matrixWorld),Uh.setFromMatrixPosition(kh),i.setXYZ(n,Uh.x,Uh.y,Uh.z),kh.multiplyMatrices(Fh,r.parent.matrixWorld),Uh.setFromMatrixPosition(kh),i.setXYZ(n+1,Uh.x,Uh.y,Uh.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}dispose(){this.geometry.dispose(),this.material.dispose()}},e.SkinnedMesh=Wo,e.Source=ce,e.Sphere=ze,e.SphereBufferGeometry=class extends kl{constructor(t,e,n,i,r,s,o){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(t,e,n,i,r,s,o)}},e.SphereGeometry=kl,e.Spherical=class{constructor(t=1,e=0,n=0){return this.radius=t,this.phi=e,this.theta=n,this}set(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){const t=1e-6;return this.phi=Math.max(t,Math.min(Math.PI-t,this.phi)),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,n){return this.radius=Math.sqrt(t*t+e*e+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,n),this.phi=Math.acos(Ot(e/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}},e.SphericalHarmonics3=Yc,e.SplineCurve=Ba,e.SpotLight=kc,e.SpotLightHelper=class extends xn{constructor(t,e){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";const n=new qn,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let t=0,e=1,n=32;t<n;t++,e++){const r=t/n*Math.PI*2,s=e/n*Math.PI*2;i.push(Math.cos(r),Math.sin(r),1,Math.cos(s),Math.sin(s),1)}n.setAttribute("position",new Bn(i,3));const r=new ia({fog:!1,toneMapped:!1});this.cone=new da(n,r),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const t=this.light.distance?this.light.distance:1e3,e=t*Math.tan(this.light.angle);this.cone.scale.set(e,e,t),Nh.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Nh),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},e.Sprite=Oo,e.SpriteMaterial=xo,e.SrcAlphaFactor=204,e.SrcAlphaSaturateFactor=210,e.SrcColorFactor=202,e.StaticCopyUsage=35046,e.StaticDrawUsage=Tt,e.StaticReadUsage=35045,e.StereoCamera=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new bi,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new bi,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov
2=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep,oh.copy(t.projectionMatrix);const n=e.eyeSep/2,i=n*e.near/e.focus,r=e.near*Math.tan(Pt*e.fov*.5)/e.zoom;let s,o;sh.elements[12]=-n,rh.elements[12]=n,s=-r*e.aspect+i,o=r*e.aspect+i,oh.elements[0]=2*e.near/(o-s),oh.elements[8]=(o+s)/(o-s),this.cameraL.projectionMatrix.copy(oh),s=-r*e.aspect-i,o=r*e.aspect-i,oh.elements[0]=2*e.near/(o-s),oh.elements[8]=(o+s)/(o-s),this.cameraR.projectionMatrix.copy(oh)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(sh),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(rh)}},e.StreamCopyUsage=35042,e.StreamDrawUsage=35040,e.StreamReadUsage=35041,e.StringKeyframeTrack=_c,e.SubtractEquation=101,e.SubtractiveBlending=3,e.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},e.TangentSpaceNormalMap=0,e.TetrahedronBufferGeometry=class extends Fl{constructor(t,e){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(t,e)}},e.TetrahedronGeometry=Fl,e.Texture=de,e.TextureLoader=class extends Tc{constructor(t){super(t)}load(t,e,n,i){const r=new de,s=new Rc(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,function(t){r.image=t,r.needsUpdate=!0,void 0!==e&&e(r)},n,i),r}},e.TorusBufferGeometry=class extends zl{constructor(t,e,n,i,r){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(t,e,n,i,r)}},e.TorusGeometry=zl,e.TorusKnotBufferGeometry=class extends Bl{constructor(t,e,n,i,r,s){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(t,e,n,i,r,s)}},e.TorusKnotGeometry=Bl,e.Triangle=Pn,e.TriangleFanDrawMode=2,e.TriangleStripDrawMode=1,e.TrianglesDrawMode=0,e.TubeBufferGeometry=class extends Hl{constructor(t,e,n,i,r){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(t,e,n,i,r)}},e.TubeGeometry=Hl,e.UVMapping=v,e.Uint16BufferAttribute=Fn,e.Uint32BufferAttribute=zn,e.Uint8BufferAttribute=class extends kn{constructor(t,e,n){super(new Uint8Array(t),e,n)}},e.Uint8ClampedBufferAttribute=class extends kn{constructor(t,e,n){super(new Uint8ClampedArray(t),e,n)}},e.Uniform=Ch,e.UniformsGroup=class extends Ct{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:Rh++}),this.name="",this.usage=Tt,this.uniforms=[]}add(t){return this.uniforms.push(t),this}remove(t){const e=this.uniforms.indexOf(t);return-1!==e&&this.uniforms.splice(e,1),this}setName(t){return this.name=t,this}setUsage(t){return this.usage=t,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(t){this.name=t.name,this.usage=t.usage;const e=t.uniforms;this.uniforms.length=0;for(let t=0,n=e.length;t<n;t++)this.uniforms.push(e[t].clone());return this}clone(){return(new this.constructor).copy(this)}},e.UniformsLib=ki,e.UniformsUtils=_i,e.UnsignedByteType=I,e.UnsignedInt248Type=k,e.UnsignedIntType=O,e.UnsignedShort4444Type=1017,e.UnsignedShort5551Type=1018,e.UnsignedShortType=D,e.VSMShadowMap=3,e.Vector2=Gt,e.Vector3=_e,e.Vector4=pe,e.VectorKeyframeTrack=yc,e.VideoTexture=class extends de{constructor(t,e,n,i,r,s,o,a,l){super(t,e,n,i,r,s,o,a,l),this.isVideoTexture=!0,this.minFilter=void 0!==s?s:R,this.magFilter=void 0!==r?r:R,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)})}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1==="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},e.WebGL1Renderer=po,e.WebGL3DRenderTarget=class extends fe{constructor(t=1,e=1,n=1){super(t,e),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new ge(null,t,e,n),this.texture.isRenderTargetTexture=!0}},e.WebGLArrayRenderTarget=class extends fe{constructor(t=1,e=1,n=1){super(t,e),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new me(null,t,e,n),this.texture.isRenderTargetTexture=!0}},e.WebGLCubeRenderTarget=Ti,e.WebGLMultipleRenderTargets=class extends fe{constructor(t=1,e=1,n=1,i={}
2){super(t,e,i),this.isWebGLMultipleRenderTargets=!0;const r=this.texture;this.texture=[];for(let t=0;t<n;t++)this.texture[t]=r.clone(),this.texture[t].isRenderTargetTexture=!0}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let i=0,r=this.texture.length;i<r;i++)this.texture[i].image.width=t,this.texture[i].image.height=e,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e),this}copy(t){this.dispose(),this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,null!==t.depthTexture&&(this.depthTexture=t.depthTexture.clone()),this.texture.length=0;for(let e=0,n=t.texture.length;e<n;e++)this.texture[e]=t.texture[e].clone(),this.texture[e].isRenderTargetTexture=!0;return this}},e.WebGLMultisampleRenderTarget=class extends fe{constructor(t,e,n){console.error('THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the "samples" property to greater 0 to enable multisampling.'),super(t,e,n),this.samples=4}},e.WebGLRenderTarget=fe,e.WebGLRenderer=uo,e.WebGLUtils=no,e.WireframeGeometry=Vl,e.WrapAroundEnding=vt,e.ZeroCurvatureEnding=mt,e.ZeroFactor=200,e.ZeroSlopeEnding=gt,e.ZeroStencilOp=0,e._SRGBAFormat=At,e.sRGBEncoding=bt}}]);
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.