!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=419)}([,function(e,t,n){"use strict";e.exports=n(421)},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(){return window.innerWidth>=1e3}function i(e){return e*Math.PI/180}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e){var t=void 0,n=void 0,r=void 0,i=void 0;if(e instanceof Array)return e.map(function(e){return"object"===(void 0===e?"undefined":h(e))&&(e=a(e)),e});t={};for(n in e)e.hasOwnProperty(n)&&(r=(n.charAt(0).toLowerCase()+n.slice(1)||n).toString(),i=e[n],(i instanceof Array||null!==i&&i.constructor===Object)&&(i=a(i)),t[r]=i);return t}function s(e){var t=e.getBoundingClientRect().top,n=window.pageYOffset,r=t+n-20;window.scroll({top:r,behavior:"smooth"})}function l(e,t){var n=document.createEvent("MouseEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function u(e,t,n,r,i,o){if(navigator.cookieEnabled){var a=encodeURIComponent(e),s=encodeURIComponent(t),l=a+"="+s;if("number"==typeof n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),l+="; expires="+u.toGMTString()}r&&(l+="; path="+r),i&&(l+="; domain="+i),o&&(l+="; secure"),document.cookie=l}}function c(e){if(""!==document.cookie)for(var t=document.cookie.split(/; */),n=0;n<t.length;n++){var r=t[n].split("=")[0],i=t[n].split("=")[1];if(r===decodeURIComponent(e))return decodeURIComponent(i)}}function d(e){var t=encodeURIComponent(e);document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}Object.defineProperty(t,"__esModule",{value:!0});var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.checkIfDesktop=r,t.getRadians=i,t.capitalizeFirstLetter=o,t.camelize=a,t.scrollToElement=s,t.triggerMouseEvent=l,t.setCookie=u,t.getCookie=c,t.deleteCookie=d;var f=n(429);(function(e){return e&&e.__esModule?e:{default:e}})(f).default.polyfill()},function(e,t,n){"use strict";function r(e){return"[object Array]"===S.call(e)}function i(e){return"[object ArrayBuffer]"===S.call(e)}function o(e){return"undefined"!=typeof FormData&&e instanceof FormData}function a(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"==typeof e}function l(e){return"number"==typeof e}function u(e){return void 0===e}function c(e){return null!==e&&"object"==typeof e}function d(e){return"[object Date]"===S.call(e)}function h(e){return"[object File]"===S.call(e)}function f(e){return"[object Blob]"===S.call(e)}function p(e){return"[object Function]"===S.call(e)}function m(e){return c(e)&&p(e.pipe)}function g(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function v(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function y(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}function _(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=_(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)b(arguments[n],e);return t}function w(e,t,n){return b(t,function(t,r){e[r]=n&&"function"==typeof t?x(t,n):t}),e}var x=n(154),E=n(432),S=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:i,isBuffer:E,isFormData:o,isArrayBufferView:a,isString:s,isNumber:l,isObject:c,isUndefined:u,isDate:d,isFile:h,isBlob:f,isFunction:p,isStream:m,isURLSearchParams:g,isStandardBrowserEnv:y,forEach:b,merge:_,extend:w,trim:v}},,,,function(e,t,n){e.exports=n(431)},,,,,,,function(e,t,n){var r,i;/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=n.apply(null,r);a&&e.push(a)}else if("object"===i)for(var s in r)o.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}var o={}.hasOwnProperty;void 0!==e&&e.exports?(n.default=n,e.exports=n):(r=[],void 0!==(i=function(){return n}.apply(t,r))&&(e.exports=i))}()},function(e,t,n){e.exports=n(474)()},,,function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ShipContextProvider=t.ShipContext=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=t.ShipContext=l.default.createContext();t.ShipContextProvider=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={activeAreaId:"",activeSubareaId:"",shipType:"",setActiveSubareaId:function(e){n.setState({activeSubareaId:e})},resetActiveAreas:function(){n.setState({activeAreaId:"",activeAreaOnImageId:"",activeSubareaId:""})},setActiveAreaId:function(e){n.setState({activeAreaId:e})},setShipType:function(e){n.setState({shipType:e})}},n}return o(t,e),a(t,[{key:"render",value:function(){return l.default.createElement(u.Provider,{value:this.state},this.props.children)}}]),t}(s.Component)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(539);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var i=n(540);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var o=n(541);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var a=n(542);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var s=n(543);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})});var l=n(544);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})});var u=n(545);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})});var c=n(546);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})});var d=n(547);Object.keys(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})})},,,function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initialOrbitControlsSettings=t.cameraTransitionSpeed=t.cameraInitialPosition=t.cameraLoadingPosition=t.areaHotspotsSettings=t.areasNamesMap=t.ships2D=t.ship3D=t.ships=void 0;var r=n(19),i=t.ships={bulk:"bulk",tanker:"tanker",passenger:"passenger",container:"container",offshore:"offshore"},o=(t.ship3D=[i.bulk],t.ships2D=[i.tanker,i.passenger,i.offshore,i.container],t.areasNamesMap={superstructure:"superstructure",mooringRopes:"mooringRopes",mooringRopesFront:"mooringRopesFront",engineRoom:"engineRoom",ballastWaterTank:"ballastWaterTank",cargoHold:"cargoHold",deck:"deck",exhaustGasBoiler:"exhaustGasBoiler",fuelOilTank:"fuelOilTank"});t.areaHotspotsSettings={superstructure:{name:o.superstructure,coordinates:{x:5.3,y:1.6,z:-.03},cameraCoordinates:{x:8.95,y:2.38,z:1.15}},mooringRopes:{name:o.mooringRopes,coordinates:{x:6.8,y:1,z:-.06},cameraCoordinates:{x:8.46,y:1.57,z:.67}},mooringRopesFront:{name:o.mooringRopes,coordinates:{x:-7,y:1.1,z:-.04},cameraCoordinates:{x:-10,y:2.51,z:-1.77}},engineRoom:{name:o.engineRoom,coordinates:{x:5.4,y:.3,z:.4},cameraCoordinates:{x:8.85,y:2.5,z:3.7}},ballastWaterTank:{name:o.ballastWaterTank,coordinates:{x:3,y:.3,z:.9},cameraCoordinates:{x:8.25,y:2.83,z:4.17}},cargoHold:{name:o.cargoHold,coordinates:{x:.7,y:1.12,z:-.03},cameraCoordinates:{x:4.15,y:5.38,z:4.23}},deck:{name:o.deck,coordinates:{x:-3,y:.95,z:.85},cameraCoordinates:{x:-7,y:3.38,z:-2}},exhaustGasBoiler:{name:o.exhaustGasBoiler,coordinates:{x:6,y:1.9,z:-.05},cameraCoordinates:{x:8.95,y:2.38,z:1.15}},fuelOilTank:{name:o.fuelOilTank,coordinates:{x:.7,y:.5,z:.9},cameraCoordinates:{x:4.15,y:3,z:7}}},t.cameraLoadingPosition={x:4.3,y:9,z:46},t.cameraInitialPosition={x:-4.3,y:9,z:13},t.cameraTransitionSpeed=1500,t.initialOrbitControlsSettings={minDistance:8,maxDistance:20,dampingFactor:.2,enableDamping:!0,enableKeys:!1,enablePan:!1,minAzimuthAngle:-1/0,maxAzimuthAngle:1/0,minPolarAngle:(0,r.getRadians)(-90),maxPolarAngle:(0,r.getRadians)(90),rotateSpeed:.25}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalContextProvider=t.GlobalContext=void 0;var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=t.GlobalContext=l.default.createContext();t.GlobalContextProvider=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isCategoriesListVisible:!1,setCategoriesListVisibility:function(e){n.setState({isCategoriesListVisible:e})}},n}return o(t,e),a(t,[{key:"render",value:function(){return l.default.createElement(u.Provider,{value:this.state},this.props.children)}}]),t}(s.Component)},,,,function(e,t,n){(function(t){function n(e){if("string"==typeof e)return e;if(i(e))return v?v.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}function r(e){return!!e&&"object"==typeof e}function i(e){return"symbol"==typeof e||r(e)&&p.call(e)==l}function o(e){return null==e?"":n(e)}function a(e){var t=++f;return o(e)+t}var s=1/0,l="[object Symbol]",u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype,f=0,p=h.toString,m=d.Symbol,g=m?m.prototype:void 0,v=g?g.toString:void 0;e.exports=a}).call(t,n(39))},,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(){}function i(e,t){this.x=e||0,this.y=t||0}function o(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function a(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}function s(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}function l(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function u(e,t,n,r,o,a,s,c,d,h){Object.defineProperty(this,"id",{value:Pl++}),this.uuid=Ol.generateUUID(),this.name="",this.image=void 0!==e?e:u.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:u.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:us,this.wrapT=void 0!==r?r:us,this.magFilter=void 0!==o?o:ps,this.minFilter=void 0!==a?a:gs,this.anisotropy=void 0!==d?d:1,this.format=void 0!==s?s:Rs,this.type=void 0!==c?c:vs,this.offset=new i(0,0),this.repeat=new i(1,1),this.center=new i(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new l,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==h?h:yl,this.version=0,this.onUpdate=null}function c(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1}function d(e,t,n){this.width=e,this.height=t,this.scissor=new c(0,0,e,t),this.scissorTest=!1,this.viewport=new c(0,0,e,t),n=n||{},void 0===n.minFilter&&(n.minFilter=ps),this.texture=new u(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),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}function h(e,t,n){d.call(this,e,t,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function f(e,t,n,r,i,o,a,s,l,c,d,h){u.call(this,null,o,a,s,l,c,r,i,d,h),this.image={data:e,width:t,height:n},this.magFilter=void 0!==l?l:ds,this.minFilter=void 0!==c?c:ds,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function p(e,t){this.min=void 0!==e?e:new s(1/0,1/0,1/0),this.max=void 0!==t?t:new s(-1/0,-1/0,-1/0)}function m(e,t){this.center=void 0!==e?e:new s,this.radius=void 0!==t?t:0}function g(e,t){this.normal=void 0!==e?e:new s(1,0,0),this.constant=void 0!==t?t:0}function v(e,t,n,r,i,o){this.planes=[void 0!==e?e:new g,void 0!==t?t:new g,void 0!==n?n:new g,void 0!==r?r:new g,void 0!==i?i:new g,void 0!==o?o:new g]}function y(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}function b(e){function t(t,n){var r=t.array,i=t.dynamic?e.DYNAMIC_DRAW:e.STATIC_DRAW,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();var a=e.FLOAT;return r instanceof Float32Array?a=e.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?a=e.UNSIGNED_SHORT:r instanceof Int16Array?a=e.SHORT:r instanceof Uint32Array?a=e.UNSIGNED_INT:r instanceof Int32Array?a=e.INT:r instanceof Int8Array?a=e.BYTE:r instanceof Uint8Array&&(a=e.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version}}function n(t,n,r){var i=n.array,o=n.updateRange;e.bindBuffer(r,t),!1===n.dynamic?e.bufferData(r,i,e.STATIC_DRAW):-1===o.count?e.bufferSubData(r,0,i):0===o.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(e.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=-1)}function r(e){return e.isInterleavedBufferAttribute&&(e=e.data),a.get(e)}function i(t){t.isInterleavedBufferAttribute&&(t=t.data);var n=a.get(t);n&&(e.deleteBuffer(n.buffer),a.delete(t))}function o(e,r){e.isInterleavedBufferAttribute&&(e=e.data);var i=a.get(e);void 0===i?a.set(e,t(e,r)):i.version<e.version&&(n(i.buffer,e,r),i.version=e.version)}var a=new WeakMap;return{get:r,remove:i,update:o}}function _(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._order=r||_.DefaultOrder}function w(){this.mask=1}function x(){function e(){i.setFromEuler(r,!1)}function t(){r.setFromQuaternion(i,void 0,!1)}Object.defineProperty(this,"id",{value:Nl++}),this.uuid=Ol.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=x.DefaultUp.clone();var n=new s,r=new _,i=new a,u=new s(1,1,1);r.onChange(e),i.onChange(t),Object.defineProperties(this,{position:{enumerable:!0,value:n},rotation:{enumerable:!0,value:r},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:u},modelViewMatrix:{value:new o},normalMatrix:{value:new l}}),this.matrix=new o,this.matrixWorld=new o,this.matrixAutoUpdate=x.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new w,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function E(){x.call(this),this.type="Camera",this.matrixWorldInverse=new o,this.projectionMatrix=new o}function S(e,t,n,r,i,o){E.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function M(e,t,n,r,i,o){this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new s,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new y,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==o?o:0}function T(){Object.defineProperty(this,"id",{value:Dl+=2}),this.uuid=Ol.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function C(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function O(e,t,n){C.call(this,new Int8Array(e),t,n)}function P(e,t,n){C.call(this,new Uint8Array(e),t,n)}function A(e,t,n){C.call(this,new Uint8ClampedArray(e),t,n)}function R(e,t,n){C.call(this,new Int16Array(e),t,n)}function L(e,t,n){C.call(this,new Uint16Array(e),t,n)}function I(e,t,n){C.call(this,new Int32Array(e),t,n)}function k(e,t,n){C.call(this,new Uint32Array(e),t,n)}function N(e,t,n){C.call(this,new Float32Array(e),t,n)}function D(e,t,n){C.call(this,new Float64Array(e),t,n)}function j(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function U(e){if(0===e.length)return-1/0;for(var t=e[0],n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}function F(){Object.defineProperty(this,"id",{value:jl+=2}),this.uuid=Ol.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function B(e,t,n,r,i,o){T.call(this),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new z(e,t,n,r,i,o)),this.mergeVertices()}function z(e,t,n,r,i,o){function a(e,t,n,r,i,o,a,m,g,v,y){var b,_,w=o/g,x=a/v,E=o/2,S=a/2,M=m/2,T=g+1,C=v+1,O=0,P=0,A=new s;for(_=0;_<C;_++){var R=_*x-S;for(b=0;b<T;b++){var L=b*w-E;A[e]=L*r,A[t]=R*i,A[n]=M,c.push(A.x,A.y,A.z),A[e]=0,A[t]=0,A[n]=m>0?1:-1,d.push(A.x,A.y,A.z),h.push(b/g),h.push(1-_/v),O+=1}}for(_=0;_<v;_++)for(b=0;b<g;b++){var I=f+b+T*_,k=f+b+T*(_+1),N=f+(b+1)+T*(_+1),D=f+(b+1)+T*_;u.push(I,k,D),u.push(k,N,D),P+=6}l.addGroup(p,P,y),p+=P,f+=O}F.call(this),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var l=this;e=e||1,t=t||1,n=n||1,r=Math.floor(r)||1,i=Math.floor(i)||1,o=Math.floor(o)||1;var u=[],c=[],d=[],h=[],f=0,p=0;a("z","y","x",-1,-1,n,t,e,o,i,0),a("z","y","x",1,-1,n,t,-e,o,i,1),a("x","z","y",1,1,e,n,t,r,o,2),a("x","z","y",1,-1,e,n,-t,r,o,3),a("x","y","z",1,-1,e,t,n,r,i,4),a("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(u),this.addAttribute("position",new N(c,3)),this.addAttribute("normal",new N(d,3)),this.addAttribute("uv",new N(h,2))}function H(e,t,n,r){T.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new V(e,t,n,r)),this.mergeVertices()}function V(e,t,n,r){F.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r},e=e||1,t=t||1;var i,o,a=e/2,s=t/2,l=Math.floor(n)||1,u=Math.floor(r)||1,c=l+1,d=u+1,h=e/l,f=t/u,p=[],m=[],g=[],v=[];for(o=0;o<d;o++){var y=o*f-s;for(i=0;i<c;i++){var b=i*h-a;m.push(b,-y,0),g.push(0,0,1),v.push(i/l),v.push(1-o/u)}}for(o=0;o<u;o++)for(i=0;i<l;i++){var _=i+c*o,w=i+c*(o+1),x=i+1+c*(o+1),E=i+1+c*o;p.push(_,w,E),p.push(w,x,E)}this.setIndex(p),this.addAttribute("position",new N(m,3)),this.addAttribute("normal",new N(g,3)),this.addAttribute("uv",new N(v,2))}function G(){Object.defineProperty(this,"id",{value:Ul++}),this.uuid=Ol.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=va,this.side=la,this.flatShading=!1,this.vertexColors=fa,this.opacity=1,this.transparent=!1,this.blendSrc=Ra,this.blendDst=La,this.blendEquation=xa,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=za,this.depthTest=!0,this.depthWrite=!0,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.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function W(e){G.call(this),this.type="MeshBasicMaterial",this.color=new y(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=qa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(e)}function q(e){G.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function X(e,t){this.origin=void 0!==e?e:new s,this.direction=void 0!==t?t:new s}function Y(e,t){this.start=void 0!==e?e:new s,this.end=void 0!==t?t:new s}function Z(e,t,n){this.a=void 0!==e?e:new s,this.b=void 0!==t?t:new s,this.c=void 0!==n?n:new s}function K(e,t){x.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new F,this.material=void 0!==t?t:new W({color:16777215*Math.random()}),this.drawMode=ml,this.updateMorphTargets()}function J(e,t,n,r){function i(t,r,i,d){var h=r.background;null===h?o(u,c):h&&h.isColor&&(o(h,1),d=!0),(e.autoClear||d)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),h&&h.isCubeTexture?(void 0===l&&(l=new K(new z(1,1,1),new q({uniforms:kl.cube.uniforms,vertexShader:kl.cube.vertexShader,fragmentShader:kl.cube.fragmentShader,side:ua,depthTest:!0,depthWrite:!1,fog:!1})),l.geometry.removeAttribute("normal"),l.geometry.removeAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},n.update(l.geometry)),l.material.uniforms.tCube.value=h,t.push(l,l.geometry,l.material,0,null)):h&&h.isTexture&&(void 0===a&&(a=new S(-1,1,1,-1,0,1),s=new K(new V(2,2),new W({depthTest:!1,depthWrite:!1,fog:!1})),n.update(s.geometry)),s.material.map=h,e.renderBufferDirect(a,null,s.geometry,s.material,s,null))}function o(e,n){t.buffers.color.setClear(e.r,e.g,e.b,n,r)}var a,s,l,u=new y(0),c=0;return{getClearColor:function(){return u},setClearColor:function(e,t){u.set(e),c=void 0!==t?t:1,o(u,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,o(u,c)},render:i}}function Q(e,t,n){function r(e){a=e}function i(t,r){e.drawArrays(a,t,r),n.update(r,a)}function o(e,r,i){var o=t.get("ANGLE_instanced_arrays");if(null===o)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");var s=e.attributes.position;s.isInterleavedBufferAttribute?(i=s.data.count,o.drawArraysInstancedANGLE(a,0,i,e.maxInstancedCount)):o.drawArraysInstancedANGLE(a,r,i,e.maxInstancedCount),n.update(i,a,e.maxInstancedCount)}var a;this.setMode=r,this.render=i,this.renderInstances=o}function $(e,t,n){function r(){if(void 0!==o)return o;var n=t.get("EXT_texture_filter_anisotropic");return o=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var o,a=void 0!==n.precision?n.precision:"highp",s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var l=!0===n.logarithmicDepthBuffer,u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),c=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),h=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),p=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),m=e.getParameter(e.MAX_VARYING_VECTORS),g=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),v=c>0,y=!!t.get("OES_texture_float");return{getMaxAnisotropy:r,getMaxPrecision:i,precision:a,logarithmicDepthBuffer:l,maxTextures:u,maxVertexTextures:c,maxTextureSize:d,maxCubemapSize:h,maxAttributes:f,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y}}function ee(){function e(){c.value!==r&&(c.value=r,c.needsUpdate=i>0),n.numPlanes=i,n.numIntersection=0}function t(e,t,r,i){var o=null!==e?e.length:0,a=null;if(0!==o){if(a=c.value,!0!==i||null===a){var l=r+4*o,d=t.matrixWorldInverse;u.getNormalMatrix(d),(null===a||a.length<l)&&(a=new Float32Array(l));for(var h=0,f=r;h!==o;++h,f+=4)s.copy(e[h]).applyMatrix4(d,u),s.normal.toArray(a,f),a[f+3]=s.constant}c.value=a,c.needsUpdate=!0}return n.numPlanes=o,a}var n=this,r=null,i=0,o=!1,a=!1,s=new g,u=new l,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,n,a){var s=0!==e.length||n||0!==i||o;return o=n,r=t(e,a,0),i=e.length,s},this.beginShadows=function(){a=!0,t(null)},this.endShadows=function(){a=!1,e()},this.setState=function(n,s,l,u,d,h){if(!o||null===n||0===n.length||a&&!l)a?t(null):e();else{var f=a?0:i,p=4*f,m=d.clippingState||null;c.value=m,m=t(n,u,p,h);for(var g=0;g!==p;++g)m[g]=r[g];d.clippingState=m,this.numIntersection=s?this.numPlanes:0,this.numPlanes+=f}}}function te(e){var t={};return{get:function(n){if(void 0!==t[n])return t[n];var r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),t[n]=r,r}}}function ne(e,t,n){function r(e){var i=e.target,o=s[i.id];null!==o.index&&t.remove(o.index);for(var a in o.attributes)t.remove(o.attributes[a]);i.removeEventListener("dispose",r),delete s[i.id];var u=l[i.id];u&&(t.remove(u),delete l[i.id]),u=l[o.id],u&&(t.remove(u),delete l[o.id]),n.memory.geometries--}function i(e,t){var i=s[t.id];return i||(t.addEventListener("dispose",r),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new F).setFromObject(e)),i=t._bufferGeometry),s[t.id]=i,n.memory.geometries++,i)}function o(n){var r=n.index,i=n.attributes;null!==r&&t.update(r,e.ELEMENT_ARRAY_BUFFER);for(var o in i)t.update(i[o],e.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],l=0,u=s.length;l<u;l++)t.update(s[l],e.ARRAY_BUFFER)}function a(n){var r=l[n.id];if(r)return r;var i=[],o=n.index,a=n.attributes;if(null!==o)for(var s=o.array,u=0,c=s.length;u<c;u+=3){var d=s[u+0],h=s[u+1],f=s[u+2];i.push(d,h,h,f,f,d)}else for(var s=a.position.array,u=0,c=s.length/3-1;u<c;u+=3){var d=u+0,h=u+1,f=u+2;i.push(d,h,h,f,f,d)}return r=new(U(i)>65535?k:L)(i,1),t.update(r,e.ELEMENT_ARRAY_BUFFER),l[n.id]=r,r}var s={},l={};return{get:i,update:o,getWireframeAttribute:a}}function re(e,t,n){function r(e){s=e}function i(e){l=e.type,u=e.bytesPerElement}function o(t,r){e.drawElements(s,r,l,t*u),n.update(r,s)}function a(e,r,i){var o=t.get("ANGLE_instanced_arrays");if(null===o)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");o.drawElementsInstancedANGLE(s,i,l,r*u,e.maxInstancedCount),n.update(i,s,e.maxInstancedCount)}var s,l,u;this.setMode=r,this.setIndex=i,this.render=o,this.renderInstances=a}function ie(e){function t(t,n,r){switch(r=r||1,i.calls++,n){case e.TRIANGLES:i.triangles+=r*(t/3);break;case e.TRIANGLE_STRIP:case e.TRIANGLE_FAN:i.triangles+=r*(t-2);break;case e.LINES:i.lines+=r*(t/2);break;case e.LINE_STRIP:i.lines+=r*(t-1);break;case e.LINE_LOOP:i.lines+=r*t;break;case e.POINTS:i.points+=r*t;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}function n(){i.frame++,i.calls=0,i.triangles=0,i.points=0,i.lines=0}var r={geometries:0,textures:0},i={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:r,render:i,programs:null,autoReset:!0,reset:n,update:t}}function oe(e,t){return Math.abs(t[1])-Math.abs(e[1])}function ae(e){function t(t,i,o,a){var s=t.morphTargetInfluences,l=s.length,u=n[i.id];if(void 0===u){u=[];for(var c=0;c<l;c++)u[c]=[c,0];n[i.id]=u}for(var d=o.morphTargets&&i.morphAttributes.position,h=o.morphNormals&&i.morphAttributes.normal,c=0;c<l;c++){var f=u[c];0!==f[1]&&(d&&i.removeAttribute("morphTarget"+c),h&&i.removeAttribute("morphNormal"+c))}for(var c=0;c<l;c++){var f=u[c];f[0]=c,f[1]=s[c]}u.sort(oe);for(var c=0;c<8;c++){var f=u[c];if(f){var p=f[0],m=f[1];if(m){d&&i.addAttribute("morphTarget"+c,d[p]),h&&i.addAttribute("morphNormal"+c,h[p]),r[c]=m;continue}}r[c]=0}a.getUniforms().setValue(e,"morphTargetInfluences",r)}var n={},r=new Float32Array(8);return{update:t}}function se(e,t){function n(n){var r=t.render.frame,o=n.geometry,a=e.get(n,o);return i[a.id]!==r&&(o.isGeometry&&a.updateFromObject(n),e.update(a),i[a.id]=r),a}function r(){i={}}var i={};return{update:n,dispose:r}}function le(e,t,n,r,i,o,a,s,l,c){e=void 0!==e?e:[],t=void 0!==t?t:ts,u.call(this,e,t,n,r,i,o,a,s,l,c),this.flipY=!1}function ue(){this.seq=[],this.map={}}function ce(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,o=zl[i];if(void 0===o&&(o=new Float32Array(i),zl[i]=o),0!==t){r.toArray(o,0);for(var a=1,s=0;a!==t;++a)s+=n,e[a].toArray(o,s)}return o}function de(e,t){var n=Hl[t];void 0===n&&(n=new Int32Array(t),Hl[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocTextureUnit();return n}function he(e,t){e.uniform1f(this.addr,t)}function fe(e,t){e.uniform1i(this.addr,t)}function pe(e,t){void 0===t.x?e.uniform2fv(this.addr,t):e.uniform2f(this.addr,t.x,t.y)}function me(e,t){void 0!==t.x?e.uniform3f(this.addr,t.x,t.y,t.z):void 0!==t.r?e.uniform3f(this.addr,t.r,t.g,t.b):e.uniform3fv(this.addr,t)}function ge(e,t){void 0===t.x?e.uniform4fv(this.addr,t):e.uniform4f(this.addr,t.x,t.y,t.z,t.w)}function ve(e,t){e.uniformMatrix2fv(this.addr,!1,t.elements||t)}function ye(e,t){void 0===t.elements?e.uniformMatrix3fv(this.addr,!1,t):(Gl.set(t.elements),e.uniformMatrix3fv(this.addr,!1,Gl))}function be(e,t){void 0===t.elements?e.uniformMatrix4fv(this.addr,!1,t):(Vl.set(t.elements),e.uniformMatrix4fv(this.addr,!1,Vl))}function _e(e,t,n){var r=n.allocTextureUnit();e.uniform1i(this.addr,r),n.setTexture2D(t||Fl,r)}function we(e,t,n){var r=n.allocTextureUnit();e.uniform1i(this.addr,r),n.setTextureCube(t||Bl,r)}function xe(e,t){e.uniform2iv(this.addr,t)}function Ee(e,t){e.uniform3iv(this.addr,t)}function Se(e,t){e.uniform4iv(this.addr,t)}function Me(e){switch(e){case 5126:return he;case 35664:return pe;case 35665:return me;case 35666:return ge;case 35674:return ve;case 35675:return ye;case 35676:return be;case 35678:case 36198:return _e;case 35680:return we;case 5124:case 35670:return fe;case 35667:case 35671:return xe;case 35668:case 35672:return Ee;case 35669:case 35673:return Se}}function Te(e,t){e.uniform1fv(this.addr,t)}function Ce(e,t){e.uniform1iv(this.addr,t)}function Oe(e,t){e.uniform2fv(this.addr,ce(t,this.size,2))}function Pe(e,t){e.uniform3fv(this.addr,ce(t,this.size,3))}function Ae(e,t){e.uniform4fv(this.addr,ce(t,this.size,4))}function Re(e,t){e.uniformMatrix2fv(this.addr,!1,ce(t,this.size,4))}function Le(e,t){e.uniformMatrix3fv(this.addr,!1,ce(t,this.size,9))}function Ie(e,t){e.uniformMatrix4fv(this.addr,!1,ce(t,this.size,16))}function ke(e,t,n){var r=t.length,i=de(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(t[o]||Fl,i[o])}function Ne(e,t,n){var r=t.length,i=de(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(t[o]||Bl,i[o])}function De(e){switch(e){case 5126:return Te;case 35664:return Oe;case 35665:return Pe;case 35666:return Ae;case 35674:return Re;case 35675:return Le;case 35676:return Ie;case 35678:return ke;case 35680:return Ne;case 5124:case 35670:return Ce;case 35667:case 35671:return xe;case 35668:case 35672:return Ee;case 35669:case 35673:return Se}}function je(e,t,n){this.id=e,this.addr=n,this.setValue=Me(t.type)}function Ue(e,t,n){this.id=e,this.addr=n,this.size=t.size,this.setValue=De(t.type)}function Fe(e){this.id=e,ue.call(this)}function Be(e,t){e.seq.push(t),e.map[t.id]=t}function ze(e,t,n){var r=e.name,i=r.length;for(Wl.lastIndex=0;;){var o=Wl.exec(r),a=Wl.lastIndex,s=o[1],l="]"===o[2],u=o[3];if(l&&(s|=0),void 0===u||"["===u&&a+2===i){Be(n,void 0===u?new je(s,e,t):new Ue(s,e,t));break}var c=n.map,d=c[s];void 0===d&&(d=new Fe(s),Be(n,d)),n=d}}function He(e,t,n){ue.call(this),this.renderer=n;for(var r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=e.getActiveUniform(t,i);ze(o,e.getUniformLocation(t,o.name),this)}}function Ve(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}function Ge(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),!1===e.getShaderParameter(r,e.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==e.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",t===e.VERTEX_SHADER?"vertex":"fragment",e.getShaderInfoLog(r),Ve(n)),r}function We(e){switch(e){case yl:return["Linear","( value )"];case bl:return["sRGB","( value )"];case wl:return["RGBE","( value )"];case El:return["RGBM","( value, 7.0 )"];case Sl:return["RGBM","( value, 16.0 )"];case Ml:return["RGBD","( value, 256.0 )"];case _l:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+e)}}function qe(e,t){var n=We(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Xe(e,t){var n=We(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Ye(e,t){var n;switch(t){case Ka:n="Linear";break;case Ja:n="Reinhard";break;case Qa:n="Uncharted2";break;case $a:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Ze(e,t,n){return e=e||{},[e.derivatives||t.envMapCubeUV||t.bumpMap||t.normalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Qe).join("\n")}function Ke(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}function Je(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=e.getActiveAttrib(t,i),a=o.name;n[a]=e.getAttribLocation(t,a)}return n}function Qe(e){return""!==e}function $e(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights)}function et(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}function tt(e){function t(e,t){var n=Al[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return tt(n)}var n=/^[ \t]*#include +<([\w\d.]+)>/gm;return e.replace(n,t)}function nt(e){function t(e,t,n,r){for(var i="",o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i}var n=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;return e.replace(n,t)}function rt(e,t,n,r,i,o){var a=e.context,s=r.defines,l=i.vertexShader,u=i.fragmentShader,c="SHADOWMAP_TYPE_BASIC";o.shadowMapType===aa?c="SHADOWMAP_TYPE_PCF":o.shadowMapType===sa&&(c="SHADOWMAP_TYPE_PCF_SOFT");var d="ENVMAP_TYPE_CUBE",h="ENVMAP_MODE_REFLECTION",f="ENVMAP_BLENDING_MULTIPLY";if(o.envMap){switch(r.envMap.mapping){case ts:case ns:d="ENVMAP_TYPE_CUBE";break;case as:case ss:d="ENVMAP_TYPE_CUBE_UV";break;case rs:case is:d="ENVMAP_TYPE_EQUIREC";break;case os:d="ENVMAP_TYPE_SPHERE"}switch(r.envMap.mapping){case ns:case is:h="ENVMAP_MODE_REFRACTION"}switch(r.combine){case qa:f="ENVMAP_BLENDING_MULTIPLY";break;case Xa:f="ENVMAP_BLENDING_MIX";break;case Ya:f="ENVMAP_BLENDING_ADD"}}var p,m,g=e.gammaFactor>0?e.gammaFactor:1,v=Ze(r.extensions,o,t),y=Ke(s),b=a.createProgram();r.isRawShaderMaterial?(p=[y].filter(Qe).join("\n"),p.length>0&&(p+="\n"),m=[v,y].filter(Qe).join("\n"),m.length>0&&(m+="\n")):(p=["precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,y,o.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+g,"#define MAX_BONES "+o.maxBones,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+h:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.displacementMap&&o.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.flatShading?"#define FLAT_SHADED":"",o.skinning?"#define USE_SKINNING":"",o.useVertexTexture?"#define BONE_TEXTURE":"",o.morphTargets?"#define USE_MORPHTARGETS":"",o.morphNormals&&!1===o.flatShading?"#define USE_MORPHNORMALS":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+c:"",o.sizeAttenuation?"#define USE_SIZEATTENUATION":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&t.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Qe).join("\n"),m=[v,"precision "+o.precision+" float;","precision "+o.precision+" int;","#define SHADER_NAME "+i.name,y,o.alphaTest?"#define ALPHATEST "+o.alphaTest:"","#define GAMMA_FACTOR "+g,o.useFog&&o.fog?"#define USE_FOG":"",o.useFog&&o.fogExp?"#define FOG_EXP2":"",o.map?"#define USE_MAP":"",o.envMap?"#define USE_ENVMAP":"",o.envMap?"#define "+d:"",o.envMap?"#define "+h:"",o.envMap?"#define "+f:"",o.lightMap?"#define USE_LIGHTMAP":"",o.aoMap?"#define USE_AOMAP":"",o.emissiveMap?"#define USE_EMISSIVEMAP":"",o.bumpMap?"#define USE_BUMPMAP":"",o.normalMap?"#define USE_NORMALMAP":"",o.specularMap?"#define USE_SPECULARMAP":"",o.roughnessMap?"#define USE_ROUGHNESSMAP":"",o.metalnessMap?"#define USE_METALNESSMAP":"",o.alphaMap?"#define USE_ALPHAMAP":"",o.vertexColors?"#define USE_COLOR":"",o.gradientMap?"#define USE_GRADIENTMAP":"",o.flatShading?"#define FLAT_SHADED":"",o.doubleSided?"#define DOUBLE_SIDED":"",o.flipSided?"#define FLIP_SIDED":"",o.shadowMapEnabled?"#define USE_SHADOWMAP":"",o.shadowMapEnabled?"#define "+c:"",o.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",o.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",o.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",o.logarithmicDepthBuffer&&t.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",o.envMap&&t.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",o.toneMapping!==Za?"#define TONE_MAPPING":"",o.toneMapping!==Za?Al.tonemapping_pars_fragment:"",o.toneMapping!==Za?Ye("toneMapping",o.toneMapping):"",o.dithering?"#define DITHERING":"",o.outputEncoding||o.mapEncoding||o.envMapEncoding||o.emissiveMapEncoding?Al.encodings_pars_fragment:"",o.mapEncoding?qe("mapTexelToLinear",o.mapEncoding):"",o.envMapEncoding?qe("envMapTexelToLinear",o.envMapEncoding):"",o.emissiveMapEncoding?qe("emissiveMapTexelToLinear",o.emissiveMapEncoding):"",o.outputEncoding?Xe("linearToOutputTexel",o.outputEncoding):"",o.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(Qe).join("\n")),l=tt(l),l=$e(l,o),l=et(l,o),u=tt(u),u=$e(u,o),u=et(u,o),l=nt(l),u=nt(u);var _=p+l,w=m+u,x=Ge(a,a.VERTEX_SHADER,_),E=Ge(a,a.FRAGMENT_SHADER,w);a.attachShader(b,x),a.attachShader(b,E),void 0!==r.index0AttributeName?a.bindAttribLocation(b,0,r.index0AttributeName):!0===o.morphTargets&&a.bindAttribLocation(b,0,"position"),a.linkProgram(b);var S=a.getProgramInfoLog(b).trim(),M=a.getShaderInfoLog(x).trim(),T=a.getShaderInfoLog(E).trim(),C=!0,O=!0;!1===a.getProgramParameter(b,a.LINK_STATUS)?(C=!1,console.error("THREE.WebGLProgram: shader error: ",a.getError(),"gl.VALIDATE_STATUS",a.getProgramParameter(b,a.VALIDATE_STATUS),"gl.getProgramInfoLog",S,M,T)):""!==S?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",S):""!==M&&""!==T||(O=!1),O&&(this.diagnostics={runnable:C,material:r,programLog:S,vertexShader:{log:M,prefix:p},fragmentShader:{log:T,prefix:m}}),a.deleteShader(x),a.deleteShader(E);var P;this.getUniforms=function(){return void 0===P&&(P=new He(a,b,e)),P};var A;return this.getAttributes=function(){return void 0===A&&(A=Je(a,b)),A},this.destroy=function(){a.deleteProgram(b),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=i.name,this.id=ql++,this.code=n,this.usedTimes=1,this.program=b,this.vertexShader=x,this.fragmentShader=E,this}function it(e,t,n){function r(e){var t=e.skeleton,r=t.bones;if(n.floatVertexTextures)return 1024;var i=n.maxVertexUniforms,o=Math.floor((i-20)/4),a=Math.min(o,r.length);return a<r.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+r.length+" bones. This GPU supports "+a+"."),0):a}function i(e,t){var n;return e?e.isTexture?n=e.encoding:e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=e.texture.encoding):n=yl,n===yl&&t&&(n=_l),n}var o=[],a={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},s=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];this.getParameters=function(t,o,s,l,u,c,d){var h=a[t.type],f=d.isSkinnedMesh?r(d):0,p=n.precision;null!==t.precision&&(p=n.getMaxPrecision(t.precision))!==t.precision&&console.warn("THREE.WebGLProgram.getParameters:",t.precision,"not supported, using",p,"instead.");var m=e.getRenderTarget();return{shaderID:h,precision:p,supportsVertexTextures:n.vertexTextures,outputEncoding:i(m?m.texture:null,e.gammaOutput),map:!!t.map,mapEncoding:i(t.map,e.gammaInput),envMap:!!t.envMap,envMapMode:t.envMap&&t.envMap.mapping,envMapEncoding:i(t.envMap,e.gammaInput),envMapCubeUV:!!t.envMap&&(t.envMap.mapping===as||t.envMap.mapping===ss),lightMap:!!t.lightMap,aoMap:!!t.aoMap,emissiveMap:!!t.emissiveMap,emissiveMapEncoding:i(t.emissiveMap,e.gammaInput),bumpMap:!!t.bumpMap,normalMap:!!t.normalMap,displacementMap:!!t.displacementMap,roughnessMap:!!t.roughnessMap,metalnessMap:!!t.metalnessMap,specularMap:!!t.specularMap,alphaMap:!!t.alphaMap,gradientMap:!!t.gradientMap,combine:t.combine,vertexColors:t.vertexColors,fog:!!l,useFog:t.fog,fogExp:l&&l.isFogExp2,flatShading:t.flatShading,sizeAttenuation:t.sizeAttenuation,logarithmicDepthBuffer:n.logarithmicDepthBuffer,skinning:t.skinning&&f>0,maxBones:f,useVertexTexture:n.floatVertexTextures,morphTargets:t.morphTargets,morphNormals:t.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numClippingPlanes:u,numClipIntersection:c,dithering:t.dithering,shadowMapEnabled:e.shadowMap.enabled&&d.receiveShadow&&s.length>0,shadowMapType:e.shadowMap.type,toneMapping:e.toneMapping,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:t.premultipliedAlpha,alphaTest:t.alphaTest,doubleSided:t.side===ca,flipSided:t.side===ua,depthPacking:void 0!==t.depthPacking&&t.depthPacking}},this.getProgramCode=function(t,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var i in t.defines)r.push(i),r.push(t.defines[i]);for(var o=0;o<s.length;o++)r.push(n[s[o]]);return r.push(t.onBeforeCompile.toString()),r.push(e.gammaOutput),r.join()},this.acquireProgram=function(n,r,i,a){for(var s,l=0,u=o.length;l<u;l++){var c=o[l];if(c.code===a){s=c,++s.usedTimes;break}}return void 0===s&&(s=new rt(e,t,a,n,r,i),o.push(s)),s},this.releaseProgram=function(e){if(0==--e.usedTimes){var t=o.indexOf(e);o[t]=o[o.length-1],o.pop(),e.destroy()}},this.programs=o}function ot(){function e(e){var t=i.get(e);return void 0===t&&(t={},i.set(e,t)),t}function t(e){i.delete(e)}function n(e,t,n){i.get(e)[t]=n}function r(){i=new WeakMap}var i=new WeakMap;return{get:e,remove:t,update:n,dispose:r}}function at(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program&&t.program&&e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function st(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function lt(){function e(){i=0,o.length=0,a.length=0}function t(e,t,n,s,l){var u=r[i];void 0===u?(u={id:e.id,object:e,geometry:t,material:n,program:n.program,renderOrder:e.renderOrder,z:s,group:l},r[i]=u):(u.id=e.id,u.object=e,u.geometry=t,u.material=n,u.program=n.program,u.renderOrder=e.renderOrder,u.z=s,u.group=l),(!0===n.transparent?a:o).push(u),i++}function n(){o.length>1&&o.sort(at),a.length>1&&a.sort(st)}var r=[],i=0,o=[],a=[];return{opaque:o,transparent:a,init:e,push:t,sort:n}}function ut(){function e(e,t){var r=e.id+","+t.id,i=n[r];return void 0===i&&(i=new lt,n[r]=i),i}function t(){n={}}var n={};return{get:e,dispose:t}}function ct(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new s,color:new y,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"SpotLight":n={position:new s,direction:new s,color:new y,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"PointLight":n={position:new s,color:new y,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new s,skyColor:new y,groundColor:new y};break;case"RectAreaLight":n={color:new y,position:new s,halfWidth:new s,halfHeight:new s}}return e[t.id]=n,n}}}function dt(){function e(e,o,s){for(var l=0,u=0,c=0,d=0,h=0,f=0,p=0,m=0,g=s.matrixWorldInverse,v=0,y=e.length;v<y;v++){var b=e[v],_=b.color,w=b.intensity,x=b.distance,E=b.shadow&&b.shadow.map?b.shadow.map.texture:null;if(b.isAmbientLight)l+=_.r*w,u+=_.g*w,c+=_.b*w;else if(b.isDirectionalLight){var S=t.get(b);if(S.color.copy(b.color).multiplyScalar(b.intensity),S.direction.setFromMatrixPosition(b.matrixWorld),r.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(r),S.direction.transformDirection(g),S.shadow=b.castShadow,b.castShadow){var M=b.shadow;S.shadowBias=M.bias,S.shadowRadius=M.radius,S.shadowMapSize=M.mapSize}n.directionalShadowMap[d]=E,n.directionalShadowMatrix[d]=b.shadow.matrix,n.directional[d]=S,d++}else if(b.isSpotLight){var S=t.get(b);if(S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),S.color.copy(_).multiplyScalar(w),S.distance=x,S.direction.setFromMatrixPosition(b.matrixWorld),r.setFromMatrixPosition(b.target.matrixWorld),S.direction.sub(r),S.direction.transformDirection(g),S.coneCos=Math.cos(b.angle),S.penumbraCos=Math.cos(b.angle*(1-b.penumbra)),S.decay=0===b.distance?0:b.decay,S.shadow=b.castShadow,b.castShadow){var M=b.shadow;S.shadowBias=M.bias,S.shadowRadius=M.radius,S.shadowMapSize=M.mapSize}n.spotShadowMap[f]=E,n.spotShadowMatrix[f]=b.shadow.matrix,n.spot[f]=S,f++}else if(b.isRectAreaLight){var S=t.get(b);S.color.copy(_).multiplyScalar(w),S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),a.identity(),i.copy(b.matrixWorld),i.premultiply(g),a.extractRotation(i),S.halfWidth.set(.5*b.width,0,0),S.halfHeight.set(0,.5*b.height,0),S.halfWidth.applyMatrix4(a),S.halfHeight.applyMatrix4(a),n.rectArea[p]=S,p++}else if(b.isPointLight){var S=t.get(b);if(S.position.setFromMatrixPosition(b.matrixWorld),S.position.applyMatrix4(g),S.color.copy(b.color).multiplyScalar(b.intensity),S.distance=b.distance,S.decay=0===b.distance?0:b.decay,S.shadow=b.castShadow,b.castShadow){var M=b.shadow;S.shadowBias=M.bias,S.shadowRadius=M.radius,S.shadowMapSize=M.mapSize,S.shadowCameraNear=M.camera.near,S.shadowCameraFar=M.camera.far}n.pointShadowMap[h]=E,n.pointShadowMatrix[h]=b.shadow.matrix,n.point[h]=S,h++}else if(b.isHemisphereLight){var S=t.get(b);S.direction.setFromMatrixPosition(b.matrixWorld),S.direction.transformDirection(g),S.direction.normalize(),S.skyColor.copy(b.color).multiplyScalar(w),S.groundColor.copy(b.groundColor).multiplyScalar(w),n.hemi[m]=S,m++}}n.ambient[0]=l,n.ambient[1]=u,n.ambient[2]=c,n.directional.length=d,n.spot.length=f,n.rectArea.length=p,n.point.length=h,n.hemi.length=m,n.hash=n.id+","+d+","+h+","+f+","+p+","+m+","+o.length}var t=new ct,n={id:Xl++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},r=new s,i=new o,a=new o;return{setup:e,state:n}}function ht(){function e(){a.length=0,s.length=0,l.length=0}function t(e){a.push(e)}function n(e){s.push(e)}function r(e){l.push(e)}function i(e){o.setup(a,s,e)}var o=new dt,a=[],s=[],l=[];return{init:e,state:{lightsArray:a,shadowsArray:s,spritesArray:l,lights:o},setupLights:i,pushLight:t,pushShadow:n,pushSprite:r}}function ft(){function e(e,t){var r=e.id+","+t.id,i=n[r];return void 0===i&&(i=new ht,n[r]=i),i}function t(){n={}}var n={};return{get:e,dispose:t}}function pt(e){G.call(this),this.type="MeshDepthMaterial",this.depthPacking=Tl,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(e)}function mt(e){G.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new s,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(e)}function gt(e,t,n){function r(t,n,r,i,o,a){var s=t.geometry,l=null,u=_,c=t.customDepthMaterial;if(r&&(u=w,c=t.customDistanceMaterial),c)l=c;else{var d=!1;n.morphTargets&&(s&&s.isBufferGeometry?d=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(d=s.morphTargets&&s.morphTargets.length>0)),t.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t);var h=t.isSkinnedMesh&&n.skinning,f=0;d&&(f|=g),h&&(f|=y),l=u[f]}if(e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var p=l.uuid,m=n.uuid,v=x[p];void 0===v&&(v={},x[p]=v);var b=v[m];void 0===b&&(b=l.clone(),v[m]=b),l=b}return l.visible=n.visible,l.wireframe=n.wireframe,l.side=null!=n.shadowSide?n.shadowSide:E[n.side],l.clipShadows=n.clipShadows,l.clippingPlanes=n.clippingPlanes,l.clipIntersection=n.clipIntersection,l.wireframeLinewidth=n.wireframeLinewidth,l.linewidth=n.linewidth,r&&l.isMeshDistanceMaterial&&(l.referencePosition.copy(i),l.nearDistance=o,l.farDistance=a),l}function a(n,i,o,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||l.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var u=t.update(n),c=n.material;if(Array.isArray(c))for(var d=u.groups,h=0,f=d.length;h<f;h++){var p=d[h],g=c[p.materialIndex];if(g&&g.visible){var v=r(n,g,s,m,o.near,o.far);e.renderBufferDirect(o,null,u,v,n,p)}}else if(c.visible){var v=r(n,c,s,m,o.near,o.far);e.renderBufferDirect(o,null,u,v,n,null)}}for(var y=n.children,b=0,_=y.length;b<_;b++)a(y[b],i,o,s)}}for(var l=new v,u=new o,h=new i,f=new i(n,n),p=new s,m=new s,g=1,y=2,b=1+(g|y),_=new Array(b),w=new Array(b),x={},E={0:ua,1:la,2:ca},S=[new s(1,0,0),new s(-1,0,0),new s(0,0,1),new s(0,0,-1),new s(0,1,0),new s(0,-1,0)],M=[new s(0,1,0),new s(0,1,0),new s(0,1,0),new s(0,1,0),new s(0,0,1),new s(0,0,-1)],T=[new c,new c,new c,new c,new c,new c],C=0;C!==b;++C){var O=0!=(C&g),P=0!=(C&y),A=new pt({depthPacking:Cl,morphTargets:O,skinning:P});_[C]=A;var R=new mt({morphTargets:O,skinning:P});w[C]=R}var L=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=aa,this.render=function(t,n,r){if(!1!==L.enabled&&(!1!==L.autoUpdate||!1!==L.needsUpdate)&&0!==t.length){var i=e.context,o=e.state;o.disable(i.BLEND),o.buffers.color.setClear(1,1,1,1),o.buffers.depth.setTest(!0),o.setScissorTest(!1);for(var s,c=0,g=t.length;c<g;c++){var v=t[c],y=v.shadow,b=v&&v.isPointLight;if(void 0!==y){var _=y.camera;if(h.copy(y.mapSize),h.min(f),b){var w=h.x,x=h.y;T[0].set(2*w,x,w,x),T[1].set(0,x,w,x),T[2].set(3*w,x,w,x),T[3].set(w,x,w,x),T[4].set(3*w,0,w,x),T[5].set(w,0,w,x),h.x*=4,h.y*=2}if(null===y.map){var E={minFilter:ds,magFilter:ds,format:Rs};y.map=new d(h.x,h.y,E),y.map.texture.name=v.name+".shadowMap",_.updateProjectionMatrix()}y.isSpotLightShadow&&y.update(v);var C=y.map,O=y.matrix;m.setFromMatrixPosition(v.matrixWorld),_.position.copy(m),b?(s=6,O.makeTranslation(-m.x,-m.y,-m.z)):(s=1,p.setFromMatrixPosition(v.target.matrixWorld),_.lookAt(p),_.updateMatrixWorld(),O.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),O.multiply(_.projectionMatrix),O.multiply(_.matrixWorldInverse)),e.setRenderTarget(C),e.clear();for(var P=0;P<s;P++){if(b){p.copy(_.position),p.add(S[P]),_.up.copy(M[P]),_.lookAt(p),_.updateMatrixWorld();var A=T[P];o.viewport(A)}u.multiplyMatrices(_.projectionMatrix,_.matrixWorldInverse),l.setFromMatrix(u),a(n,r,_,b)}}else console.warn("THREE.WebGLShadowMap:",v,"has no shadow.")}L.needsUpdate=!1}}}function vt(e,t,n,r,i,o,a,s,l){u.call(this,e,t,n,r,i,o,a,s,l),this.needsUpdate=!0}function yt(e,t,n,r,i){function o(){var e=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),n=new Uint16Array([0,1,2,0,2,3]);c=t.createBuffer(),d=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,c),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,d),t.bufferData(t.ELEMENT_ARRAY_BUFFER,n,t.STATIC_DRAW),h=l(),f={position:t.getAttribLocation(h,"position"),uv:t.getAttribLocation(h,"uv")},p={uvOffset:t.getUniformLocation(h,"uvOffset"),uvScale:t.getUniformLocation(h,"uvScale"),rotation:t.getUniformLocation(h,"rotation"),center:t.getUniformLocation(h,"center"),scale:t.getUniformLocation(h,"scale"),color:t.getUniformLocation(h,"color"),map:t.getUniformLocation(h,"map"),opacity:t.getUniformLocation(h,"opacity"),modelViewMatrix:t.getUniformLocation(h,"modelViewMatrix"),projectionMatrix:t.getUniformLocation(h,"projectionMatrix"),fogType:t.getUniformLocation(h,"fogType"),fogDensity:t.getUniformLocation(h,"fogDensity"),fogNear:t.getUniformLocation(h,"fogNear"),fogFar:t.getUniformLocation(h,"fogFar"),fogColor:t.getUniformLocation(h,"fogColor"),fogDepth:t.getUniformLocation(h,"fogDepth"),alphaTest:t.getUniformLocation(h,"alphaTest")};var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=8,r.height=8;var i=r.getContext("2d");i.fillStyle="white",i.fillRect(0,0,8,8),m=new vt(r)}function l(){var e=t.createProgram(),n=t.createShader(t.VERTEX_SHADER),r=t.createShader(t.FRAGMENT_SHADER);return t.shaderSource(n,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvUV = uvOffset + uv * uvScale;","\tvec2 alignedPosition = ( position - center ) * scale;","\tvec2 rotatedPosition;","\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\tvec4 mvPosition;","\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\tmvPosition.xy += rotatedPosition;","\tgl_Position = projectionMatrix * mvPosition;","\tfogDepth = - mvPosition.z;","}"].join("\n")),t.shaderSource(r,["precision "+i.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvec4 texture = texture2D( map, vUV );","\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\tif ( gl_FragColor.a < alphaTest ) discard;","\tif ( fogType > 0 ) {","\t\tfloat fogFactor = 0.0;","\t\tif ( fogType == 1 ) {","\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\t\t} else {","\t\t\tconst float LOG2 = 1.442695;","\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\t\t}","\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\t}","}"].join("\n")),t.compileShader(n),t.compileShader(r),t.attachShader(e,n),t.attachShader(e,r),t.linkProgram(e),e}function u(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:t.id-e.id}var c,d,h,f,p,m,g=new s,v=new a,y=new s;this.render=function(i,a,s){if(0!==i.length){void 0===h&&o(),n.useProgram(h),n.initAttributes(),n.enableAttribute(f.position),n.enableAttribute(f.uv),n.disableUnusedAttributes(),n.disable(t.CULL_FACE),n.enable(t.BLEND),t.bindBuffer(t.ARRAY_BUFFER,c),t.vertexAttribPointer(f.position,2,t.FLOAT,!1,16,0),t.vertexAttribPointer(f.uv,2,t.FLOAT,!1,16,8),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,d),t.uniformMatrix4fv(p.projectionMatrix,!1,s.projectionMatrix.elements),n.activeTexture(t.TEXTURE0),t.uniform1i(p.map,0);var l=0,b=0,_=a.fog;_?(t.uniform3f(p.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(t.uniform1f(p.fogNear,_.near),t.uniform1f(p.fogFar,_.far),t.uniform1i(p.fogType,1),l=1,b=1):_.isFogExp2&&(t.uniform1f(p.fogDensity,_.density),t.uniform1i(p.fogType,2),l=2,b=2)):(t.uniform1i(p.fogType,0),l=0,b=0);for(var w=0,x=i.length;w<x;w++){var E=i[w];E.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,E.matrixWorld),E.z=-E.modelViewMatrix.elements[14]}i.sort(u);for(var S=[],M=[],w=0,x=i.length;w<x;w++){var E=i[w],T=E.material;if(!1!==T.visible){E.onBeforeRender(e,a,s,void 0,T,void 0),t.uniform1f(p.alphaTest,T.alphaTest),t.uniformMatrix4fv(p.modelViewMatrix,!1,E.modelViewMatrix.elements),E.matrixWorld.decompose(g,v,y),S[0]=y.x,S[1]=y.y,M[0]=E.center.x-.5,M[1]=E.center.y-.5;var C=0;a.fog&&T.fog&&(C=b),l!==C&&(t.uniform1i(p.fogType,C),l=C),null!==T.map?(t.uniform2f(p.uvOffset,T.map.offset.x,T.map.offset.y),t.uniform2f(p.uvScale,T.map.repeat.x,T.map.repeat.y)):(t.uniform2f(p.uvOffset,0,0),t.uniform2f(p.uvScale,1,1)),t.uniform1f(p.opacity,T.opacity),t.uniform3f(p.color,T.color.r,T.color.g,T.color.b),t.uniform1f(p.rotation,T.rotation),t.uniform2fv(p.center,M),t.uniform2fv(p.scale,S),n.setBlending(T.blending,T.blendEquation,T.blendSrc,T.blendDst,T.blendEquationAlpha,T.blendSrcAlpha,T.blendDstAlpha,T.premultipliedAlpha),n.buffers.depth.setTest(T.depthTest),n.buffers.depth.setMask(T.depthWrite),n.buffers.color.setMask(T.colorWrite),r.setTexture2D(T.map||m,0),t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0),E.onAfterRender(e,a,s,void 0,T,void 0)}}n.enable(t.CULL_FACE),n.reset()}}}function bt(e,t,n){function r(){var t=!1,n=new c,r=null,i=new c(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,o,a,s){!0===s&&(t*=a,r*=a,o*=a),n.set(t,r,o,a),!1===i.equals(n)&&(e.clearColor(t,r,o,a),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}}function i(){var t=!1,n=null,r=null,i=null;return{setTest:function(t){t?h(e.DEPTH_TEST):f(e.DEPTH_TEST)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case Ua:e.depthFunc(e.NEVER);break;case Fa:e.depthFunc(e.ALWAYS);break;case Ba:e.depthFunc(e.LESS);break;case za:e.depthFunc(e.LEQUAL);break;case Ha:e.depthFunc(e.EQUAL);break;case Va:e.depthFunc(e.GEQUAL);break;case Ga:e.depthFunc(e.GREATER);break;case Wa:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}else e.depthFunc(e.LEQUAL);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}}function o(){var t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,u=null;return{setTest:function(t){t?h(e.STENCIL_TEST):f(e.STENCIL_TEST)},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,a){r===t&&i===n&&o===a||(e.stencilFunc(t,n,a),r=t,i=n,o=a)},setOp:function(t,n,r){a===t&&s===n&&l===r||(e.stencilOp(t,n,r),a=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){u!==t&&(e.clearStencil(t),u=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,u=null}}}function a(t,n,r){var i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(var a=0;a<r;a++)e.texImage2D(n+a,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,i);return o}function s(){for(var e=0,t=k.length;e<t;e++)k[e]=0}function l(n){if(k[n]=1,0===N[n]&&(e.enableVertexAttribArray(n),N[n]=1),0!==D[n]){t.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),D[n]=0}}function u(n,r){if(k[n]=1,0===N[n]&&(e.enableVertexAttribArray(n),N[n]=1),D[n]!==r){t.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),D[n]=r}}function d(){for(var t=0,n=N.length;t!==n;++t)N[t]!==k[t]&&(e.disableVertexAttribArray(t),N[t]=0)}function h(t){!0!==j[t]&&(e.enable(t),j[t]=!0)}function f(t){!1!==j[t]&&(e.disable(t),j[t]=!1)}function p(){if(null===U&&(U=[],t.get("WEBGL_compressed_texture_pvrtc")||t.get("WEBGL_compressed_texture_s3tc")||t.get("WEBGL_compressed_texture_etc1")||t.get("WEBGL_compressed_texture_astc")))for(var n=e.getParameter(e.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)U.push(n[r]);return U}function m(t){return F!==t&&(e.useProgram(t),F=t,!0)}function g(t,r,i,o,a,s,l,u){if(t!==ga?h(e.BLEND):f(e.BLEND),t!==wa){if(t!==B||u!==X)switch(t){case ya:u?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE));break;case ba:u?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.ONE_MINUS_SRC_COLOR));break;case _a:u?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.SRC_COLOR));break;default:u?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA))}z=null,H=null,V=null,G=null,W=null,q=null}else a=a||r,s=s||i,l=l||o,r===z&&a===G||(e.blendEquationSeparate(n.convert(r),n.convert(a)),z=r,G=a),i===H&&o===V&&s===W&&l===q||(e.blendFuncSeparate(n.convert(i),n.convert(o),n.convert(s),n.convert(l)),H=i,V=o,W=s,q=l);B=t,X=u}function v(t,n){t.side===ca?f(e.CULL_FACE):h(e.CULL_FACE);var r=t.side===ua;n&&(r=!r),y(r),!0===t.transparent?g(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha):g(ga),R.setFunc(t.depthFunc),R.setTest(t.depthTest),R.setMask(t.depthWrite),A.setMask(t.colorWrite),w(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits)}function y(t){Y!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),Y=t)}function b(t){t!==$o?(h(e.CULL_FACE),t!==Z&&(t===ea?e.cullFace(e.BACK):t===ta?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):f(e.CULL_FACE),Z=t}function _(t){t!==K&&(ee&&e.lineWidth(t),K=t)}function w(t,n,r){t?(h(e.POLYGON_OFFSET_FILL),J===n&&Q===r||(e.polygonOffset(n,r),J=n,Q=r)):f(e.POLYGON_OFFSET_FILL)}function x(t){t?h(e.SCISSOR_TEST):f(e.SCISSOR_TEST)}function E(t){void 0===t&&(t=e.TEXTURE0+$-1),re!==t&&(e.activeTexture(t),re=t)}function S(t,n){null===re&&E();var r=ie[re];void 0===r&&(r={type:void 0,texture:void 0},ie[re]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||se[t]),r.type=t,r.texture=n)}function M(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}}function T(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}}function C(t){!1===oe.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),oe.copy(t))}function O(t){!1===ae.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),ae.copy(t))}function P(){for(var t=0;t<N.length;t++)1===N[t]&&(e.disableVertexAttribArray(t),N[t]=0);j={},U=null,re=null,ie={},F=null,B=null,Y=null,Z=null,A.reset(),R.reset(),L.reset()}var A=new r,R=new i,L=new o,I=e.getParameter(e.MAX_VERTEX_ATTRIBS),k=new Uint8Array(I),N=new Uint8Array(I),D=new Uint8Array(I),j={},U=null,F=null,B=null,z=null,H=null,V=null,G=null,W=null,q=null,X=!1,Y=null,Z=null,K=null,J=null,Q=null,$=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),ee=!1,te=0,ne=e.getParameter(e.VERSION);-1!==ne.indexOf("WebGL")?(te=parseFloat(/^WebGL\ ([0-9])/.exec(ne)[1]),ee=te>=1):-1!==ne.indexOf("OpenGL ES")&&(te=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(ne)[1]),ee=te>=2);var re=null,ie={},oe=new c,ae=new c,se={};return se[e.TEXTURE_2D]=a(e.TEXTURE_2D,e.TEXTURE_2D,1),se[e.TEXTURE_CUBE_MAP]=a(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),A.setClear(0,0,0,1),R.setClear(1),L.setClear(0),h(e.DEPTH_TEST),R.setFunc(za),y(!1),b(ea),h(e.CULL_FACE),h(e.BLEND),g(va),{buffers:{color:A,depth:R,stencil:L},initAttributes:s,enableAttribute:l,enableAttributeAndDivisor:u,disableUnusedAttributes:d,enable:h,disable:f,getCompressedTextureFormats:p,useProgram:m,setBlending:g,setMaterial:v,setFlipSided:y,setCullFace:b,setLineWidth:_,setPolygonOffset:w,setScissorTest:x,activeTexture:E,bindTexture:S,compressedTexImage2D:M,texImage2D:T,scissor:C,viewport:O,reset:P}}function _t(e,t,n,r,i,o,a){function s(e,t){if(e.width>t||e.height>t){if("data"in e)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+e.width+"x"+e.height+").");var n=t/Math.max(e.width,e.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=Math.floor(e.width*n),r.height=Math.floor(e.height*n);return r.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+e.width+"x"+e.height+"). Resized to "+r.width+"x"+r.height,e),r}return e}function l(e){return Ol.isPowerOfTwo(e.width)&&Ol.isPowerOfTwo(e.height)}function u(e){if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageBitmap){void 0===A&&(A=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),A.width=Ol.floorPowerOfTwo(e.width),A.height=Ol.floorPowerOfTwo(e.height);return A.getContext("2d").drawImage(e,0,0,A.width,A.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+e.width+"x"+e.height+"). Resized to "+A.width+"x"+A.height,e),A}return e}function c(e){return e.wrapS!==us||e.wrapT!==us||e.minFilter!==ds&&e.minFilter!==ps}function d(e,t){return e.generateMipmaps&&t&&e.minFilter!==ds&&e.minFilter!==ps}function h(t,n,i,o){e.generateMipmap(t),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function f(t){return t===ds||t===hs||t===fs?e.NEAREST:e.LINEAR}function p(e){var t=e.target;t.removeEventListener("dispose",p),g(t),t.isVideoTexture&&delete L[t.id],a.memory.textures--}function m(e){var t=e.target;t.removeEventListener("dispose",m),v(t),a.memory.textures--}function g(t){var n=r.get(t);if(t.image&&n.__image__webglTextureCube)e.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture)}r.remove(t)}function v(t){var n=r.get(t),i=r.get(t.texture);if(t){if(void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLRenderTargetCube)for(var o=0;o<6;o++)e.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[o]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(t.texture),r.remove(t)}}function y(t,i){var o=r.get(t);if(t.isVideoTexture&&P(t),t.version>0&&o.__version!==t.version){var a=t.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",t);else{if(!1!==a.complete)return void x(o,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",t)}}n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_2D,o.__webglTexture)}function b(t,u){var c=r.get(t);if(6===t.image.length)if(t.version>0&&c.__version!==t.version){c.__image__webglTextureCube||(t.addEventListener("dispose",p),c.__image__webglTextureCube=e.createTexture(),a.memory.textures++),n.activeTexture(e.TEXTURE0+u),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY);for(var f=t&&t.isCompressedTexture,m=t.image[0]&&t.image[0].isDataTexture,g=[],v=0;v<6;v++)g[v]=f||m?m?t.image[v].image:t.image[v]:s(t.image[v],i.maxCubemapSize);var y=g[0],b=l(y),_=o.convert(t.format),x=o.convert(t.type);w(e.TEXTURE_CUBE_MAP,t,b);for(var v=0;v<6;v++)if(f)for(var E,S=g[v].mipmaps,M=0,T=S.length;M<T;M++)E=S[M],t.format!==Rs&&t.format!==As?n.getCompressedTextureFormats().indexOf(_)>-1?n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+v,M,_,E.width,E.height,0,E.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+v,M,_,E.width,E.height,0,_,x,E.data);else m?n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+v,0,_,g[v].width,g[v].height,0,_,x,g[v].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+v,0,_,_,x,g[v]);c.__maxMipLevel=f?S.length-1:0,d(t,b)&&h(e.TEXTURE_CUBE_MAP,t,y.width,y.height),c.__version=t.version,t.onUpdate&&t.onUpdate(t)}else n.activeTexture(e.TEXTURE0+u),n.bindTexture(e.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)}function _(t,i){n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_CUBE_MAP,r.get(t).__webglTexture)}function w(n,a,s){var l;if(s?(e.texParameteri(n,e.TEXTURE_WRAP_S,o.convert(a.wrapS)),e.texParameteri(n,e.TEXTURE_WRAP_T,o.convert(a.wrapT)),e.texParameteri(n,e.TEXTURE_MAG_FILTER,o.convert(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,o.convert(a.minFilter))):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),a.wrapS===us&&a.wrapT===us||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),e.texParameteri(n,e.TEXTURE_MAG_FILTER,f(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,f(a.minFilter)),a.minFilter!==ds&&a.minFilter!==ps&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),l=t.get("EXT_texture_filter_anisotropic")){if(a.type===Es&&null===t.get("OES_texture_float_linear"))return;if(a.type===Ss&&null===t.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,l.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function x(t,r,f){void 0===t.__webglInit&&(t.__webglInit=!0,r.addEventListener("dispose",p),t.__webglTexture=e.createTexture(),a.memory.textures++),n.activeTexture(e.TEXTURE0+f),n.bindTexture(e.TEXTURE_2D,t.__webglTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment);var m=s(r.image,i.maxTextureSize);c(r)&&!1===l(m)&&(m=u(m));var g=l(m),v=o.convert(r.format),y=o.convert(r.type);w(e.TEXTURE_2D,r,g);var b,_=r.mipmaps;if(r.isDepthTexture){var x=e.DEPTH_COMPONENT;if(r.type===Es){if(!R)throw new Error("Float Depth Texture only supported in WebGL2.0");x=e.DEPTH_COMPONENT32F}else R&&(x=e.DEPTH_COMPONENT16);r.format===Ns&&x===e.DEPTH_COMPONENT&&r.type!==_s&&r.type!==xs&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=_s,y=o.convert(r.type)),r.format===Ds&&(x=e.DEPTH_STENCIL,r.type!==Os&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Os,y=o.convert(r.type))),n.texImage2D(e.TEXTURE_2D,0,x,m.width,m.height,0,v,y,null)}else if(r.isDataTexture)if(_.length>0&&g){for(var E=0,S=_.length;E<S;E++)b=_[E],n.texImage2D(e.TEXTURE_2D,E,v,b.width,b.height,0,v,y,b.data);r.generateMipmaps=!1,t.__maxMipLevel=_.length-1}else n.texImage2D(e.TEXTURE_2D,0,v,m.width,m.height,0,v,y,m.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(var E=0,S=_.length;E<S;E++)b=_[E],r.format!==Rs&&r.format!==As?n.getCompressedTextureFormats().indexOf(v)>-1?n.compressedTexImage2D(e.TEXTURE_2D,E,v,b.width,b.height,0,b.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(e.TEXTURE_2D,E,v,b.width,b.height,0,v,y,b.data);t.__maxMipLevel=_.length-1}else if(_.length>0&&g){for(var E=0,S=_.length;E<S;E++)b=_[E],n.texImage2D(e.TEXTURE_2D,E,v,v,y,b);r.generateMipmaps=!1,t.__maxMipLevel=_.length-1}else n.texImage2D(e.TEXTURE_2D,0,v,v,y,m),t.__maxMipLevel=0;d(r,g)&&h(e.TEXTURE_2D,r,m.width,m.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function E(t,i,a,s){var l=o.convert(i.texture.format),u=o.convert(i.texture.type);n.texImage2D(s,0,l,i.width,i.height,0,l,u,null),e.bindFramebuffer(e.FRAMEBUFFER,t),e.framebufferTexture2D(e.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),e.bindFramebuffer(e.FRAMEBUFFER,null)}function S(t,n){e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)):n.depthBuffer&&n.stencilBuffer?(e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)):e.renderbufferStorage(e.RENDERBUFFER,e.RGBA4,n.width,n.height),e.bindRenderbuffer(e.RENDERBUFFER,null)}function M(t,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(e.FRAMEBUFFER,t),!n.depthTexture||!n.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(n.depthTexture).__webglTexture&&n.depthTexture.image.width===n.width&&n.depthTexture.image.height===n.height||(n.depthTexture.image.width=n.width,n.depthTexture.image.height=n.height,n.depthTexture.needsUpdate=!0),y(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Ns)e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Ds)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,i,0)}}function T(t){var n=r.get(t),i=!0===t.isWebGLRenderTargetCube;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");M(n.__webglFramebuffer,t)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),S(n.__webglDepthbuffer[o],t)}else e.bindFramebuffer(e.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),S(n.__webglDepthbuffer,t);e.bindFramebuffer(e.FRAMEBUFFER,null)}function C(t){var i=r.get(t),o=r.get(t.texture);t.addEventListener("dispose",m),o.__webglTexture=e.createTexture(),a.memory.textures++;var s=!0===t.isWebGLRenderTargetCube,u=l(t);if(s){i.__webglFramebuffer=[];for(var c=0;c<6;c++)i.__webglFramebuffer[c]=e.createFramebuffer()}else i.__webglFramebuffer=e.createFramebuffer();if(s){n.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture),w(e.TEXTURE_CUBE_MAP,t.texture,u);for(var c=0;c<6;c++)E(i.__webglFramebuffer[c],t,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+c);d(t.texture,u)&&h(e.TEXTURE_CUBE_MAP,t.texture,t.width,t.height),n.bindTexture(e.TEXTURE_CUBE_MAP,null)}else n.bindTexture(e.TEXTURE_2D,o.__webglTexture),w(e.TEXTURE_2D,t.texture,u),E(i.__webglFramebuffer,t,e.COLOR_ATTACHMENT0,e.TEXTURE_2D),d(t.texture,u)&&h(e.TEXTURE_2D,t.texture,t.width,t.height),n.bindTexture(e.TEXTURE_2D,null);t.depthBuffer&&T(t)}function O(t){var i=t.texture;if(d(i,l(t))){var o=t.isWebGLRenderTargetCube?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),h(o,i,t.width,t.height),n.bindTexture(o,null)}}function P(e){var t=e.id,n=a.render.frame;L[t]!==n&&(L[t]=n,e.update())}var A,R="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext,L={};this.setTexture2D=y,this.setTextureCube=b,this.setTextureCubeDynamic=_,this.setupRenderTarget=C,this.updateRenderTargetMipmap=O}function wt(e,t){function n(n){var r;if(n===ls)return e.REPEAT;if(n===us)return e.CLAMP_TO_EDGE;if(n===cs)return e.MIRRORED_REPEAT;if(n===ds)return e.NEAREST;if(n===hs)return e.NEAREST_MIPMAP_NEAREST;if(n===fs)return e.NEAREST_MIPMAP_LINEAR;if(n===ps)return e.LINEAR;if(n===ms)return e.LINEAR_MIPMAP_NEAREST;if(n===gs)return e.LINEAR_MIPMAP_LINEAR;if(n===vs)return e.UNSIGNED_BYTE;if(n===Ms)return e.UNSIGNED_SHORT_4_4_4_4;if(n===Ts)return e.UNSIGNED_SHORT_5_5_5_1;if(n===Cs)return e.UNSIGNED_SHORT_5_6_5;if(n===ys)return e.BYTE;if(n===bs)return e.SHORT;if(n===_s)return e.UNSIGNED_SHORT;if(n===ws)return e.INT;if(n===xs)return e.UNSIGNED_INT;if(n===Es)return e.FLOAT;if(n===Ss&&null!==(r=t.get("OES_texture_half_float")))return r.HALF_FLOAT_OES;if(n===Ps)return e.ALPHA;if(n===As)return e.RGB;if(n===Rs)return e.RGBA;if(n===Ls)return e.LUMINANCE;if(n===Is)return e.LUMINANCE_ALPHA;if(n===Ns)return e.DEPTH_COMPONENT;if(n===Ds)return e.DEPTH_STENCIL;if(n===xa)return e.FUNC_ADD;if(n===Ea)return e.FUNC_SUBTRACT;if(n===Sa)return e.FUNC_REVERSE_SUBTRACT;if(n===Ca)return e.ZERO;if(n===Oa)return e.ONE;if(n===Pa)return e.SRC_COLOR;if(n===Aa)return e.ONE_MINUS_SRC_COLOR;if(n===Ra)return e.SRC_ALPHA;if(n===La)return e.ONE_MINUS_SRC_ALPHA;if(n===Ia)return e.DST_ALPHA;if(n===ka)return e.ONE_MINUS_DST_ALPHA;if(n===Na)return e.DST_COLOR;if(n===Da)return e.ONE_MINUS_DST_COLOR;if(n===ja)return e.SRC_ALPHA_SATURATE;if((n===js||n===Us||n===Fs||n===Bs)&&null!==(r=t.get("WEBGL_compressed_texture_s3tc"))){if(n===js)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Us)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Fs)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Bs)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((n===zs||n===Hs||n===Vs||n===Gs)&&null!==(r=t.get("WEBGL_compressed_texture_pvrtc"))){if(n===zs)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Hs)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Vs)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Gs)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===Ws&&null!==(r=t.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((n===qs||n===Xs||n===Ys||n===Zs||n===Ks||n===Js||n===Qs||n===$s||n===el||n===tl||n===nl||n===rl||n===il||n===ol)&&null!==(r=t.get("WEBGL_compressed_texture_astc")))return n;if((n===Ma||n===Ta)&&null!==(r=t.get("EXT_blend_minmax"))){if(n===Ma)return r.MIN_EXT;if(n===Ta)return r.MAX_EXT}return n===Os&&null!==(r=t.get("WEBGL_depth_texture"))?r.UNSIGNED_INT_24_8_WEBGL:0}return{convert:n}}function xt(e,t,n,r){E.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==n?n:.1,this.far=void 0!==r?r:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Et(e){xt.call(this),this.cameras=e||[]}function St(e){function t(){return null!==i&&!0===i.isPresenting}function n(){if(t()){var n=i.getEyeParameters("left"),o=n.renderWidth,a=n.renderHeight;_=e.getPixelRatio(),b=e.getSize(),e.setDrawingBufferSize(2*o,a,1)}else r.enabled&&e.setDrawingBufferSize(b.width,b.height,_)}var r=this,i=null,l=null,u=null,d=new o,h=new o;"undefined"!=typeof window&&"VRFrameData"in window&&(l=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",n,!1));var f=new o,p=new a,m=new s,g=new xt;g.bounds=new c(0,0,.5,1),g.layers.enable(1);var v=new xt;v.bounds=new c(.5,0,.5,1),v.layers.enable(2);var y=new Et([g,v]);y.layers.enable(1),y.layers.enable(2);var b,_;this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return i},this.setDevice=function(e){void 0!==e&&(i=e)},this.setPoseTarget=function(e){void 0!==e&&(u=e)},this.getCamera=function(e){if(null===i)return e;i.depthNear=e.near,i.depthFar=e.far,i.getFrameData(l);var t=i.stageParameters;t?d.fromArray(t.sittingToStandingTransform):d.makeTranslation(0,r.userHeight,0);var n=l.pose,o=null!==u?u:e;if(o.matrix.copy(d),o.matrix.decompose(o.position,o.quaternion,o.scale),null!==n.orientation&&(p.fromArray(n.orientation),o.quaternion.multiply(p)),null!==n.position&&(p.setFromRotationMatrix(d),m.fromArray(n.position),m.applyQuaternion(p),o.position.add(m)),o.updateMatrixWorld(),!1===i.isPresenting)return e;g.near=e.near,v.near=e.near,g.far=e.far,v.far=e.far,y.matrixWorld.copy(e.matrixWorld),y.matrixWorldInverse.copy(e.matrixWorldInverse),g.matrixWorldInverse.fromArray(l.leftViewMatrix),v.matrixWorldInverse.fromArray(l.rightViewMatrix),h.getInverse(d),g.matrixWorldInverse.multiply(h),v.matrixWorldInverse.multiply(h);var a=o.parent;null!==a&&(f.getInverse(a.matrixWorld),g.matrixWorldInverse.multiply(f),v.matrixWorldInverse.multiply(f)),g.matrixWorld.getInverse(g.matrixWorldInverse),v.matrixWorld.getInverse(v.matrixWorldInverse),g.projectionMatrix.fromArray(l.leftProjectionMatrix),v.projectionMatrix.fromArray(l.rightProjectionMatrix),y.projectionMatrix.copy(g.projectionMatrix);var s=i.getLayers();if(s.length){var c=s[0];null!==c.leftBounds&&4===c.leftBounds.length&&g.bounds.fromArray(c.leftBounds),null!==c.rightBounds&&4===c.rightBounds.length&&v.bounds.fromArray(c.rightBounds)}return y},this.getStandingMatrix=function(){return d},this.submitFrame=function(){t()&&i.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",n)}}function Mt(e){function t(){return null===ce?xe:1}function n(){Ie=new te(oe),Ie.get("WEBGL_depth_texture"),Ie.get("OES_texture_float"),Ie.get("OES_texture_float_linear"),Ie.get("OES_texture_half_float"),Ie.get("OES_texture_half_float_linear"),Ie.get("OES_standard_derivatives"),Ie.get("OES_element_index_uint"),Ie.get("ANGLE_instanced_arrays"),Je=new wt(oe,Ie),ke=new $(oe,Ie,e),Ne=new bt(oe,Ie,Je),Ne.scissor(ve.copy(Se).multiplyScalar(xe)),Ne.viewport(ge.copy(Ee).multiplyScalar(xe)),De=new ie(oe),je=new ot,Ue=new _t(oe,Ie,Ne,je,ke,Je,De),Fe=new b(oe),Be=new ne(oe,Fe,De),ze=new se(Be,De),Xe=new ae(oe),Ve=new it(le,Ie,ke),Ge=new ut,We=new ft,qe=new J(le,Ne,Be,q),Ye=new Q(oe,Ie,De),Ze=new re(oe,Ie,De),Ke=new yt(le,oe,Ne,Ue,ke),De.programs=Ve.programs,le.context=oe,le.capabilities=ke,le.extensions=Ie,le.properties=je,le.renderLists=Ge,le.state=Ne,le.info=De}function r(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),ue=!0}function i(){console.log("THREE.WebGLRenderer: Context Restored."),ue=!1,n()}function a(e){var t=e.target;t.removeEventListener("dispose",a),l(t)}function l(e){u(e),je.remove(e)}function u(e){var t=je.get(e).program;e.program=void 0,void 0!==t&&Ve.releaseProgram(t)}function d(e,t,n){e.render(function(e){le.renderBufferImmediate(e,t,n)})}function h(e,t,n){if(n&&n.isInstancedBufferGeometry&&null===Ie.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");Ne.initAttributes();var r=n.attributes,i=t.getAttributes(),o=e.defaultAttributeValues;for(var a in i){var s=i[a];if(s>=0){var l=r[a];if(void 0!==l){var u=l.normalized,c=l.itemSize,d=Fe.get(l);if(void 0===d)continue;var h=d.buffer,f=d.type,p=d.bytesPerElement;if(l.isInterleavedBufferAttribute){var m=l.data,g=m.stride,v=l.offset;m&&m.isInstancedInterleavedBuffer?(Ne.enableAttributeAndDivisor(s,m.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=m.meshPerAttribute*m.count)):Ne.enableAttribute(s),oe.bindBuffer(oe.ARRAY_BUFFER,h),oe.vertexAttribPointer(s,c,f,u,g*p,v*p)}else l.isInstancedBufferAttribute?(Ne.enableAttributeAndDivisor(s,l.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=l.meshPerAttribute*l.count)):Ne.enableAttribute(s),oe.bindBuffer(oe.ARRAY_BUFFER,h),oe.vertexAttribPointer(s,c,f,u,0,0)}else if(void 0!==o){var y=o[a];if(void 0!==y)switch(y.length){case 2:oe.vertexAttrib2fv(s,y);break;case 3:oe.vertexAttrib3fv(s,y);break;case 4:oe.vertexAttrib4fv(s,y);break;default:oe.vertexAttrib1fv(s,y)}}}}Ne.disableUnusedAttributes()}function p(){et||(g(),et=!0)}function m(){et=!1}function g(){var e=Qe.getDevice();e&&e.isPresenting?e.requestAnimationFrame(y):window.requestAnimationFrame(y)}function y(e){!1!==et&&(tt(e),g())}function _(e,t,n){if(!1!==e.visible){if(e.layers.test(t.layers))if(e.isLight)K.pushLight(e),e.castShadow&&K.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!Te.intersectsSprite(e)||K.pushSprite(e);else if(e.isImmediateRenderObject)n&&Re.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Ae),Z.push(e,null,e.material,Re.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||Te.intersectsObject(e))){n&&Re.setFromMatrixPosition(e.matrixWorld).applyMatrix4(Ae);var r=ze.update(e),i=e.material;if(Array.isArray(i))for(var o=r.groups,a=0,s=o.length;a<s;a++){var l=o[a],u=i[l.materialIndex];u&&u.visible&&Z.push(e,r,u,Re.z,l)}else i.visible&&Z.push(e,r,i,Re.z,null)}for(var c=e.children,a=0,s=c.length;a<s;a++)_(c[a],t,n)}}function w(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i],s=a.object,l=a.geometry,u=void 0===r?a.material:r,c=a.group;if(n.isArrayCamera){me=n;for(var d=n.cameras,h=0,f=d.length;h<f;h++){var p=d[h];if(s.layers.test(p.layers)){var m=p.bounds,g=m.x*_e,v=m.y*we,y=m.z*_e,b=m.w*we;Ne.viewport(ge.set(g,v,y,b).multiplyScalar(xe)),x(s,t,p,l,u,c)}}}else me=null,x(s,t,n,l,u,c)}}function x(e,t,n,r,i,o){if(e.onBeforeRender(le,t,n,r,i,o),K=We.get(t,me||n),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var a=e.isMesh&&e.matrixWorld.determinant()<0;Ne.setMaterial(i,a);var s=S(n,t.fog,i,e);fe="",d(e,s,i)}else le.renderBufferDirect(n,t.fog,r,i,e,o);e.onAfterRender(le,t,n,r,i,o),K=We.get(t,me||n)}function E(e,t,n){var r=je.get(e),i=K.state.lights,o=K.state.shadowsArray,s=Ve.getParameters(e,i.state,o,t,Ce.numPlanes,Ce.numIntersection,n),l=Ve.getProgramCode(e,s),c=r.program,d=!0;if(void 0===c)e.addEventListener("dispose",a);else if(c.code!==l)u(e);else if(r.lightsHash!==i.state.hash)je.update(e,"lightsHash",i.state.hash),d=!1;else{if(void 0!==s.shaderID)return;d=!1}if(d){if(s.shaderID){var h=kl[s.shaderID];r.shader={name:e.type,uniforms:Rl.clone(h.uniforms),vertexShader:h.vertexShader,fragmentShader:h.fragmentShader}}else r.shader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.onBeforeCompile(r.shader,le),c=Ve.acquireProgram(e,r.shader,s,l),r.program=c,e.program=c}var f=c.getAttributes();if(e.morphTargets){e.numSupportedMorphTargets=0;for(var p=0;p<le.maxMorphTargets;p++)f["morphTarget"+p]>=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(var p=0;p<le.maxMorphNormals;p++)f["morphNormal"+p]>=0&&e.numSupportedMorphNormals++}var m=r.shader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=Ce.numPlanes,r.numIntersection=Ce.numIntersection,m.clippingPlanes=Ce.uniform),r.fog=t,r.lightsHash=i.state.hash,e.lights&&(m.ambientLightColor.value=i.state.ambient,m.directionalLights.value=i.state.directional,m.spotLights.value=i.state.spot,m.rectAreaLights.value=i.state.rectArea,m.pointLights.value=i.state.point,m.hemisphereLights.value=i.state.hemi,m.directionalShadowMap.value=i.state.directionalShadowMap,m.directionalShadowMatrix.value=i.state.directionalShadowMatrix,m.spotShadowMap.value=i.state.spotShadowMap,m.spotShadowMatrix.value=i.state.spotShadowMatrix,m.pointShadowMap.value=i.state.pointShadowMap,m.pointShadowMatrix.value=i.state.pointShadowMatrix);var g=r.program.getUniforms(),v=He.seqWithValue(g.seq,m);r.uniformsList=v}function S(e,t,n,r){be=0;var i=je.get(n),o=K.state.lights;if(Oe&&(Pe||e!==pe)){var a=e===pe&&n.id===he;Ce.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,i,a)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==t?n.needsUpdate=!0:n.lights&&i.lightsHash!==o.state.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===Ce.numPlanes&&i.numIntersection===Ce.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(E(n,t,r),n.needsUpdate=!1);var s=!1,l=!1,u=!1,c=i.program,d=c.getUniforms(),h=i.shader.uniforms;if(Ne.useProgram(c.program)&&(s=!0,l=!0,u=!0),n.id!==he&&(he=n.id,l=!0),s||e!==pe){if(d.setValue(oe,"projectionMatrix",e.projectionMatrix),ke.logarithmicDepthBuffer&&d.setValue(oe,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),pe!==(me||e)&&(pe=me||e,l=!0,u=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var p=d.map.cameraPosition;void 0!==p&&p.setValue(oe,Re.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&d.setValue(oe,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){d.setOptional(oe,r,"bindMatrix"),d.setOptional(oe,r,"bindMatrixInverse");var m=r.skeleton;if(m){var g=m.bones;if(ke.floatVertexTextures){if(void 0===m.boneTexture){var v=Math.sqrt(4*g.length);v=Ol.ceilPowerOfTwo(v),v=Math.max(v,4);var y=new Float32Array(v*v*4);y.set(m.boneMatrices);var b=new f(y,v,v,Rs,Es);b.needsUpdate=!0,m.boneMatrices=y,m.boneTexture=b,m.boneTextureSize=v}d.setValue(oe,"boneTexture",m.boneTexture),d.setValue(oe,"boneTextureSize",m.boneTextureSize)}else d.setOptional(oe,m,"boneMatrices")}}return l&&(d.setValue(oe,"toneMappingExposure",le.toneMappingExposure),d.setValue(oe,"toneMappingWhitePoint",le.toneMappingWhitePoint),n.lights&&U(h,u),t&&n.fog&&P(h,t),n.isMeshBasicMaterial?M(h,n):n.isMeshLambertMaterial?(M(h,n),A(h,n)):n.isMeshPhongMaterial?(M(h,n),n.isMeshToonMaterial?L(h,n):R(h,n)):n.isMeshStandardMaterial?(M(h,n),n.isMeshPhysicalMaterial?k(h,n):I(h,n)):n.isMeshDepthMaterial?(M(h,n),N(h,n)):n.isMeshDistanceMaterial?(M(h,n),D(h,n)):n.isMeshNormalMaterial?(M(h,n),j(h,n)):n.isLineBasicMaterial?(T(h,n),n.isLineDashedMaterial&&C(h,n)):n.isPointsMaterial?O(h,n):n.isShadowMaterial&&(h.color.value=n.color,h.opacity.value=n.opacity),void 0!==h.ltc_1&&(h.ltc_1.value=Il.LTC_1),void 0!==h.ltc_2&&(h.ltc_2.value=Il.LTC_2),He.upload(oe,i.uniformsList,h,le)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(He.upload(oe,i.uniformsList,h,le),n.uniformsNeedUpdate=!1),d.setValue(oe,"modelViewMatrix",r.modelViewMatrix),d.setValue(oe,"normalMatrix",r.normalMatrix),d.setValue(oe,"modelMatrix",r.matrixWorld),c}function M(e,t){e.opacity.value=t.opacity,t.color&&(e.diffuse.value=t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap),t.envMap&&(e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap&&t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio,e.maxMipLevel.value=je.get(t.envMap).__maxMipLevel),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity);var n;t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}function T(e,t){e.diffuse.value=t.color,e.opacity.value=t.opacity}function C(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function O(e,t){e.diffuse.value=t.color,e.opacity.value=t.opacity,e.size.value=t.size*xe,e.scale.value=.5*we,e.map.value=t.map,null!==t.map&&(!0===t.map.matrixAutoUpdate&&t.map.updateMatrix(),e.uvTransform.value.copy(t.map.matrix))}function P(e,t){e.fogColor.value=t.color,t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}function A(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}function R(e,t){e.specular.value=t.specular,e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function L(e,t){R(e,t),t.gradientMap&&(e.gradientMap.value=t.gradientMap)}function I(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function k(e,t){e.clearCoat.value=t.clearCoat,e.clearCoatRoughness.value=t.clearCoatRoughness,I(e,t)}function N(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function D(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}function j(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale)),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function U(e,t){e.ambientLightColor.needsUpdate=t,e.directionalLights.needsUpdate=t,e.pointLights.needsUpdate=t,e.spotLights.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}function F(){var e=be;return e>=ke.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+e+" texture units while this GPU supports only "+ke.maxTextures),be+=1,e}console.log("THREE.WebGLRenderer",Jo),e=e||{};var B=void 0!==e.canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),z=void 0!==e.context?e.context:null,H=void 0!==e.alpha&&e.alpha,V=void 0===e.depth||e.depth,G=void 0===e.stencil||e.stencil,W=void 0!==e.antialias&&e.antialias,q=void 0===e.premultipliedAlpha||e.premultipliedAlpha,X=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,Y=void 0!==e.powerPreference?e.powerPreference:"default",Z=null,K=null;this.domElement=B,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=Ka,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var oe,le=this,ue=!1,ce=null,de=null,he=-1,fe="",pe=null,me=null,ge=new c,ve=new c,ye=null,be=0,_e=B.width,we=B.height,xe=1,Ee=new c(0,0,_e,we),Se=new c(0,0,_e,we),Me=!1,Te=new v,Ce=new ee,Oe=!1,Pe=!1,Ae=new o,Re=new s;try{var Le={alpha:H,depth:V,stencil:G,antialias:W,premultipliedAlpha:q,preserveDrawingBuffer:X,powerPreference:Y};if(B.addEventListener("webglcontextlost",r,!1),B.addEventListener("webglcontextrestored",i,!1),null===(oe=z||B.getContext("webgl",Le)||B.getContext("experimental-webgl",Le)))throw null!==B.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===oe.getShaderPrecisionFormat&&(oe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){console.error("THREE.WebGLRenderer: "+e.message)}var Ie,ke,Ne,De,je,Ue,Fe,Be,ze,Ve,Ge,We,qe,Xe,Ye,Ze,Ke,Je;n();var Qe=new St(le);this.vr=Qe;var $e=new gt(le,ze,ke.maxTextureSize);this.shadowMap=$e,this.getContext=function(){return oe},this.getContextAttributes=function(){return oe.getContextAttributes()},this.forceContextLoss=function(){var e=Ie.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=Ie.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return xe},this.setPixelRatio=function(e){void 0!==e&&(xe=e,this.setSize(_e,we,!1))},this.getSize=function(){return{width:_e,height:we}},this.setSize=function(e,t,n){var r=Qe.getDevice();if(r&&r.isPresenting)return void console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");_e=e,we=t,B.width=e*xe,B.height=t*xe,!1!==n&&(B.style.width=e+"px",B.style.height=t+"px"),this.setViewport(0,0,e,t)},this.getDrawingBufferSize=function(){return{width:_e*xe,height:we*xe}},this.setDrawingBufferSize=function(e,t,n){_e=e,we=t,xe=n,B.width=e*n,B.height=t*n,this.setViewport(0,0,e,t)},this.getCurrentViewport=function(){return ge},this.setViewport=function(e,t,n,r){Ee.set(e,we-t-r,n,r),Ne.viewport(ge.copy(Ee).multiplyScalar(xe))},this.setScissor=function(e,t,n,r){Se.set(e,we-t-r,n,r),Ne.scissor(ve.copy(Se).multiplyScalar(xe))},this.setScissorTest=function(e){Ne.setScissorTest(Me=e)},this.getClearColor=function(){return qe.getClearColor()},this.setClearColor=function(){qe.setClearColor.apply(qe,arguments)},this.getClearAlpha=function(){return qe.getClearAlpha()},this.setClearAlpha=function(){qe.setClearAlpha.apply(qe,arguments)},this.clear=function(e,t,n){var r=0;(void 0===e||e)&&(r|=oe.COLOR_BUFFER_BIT),(void 0===t||t)&&(r|=oe.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=oe.STENCIL_BUFFER_BIT),oe.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(e,t,n,r){this.setRenderTarget(e),this.clear(t,n,r)},this.dispose=function(){B.removeEventListener("webglcontextlost",r,!1),B.removeEventListener("webglcontextrestored",i,!1),Ge.dispose(),We.dispose(),je.dispose(),ze.dispose(),Qe.dispose(),m()},this.renderBufferImmediate=function(e,t,n){Ne.initAttributes();var r=je.get(e);e.hasPositions&&!r.position&&(r.position=oe.createBuffer()),e.hasNormals&&!r.normal&&(r.normal=oe.createBuffer()),e.hasUvs&&!r.uv&&(r.uv=oe.createBuffer()),e.hasColors&&!r.color&&(r.color=oe.createBuffer());var i=t.getAttributes();if(e.hasPositions&&(oe.bindBuffer(oe.ARRAY_BUFFER,r.position),oe.bufferData(oe.ARRAY_BUFFER,e.positionArray,oe.DYNAMIC_DRAW),Ne.enableAttribute(i.position),oe.vertexAttribPointer(i.position,3,oe.FLOAT,!1,0,0)),e.hasNormals){if(oe.bindBuffer(oe.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&!0===n.flatShading)for(var o=0,a=3*e.count;o<a;o+=9){var s=e.normalArray,l=(s[o+0]+s[o+3]+s[o+6])/3,u=(s[o+1]+s[o+4]+s[o+7])/3,c=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=l,s[o+1]=u,s[o+2]=c,s[o+3]=l,s[o+4]=u,s[o+5]=c,s[o+6]=l,s[o+7]=u,s[o+8]=c}oe.bufferData(oe.ARRAY_BUFFER,e.normalArray,oe.DYNAMIC_DRAW),Ne.enableAttribute(i.normal),oe.vertexAttribPointer(i.normal,3,oe.FLOAT,!1,0,0)}e.hasUvs&&n.map&&(oe.bindBuffer(oe.ARRAY_BUFFER,r.uv),oe.bufferData(oe.ARRAY_BUFFER,e.uvArray,oe.DYNAMIC_DRAW),Ne.enableAttribute(i.uv),oe.vertexAttribPointer(i.uv,2,oe.FLOAT,!1,0,0)),e.hasColors&&n.vertexColors!==fa&&(oe.bindBuffer(oe.ARRAY_BUFFER,r.color),oe.bufferData(oe.ARRAY_BUFFER,e.colorArray,oe.DYNAMIC_DRAW),Ne.enableAttribute(i.color),oe.vertexAttribPointer(i.color,3,oe.FLOAT,!1,0,0)),Ne.disableUnusedAttributes(),oe.drawArrays(oe.TRIANGLES,0,e.count),e.count=0},this.renderBufferDirect=function(e,n,r,i,o,a){var s=o.isMesh&&o.matrixWorld.determinant()<0;Ne.setMaterial(i,s);var l=S(e,n,i,o),u=r.id+"_"+l.id+"_"+(!0===i.wireframe),c=!1;u!==fe&&(fe=u,c=!0),o.morphTargetInfluences&&(Xe.update(o,r,i,l),c=!0);var d=r.index,f=r.attributes.position,p=1;!0===i.wireframe&&(d=Be.getWireframeAttribute(r),p=2);var m,g=Ye;null!==d&&(m=Fe.get(d),g=Ze,g.setIndex(m)),c&&(h(i,l,r),null!==d&&oe.bindBuffer(oe.ELEMENT_ARRAY_BUFFER,m.buffer));var v=1/0;null!==d?v=d.count:void 0!==f&&(v=f.count);var y=r.drawRange.start*p,b=r.drawRange.count*p,_=null!==a?a.start*p:0,w=null!==a?a.count*p:1/0,x=Math.max(y,_),E=Math.min(v,y+b,_+w)-1,M=Math.max(0,E-x+1);if(0!==M){if(o.isMesh)if(!0===i.wireframe)Ne.setLineWidth(i.wireframeLinewidth*t()),g.setMode(oe.LINES);else switch(o.drawMode){case ml:g.setMode(oe.TRIANGLES);break;case gl:g.setMode(oe.TRIANGLE_STRIP);break;case vl:g.setMode(oe.TRIANGLE_FAN)}else if(o.isLine){var T=i.linewidth;void 0===T&&(T=1),Ne.setLineWidth(T*t()),o.isLineSegments?g.setMode(oe.LINES):o.isLineLoop?g.setMode(oe.LINE_LOOP):g.setMode(oe.LINE_STRIP)}else o.isPoints&&g.setMode(oe.POINTS);r&&r.isInstancedBufferGeometry?r.maxInstancedCount>0&&g.renderInstances(r,x,M):g.render(x,M)}},this.compile=function(e,t){K=We.get(e,t),K.init(),e.traverse(function(e){e.isLight&&(K.pushLight(e),e.castShadow&&K.pushShadow(e))}),K.setupLights(t),e.traverse(function(t){if(t.material)if(Array.isArray(t.material))for(var n=0;n<t.material.length;n++)E(t.material[n],e.fog,t);else E(t.material,e.fog,t)})};var et=!1,tt=null;this.animate=function(e){tt=e,null!==tt?p():m()},this.render=function(e,t,n,r){if(!t||!t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!ue){fe="",he=-1,pe=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),Qe.enabled&&(t=Qe.getCamera(t)),K=We.get(e,t),K.init(),e.onBeforeRender(le,e,t,n),Ae.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Te.setFromMatrix(Ae),Pe=this.localClippingEnabled,Oe=Ce.init(this.clippingPlanes,Pe,t),Z=Ge.get(e,t),Z.init(),_(e,t,le.sortObjects),!0===le.sortObjects&&Z.sort(),Oe&&Ce.beginShadows();var i=K.state.shadowsArray;$e.render(i,e,t),K.setupLights(t),Oe&&Ce.endShadows(),this.info.autoReset&&this.info.reset(),void 0===n&&(n=null),this.setRenderTarget(n),qe.render(Z,e,t,r);var o=Z.opaque,a=Z.transparent;if(e.overrideMaterial){var s=e.overrideMaterial;o.length&&w(o,e,t,s),a.length&&w(a,e,t,s)}else o.length&&w(o,e,t),a.length&&w(a,e,t);var l=K.state.spritesArray;Ke.render(l,e,t),n&&Ue.updateRenderTargetMipmap(n),Ne.buffers.depth.setTest(!0),Ne.buffers.depth.setMask(!0),Ne.buffers.color.setMask(!0),Ne.setPolygonOffset(!1),e.onAfterRender(le,e,t),Qe.enabled&&Qe.submitFrame(),Z=null,K=null}},this.allocTextureUnit=F,this.setTexture2D=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTarget&&(e||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),Ue.setTexture2D(t,n)}}(),this.setTexture=function(){var e=!1;return function(t,n){e||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),e=!0),Ue.setTexture2D(t,n)}}(),this.setTextureCube=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTargetCube&&(e||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),t&&t.isCubeTexture||Array.isArray(t.image)&&6===t.image.length?Ue.setTextureCube(t,n):Ue.setTextureCubeDynamic(t,n)}}(),this.getRenderTarget=function(){return ce},this.setRenderTarget=function(e){ce=e,e&&void 0===je.get(e).__webglFramebuffer&&Ue.setupRenderTarget(e);var t=null,n=!1;if(e){var r=je.get(e).__webglFramebuffer;e.isWebGLRenderTargetCube?(t=r[e.activeCubeFace],n=!0):t=r,ge.copy(e.viewport),ve.copy(e.scissor),ye=e.scissorTest}else ge.copy(Ee).multiplyScalar(xe),ve.copy(Se).multiplyScalar(xe),ye=Me;if(de!==t&&(oe.bindFramebuffer(oe.FRAMEBUFFER,t),de=t),Ne.viewport(ge),Ne.scissor(ve),Ne.setScissorTest(ye),n){var i=je.get(e.texture);oe.framebufferTexture2D(oe.FRAMEBUFFER,oe.COLOR_ATTACHMENT0,oe.TEXTURE_CUBE_MAP_POSITIVE_X+e.activeCubeFace,i.__webglTexture,e.activeMipMapLevel)}},this.readRenderTargetPixels=function(e,t,n,r,i,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");var a=je.get(e).__webglFramebuffer;if(a){var s=!1;a!==de&&(oe.bindFramebuffer(oe.FRAMEBUFFER,a),s=!0);try{var l=e.texture,u=l.format,c=l.type;if(u!==Rs&&Je.convert(u)!==oe.getParameter(oe.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(c===vs||Je.convert(c)===oe.getParameter(oe.IMPLEMENTATION_COLOR_READ_TYPE)||c===Es&&(Ie.get("OES_texture_float")||Ie.get("WEBGL_color_buffer_float"))||c===Ss&&Ie.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");oe.checkFramebufferStatus(oe.FRAMEBUFFER)===oe.FRAMEBUFFER_COMPLETE?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&oe.readPixels(t,n,r,i,Je.convert(u),Je.convert(c),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&oe.bindFramebuffer(oe.FRAMEBUFFER,de)}}},this.copyFramebufferToTexture=function(e,t,n){var r=t.image.width,i=t.image.height,o=Je.convert(t.format);this.setTexture2D(t,0),oe.copyTexImage2D(oe.TEXTURE_2D,n||0,o,e.x,e.y,r,i,0)},this.copyTextureToTexture=function(e,t,n,r){var i=t.image.width,o=t.image.height,a=Je.convert(n.format),s=Je.convert(n.type),l=t.isDataTexture?t.image.data:t.image;this.setTexture2D(n,0),oe.texSubImage2D(oe.TEXTURE_2D,r||0,e.x,e.y,i,o,a,s,l)}}function Tt(e,t){this.name="",this.color=new y(e),this.density=void 0!==t?t:25e-5}function Ct(e,t,n){this.name="",this.color=new y(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function Ot(){x.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Pt(e){G.call(this),this.type="SpriteMaterial",this.color=new y(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(e)}function At(e){x.call(this),this.type="Sprite",this.material=void 0!==e?e:new Pt,this.center=new i(.5,.5)}function Rt(){x.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Lt(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new o)}}function It(){x.call(this),this.type="Bone"}function kt(e,t){K.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new o,this.bindMatrixInverse=new o;var n=this.initBones(),r=new Lt(n);this.bind(r,this.matrixWorld),this.normalizeSkinWeights()}function Nt(e){G.call(this),this.type="LineBasicMaterial",this.color=new y(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(e)}function Dt(e,t,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new jt(e,t);x.call(this),this.type="Line",this.geometry=void 0!==e?e:new F,this.material=void 0!==t?t:new Nt({color:16777215*Math.random()})}function jt(e,t){Dt.call(this,e,t),this.type="LineSegments"}function Ut(e,t){Dt.call(this,e,t),this.type="LineLoop"}function Ft(e){G.call(this),this.type="PointsMaterial",this.color=new y(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(e)}function Bt(e,t){x.call(this),this.type="Points",this.geometry=void 0!==e?e:new F,this.material=void 0!==t?t:new Ft({color:16777215*Math.random()})}function zt(){x.call(this),this.type="Group"}function Ht(e,t,n,r,i,o,a,s,l){u.call(this,e,t,n,r,i,o,a,s,l),this.generateMipmaps=!1}function Vt(e,t,n,r,i,o,a,s,l,c,d,h){u.call(this,null,o,a,s,l,c,r,i,d,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function Gt(e,t,n,r,i,o,a,s,l,c){if((c=void 0!==c?c:Ns)!==Ns&&c!==Ds)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===Ns&&(n=_s),void 0===n&&c===Ds&&(n=Os),u.call(this,null,r,i,o,a,s,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==a?a:ds,this.minFilter=void 0!==s?s:ds,this.flipY=!1,this.generateMipmaps=!1}function Wt(e){F.call(this),this.type="WireframeGeometry";var t,n,r,i,o,a,l,u,c,d,h=[],f=[0,0],p={},m=["a","b","c"];if(e&&e.isGeometry){var g=e.faces;for(t=0,r=g.length;t<r;t++){var v=g[t];for(n=0;n<3;n++)l=v[m[n]],u=v[m[(n+1)%3]],f[0]=Math.min(l,u),f[1]=Math.max(l,u),c=f[0]+","+f[1],void 0===p[c]&&(p[c]={index1:f[0],index2:f[1]})}for(c in p)a=p[c],d=e.vertices[a.index1],h.push(d.x,d.y,d.z),d=e.vertices[a.index2],h.push(d.x,d.y,d.z)}else if(e&&e.isBufferGeometry){var y,b,_,w,x,E,S,M;if(d=new s,null!==e.index){for(y=e.attributes.position,b=e.index,_=e.groups,0===_.length&&(_=[{start:0,count:b.count,materialIndex:0}]),i=0,o=_.length;i<o;++i)for(w=_[i],x=w.start,E=w.count,t=x,r=x+E;t<r;t+=3)for(n=0;n<3;n++)l=b.getX(t+n),u=b.getX(t+(n+1)%3),f[0]=Math.min(l,u),f[1]=Math.max(l,u),c=f[0]+","+f[1],void 0===p[c]&&(p[c]={index1:f[0],index2:f[1]});for(c in p)a=p[c],d.fromBufferAttribute(y,a.index1),h.push(d.x,d.y,d.z),d.fromBufferAttribute(y,a.index2),h.push(d.x,d.y,d.z)}else for(y=e.attributes.position,t=0,r=y.count/3;t<r;t++)for(n=0;n<3;n++)S=3*t+n,d.fromBufferAttribute(y,S),h.push(d.x,d.y,d.z),M=3*t+(n+1)%3,d.fromBufferAttribute(y,M),h.push(d.x,d.y,d.z)}this.addAttribute("position",new N(h,3))}function qt(e,t,n){T.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n},this.fromBufferGeometry(new Xt(e,t,n)),this.mergeVertices()}function Xt(e,t,n){F.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:n};var r,i,o=[],a=[],l=[],u=[],c=new s,d=new s,h=new s,f=new s,p=new s,m=t+1;for(r=0;r<=n;r++){var g=r/n;for(i=0;i<=t;i++){var v=i/t;e(v,g,d),a.push(d.x,d.y,d.z),v-1e-5>=0?(e(v-1e-5,g,h),f.subVectors(d,h)):(e(v+1e-5,g,h),f.subVectors(h,d)),g-1e-5>=0?(e(v,g-1e-5,h),p.subVectors(d,h)):(e(v,g+1e-5,h),p.subVectors(h,d)),c.crossVectors(f,p).normalize(),l.push(c.x,c.y,c.z),u.push(v,g)}}for(r=0;r<n;r++)for(i=0;i<t;i++){var y=r*m+i,b=r*m+i+1,_=(r+1)*m+i+1,w=(r+1)*m+i;o.push(y,b,w),o.push(b,_,w)}this.setIndex(o),this.addAttribute("position",new N(a,3)),this.addAttribute("normal",new N(l,3)),this.addAttribute("uv",new N(u,2))}function Yt(e,t,n,r){T.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r},this.fromBufferGeometry(new Zt(e,t,n,r)),this.mergeVertices()}function Zt(e,t,n,r){function o(e,t,n,r){var i,o,a=Math.pow(2,r),s=[];for(i=0;i<=a;i++){s[i]=[];var u=e.clone().lerp(n,i/a),c=t.clone().lerp(n,i/a),d=a-i;for(o=0;o<=d;o++)s[i][o]=0===o&&i===a?u:u.clone().lerp(c,o/d)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var h=Math.floor(o/2);o%2==0?(l(s[i][h+1]),l(s[i+1][h]),l(s[i][h])):(l(s[i][h+1]),l(s[i+1][h+1]),l(s[i+1][h]))}}function a(){for(var e=0;e<m.length;e+=6){var t=m[e+0],n=m[e+2],r=m[e+4],i=Math.max(t,n,r),o=Math.min(t,n,r);i>.9&&o<.1&&(t<.2&&(m[e+0]+=1),n<.2&&(m[e+2]+=1),r<.2&&(m[e+4]+=1))}}function l(e){p.push(e.x,e.y,e.z)}function u(t,n){var r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function c(){for(var e=new s,t=new s,n=new s,r=new s,o=new i,a=new i,l=new i,u=0,c=0;u<p.length;u+=9,c+=6){e.set(p[u+0],p[u+1],p[u+2]),t.set(p[u+3],p[u+4],p[u+5]),n.set(p[u+6],p[u+7],p[u+8]),o.set(m[c+0],m[c+1]),a.set(m[c+2],m[c+3]),l.set(m[c+4],m[c+5]),r.copy(e).add(t).add(n).divideScalar(3);var f=h(r);d(o,c+0,e,f),d(a,c+2,t,f),d(l,c+4,n,f)}}function d(e,t,n,r){r<0&&1===e.x&&(m[t]=e.x-1),0===n.x&&0===n.z&&(m[t]=r/2/Math.PI+.5)}function h(e){return Math.atan2(e.z,-e.x)}function f(e){return Math.atan2(-e.y,Math.sqrt(e.x*e.x+e.z*e.z))}F.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r},n=n||1,r=r||0;var p=[],m=[];!function(e){for(var n=new s,r=new s,i=new s,a=0;a<t.length;a+=3)u(t[a+0],n),u(t[a+1],r),u(t[a+2],i),o(n,r,i,e)}(r),function(e){for(var t=new s,n=0;n<p.length;n+=3)t.x=p[n+0],t.y=p[n+1],t.z=p[n+2],t.normalize().multiplyScalar(e),p[n+0]=t.x,p[n+1]=t.y,p[n+2]=t.z}(n),function(){for(var e=new s,t=0;t<p.length;t+=3){e.x=p[t+0],e.y=p[t+1],e.z=p[t+2];var n=h(e)/2/Math.PI+.5,r=f(e)/Math.PI+.5;m.push(n,1-r)}c(),a()}(),this.addAttribute("position",new N(p,3)),this.addAttribute("normal",new N(p.slice(),3)),this.addAttribute("uv",new N(m,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function Kt(e,t){T.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Jt(e,t)),this.mergeVertices()}function Jt(e,t){var n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];Zt.call(this,n,r,e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Qt(e,t){T.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new $t(e,t)),this.mergeVertices()}function $t(e,t){var n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];Zt.call(this,n,r,e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function en(e,t){T.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new tn(e,t)),this.mergeVertices()}function tn(e,t){var n=(1+Math.sqrt(5))/2,r=[-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],i=[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];Zt.call(this,r,i,e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function nn(e,t){T.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new rn(e,t)),this.mergeVertices()}function rn(e,t){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-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,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],o=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];Zt.call(this,i,o,e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function on(e,t,n,r,i,o){T.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new an(e,t,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function an(e,t,n,r,o){function a(i){g=e.getPointAt(i/t,g);var o=c.normals[i],a=c.binormals[i];for(h=0;h<=r;h++){var s=h/r*Math.PI*2,l=Math.sin(s),u=-Math.cos(s);p.x=u*o.x+l*a.x,p.y=u*o.y+l*a.y,p.z=u*o.z+l*a.z,p.normalize(),y.push(p.x,p.y,p.z),f.x=g.x+n*p.x,f.y=g.y+n*p.y,f.z=g.z+n*p.z,v.push(f.x,f.y,f.z)}}function l(){for(h=1;h<=t;h++)for(d=1;d<=r;d++){var e=(r+1)*(h-1)+(d-1),n=(r+1)*h+(d-1),i=(r+1)*h+d,o=(r+1)*(h-1)+d;_.push(e,n,o),_.push(n,i,o)}}function u(){for(d=0;d<=t;d++)for(h=0;h<=r;h++)m.x=d/t,m.y=h/r,b.push(m.x,m.y)}F.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:o},t=t||64,n=n||1,r=r||8,o=o||!1;var c=e.computeFrenetFrames(t,o);this.tangents=c.tangents,this.normals=c.normals,this.binormals=c.binormals;var d,h,f=new s,p=new s,m=new i,g=new s,v=[],y=[],b=[],_=[];!function(){for(d=0;d<t;d++)a(d);a(!1===o?t:0),u(),l()}(),this.setIndex(_),this.addAttribute("position",new N(v,3)),this.addAttribute("normal",new N(y,3)),this.addAttribute("uv",new N(b,2))}function sn(e,t,n,r,i,o,a){T.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},void 0!==a&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new ln(e,t,n,r,i,o)),this.mergeVertices()}function ln(e,t,n,r,i,o){function a(e,t,n,r,i){var o=Math.cos(e),a=Math.sin(e),s=n/t*e,l=Math.cos(s);i.x=r*(2+l)*.5*o,i.y=r*(2+l)*a*.5,i.z=r*Math.sin(s)*.5}F.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:o},e=e||1,t=t||.4,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var l,u,c=[],d=[],h=[],f=[],p=new s,m=new s,g=new s,v=new s,y=new s,b=new s,_=new s;for(l=0;l<=n;++l){var w=l/n*i*Math.PI*2;for(a(w,i,o,e,g),a(w+.01,i,o,e,v),b.subVectors(v,g),_.addVectors(v,g),y.crossVectors(b,_),_.crossVectors(y,b),y.normalize(),_.normalize(),u=0;u<=r;++u){var x=u/r*Math.PI*2,E=-t*Math.cos(x),S=t*Math.sin(x);p.x=g.x+(E*_.x+S*y.x),p.y=g.y+(E*_.y+S*y.y),p.z=g.z+(E*_.z+S*y.z),d.push(p.x,p.y,p.z),m.subVectors(p,g).normalize(),h.push(m.x,m.y,m.z),f.push(l/n),f.push(u/r)}}for(u=1;u<=n;u++)for(l=1;l<=r;l++){var M=(r+1)*(u-1)+(l-1),T=(r+1)*u+(l-1),C=(r+1)*u+l,O=(r+1)*(u-1)+l;c.push(M,T,O),c.push(T,C,O)}this.setIndex(c),this.addAttribute("position",new N(d,3)),this.addAttribute("normal",new N(h,3)),this.addAttribute("uv",new N(f,2))}function un(e,t,n,r,i){T.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new cn(e,t,n,r,i)),this.mergeVertices()}function cn(e,t,n,r,i){F.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},e=e||1,t=t||.4,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,l=[],u=[],c=[],d=[],h=new s,f=new s,p=new s;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var m=a/r*i,g=o/n*Math.PI*2;f.x=(e+t*Math.cos(g))*Math.cos(m),f.y=(e+t*Math.cos(g))*Math.sin(m),f.z=t*Math.sin(g),u.push(f.x,f.y,f.z),h.x=e*Math.cos(m),h.y=e*Math.sin(m),p.subVectors(f,h).normalize(),c.push(p.x,p.y,p.z),d.push(a/r),d.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var v=(r+1)*o+a-1,y=(r+1)*(o-1)+a-1,b=(r+1)*(o-1)+a,_=(r+1)*o+a;l.push(v,y,_),l.push(y,b,_)}this.setIndex(l),this.addAttribute("position",new N(u,3)),this.addAttribute("normal",new N(c,3)),this.addAttribute("uv",new N(d,2))}function dn(e,t,n,r,i){var o,a;if(i===Un(e,t,n,r)>0)for(o=t;o<n;o+=r)a=Nn(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=Nn(o,e[o],e[o+1],a);return a&&Pn(a,a.next)&&(Dn(a),a=a.next),a}function hn(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Pn(r,r.next)&&0!==On(r.prev,r,r.next))r=r.next;else{if(Dn(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function fn(e,t,n,r,i,o,a){if(e){!a&&o&&xn(e,r,i,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?mn(e,r,i,o):pn(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),Dn(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?(e=gn(e,t,n),fn(e,t,n,r,i,o,2)):2===a&&vn(e,t,n,r,i,o):fn(hn(e),t,n,r,i,o,1);break}}}function pn(e){var t=e.prev,n=e,r=e.next;if(On(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Tn(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&On(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function mn(e,t,n,r){var i=e.prev,o=e,a=e.next;if(On(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=Sn(s,l,t,n,r),h=Sn(u,c,t,n,r),f=e.nextZ;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&Tn(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&On(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(f=e.prevZ;f&&f.z>=d;){if(f!==e.prev&&f!==e.next&&Tn(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&On(f.prev,f,f.next)>=0)return!1;f=f.prevZ}return!0}function gn(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Pn(i,o)&&An(i,r,r.next,o)&&Ln(i,o)&&Ln(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Dn(r),Dn(r.next),r=e=o),r=r.next}while(r!==e);return r}function vn(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Cn(a,s)){var l=kn(a,s);return a=hn(a,a.next),l=hn(l,l.next),fn(a,t,n,r,i,o),void fn(l,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function yn(e,t,n,r){var i,o,a,s,l,u=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,s=i<o-1?t[i+1]*r:e.length,l=dn(e,a,s,r,!1),l===l.next&&(l.steiner=!0),u.push(Mn(l));for(u.sort(bn),i=0;i<u.length;i++)_n(u[i],n),n=hn(n,n.next);return n}function bn(e,t){return e.x-t.x}function _n(e,t){if(t=wn(e,t)){var n=kn(t,e);hn(n,n.next)}}function wn(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n.prev;var l,u=n,c=n.x,d=n.y,h=1/0;for(r=n.next;r!==u;)i>=r.x&&r.x>=c&&i!==r.x&&Tn(o<d?i:a,o,c,d,o<d?a:i,o,r.x,r.y)&&((l=Math.abs(o-r.y)/(i-r.x))<h||l===h&&r.x>n.x)&&Ln(r,e)&&(n=r,h=l),r=r.next;return n}function xn(e,t,n,r){var i=e;do{null===i.z&&(i.z=Sn(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,En(i)}function En(e){var t,n,r,i,o,a,s,l,u=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<u&&(s++,r=r.nextZ);t++);for(l=u;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1);return e}function Sn(e,t,n,r,i){return e=32767*(e-n)*i,t=32767*(t-r)*i,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1}function Mn(e){var t=e,n=e;do{t.x<n.x&&(n=t),t=t.next}while(t!==e);return n}function Tn(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function Cn(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Rn(e,t)&&Ln(e,t)&&Ln(t,e)&&In(e,t)}function On(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Pn(e,t){return e.x===t.x&&e.y===t.y}function An(e,t,n,r){return!!(Pn(e,t)&&Pn(n,r)||Pn(e,r)&&Pn(n,t))||On(e,t,n)>0!=On(e,t,r)>0&&On(n,r,e)>0!=On(n,r,t)>0}function Rn(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&An(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Ln(e,t){return On(e.prev,e,e.next)<0?On(e,t,e.next)>=0&&On(e,e.prev,t)>=0:On(e,t,e.prev)<0||On(e,e.next,t)<0}function In(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}function kn(e,t){var n=new jn(e.i,e.x,e.y),r=new jn(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Nn(e,t,n,r){var i=new jn(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Dn(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function jn(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Un(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}function Fn(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Bn(e,t){for(var n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}function zn(e,t){T.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new Hn(e,t)),this.mergeVertices()}function Hn(e,t){F.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];for(var n=this,r=[],o=[],a=0,l=e.length;a<l;a++){var u=e[a];!function(e){function a(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}function l(e,t,n){var r,o,a,s=e.x-t.x,l=e.y-t.y,u=n.x-e.x,c=n.y-e.y,d=s*s+l*l,h=s*c-l*u;if(Math.abs(h)>Number.EPSILON){var f=Math.sqrt(d),p=Math.sqrt(u*u+c*c),m=t.x-l/f,g=t.y+s/f,v=n.x-c/p,y=n.y+u/p,b=((v-m)*c-(y-g)*u)/(s*c-l*u);r=m+s*b-e.x,o=g+l*b-e.y;var _=r*r+o*o;if(_<=2)return new i(r,o);a=Math.sqrt(_/2)}else{var w=!1;s>Number.EPSILON?u>Number.EPSILON&&(w=!0):s<-Number.EPSILON?u<-Number.EPSILON&&(w=!0):Math.sign(l)===Math.sign(c)&&(w=!0),w?(r=-l,o=s,a=Math.sqrt(d)):(r=s,o=l,a=Math.sqrt(d/2))}return new i(r/a,o/a)}function u(e,t){var n,r;for(Y=e.length;--Y>=0;){n=Y,(r=Y-1)<0&&(r=e.length-1);var i=0,o=x+2*C;for(i=0;i<o;i++){var a=W*i,s=W*(i+1);h(t+n+a,t+r+a,t+r+s,t+n+s)}}}function c(e,t,n){_.push(e),_.push(t),_.push(n)}function d(e,t,i){f(e),f(t),f(i);var o=r.length/3,a=P.generateTopUV(n,r,o-3,o-2,o-1);p(a[0]),p(a[1]),p(a[2])}function h(e,t,i,o){f(e),f(t),f(o),f(t),f(i),f(o);var a=r.length/3,s=P.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);p(s[0]),p(s[1]),p(s[3]),p(s[1]),p(s[2]),p(s[3])}function f(e){r.push(_[3*e+0]),r.push(_[3*e+1]),r.push(_[3*e+2])}function p(e){o.push(e.x),o.push(e.y)}var m,g,v,y,b,_=[],w=void 0!==t.curveSegments?t.curveSegments:12,x=void 0!==t.steps?t.steps:1,E=void 0!==t.amount?t.amount:100,S=void 0===t.bevelEnabled||t.bevelEnabled,M=void 0!==t.bevelThickness?t.bevelThickness:6,T=void 0!==t.bevelSize?t.bevelSize:M-2,C=void 0!==t.bevelSegments?t.bevelSegments:3,O=t.extrudePath,P=void 0!==t.UVGenerator?t.UVGenerator:Kl,A=!1;O&&(m=O.getSpacedPoints(x),A=!0,S=!1,g=O.computeFrenetFrames(x,!1),v=new s,y=new s,b=new s),S||(C=0,M=0,T=0);var R,L,I,k=e.extractPoints(w),N=k.shape,D=k.holes;if(!Zl.isClockWise(N))for(N=N.reverse(),L=0,I=D.length;L<I;L++)R=D[L],Zl.isClockWise(R)&&(D[L]=R.reverse());var j=Zl.triangulateShape(N,D),U=N;for(L=0,I=D.length;L<I;L++)R=D[L],N=N.concat(R);for(var F,B,z,H,V,G,W=N.length,q=j.length,X=[],Y=0,Z=U.length,K=Z-1,J=Y+1;Y<Z;Y++,K++,J++)K===Z&&(K=0),J===Z&&(J=0),X[Y]=l(U[Y],U[K],U[J]);var Q,$=[],ee=X.concat();for(L=0,I=D.length;L<I;L++){for(R=D[L],Q=[],Y=0,Z=R.length,K=Z-1,J=Y+1;Y<Z;Y++,K++,J++)K===Z&&(K=0),J===Z&&(J=0),Q[Y]=l(R[Y],R[K],R[J]);$.push(Q),ee=ee.concat(Q)}for(F=0;F<C;F++){for(z=F/C,H=M*Math.cos(z*Math.PI/2),B=T*Math.sin(z*Math.PI/2),Y=0,Z=U.length;Y<Z;Y++)V=a(U[Y],X[Y],B),c(V.x,V.y,-H);for(L=0,I=D.length;L<I;L++)for(R=D[L],Q=$[L],Y=0,Z=R.length;Y<Z;Y++)V=a(R[Y],Q[Y],B),c(V.x,V.y,-H)}for(B=T,Y=0;Y<W;Y++)V=S?a(N[Y],ee[Y],B):N[Y],A?(y.copy(g.normals[0]).multiplyScalar(V.x),v.copy(g.binormals[0]).multiplyScalar(V.y),b.copy(m[0]).add(y).add(v),c(b.x,b.y,b.z)):c(V.x,V.y,0);var te;for(te=1;te<=x;te++)for(Y=0;Y<W;Y++)V=S?a(N[Y],ee[Y],B):N[Y],A?(y.copy(g.normals[te]).multiplyScalar(V.x),v.copy(g.binormals[te]).multiplyScalar(V.y),b.copy(m[te]).add(y).add(v),c(b.x,b.y,b.z)):c(V.x,V.y,E/x*te);for(F=C-1;F>=0;F--){for(z=F/C,H=M*Math.cos(z*Math.PI/2),B=T*Math.sin(z*Math.PI/2),Y=0,Z=U.length;Y<Z;Y++)V=a(U[Y],X[Y],B),c(V.x,V.y,E+H);for(L=0,I=D.length;L<I;L++)for(R=D[L],Q=$[L],Y=0,Z=R.length;Y<Z;Y++)V=a(R[Y],Q[Y],B),A?c(V.x,V.y+m[x-1].y,m[x-1].x+H):c(V.x,V.y,E+H)}!function(){var e=r.length/3;if(S){var t=0,i=W*t;for(Y=0;Y<q;Y++)G=j[Y],d(G[2]+i,G[1]+i,G[0]+i);for(t=x+2*C,i=W*t,Y=0;Y<q;Y++)G=j[Y],d(G[0]+i,G[1]+i,G[2]+i)}else{for(Y=0;Y<q;Y++)G=j[Y],d(G[2],G[1],G[0]);for(Y=0;Y<q;Y++)G=j[Y],d(G[0]+W*x,G[1]+W*x,G[2]+W*x)}n.addGroup(e,r.length/3-e,0)}(),function(){var e=r.length/3,t=0;for(u(U,t),t+=U.length,L=0,I=D.length;L<I;L++)R=D[L],u(R,t),t+=R.length;n.addGroup(e,r.length/3-e,1)}()}(u)}this.addAttribute("position",new N(r,3)),this.addAttribute("uv",new N(o,2)),this.computeVertexNormals()}function Vn(e,t){T.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new Gn(e,t)),this.mergeVertices()}function Gn(e,t){t=t||{};var n=t.font;if(!n||!n.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new T;var r=n.generateShapes(e,t.size,t.curveSegments);t.amount=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),Hn.call(this,r,t),this.type="TextBufferGeometry"}function Wn(e,t,n,r,i,o,a){T.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new qn(e,t,n,r,i,o,a)),this.mergeVertices()}function qn(e,t,n,r,i,o,a){F.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},e=e||1,t=Math.max(3,Math.floor(t)||8),n=Math.max(2,Math.floor(n)||6),r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI,o=void 0!==o?o:0,a=void 0!==a?a:Math.PI;var l,u,c=o+a,d=0,h=[],f=new s,p=new s,m=[],g=[],v=[],y=[];for(u=0;u<=n;u++){var b=[],_=u/n;for(l=0;l<=t;l++){var w=l/t;f.x=-e*Math.cos(r+w*i)*Math.sin(o+_*a),f.y=e*Math.cos(o+_*a),f.z=e*Math.sin(r+w*i)*Math.sin(o+_*a),g.push(f.x,f.y,f.z),p.set(f.x,f.y,f.z).normalize(),v.push(p.x,p.y,p.z),y.push(w,1-_),b.push(d++)}h.push(b)}for(u=0;u<n;u++)for(l=0;l<t;l++){var x=h[u][l+1],E=h[u][l],S=h[u+1][l],M=h[u+1][l+1];(0!==u||o>0)&&m.push(x,E,M),(u!==n-1||c<Math.PI)&&m.push(E,S,M)}this.setIndex(m),this.addAttribute("position",new N(g,3)),this.addAttribute("normal",new N(v,3)),this.addAttribute("uv",new N(y,2))}function Xn(e,t,n,r,i,o){T.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new Yn(e,t,n,r,i,o)),this.mergeVertices()}function Yn(e,t,n,r,o,a){F.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:o,thetaLength:a},e=e||.5,t=t||1,o=void 0!==o?o:0,a=void 0!==a?a:2*Math.PI,n=void 0!==n?Math.max(3,n):8,r=void 0!==r?Math.max(1,r):1;var l,u,c,d=[],h=[],f=[],p=[],m=e,g=(t-e)/r,v=new s,y=new i;for(u=0;u<=r;u++){for(c=0;c<=n;c++)l=o+c/n*a,v.x=m*Math.cos(l),v.y=m*Math.sin(l),h.push(v.x,v.y,v.z),f.push(0,0,1),y.x=(v.x/t+1)/2,y.y=(v.y/t+1)/2,p.push(y.x,y.y);m+=g}for(u=0;u<r;u++){var b=u*(n+1);for(c=0;c<n;c++){l=c+b;var _=l,w=l+n+1,x=l+n+2,E=l+1;d.push(_,w,E),d.push(w,x,E)}}this.setIndex(d),this.addAttribute("position",new N(h,3)),this.addAttribute("normal",new N(f,3)),this.addAttribute("uv",new N(p,2))}function Zn(e,t,n,r){T.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},this.fromBufferGeometry(new Kn(e,t,n,r)),this.mergeVertices()}function Kn(e,t,n,r){F.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t)||12,n=n||0,r=r||2*Math.PI,r=Ol.clamp(r,0,2*Math.PI);var o,a,l,u=[],c=[],d=[],h=1/t,f=new s,p=new i;for(a=0;a<=t;a++){var m=n+a*h*r,g=Math.sin(m),v=Math.cos(m);for(l=0;l<=e.length-1;l++)f.x=e[l].x*g,f.y=e[l].y,f.z=e[l].x*v,c.push(f.x,f.y,f.z),p.x=a/t,p.y=l/(e.length-1),d.push(p.x,p.y)}for(a=0;a<t;a++)for(l=0;l<e.length-1;l++){o=l+a*e.length;var y=o,b=o+e.length,_=o+e.length+1,w=o+1;u.push(y,b,w),u.push(b,_,w)}if(this.setIndex(u),this.addAttribute("position",new N(c,3)),this.addAttribute("uv",new N(d,2)),this.computeVertexNormals(),r===2*Math.PI){var x=this.attributes.normal.array,E=new s,S=new s,M=new s;for(o=t*e.length*3,a=0,l=0;a<e.length;a++,l+=3)E.x=x[l+0],E.y=x[l+1],E.z=x[l+2],S.x=x[o+l+0],S.y=x[o+l+1],S.z=x[o+l+2],M.addVectors(E,S).normalize(),x[l+0]=x[o+l+0]=M.x,x[l+1]=x[o+l+1]=M.y,x[l+2]=x[o+l+2]=M.z}}function Jn(e,t){T.call(this),this.type="ShapeGeometry","object"==typeof t&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new Qn(e,t)),this.mergeVertices()}function Qn(e,t){function n(e){var n,s,u,c=i.length/3,d=e.extractPoints(t),h=d.shape,f=d.holes;if(!1===Zl.isClockWise(h))for(h=h.reverse(),n=0,s=f.length;n<s;n++)u=f[n],!0===Zl.isClockWise(u)&&(f[n]=u.reverse());var p=Zl.triangulateShape(h,f);for(n=0,s=f.length;n<s;n++)u=f[n],h=h.concat(u);for(n=0,s=h.length;n<s;n++){var m=h[n];i.push(m.x,m.y,0),o.push(0,0,1),a.push(m.x,m.y)}for(n=0,s=p.length;n<s;n++){var g=p[n],v=g[0]+c,y=g[1]+c,b=g[2]+c;r.push(v,y,b),l+=3}}F.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:t},t=t||12;var r=[],i=[],o=[],a=[],s=0,l=0;if(!1===Array.isArray(e))n(e);else for(var u=0;u<e.length;u++)n(e[u]),this.addGroup(s,l,u),s+=l,l=0;this.setIndex(r),this.addAttribute("position",new N(i,3)),this.addAttribute("normal",new N(o,3)),this.addAttribute("uv",new N(a,2))}function $n(e,t){if(t.shapes=[],Array.isArray(e))for(var n=0,r=e.length;n<r;n++){var i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}function er(e,t){F.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1;var n,r,i,o,a=[],s=Math.cos(Ol.DEG2RAD*t),l=[0,0],u={},c=["a","b","c"];e.isBufferGeometry?(o=new T,o.fromBufferGeometry(e)):o=e.clone(),o.mergeVertices(),o.computeFaceNormals();for(var d=o.vertices,h=o.faces,f=0,p=h.length;f<p;f++)for(var m=h[f],g=0;g<3;g++)n=m[c[g]],r=m[c[(g+1)%3]],l[0]=Math.min(n,r),l[1]=Math.max(n,r),i=l[0]+","+l[1],void 0===u[i]?u[i]={index1:l[0],index2:l[1],face1:f,face2:void 0}:u[i].face2=f;for(i in u){var v=u[i];if(void 0===v.face2||h[v.face1].normal.dot(h[v.face2].normal)<=s){var y=d[v.index1];a.push(y.x,y.y,y.z),y=d[v.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new N(a,3))}function tr(e,t,n,r,i,o,a,s){T.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new nr(e,t,n,r,i,o,a,s)),this.mergeVertices()}function nr(e,t,n,r,o,a,l,u){function c(n){var o,a,c,v=new i,_=new s,w=0,x=!0===n?e:t,E=!0===n?1:-1;for(a=g,o=1;o<=r;o++)f.push(0,y*E,0),p.push(0,E,0),m.push(.5,.5),g++;for(c=g,o=0;o<=r;o++){var S=o/r,M=S*u+l,T=Math.cos(M),C=Math.sin(M);_.x=x*C,_.y=y*E,_.z=x*T,f.push(_.x,_.y,_.z),p.push(0,E,0),v.x=.5*T+.5,v.y=.5*C*E+.5,m.push(v.x,v.y),g++}for(o=0;o<r;o++){var O=a+o,P=c+o;!0===n?h.push(P,P+1,O):h.push(P+1,P,O),w+=3}d.addGroup(b,w,!0===n?1:2),b+=w}F.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:o,openEnded:a,thetaStart:l,thetaLength:u};var d=this;e=void 0!==e?e:1,t=void 0!==t?t:1,n=n||1,r=Math.floor(r)||8,o=Math.floor(o)||1,a=void 0!==a&&a,l=void 0!==l?l:0,u=void 0!==u?u:2*Math.PI;var h=[],f=[],p=[],m=[],g=0,v=[],y=n/2,b=0;!function(){var i,a,c=new s,_=new s,w=0,x=(t-e)/n;for(a=0;a<=o;a++){var E=[],S=a/o,M=S*(t-e)+e;for(i=0;i<=r;i++){var T=i/r,C=T*u+l,O=Math.sin(C),P=Math.cos(C);_.x=M*O,_.y=-S*n+y,_.z=M*P,f.push(_.x,_.y,_.z),c.set(O,x,P).normalize(),p.push(c.x,c.y,c.z),m.push(T,1-S),E.push(g++)}v.push(E)}for(i=0;i<r;i++)for(a=0;a<o;a++){var A=v[a][i],R=v[a+1][i],L=v[a+1][i+1],I=v[a][i+1];h.push(A,R,I),h.push(R,L,I),w+=6}d.addGroup(b,w,0),b+=w}(),!1===a&&(e>0&&c(!0),t>0&&c(!1)),this.setIndex(h),this.addAttribute("position",new N(f,3)),this.addAttribute("normal",new N(p,3)),this.addAttribute("uv",new N(m,2))}function rr(e,t,n,r,i,o,a){tr.call(this,0,e,t,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function ir(e,t,n,r,i,o,a){nr.call(this,0,e,t,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function or(e,t,n,r){T.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new ar(e,t,n,r)),this.mergeVertices()}function ar(e,t,n,r){F.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},e=e||1,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var o,a,l=[],u=[],c=[],d=[],h=new s,f=new i;for(u.push(0,0,0),c.push(0,0,1),d.push(.5,.5),a=0,o=3;a<=t;a++,o+=3){var p=n+a/t*r;h.x=e*Math.cos(p),h.y=e*Math.sin(p),u.push(h.x,h.y,h.z),c.push(0,0,1),f.x=(u[o]/e+1)/2,f.y=(u[o+1]/e+1)/2,d.push(f.x,f.y)}for(o=1;o<=t;o++)l.push(o,o+1,0);this.setIndex(l),this.addAttribute("position",new N(u,3)),this.addAttribute("normal",new N(c,3)),this.addAttribute("uv",new N(d,2))}function sr(e){G.call(this),this.type="ShadowMaterial",this.color=new y(0),this.transparent=!0,this.setValues(e)}function lr(e){q.call(this,e),this.type="RawShaderMaterial"}function ur(e){G.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new y(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new y(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function cr(e){ur.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(e)}function dr(e){G.call(this),this.type="MeshPhongMaterial",this.color=new y(16777215),this.specular=new y(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new y(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=qa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function hr(e){dr.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function fr(e){G.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function pr(e){G.call(this),this.type="MeshLambertMaterial",this.color=new y(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new y(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=qa,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function mr(e){Nt.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}function gr(e,t,n){var r=this,i=!1,o=0,a=0,s=void 0;this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){a++,!1===i&&void 0!==r.onStart&&r.onStart(e,o,a),i=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this}}function vr(e){this.manager=void 0!==e?e:eu}function yr(e){this.manager=void 0!==e?e:eu,this._parser=null}function br(e){this.manager=void 0!==e?e:eu,this._parser=null}function _r(e){this.manager=void 0!==e?e:eu}function wr(e){this.manager=void 0!==e?e:eu}function xr(e){this.manager=void 0!==e?e:eu}function Er(){this.type="Curve",this.arcLengthDivisions=200}function Sr(e,t,n,r,i,o,a,s){Er.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=n||1,this.yRadius=r||1,this.aStartAngle=i||0,this.aEndAngle=o||2*Math.PI,this.aClockwise=a||!1,this.aRotation=s||0}function Mr(e,t,n,r,i,o){Sr.call(this,e,t,n,n,r,i,o),this.type="ArcCurve"}function Tr(){function e(e,o,a,s){t=e,n=a,r=-3*e+3*o-2*a-s,i=2*e-2*o+a+s}var t=0,n=0,r=0,i=0;return{initCatmullRom:function(t,n,r,i,o){e(n,r,o*(r-t),o*(i-n))},initNonuniformCatmullRom:function(t,n,r,i,o,a,s){var l=(n-t)/o-(r-t)/(o+a)+(r-n)/a,u=(r-n)/a-(i-n)/(a+s)+(i-r)/s;l*=a,u*=a,e(n,r,l,u)},calc:function(e){var o=e*e;return t+n*e+r*o+i*(o*e)}}}function Cr(e,t,n,r){Er.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=n||"centripetal",this.tension=r||.5}function Or(e,t,n,r,i){var o=.5*(r-t),a=.5*(i-n),s=e*e;return(2*n-2*r+o+a)*(e*s)+(-3*n+3*r-2*o-a)*s+o*e+n}function Pr(e,t){var n=1-e;return n*n*t}function Ar(e,t){return 2*(1-e)*e*t}function Rr(e,t){return e*e*t}function Lr(e,t,n,r){return Pr(e,t)+Ar(e,n)+Rr(e,r)}function Ir(e,t){var n=1-e;return n*n*n*t}function kr(e,t){var n=1-e;return 3*n*n*e*t}function Nr(e,t){return 3*(1-e)*e*e*t}function Dr(e,t){return e*e*e*t}function jr(e,t,n,r,i){return Ir(e,t)+kr(e,n)+Nr(e,r)+Dr(e,i)}function Ur(e,t,n,r){Er.call(this),this.type="CubicBezierCurve",this.v0=e||new i,this.v1=t||new i,this.v2=n||new i,this.v3=r||new i}function Fr(e,t,n,r){Er.call(this),this.type="CubicBezierCurve3",this.v0=e||new s,this.v1=t||new s,this.v2=n||new s,this.v3=r||new s}function Br(e,t){Er.call(this),this.type="LineCurve",this.v1=e||new i,this.v2=t||new i}function zr(e,t){Er.call(this),this.type="LineCurve3",this.v1=e||new s,this.v2=t||new s}function Hr(e,t,n){Er.call(this),this.type="QuadraticBezierCurve",this.v0=e||new i,this.v1=t||new i,this.v2=n||new i}function Vr(e,t,n){Er.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new s,this.v1=t||new s,this.v2=n||new s}function Gr(e){Er.call(this),this.type="SplineCurve",this.points=e||[]}function Wr(){Er.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function qr(e){Wr.call(this),this.type="Path",this.currentPoint=new i,e&&this.setFromPoints(e)}function Xr(e){qr.call(this,e),this.uuid=Ol.generateUUID(),this.type="Shape",this.holes=[]}function Yr(e,t){x.call(this),this.type="Light",this.color=new y(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function Zr(e,t,n){Yr.call(this,e,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(x.DefaultUp),this.updateMatrix(),this.groundColor=new y(t)}function Kr(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new i(512,512),this.map=null,this.matrix=new o}function Jr(){Kr.call(this,new xt(50,1,.5,500))}function Qr(e,t,n,r,i,o){Yr.call(this,e,t),this.type="SpotLight",this.position.copy(x.DefaultUp),this.updateMatrix(),this.target=new x,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==n?n:0,this.angle=void 0!==r?r:Math.PI/3,this.penumbra=void 0!==i?i:0,this.decay=void 0!==o?o:1,this.shadow=new Jr}function $r(e,t,n,r){Yr.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new Kr(new xt(90,1,.5,500))}function ei(){Kr.call(this,new S(-5,5,5,-5,.5,500))}function ti(e,t){Yr.call(this,e,t),this.type="DirectionalLight",this.position.copy(x.DefaultUp),this.updateMatrix(),this.target=new x,this.shadow=new ei}function ni(e,t){Yr.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function ri(e,t,n,r){Yr.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function ii(e,t,n,r){pi.call(this,e,t,n,r)}function oi(e,t,n){pi.call(this,e,t,n)}function ai(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function si(e,t,n,r){ai.call(this,e,t,n,r)}function li(e,t,n,r){pi.call(this,e,t,n,r)}function ui(e,t,n,r){pi.call(this,e,t,n,r)}function ci(e,t,n,r){pi.call(this,e,t,n,r)}function di(e,t,n,r){ai.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function hi(e,t,n,r){ai.call(this,e,t,n,r)}function fi(e,t,n,r){ai.call(this,e,t,n,r)}function pi(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=su.convertArray(t,this.TimeBufferType),this.values=su.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function mi(e,t,n,r){pi.call(this,e,t,n,r)}function gi(e,t,n){this.name=e,this.tracks=n,this.duration=void 0!==t?t:-1,this.uuid=Ol.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function vi(e){this.manager=void 0!==e?e:eu,this.textures={}}function yi(e){this.manager=void 0!==e?e:eu}function bi(){}function _i(e){"boolean"==typeof e&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:eu,this.withCredentials=!1}function wi(e){this.manager=void 0!==e?e:eu,this.texturePath=""}function xi(e){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==e?e:eu,this.options=void 0}function Ei(){this.type="ShapePath",this.color=new y,this.subPaths=[],this.currentPath=null}function Si(e){this.type="Font",this.data=e}function Mi(e,t,n,r){for(var i=String(e).split(""),o=t/r.resolution,a=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*o,s=[],l=0,u=0,c=0;c<i.length;c++){var d=i[c];if("\n"===d)l=0,u-=a;else{var h=Ti(d,n,o,l,u,r);l+=h.offsetX,s.push(h.path)}}return s}function Ti(e,t,n,r,i,o){var a=o.glyphs[e]||o.glyphs["?"];if(a){var s,l,u,c,d,h,f,p,m=new Ei;if(a.o)for(var g=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),v=0,y=g.length;v<y;){var b=g[v++];switch(b){case"m":s=g[v++]*n+r,l=g[v++]*n+i,m.moveTo(s,l);break;case"l":s=g[v++]*n+r,l=g[v++]*n+i,m.lineTo(s,l);break;case"q":u=g[v++]*n+r,c=g[v++]*n+i,d=g[v++]*n+r,h=g[v++]*n+i,m.quadraticCurveTo(d,h,u,c);break;case"b":u=g[v++]*n+r,c=g[v++]*n+i,d=g[v++]*n+r,h=g[v++]*n+i,f=g[v++]*n+r,p=g[v++]*n+i,m.bezierCurveTo(d,h,f,p,u,c)}}return{offsetX:a.ha*n,path:m}}}function Ci(e){this.manager=void 0!==e?e:eu}function Oi(e){this.manager=void 0!==e?e:eu}function Pi(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new xt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new xt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Ai(e,t,n){x.call(this),this.type="CubeCamera";var r=new xt(90,1,e,t);r.up.set(0,-1,0),r.lookAt(new s(1,0,0)),this.add(r);var i=new xt(90,1,e,t);i.up.set(0,-1,0),i.lookAt(new s(-1,0,0)),this.add(i);var o=new xt(90,1,e,t);o.up.set(0,0,1),o.lookAt(new s(0,1,0)),this.add(o);var a=new xt(90,1,e,t);a.up.set(0,0,-1),a.lookAt(new s(0,-1,0)),this.add(a);var l=new xt(90,1,e,t);l.up.set(0,-1,0),l.lookAt(new s(0,0,1)),this.add(l);var u=new xt(90,1,e,t);u.up.set(0,-1,0),u.lookAt(new s(0,0,-1)),this.add(u);var c={format:As,magFilter:ps,minFilter:ps};this.renderTarget=new h(n,n,c),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,s=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,e.render(t,r,n),n.activeCubeFace=1,e.render(t,i,n),n.activeCubeFace=2,e.render(t,o,n),n.activeCubeFace=3,e.render(t,a,n),n.activeCubeFace=4,e.render(t,l,n),n.texture.generateMipmaps=s,n.activeCubeFace=5,e.render(t,u,n),e.setRenderTarget(null)},this.clear=function(e,t,n,r){for(var i=this.renderTarget,o=0;o<6;o++)i.activeCubeFace=o,e.setRenderTarget(i),e.clear(t,n,r);e.setRenderTarget(null)}}function Ri(){x.call(this),this.type="AudioListener",this.context=pu.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Li(e){x.call(this),this.type="Audio",this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function Ii(e){Li.call(this,e),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function ki(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}function Ni(e,t,n){this.binding=e,this.valueSize=n;var r,i=Float64Array;switch(t){case"quaternion":r=this._slerp;break;case"string":case"bool":i=Array,r=this._select;break;default:r=this._lerp}this.buffer=new i(4*n),this._mixBufferRegion=r,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}function Di(e,t,n){var r=n||ji.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function ji(e,t,n){this.path=t,this.parsedPath=n||ji.parseTrackName(t),this.node=ji.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function Ui(){this.uuid=Ol.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Fi(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var r=t.tracks,i=r.length,o=new Array(i),a={endingStart:hl,endingEnd:hl},s=0;s!==i;++s){var l=r[s].createInterpolant(null);o[s]=l,l.settings=a}this._interpolantSettings=a,this._interpolants=o,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=sl,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}function Bi(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function zi(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function Hi(){F.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Vi(e,t,n,r){this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function Gi(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Wi(e,t,n){Gi.call(this,e,t),this.meshPerAttribute=n||1}function qi(e,t,n){C.call(this,e,t),this.meshPerAttribute=n||1}function Xi(e,t,n,r){this.ray=new X(e,t),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function Yi(e,t){return e.distance-t.distance}function Zi(e,t,n,r){if(!1!==e.visible&&(e.raycast(t,n),!0===r))for(var i=e.children,o=0,a=i.length;o<a;o++)Zi(i[o],t,n,!0)}function Ki(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function Ji(e,t,n){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==n?n:0,this}function Qi(e,t,n){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==n?n:0,this}function $i(e,t){this.min=void 0!==e?e:new i(1/0,1/0),this.max=void 0!==t?t:new i(-1/0,-1/0)}function eo(e){x.call(this),this.material=e,this.render=function(){}}function to(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16711680,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=3*s.faces.length:s&&s.isBufferGeometry&&(a=s.attributes.normal.count);var l=new F,u=new N(2*a*3,3);l.addAttribute("position",u),jt.call(this,l,new Nt({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function no(e,t){x.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var n=new F,r=[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],i=0,o=1;i<32;i++,o++){var a=i/32*Math.PI*2,s=o/32*Math.PI*2;r.push(Math.cos(a),Math.sin(a),1,Math.cos(s),Math.sin(s),1)}n.addAttribute("position",new N(r,3));var l=new Nt({fog:!1});this.cone=new jt(n,l),this.add(this.cone),this.update()}function ro(e){var t=[];e&&e.isBone&&t.push(e);for(var n=0;n<e.children.length;n++)t.push.apply(t,ro(e.children[n]));return t}function io(e){for(var t=ro(e),n=new F,r=[],i=[],o=new y(0,0,1),a=new y(0,1,0),s=0;s<t.length;s++){var l=t[s];l.parent&&l.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(o.r,o.g,o.b),i.push(a.r,a.g,a.b))}n.addAttribute("position",new N(r,3)),n.addAttribute("color",new N(i,3));var u=new Nt({vertexColors:ma,depthTest:!1,depthWrite:!1,transparent:!0});jt.call(this,n,u),this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}function oo(e,t,n){this.light=e,this.light.updateMatrixWorld(),this.color=n;var r=new qn(t,4,2),i=new W({wireframe:!0,fog:!1});K.call(this,r,i),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function ao(e,t){x.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;var n=new Nt({fog:!1}),r=new F;r.addAttribute("position",new C(new Float32Array(15),3)),this.line=new Dt(r,n),this.add(this.line),this.update()}function so(e,t,n){x.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new $t(t);r.rotateY(.5*Math.PI),this.material=new W({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=ma);var i=r.getAttribute("position"),o=new Float32Array(3*i.count);r.addAttribute("color",new C(o,3)),this.add(new K(r,this.material)),this.update()}function lo(e,t,n,r){e=e||10,t=t||10,n=new y(void 0!==n?n:4473924),r=new y(void 0!==r?r:8947848);for(var i=t/2,o=e/t,a=e/2,s=[],l=[],u=0,c=0,d=-a;u<=t;u++,d+=o){s.push(-a,0,d,a,0,d),s.push(d,0,-a,d,0,a);var h=u===i?n:r;h.toArray(l,c),c+=3,h.toArray(l,c),c+=3,h.toArray(l,c),c+=3,h.toArray(l,c),c+=3}var f=new F;f.addAttribute("position",new N(s,3)),f.addAttribute("color",new N(l,3));var p=new Nt({vertexColors:ma});jt.call(this,f,p)}function uo(e,t,n,r,i,o){e=e||10,t=t||16,n=n||8,r=r||64,i=new y(void 0!==i?i:4473924),o=new y(void 0!==o?o:8947848);var a,s,l,u,c,d,h,f=[],p=[];for(u=0;u<=t;u++)l=u/t*(2*Math.PI),a=Math.sin(l)*e,s=Math.cos(l)*e,f.push(0,0,0),f.push(a,0,s),h=1&u?i:o,p.push(h.r,h.g,h.b),p.push(h.r,h.g,h.b);for(u=0;u<=n;u++)for(h=1&u?i:o,d=e-e/n*u,c=0;c<r;c++)l=c/r*(2*Math.PI),a=Math.sin(l)*d,s=Math.cos(l)*d,f.push(a,0,s),p.push(h.r,h.g,h.b),l=(c+1)/r*(2*Math.PI),a=Math.sin(l)*d,s=Math.cos(l)*d,f.push(a,0,s),p.push(h.r,h.g,h.b);var m=new F;m.addAttribute("position",new N(f,3)),m.addAttribute("color",new N(p,3));var g=new Nt({vertexColors:ma});jt.call(this,m,g)}function co(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16776960,o=void 0!==r?r:1,a=0,s=this.object.geometry;s&&s.isGeometry?a=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var l=new F,u=new N(2*a*3,3);l.addAttribute("position",u),jt.call(this,l,new Nt({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function ho(e,t,n){x.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===t&&(t=1);var r=new F;r.addAttribute("position",new N([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));var i=new Nt({fog:!1});this.lightPlane=new Dt(r,i),this.add(this.lightPlane),r=new F,r.addAttribute("position",new N([0,0,0,0,0,1],3)),this.targetLine=new Dt(r,i),this.add(this.targetLine),this.update()}function fo(e){function t(e,t,r){n(e,r),n(t,r)}function n(e,t){o.push(0,0,0),a.push(t.r,t.g,t.b),void 0===s[e]&&(s[e]=[]),s[e].push(o.length/3-1)}var r=new F,i=new Nt({color:16777215,vertexColors:pa}),o=[],a=[],s={},l=new y(16755200),u=new y(16711680),c=new y(43775),d=new y(16777215),h=new y(3355443);t("n1","n2",l),t("n2","n4",l),t("n4","n3",l),t("n3","n1",l),t("f1","f2",l),t("f2","f4",l),t("f4","f3",l),t("f3","f1",l),t("n1","f1",l),t("n2","f2",l),t("n3","f3",l),t("n4","f4",l),t("p","n1",u),t("p","n2",u),t("p","n3",u),t("p","n4",u),t("u1","u2",c),t("u2","u3",c),t("u3","u1",c),t("c","t",d),t("p","c",h),t("cn1","cn2",h),t("cn3","cn4",h),t("cf1","cf2",h),t("cf3","cf4",h),r.addAttribute("position",new N(o,3)),r.addAttribute("color",new N(a,3)),jt.call(this,r,i),this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}function po(e,t){this.object=e,void 0===t&&(t=16776960);var 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]),r=new Float32Array(24),i=new F;i.setIndex(new C(n,1)),i.addAttribute("position",new C(r,3)),jt.call(this,i,new Nt({color:t})),this.matrixAutoUpdate=!1,this.update()}function mo(e,t){this.type="Box3Helper",this.box=e;var n=void 0!==t?t:16776960,r=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=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],o=new F;o.setIndex(new C(r,1)),o.addAttribute("position",new N(i,3)),jt.call(this,o,new Nt({color:n})),this.geometry.computeBoundingSphere()}function go(e,t,n){this.type="PlaneHelper",this.plane=e,this.size=void 0===t?1:t;var r=void 0!==n?n:16776960,i=[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,0,1,0,0,0],o=new F;o.addAttribute("position",new N(i,3)),o.computeBoundingSphere(),Dt.call(this,o,new Nt({color:r}));var a=[1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],s=new F;s.addAttribute("position",new N(a,3)),s.computeBoundingSphere(),this.add(new K(s,new W({color:r,opacity:.2,transparent:!0,depthWrite:!1})))}function vo(e,t,n,r,i,o){x.call(this),void 0===r&&(r=16776960),void 0===n&&(n=1),void 0===i&&(i=.2*n),void 0===o&&(o=.2*i),void 0===gu&&(gu=new F,gu.addAttribute("position",new N([0,0,0,0,1,0],3)),vu=new nr(0,.5,1,5,1),vu.translate(0,-.5,0)),this.position.copy(t),this.line=new Dt(gu,new Nt({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new K(vu,new W({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,o)}function yo(e){e=e||1;var t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new F;r.addAttribute("position",new N(t,3)),r.addAttribute("color",new N(n,3));var i=new Nt({vertexColors:ma});jt.call(this,r,i)}function bo(e,t,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new M(e,t,n,i,o,a)}function _o(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function wo(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}function xo(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Bt(e,t)}function Eo(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new At(e)}function So(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Bt(e,t)}function Mo(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Ft(e)}function To(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Ft(e)}function Co(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Ft(e)}function Oo(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new s(e,t,n)}function Po(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new C(e,t).setDynamic(!0)}function Ao(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new O(e,t)}function Ro(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new P(e,t)}function Lo(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new A(e,t)}function Io(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new R(e,t)}function ko(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new L(e,t)}function No(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new I(e,t)}function Do(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new k(e,t)}function jo(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new N(e,t)}function Uo(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new D(e,t)}function Fo(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Cr.call(this,e),this.type="catmullrom",this.closed=!0}function Bo(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Cr.call(this,e),this.type="catmullrom"}function zo(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Cr.call(this,e),this.type="catmullrom"}function Ho(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new yo(e)}function Vo(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new po(e,t)}function Go(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new jt(new er(e.geometry),new Nt({color:void 0!==t?t:16777215}))}function Wo(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new jt(new Wt(e.geometry),new Nt({color:void 0!==t?t:16777215}))}function qo(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new vr(e)}function Xo(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new br(e)}function Yo(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(e,t){console.warn("THREE.Projector: .projectVector() is now vector.project()."),e.project(t)},this.unprojectVector=function(e,t){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),e.unproject(t)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}}function Zo(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"),this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),this.clear=function(){},this.render=function(){},this.setClearColor=function(){},this.setSize=function(){}}function Ko(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"WebGLRenderTargetCube",function(){return h}),n.d(t,"WebGLRenderTarget",function(){return d}),n.d(t,"WebGLRenderer",function(){return Mt}),n.d(t,"ShaderLib",function(){return kl}),n.d(t,"UniformsLib",function(){return Il}),n.d(t,"UniformsUtils",function(){return Rl}),n.d(t,"ShaderChunk",function(){return Al}),n.d(t,"FogExp2",function(){return Tt}),n.d(t,"Fog",function(){return Ct}),n.d(t,"Scene",function(){return Ot}),n.d(t,"Sprite",function(){return At}),n.d(t,"LOD",function(){return Rt}),n.d(t,"SkinnedMesh",function(){return kt}),n.d(t,"Skeleton",function(){return Lt}),n.d(t,"Bone",function(){return It}),n.d(t,"Mesh",function(){return K}),n.d(t,"LineSegments",function(){return jt}),n.d(t,"LineLoop",function(){return Ut}),n.d(t,"Line",function(){return Dt}),n.d(t,"Points",function(){return Bt}),n.d(t,"Group",function(){return zt}),n.d(t,"VideoTexture",function(){return Ht}),n.d(t,"DataTexture",function(){return f}),n.d(t,"CompressedTexture",function(){return Vt}),n.d(t,"CubeTexture",function(){return le}),n.d(t,"CanvasTexture",function(){return vt}),n.d(t,"DepthTexture",function(){return Gt}),n.d(t,"Texture",function(){return u}),n.d(t,"CompressedTextureLoader",function(){return yr}),n.d(t,"DataTextureLoader",function(){return br}),n.d(t,"CubeTextureLoader",function(){return wr}),n.d(t,"TextureLoader",function(){return xr}),n.d(t,"ObjectLoader",function(){return wi}),n.d(t,"MaterialLoader",function(){return vi}),n.d(t,"BufferGeometryLoader",function(){return yi}),n.d(t,"DefaultLoadingManager",function(){return eu}),n.d(t,"LoadingManager",function(){return gr}),n.d(t,"JSONLoader",function(){return _i}),n.d(t,"ImageLoader",function(){return _r}),n.d(t,"ImageBitmapLoader",function(){return xi}),n.d(t,"FontLoader",function(){return Ci}),n.d(t,"FileLoader",function(){return vr}),n.d(t,"Loader",function(){return bi}),n.d(t,"LoaderUtils",function(){return uu}),n.d(t,"Cache",function(){return $l}),n.d(t,"AudioLoader",function(){return Oi}),n.d(t,"SpotLightShadow",function(){return Jr}),n.d(t,"SpotLight",function(){return Qr}),n.d(t,"PointLight",function(){return $r}),n.d(t,"RectAreaLight",function(){return ri}),n.d(t,"HemisphereLight",function(){return Zr}),n.d(t,"DirectionalLightShadow",function(){return ei}),n.d(t,"DirectionalLight",function(){return ti}),n.d(t,"AmbientLight",function(){return ni}),n.d(t,"LightShadow",function(){return Kr}),n.d(t,"Light",function(){return Yr}),n.d(t,"StereoCamera",function(){return Pi}),n.d(t,"PerspectiveCamera",function(){return xt}),n.d(t,"OrthographicCamera",function(){return S}),n.d(t,"CubeCamera",function(){return Ai}),n.d(t,"ArrayCamera",function(){return Et}),n.d(t,"Camera",function(){return E}),n.d(t,"AudioListener",function(){return Ri}),n.d(t,"PositionalAudio",function(){return Ii}),n.d(t,"AudioContext",function(){return pu}),n.d(t,"AudioAnalyser",function(){return ki}),n.d(t,"Audio",function(){return Li}),n.d(t,"VectorKeyframeTrack",function(){return mi}),n.d(t,"StringKeyframeTrack",function(){return ii}),n.d(t,"QuaternionKeyframeTrack",function(){return li}),n.d(t,"NumberKeyframeTrack",function(){return ci}),n.d(t,"ColorKeyframeTrack",function(){return ui}),n.d(t,"BooleanKeyframeTrack",function(){return oi}),n.d(t,"PropertyMixer",function(){return Ni}),n.d(t,"PropertyBinding",function(){return ji}),n.d(t,"KeyframeTrack",function(){return pi}),n.d(t,"AnimationUtils",function(){return su}),n.d(t,"AnimationObjectGroup",function(){return Ui}),n.d(t,"AnimationMixer",function(){return Bi}),n.d(t,"AnimationClip",function(){return gi}),n.d(t,"Uniform",function(){return zi}),n.d(t,"InstancedBufferGeometry",function(){return Hi}),n.d(t,"BufferGeometry",function(){return F}),n.d(t,"Geometry",function(){return T}),n.d(t,"InterleavedBufferAttribute",function(){return Vi}),n.d(t,"InstancedInterleavedBuffer",function(){return Wi}),n.d(t,"InterleavedBuffer",function(){return Gi}),n.d(t,"InstancedBufferAttribute",function(){return qi}),n.d(t,"Face3",function(){return M}),n.d(t,"Object3D",function(){return x}),n.d(t,"Raycaster",function(){return Xi}),n.d(t,"Layers",function(){return w}),n.d(t,"EventDispatcher",function(){return r}),n.d(t,"Clock",function(){return Ki}),n.d(t,"QuaternionLinearInterpolant",function(){return si}),n.d(t,"LinearInterpolant",function(){return hi}),n.d(t,"DiscreteInterpolant",function(){return fi}),n.d(t,"CubicInterpolant",function(){return di}),n.d(t,"Interpolant",function(){return ai}),n.d(t,"Triangle",function(){return Z}),n.d(t,"Math",function(){return Ol}),n.d(t,"Spherical",function(){return Ji}),n.d(t,"Cylindrical",function(){return Qi}),n.d(t,"Plane",function(){return g}),n.d(t,"Frustum",function(){return v}),n.d(t,"Sphere",function(){return m}),n.d(t,"Ray",function(){return X}),n.d(t,"Matrix4",function(){return o}),n.d(t,"Matrix3",function(){return l}),n.d(t,"Box3",function(){return p}),n.d(t,"Box2",function(){return $i}),n.d(t,"Line3",function(){return Y}),n.d(t,"Euler",function(){return _}),n.d(t,"Vector4",function(){return c}),n.d(t,"Vector3",function(){return s}),n.d(t,"Vector2",function(){return i}),n.d(t,"Quaternion",function(){return a}),n.d(t,"Color",function(){return y}),n.d(t,"ImmediateRenderObject",function(){return eo}),n.d(t,"VertexNormalsHelper",function(){return to}),n.d(t,"SpotLightHelper",function(){return no}),n.d(t,"SkeletonHelper",function(){return io}),n.d(t,"PointLightHelper",function(){return oo}),n.d(t,"RectAreaLightHelper",function(){return ao}),n.d(t,"HemisphereLightHelper",function(){return so}),n.d(t,"GridHelper",function(){return lo}),n.d(t,"PolarGridHelper",function(){return uo}),n.d(t,"FaceNormalsHelper",function(){return co}),n.d(t,"DirectionalLightHelper",function(){return ho}),n.d(t,"CameraHelper",function(){return fo}),n.d(t,"BoxHelper",function(){return po}),n.d(t,"Box3Helper",function(){return mo}),n.d(t,"PlaneHelper",function(){return go}),n.d(t,"ArrowHelper",function(){return vo}),n.d(t,"AxesHelper",function(){return yo}),n.d(t,"Shape",function(){return Xr}),n.d(t,"Path",function(){return qr}),n.d(t,"ShapePath",function(){return Ei}),n.d(t,"Font",function(){return Si}),n.d(t,"CurvePath",function(){return Wr}),n.d(t,"Curve",function(){return Er}),n.d(t,"ShapeUtils",function(){return Zl}),n.d(t,"WebGLUtils",function(){return wt}),n.d(t,"WireframeGeometry",function(){return Wt}),n.d(t,"ParametricGeometry",function(){return qt}),n.d(t,"ParametricBufferGeometry",function(){return Xt}),n.d(t,"TetrahedronGeometry",function(){return Kt}),n.d(t,"TetrahedronBufferGeometry",function(){return Jt}),n.d(t,"OctahedronGeometry",function(){return Qt}),n.d(t,"OctahedronBufferGeometry",function(){return $t}),n.d(t,"IcosahedronGeometry",function(){return en}),n.d(t,"IcosahedronBufferGeometry",function(){return tn}),n.d(t,"DodecahedronGeometry",function(){return nn}),n.d(t,"DodecahedronBufferGeometry",function(){return rn}),n.d(t,"PolyhedronGeometry",function(){return Yt}),n.d(t,"PolyhedronBufferGeometry",function(){return Zt}),n.d(t,"TubeGeometry",function(){return on}),n.d(t,"TubeBufferGeometry",function(){return an}),n.d(t,"TorusKnotGeometry",function(){return sn}),n.d(t,"TorusKnotBufferGeometry",function(){return ln}),n.d(t,"TorusGeometry",function(){return un}),n.d(t,"TorusBufferGeometry",function(){return cn}),n.d(t,"TextGeometry",function(){return Vn}),n.d(t,"TextBufferGeometry",function(){return Gn}),n.d(t,"SphereGeometry",function(){return Wn}),n.d(t,"SphereBufferGeometry",function(){return qn}),n.d(t,"RingGeometry",function(){return Xn}),n.d(t,"RingBufferGeometry",function(){return Yn}),n.d(t,"PlaneGeometry",function(){return H}),n.d(t,"PlaneBufferGeometry",function(){return V}),n.d(t,"LatheGeometry",function(){return Zn}),n.d(t,"LatheBufferGeometry",function(){return Kn}),n.d(t,"ShapeGeometry",function(){return Jn}),n.d(t,"ShapeBufferGeometry",function(){return Qn}),n.d(t,"ExtrudeGeometry",function(){return zn}),n.d(t,"ExtrudeBufferGeometry",function(){return Hn}),n.d(t,"EdgesGeometry",function(){return er}),n.d(t,"ConeGeometry",function(){return rr}),n.d(t,"ConeBufferGeometry",function(){return ir}),n.d(t,"CylinderGeometry",function(){return tr}),n.d(t,"CylinderBufferGeometry",function(){return nr}),n.d(t,"CircleGeometry",function(){return or}),n.d(t,"CircleBufferGeometry",function(){return ar}),n.d(t,"BoxGeometry",function(){return B}),n.d(t,"BoxBufferGeometry",function(){return z}),n.d(t,"ShadowMaterial",function(){return sr}),n.d(t,"SpriteMaterial",function(){return Pt}),n.d(t,"RawShaderMaterial",function(){return lr}),n.d(t,"ShaderMaterial",function(){return q}),n.d(t,"PointsMaterial",function(){return Ft}),n.d(t,"MeshPhysicalMaterial",function(){return cr}),n.d(t,"MeshStandardMaterial",function(){return ur}),n.d(t,"MeshPhongMaterial",function(){return dr}),n.d(t,"MeshToonMaterial",function(){return hr}),n.d(t,"MeshNormalMaterial",function(){return fr}),n.d(t,"MeshLambertMaterial",function(){return pr}),n.d(t,"MeshDepthMaterial",function(){return pt}),n.d(t,"MeshDistanceMaterial",function(){return mt}),n.d(t,"MeshBasicMaterial",function(){return W});n.d(t,"LineDashedMaterial",function(){return mr}),n.d(t,"LineBasicMaterial",function(){return Nt}),n.d(t,"Material",function(){return G}),n.d(t,"Float64BufferAttribute",function(){return D}),n.d(t,"Float32BufferAttribute",function(){return N}),n.d(t,"Uint32BufferAttribute",function(){return k}),n.d(t,"Int32BufferAttribute",function(){return I}),n.d(t,"Uint16BufferAttribute",function(){return L}),n.d(t,"Int16BufferAttribute",function(){return R}),n.d(t,"Uint8ClampedBufferAttribute",function(){return A}),n.d(t,"Uint8BufferAttribute",function(){return P}),n.d(t,"Int8BufferAttribute",function(){return O}),n.d(t,"BufferAttribute",function(){return C}),n.d(t,"ArcCurve",function(){return Mr}),n.d(t,"CatmullRomCurve3",function(){return Cr}),n.d(t,"CubicBezierCurve",function(){return Ur}),n.d(t,"CubicBezierCurve3",function(){return Fr}),n.d(t,"EllipseCurve",function(){return Sr}),n.d(t,"LineCurve",function(){return Br}),n.d(t,"LineCurve3",function(){return zr}),n.d(t,"QuadraticBezierCurve",function(){return Hr}),n.d(t,"QuadraticBezierCurve3",function(){return Vr}),n.d(t,"SplineCurve",function(){return Gr}),n.d(t,"REVISION",function(){return Jo}),n.d(t,"MOUSE",function(){return Qo}),n.d(t,"CullFaceNone",function(){return $o}),n.d(t,"CullFaceBack",function(){return ea}),n.d(t,"CullFaceFront",function(){return ta}),n.d(t,"CullFaceFrontBack",function(){return na}),n.d(t,"FrontFaceDirectionCW",function(){return ra}),n.d(t,"FrontFaceDirectionCCW",function(){return ia}),n.d(t,"BasicShadowMap",function(){return oa}),n.d(t,"PCFShadowMap",function(){return aa}),n.d(t,"PCFSoftShadowMap",function(){return sa}),n.d(t,"FrontSide",function(){return la}),n.d(t,"BackSide",function(){return ua}),n.d(t,"DoubleSide",function(){return ca}),n.d(t,"FlatShading",function(){return da}),n.d(t,"SmoothShading",function(){return ha}),n.d(t,"NoColors",function(){return fa}),n.d(t,"FaceColors",function(){return pa}),n.d(t,"VertexColors",function(){return ma}),n.d(t,"NoBlending",function(){return ga}),n.d(t,"NormalBlending",function(){return va}),n.d(t,"AdditiveBlending",function(){return ya}),n.d(t,"SubtractiveBlending",function(){return ba}),n.d(t,"MultiplyBlending",function(){return _a}),n.d(t,"CustomBlending",function(){return wa}),n.d(t,"AddEquation",function(){return xa}),n.d(t,"SubtractEquation",function(){return Ea}),n.d(t,"ReverseSubtractEquation",function(){return Sa}),n.d(t,"MinEquation",function(){return Ma}),n.d(t,"MaxEquation",function(){return Ta}),n.d(t,"ZeroFactor",function(){return Ca}),n.d(t,"OneFactor",function(){return Oa}),n.d(t,"SrcColorFactor",function(){return Pa}),n.d(t,"OneMinusSrcColorFactor",function(){return Aa}),n.d(t,"SrcAlphaFactor",function(){return Ra}),n.d(t,"OneMinusSrcAlphaFactor",function(){return La}),n.d(t,"DstAlphaFactor",function(){return Ia}),n.d(t,"OneMinusDstAlphaFactor",function(){return ka}),n.d(t,"DstColorFactor",function(){return Na}),n.d(t,"OneMinusDstColorFactor",function(){return Da}),n.d(t,"SrcAlphaSaturateFactor",function(){return ja}),n.d(t,"NeverDepth",function(){return Ua}),n.d(t,"AlwaysDepth",function(){return Fa}),n.d(t,"LessDepth",function(){return Ba}),n.d(t,"LessEqualDepth",function(){return za}),n.d(t,"EqualDepth",function(){return Ha}),n.d(t,"GreaterEqualDepth",function(){return Va}),n.d(t,"GreaterDepth",function(){return Ga}),n.d(t,"NotEqualDepth",function(){return Wa}),n.d(t,"MultiplyOperation",function(){return qa}),n.d(t,"MixOperation",function(){return Xa}),n.d(t,"AddOperation",function(){return Ya}),n.d(t,"NoToneMapping",function(){return Za}),n.d(t,"LinearToneMapping",function(){return Ka}),n.d(t,"ReinhardToneMapping",function(){return Ja}),n.d(t,"Uncharted2ToneMapping",function(){return Qa}),n.d(t,"CineonToneMapping",function(){return $a}),n.d(t,"UVMapping",function(){return es}),n.d(t,"CubeReflectionMapping",function(){return ts}),n.d(t,"CubeRefractionMapping",function(){return ns}),n.d(t,"EquirectangularReflectionMapping",function(){return rs}),n.d(t,"EquirectangularRefractionMapping",function(){return is}),n.d(t,"SphericalReflectionMapping",function(){return os}),n.d(t,"CubeUVReflectionMapping",function(){return as}),n.d(t,"CubeUVRefractionMapping",function(){return ss}),n.d(t,"RepeatWrapping",function(){return ls}),n.d(t,"ClampToEdgeWrapping",function(){return us}),n.d(t,"MirroredRepeatWrapping",function(){return cs}),n.d(t,"NearestFilter",function(){return ds}),n.d(t,"NearestMipMapNearestFilter",function(){return hs}),n.d(t,"NearestMipMapLinearFilter",function(){return fs}),n.d(t,"LinearFilter",function(){return ps}),n.d(t,"LinearMipMapNearestFilter",function(){return ms}),n.d(t,"LinearMipMapLinearFilter",function(){return gs}),n.d(t,"UnsignedByteType",function(){return vs}),n.d(t,"ByteType",function(){return ys}),n.d(t,"ShortType",function(){return bs}),n.d(t,"UnsignedShortType",function(){return _s}),n.d(t,"IntType",function(){return ws}),n.d(t,"UnsignedIntType",function(){return xs}),n.d(t,"FloatType",function(){return Es}),n.d(t,"HalfFloatType",function(){return Ss}),n.d(t,"UnsignedShort4444Type",function(){return Ms}),n.d(t,"UnsignedShort5551Type",function(){return Ts}),n.d(t,"UnsignedShort565Type",function(){return Cs}),n.d(t,"UnsignedInt248Type",function(){return Os}),n.d(t,"AlphaFormat",function(){return Ps}),n.d(t,"RGBFormat",function(){return As}),n.d(t,"RGBAFormat",function(){return Rs}),n.d(t,"LuminanceFormat",function(){return Ls}),n.d(t,"LuminanceAlphaFormat",function(){return Is}),n.d(t,"RGBEFormat",function(){return ks}),n.d(t,"DepthFormat",function(){return Ns}),n.d(t,"DepthStencilFormat",function(){return Ds}),n.d(t,"RGB_S3TC_DXT1_Format",function(){return js}),n.d(t,"RGBA_S3TC_DXT1_Format",function(){return Us}),n.d(t,"RGBA_S3TC_DXT3_Format",function(){return Fs}),n.d(t,"RGBA_S3TC_DXT5_Format",function(){return Bs}),n.d(t,"RGB_PVRTC_4BPPV1_Format",function(){return zs}),n.d(t,"RGB_PVRTC_2BPPV1_Format",function(){return Hs}),n.d(t,"RGBA_PVRTC_4BPPV1_Format",function(){return Vs}),n.d(t,"RGBA_PVRTC_2BPPV1_Format",function(){return Gs}),n.d(t,"RGB_ETC1_Format",function(){return Ws}),n.d(t,"RGBA_ASTC_4x4_Format",function(){return qs}),n.d(t,"RGBA_ASTC_5x4_Format",function(){return Xs}),n.d(t,"RGBA_ASTC_5x5_Format",function(){return Ys}),n.d(t,"RGBA_ASTC_6x5_Format",function(){return Zs}),n.d(t,"RGBA_ASTC_6x6_Format",function(){return Ks}),n.d(t,"RGBA_ASTC_8x5_Format",function(){return Js}),n.d(t,"RGBA_ASTC_8x6_Format",function(){return Qs}),n.d(t,"RGBA_ASTC_8x8_Format",function(){return $s}),n.d(t,"RGBA_ASTC_10x5_Format",function(){return el}),n.d(t,"RGBA_ASTC_10x6_Format",function(){return tl}),n.d(t,"RGBA_ASTC_10x8_Format",function(){return nl}),n.d(t,"RGBA_ASTC_10x10_Format",function(){return rl}),n.d(t,"RGBA_ASTC_12x10_Format",function(){return il}),n.d(t,"RGBA_ASTC_12x12_Format",function(){return ol}),n.d(t,"LoopOnce",function(){return al}),n.d(t,"LoopRepeat",function(){return sl}),n.d(t,"LoopPingPong",function(){return ll}),n.d(t,"InterpolateDiscrete",function(){return ul}),n.d(t,"InterpolateLinear",function(){return cl}),n.d(t,"InterpolateSmooth",function(){return dl}),n.d(t,"ZeroCurvatureEnding",function(){return hl}),n.d(t,"ZeroSlopeEnding",function(){return fl}),n.d(t,"WrapAroundEnding",function(){return pl}),n.d(t,"TrianglesDrawMode",function(){return ml}),n.d(t,"TriangleStripDrawMode",function(){return gl}),n.d(t,"TriangleFanDrawMode",function(){return vl}),n.d(t,"LinearEncoding",function(){return yl}),n.d(t,"sRGBEncoding",function(){return bl}),n.d(t,"GammaEncoding",function(){return _l}),n.d(t,"RGBEEncoding",function(){return wl}),n.d(t,"LogLuvEncoding",function(){return xl}),n.d(t,"RGBM7Encoding",function(){return El}),n.d(t,"RGBM16Encoding",function(){return Sl}),n.d(t,"RGBDEncoding",function(){return Ml}),n.d(t,"BasicDepthPacking",function(){return Tl}),n.d(t,"RGBADepthPacking",function(){return Cl}),n.d(t,"CubeGeometry",function(){return B}),n.d(t,"Face4",function(){return bo}),n.d(t,"LineStrip",function(){return yu}),n.d(t,"LinePieces",function(){return bu}),n.d(t,"MeshFaceMaterial",function(){return _o}),n.d(t,"MultiMaterial",function(){return wo}),n.d(t,"PointCloud",function(){return xo}),n.d(t,"Particle",function(){return Eo}),n.d(t,"ParticleSystem",function(){return So}),n.d(t,"PointCloudMaterial",function(){return Mo}),n.d(t,"ParticleBasicMaterial",function(){return To}),n.d(t,"ParticleSystemMaterial",function(){return Co}),n.d(t,"Vertex",function(){return Oo}),n.d(t,"DynamicBufferAttribute",function(){return Po}),n.d(t,"Int8Attribute",function(){return Ao}),n.d(t,"Uint8Attribute",function(){return Ro}),n.d(t,"Uint8ClampedAttribute",function(){return Lo}),n.d(t,"Int16Attribute",function(){return Io}),n.d(t,"Uint16Attribute",function(){return ko}),n.d(t,"Int32Attribute",function(){return No}),n.d(t,"Uint32Attribute",function(){return Do}),n.d(t,"Float32Attribute",function(){return jo}),n.d(t,"Float64Attribute",function(){return Uo}),n.d(t,"ClosedSplineCurve3",function(){return Fo}),n.d(t,"SplineCurve3",function(){return Bo}),n.d(t,"Spline",function(){return zo}),n.d(t,"AxisHelper",function(){return Ho}),n.d(t,"BoundingBoxHelper",function(){return Vo}),n.d(t,"EdgesHelper",function(){return Go}),n.d(t,"WireframeHelper",function(){return Wo}),n.d(t,"XHRLoader",function(){return qo}),n.d(t,"BinaryTextureLoader",function(){return Xo}),n.d(t,"GeometryUtils",function(){return _u}),n.d(t,"ImageUtils",function(){return wu}),n.d(t,"Projector",function(){return Yo}),n.d(t,"CanvasRenderer",function(){return Zo}),n.d(t,"SceneUtils",function(){return xu}),n.d(t,"LensFlare",function(){return Ko});void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&function(){Object.assign=function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}}(),Object.assign(r.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var n=this._listeners,r=n[e];if(void 0!==r){var i=r.indexOf(t);-1!==i&&r.splice(i,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners,n=t[e.type];if(void 0!==n){e.target=this;for(var r=n.slice(0),i=0,o=r.length;i<o;i++)r[i].call(this,e)}}}});var Jo="92",Qo={LEFT:0,MIDDLE:1,RIGHT:2},$o=0,ea=1,ta=2,na=3,ra=0,ia=1,oa=0,aa=1,sa=2,la=0,ua=1,ca=2,da=1,ha=2,fa=0,pa=1,ma=2,ga=0,va=1,ya=2,ba=3,_a=4,wa=5,xa=100,Ea=101,Sa=102,Ma=103,Ta=104,Ca=200,Oa=201,Pa=202,Aa=203,Ra=204,La=205,Ia=206,ka=207,Na=208,Da=209,ja=210,Ua=0,Fa=1,Ba=2,za=3,Ha=4,Va=5,Ga=6,Wa=7,qa=0,Xa=1,Ya=2,Za=0,Ka=1,Ja=2,Qa=3,$a=4,es=300,ts=301,ns=302,rs=303,is=304,os=305,as=306,ss=307,ls=1e3,us=1001,cs=1002,ds=1003,hs=1004,fs=1005,ps=1006,ms=1007,gs=1008,vs=1009,ys=1010,bs=1011,_s=1012,ws=1013,xs=1014,Es=1015,Ss=1016,Ms=1017,Ts=1018,Cs=1019,Os=1020,Ps=1021,As=1022,Rs=1023,Ls=1024,Is=1025,ks=Rs,Ns=1026,Ds=1027,js=33776,Us=33777,Fs=33778,Bs=33779,zs=35840,Hs=35841,Vs=35842,Gs=35843,Ws=36196,qs=37808,Xs=37809,Ys=37810,Zs=37811,Ks=37812,Js=37813,Qs=37814,$s=37815,el=37816,tl=37817,nl=37818,rl=37819,il=37820,ol=37821,al=2200,sl=2201,ll=2202,ul=2300,cl=2301,dl=2302,hl=2400,fl=2401,pl=2402,ml=0,gl=1,vl=2,yl=3e3,bl=3001,_l=3007,wl=3002,xl=3003,El=3004,Sl=3005,Ml=3006,Tl=3200,Cl=3201,Ol={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return function(){var t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]+"-"+e[255&n]+e[n>>8&255]+"-"+e[n>>16&15|64]+e[n>>24&255]+"-"+e[63&r|128]+e[r>>8&255]+"-"+e[r>>16&255]+e[r>>24&255]+e[255&i]+e[i>>8&255]+e[i>>16&255]+e[i>>24&255]).toUpperCase()}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*Ol.DEG2RAD},radToDeg:function(e){return e*Ol.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};Object.defineProperties(i.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(i.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:function(){var e=new i,t=new i;return function(n,r){return e.set(n,n),t.set(r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}}),Object.assign(o.prototype,{isMatrix4:!0,set:function(e,t,n,r,i,o,a,s,l,u,c,d,h,f,p,m){var g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=a,g[13]=s,g[2]=l,g[6]=u,g[10]=c,g[14]=d,g[3]=h,g[7]=f,g[11]=p,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new o).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},copyPosition:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:function(){var e=new s;return function(t){var n=this.elements,r=t.elements,i=1/e.setFromMatrixColumn(t,0).length(),o=1/e.setFromMatrixColumn(t,1).length(),a=1/e.setFromMatrixColumn(t,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,this}}(),makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){var d=o*u,h=o*c,f=a*u,p=a*c;t[0]=s*u,t[4]=-s*c,t[8]=l,t[1]=h+f*l,t[5]=d-p*l,t[9]=-a*s,t[2]=p-d*l,t[6]=f+h*l,t[10]=o*s}else if("YXZ"===e.order){var m=s*u,g=s*c,v=l*u,y=l*c;t[0]=m+y*a,t[4]=v*a-g,t[8]=o*l,t[1]=o*c,t[5]=o*u,t[9]=-a,t[2]=g*a-v,t[6]=y+m*a,t[10]=o*s}else if("ZXY"===e.order){var m=s*u,g=s*c,v=l*u,y=l*c;t[0]=m-y*a,t[4]=-o*c,t[8]=v+g*a,t[1]=g+v*a,t[5]=o*u,t[9]=y-m*a,t[2]=-o*l,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){var d=o*u,h=o*c,f=a*u,p=a*c;t[0]=s*u,t[4]=f*l-h,t[8]=d*l+p,t[1]=s*c,t[5]=p*l+d,t[9]=h*l-f,t[2]=-l,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){var b=o*s,_=o*l,w=a*s,x=a*l;t[0]=s*u,t[4]=x-b*c,t[8]=w*c+_,t[1]=c,t[5]=o*u,t[9]=-a*u,t[2]=-l*u,t[6]=_*c+w,t[10]=b-x*c}else if("XZY"===e.order){var b=o*s,_=o*l,w=a*s,x=a*l;t[0]=s*u,t[4]=-c,t[8]=l*u,t[1]=b*c+x,t[5]=o*u,t[9]=_*c-w,t[2]=w*c-_,t[6]=a*u,t[10]=x*c+b}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){var t=this.elements,n=e._x,r=e._y,i=e._z,o=e._w,a=n+n,s=r+r,l=i+i,u=n*a,c=n*s,d=n*l,h=r*s,f=r*l,p=i*l,m=o*a,g=o*s,v=o*l;return t[0]=1-(h+p),t[4]=c-v,t[8]=d+g,t[1]=c+v,t[5]=1-(u+p),t[9]=f-m,t[2]=d-g,t[6]=f+m,t[10]=1-(u+h),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},lookAt:function(){var e=new s,t=new s,n=new s;return function(r,i,o){var a=this.elements;return n.subVectors(r,i),0===n.lengthSq()&&(n.z=1),n.normalize(),e.crossVectors(o,n),0===e.lengthSq()&&(1===Math.abs(o.z)?n.x+=1e-4:n.z+=1e-4,n.normalize(),e.crossVectors(o,n)),e.normalize(),t.crossVectors(n,e),a[0]=e.x,a[4]=t.x,a[8]=n.x,a[1]=e.y,a[5]=t.y,a[9]=n.y,a[2]=e.z,a[6]=t.z,a[10]=n.z,this}}(),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],l=n[12],u=n[1],c=n[5],d=n[9],h=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],_=n[15],w=r[0],x=r[4],E=r[8],S=r[12],M=r[1],T=r[5],C=r[9],O=r[13],P=r[2],A=r[6],R=r[10],L=r[14],I=r[3],k=r[7],N=r[11],D=r[15];return i[0]=o*w+a*M+s*P+l*I,i[4]=o*x+a*T+s*A+l*k,i[8]=o*E+a*C+s*R+l*N,i[12]=o*S+a*O+s*L+l*D,i[1]=u*w+c*M+d*P+h*I,i[5]=u*x+c*T+d*A+h*k,i[9]=u*E+c*C+d*R+h*N,i[13]=u*S+c*O+d*L+h*D,i[2]=f*w+p*M+m*P+g*I,i[6]=f*x+p*T+m*A+g*k,i[10]=f*E+p*C+m*R+g*N,i[14]=f*S+p*O+m*L+g*D,i[3]=v*w+y*M+b*P+_*I,i[7]=v*x+y*T+b*A+_*k,i[11]=v*E+y*C+b*R+_*N,i[15]=v*S+y*O+b*L+_*D,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToBufferAttribute:function(){var e=new s;return function(t){for(var n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.applyMatrix4(this),t.setXYZ(n,e.x,e.y,e.z);return t}}(),determinant:function(){var e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],l=e[13],u=e[2],c=e[6],d=e[10],h=e[14];return e[3]*(+i*s*c-r*l*c-i*a*d+n*l*d+r*a*h-n*s*h)+e[7]*(+t*s*h-t*l*d+i*o*d-r*o*h+r*l*u-i*s*u)+e[11]*(+t*l*c-t*a*h-i*o*c+n*o*h+i*a*u-n*l*u)+e[15]*(-r*a*u-t*s*c+t*a*d+r*o*c-n*o*d+n*s*u)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(e){var t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this},getInverse:function(e,t){var n=this.elements,r=e.elements,i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],u=r[5],c=r[6],d=r[7],h=r[8],f=r[9],p=r[10],m=r[11],g=r[12],v=r[13],y=r[14],b=r[15],_=f*y*d-v*p*d+v*c*m-u*y*m-f*c*b+u*p*b,w=g*p*d-h*y*d-g*c*m+l*y*m+h*c*b-l*p*b,x=h*v*d-g*f*d+g*u*m-l*v*m-h*u*b+l*f*b,E=g*f*c-h*v*c-g*u*p+l*v*p+h*u*y-l*f*y,S=i*_+o*w+a*x+s*E;if(0===S){var M="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(M);return console.warn(M),this.identity()}var T=1/S;return n[0]=_*T,n[1]=(v*p*s-f*y*s-v*a*m+o*y*m+f*a*b-o*p*b)*T,n[2]=(u*y*s-v*c*s+v*a*d-o*y*d-u*a*b+o*c*b)*T,n[3]=(f*c*s-u*p*s-f*a*d+o*p*d+u*a*m-o*c*m)*T,n[4]=w*T,n[5]=(h*y*s-g*p*s+g*a*m-i*y*m-h*a*b+i*p*b)*T,n[6]=(g*c*s-l*y*s-g*a*d+i*y*d+l*a*b-i*c*b)*T,n[7]=(l*p*s-h*c*s+h*a*d-i*p*d-l*a*m+i*c*m)*T,n[8]=x*T,n[9]=(g*f*s-h*v*s-g*o*m+i*v*m+h*o*b-i*f*b)*T,n[10]=(l*v*s-g*u*s+g*o*d-i*v*d-l*o*b+i*u*b)*T,n[11]=(h*u*s-l*f*s-h*o*d+i*f*d+l*o*m-i*u*m)*T,n[12]=E*T,n[13]=(h*v*a-g*f*a+g*o*p-i*v*p-h*o*y+i*f*y)*T,n[14]=(g*u*a-l*v*a-g*o*c+i*v*c+l*o*y-i*u*y)*T,n[15]=(l*f*a-h*u*a+h*o*c-i*f*c-l*o*p+i*u*p)*T,this},scale:function(e){var t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))},makeTranslation:function(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,l=i*o,u=i*a;return this.set(l*o+n,l*a-r*s,l*s+r*a,0,l*a+r*s,u*a+n,u*s-r*o,0,l*s-r*a,u*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,n){return this.makeRotationFromQuaternion(t),this.scale(n),this.setPosition(e),this},decompose:function(){var e=new s,t=new o;return function(n,r,i){var o=this.elements,a=e.set(o[0],o[1],o[2]).length(),s=e.set(o[4],o[5],o[6]).length(),l=e.set(o[8],o[9],o[10]).length();this.determinant()<0&&(a=-a),n.x=o[12],n.y=o[13],n.z=o[14],t.copy(this);var u=1/a,c=1/s,d=1/l;return t.elements[0]*=u,t.elements[1]*=u,t.elements[2]*=u,t.elements[4]*=c,t.elements[5]*=c,t.elements[6]*=c,t.elements[8]*=d,t.elements[9]*=d,t.elements[10]*=d,r.setFromRotationMatrix(t),i.x=a,i.y=s,i.z=l,this}}(),makePerspective:function(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,s=2*i/(t-e),l=2*i/(n-r),u=(t+e)/(t-e),c=(n+r)/(n-r),d=-(o+i)/(o-i),h=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=l,a[9]=c,a[13]=0,a[2]=0,a[6]=0,a[10]=d,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(e,t,n,r,i,o){var a=this.elements,s=1/(t-e),l=1/(n-r),u=1/(o-i),c=(t+e)*s,d=(n+r)*l,h=(o+i)*u;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-c,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-d,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}),Object.assign(a,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,i,o,a){var s=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3],d=i[o+0],h=i[o+1],f=i[o+2],p=i[o+3];if(c!==p||s!==d||l!==h||u!==f){var m=1-a,g=s*d+l*h+u*f+c*p,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,g*v);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var w=a*v;if(s=s*m+d*w,l=l*m+h*w,u=u*m+f*w,c=c*m+p*w,m===1-a){var x=1/Math.sqrt(s*s+l*l+u*u+c*c);s*=x,l*=x,u*=x,c*=x}}e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=c}}),Object.defineProperties(a.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this.onChangeCallback()}}}),Object.assign(a.prototype,{set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this.onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,o=e.order,a=Math.cos,s=Math.sin,l=a(n/2),u=a(r/2),c=a(i/2),d=s(n/2),h=s(r/2),f=s(i/2);return"XYZ"===o?(this._x=d*u*c+l*h*f,this._y=l*h*c-d*u*f,this._z=l*u*f+d*h*c,this._w=l*u*c-d*h*f):"YXZ"===o?(this._x=d*u*c+l*h*f,this._y=l*h*c-d*u*f,this._z=l*u*f-d*h*c,this._w=l*u*c+d*h*f):"ZXY"===o?(this._x=d*u*c-l*h*f,this._y=l*h*c+d*u*f,this._z=l*u*f+d*h*c,this._w=l*u*c-d*h*f):"ZYX"===o?(this._x=d*u*c-l*h*f,this._y=l*h*c+d*u*f,this._z=l*u*f-d*h*c,this._w=l*u*c+d*h*f):"YZX"===o?(this._x=d*u*c+l*h*f,this._y=l*h*c+d*u*f,this._z=l*u*f-d*h*c,this._w=l*u*c-d*h*f):"XZY"===o&&(this._x=d*u*c-l*h*f,this._y=l*h*c-d*u*f,this._z=l*u*f+d*h*c,this._w=l*u*c+d*h*f),!1!==t&&this.onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],l=n[9],u=n[2],c=n[6],d=n[10],h=r+s+d;return h>0?(t=.5/Math.sqrt(h+1),this._w=.25/t,this._x=(c-l)*t,this._y=(o-u)*t,this._z=(a-i)*t):r>s&&r>d?(t=2*Math.sqrt(1+r-s-d),this._w=(c-l)/t,this._x=.25*t,this._y=(i+a)/t,this._z=(o+u)/t):s>d?(t=2*Math.sqrt(1+s-r-d),this._w=(o-u)/t,this._x=(i+a)/t,this._y=.25*t,this._z=(l+c)/t):(t=2*Math.sqrt(1+d-r-s),this._w=(a-i)/t,this._x=(o+u)/t,this._y=(l+c)/t,this._z=.25*t),this.onChangeCallback(),this},setFromUnitVectors:function(){var e,t=new s;return function(n,r){return void 0===t&&(t=new s),e=n.dot(r)+1,e<1e-6?(e=0,Math.abs(n.x)>Math.abs(n.z)?t.set(-n.y,n.x,0):t.set(0,-n.z,n.y)):t.crossVectors(n,r),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize()}}(),inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this.onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,l=t._z,u=t._w;return this._x=n*u+o*a+r*l-i*s,this._y=r*u+o*s+i*a-n*l,this._z=i*u+o*l+n*s-r*a,this._w=o*u-n*a-r*s-i*l,this.onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;var s=Math.sqrt(1-a*a);if(Math.abs(s)<.001)return this._w=.5*(o+this._w),this._x=.5*(n+this._x),this._y=.5*(r+this._y),this._z=.5*(i+this._z),this;var l=Math.atan2(s,a),u=Math.sin((1-t)*l)/s,c=Math.sin(t*l)/s;return this._w=o*u+this._w*c,this._x=n*u+this._x*c,this._y=r*u+this._y*c,this._z=i*u+this._z*c,this.onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(s.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(){var e=new a;return function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(e.setFromEuler(t))}}(),applyAxisAngle:function(){var e=new a;return function(t,n){return this.applyQuaternion(e.setFromAxisAngle(t,n))}}(),applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,u=s*n+a*t-i*r,c=s*r+i*n-o*t,d=-i*t-o*n-a*r;return this.x=l*s+d*-i+u*-a-c*-o,this.y=u*s+d*-o+c*-i-l*-a,this.z=c*s+d*-a+l*-o-u*-i,this},project:function(){var e=new o;return function(t){return e.multiplyMatrices(t.projectionMatrix,e.getInverse(t.matrixWorld)),this.applyMatrix4(e)}}(),unproject:function(){var e=new o;return function(t){return e.multiplyMatrices(t.matrixWorld,e.getInverse(t.projectionMatrix)),this.applyMatrix4(e)}}(),transformDirection:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(){var e=new s,t=new s;return function(n,r){return e.set(n,n,n),t.set(r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,o=t.x,a=t.y,s=t.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:function(){var e=new s;return function(t){return e.copy(this).projectOnVector(t),this.sub(e)}}(),reflect:function(){var e=new s;return function(t){return this.sub(e.copy(t).multiplyScalar(2*this.dot(t)))}}(),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(Ol.clamp(t,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){var t=Math.sin(e.phi)*e.radius;return this.x=t*Math.sin(e.theta),this.y=Math.cos(e.phi)*e.radius,this.z=t*Math.cos(e.theta),this},setFromCylindrical:function(e){return this.x=e.radius*Math.sin(e.theta),this.y=e.y,this.z=e.radius*Math.cos(e.theta),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}}),Object.assign(l.prototype,{isMatrix3:!0,set:function(e,t,n,r,i,o,a,s,l){var u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=i,u[5]=s,u[6]=n,u[7]=o,u[8]=l,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(){var e=new s;return function(t){for(var n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.applyMatrix3(this),t.setXYZ(n,e.x,e.y,e.z);return t}}(),multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],l=n[1],u=n[4],c=n[7],d=n[2],h=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],_=r[2],w=r[5],x=r[8];return i[0]=o*p+a*v+s*_,i[3]=o*m+a*y+s*w,i[6]=o*g+a*b+s*x,i[1]=l*p+u*v+c*_,i[4]=l*m+u*y+c*w,i[7]=l*g+u*b+c*x,i[2]=d*p+h*v+f*_,i[5]=d*m+h*y+f*w,i[8]=d*g+h*b+f*x,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*o*u-t*a*l-n*i*u+n*a*s+r*i*l-r*o*s},getInverse:function(e,t){e&&e.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var n=e.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],c=n[6],d=n[7],h=n[8],f=h*l-u*d,p=u*c-h*s,m=d*s-l*c,g=i*f+o*p+a*m;if(0===g){var v="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(v);return console.warn(v),this.identity()}var y=1/g;return r[0]=f*y,r[1]=(a*d-h*o)*y,r[2]=(u*o-a*l)*y,r[3]=p*y,r[4]=(h*i-a*c)*y,r[5]=(a*s-u*i)*y,r[6]=m*y,r[7]=(o*c-d*i)*y,r[8]=(l*i-o*s)*y,this},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},setUvTransform:function(e,t,n,r,i,o,a){var s=Math.cos(i),l=Math.sin(i);this.set(n*s,n*l,-n*(s*o+l*a)+o+e,-r*l,r*s,-r*(-l*o+s*a)+a+t,0,0,1)},scale:function(e,t){var n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this},rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],l=r[4],u=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*l,r[6]=t*a+n*u,r[1]=-n*i+t*s,r[4]=-n*o+t*l,r[7]=-n*a+t*u,this},translate:function(e,t){var n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this},equals:function(e){for(var t=this.elements,n=e.elements,r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}});var Pl=0;u.DEFAULT_IMAGE=void 0,u.DEFAULT_MAPPING=es,u.prototype=Object.assign(Object.create(r.prototype),{constructor:u,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var r=this.image;void 0===r.uuid&&(r.uuid=Ol.generateUUID()),t||void 0!==e.images[r.uuid]||(e.images[r.uuid]={uuid:r.uuid,url:function(e){var t;if(e instanceof HTMLCanvasElement)t=e;else{t=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),t.width=e.width,t.height=e.height;var n=t.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height)}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}(r)}),n.image=r.uuid}return t||(e.textures[this.uuid]=n),n},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(e){if(this.mapping===es){if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ls:e.x=e.x-Math.floor(e.x);break;case us:e.x=e.x<0?0:1;break;case cs:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case ls:e.y=e.y-Math.floor(e.y);break;case us:e.y=e.y<0?0:1;break;case cs:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}this.flipY&&(e.y=1-e.y)}}}),Object.defineProperty(u.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(c.prototype,{isVector4:!0,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,n,r,i,o=e.elements,a=o[0],s=o[4],l=o[8],u=o[1],c=o[5],d=o[9],h=o[2],f=o[6],p=o[10];if(Math.abs(s-u)<.01&&Math.abs(l-h)<.01&&Math.abs(d-f)<.01){if(Math.abs(s+u)<.1&&Math.abs(l+h)<.1&&Math.abs(d+f)<.1&&Math.abs(a+c+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(a+1)/2,g=(c+1)/2,v=(p+1)/2,y=(s+u)/4,b=(l+h)/4,_=(d+f)/4;return m>g&&m>v?m<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(m),r=y/n,i=b/n):g>v?g<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(g),n=y/r,i=_/r):v<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(v),n=b/i,r=_/i),this.set(n,r,i,t),this}var w=Math.sqrt((f-d)*(f-d)+(l-h)*(l-h)+(u-s)*(u-s));return Math.abs(w)<.001&&(w=1),this.x=(f-d)/w,this.y=(l-h)/w,this.z=(u-s)/w,this.w=Math.acos((a+c+p-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(){var e,t;return function(n,r){return void 0===e&&(e=new c,t=new c),e.set(n,n,n,n),t.set(r,r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),d.prototype=Object.assign(Object.create(r.prototype),{constructor:d,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),h.prototype=Object.create(d.prototype),h.prototype.constructor=h,h.prototype.isWebGLRenderTargetCube=!0,f.prototype=Object.create(u.prototype),f.prototype.constructor=f,f.prototype.isDataTexture=!0,Object.assign(p.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,l=e.length;s<l;s+=3){var u=e[s],c=e[s+1],d=e[s+2];u<t&&(t=u),c<n&&(n=c),d<r&&(r=d),u>i&&(i=u),c>o&&(o=c),d>a&&(a=d)}return this.min.set(t,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,l=e.count;s<l;s++){var u=e.getX(s),c=e.getY(s),d=e.getZ(s);u<t&&(t=u),c<n&&(n=c),d<r&&(r=d),u>i&&(i=u),c>o&&(o=c),d>a&&(a=d)}return this.min.set(t,n,r),this.max.set(i,o,a),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new s;return function(t,n){var r=e.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}}(),setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new s),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new s),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:function(){function e(e){var o=e.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(n=0,r=a.length;n<r;n++)i.copy(a[n]),i.applyMatrix4(e.matrixWorld),t.expandByPoint(i)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(n=0,r=s.count;n<r;n++)i.fromBufferAttribute(s,n).applyMatrix4(e.matrixWorld),t.expandByPoint(i)}}var t,n,r,i=new s;return function(n){return t=this,n.updateMatrixWorld(!0),n.traverse(e),this}}(),containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new s),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:function(){var e=new s;return function(t){return this.clampPoint(t.center,e),e.distanceToSquared(t.center)<=t.radius*t.radius}}(),intersectsPlane:function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=e.constant&&n>=e.constant},intersectsTriangle:function(){function e(e){var i,o;for(i=0,o=e.length-3;i<=o;i+=3){l.fromArray(e,i);var a=c.x*Math.abs(l.x)+c.y*Math.abs(l.y)+c.z*Math.abs(l.z),s=t.dot(l),u=n.dot(l),d=r.dot(l);if(Math.max(-Math.max(s,u,d),Math.min(s,u,d))>a)return!1}return!0}var t=new s,n=new s,r=new s,i=new s,o=new s,a=new s,l=new s,u=new s,c=new s,d=new s;return function(s){if(this.isEmpty())return!1;this.getCenter(u),c.subVectors(this.max,u),t.subVectors(s.a,u),n.subVectors(s.b,u),r.subVectors(s.c,u),i.subVectors(n,t),o.subVectors(r,n),a.subVectors(t,r);var l=[0,-i.z,i.y,0,-o.z,o.y,0,-a.z,a.y,i.z,0,-i.x,o.z,0,-o.x,a.z,0,-a.x,-i.y,i.x,0,-o.y,o.x,0,-a.y,a.x,0];return!!e(l)&&(l=[1,0,0,0,1,0,0,0,1],!!e(l)&&(d.crossVectors(i,o),l=[d.x,d.y,d.z],e(l)))}}(),clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new s),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new s;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),getBoundingSphere:function(){var e=new s;return function(t){return void 0===t&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),t=new m),this.getCenter(t.center),t.radius=.5*this.getSize(e).length(),t}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(){var e=[new s,new s,new s,new s,new s,new s,new s,new s];return function(t){return this.isEmpty()?this:(e[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),e[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),e[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),e[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),e[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),e[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),e[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),e[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(e),this)}}(),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(m.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(){var e=new p;return function(t,n){var r=this.center;void 0!==n?r.copy(n):e.setFromPoints(t).getCenter(r);for(var i=0,o=0,a=t.length;o<a;o++)i=Math.max(i,r.distanceToSquared(t[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var n=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new s),t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new p),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}}),Object.assign(g.prototype,{set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(){var e=new s,t=new s;return function(n,r,i){var o=e.subVectors(i,r).cross(t.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new s),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(){var e=new s;return function(t,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new s);var r=t.delta(e),i=this.normal.dot(r);if(0!==i){var o=-(t.start.dot(this.normal)+this.constant)/i;if(!(o<0||o>1))return n.copy(r).multiplyScalar(o).add(t.start)}else if(0===this.distanceToPoint(t.start))return n.copy(t.start)}}(),intersectsLine:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new s),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var e=new s,t=new l;return function(n,r){var i=r||t.getNormalMatrix(n),o=this.coplanarPoint(e).applyMatrix4(n),a=this.normal.applyMatrix3(i).normalize();return this.constant=-o.dot(a),this}}(),translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}}),Object.assign(v.prototype,{set:function(e,t,n,r,i,o){var a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(o),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],d=n[8],h=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(a-r,c-s,p-d,y-m).normalize(),t[1].setComponents(a+r,c+s,p+d,y+m).normalize(),t[2].setComponents(a+i,c+l,p+h,y+g).normalize(),t[3].setComponents(a-i,c-l,p-h,y-g).normalize(),t[4].setComponents(a-o,c-u,p-f,y-v).normalize(),t[5].setComponents(a+o,c+u,p+f,y+v).normalize(),this},intersectsObject:function(){var e=new m;return function(t){var n=t.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),e.copy(n.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSprite:function(){var e=new m;return function(t){return e.center.set(0,0,0),e.radius=.7071067811865476,e.applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:function(){var e=new s,t=new s;return function(n){for(var r=this.planes,i=0;i<6;i++){var o=r[i];e.x=o.normal.x>0?n.min.x:n.max.x,t.x=o.normal.x>0?n.max.x:n.min.x,e.y=o.normal.y>0?n.min.y:n.max.y,t.y=o.normal.y>0?n.max.y:n.min.y,e.z=o.normal.z>0?n.min.z:n.max.z,t.z=o.normal.z>0?n.max.z:n.min.z;var a=o.distanceToPoint(e),s=o.distanceToPoint(t);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}});var Al={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",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( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_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_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\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;\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}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\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}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\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 linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale =  bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\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.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM            = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D      = max( maxRange / maxRGB, 1.0 );\n\tD            = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\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\n",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n  varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\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\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\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 GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\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.specularRoughness;\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(    0, 1,    0 ),\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#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\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_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\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\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\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#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",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, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\t\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",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}\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}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( 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\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\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\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( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\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 )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\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\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",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\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",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  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\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}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\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}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( 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#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\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 <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\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\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\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>\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}\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 <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}\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}\n",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\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\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\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 <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\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 <aomap_pars_fragment>\n#include <lightmap_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\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\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\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\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 <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\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 <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <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 <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_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 <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\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}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <color_pars_vertex>\n#include <fog_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 <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 <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\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 <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\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\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\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}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\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 <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 <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#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\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\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 <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_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 <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 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\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}\n",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\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 <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 <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#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\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\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}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\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>\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#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#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#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <shadowmap_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\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\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 <fog_fragment>\n}\n",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n"},Rl={merge:function(e){for(var t={},n=0;n<e.length;n++){var r=this.clone(e[n]);for(var i in r)t[i]=r[i]}return t},clone:function(e){var t={};for(var n in e){t[n]={};for(var r in e[n]){var i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}},Ll={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};Object.assign(y.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(){function e(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}return function(t,n,r){if(t=Ol.euclideanModulo(t,1),n=Ol.clamp(n,0,1),r=Ol.clamp(r,0,1),0===n)this.r=this.g=this.b=r;else{var i=r<=.5?r*(1+n):r+n-r*n,o=2*r-i;this.r=e(o,i,t+1/3),this.g=e(o,i,t),this.b=e(o,i,t-1/3)}return this}}(),setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,l=parseInt(r[3],10)/100;return t(r[5]),this.setHSL(a,s,l)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var u=n[1],c=u.length;if(3===c)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===c)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}if(e&&e.length>0){var u=Ll[e];void 0!==u?this.setHex(u):console.warn("THREE.Color: Unknown color "+e)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},convertGammaToLinear:function(){var e=this.r,t=this.g,n=this.b;return this.r=e*e,this.g=t*t,this.b=n*n,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),l=(s+a)/2;if(s===a)t=0,n=0;else{var u=a-s;switch(n=l<=.5?u/(a+s):u/(2-a-s),a){case r:t=(i-o)/u+(i<o?6:0);break;case i:t=(o-r)/u+2;break;case o:t=(r-i)/u+4}t/=6}return e.h=t,e.s=n,e.l=l,e},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var e={};return function(t,n,r){return this.getHSL(e),e.h+=t,e.s+=n,e.l+=r,this.setHSL(e.h,e.s,e.l),this}}(),add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},toJSON:function(){return this.getHex()}});var Il={common:{diffuse:{value:new y(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new l},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},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 i(1,1)}},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 y(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new y(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new l}}},kl={basic:{uniforms:Rl.merge([Il.common,Il.specularmap,Il.envmap,Il.aomap,Il.lightmap,Il.fog]),vertexShader:Al.meshbasic_vert,fragmentShader:Al.meshbasic_frag},lambert:{uniforms:Rl.merge([Il.common,Il.specularmap,Il.envmap,Il.aomap,Il.lightmap,Il.emissivemap,Il.fog,Il.lights,{emissive:{value:new y(0)}}]),vertexShader:Al.meshlambert_vert,fragmentShader:Al.meshlambert_frag},phong:{uniforms:Rl.merge([Il.common,Il.specularmap,Il.envmap,Il.aomap,Il.lightmap,Il.emissivemap,Il.bumpmap,Il.normalmap,Il.displacementmap,Il.gradientmap,Il.fog,Il.lights,{emissive:{value:new y(0)},specular:{value:new y(1118481)},shininess:{value:30}}]),vertexShader:Al.meshphong_vert,fragmentShader:Al.meshphong_frag},standard:{uniforms:Rl.merge([Il.common,Il.envmap,Il.aomap,Il.lightmap,Il.emissivemap,Il.bumpmap,Il.normalmap,Il.displacementmap,Il.roughnessmap,Il.metalnessmap,Il.fog,Il.lights,{emissive:{value:new y(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Al.meshphysical_vert,fragmentShader:Al.meshphysical_frag},points:{uniforms:Rl.merge([Il.points,Il.fog]),vertexShader:Al.points_vert,fragmentShader:Al.points_frag},dashed:{uniforms:Rl.merge([Il.common,Il.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Al.linedashed_vert,fragmentShader:Al.linedashed_frag},depth:{uniforms:Rl.merge([Il.common,Il.displacementmap]),vertexShader:Al.depth_vert,fragmentShader:Al.depth_frag},normal:{uniforms:Rl.merge([Il.common,Il.bumpmap,Il.normalmap,Il.displacementmap,{opacity:{value:1}}]),vertexShader:Al.normal_vert,fragmentShader:Al.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Al.cube_vert,fragmentShader:Al.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Al.equirect_vert,fragmentShader:Al.equirect_frag},distanceRGBA:{uniforms:Rl.merge([Il.common,Il.displacementmap,{referencePosition:{value:new s},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Al.distanceRGBA_vert,fragmentShader:Al.distanceRGBA_frag},shadow:{uniforms:Rl.merge([Il.lights,Il.fog,{color:{value:new y(0)},opacity:{value:1}}]),vertexShader:Al.shadow_vert,fragmentShader:Al.shadow_frag}};kl.physical={uniforms:Rl.merge([kl.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Al.meshphysical_vert,fragmentShader:Al.meshphysical_frag},_.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],_.DefaultOrder="XYZ",Object.defineProperties(_.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(e){this._order=e,this.onChangeCallback()}}}),Object.assign(_.prototype,{isEuler:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,t,n){var r=Ol.clamp,i=e.elements,o=i[0],a=i[4],s=i[8],l=i[1],u=i[5],c=i[9],d=i[2],h=i[6],f=i[10];return t=t||this._order,"XYZ"===t?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-c,f),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(h,u),this._z=0)):"YXZ"===t?(this._x=Math.asin(-r(c,-1,1)),Math.abs(c)<.99999?(this._y=Math.atan2(s,f),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,o),this._z=0)):"ZXY"===t?(this._x=Math.asin(r(h,-1,1)),Math.abs(h)<.99999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(l,o))):"ZYX"===t?(this._y=Math.asin(-r(d,-1,1)),Math.abs(d)<.99999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===t?(this._z=Math.asin(r(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(s,f))):"XZY"===t?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(h,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-c,f),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var e=new o;return function(t,n,r){return e.makeRotationFromQuaternion(t),this.setFromRotationMatrix(e,n,r)}}(),setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:function(){var e=new a;return function(t){return e.setFromEuler(this),this.setFromQuaternion(e,t)}}(),equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new s(this._x,this._y,this._z)},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(w.prototype,{set:function(e){this.mask=1<<e|0},enable:function(e){this.mask|=1<<e|0},toggle:function(e){this.mask^=1<<e|0},disable:function(e){this.mask&=~(1<<e|0)},test:function(e){return 0!=(this.mask&e.mask)}});var Nl=0;x.DefaultUp=new s(0,1,0),x.DefaultMatrixAutoUpdate=!0,x.prototype=Object.assign(Object.create(r.prototype),{constructor:x,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(e){this.matrix.multiplyMatrices(e,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:function(){var e=new a;return function(t,n){return e.setFromAxisAngle(t,n),this.quaternion.multiply(e),this}}(),rotateOnWorldAxis:function(){var e=new a;return function(t,n){return e.setFromAxisAngle(t,n),this.quaternion.premultiply(e),this}}(),rotateX:function(){var e=new s(1,0,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateY:function(){var e=new s(0,1,0);return function(t){return this.rotateOnAxis(e,t)}}(),rotateZ:function(){var e=new s(0,0,1);return function(t){return this.rotateOnAxis(e,t)}}(),translateOnAxis:function(){var e=new s;return function(t,n){return e.copy(t).applyQuaternion(this.quaternion),this.position.add(e.multiplyScalar(n)),this}}(),translateX:function(){var e=new s(1,0,0);return function(t){return this.translateOnAxis(e,t)}}(),translateY:function(){var e=new s(0,1,0);return function(t){return this.translateOnAxis(e,t)}}(),translateZ:function(){var e=new s(0,0,1);return function(t){return this.translateOnAxis(e,t)}}(),localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var e=new o;return function(t){return t.applyMatrix4(e.getInverse(this.matrixWorld))}}(),lookAt:function(){var e=new o,t=new s;return function(n,r,i){n.isVector3?t.copy(n):t.set(n,r,i),this.isCamera?e.lookAt(this.position,t,this.up):e.lookAt(t,this.position,this.up),this.quaternion.setFromRotationMatrix(e)}}(),add:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,e.dispatchEvent({type:"added"}),this.children.push(e)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)},remove:function(e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var n=this.children.indexOf(e);return-1!==n&&(e.parent=null,e.dispatchEvent({type:"removed"}),this.children.splice(n,1)),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n],o=i.getObjectByProperty(e,t);if(void 0!==o)return o}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new s),this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var e=new s,t=new s;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),n=new a),this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,n,t),n}}(),getWorldScale:function(){var e=new s,t=new a;return function(n){return void 0===n&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),n=new s),this.updateMatrixWorld(!0),this.matrixWorld.decompose(e,t,n),n}}(),getWorldDirection:function(){var e=new a;return function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new s),this.getWorldQuaternion(e),t.set(0,0,1).applyQuaternion(e)}}(),raycast:function(){},traverse:function(e){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(var t=this.children,n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)},toJSON:function(e){function t(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}function n(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}var r=void 0===e||"string"==typeof e,i={};r&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{}},i.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var o={};if(o.uuid=this.uuid,o.type=this.type,""!==this.name&&(o.name=this.name),!0===this.castShadow&&(o.castShadow=!0),!0===this.receiveShadow&&(o.receiveShadow=!0),!1===this.visible&&(o.visible=!1),!1===this.frustumCulled&&(o.frustumCulled=!1),0!==this.renderOrder&&(o.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(o.userData=this.userData),o.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(o.matrixAutoUpdate=!1),void 0!==this.geometry){o.geometry=t(e.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var s=a.shapes;if(Array.isArray(s))for(var l=0,u=s.length;l<u;l++){var c=s[l];t(e.shapes,c)}else t(e.shapes,s)}}if(void 0!==this.material)if(Array.isArray(this.material)){for(var d=[],l=0,u=this.material.length;l<u;l++)d.push(t(e.materials,this.material[l]));o.material=d}else o.material=t(e.materials,this.material);if(this.children.length>0){o.children=[];for(var l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(e).object)}if(r){var h=n(e.geometries),f=n(e.materials),p=n(e.textures),m=n(e.images),s=n(e.shapes);h.length>0&&(i.geometries=h),f.length>0&&(i.materials=f),p.length>0&&(i.textures=p),m.length>0&&(i.images=m),s.length>0&&(i.shapes=s)}return i.object=o,i},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;n<e.children.length;n++){var r=e.children[n];this.add(r.clone())}return this}}),E.prototype=Object.assign(Object.create(x.prototype),{constructor:E,isCamera:!0,copy:function(e,t){return x.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this},getWorldDirection:function(){var e=new a;return function(t){return void 0===t&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new s),this.getWorldQuaternion(e),t.set(0,0,-1).applyQuaternion(e)}}(),updateMatrixWorld:function(e){x.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),S.prototype=Object.assign(Object.create(E.prototype),{constructor:S,isOrthographicCamera:!0,copy:function(e,t){return E.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,n,r,i,o){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=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){var l=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),c=(this.right-this.left)/this.view.width,d=(this.top-this.bottom)/this.view.height;i+=c*(this.view.offsetX/l),o=i+c*(this.view.width/l),a-=d*(this.view.offsetY/u),s=a-d*(this.view.height/u)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(e){var t=x.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),Object.assign(M.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,n=e.vertexNormals.length;t<n;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(var t=0,n=e.vertexColors.length;t<n;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}});var Dl=0;T.prototype=Object.assign(Object.create(r.prototype),{constructor:T,isGeometry:!0,applyMatrix:function(e){for(var t=(new l).getNormalMatrix(e),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(e)}for(var n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(t).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var e=new o;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new o;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new o;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new o;return function(t,n,r){return e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e=new o;return function(t,n,r){return e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:function(){var e=new x;return function(t){e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),fromBufferGeometry:function(e){function t(e,t,r,i){var o=void 0!==l?[h[e].clone(),h[t].clone(),h[r].clone()]:[],a=void 0!==u?[n.colors[e].clone(),n.colors[t].clone(),n.colors[r].clone()]:[],s=new M(e,t,r,o,a,i);n.faces.push(s),void 0!==c&&n.faceVertexUvs[0].push([f[e].clone(),f[t].clone(),f[r].clone()]),void 0!==d&&n.faceVertexUvs[1].push([p[e].clone(),p[t].clone(),p[r].clone()])}var n=this,r=null!==e.index?e.index.array:void 0,o=e.attributes,a=o.position.array,l=void 0!==o.normal?o.normal.array:void 0,u=void 0!==o.color?o.color.array:void 0,c=void 0!==o.uv?o.uv.array:void 0,d=void 0!==o.uv2?o.uv2.array:void 0;void 0!==d&&(this.faceVertexUvs[1]=[]);for(var h=[],f=[],p=[],m=0,g=0;m<a.length;m+=3,g+=2)n.vertices.push(new s(a[m],a[m+1],a[m+2])),void 0!==l&&h.push(new s(l[m],l[m+1],l[m+2])),void 0!==u&&n.colors.push(new y(u[m],u[m+1],u[m+2])),void 0!==c&&f.push(new i(c[g],c[g+1])),void 0!==d&&p.push(new i(d[g],d[g+1]));var v=e.groups;if(v.length>0)for(var m=0;m<v.length;m++)for(var b=v[m],_=b.start,w=b.count,g=_,x=_+w;g<x;g+=3)void 0!==r?t(r[g],r[g+1],r[g+2],b.materialIndex):t(g,g+1,g+2,b.materialIndex);else if(void 0!==r)for(var m=0;m<r.length;m+=3)t(r[m],r[m+1],r[m+2]);else for(var m=0;m<a.length/3;m+=3)t(m,m+1,m+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:function(){var e=new s;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(e).negate(),this.translate(e.x,e.y,e.z),this}}(),normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,n=0===t?1:1/t,r=new o;return r.set(n,0,0,-n*e.x,0,n,0,-n*e.y,0,0,n,-n*e.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var e=new s,t=new s,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],l=this.vertices[i.c];e.subVectors(l,a),t.subVectors(o,a),e.cross(t),e.normalize(),i.normal.copy(e)}},computeVertexNormals:function(e){void 0===e&&(e=!0);var t,n,r,i,o,a;for(a=new Array(this.vertices.length),t=0,n=this.vertices.length;t<n;t++)a[t]=new s;if(e){var l,u,c,d=new s,h=new s;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],l=this.vertices[o.a],u=this.vertices[o.b],c=this.vertices[o.c],d.subVectors(c,u),h.subVectors(l,u),d.cross(h),a[o.a].add(d),a[o.b].add(d),a[o.c].add(d)}else for(this.computeFaceNormals(),r=0,i=this.faces.length;r<i;r++)o=this.faces[r],a[o.a].add(o.normal),a[o.b].add(o.normal),a[o.c].add(o.normal);for(t=0,n=this.vertices.length;t<n;t++)a[t].normalize();for(r=0,i=this.faces.length;r<i;r++){o=this.faces[r];var f=o.vertexNormals;3===f.length?(f[0].copy(a[o.a]),f[1].copy(a[o.b]),f[2].copy(a[o.c])):(f[0]=a[o.a].clone(),f[1]=a[o.b].clone(),f[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,n;for(this.computeFaceNormals(),e=0,t=this.faces.length;e<t;e++){n=this.faces[e];var r=n.vertexNormals;3===r.length?(r[0].copy(n.normal),r[1].copy(n.normal),r[2].copy(n.normal)):(r[0]=n.normal.clone(),r[1]=n.normal.clone(),r[2]=n.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,n,r,i;for(n=0,r=this.faces.length;n<r;n++)for(i=this.faces[n],i.__originalFaceNormal?i.__originalFaceNormal.copy(i.normal):i.__originalFaceNormal=i.normal.clone(),i.__originalVertexNormals||(i.__originalVertexNormals=[]),e=0,t=i.vertexNormals.length;e<t;e++)i.__originalVertexNormals[e]?i.__originalVertexNormals[e].copy(i.vertexNormals[e]):i.__originalVertexNormals[e]=i.vertexNormals[e].clone();var o=new T;for(o.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];var a,l,u=this.morphNormals[e].faceNormals,c=this.morphNormals[e].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)a=new s,l={a:new s,b:new s,c:new s},u.push(a),c.push(l)}var d=this.morphNormals[e];o.vertices=this.morphTargets[e].vertices,o.computeFaceNormals(),o.computeVertexNormals();var a,l;for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],a=d.faceNormals[n],l=d.vertexNormals[n],a.copy(i.normal),l.a.copy(i.vertexNormals[0]),l.b.copy(i.vertexNormals[1]),l.c.copy(i.vertexNormals[2])}for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],i.normal=i.__originalFaceNormal,i.vertexNormals=i.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new p),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new m),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,n){if(!e||!e.isGeometry)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e);var r,i=this.vertices.length,o=this.vertices,a=e.vertices,s=this.faces,u=e.faces,c=this.faceVertexUvs[0],d=e.faceVertexUvs[0],h=this.colors,f=e.colors;void 0===n&&(n=0),void 0!==t&&(r=(new l).getNormalMatrix(t));for(var p=0,m=a.length;p<m;p++){var g=a[p],v=g.clone();void 0!==t&&v.applyMatrix4(t),o.push(v)}for(var p=0,m=f.length;p<m;p++)h.push(f[p].clone());for(p=0,m=u.length;p<m;p++){var y,b,_,w=u[p],x=w.vertexNormals,E=w.vertexColors;y=new M(w.a+i,w.b+i,w.c+i),y.normal.copy(w.normal),void 0!==r&&y.normal.applyMatrix3(r).normalize();for(var S=0,T=x.length;S<T;S++)b=x[S].clone(),void 0!==r&&b.applyMatrix3(r).normalize(),y.vertexNormals.push(b);y.color.copy(w.color);for(var S=0,T=E.length;S<T;S++)_=E[S],y.vertexColors.push(_.clone());y.materialIndex=w.materialIndex+n,s.push(y)}for(p=0,m=d.length;p<m;p++){var C=d[p],O=[];if(void 0!==C){for(var S=0,T=C.length;S<T;S++)O.push(C[S].clone());c.push(O)}}},mergeMesh:function(e){if(!e||!e.isMesh)return void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e);e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)},mergeVertices:function(){var e,t,n,r,i,o,a,s,l={},u=[],c=[],d=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)e=this.vertices[n],t=Math.round(e.x*d)+"_"+Math.round(e.y*d)+"_"+Math.round(e.z*d),void 0===l[t]?(l[t]=n,u.push(this.vertices[n]),c[n]=u.length-1):c[n]=c[l[t]];var h=[];for(n=0,r=this.faces.length;n<r;n++){i=this.faces[n],i.a=c[i.a],i.b=c[i.b],i.c=c[i.c],o=[i.a,i.b,i.c];for(var f=0;f<3;f++)if(o[f]===o[(f+1)%3]){h.push(n);break}}for(n=h.length-1;n>=0;n--){var p=h[n];for(this.faces.splice(p,1),a=0,s=this.faceVertexUvs.length;a<s;a++)this.faceVertexUvs[a].splice(p,1)}var m=this.vertices.length-u.length;return this.vertices=u,m},setFromPoints:function(e){this.vertices=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];this.vertices.push(new s(r.x,r.y,r.z||0))}return this},sortFacesByMaterialIndex:function(){function e(e,t){return e.materialIndex-t.materialIndex}for(var t=this.faces,n=t.length,r=0;r<n;r++)t[r]._id=r;t.sort(e);var i,o,a=this.faceVertexUvs[0],s=this.faceVertexUvs[1];a&&a.length===n&&(i=[]),s&&s.length===n&&(o=[]);for(var r=0;r<n;r++){var l=t[r]._id;i&&i.push(a[l]),o&&o.push(s[l])}i&&(this.faceVertexUvs[0]=i),o&&(this.faceVertexUvs[1]=o)},toJSON:function(){function e(e,t,n){return n?e|1<<t:e&~(1<<t)}function t(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==h[t]?h[t]:(h[t]=d.length/3,d.push(e.x,e.y,e.z),h[t])}function n(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==p[t]?p[t]:(p[t]=f.length,f.push(e.getHex()),p[t])}function r(e){var t=e.x.toString()+e.y.toString();return void 0!==g[t]?g[t]:(g[t]=m.length/2,m.push(e.x,e.y),g[t])}var i={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),void 0!==this.parameters){var o=this.parameters;for(var a in o)void 0!==o[a]&&(i[a]=o[a]);return i}for(var s=[],l=0;l<this.vertices.length;l++){var u=this.vertices[l];s.push(u.x,u.y,u.z)}for(var c=[],d=[],h={},f=[],p={},m=[],g={},l=0;l<this.faces.length;l++){var v=this.faces[l],y=void 0!==this.faceVertexUvs[0][l],b=v.normal.length()>0,_=v.vertexNormals.length>0,w=1!==v.color.r||1!==v.color.g||1!==v.color.b,x=v.vertexColors.length>0,E=0;if(E=e(E,0,0),E=e(E,1,!0),E=e(E,2,!1),E=e(E,3,y),E=e(E,4,b),E=e(E,5,_),E=e(E,6,w),E=e(E,7,x),c.push(E),c.push(v.a,v.b,v.c),c.push(v.materialIndex),y){var S=this.faceVertexUvs[0][l];c.push(r(S[0]),r(S[1]),r(S[2]))}if(b&&c.push(t(v.normal)),_){var M=v.vertexNormals;c.push(t(M[0]),t(M[1]),t(M[2]))}if(w&&c.push(n(v.color)),x){var T=v.vertexColors;c.push(n(T[0]),n(T[1]),n(T[2]))}}return i.data={},i.data.vertices=s,i.data.normals=d,f.length>0&&(i.data.colors=f),m.length>0&&(i.data.uvs=[m]),i.data.faces=c,i},clone:function(){return(new T).copy(this)},copy:function(e){var t,n,r,i,o,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var s=e.vertices;for(t=0,n=s.length;t<n;t++)this.vertices.push(s[t].clone());var l=e.colors;for(t=0,n=l.length;t<n;t++)this.colors.push(l[t].clone());var u=e.faces;for(t=0,n=u.length;t<n;t++)this.faces.push(u[t].clone());for(t=0,n=e.faceVertexUvs.length;t<n;t++){var c=e.faceVertexUvs[t];for(void 0===this.faceVertexUvs[t]&&(this.faceVertexUvs[t]=[]),r=0,i=c.length;r<i;r++){var d=c[r],h=[];for(o=0,a=d.length;o<a;o++){var f=d[o];h.push(f.clone())}this.faceVertexUvs[t].push(h)}}var p=e.morphTargets;for(t=0,n=p.length;t<n;t++){var m={};if(m.name=p[t].name,void 0!==p[t].vertices)for(m.vertices=[],r=0,i=p[t].vertices.length;r<i;r++)m.vertices.push(p[t].vertices[r].clone());if(void 0!==p[t].normals)for(m.normals=[],r=0,i=p[t].normals.length;r<i;r++)m.normals.push(p[t].normals[r].clone());this.morphTargets.push(m)}var g=e.morphNormals;for(t=0,n=g.length;t<n;t++){var v={};if(void 0!==g[t].vertexNormals)for(v.vertexNormals=[],r=0,i=g[t].vertexNormals.length;r<i;r++){var y=g[t].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),v.vertexNormals.push(b)}if(void 0!==g[t].faceNormals)for(v.faceNormals=[],r=0,i=g[t].faceNormals.length;r<i;r++)v.faceNormals.push(g[t].faceNormals[r].clone());this.morphNormals.push(v)}var _=e.skinWeights;for(t=0,n=_.length;t<n;t++)this.skinWeights.push(_[t].clone());var w=e.skinIndices;for(t=0,n=w.length;t<n;t++)this.skinIndices.push(w[t].clone());var x=e.lineDistances;for(t=0,n=x.length;t<n;t++)this.lineDistances.push(x[t]);var E=e.boundingBox;null!==E&&(this.boundingBox=E.clone());var S=e.boundingSphere;return null!==S&&(this.boundingSphere=S.clone()),this.elementsNeedUpdate=e.elementsNeedUpdate,this.verticesNeedUpdate=e.verticesNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.lineDistancesNeedUpdate=e.lineDistancesNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(C.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(C.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==e?e.length/this.itemSize:0,this.array=e,this},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new y),t[n++]=o.r,t[n++]=o.g,t[n++]=o.b}return this},copyVector2sArray:function(e){for(var t=this.array,n=0,r=0,o=e.length;r<o;r++){var a=e[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),a=new i),t[n++]=a.x,t[n++]=a.y}return this},copyVector3sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new s),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z}return this},copyVector4sArray:function(e){for(var t=this.array,n=0,r=0,i=e.length;r<i;r++){var o=e[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new c),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z,t[n++]=o.w}return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),O.prototype=Object.create(C.prototype),O.prototype.constructor=O,P.prototype=Object.create(C.prototype),P.prototype.constructor=P,A.prototype=Object.create(C.prototype),A.prototype.constructor=A,R.prototype=Object.create(C.prototype),R.prototype.constructor=R,L.prototype=Object.create(C.prototype),L.prototype.constructor=L,I.prototype=Object.create(C.prototype),I.prototype.constructor=I,k.prototype=Object.create(C.prototype),k.prototype.constructor=k,N.prototype=Object.create(C.prototype),N.prototype.constructor=N,D.prototype=Object.create(C.prototype),D.prototype.constructor=D,Object.assign(j.prototype,{computeGroups:function(e){for(var t,n=[],r=void 0,i=e.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==t&&(t.count=3*o-t.start,n.push(t)),t={start:3*o,materialIndex:r})}void 0!==t&&(t.count=3*o-t.start,n.push(t)),this.groups=n},fromGeometry:function(e){var t,n=e.faces,r=e.vertices,o=e.faceVertexUvs,a=o[0]&&o[0].length>0,s=o[1]&&o[1].length>0,l=e.morphTargets,u=l.length;if(u>0){t=[];for(var c=0;c<u;c++)t[c]=[];this.morphTargets.position=t}var d,h=e.morphNormals,f=h.length;if(f>0){d=[];for(var c=0;c<f;c++)d[c]=[];this.morphTargets.normal=d}for(var p=e.skinIndices,m=e.skinWeights,g=p.length===r.length,v=m.length===r.length,c=0;c<n.length;c++){var y=n[c];this.vertices.push(r[y.a],r[y.b],r[y.c]);var b=y.vertexNormals;if(3===b.length)this.normals.push(b[0],b[1],b[2]);else{var _=y.normal;this.normals.push(_,_,_)}var w=y.vertexColors;if(3===w.length)this.colors.push(w[0],w[1],w[2]);else{var x=y.color;this.colors.push(x,x,x)}if(!0===a){var E=o[0][c];void 0!==E?this.uvs.push(E[0],E[1],E[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",c),this.uvs.push(new i,new i,new i))}if(!0===s){var E=o[1][c];void 0!==E?this.uvs2.push(E[0],E[1],E[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",c),this.uvs2.push(new i,new i,new i))}for(var S=0;S<u;S++){var M=l[S].vertices;t[S].push(M[y.a],M[y.b],M[y.c])}for(var S=0;S<f;S++){var T=h[S].vertexNormals[c];d[S].push(T.a,T.b,T.c)}g&&this.skinIndices.push(p[y.a],p[y.b],p[y.c]),v&&this.skinWeights.push(m[y.a],m[y.b],m[y.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this}});var jl=1;F.prototype=Object.assign(Object.create(r.prototype),{constructor:F,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){Array.isArray(e)?this.index=new(U(e)>65535?k:L)(e,1):this.index=e},addAttribute:function(e,t){return t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(t)):(this.attributes[e]=t,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(e,new C(arguments[1],arguments[2])))},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){(new l).getNormalMatrix(e).applyToBufferAttribute(n),n.needsUpdate=!0}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var e=new o;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new o;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new o;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new o;return function(t,n,r){return e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e=new o;return function(t,n,r){return e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:function(){var e=new x;return function(t){e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),center:function(){var e=new s;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(e).negate(),this.translate(e.x,e.y,e.z),this}}(),setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var n=new N(3*t.vertices.length,3),r=new N(3*t.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(t.vertices)),this.addAttribute("color",r.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var i=new N(t.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.x,i.y,i.z||0)}return this.addAttribute("position",new N(t,3)),this},updateFromObject:function(e){var t=e.geometry;if(e.isMesh){var n=t.__directGeometry;if(!0===t.elementsNeedUpdate&&(n=void 0,t.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(t);n.verticesNeedUpdate=t.verticesNeedUpdate,n.normalsNeedUpdate=t.normalsNeedUpdate,n.colorsNeedUpdate=t.colorsNeedUpdate,n.uvsNeedUpdate=t.uvsNeedUpdate,n.groupsNeedUpdate=t.groupsNeedUpdate,t.verticesNeedUpdate=!1,t.normalsNeedUpdate=!1,t.colorsNeedUpdate=!1,t.uvsNeedUpdate=!1,t.groupsNeedUpdate=!1,t=n}var r;return!0===t.verticesNeedUpdate&&(r=this.attributes.position,void 0!==r&&(r.copyVector3sArray(t.vertices),r.needsUpdate=!0),t.verticesNeedUpdate=!1),!0===t.normalsNeedUpdate&&(r=this.attributes.normal,void 0!==r&&(r.copyVector3sArray(t.normals),r.needsUpdate=!0),t.normalsNeedUpdate=!1),!0===t.colorsNeedUpdate&&(r=this.attributes.color,void 0!==r&&(r.copyColorsArray(t.colors),r.needsUpdate=!0),t.colorsNeedUpdate=!1),t.uvsNeedUpdate&&(r=this.attributes.uv,void 0!==r&&(r.copyVector2sArray(t.uvs),r.needsUpdate=!0),t.uvsNeedUpdate=!1),t.lineDistancesNeedUpdate&&(r=this.attributes.lineDistance,void 0!==r&&(r.copyArray(t.lineDistances),r.needsUpdate=!0),t.lineDistancesNeedUpdate=!1),t.groupsNeedUpdate&&(t.computeGroups(e.geometry),this.groups=t.groups,t.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new j).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.addAttribute("position",new C(t,3).copyVector3sArray(e.vertices)),e.normals.length>0){var n=new Float32Array(3*e.normals.length);this.addAttribute("normal",new C(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var r=new Float32Array(3*e.colors.length);this.addAttribute("color",new C(r,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var i=new Float32Array(2*e.uvs.length);this.addAttribute("uv",new C(i,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var o=new Float32Array(2*e.uvs2.length);this.addAttribute("uv2",new C(o,2).copyVector2sArray(e.uvs2))}this.groups=e.groups;for(var a in e.morphTargets){for(var s=[],l=e.morphTargets[a],u=0,c=l.length;u<c;u++){var d=l[u],h=new N(3*d.length,3);s.push(h.copyVector3sArray(d))}this.morphAttributes[a]=s}if(e.skinIndices.length>0){var f=new N(4*e.skinIndices.length,4);this.addAttribute("skinIndex",f.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var p=new N(4*e.skinWeights.length,4);this.addAttribute("skinWeight",p.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new p);var e=this.attributes.position;void 0!==e?this.boundingBox.setFromBufferAttribute(e):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:function(){var e=new p,t=new s;return function(){null===this.boundingSphere&&(this.boundingSphere=new m);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;e.setFromBufferAttribute(n),e.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)t.x=n.getX(o),t.y=n.getY(o),t.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(t));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes,n=this.groups;if(t.position){var r=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new C(new Float32Array(r.length),3));else for(var i=t.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var l,u,c,d=t.normal.array,h=new s,f=new s,p=new s,m=new s,g=new s;if(e){var v=e.array;0===n.length&&this.addGroup(0,v.length);for(var y=0,b=n.length;y<b;++y)for(var _=n[y],w=_.start,x=_.count,o=w,a=w+x;o<a;o+=3)l=3*v[o+0],u=3*v[o+1],c=3*v[o+2],h.fromArray(r,l),f.fromArray(r,u),p.fromArray(r,c),m.subVectors(p,f),g.subVectors(h,f),m.cross(g),d[l]+=m.x,d[l+1]+=m.y,d[l+2]+=m.z,d[u]+=m.x,d[u+1]+=m.y,d[u+2]+=m.z,d[c]+=m.x,d[c+1]+=m.y,d[c+2]+=m.z}else for(var o=0,a=r.length;o<a;o+=9)h.fromArray(r,o),f.fromArray(r,o+3),p.fromArray(r,o+6),m.subVectors(p,f),g.subVectors(h,f),m.cross(g),d[o]=m.x,d[o+1]=m.y,d[o+2]=m.z,d[o+3]=m.x,d[o+4]=m.y,d[o+5]=m.z,d[o+6]=m.x,d[o+7]=m.y,d[o+8]=m.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var n=this.attributes;for(var r in n)if(void 0!==e.attributes[r])for(var i=n[r],o=i.array,a=e.attributes[r],s=a.array,l=a.itemSize,u=0,c=l*t;u<s.length;u++,c++)o[c]=s[u];return this},normalizeNormals:function(){var e=new s;return function(){for(var t=this.attributes.normal,n=0,r=t.count;n<r;n++)e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.normalize(),t.setXYZ(n,e.x,e.y,e.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var e=new F,t=this.index.array,n=this.attributes;for(var r in n){for(var i=n[r],o=i.array,a=i.itemSize,s=new o.constructor(t.length*a),l=0,u=0,c=0,d=t.length;c<d;c++){l=t[c]*a;for(var h=0;h<a;h++)s[u++]=o[l++]}e.addAttribute(r,new C(s,a))}for(var f=this.groups,c=0,d=f.length;c<d;c++){var p=f[c];e.addGroup(p.start,p.count,p.materialIndex)}return e},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);e.data.index={type:r.array.constructor.name,array:i}}var o=this.attributes;for(var n in o){var a=o[n],i=Array.prototype.slice.call(a.array);e.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));var l=this.boundingSphere;return null!==l&&(e.data.boundingSphere={center:l.center.toArray(),radius:l.radius}),e},clone:function(){return(new F).copy(this)},copy:function(e){var t,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var i=e.index;null!==i&&this.setIndex(i.clone());var o=e.attributes;for(t in o){var a=o[t];this.addAttribute(t,a.clone())}var s=e.morphAttributes;for(t in s){var l=[],u=s[t];for(n=0,r=u.length;n<r;n++)l.push(u[n].clone());this.morphAttributes[t]=l}var c=e.groups;for(n=0,r=c.length;n<r;n++){var d=c[n];this.addGroup(d.start,d.count,d.materialIndex)}var h=e.boundingBox;null!==h&&(this.boundingBox=h.clone());var f=e.boundingSphere;return null!==f&&(this.boundingSphere=f.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),B.prototype=Object.create(T.prototype),B.prototype.constructor=B,z.prototype=Object.create(F.prototype),z.prototype.constructor=z,H.prototype=Object.create(T.prototype),H.prototype.constructor=H,V.prototype=Object.create(F.prototype),V.prototype.constructor=V;var Ul=0;G.prototype=Object.assign(Object.create(r.prototype),{constructor:G,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]="overdraw"===t?Number(n):n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===da;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){function t(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}var n=void 0===e||"string"==typeof e;n&&(e={textures:{},images:{}});var r={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),void 0!==this.roughness&&(r.roughness=this.roughness),void 0!==this.metalness&&(r.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),void 0!==this.shininess&&(r.shininess=this.shininess),void 0!==this.clearCoat&&(r.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(r.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,r.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==va&&(r.blending=this.blending),!0===this.flatShading&&(r.flatShading=this.flatShading),this.side!==la&&(r.side=this.side),this.vertexColors!==fa&&(r.vertexColors=this.vertexColors),this.opacity<1&&(r.opacity=this.opacity),!0===this.transparent&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,0!==this.rotation&&(r.rotation=this.rotation),1!==this.linewidth&&(r.linewidth=this.linewidth),void 0!==this.dashSize&&(r.dashSize=this.dashSize),void 0!==this.gapSize&&(r.gapSize=this.gapSize),void 0!==this.scale&&(r.scale=this.scale),!0===this.dithering&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(r.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(r.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(r.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(r.morphTargets=!0),!0===this.skinning&&(r.skinning=!0),!1===this.visible&&(r.visible=!1),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),n){var i=t(e.textures),o=t(e.images);i.length>0&&(r.textures=i),o.length>0&&(r.images=o)}return r},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.lights=e.lights,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.overdraw=e.overdraw,this.visible=e.visible,this.userData=JSON.parse(JSON.stringify(e.userData)),this.clipShadows=e.clipShadows,this.clipIntersection=e.clipIntersection;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.shadowSide=e.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),W.prototype=Object.create(G.prototype),W.prototype.constructor=W,W.prototype.isMeshBasicMaterial=!0,W.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},q.prototype=Object.create(G.prototype),q.prototype.constructor=q,q.prototype.isShaderMaterial=!0,q.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Rl.clone(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},q.prototype.toJSON=function(e){var t=G.prototype.toJSON.call(this,e);return t.uniforms=this.uniforms,t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t},Object.assign(X.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new s),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(){var e=new s;return function(t){return this.origin.copy(this.at(t,e)),this}}(),closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new s),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(){var e=new s;return function(t){var n=e.subVectors(t,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(t):(e.copy(this.direction).multiplyScalar(n).add(this.origin),e.distanceToSquared(t))}}(),distanceSqToSegment:function(){var e=new s,t=new s,n=new s;return function(r,i,o,a){e.copy(r).add(i).multiplyScalar(.5),t.copy(i).sub(r).normalize(),n.copy(this.origin).sub(e);var s,l,u,c,d=.5*r.distanceTo(i),h=-this.direction.dot(t),f=n.dot(this.direction),p=-n.dot(t),m=n.lengthSq(),g=Math.abs(1-h*h);if(g>0)if(s=h*p-f,l=h*f-p,c=d*g,s>=0)if(l>=-c)if(l<=c){var v=1/g;s*=v,l*=v,u=s*(s+h*l+2*f)+l*(h*s+l+2*p)+m}else l=d,s=Math.max(0,-(h*l+f)),u=-s*s+l*(l+2*p)+m;else l=-d,s=Math.max(0,-(h*l+f)),u=-s*s+l*(l+2*p)+m;else l<=-c?(s=Math.max(0,-(-h*d+f)),l=s>0?-d:Math.min(Math.max(-d,-p),d),u=-s*s+l*(l+2*p)+m):l<=c?(s=0,l=Math.min(Math.max(-d,-p),d),u=l*(l+2*p)+m):(s=Math.max(0,-(h*d+f)),l=s>0?d:Math.min(Math.max(-d,-p),d),u=-s*s+l*(l+2*p)+m);else l=h>0?-d:d,s=Math.max(0,-(h*l+f)),u=-s*s+l*(l+2*p)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(t).multiplyScalar(l).add(e),u}}(),intersectSphere:function(){var e=new s;return function(t,n){e.subVectors(t.center,this.origin);var r=e.dot(this.direction),i=e.dot(e)-r*r,o=t.radius*t.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,l=r+a;return s<0&&l<0?null:s<0?this.at(l,n):this.at(s,n)}}(),intersectsSphere:function(e){return this.distanceToPoint(e.center)<=e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},intersectPlane:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var n,r,i,o,a,s,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,r=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,r=(e.min.x-d.x)*l),u>=0?(i=(e.min.y-d.y)*u,o=(e.max.y-d.y)*u):(i=(e.max.y-d.y)*u,o=(e.min.y-d.y)*u),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),c>=0?(a=(e.min.z-d.z)*c,s=(e.max.z-d.z)*c):(a=(e.max.z-d.z)*c,s=(e.min.z-d.z)*c),n>s||a>r?null:((a>n||n!==n)&&(n=a),(s<r||r!==r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))},intersectsBox:function(){var e=new s;return function(t){return null!==this.intersectBox(t,e)}}(),intersectTriangle:function(){var e=new s,t=new s,n=new s,r=new s;return function(i,o,a,s,l){t.subVectors(o,i),n.subVectors(a,i),r.crossVectors(t,n);var u,c=this.direction.dot(r);if(c>0){if(s)return null;u=1}else{if(!(c<0))return null;u=-1,c=-c}e.subVectors(this.origin,i);var d=u*this.direction.dot(n.crossVectors(e,n));if(d<0)return null;var h=u*this.direction.dot(t.cross(e));if(h<0)return null;if(d+h>c)return null;var f=-u*e.dot(r);return f<0?null:this.at(f/c,l)}}(),applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}}),Object.assign(Y.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new s),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new s),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new s),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(){var e=new s,t=new s;return function(n,r){e.subVectors(n,this.start),t.subVectors(this.end,this.start);var i=t.dot(t),o=t.dot(e),a=o/i;return r&&(a=Ol.clamp(a,0,1)),a}}(),closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new s),this.delta(n).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),Object.assign(Z,{getNormal:function(){var e=new s;return function(t,n,r,i){void 0===i&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new s),i.subVectors(r,n),e.subVectors(t,n),i.cross(e);var o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}}(),getBarycoord:function(){var e=new s,t=new s,n=new s;return function(r,i,o,a,l){e.subVectors(a,i),t.subVectors(o,i),n.subVectors(r,i);var u=e.dot(e),c=e.dot(t),d=e.dot(n),h=t.dot(t),f=t.dot(n),p=u*h-c*c;if(void 0===l&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),l=new s),0===p)return l.set(-2,-1,-1);var m=1/p,g=(h*d-c*f)*m,v=(u*f-c*d)*m;return l.set(1-g-v,v,g)}}(),containsPoint:function(){var e=new s;return function(t,n,r,i){return Z.getBarycoord(t,n,r,i,e),e.x>=0&&e.y>=0&&e.x+e.y<=1}}()}),Object.assign(Z.prototype,{set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:function(){var e=new s,t=new s;return function(){return e.subVectors(this.c,this.b),t.subVectors(this.a,this.b),.5*e.cross(t).length()}}(),getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new s),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return Z.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new s),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return Z.getBarycoord(e,this.a,this.b,this.c,t)},containsPoint:function(e){return Z.containsPoint(e,this.a,this.b,this.c)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:function(){var e=new g,t=[new Y,new Y,new Y],n=new s,r=new s;return function(i,o){void 0===o&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),o=new s);var a=1/0;if(e.setFromCoplanarPoints(this.a,this.b,this.c),e.projectPoint(i,n),!0===this.containsPoint(n))o.copy(n);else{t[0].set(this.a,this.b),t[1].set(this.b,this.c),t[2].set(this.c,this.a);for(var l=0;l<t.length;l++){t[l].closestPointToPoint(n,!0,r);var u=n.distanceToSquared(r);u<a&&(a=u,o.copy(r))}}return o}}(),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}),K.prototype=Object.assign(Object.create(x.prototype),{constructor:K,isMesh:!0,setDrawMode:function(e){this.drawMode=e},copy:function(e){return x.prototype.copy.call(this,e),this.drawMode=e.drawMode,void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this},updateMorphTargets:function(){var e,t,n,r=this.geometry;if(r.isBufferGeometry){var i=r.morphAttributes,o=Object.keys(i);if(o.length>0){var a=i[o[0]];if(void 0!==a)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=a.length;e<t;e++)n=a[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}}else{var s=r.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=s.length;e<t;e++)n=s[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=e}},raycast:function(){function e(e,t,n,r,i,o,a){return Z.getBarycoord(e,t,n,r,b),i.multiplyScalar(b.x),o.multiplyScalar(b.y),a.multiplyScalar(b.z),i.add(o).add(a),i.clone()}function t(e,t,n,r,i,o,a,s){if(null===(t.side===ua?r.intersectTriangle(a,o,i,!0,s):r.intersectTriangle(i,o,a,t.side!==ca,s)))return null;w.copy(s),w.applyMatrix4(e.matrixWorld);var l=n.ray.origin.distanceTo(w);return l<n.near||l>n.far?null:{distance:l,point:w.clone(),object:e}}function n(n,r,i,o,a,s,l,h){u.fromBufferAttribute(o,s),c.fromBufferAttribute(o,l),d.fromBufferAttribute(o,h);var f=t(n,n.material,r,i,u,c,d,_);if(f){a&&(g.fromBufferAttribute(a,s),v.fromBufferAttribute(a,l),y.fromBufferAttribute(a,h),f.uv=e(_,u,c,d,g,v,y));var p=new M(s,l,h);Z.getNormal(u,c,d,p.normal),f.face=p,f.faceIndex=s}return f}var r=new o,a=new X,l=new m,u=new s,c=new s,d=new s,h=new s,f=new s,p=new s,g=new i,v=new i,y=new i,b=new s,_=new s,w=new s;return function(i,o){var s=this.geometry,m=this.material,b=this.matrixWorld;if(void 0!==m&&(null===s.boundingSphere&&s.computeBoundingSphere(),l.copy(s.boundingSphere),l.applyMatrix4(b),!1!==i.ray.intersectsSphere(l)&&(r.getInverse(b),a.copy(i.ray).applyMatrix4(r),null===s.boundingBox||!1!==a.intersectsBox(s.boundingBox)))){var w;if(s.isBufferGeometry){var x,E,S,M,T,C=s.index,O=s.attributes.position,P=s.attributes.uv;if(null!==C)for(M=0,T=C.count;M<T;M+=3)x=C.getX(M),E=C.getX(M+1),S=C.getX(M+2),(w=n(this,i,a,O,P,x,E,S))&&(w.faceIndex=Math.floor(M/3),o.push(w));else if(void 0!==O)for(M=0,T=O.count;M<T;M+=3)x=M,E=M+1,S=M+2,(w=n(this,i,a,O,P,x,E,S))&&o.push(w)}else if(s.isGeometry){var A,R,L,I,k=Array.isArray(m),N=s.vertices,D=s.faces,j=s.faceVertexUvs[0];j.length>0&&(I=j);for(var U=0,F=D.length;U<F;U++){var B=D[U],z=k?m[B.materialIndex]:m;if(void 0!==z){if(A=N[B.a],R=N[B.b],L=N[B.c],!0===z.morphTargets){var H=s.morphTargets,V=this.morphTargetInfluences;u.set(0,0,0),c.set(0,0,0),d.set(0,0,0);for(var G=0,W=H.length;G<W;G++){var q=V[G];if(0!==q){var X=H[G].vertices;u.addScaledVector(h.subVectors(X[B.a],A),q),c.addScaledVector(f.subVectors(X[B.b],R),q),d.addScaledVector(p.subVectors(X[B.c],L),q)}}u.add(A),c.add(R),d.add(L),A=u,R=c,L=d}if(w=t(this,z,i,a,A,R,L,_)){if(I&&I[U]){var Y=I[U];g.copy(Y[0]),v.copy(Y[1]),y.copy(Y[2]),w.uv=e(_,A,R,L,g,v,y)}w.face=B,w.faceIndex=U,o.push(w)}}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),le.prototype=Object.create(u.prototype),le.prototype.constructor=le,le.prototype.isCubeTexture=!0,Object.defineProperty(le.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var Fl=new u,Bl=new le,zl=[],Hl=[],Vl=new Float32Array(16),Gl=new Float32Array(9);Fe.prototype.setValue=function(e,t){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(e,t[o.id])}};var Wl=/([\w\d_]+)(\])?(\[|\.)?/g;He.prototype.setValue=function(e,t,n){var r=this.map[t];void 0!==r&&r.setValue(e,n,this.renderer)},He.prototype.setOptional=function(e,t,n){var r=t[n];void 0!==r&&this.setValue(e,n,r)},He.upload=function(e,t,n,r){for(var i=0,o=t.length;i!==o;++i){var a=t[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,r)}},He.seqWithValue=function(e,t){for(var n=[],r=0,i=e.length;r!==i;++r){var o=e[r];o.id in t&&n.push(o)}return n};var ql=0,Xl=0;pt.prototype=Object.create(G.prototype),pt.prototype.constructor=pt,pt.prototype.isMeshDepthMaterial=!0,pt.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},mt.prototype=Object.create(G.prototype),mt.prototype.constructor=mt,mt.prototype.isMeshDistanceMaterial=!0,mt.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this},vt.prototype=Object.create(u.prototype),vt.prototype.constructor=vt,xt.prototype=Object.assign(Object.create(E.prototype),{constructor:xt,isPerspectiveCamera:!0,copy:function(e,t){return E.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*Ol.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*Ol.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*Ol.RAD2DEG*Math.atan(Math.tan(.5*Ol.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,i,o){this.aspect=e/t,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=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*Ol.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==this.view&&this.view.enabled){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,t-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var l=this.filmOffset;0!==l&&(i+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far)},toJSON:function(e){var t=x.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),Et.prototype=Object.assign(Object.create(xt.prototype),{constructor:Et,isArrayCamera:!0}),Tt.prototype.isFogExp2=!0,Tt.prototype.clone=function(){return new Tt(this.color.getHex(),this.density)},Tt.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Ct.prototype.isFog=!0,Ct.prototype.clone=function(){return new Ct(this.color.getHex(),this.near,this.far)},Ct.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Ot.prototype=Object.assign(Object.create(x.prototype),{constructor:Ot,copy:function(e,t){return x.prototype.copy.call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},toJSON:function(e){var t=x.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}),Pt.prototype=Object.create(G.prototype),Pt.prototype.constructor=Pt,Pt.prototype.isSpriteMaterial=!0,Pt.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.rotation=e.rotation,this},At.prototype=Object.assign(Object.create(x.prototype),{constructor:At,isSprite:!0,raycast:function(){var e=new s,t=new s,n=new s;return function(r,i){t.setFromMatrixPosition(this.matrixWorld),r.ray.closestPointToPoint(t,e),n.setFromMatrixScale(this.matrixWorld);var o=n.x*n.y/4;if(!(t.distanceToSquared(e)>o)){var a=r.ray.origin.distanceTo(e);a<r.near||a>r.far||i.push({distance:a,point:e.clone(),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return x.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),Rt.prototype=Object.assign(Object.create(x.prototype),{constructor:Rt,copy:function(e){x.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n<r;n++){var i=t[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var n=this.levels,r=0;r<n.length&&!(t<n[r].distance);r++);n.splice(r,0,{distance:t,object:e}),this.add(e)},getObjectForDistance:function(e){for(var t=this.levels,n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object},raycast:function(){var e=new s;return function(t,n){e.setFromMatrixPosition(this.matrixWorld);var r=t.ray.origin.distanceTo(e);this.getObjectForDistance(r).raycast(t,n)}}(),update:function(){var e=new s,t=new s;return function(n){var r=this.levels;if(r.length>1){e.setFromMatrixPosition(n.matrixWorld),t.setFromMatrixPosition(this.matrixWorld);var i=e.distanceTo(t);r[0].object.visible=!0;for(var o=1,a=r.length;o<a&&i>=r[o].distance;o++)r[o-1].object.visible=!1,r[o].object.visible=!0;for(;o<a;o++)r[o].object.visible=!1}}}(),toJSON:function(e){var t=x.prototype.toJSON.call(this,e);t.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];t.object.levels.push({object:o.object.uuid,distance:o.distance})}return t}}),Object.assign(Lt.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var n=new o;this.bones[e]&&n.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(n)}},pose:function(){var e,t,n;for(t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&e.matrixWorld.getInverse(this.boneInverses[t]);for(t=0,n=this.bones.length;t<n;t++)(e=this.bones[t])&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},update:function(){var e=new o,t=new o;return function(){for(var n=this.bones,r=this.boneInverses,i=this.boneMatrices,o=this.boneTexture,a=0,s=n.length;a<s;a++){var l=n[a]?n[a].matrixWorld:t;e.multiplyMatrices(l,r[a]),e.toArray(i,16*a)}void 0!==o&&(o.needsUpdate=!0)}}(),clone:function(){return new Lt(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,n=this.bones.length;t<n;t++){var r=this.bones[t];if(r.name===e)return r}}}),It.prototype=Object.assign(Object.create(x.prototype),{constructor:It,isBone:!0}),kt.prototype=Object.assign(Object.create(K.prototype),{constructor:kt,isSkinnedMesh:!0,initBones:function(){var e,t,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)t=this.geometry.bones[n],e=new It,i.push(e),e.name=t.name,e.position.fromArray(t.pos),e.quaternion.fromArray(t.rotq),void 0!==t.scl&&e.scale.fromArray(t.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)t=this.geometry.bones[n],-1!==t.parent&&null!==t.parent&&void 0!==i[t.parent]?i[t.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var e,t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var n=this.geometry.skinWeights[t];e=1/n.manhattanLength(),e!==1/0?n.multiplyScalar(e):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new c,i=this.geometry.attributes.skinWeight;for(t=0;t<i.count;t++)r.x=i.getX(t),r.y=i.getY(t),r.z=i.getZ(t),r.w=i.getW(t),e=1/r.manhattanLength(),e!==1/0?r.multiplyScalar(e):r.set(1,0,0,0),i.setXYZW(t,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(e){K.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Nt.prototype=Object.create(G.prototype),Nt.prototype.constructor=Nt,Nt.prototype.isLineBasicMaterial=!0,Nt.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this},Dt.prototype=Object.assign(Object.create(x.prototype),{constructor:Dt,isLine:!0,computeLineDistances:function(){var e=new s,t=new s;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[0],o=1,a=r.count;o<a;o++)e.fromBufferAttribute(r,o-1),t.fromBufferAttribute(r,o),i[o]=i[o-1],i[o]+=e.distanceTo(t);n.addAttribute("lineDistance",new N(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry){var s=n.vertices,i=n.lineDistances;i[0]=0;for(var o=1,a=s.length;o<a;o++)i[o]=i[o-1],i[o]+=s[o-1].distanceTo(s[o])}return this}}(),raycast:function(){var e=new o,t=new X,n=new m;return function(r,i){var o=r.linePrecision,a=o*o,l=this.geometry,u=this.matrixWorld;if(null===l.boundingSphere&&l.computeBoundingSphere(),n.copy(l.boundingSphere),n.applyMatrix4(u),!1!==r.ray.intersectsSphere(n)){e.getInverse(u),t.copy(r.ray).applyMatrix4(e);var c=new s,d=new s,h=new s,f=new s,p=this&&this.isLineSegments?2:1;if(l.isBufferGeometry){var m=l.index,g=l.attributes,v=g.position.array;if(null!==m)for(var y=m.array,b=0,_=y.length-1;b<_;b+=p){var w=y[b],x=y[b+1];c.fromArray(v,3*w),d.fromArray(v,3*x);var E=t.distanceSqToSegment(c,d,f,h);if(!(E>a)){f.applyMatrix4(this.matrixWorld);var S=r.ray.origin.distanceTo(f);S<r.near||S>r.far||i.push({distance:S,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}else for(var b=0,_=v.length/3-1;b<_;b+=p){c.fromArray(v,3*b),d.fromArray(v,3*b+3);var E=t.distanceSqToSegment(c,d,f,h);if(!(E>a)){f.applyMatrix4(this.matrixWorld);var S=r.ray.origin.distanceTo(f);S<r.near||S>r.far||i.push({distance:S,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}}else if(l.isGeometry)for(var M=l.vertices,T=M.length,b=0;b<T-1;b+=p){var E=t.distanceSqToSegment(M[b],M[b+1],f,h);if(!(E>a)){f.applyMatrix4(this.matrixWorld);var S=r.ray.origin.distanceTo(f);S<r.near||S>r.far||i.push({distance:S,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),jt.prototype=Object.assign(Object.create(Dt.prototype),{constructor:jt,isLineSegments:!0,computeLineDistances:function(){var e=new s,t=new s;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,i=[],o=0,a=r.count;o<a;o+=2)e.fromBufferAttribute(r,o),t.fromBufferAttribute(r,o+1),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+e.distanceTo(t);n.addAttribute("lineDistance",new N(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(n.isGeometry)for(var s=n.vertices,i=n.lineDistances,o=0,a=s.length;o<a;o+=2)e.copy(s[o]),t.copy(s[o+1]),i[o]=0===o?0:i[o-1],i[o+1]=i[o]+e.distanceTo(t);return this}}()}),Ut.prototype=Object.assign(Object.create(Dt.prototype),{constructor:Ut,isLineLoop:!0}),Ft.prototype=Object.create(G.prototype),Ft.prototype.constructor=Ft,Ft.prototype.isPointsMaterial=!0,Ft.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this},Bt.prototype=Object.assign(Object.create(x.prototype),{constructor:Bt,isPoints:!0,raycast:function(){var e=new o,t=new X,n=new m;return function(r,i){function o(e,n){var o=t.distanceSqToPoint(e);if(o<h){t.closestPointToPoint(e,p),p.applyMatrix4(u);var s=r.ray.origin.distanceTo(p);if(s<r.near||s>r.far)return;i.push({distance:s,distanceToRay:Math.sqrt(o),point:p.clone(),index:n,face:null,object:a})}}var a=this,l=this.geometry,u=this.matrixWorld,c=r.params.Points.threshold;if(null===l.boundingSphere&&l.computeBoundingSphere(),n.copy(l.boundingSphere),n.applyMatrix4(u),n.radius+=c,!1!==r.ray.intersectsSphere(n)){e.getInverse(u),t.copy(r.ray).applyMatrix4(e);var d=c/((this.scale.x+this.scale.y+this.scale.z)/3),h=d*d,f=new s,p=new s;if(l.isBufferGeometry){var m=l.index,g=l.attributes,v=g.position.array;if(null!==m)for(var y=m.array,b=0,_=y.length;b<_;b++){var w=y[b];f.fromArray(v,3*w),o(f,w)}else for(var b=0,x=v.length/3;b<x;b++)f.fromArray(v,3*b),o(f,b)}else for(var E=l.vertices,b=0,x=E.length;b<x;b++)o(E[b],b)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),zt.prototype=Object.assign(Object.create(x.prototype),{constructor:zt,isGroup:!0}),Ht.prototype=Object.assign(Object.create(u.prototype),{constructor:Ht,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Vt.prototype=Object.create(u.prototype),Vt.prototype.constructor=Vt,Vt.prototype.isCompressedTexture=!0,Gt.prototype=Object.create(u.prototype),Gt.prototype.constructor=Gt,Gt.prototype.isDepthTexture=!0,Wt.prototype=Object.create(F.prototype),Wt.prototype.constructor=Wt,qt.prototype=Object.create(T.prototype),qt.prototype.constructor=qt,Xt.prototype=Object.create(F.prototype),Xt.prototype.constructor=Xt,Yt.prototype=Object.create(T.prototype),Yt.prototype.constructor=Yt,Zt.prototype=Object.create(F.prototype),Zt.prototype.constructor=Zt,Kt.prototype=Object.create(T.prototype),Kt.prototype.constructor=Kt,Jt.prototype=Object.create(Zt.prototype),Jt.prototype.constructor=Jt,Qt.prototype=Object.create(T.prototype),Qt.prototype.constructor=Qt,$t.prototype=Object.create(Zt.prototype),$t.prototype.constructor=$t,en.prototype=Object.create(T.prototype),en.prototype.constructor=en,tn.prototype=Object.create(Zt.prototype),tn.prototype.constructor=tn,nn.prototype=Object.create(T.prototype),nn.prototype.constructor=nn,rn.prototype=Object.create(Zt.prototype),rn.prototype.constructor=rn,on.prototype=Object.create(T.prototype),on.prototype.constructor=on,an.prototype=Object.create(F.prototype),an.prototype.constructor=an,sn.prototype=Object.create(T.prototype),sn.prototype.constructor=sn,ln.prototype=Object.create(F.prototype),ln.prototype.constructor=ln,un.prototype=Object.create(T.prototype),un.prototype.constructor=un,cn.prototype=Object.create(F.prototype),cn.prototype.constructor=cn;var Yl={triangulate:function(e,t,n){n=n||2;var r=t&&t.length,i=r?t[0]*n:e.length,o=dn(e,0,i,n,!0),a=[];if(!o)return a;var s,l,u,c,d,h,f;if(r&&(o=yn(e,t,o,n)),e.length>80*n){s=u=e[0],l=c=e[1];for(var p=n;p<i;p+=n)d=e[p],h=e[p+1],d<s&&(s=d),h<l&&(l=h),d>u&&(u=d),h>c&&(c=h);f=Math.max(u-s,c-l),f=0!==f?1/f:0}return fn(o,a,n,s,l,f),a}},Zl={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n},isClockWise:function(e){return Zl.area(e)<0},triangulateShape:function(e,t){var n=[],r=[],i=[];Fn(e),Bn(n,e);var o=e.length;t.forEach(Fn);for(var a=0;a<t.length;a++)r.push(o),o+=t[a].length,Bn(n,t[a]);for(var s=Yl.triangulate(n,r),a=0;a<s.length;a+=3)i.push(s.slice(a,a+3));return i}};zn.prototype=Object.create(T.prototype),zn.prototype.constructor=zn,Hn.prototype=Object.create(F.prototype),Hn.prototype.constructor=Hn;var Kl={generateTopUV:function(e,t,n,r,o){var a=t[3*n],s=t[3*n+1],l=t[3*r],u=t[3*r+1],c=t[3*o],d=t[3*o+1];return[new i(a,s),new i(l,u),new i(c,d)]},generateSideWallUV:function(e,t,n,r,o,a){var s=t[3*n],l=t[3*n+1],u=t[3*n+2],c=t[3*r],d=t[3*r+1],h=t[3*r+2],f=t[3*o],p=t[3*o+1],m=t[3*o+2],g=t[3*a],v=t[3*a+1],y=t[3*a+2];return Math.abs(l-d)<.01?[new i(s,1-u),new i(c,1-h),new i(f,1-m),new i(g,1-y)]:[new i(l,1-u),new i(d,1-h),new i(p,1-m),new i(v,1-y)]}};Vn.prototype=Object.create(T.prototype),Vn.prototype.constructor=Vn,Gn.prototype=Object.create(Hn.prototype),Gn.prototype.constructor=Gn,Wn.prototype=Object.create(T.prototype),Wn.prototype.constructor=Wn,qn.prototype=Object.create(F.prototype),qn.prototype.constructor=qn,Xn.prototype=Object.create(T.prototype),Xn.prototype.constructor=Xn,Yn.prototype=Object.create(F.prototype),Yn.prototype.constructor=Yn,Zn.prototype=Object.create(T.prototype),Zn.prototype.constructor=Zn,Kn.prototype=Object.create(F.prototype),Kn.prototype.constructor=Kn,Jn.prototype=Object.create(T.prototype),Jn.prototype.constructor=Jn,Jn.prototype.toJSON=function(){var e=T.prototype.toJSON.call(this);return $n(this.parameters.shapes,e)},Qn.prototype=Object.create(F.prototype),Qn.prototype.constructor=Qn,Qn.prototype.toJSON=function(){var e=F.prototype.toJSON.call(this);return $n(this.parameters.shapes,e)},er.prototype=Object.create(F.prototype),er.prototype.constructor=er,tr.prototype=Object.create(T.prototype),tr.prototype.constructor=tr,nr.prototype=Object.create(F.prototype),nr.prototype.constructor=nr,rr.prototype=Object.create(tr.prototype),rr.prototype.constructor=rr,ir.prototype=Object.create(nr.prototype),ir.prototype.constructor=ir,or.prototype=Object.create(T.prototype),or.prototype.constructor=or,ar.prototype=Object.create(F.prototype),ar.prototype.constructor=ar;var Jl=Object.freeze({WireframeGeometry:Wt,ParametricGeometry:qt,ParametricBufferGeometry:Xt,TetrahedronGeometry:Kt,TetrahedronBufferGeometry:Jt,OctahedronGeometry:Qt,OctahedronBufferGeometry:$t,IcosahedronGeometry:en,IcosahedronBufferGeometry:tn,DodecahedronGeometry:nn,DodecahedronBufferGeometry:rn,PolyhedronGeometry:Yt,PolyhedronBufferGeometry:Zt,TubeGeometry:on,TubeBufferGeometry:an,TorusKnotGeometry:sn,TorusKnotBufferGeometry:ln,TorusGeometry:un,TorusBufferGeometry:cn,TextGeometry:Vn,TextBufferGeometry:Gn,SphereGeometry:Wn,SphereBufferGeometry:qn,RingGeometry:Xn,RingBufferGeometry:Yn,PlaneGeometry:H,PlaneBufferGeometry:V,LatheGeometry:Zn,LatheBufferGeometry:Kn,ShapeGeometry:Jn,ShapeBufferGeometry:Qn,ExtrudeGeometry:zn,ExtrudeBufferGeometry:Hn,EdgesGeometry:er,ConeGeometry:rr,ConeBufferGeometry:ir,CylinderGeometry:tr,CylinderBufferGeometry:nr,CircleGeometry:or,CircleBufferGeometry:ar,BoxGeometry:B,BoxBufferGeometry:z});sr.prototype=Object.create(G.prototype),sr.prototype.constructor=sr,sr.prototype.isShadowMaterial=!0,sr.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.color.copy(e.color),this},lr.prototype=Object.create(q.prototype),lr.prototype.constructor=lr,lr.prototype.isRawShaderMaterial=!0,ur.prototype=Object.create(G.prototype),ur.prototype.constructor=ur,ur.prototype.isMeshStandardMaterial=!0,ur.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},cr.prototype=Object.create(ur.prototype),cr.prototype.constructor=cr,cr.prototype.isMeshPhysicalMaterial=!0,cr.prototype.copy=function(e){return ur.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearCoat=e.clearCoat,this.clearCoatRoughness=e.clearCoatRoughness,this},dr.prototype=Object.create(G.prototype),dr.prototype.constructor=dr,dr.prototype.isMeshPhongMaterial=!0,dr.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},hr.prototype=Object.create(dr.prototype),hr.prototype.constructor=hr,hr.prototype.isMeshToonMaterial=!0,hr.prototype.copy=function(e){return dr.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},fr.prototype=Object.create(G.prototype),fr.prototype.constructor=fr,fr.prototype.isMeshNormalMaterial=!0,fr.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},pr.prototype=Object.create(G.prototype),pr.prototype.constructor=pr,pr.prototype.isMeshLambertMaterial=!0,pr.prototype.copy=function(e){return G.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},mr.prototype=Object.create(Nt.prototype),mr.prototype.constructor=mr,mr.prototype.isLineDashedMaterial=!0,mr.prototype.copy=function(e){return Nt.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var Ql=Object.freeze({ShadowMaterial:sr,SpriteMaterial:Pt,RawShaderMaterial:lr,ShaderMaterial:q,PointsMaterial:Ft,MeshPhysicalMaterial:cr,MeshStandardMaterial:ur,MeshPhongMaterial:dr,MeshToonMaterial:hr,MeshNormalMaterial:fr,MeshLambertMaterial:pr,MeshDepthMaterial:pt,MeshDistanceMaterial:mt,MeshBasicMaterial:W,LineDashedMaterial:mr,LineBasicMaterial:Nt,Material:G}),$l={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},eu=new gr,tu={};Object.assign(vr.prototype,{load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=$l.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout(function(){t&&t(o),i.manager.itemEnd(e)},0),o;if(void 0!==tu[e])return void tu[e].push({onLoad:t,onProgress:n,onError:r});var a=/^data:(.*?)(;base64)?,(.*)$/,s=e.match(a);if(s){var l=s[1],u=!!s[2],c=s[3];c=window.decodeURIComponent(c),u&&(c=window.atob(c));try{var d,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var f=new Uint8Array(c.length),p=0;p<c.length;p++)f[p]=c.charCodeAt(p);d="blob"===h?new Blob([f.buffer],{type:l}):f.buffer;break;case"document":var m=new DOMParser;d=m.parseFromString(c,l);break;case"json":d=JSON.parse(c);break;default:d=c}window.setTimeout(function(){t&&t(d),i.manager.itemEnd(e)},0)}catch(t){window.setTimeout(function(){r&&r(t),i.manager.itemEnd(e),i.manager.itemError(e)},0)}}else{tu[e]=[],tu[e].push({onLoad:t,onProgress:n,onError:r});var g=new XMLHttpRequest;g.open("GET",e,!0),g.addEventListener("load",function(t){var n=this.response;$l.add(e,n);var r=tu[e];if(delete tu[e],200===this.status){for(var o=0,a=r.length;o<a;o++){var s=r[o];s.onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else if(0===this.status){console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var o=0,a=r.length;o<a;o++){var s=r[o];s.onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else{for(var o=0,a=r.length;o<a;o++){var s=r[o];s.onError&&s.onError(t)}i.manager.itemEnd(e),i.manager.itemError(e)}},!1),g.addEventListener("progress",function(t){for(var n=tu[e],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(t)}},!1),g.addEventListener("error",function(t){var n=tu[e];delete tu[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemEnd(e),i.manager.itemError(e)},!1),void 0!==this.responseType&&(g.responseType=this.responseType),void 0!==this.withCredentials&&(g.withCredentials=this.withCredentials),g.overrideMimeType&&g.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(var v in this.requestHeader)g.setRequestHeader(v,this.requestHeader[v]);g.send(null)}return i.manager.itemStart(e),g},setPath:function(e){return this.path=e,this},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),Object.assign(yr.prototype,{load:function(e,t,n,r){var i=this,o=[],a=new Vt;a.image=o;var s=new vr(this.manager);if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(e))for(var l=0,u=0,c=e.length;u<c;++u)!function(u){s.load(e[u],function(e){var n=i._parser(e,!0);o[u]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(l+=1)&&(1===n.mipmapCount&&(a.minFilter=ps),a.format=n.format,a.needsUpdate=!0,t&&t(a))},n,r)}(u);else s.load(e,function(e){var n=i._parser(e,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var l=0;l<n.mipmapCount;l++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+l]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}else a.image.width=n.width,a.image.height=n.height,a.mipmaps=n.mipmaps;1===n.mipmapCount&&(a.minFilter=ps),a.format=n.format,a.needsUpdate=!0,t&&t(a)},n,r);return a},setPath:function(e){return this.path=e,this}}),Object.assign(br.prototype,{load:function(e,t,n,r){var i=this,o=new f,a=new vr(this.manager);return a.setResponseType("arraybuffer"),a.load(e,function(e){var n=i._parser(e);n&&(void 0!==n.image?o.image=n.image:void 0!==n.data&&(o.image.width=n.width,o.image.height=n.height,o.image.data=n.data),o.wrapS=void 0!==n.wrapS?n.wrapS:us,o.wrapT=void 0!==n.wrapT?n.wrapT:us,o.magFilter=void 0!==n.magFilter?n.magFilter:ps,o.minFilter=void 0!==n.minFilter?n.minFilter:gs,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps),1===n.mipmapCount&&(o.minFilter=ps),o.needsUpdate=!0,t&&t(o,n))},n,r),o}}),Object.assign(_r.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=$l.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout(function(){t&&t(o),i.manager.itemEnd(e)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){$l.add(e,this),t&&t(this),i.manager.itemEnd(e)},!1),a.addEventListener("error",function(t){r&&r(t),i.manager.itemEnd(e),i.manager.itemError(e)},!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(wr.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){var i=new le,o=new _r(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);for(var a=0,s=0;s<e.length;++s)!function(n){o.load(e[n],function(e){i.images[n]=e,6==++a&&(i.needsUpdate=!0,t&&t(i))},void 0,r)}(s);return i},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(xr.prototype,{crossOrigin:"Anonymous",load:function(e,t,n,r){var i=new u,o=new _r(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(n){i.image=n;var r=e.search(/\.(jpg|jpeg)$/)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?As:Rs,i.needsUpdate=!0,void 0!==t&&t(i)},n,r),i},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Er.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=e;n++)t=this.getPoint(n/e),o+=t.distanceTo(i),r.push(o),i=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,o=r.length;n=t||e*r[o-1];for(var a,s=0,l=o-1;s<=l;)if(i=Math.floor(s+(l-s)/2),(a=r[i]-n)<0)s=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(i=l,r[i]===n)return i/(o-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(o-1)},getTangent:function(e){var t=e-1e-4,n=e+1e-4;t<0&&(t=0),n>1&&(n=1);var r=this.getPoint(t);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,r,i,a=new s,l=[],u=[],c=[],d=new s,h=new o;for(n=0;n<=e;n++)r=n/e,l[n]=this.getTangentAt(r),l[n].normalize();u[0]=new s,c[0]=new s;var f=Number.MAX_VALUE,p=Math.abs(l[0].x),m=Math.abs(l[0].y),g=Math.abs(l[0].z);for(p<=f&&(f=p,a.set(1,0,0)),m<=f&&(f=m,a.set(0,1,0)),g<=f&&a.set(0,0,1),d.crossVectors(l[0],a).normalize(),u[0].crossVectors(l[0],d),c[0].crossVectors(l[0],u[0]),n=1;n<=e;n++)u[n]=u[n-1].clone(),c[n]=c[n-1].clone(),d.crossVectors(l[n-1],l[n]),d.length()>Number.EPSILON&&(d.normalize(),i=Math.acos(Ol.clamp(l[n-1].dot(l[n]),-1,1)),u[n].applyMatrix4(h.makeRotationAxis(d,i))),c[n].crossVectors(l[n],u[n]);if(!0===t)for(i=Math.acos(Ol.clamp(u[0].dot(u[e]),-1,1)),i/=e,l[0].dot(d.crossVectors(u[0],u[e]))>0&&(i=-i),n=1;n<=e;n++)u[n].applyMatrix4(h.makeRotationAxis(l[n],i*n)),c[n].crossVectors(l[n],u[n]);return{tangents:l,normals:u,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),Sr.prototype=Object.create(Er.prototype),Sr.prototype.constructor=Sr,Sr.prototype.isEllipseCurve=!0,Sr.prototype.getPoint=function(e,t){for(var n=t||new i,r=2*Math.PI,o=this.aEndAngle-this.aStartAngle,a=Math.abs(o)<Number.EPSILON;o<0;)o+=r;for(;o>r;)o-=r;o<Number.EPSILON&&(o=a?0:r),!0!==this.aClockwise||a||(o===r?o=-r:o-=r);var s=this.aStartAngle+e*o,l=this.aX+this.xRadius*Math.cos(s),u=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){var c=Math.cos(this.aRotation),d=Math.sin(this.aRotation),h=l-this.aX,f=u-this.aY;l=h*c-f*d+this.aX,u=h*d+f*c+this.aY}return n.set(l,u)},Sr.prototype.copy=function(e){return Er.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},Sr.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},Sr.prototype.fromJSON=function(e){return Er.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},Mr.prototype=Object.create(Sr.prototype),Mr.prototype.constructor=Mr,Mr.prototype.isArcCurve=!0;var nu=new s,ru=new Tr,iu=new Tr,ou=new Tr;Cr.prototype=Object.create(Er.prototype),Cr.prototype.constructor=Cr,Cr.prototype.isCatmullRomCurve3=!0,Cr.prototype.getPoint=function(e,t){var n=t||new s,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e,a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/i)+1)*i:0===l&&a===i-1&&(a=i-2,l=1);var u,c,d,h;if(this.closed||a>0?u=r[(a-1)%i]:(nu.subVectors(r[0],r[1]).add(r[0]),u=nu),c=r[a%i],d=r[(a+1)%i],this.closed||a+2<i?h=r[(a+2)%i]:(nu.subVectors(r[i-1],r[i-2]).add(r[i-1]),h=nu),"centripetal"===this.curveType||"chordal"===this.curveType){var f="chordal"===this.curveType?.5:.25,p=Math.pow(u.distanceToSquared(c),f),m=Math.pow(c.distanceToSquared(d),f),g=Math.pow(d.distanceToSquared(h),f);m<1e-4&&(m=1),p<1e-4&&(p=m),g<1e-4&&(g=m),ru.initNonuniformCatmullRom(u.x,c.x,d.x,h.x,p,m,g),iu.initNonuniformCatmullRom(u.y,c.y,d.y,h.y,p,m,g),ou.initNonuniformCatmullRom(u.z,c.z,d.z,h.z,p,m,g)}else"catmullrom"===this.curveType&&(ru.initCatmullRom(u.x,c.x,d.x,h.x,this.tension),iu.initCatmullRom(u.y,c.y,d.y,h.y,this.tension),ou.initCatmullRom(u.z,c.z,d.z,h.z,this.tension));return n.set(ru.calc(l),iu.calc(l),ou.calc(l)),n},Cr.prototype.copy=function(e){Er.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Cr.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},Cr.prototype.fromJSON=function(e){Er.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new s).fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},Ur.prototype=Object.create(Er.prototype),Ur.prototype.constructor=Ur,Ur.prototype.isCubicBezierCurve=!0,Ur.prototype.getPoint=function(e,t){var n=t||new i,r=this.v0,o=this.v1,a=this.v2,s=this.v3;return n.set(jr(e,r.x,o.x,a.x,s.x),jr(e,r.y,o.y,a.y,s.y)),n},Ur.prototype.copy=function(e){return Er.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Ur.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Ur.prototype.fromJSON=function(e){return Er.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Fr.prototype=Object.create(Er.prototype),Fr.prototype.constructor=Fr,Fr.prototype.isCubicBezierCurve3=!0,Fr.prototype.getPoint=function(e,t){var n=t||new s,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(jr(e,r.x,i.x,o.x,a.x),jr(e,r.y,i.y,o.y,a.y),jr(e,r.z,i.z,o.z,a.z)),n},Fr.prototype.copy=function(e){return Er.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},Fr.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},Fr.prototype.fromJSON=function(e){return Er.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},Br.prototype=Object.create(Er.prototype),Br.prototype.constructor=Br,Br.prototype.isLineCurve=!0,Br.prototype.getPoint=function(e,t){var n=t||new i;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},Br.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},Br.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Br.prototype.copy=function(e){return Er.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Br.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Br.prototype.fromJSON=function(e){return Er.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},zr.prototype=Object.create(Er.prototype),zr.prototype.constructor=zr,zr.prototype.isLineCurve3=!0,zr.prototype.getPoint=function(e,t){var n=t||new s;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},zr.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},zr.prototype.copy=function(e){return Er.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},zr.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},zr.prototype.fromJSON=function(e){return Er.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Hr.prototype=Object.create(Er.prototype),Hr.prototype.constructor=Hr,Hr.prototype.isQuadraticBezierCurve=!0,Hr.prototype.getPoint=function(e,t){var n=t||new i,r=this.v0,o=this.v1,a=this.v2;return n.set(Lr(e,r.x,o.x,a.x),Lr(e,r.y,o.y,a.y)),n},Hr.prototype.copy=function(e){return Er.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Hr.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Hr.prototype.fromJSON=function(e){return Er.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Vr.prototype=Object.create(Er.prototype),Vr.prototype.constructor=Vr,Vr.prototype.isQuadraticBezierCurve3=!0,Vr.prototype.getPoint=function(e,t){var n=t||new s,r=this.v0,i=this.v1,o=this.v2;return n.set(Lr(e,r.x,i.x,o.x),Lr(e,r.y,i.y,o.y),Lr(e,r.z,i.z,o.z)),n},Vr.prototype.copy=function(e){return Er.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Vr.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Vr.prototype.fromJSON=function(e){return Er.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Gr.prototype=Object.create(Er.prototype),Gr.prototype.constructor=Gr,Gr.prototype.isSplineCurve=!0,Gr.prototype.getPoint=function(e,t){var n=t||new i,r=this.points,o=(r.length-1)*e,a=Math.floor(o),s=o-a,l=r[0===a?a:a-1],u=r[a],c=r[a>r.length-2?r.length-1:a+1],d=r[a>r.length-3?r.length-1:a+2];return n.set(Or(s,l.x,u.x,c.x,d.x),Or(s,l.y,u.y,c.y,d.y)),n},Gr.prototype.copy=function(e){Er.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push(r.clone())}return this},Gr.prototype.toJSON=function(){var e=Er.prototype.toJSON.call(this);e.points=[];for(var t=0,n=this.points.length;t<n;t++){var r=this.points[t];e.points.push(r.toArray())}return e},Gr.prototype.fromJSON=function(e){Er.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,n=e.points.length;t<n;t++){var r=e.points[t];this.points.push((new i).fromArray(r))}return this};var au=Object.freeze({ArcCurve:Mr,CatmullRomCurve3:Cr,CubicBezierCurve:Ur,CubicBezierCurve3:Fr,EllipseCurve:Sr,LineCurve:Br,LineCurve3:zr,QuadraticBezierCurve:Hr,QuadraticBezierCurve3:Vr,SplineCurve:Gr});Wr.prototype=Object.assign(Object.create(Er.prototype),{constructor:Wr,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Br(t,e))},getPoint:function(e){for(var t=e*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=t){var i=n[r]-t,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*e:o&&o.isLineCurve?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a),l=0;l<s.length;l++){var u=s[l];t&&t.equals(u)||(n.push(u),t=u)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){Er.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=Er.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,n=this.curves.length;t<n;t++){var r=this.curves[t];e.curves.push(r.toJSON())}return e},fromJSON:function(e){Er.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,n=e.curves.length;t<n;t++){var r=e.curves[t];this.curves.push((new au[r.type]).fromJSON(r))}return this}}),qr.prototype=Object.assign(Object.create(Wr.prototype),{constructor:qr,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y)},moveTo:function(e,t){this.currentPoint.set(e,t)},lineTo:function(e,t){var n=new Br(this.currentPoint.clone(),new i(e,t));this.curves.push(n),this.currentPoint.set(e,t)},quadraticCurveTo:function(e,t,n,r){var o=new Hr(this.currentPoint.clone(),new i(e,t),new i(n,r));this.curves.push(o),this.currentPoint.set(n,r)},bezierCurveTo:function(e,t,n,r,o,a){var s=new Ur(this.currentPoint.clone(),new i(e,t),new i(n,r),new i(o,a));this.curves.push(s),this.currentPoint.set(o,a)},splineThru:function(e){var t=[this.currentPoint.clone()].concat(e),n=new Gr(t);this.curves.push(n),this.currentPoint.copy(e[e.length-1])},arc:function(e,t,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(e+a,t+s,n,r,i,o)},absarc:function(e,t,n,r,i,o){this.absellipse(e,t,n,n,r,i,o)},ellipse:function(e,t,n,r,i,o,a,s){var l=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(e+l,t+u,n,r,i,o,a,s)},absellipse:function(e,t,n,r,i,o,a,s){var l=new Sr(e,t,n,r,i,o,a,s);if(this.curves.length>0){var u=l.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(l);var c=l.getPoint(1);this.currentPoint.copy(c)},copy:function(e){return Wr.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=Wr.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return Wr.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Xr.prototype=Object.assign(Object.create(qr.prototype),{constructor:Xr,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){qr.prototype.copy.call(this,e),this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push(r.clone())}return this},toJSON:function(){var e=qr.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,n=this.holes.length;t<n;t++){var r=this.holes[t];e.holes.push(r.toJSON())}return e},fromJSON:function(e){qr.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,n=e.holes.length;t<n;t++){var r=e.holes[t];this.holes.push((new qr).fromJSON(r))}return this}}),Yr.prototype=Object.assign(Object.create(x.prototype),{constructor:Yr,isLight:!0,copy:function(e){return x.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=x.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),Zr.prototype=Object.assign(Object.create(Yr.prototype),{constructor:Zr,isHemisphereLight:!0,copy:function(e){return Yr.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(Kr.prototype,{copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),Jr.prototype=Object.assign(Object.create(Kr.prototype),{constructor:Jr,isSpotLightShadow:!0,update:function(e){var t=this.camera,n=2*Ol.RAD2DEG*e.angle,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix())}}),Qr.prototype=Object.assign(Object.create(Yr.prototype),{constructor:Qr,isSpotLight:!0,copy:function(e){return Yr.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),$r.prototype=Object.assign(Object.create(Yr.prototype),{constructor:$r,isPointLight:!0,copy:function(e){return Yr.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),ei.prototype=Object.assign(Object.create(Kr.prototype),{constructor:ei}),ti.prototype=Object.assign(Object.create(Yr.prototype),{constructor:ti,isDirectionalLight:!0,copy:function(e){return Yr.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),ni.prototype=Object.assign(Object.create(Yr.prototype),{constructor:ni,isAmbientLight:!0}),ri.prototype=Object.assign(Object.create(Yr.prototype),{constructor:ri,isRectAreaLight:!0,copy:function(e){return Yr.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=Yr.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}}),ii.prototype=Object.assign(Object.create(pi.prototype),{constructor:ii,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:ul,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),oi.prototype=Object.assign(Object.create(pi.prototype),{constructor:oi,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:ul,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ai.prototype,{evaluate:function(e){var t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{var o;n:{r:if(!(e<r)){for(var a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,e,i)}if(n===a)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}{if(e>=i)break e;var s=t[1];e<s&&(n=2,i=s);for(var a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){var l=n+o>>>1;e<t[l]?o=l:n=l+1}if(r=t[n],void 0===(i=t[n-1]))return this._cachedIndex=0,this.beforeStart_(0,e,r);if(void 0===r)return n=t.length,this._cachedIndex=n,this.afterEnd_(n-1,i,e)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r,o=0;o!==r;++o)t[o]=n[i+o];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(ai.prototype,{beforeStart_:ai.prototype.copySampleValue_,afterEnd_:ai.prototype.copySampleValue_}),si.prototype=Object.assign(Object.create(ai.prototype),{constructor:si,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=e*s,u=(n-t)/(r-t),c=l+s;l!==c;l+=4)a.slerpFlat(i,0,o,l-s,o,l,u);return i}}),li.prototype=Object.assign(Object.create(pi.prototype),{constructor:li,ValueTypeName:"quaternion",DefaultInterpolation:cl,InterpolantFactoryMethodLinear:function(e){return new si(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),ui.prototype=Object.assign(Object.create(pi.prototype),{constructor:ui,ValueTypeName:"color"}),ci.prototype=Object.assign(Object.create(pi.prototype),{constructor:ci,ValueTypeName:"number"}),di.prototype=Object.assign(Object.create(ai.prototype),{constructor:di,DefaultSettings_:{endingStart:hl,endingEnd:hl},intervalChanged_:function(e,t,n){var r=this.parameterPositions,i=e-2,o=e+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case fl:i=e,a=2*t-n;break;case pl:i=r.length-2,a=t+r[i]-r[i+1];break;default:i=e,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case fl:o=e,s=2*n-t;break;case pl:o=1,s=n+r[1]-r[0];break;default:o=e-1,s=t}var l=.5*(n-t),u=this.valueSize;this._weightPrev=l/(t-a),this._weightNext=l/(s-n),this._offsetPrev=i*u,this._offsetNext=o*u},interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,u=this._offsetPrev,c=this._offsetNext,d=this._weightPrev,h=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-d*m+2*d*p-d*f,v=(1+d)*m+(-1.5-2*d)*p+(-.5+d)*f+1,y=(-1-h)*m+(1.5+h)*p+.5*f,b=h*m-h*p,_=0;_!==a;++_)i[_]=g*o[u+_]+v*o[l+_]+y*o[s+_]+b*o[c+_];return i}}),hi.prototype=Object.assign(Object.create(ai.prototype),{constructor:hi,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,u=(n-t)/(r-t),c=1-u,d=0;d!==a;++d)i[d]=o[l+d]*c+o[s+d]*u;return i}}),fi.prototype=Object.assign(Object.create(ai.prototype),{constructor:fi,interpolate_:function(e){return this.copySampleValue_(e-1)}});var su={arraySlice:function(e,t,n){return su.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){function t(t,n){return e[t]-e[n]}for(var n=e.length,r=new Array(n),i=0;i!==n;++i)r[i]=i;return r.sort(t),r},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*t,l=0;l!==t;++l)i[a++]=e[s+l];return i},flattenJSON:function(e,t,n,r){for(var i=1,o=e[0];void 0!==o&&void 0===o[r];)o=e[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)}}};Object.assign(pi,{parse:function(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=pi._getTrackTypeForValueTypeName(e.type);if(void 0===e.times){var n=[],r=[];su.flattenJSON(e.keys,n,r,"value"),e.times=n,e.values=r}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)},toJSON:function(e){var t,n=e.constructor;if(void 0!==n.toJSON)t=n.toJSON(e);else{t={name:e.name,times:su.convertArray(e.times,Array),values:su.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t},_getTrackTypeForValueTypeName:function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ci;case"vector":case"vector2":case"vector3":case"vector4":return mi;case"color":return ui;case"quaternion":return li;case"bool":case"boolean":return oi;case"string":return ii}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}}),Object.assign(pi.prototype,{constructor:pi,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:cl,InterpolantFactoryMethodDiscrete:function(e){return new fi(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new hi(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new di(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case ul:t=this.InterpolantFactoryMethodDiscrete;break;case cl:t=this.InterpolantFactoryMethodLinear;break;case dl:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return void console.warn("THREE.KeyframeTrack:",n)}this.createInterpolant=t},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return ul;case this.InterpolantFactoryMethodLinear:return cl;case this.InterpolantFactoryMethodSmooth:return dl}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,n=0,r=t.length;n!==r;++n)t[n]*=e;return this},trim:function(e,t){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);var a=this.getValueSize();this.times=su.arraySlice(n,i,o),this.values=su.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,s),e=!1;break}if(null!==o&&o>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,s,o),e=!1;break}o=s}if(void 0!==r&&su.isTypedArray(r))for(var a=0,l=r.length;a!==l;++a){var u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e},optimize:function(){for(var e=this.times,t=this.values,n=this.getValueSize(),r=this.getInterpolation()===dl,i=1,o=e.length-1,a=1;a<o;++a){var s=!1,l=e[a];if(l!==e[a+1]&&(1!==a||l!==l[0]))if(r)s=!0;else for(var u=a*n,c=u-n,d=u+n,h=0;h!==n;++h){var f=t[u+h];if(f!==t[c+h]||f!==t[d+h]){s=!0;break}}if(s){if(a!==i){e[i]=e[a];for(var p=a*n,m=i*n,h=0;h!==n;++h)t[m+h]=t[p+h]}++i}}if(o>0){e[i]=e[o];for(var p=o*n,m=i*n,h=0;h!==n;++h)t[m+h]=t[p+h];++i}return i!==e.length&&(this.times=su.arraySlice(e,0,i),this.values=su.arraySlice(t,0,i*n)),this}}),mi.prototype=Object.assign(Object.create(pi.prototype),{constructor:mi,ValueTypeName:"vector"}),Object.assign(gi,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,o=n.length;i!==o;++i)t.push(pi.parse(n[i]).scale(r));return new gi(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t},i=0,o=n.length;i!==o;++i)t.push(pi.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,o=[],a=0;a<i;a++){var s=[],l=[];s.push((a+i-1)%i,a,(a+1)%i),l.push(0,1,0);var u=su.getKeyframeOrder(s);s=su.sortedArray(s,1,u),l=su.sortedArray(l,1,u),r||0!==s[0]||(s.push(i),l.push(l[0])),o.push(new ci(".morphTargetInfluences["+t[a].name+"]",s,l).scale(1/n))}return new gi(e,-1,o)},findByName:function(e,t){var n=e;if(!Array.isArray(e)){var r=e;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null},CreateClipsFromMorphTargetSequences:function(e,t,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=e.length;o<a;o++){var s=e[o],l=s.name.match(i);if(l&&l.length>1){var u=l[1],c=r[u];c||(r[u]=c=[]),c.push(s)}}var d=[];for(var u in r)d.push(gi.CreateFromMorphTargetSequence(u,r[u],t,n));return d},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var o=[],a=[];su.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.length||-1,a=e.fps||30,s=e.hierarchy||[],l=0;l<s.length;l++){var u=s[l].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var c={},d=0;d<u.length;d++)if(u[d].morphTargets)for(var h=0;h<u[d].morphTargets.length;h++)c[u[d].morphTargets[h]]=-1;for(var f in c){for(var p=[],m=[],h=0;h!==u[d].morphTargets.length;++h){var g=u[d];p.push(g.time),m.push(g.morphTarget===f?1:0)}r.push(new ci(".morphTargetInfluence["+f+"]",p,m))}o=c.length*(a||1)}else{var v=".bones["+t[l].name+"]";n(mi,v+".position",u,"pos",r),n(li,v+".quaternion",u,"rot",r),n(mi,v+".scale",u,"scl",r)}}return 0===r.length?null:new gi(i,o,r)}}),Object.assign(gi.prototype,{resetDuration:function(){for(var e=this.tracks,t=0,n=0,r=e.length;n!==r;++n){var i=this.tracks[n];t=Math.max(t,i.times[i.times.length-1])}this.duration=t},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}}),Object.assign(vi.prototype,{load:function(e,t,n,r){var i=this;new vr(i.manager).load(e,function(e){t(i.parse(JSON.parse(e)))},n,r)},setTextures:function(e){this.textures=e},parse:function(e){function t(e){return void 0===n[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),n[e]}var n=this.textures,r=new Ql[e.type];if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&r.specular.setHex(e.specular),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearCoat&&(r.clearCoat=e.clearCoat),void 0!==e.clearCoatRoughness&&(r.clearCoatRoughness=e.clearCoatRoughness),void 0!==e.uniforms&&(r.uniforms=e.uniforms),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.vertexColors&&(r.vertexColors=e.vertexColors),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.side&&(r.side=e.side),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(r.skinning=e.skinning),void 0!==e.morphTargets&&(r.morphTargets=e.morphTargets),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=t(e.map)),void 0!==e.alphaMap&&(r.alphaMap=t(e.alphaMap),r.transparent=!0),void 0!==e.bumpMap&&(r.bumpMap=t(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=t(e.normalMap)),void 0!==e.normalScale){var o=e.normalScale;!1===Array.isArray(o)&&(o=[o,o]),r.normalScale=(new i).fromArray(o)}return void 0!==e.displacementMap&&(r.displacementMap=t(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=t(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=t(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=t(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=t(e.specularMap)),void 0!==e.envMap&&(r.envMap=t(e.envMap)),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.lightMap&&(r.lightMap=t(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=t(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=t(e.gradientMap)),r}}),Object.assign(yi.prototype,{load:function(e,t,n,r){var i=this;new vr(i.manager).load(e,function(e){t(i.parse(JSON.parse(e)))},n,r)},parse:function(e){var t=new F,n=e.data.index;if(void 0!==n){var r=new lu[n.type](n.array);t.setIndex(new C(r,1))}var i=e.data.attributes;for(var o in i){var a=i[o],r=new lu[a.type](a.array);t.addAttribute(o,new C(r,a.itemSize,a.normalized))}var l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(var u=0,c=l.length;u!==c;++u){var d=l[u];t.addGroup(d.start,d.count,d.materialIndex)}var h=e.data.boundingSphere;if(void 0!==h){var f=new s;void 0!==h.center&&f.fromArray(h.center),t.boundingSphere=new m(f,h.radius)}return t}});var lu={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};bi.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=this.handlers,n=0,r=t.length;n<r;n+=2){var i=t[n],o=t[n+1];if(i.test(e))return o}return null}},Object.assign(bi.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(e,t,n){for(var r=[],i=0;i<e.length;++i)r[i]=this.createMaterial(e[i],t,n);return r},createMaterial:function(){var e={NoBlending:ga,NormalBlending:va,AdditiveBlending:ya,SubtractiveBlending:ba,MultiplyBlending:_a,CustomBlending:wa},t=new y,n=new xr,r=new vi;return function(i,o,a){function s(e,t,r,i,s){var u,c=o+e,d=bi.Handlers.get(c);null!==d?u=d.load(c):(n.setCrossOrigin(a),u=n.load(c)),void 0!==t&&(u.repeat.fromArray(t),1!==t[0]&&(u.wrapS=ls),1!==t[1]&&(u.wrapT=ls)),void 0!==r&&u.offset.fromArray(r),void 0!==i&&("repeat"===i[0]&&(u.wrapS=ls),"mirror"===i[0]&&(u.wrapS=cs),"repeat"===i[1]&&(u.wrapT=ls),"mirror"===i[1]&&(u.wrapT=cs)),void 0!==s&&(u.anisotropy=s);var h=Ol.generateUUID();return l[h]=u,h}var l={},u={uuid:Ol.generateUUID(),type:"MeshLambertMaterial"};for(var c in i){var d=i[c];switch(c){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":u.name=d;break;case"blending":u.blending=e[d];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",c,"is no longer supported.");break;case"colorDiffuse":u.color=t.fromArray(d).getHex();break;case"colorSpecular":u.specular=t.fromArray(d).getHex();break;case"colorEmissive":u.emissive=t.fromArray(d).getHex();break;case"specularCoef":u.shininess=d;break;case"shading":"basic"===d.toLowerCase()&&(u.type="MeshBasicMaterial"),"phong"===d.toLowerCase()&&(u.type="MeshPhongMaterial"),"standard"===d.toLowerCase()&&(u.type="MeshStandardMaterial");break;case"mapDiffuse":u.map=s(d,i.mapDiffuseRepeat,i.mapDiffuseOffset,i.mapDiffuseWrap,i.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":u.emissiveMap=s(d,i.mapEmissiveRepeat,i.mapEmissiveOffset,i.mapEmissiveWrap,i.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":u.lightMap=s(d,i.mapLightRepeat,i.mapLightOffset,i.mapLightWrap,i.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":u.aoMap=s(d,i.mapAORepeat,i.mapAOOffset,i.mapAOWrap,i.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":u.bumpMap=s(d,i.mapBumpRepeat,i.mapBumpOffset,i.mapBumpWrap,i.mapBumpAnisotropy);break;case"mapBumpScale":u.bumpScale=d;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":u.normalMap=s(d,i.mapNormalRepeat,i.mapNormalOffset,i.mapNormalWrap,i.mapNormalAnisotropy);break;case"mapNormalFactor":u.normalScale=d;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":u.specularMap=s(d,i.mapSpecularRepeat,i.mapSpecularOffset,i.mapSpecularWrap,i.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":u.metalnessMap=s(d,i.mapMetalnessRepeat,i.mapMetalnessOffset,i.mapMetalnessWrap,i.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":u.roughnessMap=s(d,i.mapRoughnessRepeat,i.mapRoughnessOffset,i.mapRoughnessWrap,i.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":u.alphaMap=s(d,i.mapAlphaRepeat,i.mapAlphaOffset,i.mapAlphaWrap,i.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":u.side=ua;break;case"doubleSided":u.side=ca;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),u.opacity=d;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":u[c]=d;break;case"vertexColors":!0===d&&(u.vertexColors=ma),"face"===d&&(u.vertexColors=pa);break;default:console.error("THREE.Loader.createMaterial: Unsupported",c,d)}}return"MeshBasicMaterial"===u.type&&delete u.emissive,"MeshPhongMaterial"!==u.type&&delete u.specular,u.opacity<1&&(u.transparent=!0),r.setTextures(l),r.parse(u)}}()});var uu={decodeText:function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);return decodeURIComponent(escape(t))},extractUrlBase:function(e){var t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}};Object.assign(_i.prototype,{load:function(e,t,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:uu.extractUrlBase(e),a=new vr(this.manager);a.setWithCredentials(this.withCredentials),a.load(e,function(n){var r=JSON.parse(n),a=r.metadata;if(void 0!==a){var s=a.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+e+" should be loaded with THREE.ObjectLoader instead.")}var l=i.parse(r,o);t(l.geometry,l.materials)},n,r)},setTexturePath:function(e){this.texturePath=e},parse:function(){function e(e,t){function n(e,t){return e&1<<t}var r,o,a,l,u,c,d,h,f,p,m,g,v,b,_,w,x,E,S,T,C,O,P,A,R,L,I,k=e.faces,N=e.vertices,D=e.normals,j=e.colors,U=e.scale,F=0;if(void 0!==e.uvs){for(r=0;r<e.uvs.length;r++)e.uvs[r].length&&F++;for(r=0;r<F;r++)t.faceVertexUvs[r]=[]}for(l=0,u=N.length;l<u;)E=new s,E.x=N[l++]*U,E.y=N[l++]*U,E.z=N[l++]*U,t.vertices.push(E);for(l=0,u=k.length;l<u;)if(p=k[l++],m=n(p,0),g=n(p,1),v=n(p,3),b=n(p,4),_=n(p,5),w=n(p,6),x=n(p,7),m){if(T=new M,T.a=k[l],T.b=k[l+1],T.c=k[l+3],C=new M,C.a=k[l+1],C.b=k[l+2],C.c=k[l+3],l+=4,g&&(f=k[l++],T.materialIndex=f,C.materialIndex=f),a=t.faces.length,v)for(r=0;r<F;r++)for(A=e.uvs[r],t.faceVertexUvs[r][a]=[],t.faceVertexUvs[r][a+1]=[],o=0;o<4;o++)h=k[l++],L=A[2*h],I=A[2*h+1],R=new i(L,I),2!==o&&t.faceVertexUvs[r][a].push(R),0!==o&&t.faceVertexUvs[r][a+1].push(R);if(b&&(d=3*k[l++],T.normal.set(D[d++],D[d++],D[d]),C.normal.copy(T.normal)),_)for(r=0;r<4;r++)d=3*k[l++],P=new s(D[d++],D[d++],D[d]),2!==r&&T.vertexNormals.push(P),0!==r&&C.vertexNormals.push(P);if(w&&(c=k[l++],O=j[c],T.color.setHex(O),C.color.setHex(O)),x)for(r=0;r<4;r++)c=k[l++],O=j[c],2!==r&&T.vertexColors.push(new y(O)),0!==r&&C.vertexColors.push(new y(O));t.faces.push(T),t.faces.push(C)}else{if(S=new M,S.a=k[l++],S.b=k[l++],S.c=k[l++],g&&(f=k[l++],S.materialIndex=f),a=t.faces.length,v)for(r=0;r<F;r++)for(A=e.uvs[r],t.faceVertexUvs[r][a]=[],o=0;o<3;o++)h=k[l++],L=A[2*h],I=A[2*h+1],R=new i(L,I),t.faceVertexUvs[r][a].push(R);if(b&&(d=3*k[l++],S.normal.set(D[d++],D[d++],D[d])),_)for(r=0;r<3;r++)d=3*k[l++],P=new s(D[d++],D[d++],D[d]),S.vertexNormals.push(P);if(w&&(c=k[l++],S.color.setHex(j[c])),x)for(r=0;r<3;r++)c=k[l++],S.vertexColors.push(new y(j[c]));t.faces.push(S)}}function t(e,t){var n=void 0!==e.influencesPerVertex?e.influencesPerVertex:2;if(e.skinWeights)for(var r=0,i=e.skinWeights.length;r<i;r+=n){var o=e.skinWeights[r],a=n>1?e.skinWeights[r+1]:0,s=n>2?e.skinWeights[r+2]:0,l=n>3?e.skinWeights[r+3]:0;t.skinWeights.push(new c(o,a,s,l))}if(e.skinIndices)for(var r=0,i=e.skinIndices.length;r<i;r+=n){var u=e.skinIndices[r],d=n>1?e.skinIndices[r+1]:0,h=n>2?e.skinIndices[r+2]:0,f=n>3?e.skinIndices[r+3]:0;t.skinIndices.push(new c(u,d,h,f))}t.bones=e.bones,t.bones&&t.bones.length>0&&(t.skinWeights.length!==t.skinIndices.length||t.skinIndices.length!==t.vertices.length)&&console.warn("When skinning, number of vertices ("+t.vertices.length+"), skinIndices ("+t.skinIndices.length+"), and skinWeights ("+t.skinWeights.length+") should match.")}function n(e,t){var n=e.scale;if(void 0!==e.morphTargets)for(var r=0,i=e.morphTargets.length;r<i;r++){t.morphTargets[r]={},t.morphTargets[r].name=e.morphTargets[r].name,t.morphTargets[r].vertices=[];for(var o=t.morphTargets[r].vertices,a=e.morphTargets[r].vertices,l=0,u=a.length;l<u;l+=3){var c=new s;c.x=a[l]*n,c.y=a[l+1]*n,c.z=a[l+2]*n,o.push(c)}}if(void 0!==e.morphColors&&e.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var d=t.faces,h=e.morphColors[0].colors,r=0,i=d.length;r<i;r++)d[r].color.fromArray(h,3*r)}}function r(e,t){var n=[],r=[];void 0!==e.animation&&r.push(e.animation),void 0!==e.animations&&(e.animations.length?r=r.concat(e.animations):r.push(e.animations));for(var i=0;i<r.length;i++){var o=gi.parseAnimation(r[i],t.bones);o&&n.push(o)}if(t.morphTargets){var a=gi.CreateClipsFromMorphTargetSequences(t.morphTargets,10);n=n.concat(a)}n.length>0&&(t.animations=n)}return function(i,o){void 0!==i.data&&(i=i.data),void 0!==i.scale?i.scale=1/i.scale:i.scale=1;var a=new T;return e(i,a),t(i,a),n(i,a),r(i,a),a.computeFaceNormals(),a.computeBoundingSphere(),void 0===i.materials||0===i.materials.length?{geometry:a}:{geometry:a,materials:bi.prototype.initMaterials(i.materials,o,this.crossOrigin)}}}()}),Object.assign(wi.prototype,{load:function(e,t,n,r){""===this.texturePath&&(this.texturePath=e.substring(0,e.lastIndexOf("/")+1));var i=this;new vr(i.manager).load(e,function(n){var o=null;try{o=JSON.parse(n)}catch(t){return void 0!==r&&r(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}var a=o.metadata;if(void 0===a||void 0===a.type||"geometry"===a.type.toLowerCase())return void console.error("THREE.ObjectLoader: Can't load "+e+". Use THREE.JSONLoader instead.");i.parse(o,t)},n,r)},setTexturePath:function(e){this.texturePath=e},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){var n=this.parseShape(e.shapes),r=this.parseGeometries(e.geometries,n),i=this.parseImages(e.images,function(){void 0!==t&&t(s)}),o=this.parseTextures(e.textures,i),a=this.parseMaterials(e.materials,o),s=this.parseObject(e.object,r,a);return e.animations&&(s.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(s),s},parseShape:function(e){var t={};if(void 0!==e)for(var n=0,r=e.length;n<r;n++){var i=(new Xr).fromJSON(e[n]);t[i.uuid]=i}return t},parseGeometries:function(e,t){var n={};if(void 0!==e)for(var r=new _i,i=new yi,o=0,a=e.length;o<a;o++){var s,l=e[o];switch(l.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new Jl[l.type](l.width,l.height,l.widthSegments,l.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new Jl[l.type](l.width,l.height,l.depth,l.widthSegments,l.heightSegments,l.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new Jl[l.type](l.radius,l.segments,l.thetaStart,l.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new Jl[l.type](l.radiusTop,l.radiusBottom,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new Jl[l.type](l.radius,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new Jl[l.type](l.radius,l.widthSegments,l.heightSegments,l.phiStart,l.phiLength,l.thetaStart,l.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new Jl[l.type](l.radius,l.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new Jl[l.type](l.innerRadius,l.outerRadius,l.thetaSegments,l.phiSegments,l.thetaStart,l.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new Jl[l.type](l.radius,l.tube,l.radialSegments,l.tubularSegments,l.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new Jl[l.type](l.radius,l.tube,l.tubularSegments,l.radialSegments,l.p,l.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new Jl[l.type](l.points,l.segments,l.phiStart,l.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new Jl[l.type](l.vertices,l.indices,l.radius,l.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],c=0,d=l.shapes.length;c<d;c++){var h=t[l.shapes[c]];u.push(h)}s=new Jl[l.type](u,l.curveSegments);break;case"BufferGeometry":s=i.parse(l);break;case"Geometry":s=r.parse(l,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+l.type+'"');continue}s.uuid=l.uuid,void 0!==l.name&&(s.name=l.name),n[l.uuid]=s}return n},parseMaterials:function(e,t){var n={};if(void 0!==e){var r=new vi;r.setTextures(t);for(var i=0,o=e.length;i<o;i++){var a=e[i];if("MultiMaterial"===a.type){for(var s=[],l=0;l<a.materials.length;l++)s.push(r.parse(a.materials[l]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(e){for(var t=[],n=0;n<e.length;n++){var r=gi.parse(e[n]);t.push(r)}return t},parseImages:function(e,t){var n=this,r={};if(void 0!==e&&e.length>0){var i=new gr(t),o=new _r(i);o.setCrossOrigin(this.crossOrigin);for(var a=0,s=e.length;a<s;a++){var l=e[a],u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l.url)?l.url:n.texturePath+l.url;r[l.uuid]=function(e){return n.manager.itemStart(e),o.load(e,function(){n.manager.itemEnd(e)},void 0,function(){n.manager.itemEnd(e),n.manager.itemError(e)})}(u)}}return r},parseTextures:function(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var r={};if(void 0!==e)for(var i=0,o=e.length;i<o;i++){var a=e[i];void 0===a.image&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),void 0===t[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);var s=new u(t[a.image]);s.needsUpdate=!0,s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,cu)),void 0!==a.offset&&s.offset.fromArray(a.offset),void 0!==a.repeat&&s.repeat.fromArray(a.repeat),void 0!==a.center&&s.center.fromArray(a.center),void 0!==a.rotation&&(s.rotation=a.rotation),void 0!==a.wrap&&(s.wrapS=n(a.wrap[0],du),s.wrapT=n(a.wrap[1],du)),void 0!==a.format&&(s.format=a.format),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,hu)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,hu)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),r[a.uuid]=s}return r},parseObject:function(e,t,n){function r(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function i(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],r=0,i=e.length;r<i;r++){var o=e[r];void 0===n[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),t.push(n[o])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}var o;switch(e.type){case"Scene":o=new Ot,void 0!==e.background&&Number.isInteger(e.background)&&(o.background=new y(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?o.fog=new Ct(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(o.fog=new Tt(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":o=new xt(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(o.focus=e.focus),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.filmGauge&&(o.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(o.filmOffset=e.filmOffset),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new S(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(o.zoom=e.zoom),void 0!==e.view&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new ni(e.color,e.intensity);break;case"DirectionalLight":o=new ti(e.color,e.intensity);break;case"PointLight":o=new $r(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new ri(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new Qr(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":o=new Zr(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var a=r(e.geometry),s=i(e.material);o=a.bones&&a.bones.length>0?new kt(a,s):new K(a,s);break;case"LOD":o=new Rt;break;case"Line":o=new Dt(r(e.geometry),i(e.material),e.mode);break;case"LineLoop":o=new Ut(r(e.geometry),i(e.material));break;case"LineSegments":o=new jt(r(e.geometry),i(e.material));break;case"PointCloud":case"Points":o=new Bt(r(e.geometry),i(e.material));break;case"Sprite":o=new At(i(e.material));break;case"Group":o=new zt;break;default:o=new x}if(o.uuid=e.uuid,void 0!==e.name&&(o.name=e.name),void 0!==e.matrix?(o.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(void 0!==e.position&&o.position.fromArray(e.position),void 0!==e.rotation&&o.rotation.fromArray(e.rotation),void 0!==e.quaternion&&o.quaternion.fromArray(e.quaternion),void 0!==e.scale&&o.scale.fromArray(e.scale)),void 0!==e.castShadow&&(o.castShadow=e.castShadow),void 0!==e.receiveShadow&&(o.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(o.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(o.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&o.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(o.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(o.visible=e.visible),void 0!==e.frustumCulled&&(o.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(o.renderOrder=e.renderOrder),void 0!==e.userData&&(o.userData=e.userData),void 0!==e.children)for(var l=e.children,u=0;u<l.length;u++)o.add(this.parseObject(l[u],t,n));if("LOD"===e.type)for(var c=e.levels,d=0;d<c.length;d++){var h=c[d],f=o.getObjectByProperty("uuid",h.object);void 0!==f&&o.addLevel(f,h.distance)}return o}});var cu={UVMapping:es,CubeReflectionMapping:ts,CubeRefractionMapping:ns,EquirectangularReflectionMapping:rs,EquirectangularRefractionMapping:is,SphericalReflectionMapping:os,CubeUVReflectionMapping:as,CubeUVRefractionMapping:ss},du={RepeatWrapping:ls,ClampToEdgeWrapping:us,MirroredRepeatWrapping:cs},hu={NearestFilter:ds,NearestMipMapNearestFilter:hs,NearestMipMapLinearFilter:fs,LinearFilter:ps,LinearMipMapNearestFilter:ms,LinearMipMapLinearFilter:gs};xi.prototype={constructor:xi,setOptions:function(e){return this.options=e,this},load:function(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e);var i=this,o=$l.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout(function(){t&&t(o),i.manager.itemEnd(e)},0),o;fetch(e).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,i.options)}).then(function(n){$l.add(e,n),t&&t(n),i.manager.itemEnd(e)}).catch(function(t){r&&r(t),i.manager.itemEnd(e),i.manager.itemError(e)})},setCrossOrigin:function(){return this},setPath:function(e){return this.path=e,this}},Object.assign(Ei.prototype,{moveTo:function(e,t){this.currentPath=new qr,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t)},lineTo:function(e,t){this.currentPath.lineTo(e,t)},quadraticCurveTo:function(e,t,n,r){this.currentPath.quadraticCurveTo(e,t,n,r)},bezierCurveTo:function(e,t,n,r,i,o){this.currentPath.bezierCurveTo(e,t,n,r,i,o)},splineThru:function(e){this.currentPath.splineThru(e)},toShapes:function(e,t){function n(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n],o=new Xr;o.curves=i.curves,t.push(o)}return t}var r=Zl.isClockWise,i=this.subPaths;if(0===i.length)return[];if(!0===t)return n(i);var o,a,s,l=[];if(1===i.length)return a=i[0],s=new Xr,s.curves=a.curves,l.push(s),l;var u=!r(i[0].getPoints());u=e?!u:u;var c,d=[],h=[],f=[],p=0;h[p]=void 0,f[p]=[];for(var m=0,g=i.length;m<g;m++)a=i[m],c=a.getPoints(),o=r(c),o=e?!o:o,o?(!u&&h[p]&&p++,h[p]={s:new Xr,p:c},h[p].s.curves=a.curves,u&&p++,f[p]=[]):f[p].push({h:a,p:c[0]});if(!h[0])return n(i);if(h.length>1){for(var v=!1,y=[],b=0,_=h.length;b<_;b++)d[b]=[];for(var b=0,_=h.length;b<_;b++)for(var w=f[b],x=0;x<w.length;x++){for(var E=w[x],S=!0,M=0;M<h.length;M++)(function(e,t){for(var n=t.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=t[i],s=t[o],l=s.x-a.x,u=s.y-a.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(a=t[o],l=-l,s=t[i],u=-u),e.y<a.y||e.y>s.y)continue;if(e.y===a.y){if(e.x===a.x)return!0}else{var c=u*(e.x-a.x)-l*(e.y-a.y);if(0===c)return!0;if(c<0)continue;r=!r}}else{if(e.y!==a.y)continue;if(s.x<=e.x&&e.x<=a.x||a.x<=e.x&&e.x<=s.x)return!0}}return r})(E.p,h[M].p)&&(b!==M&&y.push({froms:b,tos:M,hole:x}),S?(S=!1,d[M].push(E)):v=!0);S&&d[b].push(E)}y.length>0&&(v||(f=d))}for(var T,m=0,C=h.length;m<C;m++){s=h[m].s,l.push(s),T=f[m];for(var O=0,P=T.length;O<P;O++)s.holes.push(T[O].h)}return l}}),Object.assign(Si.prototype,{isFont:!0,generateShapes:function(e,t,n){void 0===t&&(t=100),void 0===n&&(n=4);for(var r=[],i=Mi(e,t,n,this.data),o=0,a=i.length;o<a;o++)Array.prototype.push.apply(r,i[o].toShapes());return r}}),Object.assign(Ci.prototype,{load:function(e,t,n,r){var i=this,o=new vr(this.manager);o.setPath(this.path),o.load(e,function(e){var n;try{n=JSON.parse(e)}catch(t){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(e.substring(65,e.length-2))}var r=i.parse(n);t&&t(r)},n,r)},parse:function(e){return new Si(e)},setPath:function(e){return this.path=e,this}});var fu,pu={getContext:function(){return void 0===fu&&(fu=new(window.AudioContext||window.webkitAudioContext)),fu},setContext:function(e){fu=e}};Object.assign(Oi.prototype,{load:function(e,t,n,r){var i=new vr(this.manager);i.setResponseType("arraybuffer"),i.load(e,function(e){pu.getContext().decodeAudioData(e,function(e){t(e)})},n,r)}}),Object.assign(Pi.prototype,{update:function(){var e,t,n,r,i,a,s,l,u=new o,c=new o;return function(o){if(e!==this||t!==o.focus||n!==o.fov||r!==o.aspect*this.aspect||i!==o.near||a!==o.far||s!==o.zoom||l!==this.eyeSep){e=this,t=o.focus,n=o.fov,r=o.aspect*this.aspect,i=o.near,a=o.far,s=o.zoom;var d=o.projectionMatrix.clone();l=this.eyeSep/2;var h,f,p=l*i/t,m=i*Math.tan(Ol.DEG2RAD*n*.5)/s;c.elements[12]=-l,u.elements[12]=l,h=-m*r+p,f=m*r+p,d.elements[0]=2*i/(f-h),d.elements[8]=(f+h)/(f-h),this.cameraL.projectionMatrix.copy(d),h=-m*r-p,f=m*r-p,d.elements[0]=2*i/(f-h),d.elements[8]=(f+h)/(f-h),this.cameraR.projectionMatrix.copy(d)}this.cameraL.matrixWorld.copy(o.matrixWorld).multiply(c),this.cameraR.matrixWorld.copy(o.matrixWorld).multiply(u)}}()}),Ai.prototype=Object.create(x.prototype),Ai.prototype.constructor=Ai,Ri.prototype=Object.assign(Object.create(x.prototype),{constructor:Ri,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(e){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01)},updateMatrixWorld:function(){var e=new s,t=new a,n=new s,r=new s;return function(i){x.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(e,t,n),r.set(0,0,-1).applyQuaternion(t),o.positionX?(o.positionX.setValueAtTime(e.x,this.context.currentTime),o.positionY.setValueAtTime(e.y,this.context.currentTime),o.positionZ.setValueAtTime(e.z,this.context.currentTime),o.forwardX.setValueAtTime(r.x,this.context.currentTime),o.forwardY.setValueAtTime(r.y,this.context.currentTime),o.forwardZ.setValueAtTime(r.z,this.context.currentTime),o.upX.setValueAtTime(a.x,this.context.currentTime),o.upY.setValueAtTime(a.y,this.context.currentTime),o.upZ.setValueAtTime(a.z,this.context.currentTime)):(o.setPosition(e.x,e.y,e.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),Li.prototype=Object.assign(Object.create(x.prototype),{constructor:Li,getOutput:function(){return this.gain},setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setBuffer:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){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.");var e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.onended=this.onEnded.bind(this),e.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,e.start(this.startTime,this.offset),this.isPlaying=!0,this.source=e,this.connect()},pause:function(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this)},stop:function(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.offset=0,this.isPlaying=!1,this)},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(e){return e||(e=[]),!0===this.isPlaying?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this)},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(e){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this)},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}),Ii.prototype=Object.assign(Object.create(Li.prototype),{constructor:Ii,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){this.panner.refDistance=e},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){this.panner.rolloffFactor=e},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){this.panner.distanceModel=e},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){this.panner.maxDistance=e},updateMatrixWorld:function(){var e=new s;return function(t){x.prototype.updateMatrixWorld.call(this,t),e.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(e.x,e.y,e.z)}}()}),Object.assign(ki.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),n=0;n<t.length;n++)e+=t[n];return e/t.length}}),Object.assign(Ni.prototype,{accumulate:function(e,t){var n=this.buffer,r=this.valueSize,i=e*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=t}else{o+=t;var s=t/o;this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(e){var t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*t;this._mixBufferRegion(n,r,a,1-i,t)}for(var s=t,l=t+t;s!==l;++s)if(n[s]!==n[s+t]){o.setValue(n,r);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,n=this.valueSize,r=3*n;e.getValue(t,r);for(var i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_select:function(e,t,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)e[t+o]=e[n+o]},_slerp:function(e,t,n,r){a.slerpFlat(e,t,e,t,e,n,r)},_lerp:function(e,t,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=t+a;e[s]=e[s]*o+e[n+a]*r}}});var mu="\\[\\]\\.:\\/";Object.assign(Di.prototype,{getValue:function(e,t){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)},setValue:function(e,t){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}),Object.assign(ji,{Composite:Di,create:function(e,t,n){return e&&e.isAnimationObjectGroup?new ji.Composite(e,t,n):new ji(e,t,n)},sanitizeNodeName:function(){var e=new RegExp("["+mu+"]","g");return function(t){return t.replace(/\s/g,"_").replace(e,"")}}(),parseTrackName:function(){var e="[^"+mu+"]",t="[^"+mu.replace("\\.","")+"]",n=/((?:WC+[\/:])*)/.source.replace("WC",e),r=/(WCOD+)?/.source.replace("WCOD",t),i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",e),o=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",e),a=new RegExp("^"+n+r+i+o+"$"),s=["material","materials","bones"];return function(e){var t=a.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var i=n.nodeName.substring(r+1);-1!==s.indexOf(i)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=i)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}}(),findNode:function(e,t){if(!t||""===t||"root"===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){var n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){var r=function(e){for(var n=0;n<e.length;n++){var i=e[n];if(i.name===t||i.uuid===t)return i;var o=r(i.children);if(o)return o}return null},i=r(e.children);if(i)return i}return null}}),Object.assign(ji.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)e[t++]=n[r]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++]},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,n=t.objectName,r=t.propertyName,i=t.propertyIndex;if(e||(e=ji.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){var o=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var a=0;a<e.length;a++)if(e[a].name===o){o=a;break}break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==o){if(void 0===e[o])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[o]}}var s=e[r];if(void 0===s){var l=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+r+" but it wasn't found.",e)}var u=this.Versioning.None;void 0!==e.needsUpdate?(u=this.Versioning.NeedsUpdate,this.targetObject=e):void 0!==e.matrixWorldNeedsUpdate&&(u=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=e);var c=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(e.geometry.isBufferGeometry){if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(var a=0;a<this.node.geometry.morphAttributes.position.length;a++)if(e.geometry.morphAttributes.position[a].name===i){i=a;break}}else{if(!e.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(var a=0;a<this.node.geometry.morphTargets.length;a++)if(e.geometry.morphTargets[a].name===i){i=a;break}}}c=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(c=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][u]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(ji.prototype,{_getValue_unbound:ji.prototype.getValue,_setValue_unbound:ji.prototype.setValue}),Object.assign(Ui.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length,l=void 0,u=0,c=arguments.length;u!==c;++u){var d=arguments[u],h=d.uuid,f=r[h];if(void 0===f){f=t++,r[h]=f,e.push(d);for(var p=0,m=s;p!==m;++p)a[p].push(new ji(d,i[p],o[p]))}else if(f<n){l=e[f];var g=--n,v=e[g];r[v.uuid]=f,e[f]=v,r[h]=g,e[g]=d;for(var p=0,m=s;p!==m;++p){var y=a[p],b=y[g],_=y[f];y[f]=b,void 0===_&&(_=new ji(d,i[p],o[p])),y[g]=_}}else e[f]!==l&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=n},remove:function(){for(var e=this._objects,t=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,i=r.length,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],l=s.uuid,u=n[l];if(void 0!==u&&u>=t){var c=t++,d=e[c];n[d.uuid]=u,e[u]=d,n[l]=c,e[c]=s;for(var h=0,f=i;h!==f;++h){var p=r[h],m=p[c],g=p[u];p[u]=m,p[c]=g}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var l=arguments[a],u=l.uuid,c=r[u];if(void 0!==c)if(delete r[u],c<n){var d=--n,h=e[d],f=--t,p=e[f];r[h.uuid]=c,e[c]=h,r[p.uuid]=d,e[d]=p,e.pop();for(var m=0,g=o;m!==g;++m){var v=i[m],y=v[d],b=v[f];v[c]=y,v[d]=b,v.pop()}}else{var f=--t,p=e[f];r[p.uuid]=c,e[c]=p,e.pop();for(var m=0,g=o;m!==g;++m){var v=i[m];v[c]=v[f],v.pop()}}}this.nCachedObjects_=n},subscribe_:function(e,t){var n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,l=s.length,u=this.nCachedObjects_,c=new Array(l);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(c);for(var d=u,h=s.length;d!==h;++d){var f=s[d];c[d]=new ji(f,e,t)}return c},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(Fi.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){var r=this._clip.duration,i=e._clip.duration,o=i/r,a=r/i;e.warp(1,o,t),this.warp(a,1,t)}return this},crossFadeTo:function(e,t,n){return e.crossFadeFrom(this,t,n)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._effectiveTimeScale,0,e)},warp:function(e,t,n){var r=this._mixer,i=r.time,o=this._timeScaleInterpolant,a=this.timeScale;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);var s=o.parameterPositions,l=o.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/a,l[1]=t/a,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);var i=this._startTime;if(null!==i){var o=(e-i)*n;if(o<0||0===n)return;this._startTime=null,t=n*o}t*=this._updateTimeScale(e);var a=this._updateTime(t),s=this._updateWeight(e);if(s>0)for(var l=this._interpolants,u=this._propertyBindings,c=0,d=l.length;c!==d;++c)l[c].evaluate(a),u[c].accumulate(r,s)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e;if(0===e)return t;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===al){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=n)t=n;else{if(!(t<0))break e;t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{var o=r===ll;if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),t>=n||t<0){var a=Math.floor(t/n);t-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var l=e<0;this._setEndings(l,!l,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}if(o&&1==(1&i))return this.time=t,n-t}return this.time=t,t},_setEndings:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=fl,r.endingEnd=fl):(r.endingStart=e?this.zeroSlopeAtStart?fl:hl:pl,r.endingEnd=t?this.zeroSlopeAtEnd?fl:hl:pl)},_scheduleFading:function(e,t,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}}),Bi.prototype=Object.assign(Object.create(r.prototype),{constructor:Bi,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName,u=l[s];void 0===u&&(u={},l[s]=u);for(var c=0;c!==i;++c){var d=r[c],h=d.name,f=u[h];if(void 0!==f)o[c]=f;else{if(void 0!==(f=o[c])){null===f._cacheIndex&&(++f.referenceCount,this._addInactiveBinding(f,s,h));continue}var p=t&&t._propertyBindings[c].binding.parsedPath;f=new Ni(ji.create(n,h,p),d.ValueTypeName,d.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,s,h),o[c]=f}a[c].resultBuffer=f.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,n){var r=this._actions,i=this._actionsByClip,o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{var a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e},_removeInactiveAction:function(e){var t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;var i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,l=s[s.length-1],u=e._byClipCacheIndex;l._byClipCacheIndex=u,s[u]=l,s.pop(),e._byClipCacheIndex=null,delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(e){var t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackAction:function(e){var t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_addInactiveBinding:function(e,t,n){var r=this._bindingsByRootAndName,i=r[t],o=this._bindings;void 0===i&&(i={},r[t]=i),i[n]=e,e._cacheIndex=o.length,o.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete a[i];e:{for(var u in a)break e;delete o[r]}},_lendBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return void 0===n&&(n=new hi(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t){var n=t||this._root,r=n.uuid,i="string"==typeof e?gi.findByName(n,e):e,o=null!==i?i.uuid:e,a=this._actionsByClip[o],s=null;if(void 0!==a){var l=a.actionByRoot[r];if(void 0!==l)return l;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var u=new Fi(this,i,t);return this._bindAction(u,s),this._addInactiveAction(u,o,r),u},existingAction:function(e,t){var n=t||this._root,r=n.uuid,i="string"==typeof e?gi.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a?a.actionByRoot[r]||null:null},stopAllAction:function(){var e=this._actions,t=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==t;++i)e[i].reset();for(var i=0;i!==r;++i)n[i].useCount=0;return this},update:function(e){e*=this.timeScale;for(var t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1,a=0;a!==n;++a){t[a]._update(r,e,i,o)}for(var s=this._bindings,l=this._nActiveBindings,a=0;a!==l;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var l=o[a];this._deactivateAction(l);var u=l._cacheIndex,c=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,c._cacheIndex=u,t[u]=c,t.pop(),this._removeInactiveBindingsForAction(l)}delete r[n]}},uncacheRoot:function(e){var t=e.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot,o=i[t];void 0!==o&&(this._deactivateAction(o),this._removeInactiveAction(o))}var a=this._bindingsByRootAndName,s=a[t];if(void 0!==s)for(var l in s){var u=s[l];u.restoreOriginalState(),this._removeInactiveBinding(u)}},uncacheAction:function(e,t){var n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),zi.prototype.clone=function(){return new zi(void 0===this.value.clone?this.value:this.value.clone())},Hi.prototype=Object.assign(Object.create(F.prototype),{constructor:Hi,isInstancedBufferGeometry:!0,copy:function(e){return F.prototype.copy.call(this,e),this.maxInstancedCount=e.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Vi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Vi.prototype,{isInterleavedBufferAttribute:!0,setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}}),Object.defineProperty(Gi.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Gi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==e?e.length/this.stride:0,this.array=e,this},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(e){return this.onUploadCallback=e,this}}),Wi.prototype=Object.assign(Object.create(Gi.prototype),{constructor:Wi,isInstancedInterleavedBuffer:!0,copy:function(e){return Gi.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),qi.prototype=Object.assign(Object.create(C.prototype),{constructor:qi,isInstancedBufferAttribute:!0,copy:function(e){return C.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),Object.assign(Xi.prototype,{linePrecision:1,set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize()):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(e,t,n){var r=n||[];return Zi(e,this,r,t),r.sort(Yi),r},intersectObjects:function(e,t,n){var r=n||[];if(!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=e.length;i<o;i++)Zi(e[i],this,r,t);return r.sort(Yi),r}}),Object.assign(Ki.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=("undefined"==typeof performance?Date:performance).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}),Object.assign(Ji.prototype,{set:function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(e){return this.radius=e.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e.x,e.z),this.phi=Math.acos(Ol.clamp(e.y/this.radius,-1,1))),this}}),Object.assign(Qi.prototype,{set:function(e,t,n){return this.radius=e,this.theta=t,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},setFromVector3:function(e){return this.radius=Math.sqrt(e.x*e.x+e.z*e.z),this.theta=Math.atan2(e.x,e.z),this.y=e.y,this}}),Object.assign($i.prototype,{set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:function(){var e=new i;return function(t,n){var r=e.copy(n).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new i),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new i),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new i),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new i),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new i;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),eo.prototype=Object.create(x.prototype),eo.prototype.constructor=eo,eo.prototype.isImmediateRenderObject=!0,to.prototype=Object.create(jt.prototype),to.prototype.constructor=to,to.prototype.update=function(){var e=new s,t=new s,n=new l;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var i=this.object.matrixWorld,o=this.geometry.attributes.position,a=this.object.geometry;if(a&&a.isGeometry)for(var s=a.vertices,l=a.faces,u=0,c=0,d=l.length;c<d;c++)for(var h=l[c],f=0,p=h.vertexNormals.length;f<p;f++){var m=s[h[r[f]]],g=h.vertexNormals[f];e.copy(m).applyMatrix4(i),t.copy(g).applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),o.setXYZ(u,e.x,e.y,e.z),u+=1,o.setXYZ(u,t.x,t.y,t.z),u+=1}else if(a&&a.isBufferGeometry)for(var v=a.attributes.position,y=a.attributes.normal,u=0,f=0,p=v.count;f<p;f++)e.set(v.getX(f),v.getY(f),v.getZ(f)).applyMatrix4(i),t.set(y.getX(f),y.getY(f),y.getZ(f)),t.applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),o.setXYZ(u,e.x,e.y,e.z),u+=1,o.setXYZ(u,t.x,t.y,t.z),u+=1;o.needsUpdate=!0}}(),no.prototype=Object.create(x.prototype),no.prototype.constructor=no,no.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},no.prototype.update=function(){var e=new s,t=new s;return function(){this.light.updateMatrixWorld();var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),e.setFromMatrixPosition(this.light.matrixWorld),t.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(t.sub(e)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),io.prototype=Object.create(jt.prototype),io.prototype.constructor=io,io.prototype.updateMatrixWorld=function(){var e=new s,t=new o,n=new o;return function(r){var i=this.bones,o=this.geometry,a=o.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var s=0,l=0;s<i.length;s++){var u=i[s];u.parent&&u.parent.isBone&&(t.multiplyMatrices(n,u.matrixWorld),e.setFromMatrixPosition(t),a.setXYZ(l,e.x,e.y,e.z),t.multiplyMatrices(n,u.parent.matrixWorld),e.setFromMatrixPosition(t),a.setXYZ(l+1,e.x,e.y,e.z),l+=2)}o.getAttribute("position").needsUpdate=!0,x.prototype.updateMatrixWorld.call(this,r)}}(),oo.prototype=Object.create(K.prototype),oo.prototype.constructor=oo,oo.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},oo.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},ao.prototype=Object.create(x.prototype),ao.prototype.constructor=ao,ao.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},ao.prototype.update=function(){var e=.5*this.light.width,t=.5*this.light.height,n=this.line.geometry.attributes.position,r=n.array;r[0]=e,r[1]=-t,r[2]=0,r[3]=e,r[4]=t,r[5]=0,r[6]=-e,r[7]=t,r[8]=0,r[9]=-e,r[10]=-t,r[11]=0,r[12]=e,r[13]=-t,r[14]=0,n.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},so.prototype=Object.create(x.prototype),so.prototype.constructor=so,so.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},so.prototype.update=function(){var e=new s,t=new y,n=new y;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var i=r.geometry.getAttribute("color");t.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?t:n;i.setXYZ(o,s.r,s.g,s.b)}i.needsUpdate=!0}r.lookAt(e.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),lo.prototype=Object.create(jt.prototype),lo.prototype.constructor=lo,uo.prototype=Object.create(jt.prototype),uo.prototype.constructor=uo,co.prototype=Object.create(jt.prototype),co.prototype.constructor=co,co.prototype.update=function(){var e=new s,t=new s,n=new l;return function(){this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);for(var r=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry,a=o.vertices,s=o.faces,l=0,u=0,c=s.length;u<c;u++){var d=s[u],h=d.normal;e.copy(a[d.a]).add(a[d.b]).add(a[d.c]).divideScalar(3).applyMatrix4(r),t.copy(h).applyMatrix3(n).normalize().multiplyScalar(this.size).add(e),i.setXYZ(l,e.x,e.y,e.z),l+=1,i.setXYZ(l,t.x,t.y,t.z),l+=1}i.needsUpdate=!0}}(),ho.prototype=Object.create(x.prototype),ho.prototype.constructor=ho,ho.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},ho.prototype.update=function(){var e=new s,t=new s,n=new s;return function(){e.setFromMatrixPosition(this.light.matrixWorld),t.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(t,e),this.lightPlane.lookAt(n),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(n),this.targetLine.scale.z=n.length()}}(),fo.prototype=Object.create(jt.prototype),fo.prototype.constructor=fo,fo.prototype.update=function(){function e(e,o,a,s){r.set(o,a,s).unproject(i);var l=n[e];if(void 0!==l)for(var u=t.getAttribute("position"),c=0,d=l.length;c<d;c++)u.setXYZ(l[c],r.x,r.y,r.z)}var t,n,r=new s,i=new E;return function(){t=this.geometry,n=this.pointMap;i.projectionMatrix.copy(this.camera.projectionMatrix),e("c",0,0,-1),e("t",0,0,1),e("n1",-1,-1,-1),e("n2",1,-1,-1),e("n3",-1,1,-1),e("n4",1,1,-1),e("f1",-1,-1,1),e("f2",1,-1,1),e("f3",-1,1,1),e("f4",1,1,1),e("u1",.7,1.1,-1),e("u2",-.7,1.1,-1),e("u3",0,2,-1),e("cf1",-1,0,1),e("cf2",1,0,1),e("cf3",0,-1,1),e("cf4",0,1,1),e("cn1",-1,0,-1),e("cn2",1,0,-1),e("cn3",0,-1,-1),e("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),po.prototype=Object.create(jt.prototype),po.prototype.constructor=po,po.prototype.update=function(){var e=new p;return function(t){if(void 0!==t&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&e.setFromObject(this.object),!e.isEmpty()){var n=e.min,r=e.max,i=this.geometry.attributes.position,o=i.array;o[0]=r.x,o[1]=r.y,o[2]=r.z,o[3]=n.x,o[4]=r.y,o[5]=r.z,o[6]=n.x,o[7]=n.y,o[8]=r.z,o[9]=r.x,o[10]=n.y,o[11]=r.z,o[12]=r.x,o[13]=r.y,o[14]=n.z,o[15]=n.x,o[16]=r.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=r.x,o[22]=n.y,o[23]=n.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),po.prototype.setFromObject=function(e){return this.object=e,this.update(),this},mo.prototype=Object.create(jt.prototype),mo.prototype.constructor=mo,mo.prototype.updateMatrixWorld=function(e){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),x.prototype.updateMatrixWorld.call(this,e))},go.prototype=Object.create(Dt.prototype),go.prototype.constructor=go,go.prototype.updateMatrixWorld=function(e){var t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.lookAt(this.plane.normal),x.prototype.updateMatrixWorld.call(this,e)};var gu,vu;vo.prototype=Object.create(x.prototype),vo.prototype.constructor=vo,vo.prototype.setDirection=function(){var e,t=new s;return function(n){n.y>.99999?this.quaternion.set(0,0,0,1):n.y<-.99999?this.quaternion.set(1,0,0,0):(t.set(n.z,0,-n.x).normalize(),e=Math.acos(n.y),this.quaternion.setFromAxisAngle(t,e))}}(),vo.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(0,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},vo.prototype.setColor=function(e){this.line.material.color.copy(e),this.cone.material.color.copy(e)},yo.prototype=Object.create(jt.prototype),yo.prototype.constructor=yo;var yu=0,bu=1;Er.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Er.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(Wr.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new T,n=0,r=e.length;n<r;n++){var i=e[n];t.vertices.push(new s(i.x,i.y,i.z||0))}return t}}),Object.assign(qr.prototype,{fromPoints:function(e){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),Fo.prototype=Object.create(Cr.prototype),Bo.prototype=Object.create(Cr.prototype),zo.prototype=Object.create(Cr.prototype),Object.assign(zo.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),lo.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},io.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(bi.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),uu.extractUrlBase(e)}}),Object.assign($i.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(p.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),Y.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(Ol,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ol.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ol.ceilPowerOfTwo(e)}}),Object.assign(l.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(e){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(e)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(o.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){var e;return function(){return void 0===e&&(e=new s),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),e.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(e){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(e)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)}}),g.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},a.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},Object.assign(X.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(Z.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(Z,{barycoordFromPoint:function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Z.getBarycoord(e,t,n,r,i)},normal:function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Z.getNormal(e,t,n,r)}}),Object.assign(Xr.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new zn(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Jn(this,e)}}),Object.assign(i.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(s.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(c.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(T.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(x.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(x.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Rt.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Lt.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Er.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),xt.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Yr.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(C.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(F.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addDrawCall:function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(F.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Hn.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(zi.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(G.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new y}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===da}}}),Object.defineProperties(dr.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(q.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign(Mt.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Mt.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(gt.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(d.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(St.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),Li.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new Oi).load(e,function(e){t.setBuffer(e)}),this},ki.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ai.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)};var _u={merge:function(e,t,n){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var r;t.isMesh&&(t.matrixAutoUpdate&&t.updateMatrix(),r=t.matrix,t=t.geometry),e.merge(t,r,n)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}},wu={crossOrigin:void 0,loadTexture:function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new xr;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},loadTextureCube:function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new wr;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}},xu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.kNIntoTons=function(e){return.1019716213*e};t.tonsTokN=function(e){return 9.80665*e},t.kNIntoTonsFloor=function(e){return Math.floor(r(e))},t.kNIntoTonsRound=function(e){return Math.round(r(e))},t.RoundTo1Decimal=function(e){return Math.round(10*e)/10},t.getShareInRage=function(e,t,n){return(e-t)/(n-t)}},function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=i(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([o]).join("\n")}return[n].join("\n")}function i(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=r(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];null!=o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];null!=a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=m[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(d(r.parts[o],t))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(d(r.parts[o],t));m[r.id]={id:r.id,refs:1,parts:a}}}}function i(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],s=o[1],l=o[2],u=o[3],c={css:s,media:l,sourceMap:u};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}function o(e,t){var n=y(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=w[w.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),w.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=y(e.insertAt.before,n);n.insertBefore(t,i)}}function a(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=w.indexOf(e);t>=0&&w.splice(t,1)}function s(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=c();n&&(e.attrs.nonce=n)}return u(t,e.attrs),o(e,t),t}function l(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",u(t,e.attrs),o(e,t),t}function u(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function c(){return n.nc}function d(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var u=_++;n=b||(b=s(t)),r=h.bind(null,n,u,!1),i=h.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=p.bind(null,n,t),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function h(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=E(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function p(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=x(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var m={},g=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),v=function(e,t){return t?t.querySelector(e):document.querySelector(e)},y=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=v.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),b=null,_=0,w=[],x=n(525);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=g()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var o=[],a=0;a<n.length;a++){var s=n[a],l=m[s.id];l.refs--,o.push(l)}if(e){r(i(e,t),t)}for(var a=0;a<o.length;a++){var l=o[a];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete m[l.id]}}}};var E=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.apiUrls={country:"/api/CountrySearch/getcountries","ships-agency":"/api/PortSearch/GetPorts","maritime-logistics":"/api/MaritimeLogisticsOfficeSearch/GetOffices","marine-products":"/api/MarineProductsOfficeSearch/GetOffices",people:"/api/PeopleSearch/GetPeople"},t.scrollbarOptions={wheelPropagation:!1,minScrollbarLength:20,maxScrollbarLength:20,suppressScrollX:!0,swipeEasing:!1},t.suggestionMessages={start:"Start typing...",noResults:"No results found",enterMore:"Enter more than 3 characters"},t.delay=250},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n,r,o,a,s,l){if(i(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,s,l],d=0;u=new Error(t.replace(/%s/g,function(){return c[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var i=function(e){};e.exports=r},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(422)},function(e,t,n){"use strict";(function(t){function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var i=n(20),o=n(434),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(155):void 0!==t&&(e=n(155)),e}(),transformRequest:[function(e,t){return o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){s.headers[e]={}}),i.forEach(["post","put","patch"],function(e){s.headers[e]=i.merge(a)}),e.exports=s}).call(t,n(111))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function o(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function a(){m&&f&&(m=!1,f.length?p=f.concat(p):g=-1,p.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=p.length;t;){for(f=p,p=[];++g<t;)f&&f[g].run();g=-1,t=p.length}f=null,m=!1,o(e)}}function l(e,t){this.fun=e,this.array=t}function u(){}var c,d,h=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(e){c=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var f,p=[],m=!1,g=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||m||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.hotspotClasses,n=e.id,r=e.style,i=e.onClick,o=e.onMouseEnter,a=e.onMouseLeave,s=e.labelText;return l.default.createElement("div",{className:t,id:n,style:r,onClick:i,onMouseEnter:o||null,onMouseLeave:a||null},l.default.createElement("span",{className:"hotspot__marker"}),l.default.createElement("div",{className:"hotspot__line-container"},l.default.createElement("span",{className:"hotspot__line"})),l.default.createElement("div",{className:"hotspot__label-container"},l.default.createElement("div",{className:"hotspot__label"},l.default.createElement("span",{className:"hotspot__label-text"},s))))}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"}(t.Direction||(t.Direction={}))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(512),d=r(c);n(526);var h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={displayModal:!1},n.closeModal=n.closeModal.bind(n),n.onImageClick=n.onImageClick.bind(n),n}return a(t,e),s(t,[{key:"closeModal",value:function(){this.setState({displayModal:!1})}},{key:"displayModalForm",value:function(){return this.props.formUrl}},{key:"displayModalVideo",value:function(){return this.props.localVideoUrl||this.props.videoEmbed}},{key:"displayModalImage",value:function(){return!this.displayModalVideo()&&!this.props.teaserUrl&&this.props.imageUrl}},{key:"onImageClick",value:function(){this.setState({displayModal:!0})}},{key:"render",value:function(){var e="";this.props.imageUrl||this.displayModalVideo()||this.displayModalImage()||(e="single-teaser-image--no-image");var t={backgroundPosition:"center",backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundImage:"url("+this.props.imageUrl+")"};return u.default.createElement("div",{className:"single-teaser"},this.displayModalVideo()||this.displayModalImage()||this.displayModalForm()?u.default.createElement("figure",null,u.default.createElement("div",{className:"img-flow ratio-16-9 single-teaser-image "+e,style:t},this.displayModalVideo()&&u.default.createElement("div",{className:"image-overlay video-play",onClick:this.onImageClick}),this.displayModalImage()&&u.default.createElement("div",{className:"image-overlay image-open",onClick:this.onImageClick}),this.displayModalForm()&&u.default.createElement("div",{className:"image-overlay form-open",onClick:this.onImageClick}))):u.default.createElement("a",{href:this.props.teaserUrl},u.default.createElement("figure",null,u.default.createElement("div",{className:"img-flow ratio-16-9 single-teaser-image "+e,style:t}))),u.default.createElement("div",{className:"flowList__item-content single-teaser-content"},u.default.createElement("h4",{className:"heading heading--quaternary single-teaser-growing-header"},this.props.teaserUrl&&u.default.createElement("a",{href:this.props.teaserUrl},this.props.teaserText),!this.props.teaserUrl&&u.default.createElement("div",null,this.props.teaserText)),this.props.teaserDetails&&u.default.createElement("div",{className:"preview-intro"},this.props.teaserDetails),this.props.children,u.default.createElement(d.default,{displayMode:this.displayModalVideo()?c.ModalType.VIDEO:this.displayModalForm()?c.ModalType.FORM:c.ModalType.IMAGE,isOpen:this.state.displayModal,onRequestClose:this.closeModal,localVideoUrl:this.props.localVideoUrl,embedCode:this.props.videoEmbed,imageUrl:this.props.imageUrl,formUrl:this.props.formUrl})))}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var r=n(519),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=i.default,a=o.canUseDOM?window.HTMLElement:{};t.canUseDOM=o.canUseDOM;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(t.locationsAPIurls={single:"/api/mapLocations/findlocation",all:"/api/mapLocations/findalllocations",info:"/ContactData/"},t.requestNamesMap={latitude:"Latitude",longitude:"Longitude",type:"Type",id:"Guid",name:"Name",country:"Country",url:"Url"},t.googleMapsAPIurl="https://maps.googleapis.com/maps/api/js?key=AIzaSyAURrPQGSKNcWhRPaO8UVq4A5EZ3V6QAXw",t.googleMapsWebUrl="https://www.google.com/maps/search/?api=1&query=",t.markerStyleTypeMap={office:"office",Port:"port",ShipAgencyOffice:"office",HeadOffice:"office",ShipManagementOffice:"office",MaritimeLogisticsOffice:"office",CrewRecruitmentOffice:"office"},t.officeNameMap={office:"Office",Port:"Port",ShipAgencyOffice:"Ships Agency Office",HeadOffice:"Headquarter",ShipManagementOffice:"Ship Management Office",MaritimeLogisticsOffice:"Maritime Logistics Office",CrewRecruitmentOffice:"Manning Services Office"},t.officeIconClassMap={office:"sa",Port:"port","Ships Agency Office":"sa",Headquarter:"hq","Ship Management Office":"sm","Maritime Logistics Office":"ml","Manning Services Office":"ms"},t.markerStyles={office:{path:"M12 0C5.383 0 0 5.083 0 11.333c0 6.013 10.91 21.685 11.374 22.348A.766.766 0 0 0 12 34c.252 0 .486-.12.626-.319C13.09 33.018 24 17.346 24 11.333 24 5.084 18.617 0 12 0zm0 16c-2.757 0-5-2.244-5-5s2.243-5 5-5 5 2.244 5 5-2.243 5-5 5z",fillColor:"#345888",fillOpacity:1,scale:1,strokeWeight:1,strokeColor:"#ffffff",anchor:{x:12,y:34}},port:{path:"M12 0C5.383 0 0 5.083 0 11.333c0 6.013 10.91 21.685 11.374 22.348A.766.766 0 0 0 12 34c.252 0 .486-.12.626-.319C13.09 33.018 24 17.346 24 11.333 24 5.084 18.617 0 12 0zm0 16c-2.757 0-5-2.244-5-5s2.243-5 5-5 5 2.244 5 5-2.243 5-5 5z",fillColor:"#ffffff",fillOpacity:1,scale:1,strokeWeight:1,strokeColor:"#345888",anchor:{x:12,y:34}}},t.mapStyles=[{featureType:"all",stylers:[{saturation:"-60"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels",stylers:[{visibility:"off"}]}],t.mapZoom={small:10,large:4}),i=t.clusterStyles=[{textColor:"white",textSize:12,url:"/Static/prod/images/Contacts-locations/Pin--aggregated.png",height:30,width:38,anchor:{x:19,y:0},scale:1,strokeWeight:1,strokeColor:"#ffffff"}];t.clusterOptions={gridSize:100,styles:i,minZoom:r.large,maxZoom:r.small}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(563),d=r(c),h=n(564),f=r(h),p=n(565),m=r(p),g=n(19),v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isButtonFocused:!1,isInputFocused:!1,isSuggestionFocused:!1,inputValue:""},n.suggestionsComponentRef=(0,l.createRef)(),n.handleInput=n.handleInput.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n.matchInputToSuggestionPick=n.matchInputToSuggestionPick.bind(n),n.handleButtonFocus=n.handleButtonFocus.bind(n),n.handleInputFocus=n.handleInputFocus.bind(n),n.handleSuggestionFocus=n.handleSuggestionFocus.bind(n),n}return a(t,e),s(t,[{key:"handleInput",value:function(e){this.setState({inputValue:e.target.value}),"map"===this.props.searchType&&this.props.handleFilterQueryChange(e.target.value)}},{key:"handleSubmit",value:function(e){e.preventDefault();var t=this.suggestionsComponentRef.current.getActiveSuggestion();t&&t.firstElementChild&&((0,g.triggerMouseEvent)(t.firstElementChild,"mousedown"),e.stopPropagation())}},{key:"handleInputFocus",value:function(e){this.setState({isInputFocused:"focus"===e})}},{key:"handleButtonFocus",value:function(e){this.setState({isButtonFocused:"focus"===e})}},{key:"handleSuggestionFocus",value:function(e){}},{key:"matchInputToSuggestionPick",value:function(e){"map"===this.props.searchType?this.setState({inputValue:e},this.props.handleFilterQueryChange(e)):this.setState({inputValue:e})}},{key:"render",value:function(){var e=this.state.isInputFocused||this.state.isButtonFocused||this.state.isSuggestionFocused;return u.default.createElement("form",{className:"search-component"+(e?" active":""),onSubmit:this.handleSubmit,autoComplete:"off"},u.default.createElement(d.default,{type:this.props.searchType,inputValue:this.state.inputValue,placeholder:this.props.placeholder,handleFocus:this.handleInputFocus,handleInput:this.handleInput}),u.default.createElement(f.default,{type:this.props.buttonType,handleFocus:this.handleButtonFocus}),u.default.createElement(m.default,{type:this.props.searchType,query:this.state.inputValue,ref:this.suggestionsComponentRef,handleFocus:this.handleSuggestionFocus,matchInputToSuggestionPick:this.matchInputToSuggestionPick,handleSuggestionClick:this.props.handleSuggestionClick,locations:this.props.locations}))}}]),t}(l.Component);t.default=v},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=r(e),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var c in n)o.call(n,c)&&(l[c]=n[c]);if(i){s=i(n);for(var d=0;d<s.length;d++)a.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(20),i=n(435),o=n(437),a=n(438),s=n(439),l=n(156),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(440);e.exports=function(e){return new Promise(function(t,c){var d=e.data,h=e.headers;r.isFormData(d)&&delete h["Content-Type"];var f=new XMLHttpRequest,p="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in f||s(e.url)||(f=new window.XDomainRequest,p="onload",m=!0,f.onprogress=function(){},f.ontimeout=function(){}),e.auth){var g=e.auth.username||"",v=e.auth.password||"";h.Authorization="Basic "+u(g+":"+v)}if(f.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f[p]=function(){if(f&&(4===f.readyState||m)&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?f.response:f.responseText,o={data:r,status:1223===f.status?204:f.status,statusText:1223===f.status?"No Content":f.statusText,headers:n,config:e,request:f};i(t,c,o),f=null}},f.onerror=function(){c(l("Network Error",e,null,f)),f=null},f.ontimeout=function(){c(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var y=n(441),b=(e.withCredentials||s(e.url))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;b&&(h[e.xsrfHeaderName]=b)}if("setRequestHeader"in f&&r.forEach(h,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete h[t]:f.setRequestHeader(t,e)}),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){f&&(f.abort(),c(e),f=null)}),void 0===d&&(d=null),f.send(d)})}},function(e,t,n){"use strict";var r=n(436);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.Number.toString().toLowerCase().startsWith("article"),n=e.ImageUrl.trim().length>0,r=(0,c.default)("img-flow","ratio-16-9",{"img-flow--no-img":!n});return a.default.createElement("li",{className:"flowList__item",key:(0,l.default)()},a.default.createElement("figure",null,a.default.createElement("a",{href:e.ExternalUrl},a.default.createElement("div",{className:r},n?a.default.createElement("img",{src:e.ImageUrl,alt:e.Name}):null))),e.SupersedesProductInfo&&a.default.createElement("p",{className:"flowList__additional-info"},e.SupersedesProductInfo),a.default.createElement("div",{className:"flowList__item-content"},a.default.createElement("h3",null,a.default.createElement("a",{href:e.ExternalUrl},e.Name)),a.default.createElement("p",{className:"preview-intro"},e.Description),t?null:a.default.createElement("p",null,a.default.createElement("span",null,"Product number: ",a.default.createElement("strong",null,e.Number)))))}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o),s=n(60),l=r(s),u=n(31),c=r(u),d=function e(t){var n=t.productsList.map(function(e){return i(e)}),r=(0,c.default)("flowList","flowList--products","few",{"flowList--horizontal":t.layoutType===e.layoutTypes.list,loading:t.isLoading});return a.default.createElement("div",{id:"productsList","aria-live":"polite","aria-relevant":"additions removals"},a.default.createElement("h2",{className:"visually-hidden-accessible"},"Product list"),a.default.createElement("ul",{id:"productCatalogueSearchResults",className:r},n))};d.layoutTypes={list:"list",grid:"grid"},t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(31),d=r(c),h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isOpen:!1,isFocused:!1,selectedOption:n.props.selectedOption},n.handleKeyboardNavigation=n.handleKeyboardNavigation.bind(n),n.handleKeyboardOptionSelection=n.handleKeyboardOptionSelection.bind(n),n.handleBtnClick=n.handleBtnClick.bind(n),n.handleBtnFocus=n.handleBtnFocus.bind(n),n.handleBtnBlur=n.handleBtnBlur.bind(n),n.createOptionItem=n.createOptionItem.bind(n),n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.bindEventListeners()}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"bindEventListeners",value:function(){window.addEventListener("keydown",this.handleKeyboardNavigation,!1)}},{key:"unbindEventListeners",value:function(){window.removeEventListener("keydown",this.handleKeyboardNavigation,!1)}},{key:"handleKeyboardNavigation",value:function(e){!this.state.isFocused||40!==e.keyCode&&38!==e.keyCode||(e.preventDefault(),this.state.isOpen?this.setOption(e.keyCode):this.setState({isOpen:!0}))}},{key:"setOption",value:function(e){var t=this.props.options,n=t.length,r=t.indexOf(this.state.selectedOption),i=40===e?r+1:r-1;i<n&&i>=0?this.setState({selectedOption:t[i]}):i<0&&this.setState({selectedOption:t[0]})}},{key:"handleBtnClick",value:function(){this.setState(function(e){return{isOpen:!e.isOpen}})}},{key:"handleBtnFocus",value:function(){this.setState({isFocused:!0})}},{key:"handleBtnBlur",value:function(){this.setState({isOpen:!1,isFocused:!1})}},{key:"handleOptionSelection",value:function(e){this.setState(function(t){return{isOpen:!t.isOpen,selectedOption:e}}),this.props.onValueSelection(e)}},{key:"handleKeyboardOptionSelection",value:function(e){13===e.keyCode&&this.state.isOpen&&(this.setState({isOpen:!1}),this.props.onValueSelection(this.state.selectedOption))}},{key:"createOptionItem",value:function(e){var t=this,n=(0,d.default)("custom-select__item",{"custom-select__item--highlighted":e===this.state.selectedOption});return u.default.createElement("li",{className:n,role:"option",key:e,id:this.props.optionsListName+"-"+e,onMouseDown:function(){return t.handleOptionSelection(e)}},e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.optionsListName,r=t.options,i=t.labelId,o=this.state,a=o.isOpen,s=o.selectedOption,l=r.map(function(t){return e.createOptionItem(t)}),c=(0,d.default)("custom-select__widget",{"custom-select__widget--open":a});return u.default.createElement("div",{className:"custom-select"},u.default.createElement("div",{className:c},u.default.createElement("button",{role:"combobox","aria-owns":n,"aria-expanded":a,"aria-labelledby":i,"aria-activedescendant":n+"-"+s,onMouseDown:this.handleBtnClick,onKeyDown:this.handleKeyboardOptionSelection,onBlur:this.handleBtnBlur,onFocus:this.handleBtnFocus,type:"button",className:"custom-select__btn"},u.default.createElement("span",{className:"custom-select__label"},s)),u.default.createElement("ul",{id:n,className:"custom-select__list",role:"listbox"},l)))}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(h.ShipContext.Consumer,null,function(t){return d.default.createElement(x,l({shipType:t.shipType},e))})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(35),f=n(55),p=n(462),m=r(p),g=n(463),v=r(g),y=n(464),b=r(y),_=n(486),w=r(_),x=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.hotspotRef=d.default.createRef(),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){this.props.threeDShip&&this.props.addHotspotRef(this.hotspotRef.current)}},{key:"render",value:function(){var e=void 0;return e=this.props.threeDShip?d.default.createElement(m.default,{areaName:this.props.area.name,hotspotLabelText:this.props.area.displayName,areaId:this.props.area.name,moveCameraToPosition:this.props.moveCameraToPosition,getTwoDCoordinatesFromThreeD:this.props.getTwoDCoordinatesFromThreeD,shipHasLoaded:this.props.shipHasLoaded,ref:this.hotspotRef}):d.default.createElement(v.default,{areaName:this.props.area.name,hotspotLabelText:this.props.area.displayName,areaId:this.props.area.name}),d.default.createElement("div",{className:"ships-viewer-area",key:this.props.area.id},e,d.default.createElement(b.default,{areaName:this.props.area.name,areaDisplayName:this.props.area.displayName,areaSubcategories:this.props.area.subareas,areaId:this.props.area.name,moveCameraToInitialPosition:this.props.threeDShip?this.props.moveCameraToInitialPosition:null}),this.props.shipType!==f.ships.offshore&&this.props.area.name===f.areasNamesMap.engineRoom&&d.default.createElement(w.default,{closeupAreaSubareas:this.props.area.subareas,areaId:this.props.area.name,areaName:this.props.area.name,engineRoomImgUrl:this.props.engineRoomImgUrl}))}}]),t}(c.Component);t.default=s},function(e,t,n){function r(e,t,n){var r=u[t];if(void 0===r&&(r=o(t)),r){if(void 0===n)return e.style[r];e.style[r]=c(r,n)}}function i(e,t){for(var n in t)t.hasOwnProperty(n)&&r(e,n,t[n])}function o(e){var t=l(e),n=s(t);return u[t]=u[e]=u[n]=n,n}function a(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:i(arguments[0],arguments[1]):r(arguments[0],arguments[1],arguments[2])}var s=n(469),l=n(470),u={float:"cssFloat"},c=n(473);e.exports=a,e.exports.set=a,e.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(t,n){return t[n]=r(e,n||""),t},{}):r(e,t||"")}},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){if(e=Math.round(1e11*e)/1e11,!o){var s=a[t-1],l=a[t+1];if(s&&s>e)return s;if(l&&l<e)return l}if(e>r)return r;if(e<n)return n;var u=Math.round(1e11*e)%Math.round(1e11*i),c=Math.round(1e11*e-u),d=0===u?e:c/1e11,h=Math.abs(u/1e11)<i/2?d:d+i*Math.sign(e),f=i.toString().split(".")[1];return f?parseFloat(h.toFixed(f.length)):h}function i(e,t,n){return(e-t)/(n-t)}function o(e){return e===g.Direction.Up||e===g.Direction.Down}function a(e,t,n){if(t>=n)throw new RangeError("min ("+t+") is equal/bigger than max ("+n+")");if(e<t)throw new RangeError("value ("+e+") is smaller than min ("+t+")");if(e>n)throw new RangeError("value ("+e+") is bigger than max ("+n+")")}function s(e){if(!(e.length<2||e.slice(1).every(function(t,n){return e[n]<=t})))throw new RangeError("values={["+e+"]} needs to be sorted when allowOverlap={false}")}function l(e){var t=window.getComputedStyle(e);return{top:parseInt(t["margin-top"],10),bottom:parseInt(t["margin-bottom"],10),left:parseInt(t["margin-left"],10),right:parseInt(t["margin-right"],10)}}function u(e){var t=window.getComputedStyle(e);return{top:parseInt(t["padding-top"],10),bottom:parseInt(t["padding-bottom"],10),left:parseInt(t["padding-left"],10),right:parseInt(t["padding-right"],10)}}function c(e,t){e.forEach(function(e,n){return d(e,t[n].x,t[n].y)})}function d(e,t,n){e.style.transform="translate("+t+"px, "+n+"px)"}function h(e,t,n){var r=e.slice(0);return r[t]=n,r}function f(e){var t=e.values,n=e.colors,r=e.min,i=e.max,o=e.direction,a=void 0===o?g.Direction.Right:o,s=t.map(function(e){return(e-r)/(i-r)*100}),l=s.reduce(function(e,t,r){return e+", "+n[r]+" "+t+"%, "+n[r+1]+" "+t+"%"},"");return"linear-gradient("+a+", "+n[0]+" 0%"+l+", "+n[n.length-1]+" 100%)"}function p(){}function m(e){throw new Error("Didn't expect to get here")}Object.defineProperty(t,"__esModule",{value:!0});var g=n(113);t.normalizeValue=r,t.relativeValue=i,t.isVertical=o,t.checkBoundaries=a,t.checkInitialOverlap=s,t.getMargin=l,t.getPadding=u,t.translateThumbs=c,t.translate=d,t.schd=function(e){var t=[],n=null;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t=r,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))}},t.replaceAt=h,t.getTrackBackground=f,t.voidFn=p,t.assertUnreachable=m},function(e,t,n){"use strict";function r(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function i(e){for(var t=e;t&&t!==document.body;){if(r(t))return!1;t=t.parentNode}return!0}function o(e,t){var n=e.nodeName.toLowerCase();return(l.test(n)&&!e.disabled||("a"===n?e.href||t:t))&&i(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&o(e,!n)}function s(e){return[].slice.call(e.querySelectorAll("*"),0).filter(a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;/*!
 * Adapted from jQuery UI core
 *
 * http://jqueryui.com
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/category/ui-core/
 */
var l=/input|select|textarea|button|object/;e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function i(e){var t=e;if("string"==typeof t&&h.canUseDOM){var n=document.querySelectorAll(t);r(n,t),t="length"in n?n[0]:n}return f=t||f}function o(e){return!(!e&&!f)||((0,d.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}function a(e){o(e)&&(e||f).setAttribute("aria-hidden","true")}function s(e){o(e)&&(e||f).removeAttribute("aria-hidden")}function l(){f=null}function u(){f=null}Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=r,t.setElement=i,t.validateElement=o,t.hide=a,t.show=s,t.documentNotReadyOrSSRTesting=l,t.resetForTesting=u;var c=n(518),d=function(e){return e&&e.__esModule?e:{default:e}}(c),h=n(115),f=null},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function e(){var t=this;r(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach(function(n){return n(e,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},o=new i;t.default=o,e.exports=t.default},function(e,t,n){"use strict";function r(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return r=function(){return e},e}function i(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=r();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}function o(e){return e&&e.__esModule?e:{default:e}}function a(e){"@babel/helpers - typeof";return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function f(e){return function(){var t,n=v(e);if(g()){var r=v(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return p(this,t)}}function p(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?m(e):t}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var _=o(n(1)),w=o(n(529)),x=i(n(36)),E=i(n(548)),S=n(554),M=function(e){function t(e){var r;c(this,t),r=n.call(this,e),T.call(m(r));var i=x.getSlides(e),o=x.cloneCarouselItems(i);return r.state={clones:o,currentIndex:1,duration:e.duration,initialStageHeight:0,isAutoPlaying:!1,isAutoplayCanceledOnAction:!1,slides:i,stagePadding:{},style:x.getDefaultStyles()},r.hasUserAction=!1,r.slideTo=r.slideTo.bind(m(r)),r.slidePrev=r.slidePrev.bind(m(r)),r.slideNext=r.slideNext.bind(m(r)),r._onTouchMove=r._onTouchMove.bind(m(r)),r._handleOnDotClick=r._handleOnDotClick.bind(m(r)),r._throttledOnTouchMove=x.throttle(r._onTouchMove,10),r._debouncedHandleOnWindowResize=x.debounce(r._handleOnWindowResize,100),r}y(t,e);var n=f(t);return h(t,[{key:"componentDidMount",value:function(){this._setInitialState(),this._setupSwipeHandlers(),this._resetAllIntermediateProps(),window.addEventListener("resize",this._debouncedHandleOnWindowResize),this.props.keysControlDisabled||window.addEventListener("keyup",this._handleOnKeyUp),this.props.autoPlay&&this._play()}},{key:"componentDidUpdate",value:function(e){if(this.props.autoHeight&&this.stageComponent&&!this.state.initialStageHeight){var t=x.getGalleryItemHeight(this.stageComponent,this.props,this.state);this.setState({initialStageHeight:t})}this.props.duration!==e.duration&&this.setState({duration:this.props.duration}),this.props.fadeOutAnimation!==e.fadeOutAnimation&&this.setState({fadeoutAnimationProcessing:!1},this._resetAnimationProps),this.props.slideToIndex!==e.slideToIndex&&this._onSlideToIndexChange(this.state.currentIndex,this.props.slideToIndex),this.props.autoPlay!==e.autoPlay&&(this.props.autoPlay?this._play():this._pause(),this.setState({isAutoPlaying:this.props.autoPlay})),this.props.stagePadding===e.stagePadding&&this.props.responsive===e.responsive&&this.props.infinite===e.infinite&&this.props.items===e.items||(this._resetAllIntermediateProps(),this.setState(x.calculateInitialProps(this.props,this.stageComponent))),this.props.keysControlDisabled!==e.keysControlDisabled&&(this.props.keysControlDisabled?window.removeEventListener("keyup",this._handleOnKeyUp):window.addEventListener("keyup",this._handleOnKeyUp)),this.swipingStarted||this.props.mouseTrackingEnabled===e.mouseTrackingEnabled&&this.props.touchTrackingEnabled===e.touchTrackingEnabled&&this.props.preventEventOnTouchMove===e.preventEventOnTouchMove&&this.props.swipeDelta===e.swipeDelta||this.swiper.update({delta:this.props.swipeDelta,mouseTrackingEnabled:this.props.mouseTrackingEnabled,touchTrackingEnabled:this.props.touchTrackingEnabled,preventDefaultTouchmoveEvent:this.props.preventEventOnTouchMove})}},{key:"componentWillUnmount",value:function(){this._pause(),this._resetAllIntermediateProps(),this.swiper.destroy(),window.removeEventListener("keyup",this._handleOnKeyUp),window.removeEventListener("resize",this._debouncedHandleOnWindowResize)}},{key:"slideTo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._isClickDisabled(e)||(this._pause(),this._disableAnimation(),this._isFadeOutAnimationAllowed()&&this.setAnimationPropsOnDotClick(e),this._slideToItem(e))}},{key:"slidePrev",value:function(e){if(e&&e.isTrusted&&(this.hasUserAction=!0),!this._isClickDisabled()){if(this._pause(),this._disableAnimation(),this._isFadeOutAnimationAllowed()&&this._setAnimationPropsOnClick("prev"),x.itemInfo(this.state).isPrevSlideDisabled)return this._onInactiveItem();this._slideToItem(this.state.currentIndex-1)}}},{key:"slideNext",value:function(e){if(e&&e.isTrusted&&(this.hasUserAction=!0),!this._isClickDisabled()){if(this._pause(),this._disableAnimation(),this._isFadeOutAnimationAllowed()&&this._setAnimationPropsOnClick("next"),x.itemInfo(this.state).isNextSlideDisabled)return this._onInactiveItem();this._slideToItem(this.state.currentIndex+1)}}},{key:"_handleOnDotClick",value:function(e){this.hasUserAction=!0,this.slideTo(e)}},{key:"_setupSwipeHandlers",value:function(){this.swiper=new w.default({element:this.rootComponent,delta:this.props.swipeDelta,onSwiping:this._throttledOnTouchMove,onSwiped:this._onTouchEnd,rotationAngle:5,mouseTrackingEnabled:this.props.mouseTrackingEnabled,touchTrackingEnabled:this.props.touchTrackingEnabled,preventDefaultTouchmoveEvent:this.props.preventEventOnTouchMove,preventTrackingOnMouseleave:!0}),this.swiper.init()}},{key:"_onSlideChange",value:function(){this.props.onSlideChange&&this.props.onSlideChange(this._getEventObject())}},{key:"_onSlideChanged",value:function(){var e=this,t=this.state,n=t.isAutoPlaying,r=t.isAutoplayCanceledOnAction,i=this.props,o=i.disableAutoPlayOnAction,a=i.onSlideChanged;o&&this.hasUserAction&&!r?this.setState({isAutoplayCanceledOnAction:!0,isAutoPlaying:!1},function(){e._allowAnimation(),a&&a(e._getEventObject())}):(n&&this._play(),this._allowAnimation(),a&&a(this._getEventObject()))}},{key:"_onInitialized",value:function(e){this.rootComponentDimensions=x.getElementDimensions(this.rootComponent),this.props.onInitialized&&this.props.onInitialized(this._getEventObject(e))}},{key:"_onResized",value:function(){this.props.onResized&&this.props.onResized(this._getEventObject())}},{key:"_setInitialState",value:function(){var e=x.calculateInitialProps(this.props,this.stageComponent);this.setState(e,this._onInitialized(e))}},{key:"_checkSlidePosition",value:function(e){this._stopSwipeAnimation(),this._resetAnimationProps(),this._resetSwipePositionProps(),e?this._skipSlidePositionRecalculation():this._updateSlidePosition()}},{key:"_setAutoPlayInterval",value:function(){var e=this,t=this.props,n=t.autoPlayDirection,r=t.autoPlayInterval;this._autoPlayIntervalId=setTimeout(function(){e.isHovered||("rtl"===n?e.slidePrev():e.slideNext())},r)}},{key:"_clearAutoPlayInterval",value:function(){clearTimeout(this._autoPlayIntervalId),this._autoPlayIntervalId=void 0}},{key:"_clearUpdateSlidePositionIntervalId",value:function(){clearTimeout(this._updateSlidePositionIntervalId),this._updateSlidePositionIntervalId=void 0}},{key:"_play",value:function(){this._setAutoPlayInterval()}},{key:"_slideToItem",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._onSlideChange();var r=n.duration,i=void 0===r?this.state.duration:r,o=n.shouldSkipRecalculation,a=void 0!==o&&o,s=x.getTranslate3dPosition(e,this.state);this.setState(l({currentIndex:e,translate3d:s},this._getIntermediateStateProps(i,a)),function(){return t._checkSlidePosition(a)})}},{key:"_onTouchMove",value:function(e,t,n,r,i){function o(){"RIGHT"===x.getSwipeDirection(0,t)?p+=h*-u:p=p+b-l*u,x.shouldRecalculateSwipePosition(p,y,_)&&o()}if(this.hasUserAction=!0,!this._isSwipeDisabled()&&(this.swipingStarted||!x.isVerticalTouchMoveDetected(e,r,i))){this.swipingStarted=!0,this._pause(),this._disableAnimation(),this._startSwipeAnimation(),this._clearUpdateSlidePositionIntervalId(),this.touchEndTimeoutId&&clearTimeout(this.touchEndTimeoutId);var a=this.state,s=a.slides,l=a.items,u=a.itemWidth,c=a.infinite,d=a.stagePadding,h=s.length,f=x.getSwipeDirection(this.prevSwipPosition,t);this.prevSwipPosition=t;var p=this._getTranslateXPosition(t);if(!1===c){var m=x.getMinSwipeLimitIfNotInfinite(l,u),g=x.getMaxSwipeLimitIfNotInfinite(h,u);if(x.shouldRecalculateSwipePosition(p,m,g))return;return x.animate(this.stageComponent,{position:p}),void this._setSwipePositionProps({position:p,direction:f})}var v=x.getMinSwipePosition(l,u),y=x.getMinSwipeLimit(v,d),b=x.getMaxSwipePosition(l,u,h),_=x.getMaxSwipeLimit(b,d,u);if(x.shouldRecalculateSwipePosition(p,y,_))try{o()}catch(e){x.debug(e)}x.animate(this.stageComponent,{position:p}),this._setSwipePositionProps({position:p,direction:f})}}},{key:"_beforeTouchEnd",value:function(){var e=this,t=this.swipePosition,n=t.direction,r=t.position,i=this.props.transitionTimingFunction,o=this.state,a=o.itemWidth,s=o.items,l=o.duration,u=o.infinite,c=x.calculateSwipeIndex(a,r,n),d=x.getSwipeIndexOnBeforeTouchEnd(c,s),h=x.getSwipePositionOnBeforeTouchEnd(c,a);if(!1===u)return void this._isInfiniteModeDisabledBeforeTouchEnd(c,d);x.animate(this.stageComponent,{position:h,duration:l,transitionTimingFunction:i}),this.touchEndAnimation=!0,this.touchEndTimeoutId=setTimeout(function(){if(e._isSwipeAnimationLastFrame()){if(e.state.isAnimationCanceled)return e._handleOnAnimationCanceled();var t=x.getNextItemIndexBeforeTouchEnd(h,e.state),n=x.getTranslate3dPosition(t,e.state);x.animate(e.stageComponent,{position:n}),e._slideToItem(t,{duration:0,shouldSkipRecalculation:!0})}},l)}},{key:"_isInfiniteModeDisabledBeforeTouchEnd",value:function(e,t){var n=this,r=this.props.transitionTimingFunction,i=this.state,o=i.items,a=i.itemWidth,s=i.duration,l=i.slides,u=x.getTranslate3dPosition(t,{itemWidth:a,items:o});e<o&&(t=x.recalculateCurrentIndexOnBeforeTouchEnd(),u=x.recalculatePositionOnBeforeTouchEnd(o,a)),e>l.length&&(t=x.recalculateCurrentIndexOnBeforeTouchEnd(l.length,o),u=x.recalculatePositionOnBeforeTouchEnd(l.length,a)),x.animate(this.stageComponent,{position:u,duration:s,transitionTimingFunction:r}),this.touchEndAnimation=!0,this.touchEndTimeoutId=setTimeout(function(){if(n._isSwipeAnimationLastFrame()){if(n.state.isAnimationCanceled)return n._handleOnAnimationCanceled();x.animate(n.stageComponent,{position:u}),n._slideToItem(t,{duration:0,shouldSkipRecalculation:!0})}},s)}},{key:"_renderPrevButton",value:function(){var e=x.itemInfo(this.state),t=e.isPrevSlideDisabled;return _.default.createElement(E.PrevNextButton,{name:"prev",disabled:t,onClick:this.slidePrev})}},{key:"_renderNextButton",value:function(){var e=x.itemInfo(this.state),t=e.isNextSlideDisabled;return _.default.createElement(E.PrevNextButton,{name:"next",disabled:t,onClick:this.slideNext})}},{key:"_renderPlayPauseButton",value:function(){var e=this.state.isAutoPlaying;return _.default.createElement(E.PlayPauseButton,{isPlaying:e,onClick:this._playPauseToggle})}},{key:"_renderDotsNavigation",value:function(){return _.default.createElement(E.DotsNavigation,{state:this.state,onClick:this._handleOnDotClick})}},{key:"render",value:function(){var e=this.state,t=e.style,n=e.translate3d,r=e.clones,i=x.getWrapperStyles(this.stageComponent,this.props,this.state),o=x.getStageStyles({translate3d:n},t),a=x.shouldDisableDots(this.props,this.state);return _.default.createElement("div",{className:"alice-carousel"},_.default.createElement("div",{ref:this._setRootComponentRef},_.default.createElement("div",{style:i,className:"alice-carousel__wrapper",onMouseEnter:this._handleOnMouseEnter,onMouseLeave:this._handleOnMouseLeave},_.default.createElement("ul",{style:o,className:"alice-carousel__stage",ref:this._setStageComponentRef},r.map(this._renderStageItem)))),this.props.showSlideInfo?this._renderSlideInfo():null,a?null:this._renderDotsNavigation(),this.props.buttonsDisabled?null:this._renderPrevButton(),this.props.buttonsDisabled?null:this._renderNextButton(),this.props.playButtonEnabled?this._renderPlayPauseButton():null)}}]),t}(_.default.PureComponent);t.default=M;var T=function(){var e=this;this._handleOnWindowResize=function(t){var n=e.props.shouldHandleResizeEvent,r=x.getElementDimensions(e.rootComponent);if((n||x.shouldHandleResizeEvent)(t,e.rootComponentDimensions,r)){e.rootComponentDimensions=r,e._disableAnimation(),e._pause();var i=e.state,o=i.currentIndex,a=i.isAutoPlaying,s=e._isSwipeAnimationProcessing(),u=x.preserveProps(e.props,{startIndex:o}),c=x.calculateInitialProps(u,e.stageComponent),d=x.getTranslate3dPosition(c.currentIndex,c),h=l({},c,{translate3d:d,isAnimationCanceled:s,isAutoPlaying:a,initialStageHeight:0});s&&x.animate(e.stageComponent,{position:d}),e.setState(h,function(){e._resetAllIntermediateProps(),a&&e._play(),e._onResized()})}},this._handleOnAnimationCanceled=function(){e._resetAllIntermediateProps(),e.setState({isAnimationCanceled:!1})},this._handleOnKeyUp=function(t){switch(t.code){case"Space":return e.props.autoPlay&&e._playPauseToggle();case"ArrowLeft":return e.slidePrev();case"ArrowRight":return e.slideNext()}},this._handleOnMouseEnter=function(){e.props.stopAutoPlayOnHover&&e.state.isAutoPlaying&&(e.isHovered=!0,e._pause())},this._handleOnMouseLeave=function(){e.state.isAutoPlaying&&(e.isHovered=!1,e._play())},this._onSlideToIndexChange=function(t,n){n===t+1?e.slideNext():n===t-1?e.slidePrev():e.slideTo(n)},this._onInactiveItem=function(){e._onSlideChange(),e._onSlideChanged()},this._getFadeOutAnimationState=function(t){return t||e._isFadeOutAnimationAllowed()?{fadeoutAnimationProcessing:!1}:{}},this._setRootComponentRef=function(t){return e.rootComponent=t},this._setStageComponentRef=function(t){return e.stageComponent=t},this._allowAnimation=function(){return e.allowAnimation=!0},this._disableAnimation=function(){return e.allowAnimation=!1},this._skipSlidePositionRecalculation=function(){if(e._isFadeOutAnimationAllowed())return e._resetFadeOutAnimationState();e._onSlideChanged()},this._updateSlidePosition=function(){e._updateSlidePositionIntervalId=setTimeout(function(){e._shouldRecalculatePosition()?e._recalculateSlidePosition():e._isFadeOutAnimationAllowed()?e._resetFadeOutAnimationState():e._onSlideChanged()},e.state.duration)},this._resetFadeOutAnimationState=function(){e.setState({fadeoutAnimationProcessing:!1},e._onSlideChanged)},this._resetAllIntermediateProps=function(){e.prevSwipPosition=0,e.swipingStarted=!1,e._stopSwipeAnimation(),e._resetAnimationProps(),e._resetSwipePositionProps(),e._clearUpdateSlidePositionIntervalId(),e._allowAnimation()},this._recalculateSlidePosition=function(){var t=x.getDefaultStyles(),n=x.recalculateCurrentSlideIndex(e.state),r=x.recalculateTranslatePosition(e.state);e.setState(l({currentIndex:n,translate3d:r,style:t},e._getFadeOutAnimationState()),function(){return e._onSlideChanged()})},this._getEventObject=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.state,n=t.items,r=t.currentIndex,i=x.itemInfo(t),o=i.isNextSlideDisabled,a=i.isPrevSlideDisabled;return{item:r,slide:x.getActiveSlideIndex(o,t),itemsInSlide:n,isNextSlideDisabled:o,isPrevSlideDisabled:a}},this.setAnimationPropsOnDotClick=function(t){var n=e.state,r=n.currentIndex,i=n.itemWidth,o=r+1,a=x.getFadeOutOffsetOnDotClick(t,r,i);e._setAnimationProps({fadeOutIndex:o,fadeOutOffset:a,allowFadeOutAnimation:!0})},this._pause=function(){e._clearAutoPlayInterval()},this._playPauseToggle=function(){var t=e.state.isAutoPlaying;e.hasUserAction=!0,e.setState({isAutoPlaying:!t,isAutoplayCanceledOnAction:!0},function(){t?e._pause():e._play()})},this._getIntermediateStateProps=function(t,n){var r=e.props.transitionTimingFunction,i=!n&&e._isFadeOutAnimationAllowed();return x.getIntermediateTransitionProps(i,t,r)},this._startSwipeAnimation=function(){e.swipeAnimation=!0},this._stopSwipeAnimation=function(){e.swipeAnimation=!1,e.touchEndAnimation=!1,e.touchEndTimeoutId=null},this._setAnimationProps=function(t){var n=e.animationProps||{};e.animationProps=l({},n,{},t)},this._resetAnimationProps=function(){e.animationProps={}},this._setSwipePositionProps=function(t){var n=e.swipePosition||{};e.swipePosition=l({},n,{},t)},this._resetSwipePositionProps=function(){e.swipePosition={}},this._getTranslateXPosition=function(t){var n=e.state.translate3d,r=e.swipePosition.lastSwipePosition,i=r||n;if(e.touchEndAnimation){e.touchEndAnimation=!1;var o=x.getTranslateX(e.stageComponent);if(o)return o}return i-Math.floor(t)},this._onTouchEnd=function(){e.swipingStarted&&!e._isSwipeDisabled()&&(e.swipingStarted=!1,e.prevSwipPosition=0,e._setSwipePositionProps({lastSwipePosition:e.swipePosition.position}),e._beforeTouchEnd())},this._isClickDisabled=function(t){var n=e.state,r=n.currentIndex,i=n.isAnimationCanceled;return r===t||i||!e.allowAnimation||e.swipeAnimation},this._isFadeOutAnimationAllowed=function(){var t=e.state,n=t.stagePadding,r=t.items,i=!(n.paddingLeft||n.paddingRight);return e.props.fadeOutAnimation&&1===r&&i},this._isSwipeDisabled=function(){var t=e.state,n=t.isAnimationCanceled,r=t.fadeoutAnimationProcessing;return e.props.swipeDisabled||r||n},this._isSwipeAnimationLastFrame=function(){return!e.swipingStarted},this._isSwipeAnimationProcessing=function(){return e.touchEndTimeoutId},this._shouldRecalculatePosition=function(){var t=e.state,n=t.slides,r=t.currentIndex;return r<0||r>=n.length},this._setAnimationPropsOnClick=function(t){var n=e.state,r=n.currentIndex,i=n.itemWidth,o=x.getFadeOutIndexOnClick(r),a=x.getFadeOutOffsetOnClick(t,i);e._setAnimationProps({fadeOutIndex:o,fadeOutOffset:a,allowFadeOutAnimation:!0})},this._renderSlideInfo=function(){var t=e.state,n=t.currentIndex,r=t.slides;return _.default.createElement(E.SlideInfo,{slidesLength:r.length,currentIndex:n})},this._renderStageItem=function(t,n){var r=x.itemStyles(n,e.state,e.animationProps),i=x.itemClassName(n,e.state,e.animationProps);return _.default.createElement(E.StageItem,{styles:r,className:i,key:"stage-item-".concat(n),item:t})}};M.propTypes=S.propTypes,M.defaultProps=S.defaultProps},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.defineProperty(e,"passive",{get:function(){return this.isPassiveSupported=!0,!0},enumerable:!0}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.createOptions=r},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e?t-e:0}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDuration=r},function(e,t,n){"use strict";function r(e,t,n){return Math.sqrt(e*e+t*t)/(n||1)}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateVelocity=r},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(420)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o=n(1),a=r(o),s=n(109),l=r(s),u=n(19),c=n(430),d=r(c),h=n(452),f=r(h),p=n(490),m=r(p),g=n(495),v=r(g),y=n(505),b=r(y),_=n(114),w=r(_),x=n(528),E=r(x),S=n(559),M=r(S),T=n(560),C=r(T),O=n(117),P=r(O),A=n(573),R=r(A),L=n(575),I=r(L),k=n(580),N=r(k),D=n(581),j=r(D);if(null!==document.getElementById("productsListingRoot")){var U=document.getElementById("productsListingRoot"),F=U.getAttribute("data-categoryid")||"",B=U.getAttribute("data-term")||"",z=void 0;z=U.hasAttribute("data-term")?"/api/product/search":"/api/product/getByCategory",l.default.render(a.default.createElement(d.default,{categoryId:F,searchTerm:B,rootUrl:z}),U)}if((0,u.checkIfDesktop)()&&null!==document.getElementById("shipsViewerRoot")){var H=document.getElementById("shipsViewerRoot"),V=H.getElementsByClassName("ships-viewer__ship-assets-data"),G=Array.prototype.slice.call(V);l.default.render(a.default.createElement(f.default,{shipsAssetsRaw:G}),H)}if(null!==document.getElementById("reactAutocomplete")&&l.default.render(a.default.createElement(m.default,{dataAttributeOwnerId:"reactAutocomplete",categorySelectElementId:"searchResultCategory",minCharacters:3}),document.getElementById("reactAutocomplete")),null!==document.getElementById("reactAutocompleteGlobal")&&l.default.render(a.default.createElement(m.default,{dataAttributeOwnerId:"reactAutocompleteGlobal",categorySelectElementId:"globalCategory",minCharacters:3}),document.getElementById("reactAutocompleteGlobal")),null!==document.getElementById("orderingInfoWithVariantsRoot")){var W=document.getElementById("orderingInfoWithVariantsRoot"),q=W.getAttribute("data-product-id")||"";l.default.render(a.default.createElement(v.default,{productId:q,apiRootUrl:"/api/ropeorderinginfo/getbypageid"}),W)}if(null!==document.getElementById("sdsRoot")){var X=document.getElementById("sdsRoot"),Y=X.getAttribute("data-product-id")||"";l.default.render(a.default.createElement(b.default,{productId:Y}),X)}if(null!==document.getElementById("ourProductsRootId")){var Z=document.getElementById("ourProductsRootId");l.default.render(a.default.createElement(E.default,null),Z)}if(null!==document.getElementsByClassName("teaser-container")){[].concat(i(document.getElementsByClassName("teaser-container"))).forEach(function(e){var t=e.getAttribute("data-teaser-url"),n=e.getAttribute("data-teaser-text"),r=e.getAttribute("data-image-url"),i=e.getAttribute("data-image-alt"),o=e.getAttribute("data-image-title"),s=e.getAttribute("data-author-name"),u=e.getAttribute("data-date-micro"),c=e.getAttribute("data-date"),d=e.getAttribute("data-video-local-url"),h=e.getAttribute("data-video-embed-code"),f=e.getAttribute("data-form-url");l.default.render(a.default.createElement(w.default,{teaserUrl:t,teaserText:n,imageUrl:r,imageAlt:i,imageTitle:o,localVideoUrl:d,videoEmbed:h,formUrl:f},a.default.createElement(M.default,{authorName:s,dateMicro:u,date:c})),e)})}if(null!==document.getElementsByClassName("mapRoot")){[].concat(i(document.getElementsByClassName("mapRoot"))).forEach(function(e){var t=e.getAttribute("data-guid"),n=e.getAttribute("data-coordinates");n&&(n=JSON.parse(n),n=[{Latitude:n[0],Longitude:n[0],typeVariable:"office"}]);var r=e.getAttribute("data-map-size");l.default.render(a.default.createElement(C.default,{guid:t,mapSize:r,coordinates:n}),e)})}if(null!==document.getElementsByClassName("search-component-root")){[].concat(i(document.getElementsByClassName("search-component-root"))).forEach(function(e){var t=e.getAttribute("data-placeholder"),n=e.getAttribute("data-search-type"),r=e.getAttribute("data-button-type");l.default.render(a.default.createElement(P.default,{placeholder:t,searchType:n,buttonType:r}),e)})}if(null!==document.getElementById("contactExpertId")){var K=document.getElementById("contactExpertId"),J=K.getAttribute("data-form-url");l.default.render(a.default.createElement(R.default,{formUrl:J}),K)}if(null!==document.getElementById("maritimePostFeed")){var Q=document.getElementById("maritimePostFeed"),$="true"==Q.getAttribute("data-show-filters"),ee=Q.getAttribute("data-category-id"),te=Q.getAttribute("data-parent-category-id");l.default.render(a.default.createElement(I.default,{showFilters:$,categoryId:ee,parentCategoryId:te}),Q)}if(null!==document.getElementsByClassName("carousel-root")){[].concat(i(document.getElementsByClassName("carousel-root"))).forEach(function(e){var t=e.cloneNode(!0);l.default.render(a.default.createElement(N.default,{items:t.querySelectorAll(".teaser-list__carousel-placeholder")}),e)})}if(null!==document.getElementsByClassName("tabs-root")){[].concat(i(document.getElementsByClassName("tabs-root"))).forEach(function(e){var t=e.getAttribute("data-items");t&&(t=JSON.parse(t)),l.default.render(a.default.createElement(j.default,{items:t}),e)})}},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);y(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function i(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||R}function o(){}function a(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||R}function s(e,t,n){var r=void 0,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)k.call(t,r)&&!N.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:x,type:e,key:o,ref:a,props:i,_owner:I.current}}function l(e){return"object"==typeof e&&null!==e&&e.$$typeof===x}function u(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function c(e,t,n,r){if(j.length){var i=j.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function d(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>j.length&&j.push(e)}function h(e,t,n,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case x:case E:a=!0}}if(a)return n(i,e,""===t?"."+f(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;s<e.length;s++){o=e[s];var l=t+f(o,s);a+=h(o,l,n,i)}else if(null===e||void 0===e?l=null:(l=A&&e[A]||e["@@iterator"],l="function"==typeof l?l:null),"function"==typeof l)for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=t+f(o,s++),a+=h(o,l,n,i);else"object"===o&&(n=""+e,r("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return a}function f(e,t){return"object"==typeof e&&null!==e&&null!=e.key?u(e.key):t.toString(36)}function p(e,t){e.func.call(e.context,t,e.count++)}function m(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,r,n,_.thatReturnsArgument):null!=e&&(l(e)&&(t=i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+n,e={$$typeof:x,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function g(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(D,"$&/")+"/"),t=c(t,o,r,i),null==e||h(e,"",m,t),d(t)}/** @license React v16.3.2
 * react.production.min.js
 *
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var v=n(152),y=n(107),b=n(153),_=n(108),w="function"==typeof Symbol&&Symbol.for,x=w?Symbol.for("react.element"):60103,E=w?Symbol.for("react.portal"):60106,S=w?Symbol.for("react.fragment"):60107,M=w?Symbol.for("react.strict_mode"):60108,T=w?Symbol.for("react.provider"):60109,C=w?Symbol.for("react.context"):60110,O=w?Symbol.for("react.async_mode"):60111,P=w?Symbol.for("react.forward_ref"):60112,A="function"==typeof Symbol&&Symbol.iterator,R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};i.prototype.isReactComponent={},i.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},o.prototype=i.prototype;var L=a.prototype=new o;L.constructor=a,v(L,i.prototype),L.isPureReactComponent=!0;var I={current:null},k=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0},D=/\/+/g,j=[],U={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return g(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=c(null,null,t,n),null==e||h(e,"",p,t),d(t)},count:function(e){return null==e?0:h(e,"",_.thatReturnsNull,null)},toArray:function(e){var t=[];return g(e,t,null,_.thatReturnsArgument),t},only:function(e){return l(e)||r("143"),e}},createRef:function(){return{current:null}},Component:i,PureComponent:a,createContext:function(e,t){return void 0===t&&(t=null),e={$$typeof:C,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_changedBits:0,Provider:null,Consumer:null},e.Provider={$$typeof:T,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:P,render:e}},Fragment:S,StrictMode:M,unstable_AsyncMode:O,createElement:s,cloneElement:function(e,t,n){(null===e||void 0===e)&&r("267",e);var i=void 0,o=v({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,l=I.current),void 0!==t.key&&(a=""+t.key);var u=void 0;e.type&&e.type.defaultProps&&(u=e.type.defaultProps);for(i in t)k.call(t,i)&&!N.hasOwnProperty(i)&&(o[i]=void 0===t[i]&&void 0!==u?u[i]:t[i])}if(1===(i=arguments.length-2))o.children=n;else if(1<i){u=Array(i);for(var c=0;c<i;c++)u[c]=arguments[c+2];o.children=u}return{$$typeof:x,type:e.type,key:a,ref:s,props:o,_owner:l}},createFactory:function(e){var t=s.bind(null,e);return t.type=e,t},isValidElement:l,version:"16.3.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:I,assign:v}},F=Object.freeze({default:U}),B=F&&U||F;e.exports=B.default?B.default:B},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="http://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);un(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function i(e,t,n,r,i,o,a,s,l){this._hasCaughtError=!1,this._caughtError=null;var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}function o(){if(yn._hasRethrowError){var e=yn._rethrowError;throw yn._rethrowError=null,yn._hasRethrowError=!1,e}}function a(){if(bn)for(var e in _n){var t=_n[e],n=bn.indexOf(e);if(-1<n||r("96",e),!wn[n]){t.extractEvents||r("97",e),wn[n]=t,n=t.eventTypes;for(var i in n){var o=void 0,a=n[i],l=t,u=i;xn.hasOwnProperty(u)&&r("99",u),xn[u]=a;var c=a.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&s(c[o],l,u);o=!0}else a.registrationName?(s(a.registrationName,l,u),o=!0):o=!1;o||r("98",i,e)}}}}function s(e,t,n){En[e]&&r("100",e),En[e]=t,Sn[e]=t.eventTypes[n].dependencies}function l(e){bn&&r("101"),bn=Array.prototype.slice.call(e),a()}function u(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var i=e[t];_n.hasOwnProperty(t)&&_n[t]===i||(_n[t]&&r("102",t),_n[t]=i,n=!0)}n&&a()}function c(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=On(r),yn.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function d(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function h(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function f(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i<n.length&&!e.isPropagationStopped();i++)c(e,t,n[i],r[i]);else n&&c(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function p(e){return f(e,!0)}function m(e){return f(e,!1)}function g(e,t){var n=e.stateNode;if(!n)return null;var i=Tn(n);if(!i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(i=!i.disabled)||(e=e.type,i=!("button"===e||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&r("231",t,typeof n),n)}function v(e,t){null!==e&&(Pn=d(Pn,e)),e=Pn,Pn=null,e&&(t?h(e,p):h(e,m),Pn&&r("95"),yn.rethrowCaughtError())}function y(e,t,n,r){for(var i=null,o=0;o<wn.length;o++){var a=wn[o];a&&(a=a.extractEvents(e,t,n,r))&&(i=d(i,a))}v(i,!1)}function b(e){if(e[In])return e[In];for(;!e[In];){if(!e.parentNode)return null;e=e.parentNode}return e=e[In],5===e.tag||6===e.tag?e:null}function _(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function w(e){return e[kn]||null}function x(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function E(e,t,n){for(var r=[];e;)r.push(e),e=x(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function S(e,t,n){(t=g(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=d(n._dispatchListeners,t),n._dispatchInstances=d(n._dispatchInstances,e))}function M(e){e&&e.dispatchConfig.phasedRegistrationNames&&E(e._targetInst,S,e)}function T(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?x(t):null,E(t,S,e)}}function C(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=g(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=d(n._dispatchListeners,t),n._dispatchInstances=d(n._dispatchInstances,e))}function O(e){e&&e.dispatchConfig.registrationName&&C(e._targetInst,null,e)}function P(e){h(e,M)}function A(e,t,n,r){if(n&&r)e:{for(var i=n,o=r,a=0,s=i;s;s=x(s))a++;s=0;for(var l=o;l;l=x(l))s++;for(;0<a-s;)i=x(i),a--;for(;0<s-a;)o=x(o),s--;for(;a--;){if(i===o||i===o.alternate)break e;i=x(i),o=x(o)}i=null}else i=null;for(o=i,i=[];n&&n!==o&&(null===(a=n.alternate)||a!==o);)i.push(n),n=x(n);for(n=[];r&&r!==o&&(null===(a=r.alternate)||a!==o);)n.push(r),r=x(r);for(r=0;r<i.length;r++)C(i[r],"bubbled",e);for(e=n.length;0<e--;)C(n[e],"captured",t)}function R(){return!jn&&dn.canUseDOM&&(jn="textContent"in document.documentElement?"textContent":"innerText"),jn}function L(){if(Un._fallbackText)return Un._fallbackText;var e,t,n=Un._startText,r=n.length,i=I(),o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Un._fallbackText=i.slice(e,1<t?1-t:void 0),Un._fallbackText}function I(){return"value"in Un._root?Un._root.value:Un._root[R()]}function k(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var i in e)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?fn.thatReturnsTrue:fn.thatReturnsFalse,this.isPropagationStopped=fn.thatReturnsFalse,this}function N(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function D(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function j(e){e.eventPool=[],e.getPooled=N,e.release=D}function U(e,t){switch(e){case"topKeyUp":return-1!==Vn.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function F(e){return e=e.detail,"object"==typeof e&&"data"in e?e.data:null}function B(e,t){switch(e){case"topCompositionEnd":return F(t);case"topKeyPress":return 32!==t.which?null:(Kn=!0,Yn);case"topTextInput":return e=t.data,e===Yn&&Kn?null:e;default:return null}}function z(e,t){if(Jn)return"topCompositionEnd"===e||!Gn&&U(e,t)?(e=L(),Un._root=null,Un._startText=null,Un._fallbackText=null,Jn=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"topCompositionEnd":return Xn?null:t.data;default:return null}}function H(e){if(e=Cn(e)){$n&&"function"==typeof $n.restoreControlledState||r("194");var t=Tn(e.stateNode);$n.restoreControlledState(e.stateNode,e.type,t)}}function V(e){tr?nr?nr.push(e):nr=[e]:tr=e}function G(){return null!==tr||null!==nr}function W(){if(tr){var e=tr,t=nr;if(nr=tr=null,H(e),t)for(e=0;e<t.length;e++)H(t[e])}}function q(e,t){return e(t)}function X(e,t,n){return e(t,n)}function Y(){}function Z(e,t){if(ir)return e(t);ir=!0;try{return q(e,t)}finally{ir=!1,G()&&(Y(),W())}}function K(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!or[e.type]:"textarea"===t}function J(e){return e=e.target||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Q(e,t){return!(!dn.canUseDOM||t&&!("addEventListener"in document))&&(e="on"+e,t=e in document,t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t="function"==typeof t[e]),t)}function $(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ee(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"function"==typeof n.get&&"function"==typeof n.set)return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=""+e,n.set.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function te(e){e._valueTracker||(e._valueTracker=ee(e))}function ne(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function re(e){return null===e||void 0===e?null:(e=yr&&e[yr]||e["@@iterator"],"function"==typeof e?e:null)}function ie(e){if("function"==typeof(e=e.type))return e.displayName||e.name;if("string"==typeof e)return e;switch(e){case hr:return"ReactFragment";case dr:return"ReactPortal";case ur:return"ReactCall";case cr:return"ReactReturn"}if("object"==typeof e&&null!==e)switch(e.$$typeof){case vr:return e=e.render.displayName||e.render.name||"",""!==e?"ForwardRef("+e+")":"ForwardRef"}return null}function oe(e){var t="";do{e:switch(e.tag){case 0:case 1:case 2:case 5:var n=e._debugOwner,r=e._debugSource,i=ie(e),o=null;n&&(o=ie(n)),n=r,i="\n    in "+(i||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":o?" (created by "+o+")":"");break e;default:i=""}t+=i,e=e.return}while(e);return t}function ae(e){return!!wr.hasOwnProperty(e)||!_r.hasOwnProperty(e)&&(br.test(e)?wr[e]=!0:(_r[e]=!0,!1))}function se(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}function le(e,t,n,r){if(null===t||void 0===t||se(e,t,n,r))return!0;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ue(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}function ce(e){return e[1].toUpperCase()}function de(e,t,n,r){var i=xr.hasOwnProperty(t)?xr[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(le(t,n,i,r)&&(n=null),r||null===i?ae(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(i=i.type,n=3===i||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function he(e,t){var n=t.checked;return hn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function fe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function pe(e,t){null!=(t=t.checked)&&de(e,"checked",t,!1)}function me(e,t){pe(e,t);var n=ye(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?ve(e,t.type,n):t.hasOwnProperty("defaultValue")&&ve(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ge(e,t){(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue"))&&(""===e.value&&(e.value=""+e._wrapperState.initialValue),e.defaultValue=""+e._wrapperState.initialValue),t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function ve(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e,t,n){return e=k.getPooled(Sr.change,e,t,n),e.type="change",V(n),P(e),e}function _e(e){v(e,!1)}function we(e){if(ne(_(e)))return e}function xe(e,t){if("topChange"===e)return t}function Ee(){Mr&&(Mr.detachEvent("onpropertychange",Se),Tr=Mr=null)}function Se(e){"value"===e.propertyName&&we(Tr)&&(e=be(Tr,e,J(e)),Z(_e,e))}function Me(e,t,n){"topFocus"===e?(Ee(),Mr=t,Tr=n,Mr.attachEvent("onpropertychange",Se)):"topBlur"===e&&Ee()}function Te(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return we(Tr)}function Ce(e,t){if("topClick"===e)return we(t)}function Oe(e,t){if("topInput"===e||"topChange"===e)return we(t)}function Pe(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ar[e])&&!!t[e]}function Ae(){return Pe}function Re(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(t=t.return,0!=(2&t.effectTag))return 1}return 3===t.tag?2:3}function Le(e){return!!(e=e._reactInternalFiber)&&2===Re(e)}function Ie(e){2!==Re(e)&&r("188")}function ke(e){var t=e.alternate;if(!t)return t=Re(e),3===t&&r("188"),1===t?null:e;for(var n=e,i=t;;){var o=n.return,a=o?o.alternate:null;if(!o||!a)break;if(o.child===a.child){for(var s=o.child;s;){if(s===n)return Ie(o),e;if(s===i)return Ie(o),t;s=s.sibling}r("188")}if(n.return!==i.return)n=o,i=a;else{s=!1;for(var l=o.child;l;){if(l===n){s=!0,n=o,i=a;break}if(l===i){s=!0,i=o,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,i=o;break}if(l===i){s=!0,i=a,n=o;break}l=l.sibling}s||r("189")}}n.alternate!==i&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?e:t}function Ne(e){if(!(e=ke(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function De(e){if(!(e=ke(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function je(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Ue(e,t){var n=e[0].toUpperCase()+e.slice(1),r="on"+n;n="top"+n,t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},Gr[e]=t,Wr[n]=t}function Fe(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=b(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],y(e.topLevelType,t,e.nativeEvent,J(e.nativeEvent))}function Be(e){Zr=!!e}function ze(e,t,n){if(!n)return null;e=(Xr(e)?Ve:Ge).bind(null,e),n.addEventListener(t,e,!1)}function He(e,t,n){if(!n)return null;e=(Xr(e)?Ve:Ge).bind(null,e),n.addEventListener(t,e,!0)}function Ve(e,t){X(Ge,e,t)}function Ge(e,t){if(Zr){var n=J(t);if(n=b(n),null!==n&&"number"==typeof n.tag&&2!==Re(n)&&(n=null),Yr.length){var r=Yr.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Z(Fe,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Yr.length&&Yr.push(e)}}}function We(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function qe(e){if(Qr[e])return Qr[e];if(!Jr[e])return e;var t,n=Jr[e];for(t in n)if(n.hasOwnProperty(t)&&t in $r)return Qr[e]=n[t];return e}function Xe(e){return Object.prototype.hasOwnProperty.call(e,ii)||(e[ii]=ri++,ni[e[ii]]={}),ni[e[ii]]}function Ye(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ze(e,t){var n=Ye(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ye(n)}}function Ke(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Je(e,t){if(ci||null==si||si!==pn())return null;var n=si;return"selectionStart"in n&&Ke(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,ui&&mn(ui,n)?null:(ui=n,e=k.getPooled(ai.select,li,e,t),e.type="select",e.target=si,P(e),e)}function Qe(e,t,n,r){this.tag=e,this.key=n,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function $e(e,t,n){var r=e.alternate;return null===r?(r=new Qe(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function et(e,t,n){var i=e.type,o=e.key;e=e.props;var a=void 0;if("function"==typeof i)a=i.prototype&&i.prototype.isReactComponent?2:0;else if("string"==typeof i)a=5;else switch(i){case hr:return tt(e.children,t,n,o);case gr:a=11,t|=3;break;case fr:a=11,t|=2;break;case ur:a=7;break;case cr:a=9;break;default:if("object"==typeof i&&null!==i)switch(i.$$typeof){case pr:a=13;break;case mr:a=12;break;case vr:a=14;break;default:if("number"==typeof i.tag)return t=i,t.pendingProps=e,t.expirationTime=n,t;r("130",null==i?i:typeof i,"")}else r("130",null==i?i:typeof i,"")}return t=new Qe(a,e,o,t),t.type=i,t.expirationTime=n,t}function tt(e,t,n,r){return e=new Qe(10,e,r,t),e.expirationTime=n,e}function nt(e,t,n){return e=new Qe(6,e,null,t),e.expirationTime=n,e}function rt(e,t,n){return t=new Qe(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function it(e){return function(t){try{return e(t)}catch(e){}}}function ot(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);hi=it(function(e){return t.onCommitFiberRoot(n,e)}),fi=it(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function at(e){"function"==typeof hi&&hi(e)}function st(e){"function"==typeof fi&&fi(e)}function lt(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1,capturedValues:null}}function ut(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function ct(e){pi=mi=null;var t=e.alternate,n=e.updateQueue;null===n&&(n=e.updateQueue=lt(null)),null!==t?null===(e=t.updateQueue)&&(e=t.updateQueue=lt(null)):e=null,pi=n,mi=e!==n?e:null}function dt(e,t){ct(e),e=pi;var n=mi;null===n?ut(e,t):null===e.last||null===n.last?(ut(e,t),ut(n,t)):(ut(e,t),n.last=t)}function ht(e,t,n,r){return e=e.partialState,"function"==typeof e?e.call(t,n,r):e}function ft(e,t,n,r,i,o){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,capturedValues:n.capturedValues,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var a=!0,s=n.first,l=!1;null!==s;){var u=s.expirationTime;if(u>o){var c=n.expirationTime;(0===c||c>u)&&(n.expirationTime=u),l||(l=!0,n.baseState=e)}else l||(n.first=s.next,null===n.first&&(n.last=null)),s.isReplace?(e=ht(s,r,e,i),a=!0):(u=ht(s,r,e,i))&&(e=a?hn({},e,u):hn(e,u),a=!1),s.isForced&&(n.hasForceUpdate=!0),null!==s.callback&&(u=n.callbackList,null===u&&(u=n.callbackList=[]),u.push(s)),null!==s.capturedValue&&(u=n.capturedValues,null===u?n.capturedValues=[s.capturedValue]:u.push(s.capturedValue));s=s.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||null!==n.capturedValues||(t.updateQueue=null),l||(n.baseState=e),e}function pt(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;e<n.length;e++){var i=n[e],o=i.callback;i.callback=null,"function"!=typeof o&&r("191",o),o.call(t)}}function mt(e,t,n,r,i){function o(e,t,n,r,i,o){if(null===t||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)return!0;var a=e.stateNode;return e=e.type,"function"==typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,i,o):!e.prototype||!e.prototype.isPureReactComponent||(!mn(t,n)||!mn(r,i))}function a(e,t){t.updater=p,e.stateNode=t,t._reactInternalFiber=e}function s(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&p.enqueueReplaceState(t,t.state,null)}function l(e,t,n,r){if(e=e.type,"function"==typeof e.getDerivedStateFromProps)return e.getDerivedStateFromProps.call(null,n,r)}var u=e.cacheContext,c=e.getMaskedContext,d=e.getUnmaskedContext,h=e.isContextConsumer,f=e.hasContextChanged,p={isMounted:Le,enqueueSetState:function(e,r,i){e=e._reactInternalFiber,i=void 0===i?null:i;var o=n(e);dt(e,{expirationTime:o,partialState:r,callback:i,isReplace:!1,isForced:!1,capturedValue:null,next:null}),t(e,o)},enqueueReplaceState:function(e,r,i){e=e._reactInternalFiber,i=void 0===i?null:i;var o=n(e);dt(e,{expirationTime:o,partialState:r,callback:i,isReplace:!0,isForced:!1,capturedValue:null,next:null}),t(e,o)},enqueueForceUpdate:function(e,r){e=e._reactInternalFiber,r=void 0===r?null:r;var i=n(e);dt(e,{expirationTime:i,partialState:null,callback:r,isReplace:!1,isForced:!0,capturedValue:null,next:null}),t(e,i)}};return{adoptClassInstance:a,callGetDerivedStateFromProps:l,constructClassInstance:function(e,t){var n=e.type,r=d(e),i=h(e),o=i?c(e,r):vn;n=new n(t,o);var s=null!==n.state&&void 0!==n.state?n.state:null;return a(e,n),e.memoizedState=s,t=l(e,n,t,s),null!==t&&void 0!==t&&(e.memoizedState=hn({},e.memoizedState,t)),i&&u(e,r,o),n},mountClassInstance:function(e,t){var n=e.type,r=e.alternate,i=e.stateNode,o=e.pendingProps,a=d(e);i.props=o,i.state=e.memoizedState,i.refs=vn,i.context=c(e,a),"function"==typeof n.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(n=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),n!==i.state&&p.enqueueReplaceState(i,i.state,null),null!==(n=e.updateQueue)&&(i.state=ft(r,e,n,i,o,t))),"function"==typeof i.componentDidMount&&(e.effectTag|=4)},resumeMountClassInstance:function(e,t){var n=e.type,a=e.stateNode;a.props=e.memoizedProps,a.state=e.memoizedState;var u=e.memoizedProps,h=e.pendingProps,p=a.context,m=d(e);m=c(e,m),(n="function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==h||p!==m)&&s(e,a,h,m),p=e.memoizedState,t=null!==e.updateQueue?ft(null,e,e.updateQueue,a,h,t):p;var g=void 0;if(u!==h&&(g=l(e,a,h,t)),null!==g&&void 0!==g){t=null===t||void 0===t?g:hn({},t,g);var v=e.updateQueue;null!==v&&(v.baseState=hn({},v.baseState,g))}return u!==h||p!==t||f()||null!==e.updateQueue&&e.updateQueue.hasForceUpdate?((u=o(e,u,h,p,t,m))?(n||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(e.effectTag|=4)):("function"==typeof a.componentDidMount&&(e.effectTag|=4),r(e,h),i(e,t)),a.props=h,a.state=t,a.context=m,u):("function"==typeof a.componentDidMount&&(e.effectTag|=4),!1)},updateClassInstance:function(e,t,n){var a=t.type,u=t.stateNode;u.props=t.memoizedProps,u.state=t.memoizedState;var h=t.memoizedProps,p=t.pendingProps,m=u.context,g=d(t);g=c(t,g),(a="function"==typeof a.getDerivedStateFromProps||"function"==typeof u.getSnapshotBeforeUpdate)||"function"!=typeof u.UNSAFE_componentWillReceiveProps&&"function"!=typeof u.componentWillReceiveProps||(h!==p||m!==g)&&s(t,u,p,g),m=t.memoizedState,n=null!==t.updateQueue?ft(e,t,t.updateQueue,u,p,n):m;var v=void 0;if(h!==p&&(v=l(t,u,p,n)),null!==v&&void 0!==v){n=null===n||void 0===n?v:hn({},n,v);var y=t.updateQueue;null!==y&&(y.baseState=hn({},y.baseState,v))}return h!==p||m!==n||f()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate?((v=o(t,h,p,m,n,g))?(a||"function"!=typeof u.UNSAFE_componentWillUpdate&&"function"!=typeof u.componentWillUpdate||("function"==typeof u.componentWillUpdate&&u.componentWillUpdate(p,n,g),"function"==typeof u.UNSAFE_componentWillUpdate&&u.UNSAFE_componentWillUpdate(p,n,g)),"function"==typeof u.componentDidUpdate&&(t.effectTag|=4),"function"==typeof u.getSnapshotBeforeUpdate&&(t.effectTag|=2048)):("function"!=typeof u.componentDidUpdate||h===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof u.getSnapshotBeforeUpdate||h===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),r(t,p),i(t,n)),u.props=p,u.state=n,u.context=g,v):("function"!=typeof u.componentDidUpdate||h===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=4),"function"!=typeof u.getSnapshotBeforeUpdate||h===e.memoizedProps&&m===e.memoizedState||(t.effectTag|=2048),!1)}}}function gt(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){n=n._owner;var i=void 0;n&&(2!==n.tag&&r("110"),i=n.stateNode),i||r("147",e);var o=""+e;return null!==t&&null!==t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs===vn?i.refs={}:i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}"string"!=typeof e&&r("148"),n._owner||r("254",e)}return e}function vt(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function yt(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return e=$e(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,r<n?(t.effectTag=2,n):r):(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,r){return null===t||6!==t.tag?(t=nt(n,e.mode,r),t.return=e,t):(t=o(t,n,r),t.return=e,t)}function u(e,t,n,r){return null!==t&&t.type===n.type?(r=o(t,n.props,r),r.ref=gt(e,t,n),r.return=e,r):(r=et(n,e.mode,r),r.ref=gt(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=rt(n,e.mode,r),t.return=e,t):(t=o(t,n.children||[],r),t.return=e,t)}function d(e,t,n,r,i){return null===t||10!==t.tag?(t=tt(n,e.mode,r,i),t.return=e,t):(t=o(t,n,r),t.return=e,t)}function h(e,t,n){if("string"==typeof t||"number"==typeof t)return t=nt(""+t,e.mode,n),t.return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case lr:return n=et(t,e.mode,n),n.ref=gt(e,null,t),n.return=e,n;case dr:return t=rt(t,e.mode,n),t.return=e,t}if(gi(t)||re(t))return t=tt(t,e.mode,n,null),t.return=e,t;vt(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case lr:return n.key===i?n.type===hr?d(e,t,n.props.children,r,i):u(e,t,n,r):null;case dr:return n.key===i?c(e,t,n,r):null}if(gi(n)||re(n))return null!==i?null:d(e,t,n,r,null);vt(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return e=e.get(n)||null,l(t,e,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case lr:return e=e.get(null===r.key?n:r.key)||null,r.type===hr?d(t,e,r.props.children,i,r.key):u(t,e,r,i);case dr:return e=e.get(null===r.key?n:r.key)||null,c(t,e,r,i)}if(gi(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);vt(t,r)}return null}function m(r,o,s,l){for(var u=null,c=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(r,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(r,d),o=a(v,o,m),null===c?u=v:c.sibling=v,c=v,d=g}if(m===s.length)return n(r,d),u;if(null===d){for(;m<s.length;m++)(d=h(r,s[m],l))&&(o=a(d,o,m),null===c?u=d:c.sibling=d,c=d);return u}for(d=i(r,d);m<s.length;m++)(g=p(d,r,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach(function(e){return t(r,e)}),u}function g(o,s,l,u){var c=re(l);"function"!=typeof c&&r("150"),null==(l=c.call(l))&&r("151");for(var d=c=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(o,m,y.value,u);if(null===b){m||(m=v);break}e&&m&&null===b.alternate&&t(o,m),s=a(b,s,g),null===d?c=b:d.sibling=b,d=b,m=v}if(y.done)return n(o,m),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(o,y.value,u))&&(s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return c}for(m=i(o,m);!y.done;g++,y=l.next())null!==(y=p(m,o,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=a(y,s,g),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(o,e)}),c}return function(e,i,a,l){"object"==typeof a&&null!==a&&a.type===hr&&null===a.key&&(a=a.props.children);var u="object"==typeof a&&null!==a;if(u)switch(a.$$typeof){case lr:e:{var c=a.key;for(u=i;null!==u;){if(u.key===c){if(10===u.tag?a.type===hr:u.type===a.type){n(e,u.sibling),i=o(u,a.type===hr?a.props.children:a.props,l),i.ref=gt(e,u,a),i.return=e,e=i;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===hr?(i=tt(a.props.children,e.mode,l,a.key),i.return=e,e=i):(l=et(a,e.mode,l),l.ref=gt(e,i,a),l.return=e,e=l)}return s(e);case dr:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(e,i.sibling),i=o(i,a.children||[],l),i.return=e,e=i;break e}n(e,i);break}t(e,i),i=i.sibling}i=rt(a,e.mode,l),i.return=e,e=i}return s(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==i&&6===i.tag?(n(e,i.sibling),i=o(i,a,l),i.return=e,e=i):(n(e,i),i=nt(a,e.mode,l),i.return=e,e=i),s(e);if(gi(a))return m(e,i,a,l);if(re(a))return g(e,i,a,l);if(u&&vt(e,a),void 0===a)switch(e.tag){case 2:case 1:l=e.type,r("152",l.displayName||l.name||"Component")}return n(e,i)}}function bt(e,t,n,i,o,a,s){function l(e,t,n){u(e,t,n,t.expirationTime)}function u(e,t,n,r){t.child=null===e?yi(t,null,n,r):vi(t,e.child,n,r)}function c(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function d(e,t,n,r,i,o){if(c(e,t),!n&&!i)return r&&T(t,!1),m(e,t);n=t.stateNode,ar.current=t;var a=i?null:n.render();return t.effectTag|=1,i&&(u(e,t,null,o),t.child=null),u(e,t,a,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&T(t,!0),t.child}function h(e){var t=e.stateNode;t.pendingContext?M(e,t.pendingContext,t.pendingContext!==t.context):t.context&&M(e,t.context,!1),b(e,t.containerInfo)}function f(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){switch(i.tag){case 12:var o=0|i.stateNode;if(i.type===t&&0!=(o&n)){for(o=i;null!==o;){var a=o.alternate;if(0===o.expirationTime||o.expirationTime>r)o.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}o=o.return}o=null}else o=i.child;break;case 13:o=i.type===e.type?null:i.child;break;default:o=i.child}if(null!==o)o.return=i;else for(o=i;null!==o;){if(o===e){o=null;break}if(null!==(i=o.sibling)){o=i;break}o=o.return}i=o}}function p(e,t,n){var r=t.type._context,i=t.pendingProps,o=t.memoizedProps;if(!E()&&o===i)return t.stateNode=0,_(t),m(e,t);var a=i.value;if(t.memoizedProps=i,null===o)a=1073741823;else if(o.value===i.value){if(o.children===i.children)return t.stateNode=0,_(t),m(e,t);a=0}else{var s=o.value;if(s===a&&(0!==s||1/s==1/a)||s!==s&&a!==a){if(o.children===i.children)return t.stateNode=0,_(t),m(e,t);a=0}else if(a="function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,a):1073741823,0===(a|=0)){if(o.children===i.children)return t.stateNode=0,_(t),m(e,t)}else f(t,r,a,n)}return t.stateNode=a,_(t),l(e,t,i.children),t.child}function m(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=$e(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=$e(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}var g=e.shouldSetTextContent,v=e.shouldDeprioritizeSubtree,y=t.pushHostContext,b=t.pushHostContainer,_=i.pushProvider,w=n.getMaskedContext,x=n.getUnmaskedContext,E=n.hasContextChanged,S=n.pushContextProvider,M=n.pushTopLevelContextObject,T=n.invalidateContextProvider,C=o.enterHydrationState,O=o.resetHydrationState,P=o.tryToClaimNextHydratableInstance;e=mt(n,a,s,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var A=e.adoptClassInstance,R=e.callGetDerivedStateFromProps,L=e.constructClassInstance,I=e.mountClassInstance,k=e.resumeMountClassInstance,N=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:h(t);break;case 2:S(t);break;case 4:b(t,t.stateNode.containerInfo);break;case 13:_(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var i=t.type,o=t.pendingProps,a=x(t);return a=w(t,a),i=i(o,a),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,"function"==typeof a.getDerivedStateFromProps&&null!==(o=R(t,i,o,t.memoizedState))&&void 0!==o&&(t.memoizedState=hn({},t.memoizedState,o)),o=S(t),A(t,i),I(t,n),e=d(e,t,!0,o,!1,n)):(t.tag=1,l(e,t,i),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,E()||t.memoizedProps!==n?(i=x(t),i=w(t,i),o=o(n,i),t.effectTag|=1,l(e,t,o),t.memoizedProps=n,e=t.child):e=m(e,t),e;case 2:o=S(t),null===e?null===t.stateNode?(L(t,t.pendingProps),I(t,n),i=!0):i=k(t,n):i=N(e,t,n),a=!1;var s=t.updateQueue;return null!==s&&null!==s.capturedValues&&(a=i=!0),d(e,t,i,o,a,n);case 3:e:if(h(t),null!==(i=t.updateQueue)){if(a=t.memoizedState,o=ft(e,t,i,null,null,n),t.memoizedState=o,null!==(i=t.updateQueue)&&null!==i.capturedValues)i=null;else{if(a===o){O(),e=m(e,t);break e}i=o.element}a=t.stateNode,(null===e||null===e.child)&&a.hydrate&&C(t)?(t.effectTag|=2,t.child=yi(t,null,i,n)):(O(),l(e,t,i)),t.memoizedState=o,e=t.child}else O(),e=m(e,t);return e;case 5:return y(t),null===e&&P(t),o=t.type,s=t.memoizedProps,i=t.pendingProps,a=null!==e?e.memoizedProps:null,E()||s!==i||((s=1&t.mode&&v(o,i))&&(t.expirationTime=1073741823),s&&1073741823===n)?(s=i.children,g(o,i)?s=null:a&&g(o,a)&&(t.effectTag|=16),c(e,t),1073741823!==n&&1&t.mode&&v(o,i)?(t.expirationTime=1073741823,t.memoizedProps=i,e=null):(l(e,t,s),t.memoizedProps=i,e=t.child)):e=m(e,t),e;case 6:return null===e&&P(t),t.memoizedProps=t.pendingProps,null;case 8:t.tag=7;case 7:return o=t.pendingProps,E()||t.memoizedProps!==o||(o=t.memoizedProps),i=o.children,t.stateNode=null===e?yi(t,t.stateNode,i,n):vi(t,e.stateNode,i,n),t.memoizedProps=o,t.stateNode;case 9:return null;case 4:return b(t,t.stateNode.containerInfo),o=t.pendingProps,E()||t.memoizedProps!==o?(null===e?t.child=vi(t,null,o,n):l(e,t,o),t.memoizedProps=o,e=t.child):e=m(e,t),e;case 14:return n=t.type.render,n=n(t.pendingProps,t.ref),l(e,t,n),t.memoizedProps=n,t.child;case 10:return n=t.pendingProps,E()||t.memoizedProps!==n?(l(e,t,n),t.memoizedProps=n,e=t.child):e=m(e,t),e;case 11:return n=t.pendingProps.children,E()||null!==n&&t.memoizedProps!==n?(l(e,t,n),t.memoizedProps=n,e=t.child):e=m(e,t),e;case 13:return p(e,t,n);case 12:e:{i=t.type,a=t.pendingProps,s=t.memoizedProps,o=i._currentValue;var u=i._changedBits;if(E()||0!==u||s!==a){t.memoizedProps=a;var M=a.unstable_observedBits;if(void 0!==M&&null!==M||(M=1073741823),t.stateNode=M,0!=(u&M))f(t,i,u,n);else if(s===a){e=m(e,t);break e}n=a.children,n=n(o),l(e,t,n),e=t.child}else e=m(e,t)}return e;default:r("156")}}}}function _t(e,t,n,i,o){function a(e){e.effectTag|=4}var s=e.createInstance,l=e.createTextInstance,u=e.appendInitialChild,c=e.finalizeInitialChildren,d=e.prepareUpdate,h=e.persistence,f=t.getRootHostContainer,p=t.popHostContext,m=t.getHostContext,g=t.popHostContainer,v=n.popContextProvider,y=n.popTopLevelContextObject,b=i.popProvider,_=o.prepareToHydrateHostInstance,w=o.prepareToHydrateHostTextInstance,x=o.popHydrationState,E=void 0,S=void 0,M=void 0;return e.mutation?(E=function(){},S=function(e,t,n){(t.updateQueue=n)&&a(t)},M=function(e,t,n,r){n!==r&&a(t)}):r(h?"235":"236"),{completeWork:function(e,t,n){var i=t.pendingProps;switch(t.tag){case 1:return null;case 2:return v(t),e=t.stateNode,i=t.updateQueue,null!==i&&null!==i.capturedValues&&(t.effectTag&=-65,"function"==typeof e.componentDidCatch?t.effectTag|=256:i.capturedValues=null),null;case 3:return g(t),y(t),i=t.stateNode,i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(x(t),t.effectTag&=-3),E(t),e=t.updateQueue,null!==e&&null!==e.capturedValues&&(t.effectTag|=256),null;case 5:p(t),n=f();var o=t.type;if(null!==e&&null!=t.stateNode){var h=e.memoizedProps,T=t.stateNode,C=m();T=d(T,o,h,i,n,C),S(e,t,T,o,h,i,n,C),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!i)return null===t.stateNode&&r("166"),null;if(e=m(),x(t))_(t,n,e)&&a(t);else{h=s(o,i,n,e,t);e:for(C=t.child;null!==C;){if(5===C.tag||6===C.tag)u(h,C.stateNode);else if(4!==C.tag&&null!==C.child){C.child.return=C,C=C.child;continue}if(C===t)break;for(;null===C.sibling;){if(null===C.return||C.return===t)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}c(h,o,i,n,e)&&a(t),t.stateNode=h}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)M(e,t,e.memoizedProps,i);else{if("string"!=typeof i)return null===t.stateNode&&r("166"),null;e=f(),n=m(),x(t)?w(t)&&a(t):t.stateNode=l(i,e,n,t)}return null;case 7:(i=t.memoizedProps)||r("165"),t.tag=8,o=[];e:for((h=t.stateNode)&&(h.return=t);null!==h;){if(5===h.tag||6===h.tag||4===h.tag)r("247");else if(9===h.tag)o.push(h.pendingProps.value);else if(null!==h.child){h.child.return=h,h=h.child;continue}for(;null===h.sibling;){if(null===h.return||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}return h=i.handler,i=h(i.props,o),t.child=vi(t,null!==e?e.child:null,i,n),t.child;case 8:return t.tag=7,null;case 9:case 14:case 10:case 11:return null;case 4:return g(t),E(t),null;case 13:return b(t),null;case 12:return null;case 0:r("167");default:r("156")}}}}function wt(e,t,n,r,i){var o=e.popHostContainer,a=e.popHostContext,s=t.popContextProvider,l=t.popTopLevelContextObject,u=n.popProvider;return{throwException:function(e,t,n){t.effectTag|=512,t.firstEffect=t.lastEffect=null,t={value:n,source:t,stack:oe(t)};do{switch(e.tag){case 3:return ct(e),e.updateQueue.capturedValues=[t],void(e.effectTag|=1024);case 2:if(n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&!i(n)){ct(e),n=e.updateQueue;var r=n.capturedValues;return null===r?n.capturedValues=[t]:r.push(t),void(e.effectTag|=1024)}}e=e.return}while(null!==e)},unwindWork:function(e){switch(e.tag){case 2:s(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return o(e),l(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return a(e),null;case 4:return o(e),null;case 13:return u(e),null;default:return null}},unwindInterruptedWork:function(e){switch(e.tag){case 2:s(e);break;case 3:o(e),l(e);break;case 5:a(e);break;case 4:o(e);break;case 13:u(e)}}}}function xt(e,t){var n=t.source;null===t.stack&&oe(n),null!==n&&ie(n),t=t.value,null!==e&&2===e.tag&&ie(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Et(e,t,n,i,o){function a(e){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){t(e,n)}else n.current=null}function s(e){switch("function"==typeof st&&st(e),e.tag){case 2:a(e);var n=e.stateNode;if("function"==typeof n.componentWillUnmount)try{n.props=e.memoizedProps,n.state=e.memoizedState,n.componentWillUnmount()}catch(n){t(e,n)}break;case 5:a(e);break;case 7:l(e.stateNode);break;case 4:h&&c(e)}}function l(e){for(var t=e;;)if(s(t),null===t.child||h&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function u(e){return 5===e.tag||3===e.tag||4===e.tag}function c(e){for(var t=e,n=!1,i=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,o=!1;break e;case 3:case 4:i=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)l(t),o?x(i,t.stateNode):w(i,t.stateNode);else if(4===t.tag?i=t.stateNode.containerInfo:s(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var d=e.getPublicInstance,h=e.mutation;e=e.persistence,h||r(e?"235":"236");var f=h.commitMount,p=h.commitUpdate,m=h.resetTextContent,g=h.commitTextUpdate,v=h.appendChild,y=h.appendChildToContainer,b=h.insertBefore,_=h.insertInContainerBefore,w=h.removeChild,x=h.removeChildFromContainer;return{commitBeforeMutationLifeCycles:function(e,t){switch(t.tag){case 2:if(2048&t.effectTag&&null!==e){var n=e.memoizedProps,i=e.memoizedState;e=t.stateNode,e.props=t.memoizedProps,e.state=t.memoizedState,t=e.getSnapshotBeforeUpdate(n,i),e.__reactInternalSnapshotBeforeUpdate=t}break;case 3:case 5:case 6:case 4:break;default:r("163")}},commitResetTextContent:function(e){m(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(u(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var i=t=void 0;switch(n.tag){case 5:t=n.stateNode,i=!1;break;case 3:case 4:t=n.stateNode.containerInfo,i=!0;break;default:r("161")}16&n.effectTag&&(m(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||u(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)n?i?_(t,o.stateNode,n):b(t,o.stateNode,n):i?y(t,o.stateNode):v(t,o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},commitDeletion:function(e){c(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var i=t.memoizedProps;e=null!==e?e.memoizedProps:i;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&p(n,a,o,e,i,t)}break;case 6:null===t.stateNode&&r("162"),n=t.memoizedProps,g(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(e,t,n){switch(n.tag){case 2:if(e=n.stateNode,4&n.effectTag)if(null===t)e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidMount();else{var i=t.memoizedProps;t=t.memoizedState,e.props=n.memoizedProps,e.state=n.memoizedState,e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}n=n.updateQueue,null!==n&&pt(n,e);break;case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=d(n.child.stateNode);break;case 2:e=n.child.stateNode}pt(t,e)}break;case 5:e=n.stateNode,null===t&&4&n.effectTag&&f(e,n.type,n.memoizedProps,n);break;case 6:case 4:break;default:r("163")}},commitErrorLogging:function(e,t){switch(e.tag){case 2:var n=e.type;t=e.stateNode;var i=e.updateQueue;(null===i||null===i.capturedValues)&&r("264");var a=i.capturedValues;for(i.capturedValues=null,"function"!=typeof n.getDerivedStateFromCatch&&o(t),t.props=e.memoizedProps,t.state=e.memoizedState,n=0;n<a.length;n++){i=a[n];var s=i.value,l=i.stack;xt(e,i),t.componentDidCatch(s,{componentStack:null!==l?l:""})}break;case 3:for(n=e.updateQueue,(null===n||null===n.capturedValues)&&r("264"),a=n.capturedValues,n.capturedValues=null,n=0;n<a.length;n++)i=a[n],xt(e,i),t(i.value);break;default:r("265")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:e=d(n);break;default:e=n}"function"==typeof t?t(e):t.current=e}},commitDetachRef:function(e){null!==(e=e.ref)&&("function"==typeof e?e(null):e.current=null)}}}function St(e,t){function n(e){return e===bi&&r("174"),e}var i=e.getChildHostContext,o=e.getRootHostContext;e=t.createCursor;var a=t.push,s=t.pop,l=e(bi),u=e(bi),c=e(bi);return{getHostContext:function(){return n(l.current)},getRootHostContainer:function(){return n(c.current)},popHostContainer:function(e){s(l,e),s(u,e),s(c,e)},popHostContext:function(e){u.current===e&&(s(l,e),s(u,e))},pushHostContainer:function(e,t){a(c,t,e),a(u,e,e),a(l,bi,e),t=o(t),s(l,e),a(l,t,e)},pushHostContext:function(e){var t=n(c.current),r=n(l.current);t=i(r,e.type,t),r!==t&&(a(u,e,e),a(l,t,e))}}}function Mt(e){function t(e,t){var n=new Qe(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=s(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function i(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;h=e}var o=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,s=e.canHydrateTextInstance,l=e.getNextHydratableSibling,u=e.getFirstHydratableChild,c=e.hydrateInstance,d=e.hydrateTextInstance,h=null,f=null,p=!1;return{enterHydrationState:function(e){return f=u(e.stateNode.containerInfo),h=e,p=!0},resetHydrationState:function(){f=h=null,p=!1},tryToClaimNextHydratableInstance:function(e){if(p){var r=f;if(r){if(!n(e,r)){if(!(r=l(r))||!n(e,r))return e.effectTag|=2,p=!1,void(h=e);t(h,f)}h=e,f=u(r)}else e.effectTag|=2,p=!1,h=e}},prepareToHydrateHostInstance:function(e,t,n){return t=c(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return d(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==h)return!1;if(!p)return i(e),p=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!o(n,e.memoizedProps))for(n=f;n;)t(e,n),n=l(n);return i(e),f=h?l(e.stateNode):null,!0}}}function Tt(e){function t(e,t,n){e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function n(e){return 2===e.tag&&null!=e.type.childContextTypes}function i(e,t){var n=e.stateNode,i=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;n=n.getChildContext();for(var o in n)o in i||r("108",ie(e)||"Unknown",o);return hn({},t,n)}var o=e.createCursor,a=e.push,s=e.pop,l=o(vn),u=o(!1),c=vn;return{getUnmaskedContext:function(e){return n(e)?c:l.current},cacheContext:t,getMaskedContext:function(e,n){var r=e.type.contextTypes;if(!r)return vn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===n)return i.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in r)a[o]=n[o];return i&&t(e,n,a),a},hasContextChanged:function(){return u.current},isContextConsumer:function(e){return 2===e.tag&&null!=e.type.contextTypes},isContextProvider:n,popContextProvider:function(e){n(e)&&(s(u,e),s(l,e))},popTopLevelContextObject:function(e){s(u,e),s(l,e)},pushTopLevelContextObject:function(e,t,n){null!=l.cursor&&r("168"),a(l,t,e),a(u,n,e)},processChildContext:i,pushContextProvider:function(e){if(!n(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||vn,c=l.current,a(l,t,e),a(u,u.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||r("169"),t){var o=i(e,c);n.__reactInternalMemoizedMergedChildContext=o,s(u,e),s(l,e),a(l,o,e)}else s(u,e);a(u,t,e)},findCurrentUnmaskedContext:function(e){for(2!==Re(e)||2!==e.tag?r("170"):void 0;3!==e.tag;){if(n(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||r("171")}return e.stateNode.context}}}function Ct(e){var t=e.createCursor,n=e.push,r=e.pop,i=t(null),o=t(null),a=t(0);return{pushProvider:function(e){var t=e.type._context;n(a,t._changedBits,e),n(o,t._currentValue,e),n(i,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode},popProvider:function(e){var t=a.current,n=o.current;r(i,e),r(o,e),r(a,e),e=e.type._context,e._currentValue=n,e._changedBits=t}}}function Ot(){var e=[],t=-1;return{createCursor:function(e){return{current:e}},isEmpty:function(){return-1===t},pop:function(n){0>t||(n.current=e[t],e[t]=null,t--)},push:function(n,r){t++,e[t]=n.current,n.current=r},checkThatStackIsEmpty:function(){},resetStackAfterFatalErrorInDev:function(){}}}function Pt(e){function t(){if(null!==$)for(var e=$.return;null!==e;)L(e),e=e.return;ee=null,te=0,$=null,ie=!1}function n(e){return null!==ae&&ae.has(e)}function i(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=P(t,e,te);var i=e;if(1073741823===te||1073741823!==i.expirationTime){e:switch(i.tag){case 3:case 2:var o=i.updateQueue;o=null===o?0:o.expirationTime;break e;default:o=0}for(var a=i.child;null!==a;)0!==a.expirationTime&&(0===o||o>a.expirationTime)&&(o=a.expirationTime),a=a.sibling;i.expirationTime=o}if(null!==t)return t;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){ie=!0;break}e=n}else{if(null!==(e=R(e)))return e.effectTag&=2559,e;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;e=n}}return null}function o(e){var t=O(e.alternate,e,te);return null===t&&(t=i(e)),ar.current=null,t}function a(e,n,a){Q&&r("243"),Q=!0,n===te&&e===ee&&null!==$||(t(),ee=e,te=n,$=$e(ee.current,null,te),e.pendingCommitExpirationTime=0);for(var s=!1;;){try{if(a)for(;null!==$&&!x();)$=o($);else for(;null!==$;)$=o($)}catch(e){if(null===$){s=!0,E(e);break}a=$;var l=a.return;if(null===l){s=!0,E(e);break}A(l,a,e),$=i(a)}break}return Q=!1,s||null!==$?null:ie?(e.pendingCommitExpirationTime=n,e.current.alternate):void r("262")}function s(e,t,n,r){e={value:n,source:e,stack:oe(e)},dt(t,{expirationTime:r,partialState:null,callback:null,isReplace:!1,isForced:!1,capturedValue:e,next:null}),c(t,r)}function l(e,t){e:{Q&&!re&&r("263");for(var i=e.return;null!==i;){switch(i.tag){case 2:var o=i.stateNode;if("function"==typeof i.type.getDerivedStateFromCatch||"function"==typeof o.componentDidCatch&&!n(o)){s(e,i,t,1),e=void 0;break e}break;case 3:s(e,i,t,1),e=void 0;break e}i=i.return}3===e.tag&&s(e,e,t,1),e=void 0}return e}function u(e){return e=0!==J?J:Q?re?1:te:1&e.mode?we?10*(1+((d()+15)/10|0)):25*(1+((d()+500)/25|0)):1,we&&(0===pe||e>pe)&&(pe=e),e}function c(e,n){e:{for(;null!==e;){if((0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>n)&&(e.alternate.expirationTime=n),null===e.return){if(3!==e.tag){n=void 0;break e}var i=e.stateNode;!Q&&0!==te&&n<te&&t(),Q&&!re&&ee===i||p(i,n),Se>Ee&&r("185")}e=e.return}n=void 0}return n}function d(){return Z=H()-X,Y=2+(Z/10|0)}function h(e,t,n,r,i){var o=J;J=1;try{return e(t,n,r,i)}finally{J=o}}function f(e){if(0!==ue){if(e>ue)return;G(ce)}var t=H()-X;ue=e,ce=V(g,{timeout:10*(e-2)-t})}function p(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===le?(se=le=e,e.nextScheduledRoot=e):(le=le.nextScheduledRoot=e,le.nextScheduledRoot=se);else{var n=e.remainingExpirationTime;(0===n||t<n)&&(e.remainingExpirationTime=t)}de||(be?_e&&(he=e,fe=1,_(e,1,!1)):1===t?v():f(t))}function m(){var e=0,t=null;if(null!==le)for(var n=le,i=se;null!==i;){var o=i.remainingExpirationTime;if(0===o){if((null===n||null===le)&&r("244"),i===i.nextScheduledRoot){se=le=i.nextScheduledRoot=null;break}if(i===se)se=o=i.nextScheduledRoot,le.nextScheduledRoot=o,i.nextScheduledRoot=null;else{if(i===le){le=n,le.nextScheduledRoot=se,i.nextScheduledRoot=null;break}n.nextScheduledRoot=i.nextScheduledRoot,i.nextScheduledRoot=null}i=n.nextScheduledRoot}else{if((0===e||o<e)&&(e=o,t=i),i===le)break;n=i,i=i.nextScheduledRoot}}n=he,null!==n&&n===t&&1===e?Se++:Se=0,he=t,fe=e}function g(e){y(0,!0,e)}function v(){y(1,!1,null)}function y(e,t,n){if(ye=n,m(),t)for(;null!==he&&0!==fe&&(0===e||e>=fe)&&(!me||d()>=fe);)_(he,fe,!me),m();else for(;null!==he&&0!==fe&&(0===e||e>=fe);)_(he,fe,!1),m();null!==ye&&(ue=0,ce=-1),0!==fe&&f(fe),ye=null,me=!1,b()}function b(){if(Se=0,null!==xe){var e=xe;xe=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){ge||(ge=!0,ve=e)}}}if(ge)throw e=ve,ve=null,ge=!1,e}function _(e,t,n){de&&r("245"),de=!0,n?(n=e.finishedWork,null!==n?w(e,n,t):(e.finishedWork=null,null!==(n=a(e,t,!0))&&(x()?e.finishedWork=n:w(e,n,t)))):(n=e.finishedWork,null!==n?w(e,n,t):(e.finishedWork=null,null!==(n=a(e,t,!1))&&w(e,n,t))),de=!1}function w(e,t,n){var i=e.firstBatch;if(null!==i&&i._expirationTime<=n&&(null===xe?xe=[i]:xe.push(i),i._defer))return e.finishedWork=t,void(e.remainingExpirationTime=0);e.finishedWork=null,re=Q=!0,n=t.stateNode,n.current===t&&r("177"),i=n.pendingCommitExpirationTime,0===i&&r("261"),n.pendingCommitExpirationTime=0;var o=d();if(ar.current=null,1<t.effectTag)if(null!==t.lastEffect){t.lastEffect.nextEffect=t;var a=t.firstEffect}else a=t;else a=t.firstEffect;for(W(n.containerInfo),ne=a;null!==ne;){var s=!1,u=void 0;try{for(;null!==ne;)2048&ne.effectTag&&I(ne.alternate,ne),ne=ne.nextEffect}catch(e){s=!0,u=e}s&&(null===ne&&r("178"),l(ne,u),null!==ne&&(ne=ne.nextEffect))}for(ne=a;null!==ne;){s=!1,u=void 0;try{for(;null!==ne;){var c=ne.effectTag;if(16&c&&k(ne),128&c){var h=ne.alternate;null!==h&&z(h)}switch(14&c){case 2:N(ne),ne.effectTag&=-3;break;case 6:N(ne),ne.effectTag&=-3,j(ne.alternate,ne);break;case 4:j(ne.alternate,ne);break;case 8:D(ne)}ne=ne.nextEffect}}catch(e){s=!0,u=e}s&&(null===ne&&r("178"),l(ne,u),null!==ne&&(ne=ne.nextEffect))}for(q(n.containerInfo),n.current=t,ne=a;null!==ne;){c=!1,h=void 0;try{for(a=n,s=o,u=i;null!==ne;){var f=ne.effectTag;36&f&&U(a,ne.alternate,ne,s,u),256&f&&F(ne,E),128&f&&B(ne);var p=ne.nextEffect;ne.nextEffect=null,ne=p}}catch(e){c=!0,h=e}c&&(null===ne&&r("178"),l(ne,h),null!==ne&&(ne=ne.nextEffect))}Q=re=!1,"function"==typeof at&&at(t.stateNode),t=n.current.expirationTime,0===t&&(ae=null),e.remainingExpirationTime=t}function x(){return!(null===ye||ye.timeRemaining()>Me)&&(me=!0)}function E(e){null===he&&r("246"),he.remainingExpirationTime=0,ge||(ge=!0,ve=e)}var S=Ot(),M=St(e,S),T=Tt(S);S=Ct(S);var C=Mt(e),O=bt(e,M,T,S,C,c,u).beginWork,P=_t(e,M,T,S,C).completeWork;M=wt(M,T,S,c,n);var A=M.throwException,R=M.unwindWork,L=M.unwindInterruptedWork;M=Et(e,l,c,u,function(e){null===ae?ae=new Set([e]):ae.add(e)},d);var I=M.commitBeforeMutationLifeCycles,k=M.commitResetTextContent,N=M.commitPlacement,D=M.commitDeletion,j=M.commitWork,U=M.commitLifeCycles,F=M.commitErrorLogging,B=M.commitAttachRef,z=M.commitDetachRef,H=e.now,V=e.scheduleDeferredCallback,G=e.cancelDeferredCallback,W=e.prepareForCommit,q=e.resetAfterCommit,X=H(),Y=2,Z=X,K=0,J=0,Q=!1,$=null,ee=null,te=0,ne=null,re=!1,ie=!1,ae=null,se=null,le=null,ue=0,ce=-1,de=!1,he=null,fe=0,pe=0,me=!1,ge=!1,ve=null,ye=null,be=!1,_e=!1,we=!1,xe=null,Ee=1e3,Se=0,Me=1;return{recalculateCurrentTime:d,computeExpirationForFiber:u,scheduleWork:c,requestWork:p,flushRoot:function(e,t){de&&r("253"),he=e,fe=t,_(e,t,!1),v(),b()},batchedUpdates:function(e,t){var n=be;be=!0;try{return e(t)}finally{(be=n)||de||v()}},unbatchedUpdates:function(e,t){if(be&&!_e){_e=!0;try{return e(t)}finally{_e=!1}}return e(t)},flushSync:function(e,t){de&&r("187");var n=be;be=!0;try{return h(e,t)}finally{be=n,v()}},flushControlled:function(e){var t=be;be=!0;try{h(e)}finally{(be=t)||de||y(1,!1,null)}},deferredUpdates:function(e){var t=J;J=25*(1+((d()+500)/25|0));try{return e()}finally{J=t}},syncUpdates:h,interactiveUpdates:function(e,t,n){if(we)return e(t,n);be||de||0===pe||(y(pe,!1,null),pe=0);var r=we,i=be;be=we=!0;try{return e(t,n)}finally{we=r,(be=i)||de||v()}},flushInteractiveUpdates:function(){de||0===pe||(y(pe,!1,null),pe=0)},computeUniqueAsyncExpiration:function(){var e=25*(1+((d()+500)/25|0));return e<=K&&(e=K+1),K=e},legacyContext:T}}function At(e){function t(e,t,n,r,i,o){if(r=t.current,n){n=n._reactInternalFiber;var s=l(n);n=u(n)?c(n,s):s}else n=vn;return null===t.context?t.context=n:t.pendingContext=n,t=o,dt(r,{expirationTime:i,partialState:{element:e},callback:void 0===t?null:t,isReplace:!1,isForced:!1,capturedValue:null,next:null}),a(r,i),i}var n=e.getPublicInstance;e=Pt(e);var i=e.recalculateCurrentTime,o=e.computeExpirationForFiber,a=e.scheduleWork,s=e.legacyContext,l=s.findCurrentUnmaskedContext,u=s.isContextProvider,c=s.processChildContext;return{createContainer:function(e,t,n){return t=new Qe(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e},updateContainer:function(e,n,r,a){var s=n.current,l=i();return s=o(s),t(e,n,r,l,s,a)},updateContainerAtExpirationTime:function(e,n,r,o,a){return t(e,n,r,i(),o,a)},flushRoot:e.flushRoot,requestWork:e.requestWork,computeUniqueAsyncExpiration:e.computeUniqueAsyncExpiration,batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,syncUpdates:e.syncUpdates,interactiveUpdates:e.interactiveUpdates,flushInteractiveUpdates:e.flushInteractiveUpdates,flushControlled:e.flushControlled,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return n(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:function(e){var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?r("188"):r("268",Object.keys(e))),e=Ne(t),null===e?null:e.stateNode},findHostInstanceWithNoPortals:function(e){return e=De(e),null===e?null:e.stateNode},injectIntoDevTools:function(e){var t=e.findFiberByHostInstance;return ot(hn({},e,{findHostInstanceByFiber:function(e){return e=Ne(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}}}function Rt(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:dr,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Lt(e){var t="";return cn.Children.forEach(e,function(e){null==e||"string"!=typeof e&&"number"!=typeof e||(t+=e)}),t}function It(e,t){return e=hn({children:void 0},t),(t=Lt(t.children))&&(e.children=t),e}function kt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+n,t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Nt(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Dt(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),hn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function jt(e,t){var n=t.value;null==n&&(n=t.defaultValue,t=t.children,null!=t&&(null!=n&&r("92"),Array.isArray(t)&&(1>=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Ut(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Ft(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function Bt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zt(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Bt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Vt(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=n,o=t[n];i=null==o||"boolean"==typeof o||""===o?"":r||"number"!=typeof o||0===o||Bi.hasOwnProperty(i)&&Bi[i]?(""+o).trim():o+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}function Gt(e,t,n){t&&(Hi[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!=typeof t.style&&r("62",n()))}function Wt(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function qt(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Xe(e);t=Sn[t];for(var r=0;r<t.length;r++){var i=t[r];n.hasOwnProperty(i)&&n[i]||("topScroll"===i?He("topScroll","scroll",e):"topFocus"===i||"topBlur"===i?(He("topFocus","focus",e),He("topBlur","blur",e),n.topBlur=!0,n.topFocus=!0):"topCancel"===i?(Q("cancel",!0)&&He("topCancel","cancel",e),n.topCancel=!0):"topClose"===i?(Q("close",!0)&&He("topClose","close",e),n.topClose=!0):ei.hasOwnProperty(i)&&ze(i,ei[i],e),n[i]=!0)}}function Xt(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===ji.html&&(r=Bt(e)),r===ji.html?"script"===e?(e=n.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function Yt(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function Zt(e,t,n,r){var i=Wt(t,n);switch(t){case"iframe":case"object":ze("topLoad","load",e);var o=n;break;case"video":case"audio":for(o in ti)ti.hasOwnProperty(o)&&ze(o,ti[o],e);o=n;break;case"source":ze("topError","error",e),o=n;break;case"img":case"image":case"link":ze("topError","error",e),ze("topLoad","load",e),o=n;break;case"form":ze("topReset","reset",e),ze("topSubmit","submit",e),o=n;break;case"details":ze("topToggle","toggle",e),o=n;break;case"input":fe(e,n),o=he(e,n),ze("topInvalid","invalid",e),qt(r,"onChange");break;case"option":o=It(e,n);break;case"select":Nt(e,n),o=hn({},n,{value:void 0}),ze("topInvalid","invalid",e),qt(r,"onChange");break;case"textarea":jt(e,n),o=Dt(e,n),ze("topInvalid","invalid",e),qt(r,"onChange");break;default:o=n}Gt(t,o,Vi);var a,s=o;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?Vt(e,l,Vi):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&Fi(e,l):"children"===a?"string"==typeof l?("textarea"!==t||""!==l)&&Ht(e,l):"number"==typeof l&&Ht(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(En.hasOwnProperty(a)?null!=l&&qt(r,a):null!=l&&de(e,a,l,i))}switch(t){case"input":te(e),ge(e,n);break;case"textarea":te(e),Ft(e,n);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,t=n.value,null!=t?kt(e,!!n.multiple,t,!1):null!=n.defaultValue&&kt(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=fn)}}function Kt(e,t,n,r,i){var o=null;switch(t){case"input":n=he(e,n),r=he(e,r),o=[];break;case"option":n=It(e,n),r=It(e,r),o=[];break;case"select":n=hn({},n,{value:void 0}),r=hn({},r,{value:void 0}),o=[];break;case"textarea":n=Dt(e,n),r=Dt(e,r),o=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=fn)}Gt(t,r,Vi),t=e=void 0;var a=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var s=n[e];for(t in s)s.hasOwnProperty(t)&&(a||(a={}),a[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(En.hasOwnProperty(e)?o||(o=[]):(o=o||[]).push(e,null));for(e in r){var l=r[e];if(s=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&l!==s&&(null!=l||null!=s))if("style"===e)if(s){for(t in s)!s.hasOwnProperty(t)||l&&l.hasOwnProperty(t)||(a||(a={}),a[t]="");for(t in l)l.hasOwnProperty(t)&&s[t]!==l[t]&&(a||(a={}),a[t]=l[t])}else a||(o||(o=[]),o.push(e,a)),a=l;else"dangerouslySetInnerHTML"===e?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(o=o||[]).push(e,""+l)):"children"===e?s===l||"string"!=typeof l&&"number"!=typeof l||(o=o||[]).push(e,""+l):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(En.hasOwnProperty(e)?(null!=l&&qt(i,e),o||s===l||(o=[])):(o=o||[]).push(e,l))}return a&&(o=o||[]).push("style",a),o}function Jt(e,t,n,r,i){"input"===n&&"radio"===i.type&&null!=i.name&&pe(e,i),Wt(n,r),r=Wt(n,i);for(var o=0;o<t.length;o+=2){var a=t[o],s=t[o+1];"style"===a?Vt(e,s,Vi):"dangerouslySetInnerHTML"===a?Fi(e,s):"children"===a?Ht(e,s):de(e,a,s,r)}switch(n){case"input":me(e,i);break;case"textarea":Ut(e,i);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!i.multiple,n=i.value,null!=n?kt(e,!!i.multiple,n,!1):t!==!!i.multiple&&(null!=i.defaultValue?kt(e,!!i.multiple,i.defaultValue,!0):kt(e,!!i.multiple,i.multiple?[]:"",!1))}}function Qt(e,t,n,r,i){switch(t){case"iframe":case"object":ze("topLoad","load",e);break;case"video":case"audio":for(var o in ti)ti.hasOwnProperty(o)&&ze(o,ti[o],e);break;case"source":ze("topError","error",e);break;case"img":case"image":case"link":ze("topError","error",e),ze("topLoad","load",e);break;case"form":ze("topReset","reset",e),ze("topSubmit","submit",e);break;case"details":ze("topToggle","toggle",e);break;case"input":fe(e,n),ze("topInvalid","invalid",e),qt(i,"onChange");break;case"select":Nt(e,n),ze("topInvalid","invalid",e),qt(i,"onChange");break;case"textarea":jt(e,n),ze("topInvalid","invalid",e),qt(i,"onChange")}Gt(t,n,Vi),r=null;for(var a in n)n.hasOwnProperty(a)&&(o=n[a],"children"===a?"string"==typeof o?e.textContent!==o&&(r=["children",o]):"number"==typeof o&&e.textContent!==""+o&&(r=["children",""+o]):En.hasOwnProperty(a)&&null!=o&&qt(i,a));switch(t){case"input":te(e),ge(e,n);break;case"textarea":te(e),Ft(e,n);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(e.onclick=fn)}return r}function $t(e,t){return e.nodeValue!==t}function en(e){this._expirationTime=Xi.computeUniqueAsyncExpiration(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function tn(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function nn(e,t,n){this._internalRoot=Xi.createContainer(e,t,n)}function rn(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function on(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function an(e,t){if(t||(t=e?9===e.nodeType?e.documentElement:e.firstChild:null,t=!(!t||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new nn(e,!1,t)}function sn(e,t,n,i,o){rn(n)||r("200");var a=n._reactRootContainer;if(a){if("function"==typeof o){var s=o;o=function(){var e=Xi.getPublicRootInstance(a._internalRoot);s.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)}else{if(a=n._reactRootContainer=an(n,i),"function"==typeof o){var l=o;o=function(){var e=Xi.getPublicRootInstance(a._internalRoot);l.call(e)}}Xi.unbatchedUpdates(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)})}return Xi.getPublicRootInstance(a._internalRoot)}function ln(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return rn(t)||r("200"),Rt(e,t,null,n)}/** @license React v16.3.2
 * react-dom.production.min.js
 *
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var un=n(107),cn=n(1),dn=n(423),hn=n(152),fn=n(108),pn=n(424),mn=n(425),gn=n(426),vn=n(153);cn||r("227");var yn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,a,s,l,u){i.apply(yn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,i,o,a,s,l){if(yn.invokeGuardedCallback.apply(this,arguments),yn.hasCaughtError()){var u=yn.clearCaughtError();yn._hasRethrowError||(yn._hasRethrowError=!0,yn._rethrowError=u)}},rethrowCaughtError:function(){return o.apply(yn,arguments)},hasCaughtError:function(){return yn._hasCaughtError},clearCaughtError:function(){if(yn._hasCaughtError){var e=yn._caughtError;return yn._caughtError=null,yn._hasCaughtError=!1,e}r("198")}},bn=null,_n={},wn=[],xn={},En={},Sn={},Mn=Object.freeze({plugins:wn,eventNameDispatchConfigs:xn,registrationNameModules:En,registrationNameDependencies:Sn,possibleRegistrationNames:null,injectEventPluginOrder:l,injectEventPluginsByName:u}),Tn=null,Cn=null,On=null,Pn=null,An={injectEventPluginOrder:l,injectEventPluginsByName:u},Rn=Object.freeze({injection:An,getListener:g,runEventsInBatch:v,runExtractedEventsInBatch:y}),Ln=Math.random().toString(36).slice(2),In="__reactInternalInstance$"+Ln,kn="__reactEventHandlers$"+Ln,Nn=Object.freeze({precacheFiberNode:function(e,t){t[In]=e},getClosestInstanceFromNode:b,getInstanceFromNode:function(e){return e=e[In],!e||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:_,getFiberCurrentPropsFromNode:w,updateFiberProps:function(e,t){e[kn]=t}}),Dn=Object.freeze({accumulateTwoPhaseDispatches:P,accumulateTwoPhaseDispatchesSkipTarget:function(e){h(e,T)},accumulateEnterLeaveDispatches:A,accumulateDirectDispatches:function(e){h(e,O)}}),jn=null,Un={_root:null,_startText:null,_fallbackText:null},Fn="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),Bn={type:null,target:null,currentTarget:fn.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};hn(k.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=fn.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=fn.thatReturnsTrue)},persist:function(){this.isPersistent=fn.thatReturnsTrue},isPersistent:fn.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<Fn.length;t++)this[Fn[t]]=null}}),k.Interface=Bn,k.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return hn(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=hn({},r.Interface,e),n.extend=r.extend,j(n),n},j(k);var zn=k.extend({data:null}),Hn=k.extend({data:null}),Vn=[9,13,27,32],Gn=dn.canUseDOM&&"CompositionEvent"in window,Wn=null;dn.canUseDOM&&"documentMode"in document&&(Wn=document.documentMode);var qn=dn.canUseDOM&&"TextEvent"in window&&!Wn,Xn=dn.canUseDOM&&(!Gn||Wn&&8<Wn&&11>=Wn),Yn=String.fromCharCode(32),Zn={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Kn=!1,Jn=!1,Qn={eventTypes:Zn,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(Gn)e:{switch(e){case"topCompositionStart":i=Zn.compositionStart;break e;case"topCompositionEnd":i=Zn.compositionEnd;break e;case"topCompositionUpdate":i=Zn.compositionUpdate;break e}i=void 0}else Jn?U(e,n)&&(i=Zn.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=Zn.compositionStart);return i?(Xn&&(Jn||i!==Zn.compositionStart?i===Zn.compositionEnd&&Jn&&(o=L()):(Un._root=r,Un._startText=I(),Jn=!0)),i=zn.getPooled(i,t,n,r),o?i.data=o:null!==(o=F(n))&&(i.data=o),P(i),o=i):o=null,(e=qn?B(e,n):z(e,n))?(t=Hn.getPooled(Zn.beforeInput,t,n,r),t.data=e,P(t)):t=null,null===o?t:null===t?o:[o,t]}},$n=null,er={injectFiberControlledHostComponent:function(e){$n=e}},tr=null,nr=null,rr=Object.freeze({injection:er,enqueueStateRestore:V,needsStateRestore:G,restoreStateIfNeeded:W}),ir=!1,or={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},ar=cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sr="function"==typeof Symbol&&Symbol.for,lr=sr?Symbol.for("react.element"):60103,ur=sr?Symbol.for("react.call"):60104,cr=sr?Symbol.for("react.return"):60105,dr=sr?Symbol.for("react.portal"):60106,hr=sr?Symbol.for("react.fragment"):60107,fr=sr?Symbol.for("react.strict_mode"):60108,pr=sr?Symbol.for("react.provider"):60109,mr=sr?Symbol.for("react.context"):60110,gr=sr?Symbol.for("react.async_mode"):60111,vr=sr?Symbol.for("react.forward_ref"):60112,yr="function"==typeof Symbol&&Symbol.iterator,br=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_r={},wr={},xr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xr[e]=new ue(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xr[t]=new ue(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){xr[e]=new ue(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){xr[e]=new ue(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xr[e]=new ue(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){xr[e]=new ue(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){xr[e]=new ue(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){xr[e]=new ue(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){xr[e]=new ue(e,5,!1,e.toLowerCase(),null)});var Er=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Er,ce);xr[t]=new ue(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Er,ce);xr[t]=new ue(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Er,ce);xr[t]=new ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),xr.tabIndex=new ue("tabIndex",1,!1,"tabindex",null);var Sr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Mr=null,Tr=null,Cr=!1;dn.canUseDOM&&(Cr=Q("input")&&(!document.documentMode||9<document.documentMode));var Or={eventTypes:Sr,_isInputEventSupported:Cr,extractEvents:function(e,t,n,r){var i=t?_(t):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=xe:K(i)?Cr?o=Oe:(o=Te,a=Me):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=Ce),o&&(o=o(e,t)))return be(o,n,r);a&&a(e,i,t),"topBlur"===e&&null!=t&&(e=t._wrapperState||i._wrapperState)&&e.controlled&&"number"===i.type&&ve(i,"number",i.value)}},Pr=k.extend({view:null,detail:null}),Ar={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Rr=Pr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Ae,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}}),Lr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},Ir={eventTypes:Lr,extractEvents:function(e,t,n,r){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement)||"topMouseOut"!==e&&"topMouseOver"!==e)return null;var i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window;if("topMouseOut"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?b(t):null):e=null,e===t)return null;var o=null==e?i:_(e);i=null==t?i:_(t);var a=Rr.getPooled(Lr.mouseLeave,e,n,r);return a.type="mouseleave",a.target=o,a.relatedTarget=i,n=Rr.getPooled(Lr.mouseEnter,t,n,r),n.type="mouseenter",n.target=i,n.relatedTarget=o,A(a,n,e,t),[a,n]}},kr=k.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Nr=k.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Dr=Pr.extend({relatedTarget:null}),jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ur={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fr=Pr.extend({key:function(e){if(e.key){var t=jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?(e=je(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?Ur[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Ae,charCode:function(e){return"keypress"===e.type?je(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?je(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Br=Rr.extend({dataTransfer:null}),zr=Pr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Ae}),Hr=k.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),Vr=Rr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),Gr={},Wr={};"blur cancel click close contextMenu copy cut doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange".split(" ").forEach(function(e){Ue(e,!0)}),"abort animationEnd animationIteration animationStart canPlay canPlayThrough drag dragEnter dragExit dragLeave dragOver durationChange emptied encrypted ended error load loadedData loadedMetadata loadStart mouseMove mouseOut mouseOver playing progress scroll seeking stalled suspend timeUpdate toggle touchMove transitionEnd waiting wheel".split(" ").forEach(function(e){Ue(e,!1)});var qr={eventTypes:Gr,isInteractiveTopLevelEventType:function(e){return void 0!==(e=Wr[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=Wr[e];if(!i)return null;switch(e){case"topKeyPress":if(0===je(n))return null;case"topKeyDown":case"topKeyUp":e=Fr;break;case"topBlur":case"topFocus":e=Dr;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":e=Rr;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":e=Br;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":e=zr;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":e=kr;break;case"topTransitionEnd":e=Hr;break;case"topScroll":e=Pr;break;case"topWheel":e=Vr;break;case"topCopy":case"topCut":case"topPaste":e=Nr;break;default:e=k}return t=e.getPooled(i,t,n,r),P(t),t}},Xr=qr.isInteractiveTopLevelEventType,Yr=[],Zr=!0,Kr=Object.freeze({get _enabled(){return Zr},setEnabled:Be,isEnabled:function(){return Zr},trapBubbledEvent:ze,trapCapturedEvent:He,dispatchEvent:Ge}),Jr={animationend:We("Animation","AnimationEnd"),animationiteration:We("Animation","AnimationIteration"),animationstart:We("Animation","AnimationStart"),transitionend:We("Transition","TransitionEnd")},Qr={},$r={};dn.canUseDOM&&($r=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);var ei={topAnimationEnd:qe("animationend"),topAnimationIteration:qe("animationiteration"),topAnimationStart:qe("animationstart"),topBlur:"blur",topCancel:"cancel",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoad:"load",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:qe("transitionend"),topWheel:"wheel"},ti={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},ni={},ri=0,ii="_reactListenersID"+(""+Math.random()).slice(2),oi=dn.canUseDOM&&"documentMode"in document&&11>=document.documentMode,ai={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},si=null,li=null,ui=null,ci=!1,di={eventTypes:ai,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=Xe(o),i=Sn.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break e}}o=!0}i=!o}if(i)return null;switch(o=t?_(t):window,e){case"topFocus":(K(o)||"true"===o.contentEditable)&&(si=o,li=t,ui=null);break;case"topBlur":ui=li=si=null;break;case"topMouseDown":ci=!0;break;case"topContextMenu":case"topMouseUp":return ci=!1,Je(n,r);case"topSelectionChange":if(oi)break;case"topKeyDown":case"topKeyUp":return Je(n,r)}return null}};An.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Tn=Nn.getFiberCurrentPropsFromNode,Cn=Nn.getInstanceFromNode,On=Nn.getNodeFromInstance,An.injectEventPluginsByName({SimpleEventPlugin:qr,EnterLeaveEventPlugin:Ir,ChangeEventPlugin:Or,SelectEventPlugin:di,BeforeInputEventPlugin:Qn});var hi=null,fi=null;new Set;var pi=void 0,mi=void 0,gi=Array.isArray,vi=yt(!0),yi=yt(!1),bi={},_i=Object.freeze({default:At}),wi=_i&&At||_i,xi=wi.default?wi.default:wi,Ei="object"==typeof performance&&"function"==typeof performance.now,Si=void 0;Si=Ei?function(){return performance.now()}:function(){return Date.now()};var Mi=void 0,Ti=void 0;if(dn.canUseDOM)if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){var Ci=null,Oi=!1,Pi=-1,Ai=!1,Ri=0,Li=33,Ii=33,ki=void 0;ki=Ei?{didTimeout:!1,timeRemaining:function(){var e=Ri-performance.now();return 0<e?e:0}}:{didTimeout:!1,timeRemaining:function(){var e=Ri-Date.now();return 0<e?e:0}};var Ni="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===Ni){if(Oi=!1,e=Si(),0>=Ri-e){if(!(-1!==Pi&&Pi<=e))return void(Ai||(Ai=!0,requestAnimationFrame(Di)));ki.didTimeout=!0}else ki.didTimeout=!1;Pi=-1,e=Ci,Ci=null,null!==e&&e(ki)}},!1);var Di=function(e){Ai=!1;var t=e-Ri+Ii;t<Ii&&Li<Ii?(8>t&&(t=8),Ii=t<Li?Li:t):Li=t,Ri=e+Ii,Oi||(Oi=!0,window.postMessage(Ni,"*"))};Mi=function(e,t){return Ci=e,null!=t&&"number"==typeof t.timeout&&(Pi=Si()+t.timeout),Ai||(Ai=!0,requestAnimationFrame(Di)),0},Ti=function(){Ci=null,Oi=!1,Pi=-1}}else Mi=window.requestIdleCallback,Ti=window.cancelIdleCallback;else Mi=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0},didTimeout:!1})})},Ti=function(e){clearTimeout(e)};var ji={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Ui=void 0,Fi=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==ji.svg||"innerHTML"in e)e.innerHTML=t;else{for(Ui=Ui||document.createElement("div"),Ui.innerHTML="<svg>"+t+"</svg>",t=Ui.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),Bi={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zi=["Webkit","ms","Moz","O"];Object.keys(Bi).forEach(function(e){zi.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bi[t]=Bi[e]})});var Hi=hn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Vi=fn.thatReturns(""),Gi=Object.freeze({createElement:Xt,createTextNode:Yt,setInitialProperties:Zt,diffProperties:Kt,updateProperties:Jt,diffHydratedProperties:Qt,diffHydratedText:$t,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(me(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var o=w(i);o||r("90"),ne(i),me(i,o)}}}break;case"textarea":Ut(e,n);break;case"select":null!=(t=n.value)&&kt(e,!!n.multiple,t,!1)}}});er.injectFiberControlledHostComponent(Gi);var Wi=null,qi=null;en.prototype.render=function(e){this._defer||r("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,i=new tn;return Xi.updateContainerAtExpirationTime(e,t,null,n,i._onCommit),i},en.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},en.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||r("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var i=null,o=t;o!==this;)i=o,o=o._next;null===i&&r("251"),i._next=o._next,this._next=t,e.firstBatch=this}this._defer=!1,Xi.flushRoot(e,n),t=this._next,this._next=null,t=e.firstBatch=t,null!==t&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},en.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},tn.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},tn.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&r("191",n),n()}}},nn.prototype.render=function(e,t){var n=this._internalRoot,r=new tn;return t=void 0===t?null:t,null!==t&&r.then(t),Xi.updateContainer(e,n,null,r._onCommit),r},nn.prototype.unmount=function(e){var t=this._internalRoot,n=new tn;return e=void 0===e?null:e,null!==e&&n.then(e),Xi.updateContainer(null,t,null,n._onCommit),n},nn.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new tn;return n=void 0===n?null:n,null!==n&&i.then(n),Xi.updateContainer(t,r,e,i._onCommit),i},nn.prototype.createBatch=function(){var e=new en(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime<=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e};var Xi=xi({getRootHostContext:function(e){var t=e.nodeType;switch(t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:zt(null,"");break;default:t=8===t?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=zt(e,t)}return e},getChildHostContext:function(e,t){return zt(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){Wi=Zr;var e=pn();if(Ke(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=window.getSelection&&window.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{t.nodeType,i.nodeType}catch(e){t=null;break e}var o=0,a=-1,s=-1,l=0,u=0,c=e,d=null;t:for(;;){for(var h;c!==t||0!==r&&3!==c.nodeType||(a=o+r),c!==i||0!==n&&3!==c.nodeType||(s=o+n),3===c.nodeType&&(o+=c.nodeValue.length),null!==(h=c.firstChild);)d=c,c=h;for(;;){if(c===e)break t;if(d===t&&++l===r&&(a=o),d===i&&++u===n&&(s=o),null!==(h=c.nextSibling))break;c=d,d=c.parentNode}c=h}t=-1===a||-1===s?null:{start:a,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;qi={focusedElem:e,selectionRange:t},Be(!1)},resetAfterCommit:function(){var e=qi,t=pn(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&gn(document.documentElement,n)){if(Ke(n))if(t=r.start,e=r.end,void 0===e&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(window.getSelection){t=window.getSelection();var i=n[R()].length;e=Math.min(r.start,i),r=void 0===r.end?e:Math.min(r.end,i),!t.extend&&e>r&&(i=r,r=e,e=i),i=Ze(n,e);var o=Ze(n,r);if(i&&o&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)){var a=document.createRange();a.setStart(i.node,i.offset),t.removeAllRanges(),e>r?(t.addRange(a),t.extend(o.node,o.offset)):(a.setEnd(o.node,o.offset),t.addRange(a))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}qi=null,Be(Wi),Wi=null},createInstance:function(e,t,n,r,i){return e=Xt(e,t,n,r),e[In]=i,e[kn]=t,e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){return Zt(e,t,n,r),on(t,n)},prepareUpdate:function(e,t,n,r,i){return Kt(e,t,n,r,i)},shouldSetTextContent:function(e,t){return"textarea"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){return e=Yt(e,t),e[In]=r,e},now:Si,mutation:{commitMount:function(e,t,n){on(t,n)&&e.focus()},commitUpdate:function(e,t,n,r,i){e[kn]=i,Jt(e,t,n,r,i)},resetTextContent:function(e){Ht(e,"")},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},appendChildToContainer:function(e,t){8===e.nodeType?e.parentNode.insertBefore(t,e):e.appendChild(t)},insertBefore:function(e,t,n){e.insertBefore(t,n)},insertInContainerBefore:function(e,t,n){8===e.nodeType?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){8===e.nodeType?e.parentNode.removeChild(t):e.removeChild(t)}},hydration:{canHydrateInstance:function(e,t){return 1!==e.nodeType||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e},canHydrateTextInstance:function(e,t){return""===t||3!==e.nodeType?null:e},getNextHydratableSibling:function(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},getFirstHydratableChild:function(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},hydrateInstance:function(e,t,n,r,i,o){return e[In]=o,e[kn]=n,Qt(e,t,n,i,r)},hydrateTextInstance:function(e,t,n){return e[In]=n,$t(e,t)},didNotMatchHydratedContainerTextInstance:function(){},didNotMatchHydratedTextInstance:function(){},didNotHydrateContainerInstance:function(){},didNotHydrateInstance:function(){},didNotFindHydratableContainerInstance:function(){},didNotFindHydratableContainerTextInstance:function(){},didNotFindHydratableInstance:function(){},didNotFindHydratableTextInstance:function(){}},scheduleDeferredCallback:Mi,cancelDeferredCallback:Ti}),Yi=Xi;q=Yi.batchedUpdates,X=Yi.interactiveUpdates,Y=Yi.flushInteractiveUpdates;var Zi={createPortal:ln,findDOMNode:function(e){return null==e?null:1===e.nodeType?e:Xi.findHostInstance(e)},hydrate:function(e,t,n){return sn(null,e,t,!0,n)},render:function(e,t,n){return sn(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,i){return(null==e||void 0===e._reactInternalFiber)&&r("38"),sn(e,t,n,!1,i)},unmountComponentAtNode:function(e){return rn(e)||r("40"),!!e._reactRootContainer&&(Xi.unbatchedUpdates(function(){sn(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return ln.apply(void 0,arguments)},unstable_batchedUpdates:Xi.batchedUpdates,unstable_deferredUpdates:Xi.deferredUpdates,flushSync:Xi.flushSync,unstable_flushControlled:Xi.flushControlled,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Rn,EventPluginRegistry:Mn,EventPropagators:Dn,ReactControlledComponent:rr,ReactDOMComponentTree:Nn,ReactDOMEventListener:Kr},unstable_createRoot:function(e,t){return new nn(e,!0,null!=t&&!0===t.hydrate)}};Xi.injectIntoDevTools({findFiberByHostInstance:b,bundleType:0,version:"16.3.2",rendererPackageName:"react-dom"});var Ki=Object.freeze({default:Zi}),Ji=Ki&&Zi||Ki;e.exports=Ji.default?Ji.default:Ji},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";function r(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=r},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function i(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=i},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(427);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(428);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=r},function(e,t,n){!function(){"use strict";function t(){function e(e,t){this.scrollLeft=e,this.scrollTop=t}function t(e){return.5*(1-Math.cos(Math.PI*e))}function n(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function r(e,t){return"Y"===t?e.clientHeight+m<e.scrollHeight:"X"===t?e.clientWidth+m<e.scrollWidth:void 0}function i(e,t){var n=u.getComputedStyle(e,null)["overflow"+t];return"auto"===n||"scroll"===n}function o(e){var t=r(e,"Y")&&i(e,"Y"),n=r(e,"X")&&i(e,"X");return t||n}function a(e){var t;do{e=e.parentNode,t=e===c.body}while(!1===t&&!1===o(e));return t=null,e}function s(e){var n,r,i,o=p(),a=(o-e.startTime)/h;a=a>1?1:a,n=t(a),r=e.startX+(e.x-e.startX)*n,i=e.startY+(e.y-e.startY)*n,e.method.call(e.scrollable,r,i),r===e.x&&i===e.y||u.requestAnimationFrame(s.bind(u,e))}function l(t,n,r){var i,o,a,l,d=p();t===c.body?(i=u,o=u.scrollX||u.pageXOffset,a=u.scrollY||u.pageYOffset,l=f.scroll):(i=t,o=t.scrollLeft,a=t.scrollTop,l=e),s({scrollable:i,method:l,startTime:d,startX:o,startY:a,x:n,y:r})}var u=window,c=document;if(!("scrollBehavior"in c.documentElement.style&&!0!==u.__forceSmoothScrollPolyfill__)){var d=u.HTMLElement||u.Element,h=468,f={scroll:u.scroll||u.scrollTo,scrollBy:u.scrollBy,elementScroll:d.prototype.scroll||e,scrollIntoView:d.prototype.scrollIntoView},p=u.performance&&u.performance.now?u.performance.now.bind(u.performance):Date.now,m=function(e){var t=["MSIE ","Trident/","Edge/"];return new RegExp(t.join("|")).test(e)}(u.navigator.userAgent)?1:0;u.scroll=u.scrollTo=function(){if(void 0!==arguments[0])return!0===n(arguments[0])?void f.scroll.call(u,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:u.scrollX||u.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:u.scrollY||u.pageYOffset):void l.call(u,c.body,void 0!==arguments[0].left?~~arguments[0].left:u.scrollX||u.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:u.scrollY||u.pageYOffset)},u.scrollBy=function(){if(void 0!==arguments[0])return n(arguments[0])?void f.scrollBy.call(u,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):void l.call(u,c.body,~~arguments[0].left+(u.scrollX||u.pageXOffset),~~arguments[0].top+(u.scrollY||u.pageYOffset))},d.prototype.scroll=d.prototype.scrollTo=function(){if(void 0!==arguments[0]){if(!0===n(arguments[0])){if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");return void f.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}var e=arguments[0].left,t=arguments[0].top;l.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}},d.prototype.scrollBy=function(){if(void 0!==arguments[0])return!0===n(arguments[0])?void f.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop):void this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})},d.prototype.scrollIntoView=function(){if(!0===n(arguments[0]))return void f.scrollIntoView.call(this,void 0===arguments[0]||arguments[0]);var e=a(this),t=e.getBoundingClientRect(),r=this.getBoundingClientRect();e!==c.body?(l.call(this,e,e.scrollLeft+r.left-t.left,e.scrollTop+r.top-t.top),"fixed"!==u.getComputedStyle(e).position&&u.scrollBy({left:t.left,top:t.top,behavior:"smooth"})):u.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}}}e.exports={polyfill:t}}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(24),d=r(c),h=n(19),f=n(159),p=r(f),m=n(449),g=r(m),v=n(450),y=r(v),b=n(451),_=r(b),w=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=(0,h.getCookie)("layoutType"),a=r||p.default.layoutTypes.list,s=(0,h.getCookie)("itemsPerPage"),l=s||y.default.itemsQuantities[0];return n.state={searchTerm:n.props.searchTerm,categoryId:n.props.categoryId,itemsPerPage:l,layoutType:a,isLoading:!0,isInitialRender:!0,activeCategory:"",productsList:[],subcategoriesList:[],currentPageNumber:1,numberOfPages:0},n.handleCategoryChange=n.handleCategoryChange.bind(n),n.handlePageChange=n.handlePageChange.bind(n),n.handleNext=n.handleNext.bind(n),n.handlePrev=n.handlePrev.bind(n),n.handleItemsQuantityChange=n.handleItemsQuantityChange.bind(n),n.handleLayoutChange=n.handleLayoutChange.bind(n),n.setActiveCategory=n.setActiveCategory.bind(n),n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.fetchData(),(0,h.checkIfDesktop)()||this.setState({layoutType:p.default.layoutTypes.grid})}},{key:"fetchData",value:function(){var e=this;this.setState({isLoading:!0});var t=this.state,n=t.categoryId,r=t.currentPageNumber,i=t.itemsPerPage,o=t.searchTerm,a=t.activeCategory,s={categoryId:n,pageNo:r,itemsPerPage:i,term:o,categoryFacet:a};d.default.get(this.props.rootUrl,{params:s}).then(function(t){var n=t.data.Results,r=t.data.TotalPages,i=t.data.Categories;e.setState({productsList:n,numberOfPages:r}),e.state.isInitialRender&&e.setState({subcategoriesList:i,isInitialRender:!1},e.setActiveCategory)}).then(function(){return e.setState({isLoading:!1})}).catch(function(t){e.setState({isLoading:!1}),e.handleFetchError(t)})}},{key:"setActiveCategory",value:function(){var e=this.state.subcategoriesList;1===e.length&&this.setState({activeCategory:e[0].Term})}},{key:"handleFetchError",value:function(e){e.response?(console.log(e.response.data),console.log(e.response.status),console.log(e.response.headers)):e.request?console.log(e.request):console.log("Error",e.message),console.log(e.config)}},{key:"handleCategoryChange",value:function(e,t){var n=this;e.preventDefault(),t===this.state.categoryId?this.setState({activeCategory:"",currentPageNumber:1},function(){return n.fetchData()}):this.setState({activeCategory:t,currentPageNumber:1},function(){return n.fetchData()})}},{key:"handleItemsQuantityChange",value:function(e){var t=this;this.setState({currentPageNumber:1,itemsPerPage:e},function(){return t.fetchData()}),(0,h.setCookie)("itemsPerPage",e,30,"/product-catalogue/")}},{key:"handleLayoutChange",value:function(e,t){e.preventDefault(),this.setState({layoutType:t}),(0,h.setCookie)("layoutType",t,30,"/product-catalogue/")}},{key:"handlePageChange",value:function(e){var t=this;this.setState({currentPageNumber:e},function(){return t.fetchData()})}},{key:"handlePrev",value:function(){var e=this;this.setState(function(e){return{currentPageNumber:e.currentPageNumber-1}},function(){return e.fetchData()})}},{key:"handleNext",value:function(){var e=this;this.setState(function(e){return{currentPageNumber:e.currentPageNumber+1}},function(){return e.fetchData()})}},{key:"render",value:function(){var e=this.state,t=e.productsList,n=e.subcategoriesList,r=e.activeCategory,i=e.categoryId,o=e.isLoading,a=e.layoutType,s=e.itemsPerPage,l=e.numberOfPages,c=e.currentPageNumber;return 0===t.length&&!1===o?u.default.createElement("h2",{className:"intro"},"No results"):t.length>0?u.default.createElement("div",{className:"row"},u.default.createElement("aside",{className:"column secondary"},u.default.createElement(g.default,{subcategoriesList:n,onCategoryChange:this.handleCategoryChange,activeCategory:r,categoryId:i})),u.default.createElement("section",{className:"search-results"},u.default.createElement(y.default,{onItemsQuantityChange:this.handleItemsQuantityChange,onLayoutChange:this.handleLayoutChange,layoutType:a,itemsPerPage:s}),u.default.createElement(p.default,{productsList:t,isLoading:o,layoutType:a}),u.default.createElement(_.default,{numberOfPages:l,currentPageNumber:c,onPageChange:this.handlePageChange,onPrev:this.handlePrev,onNext:this.handleNext}))):u.default.createElement("div",{className:"loader"},u.default.createElement("p",{className:"visually-hidden-accessible"},"Loading in progress."),u.default.createElement("div",{className:"loader__icon"}))}}]),t}(l.Component);t.default=w},function(e,t,n){"use strict";function r(e){var t=new a(e),n=o(a.prototype.request,t);return i.extend(n,a.prototype,t),i.extend(n,t),n}var i=n(20),o=n(154),a=n(433),s=n(110),l=r(s);l.Axios=a,l.create=function(e){return r(i.merge(s,e))},l.Cancel=n(158),l.CancelToken=n(447),l.isCancel=n(157),l.all=function(e){return Promise.all(e)},l.spread=n(448),e.exports=l,e.exports.default=l},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new a,response:new a}}var i=n(110),o=n(20),a=n(442),s=n(443);r.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),e=o.merge(i,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},o.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(o.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";var r=n(20);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(156);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(20);e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(i.isURLSearchParams(t))o=t.toString();else{var a=[];i.forEach(t,function(e,t){null!==e&&void 0!==e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))}))}),o=a.join("&")}return o&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e}},function(e,t,n){"use strict";var r=n(20),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";var r=n(20);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(i.setAttribute("href",t),t=i.href),i.setAttribute("href",t),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return t=e(window.location.href),function(n){var i=r.isString(n)?e(n):n;return i.protocol===t.protocol&&i.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";function r(){this.message="String contains an invalid character"}function i(e){for(var t,n,i=String(e),a="",s=0,l=o;i.charAt(0|s)||(l="=",s%1);a+=l.charAt(63&t>>8-s%1*8)){if((n=i.charCodeAt(s+=.75))>255)throw new r;t=t<<8|n}return a}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=i},function(e,t,n){"use strict";var r=n(20);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var i=n(20);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var i=n(20),o=n(444),a=n(157),s=n(110),l=n(445),u=n(446);e.exports=function(e){return r(e),e.baseURL&&!l(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(20);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new i(e),t(n.reason))})}var i=n(158);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),d=n(31),h=r(d),f=n(19),p=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.isMobile=!(0,f.checkIfDesktop)(),n.state={isCategorySelectOpen:!1},n.toggleCategorySelect=n.toggleCategorySelect.bind(n),n.handleCategoryChange=n.handleCategoryChange.bind(n),n}return s(t,e),l(t,[{key:"toggleCategorySelect",value:function(){this.setState(function(e){return{isCategorySelectOpen:!e.isCategorySelectOpen}})}},{key:"handleCategoryChange",value:function(e,t){e.preventDefault(),this.setState({isCategorySelectOpen:!1}),this.props.onCategoryChange(e,t)}},{key:"renderCategories",value:function(){var e=this,t=this.props.subcategoriesList,n=t.map(function(t){return c.default.createElement("li",{key:t.Term},c.default.createElement("a",{href:"#",title:t.Term,onClick:function(n){return e.handleCategoryChange(n,t.Term)},className:(0,h.default)({active:t.Term===e.props.activeCategory})},t.Term," (",t.Count,")"))});if(t.length>1){var r=t.reduce(function(e,t){return e+=t.Count},0);n=[c.default.createElement("li",{key:this.props.categoryId},c.default.createElement("a",{href:"#",title:"All",onClick:function(t){return e.handleCategoryChange(t,e.props.categoryId)},className:(0,h.default)({active:""===this.props.activeCategory})},"All (",r,")"))].concat(i(n))}return n}},{key:"render",value:function(){var e=(0,h.default)("searchFilter","searchFilter--product-catalogue",{open:this.state.isCategorySelectOpen}),t=(0,h.default)("boxHeading",{"boxHeading--no-dropdown":this.isMobile&&this.props.subcategoriesList.length<=1});return c.default.createElement("section",{className:e,"aria-controls":"productsList"},c.default.createElement("h2",{className:t},c.default.createElement("span",{onClick:this.isMobile?this.toggleCategorySelect:null},"Categories")),c.default.createElement("ul",null,c.default.createElement("a",{href:"#productCatalogueSearchResults",className:"skip"},"Skip to results"),this.renderCategories()))}}]),t}(u.Component);t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=r(i),a=n(31),s=r(a),l=n(159),u=r(l),c=n(160),d=r(c),h=function e(t){var n=(0,s.default)("list-view-btn",{"list-view-btn--active":t.layoutType===u.default.layoutTypes.list}),r=(0,s.default)("tiles-view-btn",{"tiles-view-btn--active":t.layoutType===u.default.layoutTypes.grid}),i=t.itemsPerPage,a=t.onItemsQuantityChange,l=t.onLayoutChange;return o.default.createElement("div",{className:"options-bar"},o.default.createElement("div",{className:"options-bar__item","aria-controls":"productsList"},o.default.createElement("span",{className:"options-bar__filter-label",id:"itemsPerPageLabel"},"Results on the page"),o.default.createElement(d.default,{labelId:"itemsPerPageLabel",optionsListName:"itemsPerPage",selectedOption:i,options:e.itemsQuantities,onValueSelection:a})),o.default.createElement("div",{className:"options-bar__item"},o.default.createElement("span",{className:"options-bar__filter-label"},"View"),o.default.createElement("a",{href:"#",className:n,onClick:function(e){return l(e,u.default.layoutTypes.list)}}),o.default.createElement("a",{href:"#",className:r,onClick:function(e){return l(e,u.default.layoutTypes.grid)}})))};h.itemsQuantities=["12","24","48"],t.default=h},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){var n=e,i=[];return e<=1?null:(e<=5?i=o(1,n):e>5&&(t<4&&(i=[].concat(r(o(1,5)),["...",n])),t>=4&&t<=n-4&&(i=[1,"...",t-1,t,t+1,"...",n]),t>=4&&t>n-4&&(i=[1,"..."].concat(r(o(n-4,n))))),i)}function o(e,t){for(var n=t-e,r=[],i=e,o=0;o<=n;o++)r[o]=i,i++;return r}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=function(e){return e&&e.__esModule?e:{default:e}}(a),l=function(e){var t=e.numberOfPages,n=e.currentPageNumber,r=e.onPageChange,o=e.onPrev,a=e.onNext;if(t<=1)return null;var l=i(t,n),c=l.map(function(e,t){return s.default.createElement(u,{handlePageChange:r,key:t,pageNumber:e,currentPageNumber:n})});return s.default.createElement("ul",{className:"pager","aria-controls":"productsList"},n>1&&s.default.createElement("li",{className:"prev"},s.default.createElement("a",{href:"#",onClick:o},"Previous")),c,n<t&&s.default.createElement("li",{className:"next"},s.default.createElement("a",{href:"#",onClick:a},"Next")))},u=function(e){var t=e.pageNumber,n=e.currentPageNumber,r=e.handlePageChange;return t===n?s.default.createElement("li",{className:"current",onClick:function(e){return e.preventDefault()}},s.default.createElement("a",{href:"#"},t)):"..."===t?s.default.createElement("li",{className:"dots"},s.default.createElement("a",{href:"#",onClick:function(e){return e.preventDefault()}},t)):t!==n?s.default.createElement("li",null,s.default.createElement("a",{href:"#",onClick:function(){return r(t)}},t)):null};t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return h.default.createElement(b.GlobalContextProvider,null,h.default.createElement(b.GlobalContext.Consumer,null,function(t){return h.default.createElement(A,u({setCategoriesListVisibility:t.setCategoriesListVisibility},e))}))}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),h=r(d),f=n(24),p=r(f),m=n(31),g=r(m),v=n(55),y=n(19),b=n(56),_=n(453),w=r(_),x=n(454),E=r(x),S=n(455),M=r(S),T=n(488),C=r(T),O=n(489),P=r(O),A=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.aspectRatioSetterRef=h.default.createRef(),n.shipsAssets=n.createShipsAssetsObject(),n.state={noShipCanBeShown:!0,isDataLoaded:!1,loadModels:!1,isContainerFullHeight:!1,errorsInData:{},applicationAreasData:{},activeShip:""},n.handleExploreModelBtnClick=n.handleExploreModelBtnClick.bind(n),n.handleChooseShipBtnClick=n.handleChooseShipBtnClick.bind(n),n.handleCloseShipsViewerBtnClick=n.handleCloseShipsViewerBtnClick.bind(n),n.handleCloseShipsViewerEscape=n.handleCloseShipsViewerEscape.bind(n),n.handleTransitionEvent=n.handleTransitionEvent.bind(n),n}return s(t,e),c(t,[{key:"componentDidMount",value:function(){for(var e in v.ships)v.ships.hasOwnProperty(e)&&this.fetchShipData(v.ships[e]);this.bindEventListeners()}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"bindEventListeners",value:function(){this.aspectRatioSetterRef.current.addEventListener("transitionend",this.handleTransitionEvent,!1),window.addEventListener("keyup",this.handleCloseShipsViewerEscape,!1)}},{key:"unbindEventListeners",value:function(){this.aspectRatioSetterRef.current.removeEventListener("transitionend",this.handleTransitionEvent,!1),window.removeEventListener("keyup",this.handleCloseShipsViewerEscape,!1)}},{key:"handleTransitionEvent",value:function(e){"padding-top"===e.propertyName&&this.setState({isContainerFullHeight:!this.state.isContainerFullHeight})}},{key:"fetchShipData",value:function(e){var t=this,n="/api/applicationarea/getareas/"+e;p.default.get(n).then(function(n){var r=(0,y.camelize)(n.data);if(r.subareas){var o=u({},t.state.applicationAreasData,i({},e,r)),a=u({},t.state.errorsInData,i({},e,!1));t.setState({applicationAreasData:o,errorsInData:a},t.checkIfAllDataIsLoaded)}else{var s=u({},t.state.errorsInData,i({},e,!0));t.setState({errorsInData:s}),console.error("Subareas couldn't be found for "+v.ships[e])}}).catch(function(n){console.groupCollapsed("Errors in: "+v.ships[e]),console.info("Couldn't load data for "+v.ships[e]),console.error(n),console.groupEnd();var r=u({},t.state.errorsInData,i({},e,!0));t.setState({errorsInData:r})})}},{key:"checkIfAllDataIsLoaded",value:function(){Object.keys(this.state.errorsInData).length===Object.keys(v.ships).length&&this.setState({isDataLoaded:!0,noShipCanBeShown:this.checkIfNoShipCanBeShown(),activeShip:this.getFirstShipWithoutErrors()})}},{key:"getFirstShipWithoutErrors",value:function(){var e="";for(var t in v.ships)if(v.ships.hasOwnProperty(t)&&!this.state.errorsInData[t]){e=t;break}return e}},{key:"getShipAssets",value:function(e){var t={};return this.props.shipsAssetsRaw.forEach(function(n){n.id.indexOf(e)>=0&&(t=n.dataset)}),t}},{key:"createShipsAssetsObject",value:function(){var e={};for(var t in v.ships)v.ships.hasOwnProperty(t)&&(e[t]=this.getShipAssets(t));return e}},{key:"handleExploreModelBtnClick",value:function(){this.setState({loadModels:!0}),(0,y.scrollToElement)(this.aspectRatioSetterRef.current)}},{key:"handleChooseShipBtnClick",value:function(e){this.setState({activeShip:e})}},{key:"handleCloseShipsViewerBtnClick",value:function(e){e.preventDefault(),this.props.setCategoriesListVisibility(!1),this.setState({loadModels:!1})}},{key:"handleCloseShipsViewerEscape",value:function(e){e.preventDefault();27===e.keyCode&&this.state.loadModels&&(this.props.setCategoriesListVisibility(!1),this.setState({loadModels:!1}))}},{key:"checkIfNoShipCanBeShown",value:function(){var e=this.state.errorsInData,t=!0;for(var n in e)e.hasOwnProperty(n)&&!e[n]&&(t=!1);return t}},{key:"generateShips",value:function(e){var t=this,n=this.state,r=n.applicationAreasData,i=n.activeShip,o=n.errorsInData,a=null;return"2D"===e?a=v.ships2D.map(function(e){if(!o[e])return h.default.createElement(C.default,{applicationAreas:r[e].subareas,shipAssets:t.shipsAssets[e],activeShip:i,ship:e,key:e})}):"3D"===e&&(a=v.ship3D.map(function(e){if(!o[e])return h.default.createElement(M.default,{applicationAreas:r[e].subareas,shipAssets:t.shipsAssets[e],activeShip:i,ship:e,key:e})})),a}},{key:"renderShips",value:function(){var e=this.state,t=e.loadModels,n=e.isContainerFullHeight,r=e.isDataLoaded,i=e.applicationAreasData,o=e.activeShip,a=e.errorsInData,s=null;return t&&n&&r&&(s=h.default.createElement(d.Fragment,null,h.default.createElement("button",{className:"close-btn",onClick:this.handleCloseShipsViewerBtnClick}),this.generateShips("3D"),h.default.createElement(d.Fragment,null,this.generateShips("2D"),h.default.createElement(P.default,{errorsInData:a,activeShip:o,applicationAreas:i,shipsAssets:this.shipsAssets,handleClick:this.handleChooseShipBtnClick})))),s}},{key:"render",value:function(){var e=(0,g.default)("ships-viewer__aspect-ratio-setter",{"ships-viewer__not-active-overlay":this.state.loadModels,"ships-viewer__active-overlay":!this.state.loadModels}),t=this.state.noShipCanBeShown?{display:"none"}:{},n=this.state.loadModels&&this.state.isContainerFullHeight;return h.default.createElement("section",{className:"row ships-viewer",style:t},h.default.createElement("div",{className:e,ref:this.aspectRatioSetterRef},h.default.createElement(w.default,{handleClick:this.handleExploreModelBtnClick}),this.renderShips(),n&&h.default.createElement(E.default,null)))}}]),t}(d.Component);t.default=l},function(e,t,n){"use strict";function r(e){return o.default.createElement("div",{className:"ships-viewer__load-viewer-text-container"},o.default.createElement("h2",{className:"ships-viewer__load-viewer-heading"},"EXPLORE APPLICATION AREAS TO FIND THE RIGHT PRODUCT OR SOLUTION"),o.default.createElement("button",{type:"button",className:"ships-viewer__load-viewer-btn btn btn--primary btn--big btn--outline",onClick:e.handleClick},"Start exploring"))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(h.GlobalContext.Consumer,null,function(t){return d.default.createElement(g,l({isCategoriesListVisible:t.isCategoriesListVisible},e))})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(56),f=n(19),p=n(31),m=r(p),g=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=n.checkIfFirstTimeVisiting();return n.state={isOpen:r,containerHeight:0,noTransitions:r,infoBtnSize:{width:0,height:0},windowPosition:{x:0,y:0}},n.infoBtnRef=d.default.createRef(),n.closeInfoOnScroll=n.closeInfoOnScroll.bind(n),n.toggleInfo=n.toggleInfo.bind(n),n.calculateContainerHeight=n.calculateContainerHeight.bind(n),n.calculateContainerHeightOnResize=n.calculateContainerHeightOnResize.bind(n),n.addScrollListener=n.addScrollListener.bind(n),n.removeScrollListener=n.removeScrollListener.bind(n),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){this.setState({infoBtnSize:{width:this.infoBtnRef.current.offsetWidth,height:this.infoBtnRef.current.offsetHeight}}),this.calculateContainerHeight(),window.addEventListener("resize",this.calculateContainerHeightOnResize,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.calculateContainerHeightOnResize,!1)}},{key:"checkIfFirstTimeVisiting",value:function(){var e=void 0;return(0,f.getCookie)("instructionsSeen")?e=!1:(e=!0,(0,f.setCookie)("instructionsSeen","true",30,"/product-catalogue/")),e}},{key:"addScrollListener",value:function(){this.setState({windowPosition:{x:window.screenX,y:window.scrollY}}),window.addEventListener("scroll",this.closeInfoOnScroll,!1)}},{key:"removeScrollListener",value:function(){window.removeEventListener("scroll",this.closeInfoOnScroll,!1)}},{key:"closeInfoOnScroll",value:function(){var e=this.state,t=e.windowPosition,n=e.isOpen;window.scrollTo(t.x,t.y),n&&this.setState({isOpen:!1})}},{key:"toggleInfo",value:function(e){e.preventDefault(),this.setState(function(e){return{noTransitions:!1,isOpen:!e.isOpen}},this.calculateContainerHeight)}},{key:"calculateContainerHeightOnResize",value:function(){this.setState({noTransitions:!0}),this.calculateContainerHeight()}},{key:"calculateContainerHeight",value:function(){if(this.state.isOpen){var e=document.getElementById("shipsViewerRoot"),t=e.offsetHeight;this.setState({containerHeight:t})}}},{key:"render",value:function(){var e=(0,m.default)("instructions",{"instructions--open":this.state.isOpen}),t={};return this.state.noTransitions&&(t.transition="none"),this.state.isOpen?t.height=this.state.containerHeight:(t.height=this.state.infoBtnSize.height,t.width=this.state.infoBtnSize.width),this.props.isCategoriesListVisible&&(t.visibility="hidden"),d.default.createElement("div",{className:e,onMouseDown:this.toggleInfo,onMouseEnter:this.addScrollListener,onMouseLeave:this.removeScrollListener,style:t},d.default.createElement("div",{className:"instructions__overlay"}),d.default.createElement("button",{className:"instructions__info-btn",onClick:function(e){return e.preventDefault()},ref:this.infoBtnRef},"View instructions"),d.default.createElement("div",{className:"instructions__close-btn-container"},d.default.createElement("button",{className:"instructions__close-btn",onClick:function(e){return e.preventDefault()}},"Close and Explore"),d.default.createElement("p",{className:"instructions__small-text"},"Or click anywhere and start exploring")))}}]),t}(c.Component);t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(f.ShipContextProvider,null,d.default.createElement(f.ShipContext.Consumer,null,function(t){return d.default.createElement(y,l({setShipType:t.setShipType},e))}))}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(55),f=n(35),p=n(456),m=r(p),g=n(161),v=r(g),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.props.setShipType(n.props.ship),n.requestAnimationFrameId="",n.state={shipHasLoaded:!1},n.shipModelContainerRef=d.default.createRef(),n.hotspotsRefs=[],n.initScene=n.initScene.bind(n),n.renderLoop=n.renderLoop.bind(n),n.getTwoDCoordinatesFromThreeD=n.getTwoDCoordinatesFromThreeD.bind(n),n.moveCameraToPosition=n.moveCameraToPosition.bind(n),n.moveCameraToInitialPosition=n.moveCameraToInitialPosition.bind(n),n.handleWindowResizeEvent=n.handleWindowResizeEvent.bind(n),n.addHotspotRef=n.addHotspotRef.bind(n),n.positionHotspots=n.positionHotspots.bind(n),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){this.sceneManager=new m.default(this.shipModelContainerRef.current,this.props.shipAssets.modelUrl,this.initScene)}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"initScene",value:function(){var e=this;this.bindEventListeners(),this.renderLoop(),this.setState({shipHasLoaded:!0}),setTimeout(function(){return e.sceneManager.changeCameraPosition(h.cameraInitialPosition)},1e3)}},{key:"bindEventListeners",value:function(){window.addEventListener("resize",this.handleWindowResizeEvent,!1)}},{key:"unbindEventListeners",value:function(){window.cancelAnimationFrame(this.requestAnimationFrameId),window.removeEventListener("resize",this.handleWindowResizeEvent,!1)}},{key:"handleWindowResizeEvent",value:function(){this.sceneManager.onWindowResize()}},{key:"renderLoop",value:function(){this.requestAnimationFrameId=window.requestAnimationFrame(this.renderLoop),this.sceneManager.update(),this.positionHotspots()}},{key:"getTwoDCoordinatesFromThreeD",value:function(e){return this.sceneManager.getTwoDCoordinatesFromThreeD(e)}},{key:"moveCameraToPosition",value:function(e){this.sceneManager.changeCameraPosition(e)}},{key:"moveCameraToInitialPosition",value:function(){this.sceneManager.changeCameraPosition(h.cameraInitialPosition)}},{key:"addHotspotRef",value:function(e){this.hotspotsRefs.push(e)}},{key:"positionHotspots",value:function(){for(var e=this.hotspotsRefs,t=e.length,n=0;n<t;n++)e[n].positionHotspot()}},{key:"render",value:function(){var e=this,t=this.props.applicationAreas.map(function(t){return d.default.createElement(v.default,{threeDShip:!0,key:t.name,area:t,engineRoomImgUrl:e.props.shipAssets.engineRoomUrl,getTwoDCoordinatesFromThreeD:e.getTwoDCoordinatesFromThreeD,moveCameraToPosition:e.moveCameraToPosition,moveCameraToInitialPosition:e.moveCameraToInitialPosition,addHotspotRef:e.addHotspotRef,shipHasLoaded:e.state.shipHasLoaded})}),n={};return n.opacity=this.props.activeShip===this.props.ship?"1":"0",n.pointerEvents=this.props.activeShip===this.props.ship?"auto":"none",d.default.createElement("div",{className:"ships-viewer__container ships-viewer__container--3D",style:n,ref:this.shipModelContainerRef},!this.state.shipHasLoaded&&d.default.createElement("div",{className:"loader"},d.default.createElement("p",{className:"visually-hidden-accessible"},"Loading in progress."),d.default.createElement("div",{className:"loader__icon"})),t)}}]),t}(c.Component);t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(75),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a),l=n(55),u=n(457),c=r(u),d=n(458),h=r(d),f=n(459),p=r(f),m=n(460),g=function(){function e(t,r,o){i(this,e),this.OrbitControls=n(461)(s),this.container=t,this.containerDimensions={width:this.container.offsetWidth,height:this.container.offsetHeight},this.scene=new s.Scene,this.renderer=this.buildRenderer(this.containerDimensions),this.camera=this.buildCamera(this.containerDimensions),this.controls=this.buildOrbitControls(this.camera,this.renderer),this.loadingManager=this.buildLoadingManager(o,this.changeCameraPosition),this.initSceneSubjects(this.scene,r,this.loadingManager)}return o(e,[{key:"initSceneSubjects",value:function(e,t,n){(0,c.default)(e),(0,h.default)(e),(0,p.default)(e,t,n)}},{key:"buildLoadingManager",value:function(e){var t=new s.LoadingManager;return t.onLoad=function(){e(),console.log("Loading complete!")},t}},{key:"buildRenderer",value:function(e){var t=e.width,n=e.height,r=new s.WebGLRenderer({antialias:!0,alpha:!0});return r.shadowMap.enabled=!0,r.shadowMap.type=s.PCFSoftShadowMap,r.setSize(t,n),r.autoClear=!1,r.setClearColor(0,0),this.container.appendChild(r.domElement),r}},{key:"buildCamera",value:function(e){var t=e.width,n=e.height,r=t/n,i=new s.PerspectiveCamera(35,r,1,1e3);return i.position.set(l.cameraLoadingPosition.x,l.cameraLoadingPosition.y,l.cameraLoadingPosition.z),i.lookAt(new s.Vector3(0,0,0)),i}},{key:"buildOrbitControls",value:function(e,t){var n=new this.OrbitControls(e,t.domElement);return this.setOrbitControlSettings(n,l.initialOrbitControlsSettings),n}},{key:"setOrbitControlSettings",value:function(e,t){var n=t.minDistance,r=t.maxDistance,i=t.enableDamping,o=t.enableKeys,a=t.enablePan,s=t.dampingFactor,l=t.minAzimuthAngle,u=t.maxAzimuthAngle,c=t.minPolarAngle,d=t.maxPolarAngle,h=t.rotateSpeed;e.minDistance=n,e.maxDistance=r,e.enableDamping=i,e.dampingFactor=s,e.enableKeys=o,e.enablePan=a,e.minAzimuthAngle=l,e.maxAzimuthAngle=u,e.minPolarAngle=c,e.maxPolarAngle=d,e.rotateSpeed=h}},{key:"onWindowResize",value:function(){var e=this.container.offsetWidth,t=this.container.offsetHeight;this.containerDimensions.width=e,this.containerDimensions.height=t,this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.renderer.setSize(e,t)}},{key:"getTwoDCoordinatesFromThreeD",value:function(e){var t=this.renderer.domElement,n=new s.Vector3(e.x,e.y,e.z);return n.project(this.camera),n.x=Math.round((n.x+1)*t.width/2),n.y=Math.round((1-n.y)*t.height/2),{x:n.x,y:n.y}}},{key:"changeCameraPosition",value:function(e){this.setOrbitControlSettings(this.controls,l.initialOrbitControlsSettings);var t=this.camera,n={x:t.position.x,y:t.position.y,z:t.position.z},r={x:e.x,y:e.y,z:e.z};new m.Tween(n).to(r,l.cameraTransitionSpeed).easing(m.Easing.Quadratic.Out).onUpdate(function(){t.position.set(n.x,n.y,n.z),t.lookAt(new s.Vector3(0,0,0))}).onComplete(function(){t.lookAt(new s.Vector3(0,0,0))}).start()}},{key:"update",value:function(){this.renderer.render(this.scene,this.camera),this.controls.update(),m.update()}}]),e}();t.default=g},function(e,t,n){"use strict";function r(e){var t=new o.AmbientLight(4210752,1);e.add(t);var n=function(e){var t=new o.PointLight(16777215,e);return t.castShadow=!0,t.shadow.mapSize.width=1024,t.shadow.mapSize.height=1024,t}(1);n.position.y=10,e.add(n);var r=new o.DirectionalLight(16777215,1);r.position.set(-100,0,100),e.add(r);var i=new o.DirectionalLight(16777215,1);i.position.set(100,0,-100).normalize(),e.add(i)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(75),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i);t.default=r},function(e,t,n){"use strict";function r(e){var t=new o.PlaneGeometry(200,200),n=new o.ShadowMaterial({opacity:.2}),r=new o.Mesh(t,n);r.receiveShadow=!0,r.rotation.x=(0,a.getRadians)(-90),r.position.y=-.1,e.add(r)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(75),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=n(19);t.default=r},function(e,t,n){"use strict";function r(e,t,n){function r(t){t.name="shipModel",t.scale.multiplyScalar(99e-5),t.position.y=.1,t.position.x=-.1,t.rotation.x=(0,a.getRadians)(180),t.rotation.y=(0,a.getRadians)(90),e.add(t)}new o.ObjectLoader(n).load(t,r)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(75),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=n(19);t.default=r},function(e,t,n){(function(n){var r,i,o=function(){this._tweens={},this._tweensAddedDuringUpdate={}};o.prototype={getAll:function(){return Object.keys(this._tweens).map(function(e){return this._tweens[e]}.bind(this))},removeAll:function(){this._tweens={}},add:function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},remove:function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},update:function(e,t){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(e=void 0!==e?e:a.now();n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<n.length;r++){var i=this._tweens[n[r]];i&&!1===i.update(e)&&(i._isPlaying=!1,t||delete this._tweens[n[r]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var a=new o;a.Group=o,a._nextId=0,a.nextId=function(){return a._nextId++},"undefined"==typeof window&&void 0!==n?a.now=function(){var e=n.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?a.now=window.performance.now.bind(window.performance):void 0!==Date.now?a.now=Date.now:a.now=function(){return(new Date).getTime()},a.Tween=function(e,t){this._object=e,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=a.Easing.Linear.None,this._interpolationFunction=a.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=t||a,this._id=a.nextId()},a.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(e,t){return this._valuesEnd=e,void 0!==t&&(this._duration=t),this},start:function(e){this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==e?"string"==typeof e?a.now()+parseFloat(e):e:a.now(),this._startTime+=this._delayTime;for(var t in this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(0===this._valuesEnd[t].length)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}void 0!==this._object[t]&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array==!1&&(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(this._startTime+this._duration),this},stopChainedTweens:function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop()},group:function(e){return this._group=e,this},delay:function(e){return this._delayTime=e,this},repeat:function(e){return this._repeat=e,this},repeatDelay:function(e){return this._repeatDelayTime=e,this},yoyo:function(e){return this._yoyo=e,this},easing:function(e){return this._easingFunction=e,this},interpolation:function(e){return this._interpolationFunction=e,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(e){return this._onStartCallback=e,this},onUpdate:function(e){return this._onUpdateCallback=e,this},onComplete:function(e){return this._onCompleteCallback=e,this},onStop:function(e){return this._onStopCallback=e,this},update:function(e){var t,n,r;if(e<this._startTime)return!0;!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(e-this._startTime)/this._duration,n=0===this._duration||n>1?1:n,r=this._easingFunction(n);for(t in this._valuesEnd)if(void 0!==this._valuesStart[t]){var i=this._valuesStart[t]||0,o=this._valuesEnd[t];o instanceof Array?this._object[t]=this._interpolationFunction(o,r):("string"==typeof o&&(o="+"===o.charAt(0)||"-"===o.charAt(0)?i+parseFloat(o):parseFloat(o)),"number"==typeof o&&(this._object[t]=i+(o-i)*r))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object),1===n){if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(t in this._valuesStartRepeat){if("string"==typeof this._valuesEnd[t]&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo){var a=this._valuesStartRepeat[t];this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=a}this._valuesStart[t]=this._valuesStartRepeat[t]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,l=this._chainedTweens.length;s<l;s++)this._chainedTweens[s].start(this._startTime+this._duration);return!1}return!0}},a.Easing={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1)}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-a.Easing.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*a.Easing.Bounce.In(2*e):.5*a.Easing.Bounce.Out(2*e-1)+.5}}},a.Interpolation={Linear:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),o=a.Interpolation.Utils.Linear;return t<0?o(e[0],e[1],r):t>1?o(e[n],e[n-1],n-r):o(e[i],e[i+1>n?n:i+1],r-i)},Bezier:function(e,t){for(var n=0,r=e.length-1,i=Math.pow,o=a.Interpolation.Utils.Bernstein,s=0;s<=r;s++)n+=i(1-t,r-s)*i(t,s)*e[s]*o(r,s);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),o=a.Interpolation.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(i=Math.floor(r=n*(1+t))),o(e[(i-1+n)%n],e[i],e[(i+1)%n],e[(i+2)%n],r-i)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(o(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):o(e[i?i-1:0],e[i],e[n<i+1?n:i+1],e[n<i+2?n:i+2],r-i)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=a.Interpolation.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var r=t;r>1;r--)n*=r;return e[t]=n,n}}(),CatmullRom:function(e,t,n,r,i){var o=.5*(n-e),a=.5*(r-t),s=i*i;return(2*t-2*n+o+a)*(i*s)+(-3*t+3*n-2*o-a)*s+o*i+t}}},function(n){r=[],void 0!==(i=function(){return a}.apply(t,r))&&(e.exports=i)}()}).call(t,n(111))},function(e,t){e.exports=function(e){function t(t,n){function r(){return 2*Math.PI/60/60*k.autoRotateSpeed}function i(){return Math.pow(.95,k.zoomSpeed)}function o(e){H.theta-=e}function a(e){H.phi-=e}function s(t){k.object instanceof e.PerspectiveCamera?V/=t:k.object instanceof e.OrthographicCamera?(k.object.zoom=Math.max(k.minZoom,Math.min(k.maxZoom,k.object.zoom*t)),k.object.updateProjectionMatrix(),W=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),k.enableZoom=!1)}function l(t){k.object instanceof e.PerspectiveCamera?V*=t:k.object instanceof e.OrthographicCamera?(k.object.zoom=Math.max(k.minZoom,Math.min(k.maxZoom,k.object.zoom/t)),k.object.updateProjectionMatrix(),W=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),k.enableZoom=!1)}function u(e){q.set(e.clientX,e.clientY)}function c(e){Q.set(e.clientX,e.clientY)}function d(e){Z.set(e.clientX,e.clientY)}function h(e){X.set(e.clientX,e.clientY),Y.subVectors(X,q);var t=k.domElement===document?k.domElement.body:k.domElement;o(2*Math.PI*Y.x/t.clientWidth*k.rotateSpeed),a(2*Math.PI*Y.y/t.clientHeight*k.rotateSpeed),q.copy(X),k.update()}function f(e){$.set(e.clientX,e.clientY),ee.subVectors($,Q),ee.y>0?s(i()):ee.y<0&&l(i()),Q.copy($),k.update()}function p(e){K.set(e.clientX,e.clientY),J.subVectors(K,Z),re(J.x,J.y),Z.copy(K),k.update()}function m(e){}function g(e){e.deltaY<0?l(i()):e.deltaY>0&&s(i()),k.update()}function v(e){switch(e.keyCode){case k.keys.UP:re(0,k.keyPanSpeed),k.update();break;case k.keys.BOTTOM:re(0,-k.keyPanSpeed),k.update();break;case k.keys.LEFT:re(k.keyPanSpeed,0),k.update();break;case k.keys.RIGHT:re(-k.keyPanSpeed,0),k.update()}}function y(e){q.set(e.touches[0].pageX,e.touches[0].pageY)}function b(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);Q.set(0,r)}function _(e){Z.set(e.touches[0].pageX,e.touches[0].pageY)}function w(e){X.set(e.touches[0].pageX,e.touches[0].pageY),Y.subVectors(X,q);var t=k.domElement===document?k.domElement.body:k.domElement;o(2*Math.PI*Y.x/t.clientWidth*k.rotateSpeed),a(2*Math.PI*Y.y/t.clientHeight*k.rotateSpeed),q.copy(X),k.update()}function x(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);$.set(0,r),ee.subVectors($,Q),ee.y>0?l(i()):ee.y<0&&s(i()),Q.copy($),k.update()}function E(e){K.set(e.touches[0].pageX,e.touches[0].pageY),J.subVectors(K,Z),re(J.x,J.y),Z.copy(K),k.update()}function S(e){}function M(e){if(!1!==k.enabled){if(e.preventDefault(),e.button===k.mouseButtons.ORBIT){if(!1===k.enableRotate)return;u(e),F=U.ROTATE}else if(e.button===k.mouseButtons.ZOOM){if(!1===k.enableZoom)return;c(e),F=U.DOLLY}else if(e.button===k.mouseButtons.PAN){if(!1===k.enablePan)return;d(e),F=U.PAN}F!==U.NONE&&(document.addEventListener("mousemove",T,!1),document.addEventListener("mouseup",C,!1),k.dispatchEvent(D))}}function T(e){if(!1!==k.enabled)if(e.preventDefault(),F===U.ROTATE){if(!1===k.enableRotate)return;h(e)}else if(F===U.DOLLY){if(!1===k.enableZoom)return;f(e)}else if(F===U.PAN){if(!1===k.enablePan)return;p(e)}}function C(e){!1!==k.enabled&&(m(e),document.removeEventListener("mousemove",T,!1),document.removeEventListener("mouseup",C,!1),k.dispatchEvent(j),F=U.NONE)}function O(e){!1===k.enabled||!1===k.enableZoom||F!==U.NONE&&F!==U.ROTATE||(e.preventDefault(),e.stopPropagation(),g(e),k.dispatchEvent(D),k.dispatchEvent(j))}function P(e){!1!==k.enabled&&!1!==k.enableKeys&&!1!==k.enablePan&&v(e)}function A(e){if(!1!==k.enabled){switch(e.touches.length){case 1:if(!1===k.enableRotate)return;y(e),F=U.TOUCH_ROTATE;break;case 2:if(!1===k.enableZoom)return;b(e),F=U.TOUCH_DOLLY;break;case 3:if(!1===k.enablePan)return;_(e),F=U.TOUCH_PAN;break;default:F=U.NONE}F!==U.NONE&&k.dispatchEvent(D)}}function R(e){if(!1!==k.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(!1===k.enableRotate)return;if(F!==U.TOUCH_ROTATE)return;w(e);break;case 2:if(!1===k.enableZoom)return;if(F!==U.TOUCH_DOLLY)return;x(e);break;case 3:if(!1===k.enablePan)return;if(F!==U.TOUCH_PAN)return;E(e);break;default:F=U.NONE}}function L(e){!1!==k.enabled&&(S(e),k.dispatchEvent(j),F=U.NONE)}function I(e){e.preventDefault()}this.object=t,this.domElement=void 0!==n?n:document,this.enabled=!0,this.target=new e.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:e.MOUSE.LEFT,ZOOM:e.MOUSE.MIDDLE,PAN:e.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return z.phi},this.getAzimuthalAngle=function(){return z.theta},this.reset=function(){k.target.copy(k.target0),k.object.position.copy(k.position0),k.object.zoom=k.zoom0,k.object.updateProjectionMatrix(),k.dispatchEvent(N),k.update(),F=U.NONE},this.update=function(){var n=new e.Vector3,i=(new e.Quaternion).setFromUnitVectors(t.up,new e.Vector3(0,1,0)),a=i.clone().inverse(),s=new e.Vector3,l=new e.Quaternion;return function(){var e=k.object.position;return n.copy(e).sub(k.target),n.applyQuaternion(i),z.setFromVector3(n),k.autoRotate&&F===U.NONE&&o(r()),z.theta+=H.theta,z.phi+=H.phi,z.theta=Math.max(k.minAzimuthAngle,Math.min(k.maxAzimuthAngle,z.theta)),z.phi=Math.max(k.minPolarAngle,Math.min(k.maxPolarAngle,z.phi)),z.makeSafe(),z.radius*=V,z.radius=Math.max(k.minDistance,Math.min(k.maxDistance,z.radius)),k.target.add(G),n.setFromSpherical(z),n.applyQuaternion(a),e.copy(k.target).add(n),k.object.lookAt(k.target),!0===k.enableDamping?(H.theta*=1-k.dampingFactor,H.phi*=1-k.dampingFactor):H.set(0,0,0),V=1,G.set(0,0,0),!!(W||s.distanceToSquared(k.object.position)>B||8*(1-l.dot(k.object.quaternion))>B)&&(k.dispatchEvent(N),s.copy(k.object.position),l.copy(k.object.quaternion),W=!1,!0)}}(),this.dispose=function(){k.domElement.removeEventListener("contextmenu",I,!1),k.domElement.removeEventListener("mousedown",M,!1),k.domElement.removeEventListener("wheel",O,!1),k.domElement.removeEventListener("touchstart",A,!1),k.domElement.removeEventListener("touchend",L,!1),k.domElement.removeEventListener("touchmove",R,!1),document.removeEventListener("mousemove",T,!1),document.removeEventListener("mouseup",C,!1),window.removeEventListener("keydown",P,!1)};var k=this,N={type:"change"},D={type:"start"},j={type:"end"},U={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},F=U.NONE,B=1e-6,z=new e.Spherical,H=new e.Spherical,V=1,G=new e.Vector3,W=!1,q=new e.Vector2,X=new e.Vector2,Y=new e.Vector2,Z=new e.Vector2,K=new e.Vector2,J=new e.Vector2,Q=new e.Vector2,$=new e.Vector2,ee=new e.Vector2,te=function(){var t=new e.Vector3;return function(e,n){t.setFromMatrixColumn(n,0),t.multiplyScalar(-e),G.add(t)}}(),ne=function(){var t=new e.Vector3;return function(e,n){t.setFromMatrixColumn(n,1),t.multiplyScalar(e),G.add(t)}}(),re=function(){var t=new e.Vector3;return function(n,r){var i=k.domElement===document?k.domElement.body:k.domElement;if(k.object instanceof e.PerspectiveCamera){var o=k.object.position;t.copy(o).sub(k.target);var a=t.length();a*=Math.tan(k.object.fov/2*Math.PI/180),te(2*n*a/i.clientHeight,k.object.matrix),ne(2*r*a/i.clientHeight,k.object.matrix)}else k.object instanceof e.OrthographicCamera?(te(n*(k.object.right-k.object.left)/k.object.zoom/i.clientWidth,k.object.matrix),ne(r*(k.object.top-k.object.bottom)/k.object.zoom/i.clientHeight,k.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),k.enablePan=!1)}}();k.domElement.addEventListener("contextmenu",I,!1),k.domElement.addEventListener("mousedown",M,!1),k.domElement.addEventListener("wheel",O,!1),k.domElement.addEventListener("touchstart",A,!1),k.domElement.addEventListener("touchend",L,!1),k.domElement.addEventListener("touchmove",R,!1),window.addEventListener("keydown",P,!1),this.update()}return t.prototype=Object.create(e.EventDispatcher.prototype),t.prototype.constructor=t,Object.defineProperties(t.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(e){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}}),t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),d=n(55),h=n(35),f=n(56),p=n(112),m=r(p),g=n(19),v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={twoDCoordinates:{x:-1e3,y:0}},n.hotspotSettings=d.areaHotspotsSettings[n.props.areaName],n.handleClick=n.handleClick.bind(n),n}return a(t,e),l(t,[{key:"positionHotspot",value:function(){this.props.shipHasLoaded&&void 0!==this.hotspotSettings&&this.setState({twoDCoordinates:this.props.getTwoDCoordinatesFromThreeD(this.hotspotSettings.coordinates)})}},{key:"handleClick",value:function(){this.props.moveCameraToPosition(this.hotspotSettings.cameraCoordinates),this.props.setActiveAreaId(this.props.areaId),this.props.setCategoriesListVisibility(!0)}},{key:"render",value:function(){var e={},t="hotspot js-hotspot";e.transform="translate("+this.state.twoDCoordinates.x+"px, "+this.state.twoDCoordinates.y+"px)",e.display="block",this.props.activeAreaId===this.props.areaId?t+=" hotspot--active":0!==this.props.activeAreaId.length&&(e.opacity=0,e.visibility="hidden");var n=(0,g.capitalizeFirstLetter)(this.props.ship),r=""+this.props.areaName+n;return c.default.createElement(m.default,{hotspotClasses:t,id:r,style:e,onClick:this.handleClick,labelText:this.props.hotspotLabelText})}}]),t}(u.Component);t.default=c.default.forwardRef(function(e,t){return c.default.createElement(f.GlobalContext.Consumer,null,function(n){return c.default.createElement(h.ShipContext.Consumer,null,function(r){return c.default.createElement(v,s({setActiveAreaId:r.setActiveAreaId,activeAreaId:r.activeAreaId,ship:r.shipType,setCategoriesListVisibility:n.setCategoriesListVisibility,ref:t},e))})})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(h.ShipContext.Consumer,null,function(t){return d.default.createElement(f.GlobalContext.Consumer,null,function(n){return d.default.createElement(v,l({setActiveAreaId:t.setActiveAreaId,activeAreaId:t.activeAreaId,ship:t.shipType,setCategoriesListVisibility:n.setCategoriesListVisibility},e))})})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(35),f=n(56),p=n(112),m=r(p),g=n(19),v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleClick=n.handleClick.bind(n),n}return a(t,e),u(t,[{key:"handleClick",value:function(){this.props.setActiveAreaId(this.props.areaId),this.props.setCategoriesListVisibility(!0)}},{key:"render",value:function(){var e={},t="hotspot js-hotspot";this.props.activeAreaId===this.props.areaId?t+=" hotspot--active":0!==this.props.activeAreaId.length&&(e.opacity=0,e.visibility="hidden");var n=(0,g.capitalizeFirstLetter)(this.props.ship),r=""+this.props.areaName+n;return d.default.createElement(m.default,{hotspotClasses:t,id:r,style:e,onClick:this.handleClick,labelText:this.props.hotspotLabelText})}}]),t}(c.Component);t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(p.GlobalContext.Consumer,null,function(t){return d.default.createElement(f.ShipContext.Consumer,null,function(n){return d.default.createElement(v,l({activeAreaId:n.activeAreaId,resetActiveAreas:n.resetActiveAreas,setCategoriesListVisibility:t.setCategoriesListVisibility},e))})})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(465),f=n(35),p=n(56),m=n(483),g=r(m),v=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={shouldScroll:!1,containerHeight:0,containerWidth:0},n.containerRef=d.default.createRef(),n.contentContainerRef=d.default.createRef(),n.checkIfShouldAddScroll=n.checkIfShouldAddScroll.bind(n),n.handleCloseBtnClick=n.handleCloseBtnClick.bind(n),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){this.bindEventListeners(),this.checkIfShouldAddScroll()}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"bindEventListeners",value:function(){window.addEventListener("resize",this.checkIfShouldAddScroll,!1)}},{key:"unbindEventListeners",value:function(){window.removeEventListener("resize",this.checkIfShouldAddScroll,!1)}},{key:"checkIfShouldAddScroll",value:function(){var e=document.getElementById("shipsViewerRoot").clientHeight,t=e-64,n=this.contentContainerRef.current.scrollHeight,r=this.containerRef.current.clientHeight,i=this.containerRef.current.clientWidth;n>=t&&r>0?this.setState({shouldScroll:!0,containerHeight:r,containerWidth:i}):this.setState({shouldScroll:!1})}},{key:"handleCloseBtnClick",value:function(){this.props.resetActiveAreas(),this.props.setCategoriesListVisibility(!1),this.props.moveCameraToInitialPosition&&this.props.moveCameraToInitialPosition()}},{key:"renderContent",value:function(){var e=this.props,t=e.areaDisplayName,n=e.areaSubcategories,r=e.activeAreaId,i=e.areaId,o=d.default.createElement("div",{className:"area-categories__inner",ref:this.contentContainerRef},d.default.createElement("h2",{className:"area-categories__heading"},t),d.default.createElement(g.default,{subcategories:n,isAreaActive:r===i,checkIfShouldAddScroll:this.checkIfShouldAddScroll,contentContainerRef:this.contentContainerRef.current}));return this.state.shouldScroll?d.default.createElement(h.Scrollbars,{style:{height:this.state.containerHeight,width:this.state.containerWidth}},o):o}},{key:"render",value:function(){var e=void 0;return this.props.activeAreaId===this.props.areaId&&(e={opacity:1,visibility:"visible"}),d.default.createElement("div",{className:"area-categories",style:e,ref:this.containerRef},d.default.createElement("button",{className:"close-btn",onClick:this.handleCloseBtnClick}),this.renderContent())}}]),t}(c.Component);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scrollbars=void 0;var r=n(466),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default,t.Scrollbars=i.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(467),d=r(c),h=n(162),f=r(h),p=n(1),m=n(32),g=r(m),v=n(476),y=r(v),b=n(477),_=r(b),w=n(478),x=r(w),E=n(479),S=r(E),M=n(480),T=r(M),C=n(481),O=n(482),P=function(e){function t(e){var n;o(this,t);for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];var l=a(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this,e].concat(i)));return l.getScrollLeft=l.getScrollLeft.bind(l),l.getScrollTop=l.getScrollTop.bind(l),l.getScrollWidth=l.getScrollWidth.bind(l),l.getScrollHeight=l.getScrollHeight.bind(l),l.getClientWidth=l.getClientWidth.bind(l),l.getClientHeight=l.getClientHeight.bind(l),l.getValues=l.getValues.bind(l),l.getThumbHorizontalWidth=l.getThumbHorizontalWidth.bind(l),l.getThumbVerticalHeight=l.getThumbVerticalHeight.bind(l),l.getScrollLeftForOffset=l.getScrollLeftForOffset.bind(l),l.getScrollTopForOffset=l.getScrollTopForOffset.bind(l),l.scrollLeft=l.scrollLeft.bind(l),l.scrollTop=l.scrollTop.bind(l),l.scrollToLeft=l.scrollToLeft.bind(l),l.scrollToTop=l.scrollToTop.bind(l),l.scrollToRight=l.scrollToRight.bind(l),l.scrollToBottom=l.scrollToBottom.bind(l),l.handleTrackMouseEnter=l.handleTrackMouseEnter.bind(l),l.handleTrackMouseLeave=l.handleTrackMouseLeave.bind(l),l.handleHorizontalTrackMouseDown=l.handleHorizontalTrackMouseDown.bind(l),l.handleVerticalTrackMouseDown=l.handleVerticalTrackMouseDown.bind(l),l.handleHorizontalThumbMouseDown=l.handleHorizontalThumbMouseDown.bind(l),l.handleVerticalThumbMouseDown=l.handleVerticalThumbMouseDown.bind(l),l.handleWindowResize=l.handleWindowResize.bind(l),l.handleScroll=l.handleScroll.bind(l),l.handleDrag=l.handleDrag.bind(l),l.handleDragEnd=l.handleDragEnd.bind(l),l.state={didMountUniversal:!1},l}return s(t,e),u(t,[{key:"componentDidMount",value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:"componentDidMountUniversal",value:function(){this.props.universal&&this.setState({didMountUniversal:!0})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),(0,c.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:"getScrollLeft",value:function(){return this.view?this.view.scrollLeft:0}},{key:"getScrollTop",value:function(){return this.view?this.view.scrollTop:0}},{key:"getScrollWidth",value:function(){return this.view?this.view.scrollWidth:0}},{key:"getScrollHeight",value:function(){return this.view?this.view.scrollHeight:0}},{key:"getClientWidth",value:function(){return this.view?this.view.clientWidth:0}},{key:"getClientHeight",value:function(){return this.view?this.view.clientHeight:0}},{key:"getValues",value:function(){var e=this.view||{},t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,i=void 0===r?0:r,o=e.scrollWidth,a=void 0===o?0:o,s=e.scrollHeight,l=void 0===s?0:s,u=e.clientWidth,c=void 0===u?0:u,d=e.clientHeight,h=void 0===d?0:d;return{left:n/(a-c)||0,top:i/(l-h)||0,scrollLeft:n,scrollTop:i,scrollWidth:a,scrollHeight:l,clientWidth:c,clientHeight:h}}},{key:"getThumbHorizontalWidth",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollWidth,o=r.clientWidth,a=(0,S.default)(this.trackHorizontal),s=Math.ceil(o/i*a);return a===s?0:t||Math.max(s,n)}},{key:"getThumbVerticalHeight",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollHeight,o=r.clientHeight,a=(0,T.default)(this.trackVertical),s=Math.ceil(o/i*a);return a===s?0:t||Math.max(s,n)}},{key:"getScrollLeftForOffset",value:function(e){var t=this.view,n=t.scrollWidth,r=t.clientWidth;return e/((0,S.default)(this.trackHorizontal)-this.getThumbHorizontalWidth())*(n-r)}},{key:"getScrollTopForOffset",value:function(e){var t=this.view,n=t.scrollHeight,r=t.clientHeight;return e/((0,T.default)(this.trackVertical)-this.getThumbVerticalHeight())*(n-r)}},{key:"scrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.addEventListener("scroll",this.handleScroll),(0,_.default)()&&(t.addEventListener("mouseenter",this.handleTrackMouseEnter),t.addEventListener("mouseleave",this.handleTrackMouseLeave),t.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),r.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.removeEventListener("scroll",this.handleScroll),(0,_.default)()&&(t.removeEventListener("mouseenter",this.handleTrackMouseEnter),t.removeEventListener("mouseleave",this.handleTrackMouseLeave),t.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),r.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,n=this.props,r=n.onScroll,i=n.onScrollFrame;r&&r(e),this.update(function(e){var n=e.scrollLeft,r=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=r,i&&i(e)}),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleScrollStop",value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleWindowResize",value:function(){this.update()}},{key:"handleHorizontalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientX,r=t.getBoundingClientRect(),i=r.left,o=this.getThumbHorizontalWidth(),a=Math.abs(i-n)-o/2;this.view.scrollLeft=this.getScrollLeftForOffset(a)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientY,r=t.getBoundingClientRect(),i=r.top,o=this.getThumbVerticalHeight(),a=Math.abs(i-n)-o/2;this.view.scrollTop=this.getScrollTopForOffset(a)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,r=t.offsetWidth,i=t.getBoundingClientRect(),o=i.left;this.prevPageX=r-(n-o)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,r=t.offsetHeight,i=t.getBoundingClientRect(),o=i.top;this.prevPageY=r-(n-o)}},{key:"setupDragging",value:function(){(0,f.default)(document.body,C.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=x.default}},{key:"teardownDragging",value:function(){(0,f.default)(document.body,C.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(e){if(this.prevPageX){var t=e.clientX,n=this.trackHorizontal.getBoundingClientRect(),r=n.left,i=this.getThumbHorizontalWidth(),o=i-this.prevPageX,a=-r+t-o;this.view.scrollLeft=this.getScrollLeftForOffset(a)}if(this.prevPageY){var s=e.clientY,l=this.trackVertical.getBoundingClientRect(),u=l.top,c=this.getThumbVerticalHeight(),d=c-this.prevPageY,h=-u+s-d;this.view.scrollTop=this.getScrollTopForOffset(h)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,f.default)(this.trackHorizontal,{opacity:1}),(0,f.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,f.default)(e.trackHorizontal,{opacity:0}),(0,f.default)(e.trackVertical,{opacity:0})},t)}}},{key:"detectScrolling",value:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop},100))}},{key:"raf",value:function(e){var t=this;this.requestFrame&&d.default.cancel(this.requestFrame),this.requestFrame=(0,d.default)(function(){t.requestFrame=void 0,e()})}},{key:"update",value:function(e){var t=this;this.raf(function(){return t._update(e)})}},{key:"_update",value:function(e){var t=this.props,n=t.onUpdate,r=t.hideTracksWhenNotNeeded,i=this.getValues();if((0,_.default)()){var o=i.scrollLeft,a=i.clientWidth,s=i.scrollWidth,l=(0,S.default)(this.trackHorizontal),u=this.getThumbHorizontalWidth(),c=o/(s-a)*(l-u),d={width:u,transform:"translateX("+c+"px)"},h=i.scrollTop,p=i.clientHeight,m=i.scrollHeight,g=(0,T.default)(this.trackVertical),v=this.getThumbVerticalHeight(),y=h/(m-p)*(g-v),b={height:v,transform:"translateY("+y+"px)"};if(r){var w={visibility:s>a?"visible":"hidden"},x={visibility:m>p?"visible":"hidden"};(0,f.default)(this.trackHorizontal,w),(0,f.default)(this.trackVertical,x)}(0,f.default)(this.thumbHorizontal,d),(0,f.default)(this.thumbVertical,b)}n&&n(i),"function"==typeof e&&e(i)}},{key:"render",value:function(){var e=this,t=(0,_.default)(),n=this.props,r=(n.onScroll,n.onScrollFrame,n.onScrollStart,n.onScrollStop,n.onUpdate,n.renderView),o=n.renderTrackHorizontal,a=n.renderTrackVertical,s=n.renderThumbHorizontal,u=n.renderThumbVertical,c=n.tagName,d=(n.hideTracksWhenNotNeeded,n.autoHide),h=(n.autoHideTimeout,n.autoHideDuration),f=(n.thumbSize,n.thumbMinSize,n.universal),m=n.autoHeight,g=n.autoHeightMin,v=n.autoHeightMax,b=n.style,w=n.children,x=i(n,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),E=this.state.didMountUniversal,S=l({},C.containerStyleDefault,m&&l({},C.containerStyleAutoHeight,{minHeight:g,maxHeight:v}),b),M=l({},C.viewStyleDefault,{marginRight:t?-t:0,marginBottom:t?-t:0},m&&l({},C.viewStyleAutoHeight,{minHeight:(0,y.default)(g)?"calc("+g+" + "+t+"px)":g+t,maxHeight:(0,y.default)(v)?"calc("+v+" + "+t+"px)":v+t}),m&&f&&!E&&{minHeight:g,maxHeight:v},f&&!E&&C.viewStyleUniversalInitial),T={transition:"opacity "+h+"ms",opacity:0},O=l({},C.trackHorizontalStyleDefault,d&&T,(!t||f&&!E)&&{display:"none"}),P=l({},C.trackVerticalStyleDefault,d&&T,(!t||f&&!E)&&{display:"none"});return(0,p.createElement)(c,l({},x,{style:S,ref:function(t){e.container=t}}),[(0,p.cloneElement)(r({style:M}),{key:"view",ref:function(t){e.view=t}},w),(0,p.cloneElement)(o({style:O}),{key:"trackHorizontal",ref:function(t){e.trackHorizontal=t}},(0,p.cloneElement)(s({style:C.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,p.cloneElement)(a({style:P}),{key:"trackVertical",ref:function(t){e.trackVertical=t}},(0,p.cloneElement)(u({style:C.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),t}(p.Component);t.default=P,P.propTypes={onScroll:g.default.func,onScrollFrame:g.default.func,onScrollStart:g.default.func,onScrollStop:g.default.func,onUpdate:g.default.func,renderView:g.default.func,renderTrackHorizontal:g.default.func,renderTrackVertical:g.default.func,renderThumbHorizontal:g.default.func,renderThumbVertical:g.default.func,tagName:g.default.string,thumbSize:g.default.number,thumbMinSize:g.default.number,hideTracksWhenNotNeeded:g.default.bool,autoHide:g.default.bool,autoHideTimeout:g.default.number,autoHideDuration:g.default.number,autoHeight:g.default.bool,autoHeightMin:g.default.oneOfType([g.default.number,g.default.string]),autoHeightMax:g.default.oneOfType([g.default.number,g.default.string]),universal:g.default.bool,style:g.default.object,children:g.default.node},P.defaultProps={renderView:O.renderViewDefault,renderTrackHorizontal:O.renderTrackHorizontalDefault,renderTrackVertical:O.renderTrackVerticalDefault,renderThumbHorizontal:O.renderThumbHorizontalDefault,renderThumbVertical:O.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}},function(e,t,n){(function(t){for(var r=n(468),i="undefined"==typeof window?t:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],l=i["cancel"+a]||i["cancelRequest"+a],u=0;!s&&u<o.length;u++)s=i[o[u]+"Request"+a],l=i[o[u]+"Cancel"+a]||i[o[u]+"CancelRequest"+a];if(!s||!l){var c=0,d=0,h=[];s=function(e){if(0===h.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout(function(){var e=h.slice(0);h.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return h.push({handle:++d,callback:e,cancelled:!1}),d},l=function(e){for(var t=0;t<h.length;t++)h[t].handle===e&&(h[t].cancelled=!0)}}e.exports=function(e){return s.call(i,e)},e.exports.cancel=function(){l.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=l}}).call(t,n(39))},function(e,t,n){(function(t){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,n=function(){var e;return e=r(),1e9*e[0]+e[1]},o=n(),s=1e9*t.uptime(),a=o-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(t,n(111))},function(e,t){var n=null,r=["Webkit","Moz","O","ms"];e.exports=function(e){n||(n=document.createElement("div"));var t=n.style;if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),o=r.length;o>=0;o--){var a=r[o]+i;if(a in t)return a}return!1}},function(e,t,n){function r(e){return i(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}var i=n(471);e.exports=r},function(e,t,n){function r(e){return i(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""}).trim()}var i=n(472);e.exports=r},function(e,t){function n(e){return o.test(e)?e.toLowerCase():a.test(e)?(r(e)||e).toLowerCase():s.test(e)?i(e).toLowerCase():e.toLowerCase()}function r(e){return e.replace(l,function(e,t){return t?" "+t:""})}function i(e){return e.replace(u,function(e,t,n){return t+" "+n.toLowerCase().split("").join(" ")})}e.exports=n;var o=/\s/,a=/(_|-|\.|:)/,s=/([a-z][A-Z]|[A-Z][a-z])/,l=/[\W_]+(.|$)/g,u=/(.)([A-Z]+)/g},function(e,t){var n={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};e.exports=function(e,t){return"number"!=typeof t||n[e]?t:t+"px"}},function(e,t,n){"use strict";var r=n(108),i=n(107),o=n(475);e.exports=function(){function e(e,t,n,r,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e){return"string"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(){if(!1!==a)return a;if("undefined"!=typeof document){var e=document.createElement("div");(0,o.default)(e,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(e),a=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else a=0;return a||0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(162),o=function(e){return e&&e.__esModule?e:{default:e}}(i),a=!1},function(e,t,n){"use strict";function r(){return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){var t=e.clientWidth,n=getComputedStyle(e),r=n.paddingLeft,i=n.paddingRight;return t-parseFloat(r)-parseFloat(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){var t=e.clientHeight,n=getComputedStyle(e),r=n.paddingTop,i=n.paddingBottom;return t-parseFloat(r)-parseFloat(i)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},t.containerStyleAutoHeight={height:"auto"},t.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},t.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0},t.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0},t.trackHorizontalStyleDefault={position:"absolute",height:6},t.trackVerticalStyleDefault={position:"absolute",width:6},t.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"},t.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"},t.disableSelectStyle={userSelect:"none"},t.disableSelectStyleReset={userSelect:""}},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){return d.default.createElement("div",e)}function o(e){var t=e.style,n=r(e,["style"]),i=u({},t,{right:2,bottom:2,left:2,borderRadius:3});return d.default.createElement("div",u({style:i},n))}function a(e){var t=e.style,n=r(e,["style"]),i=u({},t,{right:2,bottom:2,top:2,borderRadius:3});return d.default.createElement("div",u({style:i},n))}function s(e){var t=e.style,n=r(e,["style"]),i=u({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return d.default.createElement("div",u({style:i},n))}function l(e){var t=e.style,n=r(e,["style"]),i=u({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return d.default.createElement("div",u({style:i},n))}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.renderViewDefault=i,t.renderTrackHorizontalDefault=o,t.renderTrackVerticalDefault=a,t.renderThumbHorizontalDefault=s,t.renderThumbVerticalDefault=l;var c=n(1),d=function(e){return e&&e.__esModule?e:{default:e}}(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){function t(e){return e.subareas.length>0?n(e):r(e)}function n(t){return a.default.createElement(l.default,{key:t.id,subcategory:t,constructSingleItem:r,isAreaActive:e.isAreaActive,checkIfShouldAddScroll:e.checkIfShouldAddScroll,contentContainerRef:e.contentContainerRef})}function r(e){return a.default.createElement(c.default,{key:e.id,subcategory:e})}var i=e.subcategories;return void 0===i?null:a.default.createElement("ul",{className:"area-categories__list"},i.map(function(e){return t(e)}))}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o),s=n(484),l=r(s),u=n(485),c=r(u);t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(p.ShipContext.Consumer,null,function(t){return d.default.createElement(m,l({setActiveSubareaId:t.setActiveSubareaId,activeSubareaId:t.activeSubareaId},e))})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(31),f=r(h),p=n(35),m=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isListOpen:!1},n.listItemRef=d.default.createRef(),n.handleBtnClick=n.handleBtnClick.bind(n),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props.subcategory.id===this.props.activeSubareaId;this.setState({isListOpen:e})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.isAreaActive,i=n.activeSubareaId,o=n.subcategory,a=n.checkIfShouldAddScroll;if(i!==e.activeSubareaId){var s=o.id===i;this.setState({isListOpen:s})}r!==e.isAreaActive&&this.setState({isListOpen:!1}),this.state.isListOpen!==t.isListOpen&&a()}},{key:"handleBtnClick",value:function(){var e=this.props,t=e.subcategory,n=e.activeSubareaId,r=e.setActiveSubareaId,i=e.checkIfShouldAddScroll;this.setState(function(e){return{isListOpen:!e.isListOpen}}),r(t.id===n?"":t.id),i()}},{key:"scrollElementIntoView",value:function(){var e=this.listItemRef.current,t=e.offsetTop,n=e.parentNode.offsetTop,r=this.props.contentContainerRef.parentNode;r&&"scroll"===r.style.overflow&&(r.scrollTop=t-n)}},{key:"render",value:function(){var e=this,t=(0,f.default)("area-categories__sublist",{"area-categories__sublist--open":this.state.isListOpen}),n=(0,f.default)("area-categories__dropdown-btn",{"area-categories__dropdown-btn--open":this.state.isListOpen});return this.state.isListOpen&&this.scrollElementIntoView(),d.default.createElement("li",{className:"area-categories__item area-categories__item--has-sublist",ref:this.listItemRef},d.default.createElement("button",{className:n,type:"button",onClick:this.handleBtnClick},this.props.subcategory.displayName),d.default.createElement("ul",{className:t},this.props.subcategory.subareas.map(function(t){return e.props.constructSingleItem(t)})))}}]),t}(c.Component);t.default=s},function(e,t,n){"use strict";function r(e){return o.default.createElement("li",{className:"area-categories__item"},o.default.createElement("a",{className:"listLink",href:e.subcategory.categoryUrl,target:"_blank"},e.subcategory.displayName))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(h.ShipContext.Consumer,null,function(t){return d.default.createElement(m,l({activeAreaId:t.activeAreaId},e))})}Object.defineProperty(t,"__esModule",{value:!0}),t.CloseupArea=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(35),f=n(487),p=r(f),m=t.CloseupArea=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isHoveringOverOtherHotspots:!1},n.mouseLeaveTimeoutId=0,n.handleMouseEnterOnHotspot=n.handleMouseEnterOnHotspot.bind(n),n.handleMouseLeaveFromHotspot=n.handleMouseLeaveFromHotspot.bind(n),n}return a(t,e),u(t,[{key:"handleMouseEnterOnHotspot",value:function(){clearTimeout(this.mouseLeaveTimeoutId),this.setState({isHoveringOverOtherHotspots:!0})}},{key:"handleMouseLeaveFromHotspot",value:function(e){var t=this;if(e)this.setState({isHoveringOverOtherHotspots:!1});else{this.mouseLeaveTimeoutId=setTimeout(function(){t.setState({isHoveringOverOtherHotspots:!1})},700)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.engineRoomImgUrl,r=t.closeupAreaSubareas,i=t.activeAreaId,o=t.areaId,a=r.map(function(t){return d.default.createElement(p.default,{key:t.id,areaName:t.name,areaId:t.id,hotspotLabelText:t.displayName,isHoveringOverOtherHotspots:e.state.isHoveringOverOtherHotspots,handleMouseEnterOnHotspot:e.handleMouseEnterOnHotspot,handleMouseLeaveFromHotspot:e.handleMouseLeaveFromHotspot})}),s=void 0;return s=i===o?{opacity:1,visibility:"visible",pointerEvents:"auto"}:{pointerEvents:"none"},d.default.createElement("div",{className:"ships-viewer__interior js-ship-interior",style:s},d.default.createElement("img",{src:n}),a)}}]),t}(c.Component);t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(p.ShipContext.Consumer,null,function(t){return d.default.createElement(y,l({handleHotspotClick:t.setActiveSubareaId,activeSubareaId:t.activeSubareaId,ship:t.shipType},e))})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(31),f=r(h),p=n(35),m=n(112),g=r(m),v=n(19),y=function(e){function t(e){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.areaId,n=e.activeSubareaId,r=e.ship,i=e.areaName,o=e.hotspotLabelText,a=e.isHoveringOverOtherHotspots,s=e.handleHotspotClick,l=e.handleMouseEnterOnHotspot,u=e.handleMouseLeaveFromHotspot,c=(0,f.default)("hotspot hotspot--ship-interior js-hotspot",{"hotspot--active":t===n&&!a}),h=(0,v.capitalizeFirstLetter)(r),p=""+i+h;return d.default.createElement(g.default,{hotspotClasses:c,id:p,style:{},onClick:function(){return s(t)},onMouseEnter:l,onMouseLeave:function(){return u(t===n)},labelText:o})}}]),t}(c.Component);t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return d.default.createElement(h.ShipContextProvider,null,d.default.createElement(h.ShipContext.Consumer,null,function(t){return d.default.createElement(m,l({setShipType:t.setShipType},e))}))}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(35),f=n(161),p=r(f),m=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.props.setShipType(n.props.ship),n}return a(t,e),u(t,[{key:"render",value:function(){var e=this,t=this.props.applicationAreas.map(function(t){return d.default.createElement(p.default,{threeDShip:!1,key:t.name,area:t,engineRoomImgUrl:e.props.shipAssets.engineRoomUrl})}),n={};return n.opacity=this.props.activeShip===this.props.ship?"1":"0",n.pointerEvents=this.props.activeShip===this.props.ship?"auto":"none",d.default.createElement("div",{className:"ships-viewer__container",style:n},d.default.createElement("img",{className:"ships-viewer__ship-image",src:this.props.shipAssets.imageUrl,alt:""}),t)}}]),t}(c.Component);t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=(0,p.default)("ships-viewer__choose-ship-panel__btn",{"ships-viewer__choose-ship-panel__btn--active":e.isActive,"ships-viewer__choose-ship-panel__btn--3d":e.ship===m.ships.bulk});return h.default.createElement("div",{className:"ships-viewer__choose-ship-panel__btn-container"},h.default.createElement("button",{className:t,type:"button",onClick:function(){return e.onClick(e.ship)}},h.default.createElement("img",{src:e.iconUrl,alt:""})),h.default.createElement("span",{className:"ships-viewer__choose-ship-panel__label"},e.buttonLabel))}function l(e){return h.default.createElement(g.GlobalContext.Consumer,null,function(t){return h.default.createElement(v,u({isCategoriesListVisible:t.isCategoriesListVisible},e))})}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),h=r(d),f=n(31),p=r(f),m=n(55),g=n(56),v=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),c(t,[{key:"render",value:function(){var e=this,t=Object.keys(m.ships).map(function(t){var n=m.ships[t];return e.props.errorsInData[n]||""==e.props.shipsAssets[n].iconUrl?null:h.default.createElement(s,{key:n,isActive:e.props.activeShip===n,ship:n,buttonLabel:e.props.shipsAssets[n].iconName,onClick:e.props.handleClick,iconUrl:e.props.shipsAssets[n].iconUrl})}),n={};return this.props.isCategoriesListVisible&&(n.visibility="hidden"),h.default.createElement("div",{style:n,className:"ships-viewer__choose-ship-panel"},t)}}]),t}(d.Component);t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(24),d=r(c),h=n(60),f=r(h),p=n(491),m=r(p),g=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.apiRootUrl="/api/product/autocomplete",n.apiInterface={categoryName:"CategoryName",productName:"Name",externalUrl:"ExternalUrl"},n.dataAttributes=document.getElementById(n.props.dataAttributeOwnerId).dataset,n.selectElement=document.getElementById(n.props.categorySelectElementId),n.minCharacters=n.props.minCharacters,n.state={searchTerm:n.dataAttributes.value,resultList:[]},n.handleSearchTermChange=n.handleSearchTermChange.bind(n),n.handleSelect=n.handleSelect.bind(n),n.clearData=n.clearData.bind(n),n.fetchData=n.fetchData.bind(n),n.categorizeResults=n.categorizeResults.bind(n),n}return a(t,e),s(t,[{key:"clearData",value:function(){this.setState({resultList:[]})}},{key:"fetchData",value:function(e){var t=this,n=this.selectElement.options[this.selectElement.selectedIndex].value;d.default.get(this.apiRootUrl,{params:{term:e,categoryId:n,mockResults:!1}}).catch(function(e){e.response?(console.log(e.response.data),console.log(e.response.status),console.log(e.response.headers)):e.request?console.log(e.request):console.log("Error",e.message),console.log(e.config)}).then(function(e){t.setState({resultList:t.categorizeResults(e.data.Items)})})}},{key:"categorizeResults",value:function(e){var t="",n=this.apiInterface;return e.reduce(function(e,r){return r[n.categoryName]!==t&&(e.push({header:r[n.categoryName]}),t=r[n.categoryName]),e.push({id:(0,f.default)(),name:r[n.productName],url:r[n.externalUrl]}),e},[])}},{key:"handleSearchTermChange",value:function(e,t){this.setState({searchTerm:t}),""!==t&&t.length>=this.minCharacters?this.fetchData(t):this.clearData()}},{key:"handleSelect",value:function(e){this.setState({searchTerm:e,resultList:[]})}},{key:"render",value:function(){return u.default.createElement(m.default,{inputProps:{id:this.dataAttributes.id,className:this.dataAttributes.class,type:this.dataAttributes.type,name:this.dataAttributes.name,value:this.dataAttributes.value,placeholder:this.dataAttributes.placeholder},wrapperStyle:{position:"relative",height:"100%"},value:this.state.searchTerm,items:this.state.resultList,getItemValue:function(e){return e.name},onSelect:this.handleSelect,onChange:this.handleSearchTermChange,renderMenu:function(e){return e.length>0?u.default.createElement("ul",{className:"ui-autocomplete"},e):u.default.createElement("span",null)},renderItem:function(e){return e.header?u.default.createElement("li",{className:"autocomplete-list-header",key:e.header},e.header):u.default.createElement("li",{className:"autocomplete-list-item",key:e.id},u.default.createElement("a",{href:e.url},e.name))},isItemSelectable:function(e){return!e.header},autoHighlight:!1})}}]),t}(l.Component);t.default=g},function(e,t,n){"use strict";(function(t){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(){return{x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=n(32),d=n(109),h=d.findDOMNode,f=n(492),p=["blur","checkValidity","click","focus","select","setCustomValidity","setSelectionRange","setRangeText"],m=function(e){function n(e){r(this,n);var t=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state={isOpen:!1,highlightedIndex:null},t._debugStates=[],t.ensureHighlightedIndex=t.ensureHighlightedIndex.bind(t),t.exposeAPI=t.exposeAPI.bind(t),t.handleInputFocus=t.handleInputFocus.bind(t),t.handleInputBlur=t.handleInputBlur.bind(t),t.handleChange=t.handleChange.bind(t),t.handleKeyDown=t.handleKeyDown.bind(t),t.handleInputClick=t.handleInputClick.bind(t),t.maybeAutoCompleteText=t.maybeAutoCompleteText.bind(t),t}return o(n,e),l(n,[{key:"componentWillMount",value:function(){this.refs={},this._ignoreBlur=!1,this._ignoreFocus=!1,this._scrollOffset=null,this._scrollTimer=null}},{key:"componentWillUnmount",value:function(){clearTimeout(this._scrollTimer),this._scrollTimer=null}},{key:"componentWillReceiveProps",value:function(e){null!==this.state.highlightedIndex&&this.setState(this.ensureHighlightedIndex),!e.autoHighlight||this.props.value===e.value&&null!==this.state.highlightedIndex||this.setState(this.maybeAutoCompleteText)}},{key:"componentDidMount",value:function(){this.isOpen()&&this.setMenuPositions()}},{key:"componentDidUpdate",value:function(e,t){(this.state.isOpen&&!t.isOpen||"open"in this.props&&this.props.open&&!e.open)&&this.setMenuPositions(),this.maybeScrollItemIntoView(),t.isOpen!==this.state.isOpen&&this.props.onMenuVisibilityChange(this.state.isOpen)}},{key:"exposeAPI",value:function(e){var t=this;this.refs.input=e,p.forEach(function(n){return t[n]=e&&e[n]&&e[n].bind(e)})}},{key:"maybeScrollItemIntoView",value:function(){if(this.isOpen()&&null!==this.state.highlightedIndex){var e=this.refs["item-"+this.state.highlightedIndex],t=this.refs.menu;f(h(e),h(t),{onlyScrollIfNeeded:!0})}}},{key:"handleKeyDown",value:function(e){n.keyDownHandlers[e.key]?n.keyDownHandlers[e.key].call(this,e):this.isOpen()||this.setState({isOpen:!0})}},{key:"handleChange",value:function(e){this.props.onChange(e,e.target.value)}},{key:"getFilteredItems",value:function(e){var t=e.items;return e.shouldItemRender&&(t=t.filter(function(t){return e.shouldItemRender(t,e.value)})),e.sortItems&&t.sort(function(t,n){return e.sortItems(t,n,e.value)}),t}},{key:"maybeAutoCompleteText",value:function(e,t){for(var n=e.highlightedIndex,r=t.value,i=t.getItemValue,o=null===n?0:n,a=this.getFilteredItems(t),s=0;s<a.length&&!t.isItemSelectable(a[o]);s++)o=(o+1)%a.length;var l=a[o]&&t.isItemSelectable(a[o])?a[o]:null;if(""!==r&&l){if(0===i(l).toLowerCase().indexOf(r.toLowerCase()))return{highlightedIndex:o}}return{highlightedIndex:null}}},{key:"ensureHighlightedIndex",value:function(e,t){if(e.highlightedIndex>=this.getFilteredItems(t).length)return{highlightedIndex:null}}},{key:"setMenuPositions",value:function(){var e=this.refs.input,n=e.getBoundingClientRect(),r=t.window.getComputedStyle(e),i=parseInt(r.marginBottom,10)||0,o=parseInt(r.marginLeft,10)||0,a=parseInt(r.marginRight,10)||0;this.setState({menuTop:n.bottom+i,menuLeft:n.left+o,menuWidth:n.width+o+a})}},{key:"highlightItemFromMouse",value:function(e){this.setState({highlightedIndex:e})}},{key:"selectItemFromMouse",value:function(e){var t=this,n=this.props.getItemValue(e);this.setIgnoreBlur(!1),this.setState({isOpen:!1,highlightedIndex:null},function(){t.props.onSelect(n,e)})}},{key:"setIgnoreBlur",value:function(e){this._ignoreBlur=e}},{key:"renderMenu",value:function(){var e=this,t=this.getFilteredItems(this.props).map(function(t,n){var r=e.props.renderItem(t,e.state.highlightedIndex===n,{cursor:"default"});return u.cloneElement(r,{onMouseEnter:e.props.isItemSelectable(t)?function(){return e.highlightItemFromMouse(n)}:null,onClick:e.props.isItemSelectable(t)?function(){return e.selectItemFromMouse(t)}:null,ref:function(t){return e.refs["item-"+n]=t}})}),n={left:this.state.menuLeft,top:this.state.menuTop,minWidth:this.state.menuWidth},r=this.props.renderMenu(t,this.props.value,n);return u.cloneElement(r,{ref:function(t){return e.refs.menu=t},onTouchStart:function(){return e.setIgnoreBlur(!0)},onMouseEnter:function(){return e.setIgnoreBlur(!0)},onMouseLeave:function(){return e.setIgnoreBlur(!1)}})}},{key:"handleInputBlur",value:function(e){var t=this;if(this._ignoreBlur)return this._ignoreFocus=!0,this._scrollOffset=a(),void this.refs.input.focus();var n=void 0,r=this.state.highlightedIndex;if(this.props.selectOnBlur&&null!==r){var i=this.getFilteredItems(this.props),o=i[r],s=this.props.getItemValue(o);n=function(){return t.props.onSelect(s,o)}}this.setState({isOpen:!1,highlightedIndex:null},n);var l=this.props.inputProps.onBlur;l&&l(e)}},{key:"handleInputFocus",value:function(e){var t=this;if(this._ignoreFocus){this._ignoreFocus=!1;var n=this._scrollOffset,r=n.x,i=n.y;return this._scrollOffset=null,window.scrollTo(r,i),clearTimeout(this._scrollTimer),void(this._scrollTimer=setTimeout(function(){t._scrollTimer=null,window.scrollTo(r,i)},0))}this.setState({isOpen:!0});var o=this.props.inputProps.onFocus;o&&o(e)}},{key:"isInputFocused",value:function(){var e=this.refs.input;return e.ownerDocument&&e===e.ownerDocument.activeElement}},{key:"handleInputClick",value:function(){this.isInputFocused()&&!this.isOpen()&&this.setState({isOpen:!0})}},{key:"composeEventHandlers",value:function(e,t){return t?function(n){e(n),t(n)}:e}},{key:"isOpen",value:function(){return"open"in this.props?this.props.open:this.state.isOpen}},{key:"render",value:function(){this.props.debug&&this._debugStates.push({id:this._debugStates.length,state:this.state});var e=this.props.inputProps,t=this.isOpen();return u.createElement("div",s({style:s({},this.props.wrapperStyle)},this.props.wrapperProps),this.props.renderInput(s({},e,{role:"combobox","aria-autocomplete":"list","aria-expanded":t,autoComplete:"off",ref:this.exposeAPI,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onChange:this.handleChange,onKeyDown:this.composeEventHandlers(this.handleKeyDown,e.onKeyDown),onClick:this.composeEventHandlers(this.handleInputClick,e.onClick),value:this.props.value})),t&&this.renderMenu(),this.props.debug&&u.createElement("pre",{style:{marginLeft:300}},JSON.stringify(this._debugStates.slice(Math.max(0,this._debugStates.length-5),this._debugStates.length),null,2)))}}]),n}(u.Component);m.propTypes={items:c.array.isRequired,value:c.any,onChange:c.func,onSelect:c.func,shouldItemRender:c.func,isItemSelectable:c.func,sortItems:c.func,getItemValue:c.func.isRequired,renderItem:c.func.isRequired,renderMenu:c.func,menuStyle:c.object,renderInput:c.func,inputProps:c.object,wrapperProps:c.object,wrapperStyle:c.object,autoHighlight:c.bool,selectOnBlur:c.bool,onMenuVisibilityChange:c.func,open:c.bool,debug:c.bool},m.defaultProps={value:"",wrapperProps:{},wrapperStyle:{display:"inline-block"},inputProps:{},renderInput:function(e){return u.createElement("input",e)},onChange:function(){},onSelect:function(){},isItemSelectable:function(){return!0},renderMenu:function(e,t,n){return u.createElement("div",{style:s({},n,this.menuStyle),children:e})},menuStyle:{borderRadius:"3px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",background:"rgba(255, 255, 255, 0.9)",padding:"2px 0",fontSize:"90%",position:"fixed",overflow:"auto",maxHeight:"50%"},autoHighlight:!0,selectOnBlur:!1,onMenuVisibilityChange:function(){}},m.keyDownHandlers={ArrowDown:function(e){e.preventDefault();var t=this.getFilteredItems(this.props);if(t.length){for(var n=this.state.highlightedIndex,r=null===n?-1:n,i=0;i<t.length;i++){var o=(r+i+1)%t.length;if(this.props.isItemSelectable(t[o])){r=o;break}}r>-1&&r!==n&&this.setState({highlightedIndex:r,isOpen:!0})}},ArrowUp:function(e){e.preventDefault();var t=this.getFilteredItems(this.props);if(t.length){for(var n=this.state.highlightedIndex,r=null===n?t.length:n,i=0;i<t.length;i++){var o=(r-(1+i)+t.length)%t.length;if(this.props.isItemSelectable(t[o])){r=o;break}}r!==t.length&&this.setState({highlightedIndex:r,isOpen:!0})}},Enter:function(e){var t=this;if(13===e.keyCode&&(this.setIgnoreBlur(!1),this.isOpen()))if(null==this.state.highlightedIndex)this.setState({isOpen:!1},function(){t.refs.input.select()});else{e.preventDefault();var n=this.getFilteredItems(this.props)[this.state.highlightedIndex],r=this.props.getItemValue(n);this.setState({isOpen:!1,highlightedIndex:null},function(){t.refs.input.setSelectionRange(r.length,r.length),t.props.onSelect(r,n)})}},Escape:function(){this.setIgnoreBlur(!1),this.setState({highlightedIndex:null,isOpen:!1})},Tab:function(){this.setIgnoreBlur(!1)}},e.exports=m}).call(t,n(39))},function(e,t,n){e.exports=n(493)},function(e,t,n){function r(e,t,n){n=n||{},9===t.nodeType&&(t=i.getWindow(t));var r=n.allowHorizontalScroll,o=n.onlyScrollIfNeeded,a=n.alignWithTop,s=n.alignWithLeft;r=void 0===r||r;var l,u,c,d,h,f,p,m,g,v,y=i.isWindow(t),b=i.offset(e),_=i.outerHeight(e),w=i.outerWidth(e);y?(p=t,v=i.height(p),g=i.width(p),m={left:i.scrollLeft(p),top:i.scrollTop(p)},h={left:b.left-m.left,top:b.top-m.top},f={left:b.left+w-(m.left+g),top:b.top+_-(m.top+v)},d=m):(l=i.offset(t),u=t.clientHeight,c=t.clientWidth,d={left:t.scrollLeft,top:t.scrollTop},h={left:b.left-(l.left+(parseFloat(i.css(t,"borderLeftWidth"))||0)),top:b.top-(l.top+(parseFloat(i.css(t,"borderTopWidth"))||0))},f={left:b.left+w-(l.left+c+(parseFloat(i.css(t,"borderRightWidth"))||0)),top:b.top+_-(l.top+u+(parseFloat(i.css(t,"borderBottomWidth"))||0))}),h.top<0||f.top>0?!0===a?i.scrollTop(t,d.top+h.top):!1===a?i.scrollTop(t,d.top+f.top):h.top<0?i.scrollTop(t,d.top+h.top):i.scrollTop(t,d.top+f.top):o||(a=void 0===a||!!a,a?i.scrollTop(t,d.top+h.top):i.scrollTop(t,d.top+f.top)),r&&(h.left<0||f.left>0?!0===s?i.scrollLeft(t,d.left+h.left):!1===s?i.scrollLeft(t,d.left+f.left):h.left<0?i.scrollLeft(t,d.left+h.left):i.scrollLeft(t,d.left+f.left):o||(s=void 0===s||!!s,s?i.scrollLeft(t,d.left+h.left):i.scrollLeft(t,d.left+f.left)))}var i=n(494);e.exports=r},function(e,t){function n(e){var t,n,r,i=e.ownerDocument,o=i.body,a=i&&i.documentElement;return t=e.getBoundingClientRect(),n=t.left,r=t.top,n-=a.clientLeft||o.clientLeft||0,r-=a.clientTop||o.clientTop||0,{left:n,top:r}}function r(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var i=e.document;n=i.documentElement[r],"number"!=typeof n&&(n=i.body[r])}return n}function i(e){return r(e)}function o(e){return r(e,!0)}function a(e){var t=n(e),r=e.ownerDocument,a=r.defaultView||r.parentWindow;return t.left+=i(a),t.top+=o(a),t}function s(e,t,n){var r="",i=e.ownerDocument;return(n=n||i.defaultView.getComputedStyle(e,null))&&(r=n.getPropertyValue(t)||n[t]),r}function l(e,t){var n=e[E]&&e[E][t];if(w.test(n)&&!x.test(t)){var r=e.style,i=r[M],o=e[S][M];e[S][M]=e[E][M],r[M]="fontSize"===t?"1em":n||0,n=r.pixelLeft+T,r[M]=i,e[S][M]=o}return""===n?"auto":n}function u(e,t){"static"===v(e,"position")&&(e.style.position="relative");var n,r,i=a(e),o={};for(r in t)n=parseFloat(v(e,r))||0,o[r]=n+t[r]-i[r];v(e,o)}function c(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(e){return"border-box"===b(e,"boxSizing")}function h(e,t,n){var r,i={},o=e.style;for(r in t)i[r]=o[r],o[r]=t[r];n.call(e);for(r in t)o[r]=i[r]}function f(e,t,n){var r,i,o,a=0;for(i=0;i<t.length;i++)if(r=t[i])for(o=0;o<n.length;o++){var s;s="border"===r?r+n[o]+"Width":r+n[o],a+=parseFloat(b(e,s))||0}return a}function p(e){return null!=e&&e==e.window}function m(e,t,n){if(p(e))return"width"===t?R.viewportWidth(e):R.viewportHeight(e);if(9===e.nodeType)return"width"===t?R.docWidth(e):R.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],i="width"===t?e.offsetWidth:e.offsetHeight,o=b(e),a=d(e,o),s=0;(null==i||i<=0)&&(i=void 0,s=b(e,t),(null==s||Number(s)<0)&&(s=e.style[t]||0),s=parseFloat(s)||0),void 0===n&&(n=a?A:O);var l=void 0!==i||a,u=i||s;return n===O?l?u-f(e,["border","padding"],r,o):s:l?u+(n===A?0:n===P?-f(e,["border"],r,o):f(e,["margin"],r,o)):s+f(e,C.slice(n),r,o)}function g(e){var t,n=arguments;return 0!==e.offsetWidth?t=m.apply(void 0,n):h(e,L,function(){t=m.apply(void 0,n)}),t}function v(e,t,n){if("object"!=typeof t){if(void 0===n)return b(e,t);"number"==typeof n&&(n+="px"),e.style[t]=n}else for(var r in t)v(e,r,t[r])}function y(e,t){for(var n in t)e[n]=t[n];return e}var b,_=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,w=new RegExp("^("+_+")(?!px)[a-z%]+$","i"),x=/^(top|right|bottom|left)$/,E="currentStyle",S="runtimeStyle",M="left",T="px";"undefined"!=typeof window&&(b=window.getComputedStyle?s:l);var C=["margin","border","padding"],O=-1,P=2,A=1,R={};c(["Width","Height"],function(e){R["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],R["viewport"+e](n))},R["viewport"+e]=function(t){var n="client"+e,r=t.document,i=r.body,o=r.documentElement,a=o[n];return"CSS1Compat"===r.compatMode&&a||i&&i[n]||a}});var L={position:"absolute",visibility:"hidden",display:"block"};c(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);R["outer"+t]=function(t,n){return t&&g(t,e,n?0:A)};var n="width"===e?["Left","Right"]:["Top","Bottom"];R[e]=function(t,r){if(void 0===r)return t&&g(t,e,O);if(t){var i=b(t);return d(t)&&(r+=f(t,["padding","border"],n,i)),v(t,e,r)}}});var I=e.exports={getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return a(e);u(e,t)},isWindow:p,each:c,css:v,clone:function(e){var t={};for(var n in e)t[n]=e[n];if(e.overflow)for(n in e)t.overflow[n]=e.overflow[n];return t},mix:y,scrollLeft:function(e,t){if(p(e)){if(void 0===t)return i(e);window.scrollTo(t,o(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(p(e)){if(void 0===t)return o(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},merge:function(){for(var e={},t=0;t<arguments.length;t++)I.mix(e,arguments[t]);return e},viewportWidth:0,viewportHeight:0};y(I,R)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),d=n(24),h=r(d),f=n(60),p=r(f),m=n(76),g=n(496),v=r(g),y=n(500),b=r(y),_=n(503),w=r(_),x=n(504),E=r(x),S=Object.freeze({RopesGrouped:"RopesGrouped",RopesNotGrouped:"RopesNotGrouped",RopeStretchers:"RopeStretchers",None:"None"}),M=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={orderingItems:[],minRangeValueInkN:0,maxRangeValueInkN:0,ifSpliced:!0,tableType:S.None,isLoaded:!1},n.minMaxSpliced={min:0,max:0},n.minMaxUnspliced={min:0,max:0},n.minMax={min:0,max:0},n.fetchData=n.fetchData.bind(n),n.transformResults=n.transformResults.bind(n),n.handleRangeChange=n.handleRangeChange.bind(n),n.handleSpliceChange=n.handleSpliceChange.bind(n),n.filterOrderingItems=n.filterOrderingItems.bind(n),n.findMinMax=n.findMinMax.bind(n),n.validateValue=n.validateValue.bind(n),n}return a(t,e),l(t,[{key:"componentDidMount",value:function(){this.fetchData(this.props.productId)}},{key:"findMinMax",value:function(e,t){return{min:e.reduce(function(e,n){return n[t]<e?n[t]:e},e[0][t]),max:e.reduce(function(e,n){return n[t]>e?n[t]:e},e[0][t])}}},{key:"handleRangeChange",value:function(e,t){this.setState({minRangeValueInkN:e,maxRangeValueInkN:t})}},{key:"validateValue",value:function(e,t){switch(!0){case e<this.minMax.min:e=this.minMax.min,this.setState(s({},this.state,{minRangeValueInkN:this.minMax.min}));break;case e>this.minMax.max:e=this.minMax.max,this.setState(s({},this.state,{minRangeValueInkN:this.minMax.max}));break;case t>this.minMax.max:t=this.minMax.max,this.setState(s({},this.state,{maxRangeValueInkN:this.minMax.max}));break;case t<this.minMax.min:t=this.minMax.min,this.setState(s({},this.state,{maxRangeValueInkN:this.minMax.min}))}if(e>t){var n=e;e=t,t=n,this.setState({minRangeValueInkN:e,maxRangeValueInkN:t})}}},{key:"handleSpliceChange",value:function(e){this.setState({ifSpliced:"spliced"===e})}},{key:"filterOrderingItems",value:function(){var e=this;return this.state.tableType===S.RopesGrouped?this.state.orderingItems.filter(function(t){var n=e.state.ifSpliced?t.MBLSplicedInkN:t.MBLUnsplicedInkN;return n>=e.state.minRangeValueInkN&&n<=e.state.maxRangeValueInkN}):this.state.orderingItems.filter(function(t){var n=t.LDBFMinInkN,r=t.LDBFMaxInkN,i=e.state.ifSpliced?e.state.minRangeValueInkN:e.state.minRangeValueInkN/1.1;return n<=(e.state.ifSpliced?e.state.maxRangeValueInkN:e.state.maxRangeValueInkN/1.1)&&r>=i})}},{key:"fetchData",value:function(e){var t=this;return h.default.get(this.props.apiRootUrl,{params:{id:e}}).then(function(e){var n=e.data.CalculatorType,r=t.transformResults(e.data.Lines);n===S.RopesGrouped?(t.minMaxSpliced=t.findMinMax(r,"MBLSplicedInkN"),t.minMaxUnspliced=t.findMinMax(r,"MBLUnsplicedInkN"),t.minMax.min=t.minMaxSpliced.min<t.minMaxUnspliced.min?t.minMaxSpliced.min:t.minMaxUnspliced.min,t.minMax.max=t.minMaxSpliced.max>t.minMaxUnspliced.max?t.minMaxSpliced.max:t.minMaxUnspliced.max):(t.minMax.min=t.findMinMax(r,"LDBFMinInkN").min,t.minMax.max=t.findMinMax(r,"LDBFMaxInkN").max),t.setState({isLoaded:!0,orderingItems:r,minRangeValueInkN:t.minMax.min,maxRangeValueInkN:t.minMax.max,tableType:n})}).catch(function(e){e.response?(console.log(e.response.data),console.log(e.response.status),console.log(e.response.headers)):e.request?console.log(e.request):console.log("Error",e.message),console.log(e.config)})}},{key:"transformResults",value:function(e){return e.map(function(e){return{Id:(0,p.default)(),Diameter:Number(e.Diameter),MBLSplicedInkN:Number(e.MBLSplicedInkN),MBLUnsplicedInkN:Number(e.MBLUnsplicedInkN),MBLSplicedInTons:(0,m.kNIntoTonsRound)(Number(e.MBLSplicedInkN)),MBLUnsplicedInTons:(0,m.kNIntoTonsRound)(Number(e.MBLUnsplicedInkN)),LDBFMaxInTons:(0,m.kNIntoTonsRound)(Number(e.LDBFMaxInkN)),LDBFMaxInkN:Number(e.LDBFMaxInkN),LDBFMinInTons:(0,m.kNIntoTonsRound)(Number(e.LDBFMinInkN)),LDBFMinInkN:Number(e.LDBFMinInkN),Products:e.Products,Description:e.Name,Number:e.Number,Length:e.Length}})}},{key:"displayControlPanel",value:function(){return this.state.tableType==S.RopesGrouped||this.state.tableType==S.RopesNotGrouped}},{key:"renderTable",value:function(){switch(this.state.tableType){case S.RopesGrouped:return c.default.createElement(b.default,{orderingItems:this.filterOrderingItems()});case S.RopesNotGrouped:return c.default.createElement(w.default,{orderingItems:this.filterOrderingItems()});case S.RopeStretchers:return c.default.createElement(E.default,{orderingItems:this.state.orderingItems});default:return null}}},{key:"render",value:function(){return c.default.createElement(c.default.Fragment,null,this.state.isLoaded&&c.default.createElement("div",null,this.displayControlPanel()&&c.default.createElement(v.default,{handleRangeChange:this.handleRangeChange,handleSpliceChange:this.handleSpliceChange,validateValue:this.validateValue,minRangeValueInkN:this.state.minRangeValueInkN,maxRangeValueInkN:this.state.maxRangeValueInkN,ifSpliced:this.state.ifSpliced,edgeValues:this.minMax,isMBL:this.state.tableType==S.RopesGrouped}),this.renderTable()))}}]),t}(u.Component);t.default=M},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),d=n(497),h=n(76),f=n(499),p=r(f),m=Object.freeze({MIN:"min",MAX:"max"}),g=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={minValue:0,maxValue:0,isExceededClassName:""},n.handleValueChangeInkN=n.handleValueChangeInkN.bind(n),n.handleValueChangeInTons=n.handleValueChangeInTons.bind(n),n.handleValuesChangeOnSlider=n.handleValuesChangeOnSlider.bind(n),n.handleSpliceChange=n.handleSpliceChange.bind(n),n.validateValue=n.validateValue.bind(n),n.setExceededRangeClass=n.setExceededRangeClass.bind(n),n}return a(t,e),l(t,[{key:"handleValueChangeInTons",value:function(e,t){this.handleValueChangeInkN((0,h.tonsTokN)(e),t)}},{key:"handleValueChangeInkN",value:function(e,t){if(Math.round(e).toString().length>this.props.edgeValues.max.toString().length)return!1;t===m.MAX?(this.props.handleRangeChange(this.props.minRangeValueInkN,(0,h.RoundTo1Decimal)(e)),this.setExceededRangeClass(e,"range-slider--max-value-is-exceeded-min","range-slider--max-value-is-exceeded-max")):(this.props.handleRangeChange((0,h.RoundTo1Decimal)(e),this.props.maxRangeValueInkN),this.setExceededRangeClass(e,"range-slider--min-value-is-exceeded-min","range-slider--min-value-is-exceeded-max"))}},{key:"handleValuesChangeOnSlider",value:function(e){this.setState(s({},this.state,{isExceededClassName:""})),this.props.handleRangeChange(e[0],e[1])}},{key:"validateValue",value:function(){this.props.validateValue(this.props.minRangeValueInkN,this.props.maxRangeValueInkN),this.setState(s({},this.state,{isExceededClassName:""}))}},{key:"setExceededRangeClass",value:function(e,t,n){e<this.props.edgeValues.min?this.setState(s({},this.state,{isExceededClassName:t})):e>this.props.edgeValues.max?this.setState(s({},this.state,{isExceededClassName:n})):this.setState(s({},this.state,{isExceededClassName:""}))}},{key:"handleSpliceChange",value:function(e){this.props.handleSpliceChange(e.target.value)}},{key:"render",value:function(){var e=this,t=this.props.minRangeValueInkN===this.props.edgeValues.max&&this.props.maxRangeValueInkN===this.props.edgeValues.max,n=this.props,r=n.isMBL,i=n.edgeValues,o=n.minRangeValueInkN,a=n.maxRangeValueInkN,l=n.ifSpliced;return c.default.createElement("div",{className:"ordering-filter print-hidden"},c.default.createElement("form",null,c.default.createElement("fieldset",null,c.default.createElement("legend",{className:"ordering-filter__title ordering-filter__title--no-margin"},"Product selection"),c.default.createElement("p",null,"Rope strength ",!r&&"range"," filter"),c.default.createElement("div",{className:"ordering-filter__section"},c.default.createElement("div",{className:"range"},c.default.createElement("div",{className:"range__input-wrapper"},c.default.createElement("div",{className:"range__current-value-wrapper"},c.default.createElement(p.default,{handleRangeChange:function(t){return e.handleValueChangeInkN(t.target.value,m.MIN)},name:"minValueInkN",value:o,valueToDisplay:Math.round(o),minValue:i.min,maxValue:i.max,validateValue:this.validateValue,inputLabel:"Minimum value of "+(r?"minimum breaking load":"line design break force")+" in kN",id:"minValueInkN",label:"kN",step:"1"})),c.default.createElement("div",{className:"range__max"},c.default.createElement(p.default,{handleRangeChange:function(t){return e.handleValueChangeInkN(t.target.value,m.MAX)},name:"maxValueInkN",value:a,valueToDisplay:Math.round(a),minValue:i.min,maxValue:i.max,validateValue:this.validateValue,inputLabel:"Maximum value of "+(r?"minimum breaking load":"line design break force")+" in kN",id:"maxValueInkN",label:"kN",step:"1"}))),c.default.createElement("div",{className:"range-slider "+this.state.isExceededClassName},c.default.createElement(d.Range,{step:1,min:i.min,max:i.max,ref:this.range,values:[o,a],onChange:function(t){return e.handleValuesChangeOnSlider(t)},renderTrack:function(e){var t=e.props,n=e.children;return c.default.createElement("div",s({},t,{style:s({},t.style,{background:(0,d.getTrackBackground)({values:[o,a],colors:["#d1dde1","#29588C","#d1dde1"],min:i.min,max:i.max})}),className:"range-slider__track"}),n)},renderThumb:function(e){var n=e.props,r=e.index;return c.default.createElement("div",s({},n,{style:s({},n.style,{zIndex:0===r&&t?1:void 0}),className:"range-slider__thumb "+(0===r?"range-slider__thumb--min":"range-slider__thumb--max")}))}})),c.default.createElement("div",{className:"range__input-wrapper"},c.default.createElement("div",{className:"range__current-value-wrapper"},c.default.createElement(p.default,{name:"minValueInTons",handleRangeChange:function(t){return e.handleValueChangeInTons(t.target.value,m.MIN)},value:(0,h.kNIntoTons)(o),valueToDisplay:(0,h.RoundTo1Decimal)((0,h.kNIntoTons)(o)),minValue:(0,h.kNIntoTonsRound)(i.min),maxValue:(0,h.kNIntoTonsRound)(i.max),validateValue:this.validateValue,id:"minValueInTons",label:"metric tons",inputLabel:"Minimum value of "+(r?"minimum breaking load":"line design break force")+" metric tons",step:"0.1"})),c.default.createElement("div",{className:"range__max"},c.default.createElement(p.default,{handleRangeChange:function(t){return e.handleValueChangeInTons(t.target.value,m.MAX)},name:"maxValueInTons",value:(0,h.kNIntoTons)(a),valueToDisplay:(0,h.RoundTo1Decimal)((0,h.kNIntoTons)(a)),minValue:(0,h.kNIntoTonsRound)(i.min),maxValue:(0,h.kNIntoTonsRound)(i.max),validateValue:this.validateValue,inputLabel:"Maximum value of "+(r?"minimum breaking load":"line design break force")+" metric tons",id:"maxValueInTons",label:"metric tons",step:"0.1"})))))),c.default.createElement("fieldset",null,c.default.createElement("legend",{className:"ordering-filter__title"},"Rope strength type"),c.default.createElement("div",{className:"styled-radio-button"},c.default.createElement("input",{type:"radio",name:"ifSpliced",id:"spliced_true",value:"spliced",onChange:this.handleSpliceChange,checked:l}),c.default.createElement("label",{htmlFor:"spliced_true"},"LDBF / MBL spliced")),c.default.createElement("div",{className:"styled-radio-button"},c.default.createElement("input",{type:"radio",name:"ifSpliced",id:"spliced_false",value:"unspliced",onChange:this.handleSpliceChange,checked:!l}),c.default.createElement("label",{htmlFor:"spliced_false"},"MBL unspliced ",!r&&"*")),!r&&c.default.createElement("p",{className:"u-bottom-margin--none"},"* Unspliced strength is filtered on 10% higher than the LDBF strength"))))}}]),t}(u.Component);t.default=g},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(498));t.Range=i.default;var o=n(163);t.getTrackBackground=o.getTrackBackground;var a=n(113);t.Direction=a.Direction},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(1)),a=n(163),s=n(113),l=function(e){function t(t){var n=e.call(this,t)||this;return n.trackRef=o.createRef(),n.thumbOffsets=[],n.state={draggedThumbIndex:-1},n.getOffsets=function(){var e=n.props,t=e.direction,r=e.values,i=e.min,o=e.max,l=n.trackRef.current,u=l.getBoundingClientRect(),c=a.getPadding(l);return n.getThumbs().map(function(e,n){var l={x:0,y:0},d=e.getBoundingClientRect(),h=a.getMargin(e);switch(t){case s.Direction.Right:return l.x=-1*(h.left+c.left),l.y=-1*((d.height-u.height)/2+c.top),l.x+=u.width*a.relativeValue(r[n],i,o)-d.width/2,l;case s.Direction.Left:return l.x=-1*(h.right+c.right),l.y=-1*((d.height-u.height)/2+c.top),l.x+=u.width-u.width*a.relativeValue(r[n],i,o)-d.width/2,l;case s.Direction.Up:return l.x=-1*((d.width-u.width)/2+h.left+c.left),l.y=-c.left,l.y+=u.height-u.height*a.relativeValue(r[n],i,o)-d.height/2,l;case s.Direction.Down:return l.x=-1*((d.width-u.width)/2+h.left+c.left),l.y=-c.left,l.y+=u.height*a.relativeValue(r[n],i,o)-d.height/2,l;default:return a.assertUnreachable(t)}})},n.getThumbs=function(){return n.trackRef&&n.trackRef.current?Array.from(n.trackRef.current.children):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},n.getTargetIndex=function(e){return n.getThumbs().findIndex(function(t){return t===e.target||t.contains(e.currentTarget)})},n.addTouchEvents=function(e){e.preventDefault(),document.addEventListener("touchmove",n.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",n.schdOnEnd),document.addEventListener("touchcancel",n.schdOnEnd)},n.addMouseEvents=function(e){e.preventDefault(),document.addEventListener("mousemove",n.schdOnMouseMove),document.addEventListener("mouseup",n.schdOnEnd)},n.onMouseDownTrack=function(e){0!==e.button||n.props.values.length>1||(e.persist(),n.addMouseEvents(e),n.setState({draggedThumbIndex:0},function(){return n.onMove(e.clientX,e.clientY)}))},n.onWindowResize=function(){a.translateThumbs(n.getThumbs(),n.getOffsets())},n.onTouchStartTrack=function(e){n.props.values.length>1||(e.persist(),n.addTouchEvents(e),n.setState({draggedThumbIndex:0},function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)}))},n.onMouseDown=function(e){if(0===e.button){n.addMouseEvents(e);var t=n.getTargetIndex(e);-1!==t&&n.setState({draggedThumbIndex:t})}},n.onTouchStart=function(e){n.addTouchEvents(e);var t=n.getTargetIndex(e);-1!==t&&n.setState({draggedThumbIndex:t})},n.onMouseMove=function(e){e.preventDefault(),n.onMove(e.clientX,e.clientY)},n.onTouchMove=function(e){e.preventDefault(),n.onMove(e.touches[0].clientX,e.touches[0].clientY)},n.onKeyDown=function(e){var t=n.props,r=t.values,i=t.onChange,o=t.step,s=n.getTargetIndex(e);-1!==s&&(["ArrowRight","ArrowUp","k","PageUp"].includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:s}),i(a.replaceAt(r,s,n.normalizeValue(r[s]+("PageUp"===e.key?10*o:o),s)))):["ArrowLeft","ArrowDown","j","PageDown"].includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:s}),i(a.replaceAt(r,s,n.normalizeValue(r[s]-("PageDown"===e.key?10*o:o),s)))):"Tab"===e.key&&n.setState({draggedThumbIndex:-1}))},n.onKeyUp=function(e){n.setState({draggedThumbIndex:-1})},n.onMove=function(e,t){var r=n.state.draggedThumbIndex,i=n.props,o=i.direction,l=i.min,u=i.max,c=i.onChange,d=i.values,h=i.step;if(-1===r)return null;var f=n.trackRef.current,p=f.getBoundingClientRect(),m=a.isVertical(o)?p.height:p.width,g=0;switch(o){case s.Direction.Right:g=(e-p.left)/m*(u-l)+l;break;case s.Direction.Left:g=(m-(e-p.left))/m*(u-l)+l;break;case s.Direction.Down:g=(t-p.top)/m*(u-l)+l;break;case s.Direction.Up:g=(m-(t-p.top))/m*(u-l)+l;break;default:a.assertUnreachable(o)}Math.abs(d[r]-g)>=h&&c(a.replaceAt(d,r,n.normalizeValue(g,r)))},n.normalizeValue=function(e,t){var r=n.props,i=r.min,o=r.max,s=r.step,l=r.allowOverlap,u=r.values;return a.normalizeValue(e,t,i,o,s,l,u)},n.onEnd=function(e){e.preventDefault(),document.removeEventListener("mousemove",n.schdOnMouseMove),document.removeEventListener("touchmove",n.schdOnTouchMove),document.removeEventListener("mouseup",n.schdOnEnd),document.removeEventListener("touchup",n.schdOnEnd),document.removeEventListener("touchcancel",n.schdOnEnd),n.setState({draggedThumbIndex:-1})},n.schdOnMouseMove=a.schd(n.onMouseMove),n.schdOnTouchMove=a.schd(n.onTouchMove),n.schdOnEnd=a.schd(n.onEnd),n.schdOnWindowResize=a.schd(n.onWindowResize),n}return r(t,e),t.prototype.componentDidMount=function(){var e=this;window.addEventListener("resize",this.schdOnWindowResize),!this.props.allowOverlap&&a.checkInitialOverlap(this.props.values),this.props.values.forEach(function(t){return a.checkBoundaries(t,e.props.min,e.props.max)}),a.translateThumbs(this.getThumbs(),this.getOffsets())},t.prototype.componentDidUpdate=function(e){a.translateThumbs(this.getThumbs(),this.getOffsets())},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.schdOnWindowResize)},t.prototype.render=function(){var e=this,t=this.props,n=t.renderTrack,r=t.renderThumb,i=t.values,o=t.min,s=t.max,l=t.allowOverlap,u=t.disabled;return n({props:{style:{cursor:this.state.draggedThumbIndex>-1?"grabbing":1!==i.length||u?"inherit":"pointer"},onMouseDown:u?a.voidFn:this.onMouseDownTrack,onTouchStart:u?a.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:u,children:i.map(function(t,n){var c=e.state.draggedThumbIndex===n;return r({index:n,value:t,isDragged:c,props:{style:{position:"absolute",zIndex:c?1:void 0,cursor:u?"inherit":c?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:n,tabIndex:u?void 0:0,"aria-valuemax":l?s:i[n+1]||s,"aria-valuemin":l?o:i[n-1]||o,"aria-valuenow":t,draggable:!1,role:"slider",onMouseDown:u?a.voidFn:e.onMouseDown,onTouchStart:u?a.voidFn:e.onTouchStart,onKeyDown:u?a.voidFn:e.onKeyDown,onKeyUp:u?a.voidFn:e.onKeyUp}})})})},t.defaultProps={step:1,direction:s.Direction.Right,disabled:!1,allowOverlap:!1,min:0,max:100},t}(o.Component);t.default=l},function(e,t,n){"use strict";function r(e){var t=e.handleRangeChange,n=e.id,r=e.inputLabel,i=e.label,a=e.maxValue,s=e.minValue,l=e.name,u=e.step,c=e.valueToDisplay,d=e.validateValue;return o.default.createElement(o.default.Fragment,null,o.default.createElement("label",{className:"visually-hidden-accessible",htmlFor:n},r),o.default.createElement("input",{type:"number",className:"range__input",min:s,max:a,id:n,name:l,value:""+c,onChange:t,onBlur:d,step:u}),i&&o.default.createElement("span",{className:"range__unit"},i))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(501),d=r(c),h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={activeItemId:""},n.handleActiveItemChange=n.handleActiveItemChange.bind(n),n}return a(t,e),s(t,[{key:"handleActiveItemChange",value:function(e){this.setState({activeItemId:e})}},{key:"render",value:function(){var e=this,t=this.props.orderingItems;return u.default.createElement("div",null,u.default.createElement("p",{className:"ordering-table__instruction"},"Select row to learn more about the product"),u.default.createElement("div",{className:"main-product__table ordering-table"},u.default.createElement("table",null,u.default.createElement("thead",null,u.default.createElement("tr",null,u.default.createElement("th",null,"Diameter [mm]"),u.default.createElement("th",null,"MBL Spliced [kN]"),u.default.createElement("th",null,"MBL Unspliced [kN]"),u.default.createElement("th",null,"MBL Spliced [metric ton]"),u.default.createElement("th",null,"MBL Unspliced [metric ton]"))),u.default.createElement("tbody",null,t.map(function(t){return u.default.createElement(d.default,{item:t,key:t.Id,activeItemId:e.state.activeItemId,handleActiveItemChange:e.handleActiveItemChange,open:e.state.activeItemId===t.Id})})))))}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(502),d=r(c),h=n(76),f=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={height:0},n.expandableRef=u.default.createRef(),n.handleClick=n.handleClick.bind(n),n.handleKeyPress=n.handleKeyPress.bind(n),n.handleClickClose=n.handleClickClose.bind(n),n}return a(t,e),s(t,[{key:"handleClick",value:function(){var e=this.props,t=e.activeItemId,n=e.item;(0,e.handleActiveItemChange)(t===n.Id?"":n.Id),0===this.state.height&&this.setState({height:this.expandableRef.current.clientHeight})}},{key:"handleKeyPress",value:function(e){32!==e.charCode&&13!==e.charCode||this.handleClick()}},{key:"handleClickClose",value:function(){this.props.handleActiveItemChange("")}},{key:"render",value:function(){var e=this.props,t=e.open,n=e.item,r=t?this.state.height:0;return u.default.createElement(u.default.Fragment,null,u.default.createElement("tr",{className:"ordering-table__tr-expandable",onClick:this.handleClick,role:"button",tabIndex:"0",onKeyPress:this.handleKeyPress,"aria-expanded":this.props.open,"aria-controls":"accordion-"+this.props.item.Id},u.default.createElement("td",null,n.Diameter),u.default.createElement("td",null,n.MBLSplicedInkN),u.default.createElement("td",null,n.MBLUnsplicedInkN),u.default.createElement("td",null,(0,h.RoundTo1Decimal)((0,h.kNIntoTons)(n.MBLSplicedInkN))),u.default.createElement("td",null,(0,h.RoundTo1Decimal)((0,h.kNIntoTons)(n.MBLUnsplicedInkN)))),u.default.createElement("tr",{className:"ordering-table__tr-expanded"},u.default.createElement("td",{colSpan:"5",className:"ordering-table__td-variants-wrapper print-hidden"},u.default.createElement("div",{className:"ordering-table__accordion",style:{height:r+"px"},id:"accordion-"+n.Id,"aria-hidden":!t},u.default.createElement("div",{ref:this.expandableRef},u.default.createElement(d.default,{products:n.Products,handleClickClose:this.handleClickClose}))))))}}]),t}(l.Component);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=a.default.createElement("tr",{className:"ordering-variant-table__tr-close"},a.default.createElement("td",{colSpan:"2"},a.default.createElement("button",{type:"button",className:"ordering-variant-table__close-btn link-expand",onClick:e.handleClickClose},"Close"))),n=void 0;return n=e.products.length>0?a.default.createElement(a.default.Fragment,null,a.default.createElement("thead",null,a.default.createElement("tr",{className:"ordering-variant-table__tr-heading"},a.default.createElement("th",null,"Product name"),a.default.createElement("th",null,"Product number"))),a.default.createElement("tbody",null,e.products.map(function(e){return a.default.createElement("tr",{key:(0,l.default)()},a.default.createElement("td",null,e.Name),a.default.createElement("td",null,e.Number))}),t)):a.default.createElement("tbody",null,a.default.createElement("tr",{className:"ordering-variant-table__tr-heading"},a.default.createElement("td",null,a.default.createElement("a",{href:"/contacts-and-locations/",target:"_blank"},"Please contact our customer service to get a custom offer"))),t),a.default.createElement("table",{className:"ordering-variant-table"},n)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1),a=r(o),s=n(60),l=r(s)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(76),c=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){var e=this.props.orderingItems;return l.default.createElement("div",{className:"main-product__table ordering-table ordering-table--with-description"},l.default.createElement("table",null,l.default.createElement("thead",null,l.default.createElement("tr",null,l.default.createElement("th",null,"Part number"),l.default.createElement("th",null,"Part description"),l.default.createElement("th",{className:"print-only"},"Diameter [mm]"),l.default.createElement("th",null,"LDBF [kN] from:"),l.default.createElement("th",null,"LDBF [kN] up to:"),l.default.createElement("th",null,"LDBF [mt] from:"),l.default.createElement("th",null,"LDBF [mt] up to:"))),l.default.createElement("tbody",null,e.map(function(e){return l.default.createElement("tr",{key:e.Id},l.default.createElement("td",null,e.Number),l.default.createElement("td",null,e.Description),l.default.createElement("td",{className:"print-only"},e.Diameter),l.default.createElement("td",null,e.LDBFMinInkN),l.default.createElement("td",null,e.LDBFMaxInkN),l.default.createElement("td",null,(0,u.RoundTo1Decimal)((0,u.kNIntoTons)(e.LDBFMinInkN))),l.default.createElement("td",null,(0,u.RoundTo1Decimal)((0,u.kNIntoTons)(e.LDBFMaxInkN))))}))))}}]),t}(s.Component);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){var e=this.props.orderingItems;return l.default.createElement("div",{className:"main-product__table ordering-table ordering-table--with-description"},l.default.createElement("table",null,l.default.createElement("thead",null,l.default.createElement("tr",null,l.default.createElement("th",null,"Part number"),l.default.createElement("th",null,"Part description"),l.default.createElement("th",null,"Diameter [mm]"),l.default.createElement("th",null,"Length [m]"),l.default.createElement("th",null,"TDBF [kN]"))),l.default.createElement("tbody",null,e.map(function(e){return l.default.createElement("tr",{key:e.Id},l.default.createElement("td",null,e.Number),l.default.createElement("td",null,e.Description),l.default.createElement("td",null,e.Diameter),l.default.createElement("td",null,e.Length),l.default.createElement("td",null,e.MBLSplicedInkN))}))))}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(24),d=r(c),h=n(506),f=r(h),p=n(509),m=r(p),g=n(510),v=r(g),y=n(511),b=r(y),_={mSds:{displayName:"SDS",type:"msds"},miniSds:{displayName:"miniSDS",type:"mini"}},w={sdsType:_.mSds.type,countryId:"284",languageId:"340700"},x=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.productId=n.props.productId,n.state={isLoading:!1,sdsType:w.sdsType,countryId:w.countryId,languageId:w.languageId,countriesList:[],languagesList:[],documentsList:[],shouldResultsRender:!1,errorCountries:!1,errorLanguages:!1,errorDocuments:!1,errorDownloadingPDF:!1},n.handleSdsTypeChange=n.handleSdsTypeChange.bind(n),n.handleCountryChange=n.handleCountryChange.bind(n),n.handleLanguageChange=n.handleLanguageChange.bind(n),n.handleFindSds=n.handleFindSds.bind(n),n.fetchPDF=n.fetchPDF.bind(n),n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.fetchCountries(),this.fetchLanguages()}},{key:"fetchCountries",value:function(){var e=this;this.setState({isLoading:!0});var t=this.state.sdsType,n=this.productId,r={template:t,productId:n};d.default.get("/api/sds/GetCountries",{params:r}).then(function(t){e.setState({countriesList:t.data,errorCountries:!1,isLoading:!1})}).catch(function(t){e.handleFetchError(t),e.setState({errorCountries:!0,countriesList:[],isLoading:!1})})}},{key:"fetchLanguages",value:function(){var e=this;this.setState({isLoading:!0});var t=this.state,n=t.sdsType,r=t.countryId,i=this.productId,o={template:n,productId:i,countryId:r};d.default.get("/api/sds/GetLanguages",{params:o}).then(function(t){e.setState({languagesList:t.data,errorLanguages:!1,isLoading:!1})}).catch(function(t){e.handleFetchError(t),e.setState({errorLanguages:!0,languagesList:[],isLoading:!1})})}},{key:"fetchDocuments",value:function(){var e=this;this.setState({isLoading:!0});var t=this.state,n=t.sdsType,r=t.countryId,i=t.languageId,o=this.productId,a={template:n,productId:o,countryId:r,languageId:i};d.default.get("/api/sds/GetDocuments",{params:a}).then(function(t){var n=t.data,r=null!==n.MainDocument||n.RelatedDocuments.length>0;e.setState({errorDocuments:!r,documentsList:n,isLoading:!1},function(){return e.setState({shouldResultsRender:!0})})}).catch(function(t){e.handleFetchError(t),e.setState({errorDocuments:!0,documentsList:[],isLoading:!1})})}},{key:"fetchPDF",value:function(e,t,n){var r=this;e.preventDefault(),this.setState({isLoading:!0}),d.default.get(t,{method:"GET",responseType:"blob"}).then(function(e){r.setState({isLoading:!1,errorDownloadingPDF:!1});var t=new Blob([e.data],{type:"application/pdf"}),i=n+".pdf";if(void 0!==window.navigator.msSaveBlob)return void window.navigator.msSaveBlob(t,i);var o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.setAttribute("download",i),document.body.appendChild(a),a.click(),document.body.removeChild(a)}).catch(function(e){r.setState({errorDownloadingPDF:!0,isLoading:!1}),console.log(e)})}},{key:"handleFetchError",value:function(e){e.response?(console.log(e.response.data),console.log(e.response.status),console.log(e.response.headers)):e.request?console.log(e.request):console.log("Error",e.message),console.log(e.config)}},{key:"handleSdsTypeChange",value:function(e){function t(){this.fetchCountries(),this.fetchLanguages()}this.setState({sdsType:e,countryId:w.countryId,languageId:w.languageId,shouldResultsRender:!1,errorDownloadingPDF:!1},t)}},{key:"handleCountryChange",value:function(e){this.setState({countryId:e.toString(),shouldResultsRender:!1,languageId:w.languageId,errorDownloadingPDF:!1},this.fetchLanguages)}},{key:"handleLanguageChange",value:function(e){this.setState({languageId:e.toString(),shouldResultsRender:!1,errorDownloadingPDF:!1})}},{key:"handleFindSds",value:function(e){e.preventDefault(),this.fetchDocuments()}},{key:"render",value:function(){var e=this.state,t=e.sdsType,n=e.countryId,r=e.languageId,i=e.languagesList,o=e.countriesList,a=e.documentsList,s=e.shouldResultsRender,c=e.errorCountries,d=e.errorLanguages,h=e.errorDocuments,p=e.errorDownloadingPDF,g=e.isLoading;return u.default.createElement(l.Fragment,null,g&&u.default.createElement(b.default,{small:!0}),u.default.createElement(f.default,{isLoading:g,sdsTypes:_,selectedSdsType:t,selectedCountryId:n,selectedLanguageId:r,languagesList:i,countriesList:o,errorCountries:c,errorLanguages:d,handleSdsTypeChange:this.handleSdsTypeChange,handleCountryChange:this.handleCountryChange,handleLanguageChange:this.handleLanguageChange,handleFindSds:this.handleFindSds}),u.default.createElement(m.default,{shouldResultsRender:s,documentsList:a,errorDocuments:h,errorDownloadingPDF:p,fetchPDF:this.fetchPDF}),u.default.createElement(v.default,null))}}]),t}(l.Component);t.default=x},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.isLoading,n=e.sdsTypes,r=e.countriesList,i=e.languagesList,o=e.selectedSdsType,s=e.selectedCountryId,u=e.selectedLanguageId,d=e.handleSdsTypeChange,h=e.handleCountryChange,f=e.handleLanguageChange,p=e.handleFindSds,m=e.errorCountries,g=e.errorLanguages,v=t||r.length<=0||i.length<=0||m||g,y=Object.keys(n),b=y.map(function(e){var t=n[e].type===o;return a.default.createElement(c.default,{key:n[e].type,id:n[e].type,name:"sds-types",labelText:n[e].displayName,checked:t,onChange:d})});return a.default.createElement("form",{className:"simple",action:"",method:"get"},a.default.createElement("div",{className:"sds-widget__item"},a.default.createElement("strong",null,"Select SDS type"),a.default.createElement("div",{className:"sds-widget__input-group"},b)),a.default.createElement("div",{className:"sds-widget__item"},a.default.createElement(l.default,{labelText:"Select country",name:"country",options:r,selectedOption:s,onChange:h,error:m,errorText:"Could not find available countries"})),a.default.createElement("div",{className:"sds-widget__item"},a.default.createElement(l.default,{labelText:"Select language",name:"language",options:i,selectedOption:u,onChange:f,error:g,errorText:"Could not find available languages"})),a.default.createElement("div",{className:"sds-widget__item"},a.default.createElement("button",{className:"sds-widget__submit-btn btn btn--primary btn--outline",onClick:p,disabled:v},"Find available SDS")))}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=r(o),s=n(507),l=r(s),u=n(508),c=r(u);t.default=i},function(e,t,n){"use strict";function r(e){var t=e.labelText,n=e.name,r=e.options,a=e.selectedOption,s=e.onChange,l=e.error,u=e.errorText,c=r.map(function(e){return o.default.createElement("option",{key:e.Id,value:e.Id},e.Name)});return o.default.createElement(i.Fragment,null,o.default.createElement("strong",null,o.default.createElement("label",{htmlFor:n},t)),o.default.createElement("select",{name:n,id:n,value:a,onChange:function(e){return s(e.target.value)},disabled:l},c),l&&o.default.createElement("p",{className:"sds-widget__error-message"},u))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=r},function(e,t,n){"use strict";function r(e){var t=e.name,n=e.id,r=e.labelText,i=e.checked,a=e.onChange;return o.default.createElement("div",{className:"sds-widget__input-group-item styled-radio-button"},o.default.createElement("input",{type:"radio",name:t,id:n,checked:i,onChange:function(){return a(n)}}),o.default.createElement("label",{htmlFor:n},o.default.createElement("span",null,r)))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(31),d=r(c),h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={tableIsCutOff:!1},n.tableRef1=u.default.createRef(),n.tableRef2=u.default.createRef(),n.checkIfTablesAreCutOff=n.checkIfTablesAreCutOff.bind(n),n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.checkIfTablesAreCutOff,!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.checkIfTablesAreCutOff,!1)}},{key:"componentDidUpdate",value:function(e){this.props.shouldResultsRender!==e.shouldResultsRender&&this.checkIfTablesAreCutOff()}},{key:"checkIfTablesAreCutOff",value:function(){var e=this,t=function(t){if(t){var n=t.scrollWidth,r=t.getBoundingClientRect().left,i=2*r,o=document.body.clientWidth-i,a=Math.floor(n)>Math.floor(o);e.setState({tableIsCutOff:a})}};this.props.shouldResultsRender&&(t(this.tableRef1.current),t(this.tableRef2.current))}},{key:"renderTable",value:function(e,t,n){var r=(0,d.default)("main-product__table",{fat:this.state.tableIsCutOff});return u.default.createElement("div",{className:"sds-widget__item"},u.default.createElement("table",{className:r,ref:n},u.default.createElement("thead",null,u.default.createElement("tr",null,u.default.createElement("th",null,t),u.default.createElement("th",null,"File name"),u.default.createElement("th",null,"File"))),u.default.createElement("tbody",null,this.renderRows(e))))}},{key:"renderRows",value:function(e){var t=this.props.fetchPDF;return e.map(function(e){return u.default.createElement("tr",{key:e.Name},u.default.createElement("td",null,e.Name),u.default.createElement("td",null,e.FileName),u.default.createElement("td",null,u.default.createElement("button",{type:"button",onClick:function(n){return t(n,e.Link,e.Name)},className:"sds-widget__download-btn"},"Download file")))})}},{key:"render",value:function(){var e=this.props,t=e.shouldResultsRender,n=e.errorDocuments,r=e.errorDownloadingPDF,i=e.documentsList,o=i.MainDocument,a=i.RelatedDocuments;return t?n?u.default.createElement("p",{className:"sds-widget__error-message"},"Could not find available documents"):u.default.createElement(l.Fragment,null,u.default.createElement("div",{className:"sds-widget__item sds-widget__item--space-top"},u.default.createElement("h3",null,"Available SDS")),o&&this.renderTable([i.MainDocument],"Product",this.tableRef1),a&&a.length>0&&this.renderTable(a,"Related Products",this.tableRef2),r&&u.default.createElement(l.Fragment,null,u.default.createElement("p",{className:"sds-widget__error-message"},"Could not download the document"))):null}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";function r(){return o.default.createElement("div",{className:"sds-widget__item sds-widget__item--space-top"},o.default.createElement("a",{className:"products-link--inverted products-icon products-icon--external products-print-expand-link",href:"http://jr.chemwatch.net/outb/account/autologin?login=wilhelmsen",target:"_blank"},"Directly access all Safety Data Sheets",o.default.createElement("span",{className:"visually-hidden-accessible"},"(new window)")),o.default.createElement("div",{className:"sds-widget__instruction-link"},o.default.createElement("a",{href:"/marine-products/safety-data-sheets-sds-portal/",target:"_blank"},"Instructions for accessing safety data sheets (SDSs) and Mini only")))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=r},function(e,t,n){"use strict";function r(e){var t=e.small,n=t?"loader__icon--small":"";return o.default.createElement("div",{className:"loader loader--full-screen"},o.default.createElement("p",{className:"visually-hidden-accessible"},"Loading in progress."),o.default.createElement("div",{className:"loader__icon "+n}))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ModalType=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(513),d=r(c);n(523);var h={content:{overflow:"hidden",width:"80%",top:"50%",left:"50%",right:"auto",bottom:"auto",transform:"translate(-50%, -50%)",maxHeight:"95vh"}},f=function(e){function t(e){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),s(t,[{key:"componentWillMount",value:function(){d.default.setAppElement("body")}},{key:"render",value:function(){return u.default.createElement(d.default,{style:h,isOpen:this.props.isOpen,shouldCloseOnOverlayClick:!0,onRequestClose:this.props.onRequestClose},this.props.displayMode==p.VIDEO&&u.default.createElement("figure",{className:"video"},u.default.createElement("div",{className:"img-flow ratio-16-9"},this.props.localVideoUrl&&u.default.createElement("video",{controls:!0,poster:this.props.imageUrl,src:this.props.localVideoUrl}),!this.props.localVideoUrl&&this.props.embedCode&&u.default.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.embedCode}}))),this.props.displayMode==p.IMAGE&&u.default.createElement("figure",null,u.default.createElement("div",{className:"img-flow ratio-16-9"},u.default.createElement("img",{src:this.props.imageUrl}))),this.props.displayMode==p.FORM&&u.default.createElement("iframe",{src:this.props.formUrl,width:"100%",height:"200"},u.default.createElement("div",{className:"loader--full-screen"},u.default.createElement("div",{className:"loader__icon"}))))}}]),t}(l.Component);t.default=f;var p=t.ModalType={VIDEO:"video",IMAGE:"image",FORM:"form"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(514),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return e()}Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),d=r(c),h=n(109),f=r(h),p=n(32),m=r(p),g=n(515),v=r(g),y=n(165),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(y),_=n(115),w=r(_),x=n(522),E=t.portalClassName="ReactModalPortal",S=t.bodyOpenClassName="ReactModal__Body--open",M=_.canUseDOM&&void 0!==f.default.createPortal,T=function(){return M?f.default.createPortal:f.default.unstable_renderSubtreeIntoContainer},C=function(e){function t(){var e,n,r,a;i(this,t);for(var u=arguments.length,c=Array(u),h=0;h<u;h++)c[h]=arguments[h];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.removePortal=function(){!M&&f.default.unmountComponentAtNode(r.node);var e=s(r.props.parentSelector);e&&e.contains(r.node)?e.removeChild(r.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},r.portalRef=function(e){r.portal=e},r.renderPortal=function(e){var n=T(),i=n(r,d.default.createElement(v.default,l({defaultStyles:t.defaultStyles},e)),r.node);r.portalRef(i)},a=n,o(r,a)}return a(t,e),u(t,[{key:"componentDidMount",value:function(){if(_.canUseDOM){M||(this.node=document.createElement("div")),this.node.className=this.props.portalClassName;s(this.props.parentSelector).appendChild(this.node),!M&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:s(e.parentSelector),nextParent:s(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(_.canUseDOM){var r=this.props,i=r.isOpen,o=r.portalClassName;e.portalClassName!==o&&(this.node.className=o);var a=n.prevParent,s=n.nextParent;s!==a&&(a.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||i)&&!M&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(_.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return _.canUseDOM&&M?(!this.node&&M&&(this.node=document.createElement("div")),T()(d.default.createElement(v.default,l({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){b.setElement(e)}}]),t}(c.Component);C.propTypes={isOpen:m.default.bool.isRequired,style:m.default.shape({content:m.default.object,overlay:m.default.object}),portalClassName:m.default.string,bodyOpenClassName:m.default.string,htmlOpenClassName:m.default.string,className:m.default.oneOfType([m.default.string,m.default.shape({base:m.default.string.isRequired,afterOpen:m.default.string.isRequired,beforeClose:m.default.string.isRequired})]),overlayClassName:m.default.oneOfType([m.default.string,m.default.shape({base:m.default.string.isRequired,afterOpen:m.default.string.isRequired,beforeClose:m.default.string.isRequired})]),appElement:m.default.instanceOf(w.default),onAfterOpen:m.default.func,onRequestClose:m.default.func,closeTimeoutMS:m.default.number,ariaHideApp:m.default.bool,shouldFocusAfterRender:m.default.bool,shouldCloseOnOverlayClick:m.default.bool,shouldReturnFocusAfterClose:m.default.bool,preventScroll:m.default.bool,parentSelector:m.default.func,aria:m.default.object,data:m.default.object,role:m.default.string,contentLabel:m.default.string,shouldCloseOnEsc:m.default.bool,overlayRef:m.default.func,contentRef:m.default.func,id:m.default.string,overlayElement:m.default.func,contentElement:m.default.func},C.defaultProps={isOpen:!1,portalClassName:E,bodyOpenClassName:S,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return d.default.createElement("div",e,t)},contentElement:function(e,t){return d.default.createElement("div",e,t)}},C.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,x.polyfill)(C),t.default=C},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),h=n(32),f=i(h),p=n(516),m=r(p),g=n(517),v=i(g),y=n(165),b=r(y),_=n(520),w=r(_),x=n(115),E=i(x),S=n(166),M=i(S);n(521);var T={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},C=9,O=27,P=0,A=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,i=e.htmlOpenClassName,o=e.bodyOpenClassName;o&&w.remove(document.body,o),i&&w.remove(document.getElementsByTagName("html")[0],i),r&&P>0&&0===(P-=1)&&b.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(m.returnFocus(n.props.preventScroll),m.teardownScopedFocus()):m.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),M.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(m.setupScopedFocus(n.node),m.markForFocusLater()),n.setState({isOpen:!0},function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())})},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){e.keyCode===C&&(0,v.default)(n.content,e),n.props.shouldCloseOnEsc&&e.keyCode===O&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":u(t))?t:{base:T[e],afterOpen:T[e]+"--after-open",beforeClose:T[e]+"--before-close"},i=r.base;return n.state.afterOpen&&(i=i+" "+r.afterOpen),n.state.beforeClose&&(i=i+" "+r.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce(function(n,r){return n[e+"-"+r]=t[r],n},{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return s(t,e),c(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,i=e.bodyOpenClassName;i&&w.add(document.body,i),r&&w.add(document.getElementsByTagName("html")[0],r),n&&(P+=1,b.hide(t)),M.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,i=e.defaultStyles,o=e.children,a=n?{}:i.content,s=r?{}:i.overlay;if(this.shouldBeClosed())return null;var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:l({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=l({id:t,ref:this.setContentRef,style:l({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",l({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(c,o);return this.props.overlayElement(u,d)}}]),t}(d.Component);A.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},A.propTypes={isOpen:f.default.bool.isRequired,defaultStyles:f.default.shape({content:f.default.object,overlay:f.default.object}),style:f.default.shape({content:f.default.object,overlay:f.default.object}),className:f.default.oneOfType([f.default.string,f.default.object]),overlayClassName:f.default.oneOfType([f.default.string,f.default.object]),bodyOpenClassName:f.default.string,htmlOpenClassName:f.default.string,ariaHideApp:f.default.bool,appElement:f.default.instanceOf(E.default),onAfterOpen:f.default.func,onAfterClose:f.default.func,onRequestClose:f.default.func,closeTimeoutMS:f.default.number,shouldFocusAfterRender:f.default.bool,shouldCloseOnOverlayClick:f.default.bool,shouldReturnFocusAfterClose:f.default.bool,preventScroll:f.default.bool,role:f.default.string,contentLabel:f.default.string,aria:f.default.object,data:f.default.object,children:f.default.node,shouldCloseOnEsc:f.default.bool,overlayRef:f.default.func,contentRef:f.default.func,id:f.default.string,overlayElement:f.default.func,contentElement:f.default.func,testId:f.default.string},t.default=A,e.exports=t.default},function(e,t,n){"use strict";function r(){p=!0}function i(){if(p){if(p=!1,!f)return;setTimeout(function(){if(!f.contains(document.activeElement)){((0,d.default)(f)[0]||f).focus()}},0)}}function o(){h.push(document.activeElement)}function a(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==h.length&&(t=h.pop(),t.focus({preventScroll:e})))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function s(){h.length>0&&h.pop()}function l(e){f=e,window.addEventListener?(window.addEventListener("blur",r,!1),document.addEventListener("focus",i,!0)):(window.attachEvent("onBlur",r),document.attachEvent("onFocus",i))}function u(){f=null,window.addEventListener?(window.removeEventListener("blur",r),document.removeEventListener("focus",i)):(window.detachEvent("onBlur",r),document.detachEvent("onFocus",i))}Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=r,t.handleFocus=i,t.markForFocusLater=o,t.returnFocus=a,t.popWithoutFocus=s,t.setupScopedFocus=l,t.teardownScopedFocus=u;var c=n(164),d=function(e){return e&&e.__esModule?e:{default:e}}(c),h=[],f=null,p=!1},function(e,t,n){"use strict";function r(e,t){var n=(0,o.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,i=t.shiftKey,a=n[0],s=n[n.length-1];if(e===document.activeElement){if(!i)return;r=s}if(s!==document.activeElement||i||(r=a),a===document.activeElement&&i&&(r=s),r)return t.preventDefault(),void r.focus();var l=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=l&&"Chrome"!=l[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var u=n.indexOf(document.activeElement);if(u>-1&&(u+=i?-1:1),void 0===(r=n[u]))return t.preventDefault(),r=i?s:a,void r.focus();t.preventDefault(),r.focus()}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(164),o=function(e){return e&&e.__esModule?e:{default:e}}(i);e.exports=t.default},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r;/*!
  Copyright (c) 2015 Jed Watson.
  Based on code that is Copyright 2013-2015, Facebook, Inc.
  All rights reserved.
*/
!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0!==(r=function(){return o}.call(t,n,t,e))&&(e.exports=r)}()},function(e,t,n){"use strict";function r(){}Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=r;var i={},o={},a=function(e,t){return e[t]||(e[t]=0),e[t]+=1,t},s=function(e,t){return e[t]&&(e[t]-=1),t},l=function(e,t,n){n.forEach(function(n){a(t,n),e.add(n)})},u=function(e,t,n){n.forEach(function(n){s(t,n),0===t[n]&&e.remove(n)})};t.add=function(e,t){return l(e.classList,"html"==e.nodeName.toLowerCase()?i:o,t.split(" "))},t.remove=function(e,t){return u(e.classList,"html"==e.nodeName.toLowerCase()?i:o,t.split(" "))}},function(e,t,n){"use strict";function r(){0!==u.length&&u[u.length-1].focusContent()}function i(e,t){s&&l||(s=document.createElement("div"),s.setAttribute("data-react-modal-body-trap",""),s.style.position="absolute",s.style.opacity="0",s.setAttribute("tabindex","0"),s.addEventListener("focus",r),l=s.cloneNode(),l.addEventListener("focus",r)),u=t,u.length>0?(document.body.firstChild!==s&&document.body.insertBefore(s,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(s.parentElement&&s.parentElement.removeChild(s),l.parentElement&&l.parentElement.removeChild(l))}var o=n(166),a=function(e){return e&&e.__esModule?e:{default:e}}(o),s=void 0,l=void 0,u=[];a.default.subscribe(i)},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function i(e){function t(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}this.setState(t.bind(this))}function o(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==a?"\n  "+a:"")+(null!==s?"\n  "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(e,t,n){var r=n(524);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0};i.transform=void 0,i.insertInto=void 0;n(78)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(77)(!1),t.push([e.i,".ReactModal__Overlay {\r\n    z-index: 1000;\r\n}",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i))return e;var o;return o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}},function(e,t,n){var r=n(527);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0};i.transform=void 0,i.insertInto=void 0;n(78)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(77)(!1),t.push([e.i,".image-overlay\r\n{\r\n    cursor: pointer;\r\n    position: absolute;\r\n    width: 100%;\r\n    height: 100%;\r\n    top: 50%;\r\n    left: 50%;\r\n    transform: translate(-50%, -50%);\r\n    z-index: 3;\r\n    background-repeat:no-repeat;\r\n    background-position: center center;\r\n    background-size: 50px 50px;\r\n}\r\n.video-play {\r\n    background-image: url('/Static/prod/images/playIcon.svg');\r\n}\r\n.image-open{\r\n    background-image: url('/Static/prod/images/zoomModal.svg');\r\n}\r\n.form-open{\r\n    background-image: url('/Static/prod/images/zoom_w.svg');\r\n    background-color: #29588C;\r\n    transition: opacity 0.25s;\r\n}\r\n.form-open:hover {\r\n    opacity: 0.95;\r\n}\r\n\r\n.single-teaser-image.single-teaser-image--no-image {\r\n    background-color: #4f90cc !important;\r\n    background-image: url(\"/Static/prod/images/ContentIcons/Blocks/sellingpropositionblock.png\") !important;\r\n    background-size: auto !important;\r\n}",""])},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),d=n(114),h=r(d),f=n(167),p=r(f);n(555),n(557);var m=n(24),g=r(m),v=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={responsive:{0:{items:1},450:{items:2},850:{items:3},1300:{items:4}},products:[]},n.apiRootUrl="/api/imo2020products/getproducts",n.apiInterface={productName:"Name",number:"Number",description:"Description",imageUrl:"ImageUrl",externalUrl:"ExternalUrl"},n.fetchProducts=n.fetchProducts.bind(n),n.mapResponse=n.mapResponse.bind(n),n}return s(t,e),l(t,[{key:"componentDidMount",value:function(){this.fetchProducts()}},{key:"fetchProducts",value:function(){var e=this;g.default.get(this.apiRootUrl).catch(function(e){console.log(e)}).then(function(t){var n=e.mapResponse(t);e.setState({products:n})})}},{key:"mapResponse",value:function(e){var t=this;return e.data.map(function(e,n){return c.default.createElement(h.default,i({key:n,teaserUrl:e.imgSrc,teaserText:e[t.apiInterface.productName],teaserDetails:e[t.apiInterface.description],imageUrl:e[t.apiInterface.imageUrl],imageAlt:e[t.apiInterface.productName],imageTitle:e[t.apiInterface.productName]},"teaserUrl",e[t.apiInterface.externalUrl]),e[t.apiInterface.number]&&c.default.createElement("div",{className:"publishInfo publishInfo--padded text--blue publishInfo__published"},c.default.createElement("span",null,"Product number: ",c.default.createElement("b",null,e[t.apiInterface.number]))))})}},{key:"render",value:function(){var e=this;return c.default.createElement("section",{className:"teasers our-products"},c.default.createElement("div",{className:"carousel-button carousel-button-previous",onClick:function(){return e.Carousel.slidePrev()}}),c.default.createElement("div",{className:"container"},c.default.createElement("h3",{className:"heading heading--tertiary heading--underlined text--blue"},"Our Products"),c.default.createElement("div",{className:"carousel-content"},c.default.createElement(p.default,{buttonsDisabled:!0,items:this.state.products,responsive:this.state.responsive,ref:function(t){return e.Carousel=t}}))),c.default.createElement("div",{className:"carousel-button carousel-button-next",onClick:function(){return e.Carousel.slideNext()}}))}}]),t}(u.Component);t.default=v},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(530)),c=function(){function e(t){o(this,e),l(this,"state",void 0),l(this,"props",void 0),this.state=u.getInitialState(),this.props=u.getInitialProps(t),this.handleSwipeStart=this.handleSwipeStart.bind(this),this.handleSwipeMove=this.handleSwipeMove.bind(this),this.handleSwipeEnd=this.handleSwipeEnd.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this)}return s(e,[{key:"init",value:function(){this.setupTouchListeners(),this.setupMouseListeners()}},{key:"update",value:function(e){var t=this.props,n=Object.assign({},t,e);if(t.element!==n.element)return this.destroy(),this.props=n,void this.init();this.props=n,t.mouseTrackingEnabled!==n.mouseTrackingEnabled&&(n.mouseTrackingEnabled?this.setupMouseListeners():this.cleanupMouseListeners()),t.touchTrackingEnabled!==n.touchTrackingEnabled&&(n.touchTrackingEnabled?this.setupTouchListeners():this.cleanupTouchListeners())}},{key:"destroy",value:function(){this.cleanupMouseListeners(),this.cleanupTouchListeners(),this.state=u.getInitialState(),this.props=u.getInitialProps()}},{key:"setupTouchListeners",value:function(){var e=this.props,t=e.element,n=e.touchTrackingEnabled;if(t&&n){var r=u.checkIsPassiveSupported(),i=u.getOptions(r);t.addEventListener("touchstart",this.handleSwipeStart,i),t.addEventListener("touchmove",this.handleSwipeMove,i),t.addEventListener("touchend",this.handleSwipeEnd,i)}}},{key:"cleanupTouchListeners",value:function(){var e=this.props.element;e&&(e.removeEventListener("touchstart",this.handleSwipeStart),e.removeEventListener("touchmove",this.handleSwipeMove),e.removeEventListener("touchend",this.handleSwipeEnd))}},{key:"setupMouseListeners",value:function(){var e=this.props,t=e.element,n=e.mouseTrackingEnabled,r=e.preventTrackingOnMouseleave;t&&n&&(t.addEventListener("mousedown",this.handleMouseDown),t.addEventListener("mousemove",this.handleMouseMove),t.addEventListener("mouseup",this.handleMouseUp),r&&t.addEventListener("mouseleave",this.handleMouseLeave))}},{key:"cleanupMouseListeners",value:function(){var e=this.props,t=e.element,n=e.preventTrackingOnMouseleave;t&&(t.removeEventListener("mousedown",this.handleMouseDown),t.removeEventListener("mousemove",this.handleMouseMove),t.removeEventListener("mouseup",this.handleMouseUp),n&&t.removeEventListener("mouseleave",this.handleMouseLeave))}},{key:"getPosition",value:function(e){var t=this.state,n=t.x,r=t.y,i=t.start,o=this.props.rotationAngle,a=u.calculateMovingPosition(e),s=u.rotateByAngle(a,o);return u.calculatePosition({x:n,y:r,start:i},s)}},{key:"handleSwipeStart",value:function(e){if(!u.checkIsMoreThanSingleTouches(e)){var t=this.props.rotationAngle,n=u.calculateMovingPosition(e),r=u.rotateByAngle(n,t),i=r.x,o=r.y;this.state={start:Date.now(),x:i,y:o,isSwiping:!1}}}},{key:"handleSwipeMove",value:function(e){var t=this.state,n=t.x,r=t.y;if(n&&r&&!u.checkIsMoreThanSingleTouches(e)){var i=this.getPosition(e),o=i.absX,a=i.absY,s=i.deltaX,l=i.deltaY,c=i.duration,d=this.props,h=d.delta,f=d.onSwiping,p=d.preventDefaultTouchmoveEvent;e.cancelable&&p&&e.preventDefault(),o<Number(h)&&a<Number(h)&&!this.state.isSwiping||(this.state.isSwiping=!0,f&&f(e,s,l,o,a,c))}}},{key:"handleSwipeEnd",value:function(e){var t=this.props,n=t.onSwiped,r=t.onTap;if(this.state.isSwiping){var i=this.getPosition(e),o=i.deltaX,a=i.deltaY,s=i.absX,l=i.absY,c=i.duration;n&&n(e,o,a,s,l,c)}else r&&r(e);this.state=u.getInitialState()}},{key:"handleMouseDown",value:function(e){this.handleSwipeStart(e)}},{key:"handleMouseMove",value:function(e){this.handleSwipeMove(e)}},{key:"handleMouseUp",value:function(e){this.handleSwipeEnd(e)}},{key:"handleMouseLeave",value:function(){var e=this.props.element,t=this.state.isSwiping;e&&t&&e.dispatchEvent(new Event("mouseup",{bubbles:!0,cancelable:!0}))}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(531);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var i=n(532);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var o=n(533);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var a=n(169);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var s=n(534);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})});var l=n(535);Object.keys(l).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})});var u=n(170);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})});var c=n(536);Object.keys(c).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})});var d=n(537);Object.keys(d).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})});var h=n(168);Object.keys(h).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})});var f=n(538);Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialState=void 0;var r=function(){return{x:0,y:0,start:0,isSwiping:!1}};t.getInitialState=r},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialProps=void 0;var a=function(){return i({element:null,delta:10,rotationAngle:0,mouseTrackingEnabled:!1,touchTrackingEnabled:!0,preventDefaultTouchmoveEvent:!1,preventTrackingOnMouseleave:!1},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})};t.getInitialProps=a},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={isPassiveSupported:e};try{var n=(0,i.createOptions)(t);window.addEventListener("checkIsPassiveSupported",o,n),window.removeEventListener("checkIsPassiveSupported",o,n)}catch(e){}return t.isPassiveSupported}Object.defineProperty(t,"__esModule",{value:!0}),t.checkIsPassiveSupported=r,t.noop=void 0;var i=n(168),o=function(){};t.noop=o},function(e,t,n){"use strict";function r(e,t){var n=e.x-t.x,r=e.y-t.y,a=Math.abs(n),s=Math.abs(r),l=(0,i.calculateDuration)(e.start,Date.now());return{deltaX:n,deltaY:r,absX:a,absY:s,duration:l,velocity:(0,o.calculateVelocity)(a,s,l)}}Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePosition=r;var i=n(169),o=n(170)},function(e,t,n){"use strict";function r(e){if("changedTouches"in e){var t=e.changedTouches&&e.changedTouches[0];return{x:t&&t.clientX,y:t&&t.clientY}}return{x:e.clientX,y:e.clientY}}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateMovingPosition=r},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0===t)return e;var n=e.x,r=e.y,i=Math.PI/180*t;return{x:n*Math.cos(i)+r*Math.sin(i),y:r*Math.cos(i)-n*Math.sin(i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.rotateByAngle=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkIsMoreThanSingleTouches=void 0;var r=function(e){return Boolean(e.touches&&e.touches.length>1)};t.checkIsMoreThanSingleTouches=r},function(e,t,n){"use strict";function r(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?{passive:!1}:{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOptions=r},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e,t){var n=t||{},r=n.position,i=void 0===r?0:r,o=n.duration,a=void 0===o?0:o,s=n.transitionTimingFunction,u=void 0===s?"step-start":s;return l.isElement(e)&&(e.style.transition="transform ".concat(a,"ms ").concat(u),e.style.transform="translate3d(".concat(i,"px, 0, 0)")),e}function a(e){var t=s(e),n=t&&t[4]||"";return Number(n)}function s(e){if(l.isElement(e)){return getComputedStyle(e).transform.match(/(-?[0-9.]+)/g)||[]}return[]}Object.defineProperty(t,"__esModule",{value:!0}),t.animate=o,t.getTranslateX=a,t.getTransformMatrix=s,t.isAnimatedItem=t.getTranslate3dPosition=void 0;var l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(36)),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.itemWidth,r=t.items,i=t.infinite,o=t.stagePadding,a=void 0===o?{}:o;if(i){var s=a.paddingLeft,l=a.paddingRight;(s||l)&&(e+=1)}return(r+e)*-n||0};t.getTranslate3dPosition=u;var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.allowFadeOutAnimation,r=t.fadeOutIndex;return!!n&&r===e};t.isAnimatedItem=c},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateInitialProps=t.setTotalItemsInSlide=t.preserveProps=void 0;var l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(36)),u=function(e,t){return(e||{}).preservePosition?a({},e,{},t):e};t.preserveProps=u;var c=function(e,t){var n=1;if(e){var r=Object.keys(e);r.length&&r.forEach(function(r){r<window.innerWidth&&(n=Math.min(e[r].items,t)||n)})}return n};t.setTotalItemsInSlide=c;var d=function(e,t){var n=e.startIndex,r=e.responsive,i=e.infinite,o=e.autoPlay,a=l.getDefaultStyles(),s=l.getSlides(e),u=l.getStagePadding(e),d=c(r,s.length),h=l.setStartIndex(s.length,n),f=l.getElementDimensions(t),p=f.width,m=l.getItemWidth(p,d);return{items:d,itemWidth:m,currentIndex:h,slides:s,clones:l.cloneCarouselItems(s,d,{stagePadding:u,infinite:i}),infinite:i,translate3d:l.getTranslate3dPosition(h,{itemWidth:m,items:d,stagePadding:u,infinite:i}),stagePadding:u,style:a,isAutoPlaying:o}};t.calculateInitialProps=d},function(e,t,n){"use strict";function r(){if(window.__DEBUG__){var e;return(e=console).debug.apply(e,arguments),arguments}}Object.defineProperty(t,"__esModule",{value:!0}),t.debug=r},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e){if(e&&e.getBoundingClientRect){var t=e.getBoundingClientRect();return{width:t.width,height:t.height}}return{}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.width!==n.width}function s(e,t){var n=e||{},r=n.dotsDisabled,i=n.controlsStrategy,o=t||{},a=o.items,s=o.slides;return!!r||"responsive"===i&&a===s.length}Object.defineProperty(t,"__esModule",{value:!0}),t.getElementDimensions=o,t.shouldHandleResizeEvent=a,t.shouldDisableDots=s,t.getCurrentIndex=t.getNextItemIndexBeforeTouchEnd=t.isElement=t.getSlideInfo=t.getGalleryItemHeight=t.getNextItem=t.getItemWidth=t.isStagePadding=t.getStagePadding=t.itemInfo=t.getSlides=t.cloneCarouselItems=void 0;var l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(36)),u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=t||1,i=n||{},o=i.stagePadding,a=i.infinite,s=o||{},l=s.paddingLeft,u=s.paddingRight;if(r>e.length&&(r=e.length),a&&(l||u)){if(!(t<e.length)){var c=e.slice(-1),d=e.slice(0,1);return[].concat(c.concat(e),e,e.concat(d))}r=t+1}var h=e.slice(0,r);return[].concat(e.slice(e.length-r),e,h)};t.cloneCarouselItems=u;var c=function(e){var t=e||{},n=t.children,r=t.items,i=void 0===r?[]:r;return n&&n.length?n:i};t.getSlides=c;var d=function(e){var t=e||{},n=t.items,r=t.currentIndex,i=t.infinite,o=t.slides,a=void 0===o?[]:o;return{isPrevSlideDisabled:!1===i&&0===r,isNextSlideDisabled:!1===i&&a.length-n===r}};t.itemInfo=d;var h=function(e){var t=e||{},n=t.stagePadding,r=void 0===n?{}:n;return{paddingLeft:Math.abs(r.paddingLeft)||0,paddingRight:Math.abs(r.paddingRight)||0}};t.getStagePadding=h;var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stagePadding||{},n=t.paddingLeft,r=t.paddingRight;return n||r};t.isStagePadding=f;var p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=Number(e),r=Number(t);return n&&r>0?n/r:0};t.getItemWidth=p;var m=function(e,t){var n=e&&e.children||[];return n[t]&&n[t].firstChild||null};t.getNextItem=m;var g=function(e,t,n){var r=n.currentIndex,i=l.calculateSlidesOffset(t,n),o=l.getIndexForItemHeightCalculation(r,i),a=m(e,o);if(y(a)){var s=getComputedStyle(a),u=parseFloat(s.marginTop),c=parseFloat(s.marginBottom);return Math.ceil(a.offsetHeight+u+c)}};t.getGalleryItemHeight=g;var v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e+1;return n<1?n=t:n>t&&(n=1),{slideIndex:n,slidesLength:t}};t.getSlideInfo=v;var y=function(e){try{return e instanceof Element||e instanceof HTMLDocument}catch(e){return!1}};t.isElement=y;var b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.infinite,r=t.items,i=void 0===r?1:r,o=t.itemWidth,a=void 0===o?0:o,s=t.slides,l=void 0===s?[]:s,u=t.stagePadding,c=void 0===u?{}:u,d=c.paddingLeft,h=c.paddingRight;if(a<=0||i>l.length)return 0;var f=_(e,a,i);return n&&(d||h)&&(f-=1),f===l.length?0:f<0?l.length+f:f};t.getNextItemIndexBeforeTouchEnd=b;var _=function(e,t,n){var r=Math.abs(e/t);return Math.floor(r)-n};t.getCurrentIndex=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSwipePositionOnBeforeTouchEnd=t.getSwipeIndexOnBeforeTouchEnd=t.getSwipeIndex=t.getSwipeOffset=t.getSwipeDirection=t.calculateSwipeIndex=t.isVerticalTouchMoveDetected=void 0;var r=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:20;return n>t&&t<r};t.isVerticalTouchMoveDetected=r;var i=function(e,t,n){return s(t,e)+a(n)};t.calculateSwipeIndex=i;var o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.round(100*(e-t))<0?"LEFT":"RIGHT"};t.getSwipeDirection=o;var a=function(e){return"LEFT"===e?1:0};t.getSwipeOffset=a;var s=function(e,t){var n=Math.abs(e);return Math.floor(n/t)};t.getSwipeIndex=s;var l=function(e,t){return e-t||0};t.getSwipeIndexOnBeforeTouchEnd=l;var u=function(e,t){return e*-t||0};t.getSwipePositionOnBeforeTouchEnd=u},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];n&&clearTimeout(n),n=setTimeout(function(){e.apply(r,o),n=null},t)}}function i(e,t){var n,r,i;return function(){if(n)return r=arguments,void(i=this);e.apply(this,arguments),n=!0,setTimeout(function(){n=!1,r&&(e.apply(i,r),r=i=null)},t)}}Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=r,t.throttle=i},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.getIndexForItemHeightCalculation=t.calculateSlidesOffset=t.recalculateTranslatePosition=t.recalculateCurrentSlideIndex=t.isTheLastDotIndex=t.getItemIndexForDotNavigation=t.getDotsNavigationLength=t.getMaxSwipeLimitIfNotInfinite=t.shouldRecalculateSwipePosition=t.getMinSwipeLimitIfNotInfinite=t.getSlideOffset=t.getMaxSwipeLimit=t.getMinSwipeLimit=t.getMinSwipePosition=t.getMaxSwipePosition=t.recalculateCurrentIndexOnBeforeTouchEnd=t.recalculatePositionOnBeforeTouchEnd=t.getFadeOutOffsetOnClick=t.getFadeOutIndexOnClick=t.getFadeOutOffsetOnDotClick=t.setStartIndex=t.getSlideIndexForMultipleItems=t.getSlideIndexForNotMultipleItems=t.getActiveSlideIndex=t.getDotsLength=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(36)),a=function(e,t){if(e&&t){var n=Math.floor(e/t);return e%t==0?n-1:n}return 0};t.getDotsLength=a;var s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.currentIndex,r=t.items,i=t.slides,o=void 0===i?[]:i,a=n+r,s=o.length;return 1===r?l(a,r,s):u(a,r,s,e)};t.getActiveSlideIndex=s;var l=function(e,t,n){return e<t?n-t:e>n?0:e-1};t.getSlideIndexForNotMultipleItems=l;var u=function(e,t,n,r){var i=a(n,t);return e===n+t?0:r||e<t&&0!==e?i:0===e?n%t==0?i:i-1:t>0?Math.floor(e/t)-1:0};t.getSlideIndexForMultipleItems=u;var c=function(e,t){var n=t?Math.abs(Math.ceil(t)):0;return Math.min(n,e-1)||0};t.setStartIndex=c;var d=function(e,t,n){return e<t?(t-e)*-n||0:(e-t)*n||0};t.getFadeOutOffsetOnDotClick=d;var h=function(e){return 0===e?1:e+1};t.getFadeOutIndexOnClick=h;var f=function(e,t){return"next"===e?t:-t};t.getFadeOutOffsetOnClick=f;var p=function(e,t){return-v(e,t)};t.recalculatePositionOnBeforeTouchEnd=p;var m=function(e,t){return e-t||0};t.recalculateCurrentIndexOnBeforeTouchEnd=m;var g=function(e,t,n){return(n+e)*t||0};t.getMaxSwipePosition=g;var v=function(e,t){return e*t||0};t.getMinSwipePosition=v;var y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.paddingLeft;return(void 0===n?0:n)?e:0};t.getMinSwipeLimit=y;var b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.paddingRight;return(void 0===r?0:r)?e+n:e};t.getMaxSwipeLimit=b;var _=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250;return Math.min(e/2,t)||0};t.getSlideOffset=_;var w=function(e,t){return e*t-_(t)||0};t.getMinSwipeLimitIfNotInfinite=w;var x=function(e,t,n){return e>=0-t||Math.abs(e)>=n};t.shouldRecalculateSwipePosition=x;var E=function(e,t){return e*t+_(t)||0};t.getMaxSwipeLimitIfNotInfinite=E;var S=function(e,t){return 0!==Number(t)?Math.ceil(e/t)||0:0};t.getDotsNavigationLength=S;var M=function(e,t,n,r){return(t?n-r:e*r)||0};t.getItemIndexForDotNavigation=M;var T=function(e,t,n){return!1===t&&e===n-1};t.isTheLastDotIndex=T;var C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.currentIndex,n=e.slides,r=void 0===n?[]:n;return t<0?r.length-1:0};t.recalculateCurrentSlideIndex=C;var O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.items,n=e.itemWidth,r=e.stagePadding,i=void 0===r?{}:r,o=e.slides,a=void 0===o?[]:o,s=a.length-1,l=e.currentIndex<0?s:0,u=0===l?t:s+t;return i.paddingLeft||i.paddingRight?(u+1)*-n||0:u*-n||0};t.recalculateTranslatePosition=O;var P=function(e,t){return t.items+(t.infinite&&o.isStagePadding(e)?1:0)};t.calculateSlidesOffset=P;var A=function(e,t){return e+t};t.getIndexForItemHeightCalculation=A},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.getWrapperStyles=t.getStageStyles=t.getDefaultStyles=t.itemStyles=t.getIntermediateTransitionProps=void 0;var l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(36)),u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e?{fadeoutAnimationProcessing:!0,style:{transition:"transform 0ms"}}:{style:{transition:"transform ".concat(t,"ms ").concat(n)}}};t.getIntermediateTransitionProps=u;var c=function(e,t,n){var r=n||{},i=r.fadeOutOffset,o=void 0===i?0:i,a=t||{},s=a.itemWidth,u=void 0===s?0:s,c=a.duration,d=void 0===c?0:c;return l.isAnimatedItem(e,n)?{transform:"translateX(".concat(o,"px)"),animationDuration:"".concat(d,"ms"),width:"".concat(u,"px")}:{width:"".concat(u,"px")}};t.itemStyles=c;var d=function(e){var t=e||{},n=t.duration,r=void 0===n?0:n,i=t.transitionTimingFunction,o=void 0===i?"":i;return{transition:"transform ".concat(r,"ms ").concat(o)}};t.getDefaultStyles=d;var h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.translate3d,r=void 0===n?0:n,i=e.height;return a({},t,{transform:"translate3d(".concat(r,"px, 0, 0)"),height:i})};t.getStageStyles=h;var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=l.getStagePadding(t),i=r.paddingLeft,o=r.paddingRight,a=t.autoHeight&&l.getGalleryItemHeight(e,t,n);return{height:a,transition:a&&"height ".concat(n.duration,"ms"),paddingLeft:"".concat(i,"px"),paddingRight:"".concat(o,"px")}};t.getWrapperStyles=f},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}Object.defineProperty(t,"__esModule",{value:!0}),t.itemClassName=t.isClonedItem=t.isActiveItem=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(36)),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.currentIndex,r=t.items,i=t.infinite,o=t.stagePadding,a=void 0===o?{}:o;i&&(a.paddingLeft||a.paddingRight)&&(n+=1);var s=n+r;return e>=s&&e<s+r};t.isActiveItem=a;var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.infinite,r=t.items,i=t.slides,o=void 0===i?[]:i;return!1===n&&(e<r||e>o.length+r-1)};t.isClonedItem=s;var l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"alice-carousel__stage-item"+(a(e,t)?" __active":"")+(s(e,t)?" __cloned":"")+(o.isAnimatedItem(e,n)?" animated animated-out fadeOut":"")};t.itemClassName=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(549);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var i=n(550);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var o=n(551);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var a=n(552);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var s=n(553);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})})},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SlideInfo=void 0;var a=o(n(1)),s=o(n(32)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(36)),u=function(e){var t=e.currentIndex,n=e.slidesLength,r=l.getSlideInfo(t,n);return a.default.createElement("div",{className:"alice-carousel__slide-info"},a.default.createElement("span",{className:"alice-carousel__slide-info-item"},r.slideIndex),a.default.createElement("span",{className:"alice-carousel__slide-info-item alice-carousel__slide-info-item--separator"},"/"),a.default.createElement("span",{className:"alice-carousel__slide-info-item"},r.slidesLength))};t.SlideInfo=u,u.propTypes={currentIndex:s.default.number.isRequired,slidesLength:s.default.number.isRequired}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.StageItem=void 0;var i=r(n(1)),o=r(n(32)),a=function(e){var t=e.item,n=e.className,r=e.styles;return i.default.createElement("li",{style:r,className:n},t)};t.StageItem=a,a.propTypes={item:o.default.node,className:o.default.string.isRequired,styles:o.default.object.isRequired}},function(e,t,n){"use strict";function r(e){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.DotsNavigation=void 0;var a=o(n(1)),s=o(n(32)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(n(36)),u=function(e){var t=e.state,n=e.onClick,r=e.onMouseEnter,i=e.onMouseLeave,o=t.slides,s=t.items,u=t.infinite,c=l.itemInfo(t),d=c.isNextSlideDisabled,h=l.getDotsNavigationLength(o.length,s);return a.default.createElement("ul",{className:"alice-carousel__dots"},o.map(function(e,c){if(c<h){var f=l.isTheLastDotIndex(c,u,h),p=l.getItemIndexForDotNavigation(c,f,o.length,s),m=l.getActiveSlideIndex(d,t),g=m===c?" __active":"";return a.default.createElement("li",{key:"dot-item-".concat(c),onClick:function(){return n(p)},onMouseEnter:r,onMouseLeave:i,className:"alice-carousel__dots-item".concat(g)})}}))};t.DotsNavigation=u,u.propTypes={state:s.default.object.isRequired,onClick:s.default.func.isRequired,onMouseEnter:s.default.func,onMouseLeave:s.default.func}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.PlayPauseButton=void 0;var i=r(n(1)),o=r(n(32)),a=function(e){var t=e.isPlaying,n=e.onClick;return i.default.createElement("div",{className:"alice-carousel__play-btn"},i.default.createElement("div",{className:"alice-carousel__play-btn-wrapper"},i.default.createElement("div",{onClick:n,className:"alice-carousel__play-btn-item".concat(t?" __pause":"")})))};t.PlayPauseButton=a,a.propTypes={isPlaying:o.default.bool,onClick:o.default.func}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.PrevNextButton=void 0;var i=r(n(1)),o=r(n(32)),a=function(e){var t=e.name,n=e.disabled,r=e.onClick,o="alice-carousel__".concat(t,"-btn-item").concat(n?" __inactive":"");return i.default.createElement("div",{className:"alice-carousel__".concat(t,"-btn")},i.default.createElement("div",{className:"alice-carousel__".concat(t,"-btn-wrapper")},i.default.createElement("p",{className:o,onClick:r},i.default.createElement("span",{"data-area":t}))))};t.PrevNextButton=a,a.propTypes={name:o.default.oneOf(["next","prev"]),disabled:o.default.bool.isRequired,onClick:o.default.func.isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=t.propTypes=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(32)),i={autoHeight:r.default.bool,autoPlay:r.default.bool,autoPlayDirection:r.default.string,autoPlayInterval:r.default.number,buttonsDisabled:r.default.bool,children:r.default.array,controlsStrategy:r.default.oneOf(["default","responsive"]),disableAutoPlayOnAction:r.default.bool,dotsDisabled:r.default.bool,duration:r.default.number,fadeOutAnimation:r.default.bool,infinite:r.default.bool,items:r.default.array,keysControlDisabled:r.default.bool,mouseTrackingEnabled:r.default.bool,onInitialized:r.default.func,onResized:r.default.func,onSlideChange:r.default.func,onSlideChanged:r.default.func,playButtonEnabled:r.default.bool,preventEventOnTouchMove:r.default.bool,responsive:r.default.object,shouldHandleResizeEvent:r.default.func,showSlideInfo:r.default.bool,slideToIndex:r.default.number,stagePadding:r.default.object,startIndex:r.default.number,stopAutoPlayOnHover:r.default.bool,swipeDelta:r.default.number,swipeDisabled:r.default.bool,touchTrackingEnabled:r.default.bool,transitionTimingFunction:r.default.string};t.propTypes=i;var o={autoHeight:!1,autoPlay:!1,autoPlayDirection:"ltr",autoPlayInterval:250,buttonsDisabled:!1,children:[],controlsStrategy:"default",disableAutoPlayOnAction:!1,dotsDisabled:!1,duration:250,fadeOutAnimation:!1,infinite:!0,items:[],keysControlDisabled:!1,mouseTrackingEnabled:!1,playButtonEnabled:!1,preservePosition:!1,preventEventOnTouchMove:!1,responsive:{},showSlideInfo:!1,slideToIndex:0,stagePadding:{},startIndex:0,stopAutoPlayOnHover:!0,swipeDisabled:!1,swipeDelta:10,touchTrackingEnabled:!0,transitionTimingFunction:"ease-out"};t.defaultProps=o},function(e,t,n){var r=n(556);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0};i.transform=void 0,i.insertInto=void 0;n(78)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(77)(!1),t.push([e.i,".alice-carousel {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  margin: auto;\n  direction: ltr; }\n\n.alice-carousel__wrapper {\n  position: relative;\n  overflow: hidden;\n  box-sizing: border-box;\n  width: 100%;\n  height: auto; }\n\n.alice-carousel__stage {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  white-space: nowrap; }\n  .alice-carousel__stage-item {\n    position: relative;\n    display: inline-block;\n    width: 100%;\n    height: 100%;\n    vertical-align: top;\n    white-space: normal;\n    line-height: 0; }\n    .alice-carousel__stage-item * {\n      line-height: initial; }\n    .alice-carousel__stage-item.__cloned {\n      visibility: hidden;\n      opacity: 0; }\n\n.alice-carousel__prev-btn,\n.alice-carousel__next-btn {\n  display: inline-block;\n  box-sizing: border-box;\n  width: 50%;\n  padding: 15px 10px; }\n  .alice-carousel__prev-btn [data-area]::after,\n  .alice-carousel__next-btn [data-area]::after {\n    position: relative;\n    content: attr(data-area);\n    text-transform: capitalize; }\n\n.alice-carousel__prev-btn {\n  text-align: right; }\n\n.alice-carousel__prev-btn-item,\n.alice-carousel__next-btn-item {\n  display: inline-block;\n  cursor: pointer;\n  color: #465798; }\n  .alice-carousel__prev-btn-item:hover,\n  .alice-carousel__next-btn-item:hover {\n    color: darkred; }\n  .alice-carousel__prev-btn-item.__inactive,\n  .alice-carousel__next-btn-item.__inactive {\n    opacity: 0.4; }\n\n.alice-carousel__play-btn {\n  position: absolute;\n  top: 30px;\n  left: 20px;\n  display: inline-block; }\n  .alice-carousel__play-btn:hover {\n    cursor: pointer; }\n  .alice-carousel__play-btn-wrapper {\n    position: relative;\n    width: 32px;\n    height: 32px;\n    padding: 10px;\n    border-radius: 50%;\n    background-color: #fff; }\n\n.alice-carousel__play-btn-item {\n  position: absolute;\n  width: 32px;\n  height: 32px;\n  cursor: pointer;\n  border: 0;\n  outline: none;\n  background: transparent; }\n  .alice-carousel__play-btn-item::before, .alice-carousel__play-btn-item::after {\n    position: absolute;\n    pointer-events: none;\n    display: block;\n    width: 0;\n    height: 0;\n    content: '';\n    transition: all 0.3s linear;\n    border-width: 8px 0 8px 15px;\n    border-style: solid;\n    border-color: transparent;\n    border-left-color: #465798; }\n  .alice-carousel__play-btn-item::before {\n    left: 5px;\n    height: 14px; }\n  .alice-carousel__play-btn-item::after {\n    top: 7px;\n    left: 18px; }\n  .alice-carousel__play-btn-item.__pause::before, .alice-carousel__play-btn-item.__pause::after {\n    height: 30px;\n    border-width: 0 0 0 10px; }\n  .alice-carousel__play-btn-item.__pause::after {\n    top: 0;\n    left: 18px; }\n\n.alice-carousel__dots {\n  margin: 30px 3px 5px;\n  padding: 0;\n  list-style: none;\n  text-align: center; }\n  .alice-carousel__dots-item {\n    display: inline-block;\n    width: 8px;\n    height: 8px;\n    margin-right: 15px;\n    cursor: pointer;\n    border-radius: 50%;\n    background-color: #e0e4fb; }\n    .alice-carousel__dots-item:hover, .alice-carousel__dots-item.__active {\n      background-color: #6e7ebc; }\n\n.alice-carousel__slide-info {\n  position: absolute;\n  top: 20px;\n  right: 20px;\n  display: inline-block;\n  padding: 5px 10px;\n  color: #465798;\n  border-radius: 5px;\n  background-color: rgba(224, 228, 251, 0.6); }\n  .alice-carousel__slide-info-item {\n    vertical-align: middle;\n    line-height: 0; }\n\n.alice-carousel .animated {\n  animation-fill-mode: both; }\n\n.alice-carousel .animated-out {\n  z-index: 1; }\n\n.alice-carousel .fadeOut {\n  animation-name: fadeOut; }\n\n@keyframes fadeOut {\n  0% {\n    opacity: 1; }\n  100% {\n    opacity: 0;\n    visibility: hidden; } }\n",""])},function(e,t,n){var r=n(558);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0};i.transform=void 0,i.insertInto=void 0;n(78)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(77)(!1),t.push([e.i,".carousel-button{\r\n    cursor: pointer;\r\n}\r\n\r\n.carousel-button-next::after{\r\n    content:url('/Static/prod/images/nextSlide.svg')\r\n}\r\n\r\n.carousel-button-previous::after{\r\n    content:url('/Static/prod/images/previousSlide.svg')\r\n}\r\n\r\n.carousel-content .alice-carousel__stage-item {\r\n    padding-right: 31px;\r\n    padding-left: 31px;\r\n}\r\n\r\n.our-products{\r\n    display: flex;\r\n    flex-wrap: nowrap;\r\n    justify-content: center;\r\n    align-items: center;\r\n}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=function(e){return(e.date||e.authorName)&&i.default.createElement("div",{className:"publishInfo publishInfo--padded text--blue"},i.default.createElement("p",null,e.date&&i.default.createElement("span",{className:"publishInfo__divider"}," | "),e.date&&i.default.createElement("span",{className:"publishInfo__published"},i.default.createElement("time",{dateTime:e.dateMicro},e.date)),i.default.createElement("br",null),e.authorName,e.authorTitle&&","," ",e.authorTitle))};t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(561),d=r(c),h=n(562),f=r(h),p=n(568),m=r(p),g=n(569),v=r(g),y=n(116),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(y),_=n(24),w=r(_),x=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={mapLocations:n.props.coordinates,isModalActive:!1,modalMarkers:[],modalContent:null},n.googleMapRef=(0,l.createRef)(),n.loaderRef=(0,l.createRef)(),n.addGoogleScript=n.addGoogleScript.bind(n),n.addClustererScript=n.addClustererScript.bind(n),n.createMap=n.createMap.bind(n),n.fetchMapPoints=n.fetchMapPoints.bind(n),n.createMarkers=n.createMarkers.bind(n),n.addClusterer=n.addClusterer.bind(n),n.updateClusterer=n.updateClusterer.bind(n),n.getMarkerByPointId=n.getMarkerByPointId.bind(n),n.setMarkerVisibility=n.setMarkerVisibility.bind(n),n.focusMarker=n.focusMarker.bind(n),n.handleMarkerClick=n.handleMarkerClick.bind(n),n.handleClusterClick=n.handleClusterClick.bind(n),n.getMarkerInfo=n.getMarkerInfo.bind(n),n.setModalActive=n.setModalActive.bind(n),n.getBusinessCard=n.getBusinessCard.bind(n),n.createModalContent=n.createModalContent.bind(n),n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.addGoogleScript()}},{key:"componentDidUpdate",value:function(e,t){t.modalMarkers!==this.state.modalMarkers&&this.createModalContent()}},{key:"fetchMapPoints",value:function(){var e=this,t="",n={};this.props.guid?(t=b.locationsAPIurls.single,n={guid:this.props.guid}):t=b.locationsAPIurls.all,w.default.get(t,{params:n}).then(function(t){var n=t.data;n.map(function(e){e.typeVariable=e.Type,e.Type=b.officeNameMap[e.Type]}),e.setState({mapLocations:n}),e.createMap()})}},{key:"addGoogleScript",value:function(){var e=document.querySelector("[src*='"+b.googleMapsAPIurl+"']");e||(e=document.createElement("script"),e.setAttribute("async",""),e.src=b.googleMapsAPIurl,document.querySelector("body").appendChild(e)),e.addEventListener("load",this.props.coordinates?this.createMap:this.fetchMapPoints)}},{key:"addClustererScript",value:function(){var e=document.createElement("script");e.setAttribute("async",""),e.src="/Static/prod/js/markerclusterer_custom.min.js",e.addEventListener("load",this.addClusterer),document.querySelector("body").appendChild(e)}},{key:"createMap",value:function(){var e={};1==this.state.mapLocations.length?(e.lat=this.state.mapLocations[0][b.requestNamesMap.latitude],e.lng=this.state.mapLocations[0][b.requestNamesMap.longitude]):(e.lat=0,e.lng=0),this.map=new google.maps.Map(this.googleMapRef.current,{center:e,zoom:b.mapZoom[this.props.mapSize],mapTypeControl:!1,disableDefaultUI:!0,backgroundColor:"none",styles:b.mapStyles,minZoom:b.mapZoom.large,maxZoom:b.mapZoom.small,isVisible:!1,zoomControl:!0,zoomTypeControlOptions:{position:google.maps.ControlPosition.CENTER_RIGHT}}),this.createMarkers()}},{key:"createMarkers",value:function(){var e=this;this.markers=[],this.state.mapLocations.map(function(t){var n=new google.maps.Marker({position:new google.maps.LatLng(t[b.requestNamesMap.latitude],t[b.requestNamesMap.longitude]),map:e.map,title:t[b.requestNamesMap.name],icon:b.markerStyles[b.markerStyleTypeMap[t.typeVariable]],info:"",url:t[b.requestNamesMap.url],type:t[b.requestNamesMap.type],pointId:t[b.requestNamesMap.id]});e.markers.push(n)}),"large"===this.props.mapSize?(this.addClustererScript(),this.markers.map(function(t){google.maps.event.addListener(t,"click",function(){this.handleMarkerClick(t)}.bind(e))})):this.loaderRef.current.remove()}},{key:"addClusterer",value:function(){this.markerCluster=new MarkerClusterer(this.map,this.markers,b.clusterOptions),google.maps.event.addListener(this.markerCluster,"clusterclick",function(e){this.handleClusterClick(e)}.bind(this)),this.loaderRef.current.remove()}},{key:"updateClusterer",value:function(e){this.markerCluster.clearMarkers(),this.markerCluster.addMarkers(e)}},{key:"setMarkerVisibility",value:function(e){var t=[];if(e.length===this.markers.length)t=this.markers.filter(function(e){return e.setVisible(!0),e});else{var n=void 0;t=this.markers.filter(function(t){if(n=e.find(function(e){if(e[b.requestNamesMap.id]===t.pointId)return t.setVisible(!0),e;t.setVisible(!1)}))return t})}this.updateClusterer(t),this.map.setZoom(b.mapZoom.large)}},{key:"focusMarker",value:function(e){var t=this.getMarkerByPointId(e);t&&this.map.setCenter(t.getPosition())}},{key:"getMarkerInfo",value:function(e){var t=this;w.default.get(b.locationsAPIurls.info,{params:{guid:e.pointId}}).catch(function(e){e.response?(console.log(e.response.data),console.log(e.response.status),console.log(e.response.headers)):e.request?console.log(e.request):console.log("Error",e.message),console.log(e.config)}).then(function(n){n&&n.data&&(e.info=n.data,t.state.modalMarkers.includes(e)&&t.createModalContent())})}},{key:"getMarkerByPointId",value:function(e){return this.markers.find(function(t){if(t.pointId===e)return t})}},{key:"handleMarkerClick",value:function(e){this.setState({isModalActive:!0,modalMarkers:[e]},this.focusMarker(e.pointId)),e.info||this.getMarkerInfo(e)}},{key:"handleClusterClick",value:function(e){var t=this;this.map.zoom===b.mapZoom.small&&e.markers_&&e.markers_.length&&(this.setState({isModalActive:!0,modalMarkers:e.markers_},this.map.setCenter(e.center_)),e.markers_.forEach(function(e){e.info||t.getMarkerInfo(e)}))}},{key:"setModalActive",value:function(e){this.setState({isModalActive:e,modalContent:null})}},{key:"createModalContent",value:function(){var e=this,t=void 0;if(this.state.modalMarkers){var n=this.state.modalMarkers;if(1===n.length)n[0].info&&(t=this.getBusinessCard(n[0]));else{var r=[];this.state.modalMarkers.map(function(t){var n=u.default.createElement(u.default.Fragment,null,u.default.createElement("span",{className:"contact-location__icon contact-location__icon--"+b.officeIconClassMap[t.type]}),u.default.createElement("p",{className:"accordion__description"},t.type),u.default.createElement("h3",{className:"accordion__title"},u.default.createElement("a",{className:"accordion__title-link",id:"modal-button",href:t.url},t.title))),i=u.default.createElement(u.default.Fragment,null,e.getBusinessCard(t));r.push({index:t.pointId,accordionTrigger:n,accordionContent:i})}),t=u.default.createElement(u.default.Fragment,null,u.default.createElement("span",{className:"icon--aggregated"}),u.default.createElement(v.default,{sections:r}))}}this.setState({modalContent:t})}},{key:"getBusinessCard",value:function(e){return u.default.createElement(u.default.Fragment,null,u.default.createElement("div",{dangerouslySetInnerHTML:{__html:e.info}}),u.default.createElement("a",{className:"listLink",id:"modal-button",href:e.url},"Contact us about services in ",e.title))}},{key:"render",value:function(){var e=void 0,t=void 0,n=void 0;if(1===this.state.mapLocations.length){var r=this.state.mapLocations[0];e=u.default.createElement(d.default,{lat:r[b.requestNamesMap.latitude],lng:r[b.requestNamesMap.longitude]})}else this.state.mapLocations.length>1&&(t=u.default.createElement(f.default,{setMarkerVisibility:this.setMarkerVisibility,focusMarker:this.focusMarker,locations:this.state.mapLocations}),n=u.default.createElement(m.default,{isActive:this.state.isModalActive,modalContent:this.state.modalContent,setModalActive:this.setModalActive,hasLargeContent:this.state.modalMarkers.length>1}));return u.default.createElement("div",{className:"map-component"},t,u.default.createElement("div",{className:"map-component__map map-component__map--"+this.props.mapSize,ref:this.googleMapRef}),u.default.createElement("div",{className:"loader--full-screen",ref:this.loaderRef},u.default.createElement("div",{className:"loader__icon"})),n,e)}}]),t}(l.Component);t.default=x},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(116),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),d=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){return l.default.createElement("a",{target:"_blank",className:"map-component__link",href:c.googleMapsWebUrl+this.props.lat+","+this.props.lng},"Show in Google Maps")}}]),t}(s.Component);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(117),d=r(c),h=n(567),f=r(h),p=n(116),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),g=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={activeFilterButton:"all",filteredLocations:n.props.locations,filterQuery:""},n.handleActiveFilterButtonChange=n.handleActiveFilterButtonChange.bind(n),n.handleSuggestionClick=n.handleSuggestionClick.bind(n),n.handleFilterQueryChange=n.handleFilterQueryChange.bind(n),n.filterByQuery=n.filterByQuery.bind(n),n.filterByType=n.filterByType.bind(n),n.IsMarkerPointOfType=n.IsMarkerPointOfType.bind(n),n}return a(t,e),s(t,[{key:"handleActiveFilterButtonChange",value:function(e){e.target.checked&&this.setState({activeFilterButton:e.target.value})}},{key:"handleFilterQueryChange",value:function(e){this.setState({filterQuery:e})}},{key:"componentDidUpdate",value:function(e,t){var n=this;t.activeFilterButton===this.state.activeFilterButton&&t.filterQuery===this.state.filterQuery||(clearTimeout(this.timeout),this.timeout=setTimeout(function(){var e=null,t=n.filterByType(n.props.locations,n.state.activeFilterButton);n.state.filterQuery&&n.state.filterQuery.length>2&&(t=n.filterByQuery(t,n.state.filterQuery),e=t),n.setState({filteredLocations:e},n.props.setMarkerVisibility(t))},m.delay))}},{key:"filterByType",value:function(e,t){var n=this;return"all"===t?e:e.filter(function(e){return n.IsMarkerPointOfType(e,t)})}},{key:"IsMarkerPointOfType",value:function(e,t){return m.markerStyleTypeMap[e.typeVariable]===t}},{key:"filterByQuery",value:function(e,t){if(t.length){t=t.toLowerCase();return e.filter(function(e){if(e[m.requestNamesMap.name].toLowerCase().includes(t)||e[m.requestNamesMap.country].toLowerCase().includes(t))return e})}return e}},{key:"handleSuggestionClick",value:function(e){e.dataset.pointid?this.props.focusMarker(e.dataset.pointid):this.props.focusMarker(e.childNodes[0].dataset.pointid)}},{key:"render",value:function(){return u.default.createElement("aside",{className:"map-component__filters"},u.default.createElement("div",{className:"map-component__column"},u.default.createElement("h4",{className:"map-component__column-header"},u.default.createElement("span",null,"Search by countries or cities")),u.default.createElement(d.default,{placeholder:"Enter country, or city",buttonType:"search",searchType:"map",locations:this.state.filteredLocations,handleSuggestionClick:this.handleSuggestionClick,handleFilterQueryChange:this.handleFilterQueryChange})),u.default.createElement("div",{className:"map-component__column"},u.default.createElement("form",{className:"simple"},u.default.createElement("fieldset",{role:"radiogroup"},u.default.createElement("h4",{className:"map-component__column-header"},u.default.createElement("legend",null,"Show on map")),u.default.createElement(f.default,{value:"all",isDefaultChecked:!0,handleActiveButtonChange:this.handleActiveFilterButtonChange}),u.default.createElement(f.default,{value:"office",isDefaultChecked:!1,handleActiveButtonChange:this.handleActiveFilterButtonChange}),u.default.createElement(f.default,{value:"port",isDefaultChecked:!1,handleActiveButtonChange:this.handleActiveFilterButtonChange})))))}}]),t}(l.Component);t.default=g},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){var e=this;return l.default.createElement("input",{type:"text",id:this.props.type,name:this.props.type,className:"search-component__input",value:this.props.inputValue,placeholder:this.props.placeholder,onFocus:function(){return e.props.handleFocus("focus")},onBlur:function(){return e.props.handleFocus("blur")},onChange:this.props.handleInput})}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){var e=this;return l.default.createElement("button",{type:"submit",className:"search-component__button search-component__button--"+this.props.type,onFocus:function(){return e.props.handleFocus("focus")},onBlur:function(){return e.props.handleFocus("blur")}},"Search")}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(60),d=r(c),h=n(24),f=r(h),p=n(79),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),g=n(566),v=r(g),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.suggestionsRef=(0,l.createRef)(),n.allLocations=n.props.locations,n.state={data:null,message:m.suggestionMessages.start},n.handleKeyDown=n.handleKeyDown.bind(n),n.getSuggestionData=n.getSuggestionData.bind(n),n.getActiveSuggestion=n.getActiveSuggestion.bind(n),n.updateScrollbar=n.updateScrollbar.bind(n),n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.scrollbar=new PerfectScrollbar(this.suggestionsRef.current,m.scrollbarOptions)}},{key:"componentDidUpdate",value:function(e){var t=this;e.query!==this.props.query&&"map"!==this.props.type&&(this.props.query?(clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.getSuggestionData(t.props.query)},m.delay)):this.setState({data:null,message:m.suggestionMessages.start})),e.locations!==this.props.locations&&(this.props.locations?this.props.locations.length?this.setState({data:this.props.locations}):this.setState({data:null,message:m.suggestionMessages.noResults}):this.setState({data:null,message:m.suggestionMessages.start})),this.updateScrollbar()}},{key:"handleKeyDown",value:function(e){var t=null,n=document.activeElement;n.parentElement.parentElement===this.suggestionsRef.current&&(40===e.keyCode?t=n.parentElement.nextElementSibling:38===e.keyCode&&(t=n.parentElement.previousElementSibling,"LI"!==t.nodeName&&(t=null))),t&&t.firstChild.focus()}},{key:"getSuggestionData",value:function(e){var t=this;f.default.get(m.apiUrls[this.props.type],{params:{query:e}}).catch(function(e){e.response?(console.log(e.response.data),console.log(e.response.status),console.log(e.response.headers)):e.request?console.log(e.request):console.log("Error",e.message),console.log(e.config)}).then(function(e){e.data&&(e.data.length?t.setState({data:e.data}):t.setState({data:null,message:m.suggestionMessages.noResults}),t.updateScrollbar())})}},{key:"getActiveSuggestion",value:function(){var e=document.activeElement;return e.parentElement.parentElement===this.suggestionsRef.current?e:this.suggestionsRef.current.querySelector(".search-component__suggestions-item")}},{key:"updateScrollbar",value:function(){this.scrollbar.update(),this.suggestionsRef.current.scrollTop=0}},{key:"render",value:function(){var e=this,t=void 0;return t=this.state.data?this.state.data.map(function(t){return t.id=(0,d.default)(),t.label=t.Description?t.Description:t.Type,u.default.createElement(v.default,{key:t.id,content:t.Name,url:t.Url,searchableLabel:t.Country,nonSearchableLabel:t.label,pointId:t.Guid,query:e.props.query,matchInputToSuggestionPick:e.props.matchInputToSuggestionPick,handleSuggestionClick:e.props.handleSuggestionClick})}):u.default.createElement("li",{className:"search-component__suggestions-item"},u.default.createElement("span",null,this.state.message)),u.default.createElement("ul",{className:"search-component__suggestions",ref:this.suggestionsRef,onKeyDown:this.handleKeyDown},t)}}]),t}(l.Component);t.default=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(79),c=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e}(u),function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onLinkMouseDown=n.onLinkMouseDown.bind(n),n.getMarkup=n.getMarkup.bind(n),n.escapeRegExp=n.escapeRegExp.bind(n),n.handleMouseDown=n.handleMouseDown.bind(n),n}return o(t,e),a(t,[{key:"onLinkMouseDown",value:function(e){e.preventDefault(),e.target.click()}},{key:"escapeRegExp",value:function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"getMarkup",value:function(e){var t=this.props.query.toLowerCase(),n=new RegExp("("+this.escapeRegExp(t)+")","gi"),r=e.split(n);return l.default.createElement("span",null,r.map(function(e,n){return e.toLowerCase()===t?l.default.createElement("mark",{key:n},e):e}))}},{key:"handleMouseDown",value:function(e){e.stopPropagation();var t=e.target.classList.contains("search-component__suggestions-text")?e.target:e.target.closest(".search-component__suggestions-text");this.props.matchInputToSuggestionPick(t.childNodes[0].textContent),this.props.handleSuggestionClick(t)}},{key:"render",value:function(){var e=void 0,t=void 0,n=void 0;return this.props.searchableLabel&&(t=l.default.createElement("span",{className:"search-component__suggestions-info"},this.getMarkup(this.props.searchableLabel))),this.props.nonSearchableLabel&&(n=l.default.createElement("span",{className:"search-component__suggestions-info"},this.props.nonSearchableLabel)),e=this.props.url&&!this.props.handleSuggestionClick?l.default.createElement("a",{href:this.props.url,target:"_self",onMouseDown:this.onLinkMouseDown},l.default.createElement("span",{className:"search-component__suggestions-link"},this.getMarkup(this.props.content)),n,t):l.default.createElement("span",{tabIndex:"0",className:"search-component__suggestions-text","data-pointid":this.props.pointId,onMouseDown:this.handleMouseDown},l.default.createElement("span",null,this.getMarkup(this.props.content)),n,t),l.default.createElement("li",{className:"search-component__suggestions-item"},e)}}]),t}(s.Component));t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){var e=l.default.createElement("input",{type:"radio",id:"map-component-filter--"+this.props.value,name:"map-component-filter",value:this.props.value,onChange:this.props.handleActiveButtonChange,defaultChecked:this.props.isDefaultChecked}),t=l.default.createElement("label",{htmlFor:"map-component-filter--"+this.props.value,role:"radio",tabIndex:"0",className:"map-component__button map-component__button--"+this.props.value},this.props.value);return l.default.createElement(l.default.Fragment,null,e,t)}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=n(79),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(u),d=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.modalContentRef=(0,s.createRef)(),n.state={isActive:n.props.isActive,data:n.props.modalContent},n.closeModal=n.closeModal.bind(n),n.updateScrollbar=n.updateScrollbar.bind(n),n}return o(t,e),a(t,[{key:"componentDidMount",value:function(){this.scrollbar=new PerfectScrollbar(this.modalContentRef.current,c.scrollbarOptions)}},{key:"componentDidUpdate",value:function(e){this.updateScrollbar(),e.isActive!==this.props.isActive&&this.props.isActive!==this.state.isActive&&this.setState({isActive:this.props.isActive})}},{key:"closeModal",value:function(){this.setState({isActive:!1}),this.props.setModalActive&&this.props.setModalActive(!1)}},{key:"updateScrollbar",value:function(){this.scrollbar.element.scrollTop=0,this.scrollbar.update()}},{key:"render",value:function(){var e=void 0;return e=this.props.modalContent?this.props.modalContent:l.default.createElement("div",{className:"loader--full-screen"},l.default.createElement("div",{className:"loader__icon"})),l.default.createElement("aside",{className:"modal-component"+(this.state.isActive?" modal-active":""),role:"dialog","aria-hidden":!this.state.isActive},l.default.createElement("div",{className:"modal-component__box",role:"region","aria-live":"polite"},l.default.createElement("button",{className:"modal-component__close","aria-label":"Close modal",onClick:this.closeModal}),l.default.createElement("div",{className:"modal-component__content "+(this.props.hasLargeContent?"modal-component__content--large":""),ref:this.modalContentRef},e)),l.default.createElement("div",{className:"modal-component__bg",onClick:this.closeModal}))}}]),t}(s.Component);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(570),d=r(c),h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={activeSection:null},n.handleClick=n.handleClick.bind(n),n}return a(t,e),s(t,[{key:"handleClick",value:function(e){this.state.activeSection===e?this.setState({activeSection:null}):this.setState({activeSection:e})}},{key:"render",value:function(){var e=this;return u.default.createElement("div",{className:"accordion"},this.props.sections.map(function(t){return u.default.createElement(d.default,{isActive:e.state.activeSection===t.index,index:t.index,key:t.index,handleClick:e.handleClick,accordionTrigger:t.accordionTrigger,accordionContent:t.accordionContent})}))}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(571),d=r(c),h=n(572),f=r(h),p=function(e){function t(e){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),s(t,[{key:"render",value:function(){return u.default.createElement("section",{className:"accordion__section "+(this.props.isActive?"open":"")},u.default.createElement(f.default,{handleClick:this.props.handleClick,isActive:this.props.isActive,content:this.props.accordionTrigger,index:this.props.index}),u.default.createElement(d.default,{isActive:this.props.isActive,content:this.props.accordionContent,index:this.props.index}))}}]),t}(l.Component);t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){var e=void 0;return e=this.props.content?this.props.content:l.default.createElement("div",{className:"loader--full-screen"},l.default.createElement("div",{className:"loader__icon"})),l.default.createElement("div",{id:"accordion-content-"+this.props.index,role:"region","aria-labelledby":"accordion-header-"+this.props.index,className:"accordion__content accordion__content--padded",hidden:!this.props.isActive},e)}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onClick=n.onClick.bind(n),n}return o(t,e),a(t,[{key:"onClick",value:function(){this.props.handleClick(this.props.index)}},{key:"render",value:function(){return l.default.createElement("header",{onClick:this.onClick,"aria-expanded":this.props.isActive,className:"accordion__trigger","aria-controls":"accordion-content-"+this.props.index,id:"accordion-header-"+this.props.index},this.props.content,l.default.createElement("span",{className:"accordion__icon","aria-hidden":"true"}))}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(117),d=r(c),h=n(574),f=r(h),p=n(79),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(p),g=n(24),v=r(g),y=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={expertData:null,selectedCountry:""},n.handleSuggestionClick=n.handleSuggestionClick.bind(n),n.getExpertData=n.getExpertData.bind(n),n}return a(t,e),s(t,[{key:"componentDidUpdate",value:function(e,t){this.state.selectedCountry!==t.selectedCountry&&this.getExpertData()}},{key:"handleSuggestionClick",value:function(e){this.setState({selectedCountry:e.textContent})}},{key:"getExpertData",value:function(){var e=this;v.default.get(m.apiUrls["marine-products"],{params:{query:this.state.selectedCountry}}).catch(function(e){e.response?(console.log(e.response.data),console.log(e.response.status),console.log(e.response.headers)):e.request?console.log(e.request):console.log("Error",e.message),console.log(e.config)}).then(function(t){if(t.data){var n=t.data.map(function(e){return e.Id});e.setState({expertData:n})}})}},{key:"render",value:function(){var e=void 0;return this.state.expertData&&(e=this.state.expertData.length?u.default.createElement(u.default.Fragment,null,u.default.createElement("ul",{className:"contact-expert__results-list"},this.state.expertData.map(function(e){return u.default.createElement("li",null,u.default.createElement(f.default,{id:e,key:e}))}))):u.default.createElement("p",null,"No results found")),u.default.createElement("section",{className:"contact-expert"},u.default.createElement("h2",{className:"contact-expert__header"},u.default.createElement("span",null,"Contact a local expert about this solution")),u.default.createElement("fieldset",{className:"contact-expert__search"},u.default.createElement("legend",{className:"contact-expert__description"},u.default.createElement("span",null,"Enter your company location")),u.default.createElement(d.default,{placeholder:"Enter country name",defaultValue:this.state.selectedCountry,buttonType:"search",searchType:"country",handleSuggestionClick:this.handleSuggestionClick})),u.default.createElement("div",{className:"contact-expert__results",role:"region","aria-live":"polite"},e,u.default.createElement("a",{href:this.props.formUrl},"Fill out enquiry form and let us contact you")))}}]),t}(l.Component);t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(24),d=r(c),h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={data:n.props.data?n.props.data:n.getExpertDetails(n.props.id)},n.getExpertDetails=n.getExpertDetails.bind(n),n}return a(t,e),s(t,[{key:"getExpertDetails",value:function(e){var t=this;d.default.get("/api/marineproductsofficesearch/GetContactDetails",{params:{officeId:e}}).catch(function(e){e.response?(console.log(e.response.data),console.log(e.response.status),console.log(e.response.headers)):e.request?console.log(e.request):console.log("Error",e.message),console.log(e.config)}).then(function(e){e.data&&t.setState({data:e.data})})}},{key:"render",value:function(){var e=void 0;return e=this.state.data?u.default.createElement(u.default.Fragment,null,u.default.createElement("header",null,u.default.createElement("span",{className:"contact-card__icon contact-card__icon--cs","aria-hidden":"true"}),u.default.createElement("h4",{className:"contact-card__name",itemProp:"name"},u.default.createElement("span",null,this.state.data.Name))),u.default.createElement("ul",null,u.default.createElement("li",{className:"contact-card__item"},u.default.createElement("h5",{className:"contact-card__item-title"},u.default.createElement("span",null,"Phone:")),u.default.createElement("a",{className:"contact-card__item-content",href:"tel:"+this.state.data.Phone,itemProp:"telephone"},this.state.data.Phone)),u.default.createElement("li",{className:"contact-card__item"},u.default.createElement("h5",{className:"contact-card__item-title"},u.default.createElement("span",null,"E-mail:")),u.default.createElement("a",{className:"contact-card__item-content",href:"mailto:"+this.state.data.Email,itemProp:"email"},this.state.data.Email))),u.default.createElement("a",{href:this.state.data.Url,className:"contact-card__item-link",itemProp:"url"},u.default.createElement("span",null,"See office details"))):u.default.createElement("div",{className:"loader--full-screen"},u.default.createElement("div",{className:"loader__icon"})),u.default.createElement("address",{className:"contact-card contact-card--small",itemScope:!0,itemType:"https://schema.org/ContactPoint"},e)}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),c=r(u),d=n(114),h=r(d),f=n(576),p=r(f),m=n(160),g=r(m),v=n(577),y=r(v),b=n(579),_=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(b),w=n(24),x=r(w),E=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isLoading:!0,page:1,posts:[],filters:[],sortingType:Object.keys(_.sortingOptions)[0],morePostsAvailable:!1,categoryId:n.props.categoryId?n.props.categoryId:"",categoryParentId:n.props.parentCategoryId?n.props.parentCategoryId:"",showInfo:!1},n.callAPI=n.callAPI.bind(n),n.updateParametersWithActiveFilters=n.updateParametersWithActiveFilters.bind(n),n.onSortingTypeChange=n.onSortingTypeChange.bind(n),n.onLoadMoreClick=n.onLoadMoreClick.bind(n),n.getSearchQuery=n.getSearchQuery.bind(n),n.updateQueryString=n.updateQueryString.bind(n),n}return s(t,e),l(t,[{key:"componentDidMount",value:function(){if(this.props.showFilters)this.callAPI(_.feedAPIurls.filters,{},"filters");else{var e=this.state.categoryId?_.feedAPIurls.postsInCategory:_.feedAPIurls.posts;this.callAPI(e,{sortingType:_.sortingOptions[this.state.sortingType],numberOfStartingPost:0,numberOfPosts:_.postCount.noFilters,categoryId:this.state.categoryId,categoryParentId:this.state.categoryParentId},"posts")}}},{key:"componentDidUpdate",value:function(e,t){if(t.sortingType!=this.state.sortingType||t.categoryId!=this.state.categoryId||t.page!=this.state.page){var n=this.state.categoryId?_.feedAPIurls.postsInCategory:_.feedAPIurls.posts;this.callAPI(n,{sortingType:_.sortingOptions[this.state.sortingType],numberOfStartingPost:0,numberOfPosts:_.postCount.starting+(this.state.page-1)*_.postCount.delta,categoryId:this.state.categoryId,categoryParentId:this.state.categoryParentId},"posts"),this.updateQueryString()}}},{key:"updateQueryString",value:function(){var e=new URL(window.location);e.searchParams.set("order",this.state.sortingType),this.state.categoryId?e.searchParams.set("category",this.state.categoryId):e.searchParams.delete("category"),this.state.page>1?e.searchParams.set("page",this.state.page):e.searchParams.delete("page"),history.pushState({},"",e)}},{key:"getSearchQuery",value:function(){var e=/^\d+$/,t=window.location.search,n=new URLSearchParams(t),r=n.get("page");(!e.test(r)||r<1)&&(r=1);var i=n.get("order");Object.keys(_.sortingOptions).includes(i)||(i=null);var o=n.get("category"),a=null;e.test(o)?this.state.filters.forEach(function(e){if(e.Id==o)return void(a=e);e.Subcategory.forEach(function(e){if(e.Id==o)return void(a=e)})}):o="";var s=a?a.Id:"",l=a?a.ParentId:"",u=a?_.feedAPIurls.postsInCategory:_.feedAPIurls.posts;this.callAPI(u,{sortingType:i?_.sortingOptions[i]:_.sortingOptions[this.state.sortingType],numberOfStartingPost:0,numberOfPosts:r?_.postCount.starting+(r-1)*_.postCount.delta:_.postCount.starting,categoryId:s,categoryParentId:l},"posts"),this.setState({page:r,sortingType:i||Object.keys(_.sortingOptions)[0],categoryId:s,categoryParentId:l})}},{key:"callAPI",value:function(e,t,n){var r=this;this.setState({isLoading:!0}),x.default.get(e,{params:t}).then(function(e){if(e.data)switch(n){case"posts":r.setState({isLoading:!1,posts:e.data.Articles,morePostsAvailable:e.data.MoreArticlesAvailable,showInfo:e.data.Articles.length<1});break;case"filters":r.setState({isLoading:!1,filters:e.data}),r.getSearchQuery();break;case"button":r.setState(function(t){return{isLoading:!1,posts:[].concat(i(t.posts),i(e.data.Articles)),morePostsAvailable:e.data.MoreArticlesAvailable}});break;default:return}})}},{key:"updateParametersWithActiveFilters",value:function(e,t){this.setState({page:1,categoryId:e,categoryParentId:t})}},{key:"onSortingTypeChange",value:function(e){this.setState({page:1,sortingType:e})}},{key:"onLoadMoreClick",value:function(){var e=this.state.categoryId?_.feedAPIurls.postsInCategory:_.feedAPIurls.posts;this.callAPI(e,{sortingType:_.sortingOptions[this.state.sortingType],numberOfStartingPost:this.state.posts.length,numberOfPosts:_.postCount.delta,categoryId:this.state.categoryId,categoryParentId:this.state.categoryParentId},"button"),this.setState({page:this.state.page+1})}},{key:"render",value:function(){var e=this.state.posts.map(function(e,t){return e.VideoEmbed||e.VideoUrl?c.default.createElement("div",{className:"flowList__item",key:"post-"+t},c.default.createElement("div",{className:"single-teaser"},c.default.createElement(p.default,{embedCode:e.VideoEmbed,localVideoUrl:e.VideoUrl,imageUrl:e.ImageUrl}),c.default.createElement("div",{class:"flowList__item-content single-teaser-content"},c.default.createElement("h4",{className:"heading heading--quaternary single-teaser-growing-header"},c.default.createElement("a",{href:e.Url},e.Title)),c.default.createElement("div",{className:"preview-intro"},e.PostIntro)))):c.default.createElement("div",{className:"flowList__item",key:"post-"+t},c.default.createElement(h.default,{teaserUrl:e.Url,teaserText:e.Title,teaserDetails:e.PostIntro,imageUrl:e.ImageUrl,imageAlt:e.ImageAlt,imageTitle:e.ImageAlt}))}),t=this.props.showFilters?c.default.createElement(y.default,{filters:this.state.filters,activeFilter:this.state.categoryId,activeFilterCallback:this.updateParametersWithActiveFilters}):null,n=this.props.showFilters?c.default.createElement("div",{className:"post-feed__sorting"},c.default.createElement("span",null,c.default.createElement("strong",null,"Sort articles:")," from the "),c.default.createElement(g.default,{labelId:"",optionsListName:"",selectedOption:this.state.sortingType,key:this.state.sortingType,options:Object.keys(_.sortingOptions),onValueSelection:this.onSortingTypeChange})):null,r=this.props.showFilters&&this.state.morePostsAvailable?c.default.createElement("button",{type:"button",className:"btn--wide btn--primary post-feed__load-more",title:"Load more posts",disabled:this.state.isLoading,onClick:this.onLoadMoreClick},"Load more"):null;return c.default.createElement("div",{className:"post-feed clearfix"},c.default.createElement("div",{className:this.props.showFilters?"column primary":""},n,c.default.createElement("div",{className:this.props.showFilters?"flowList few":"flowList single"},e,this.state.showInfo?c.default.createElement("div",{className:"post-feed__info"},"Sorry, there are no posts matching your search criteria."):null),c.default.createElement("div",{className:"loader--full-screen",hidden:!this.state.isLoading},c.default.createElement("div",{className:"loader__icon"})),r),t)}}]),t}(u.Component);t.default=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return o(t,e),a(t,[{key:"render",value:function(){return l.default.createElement("figure",{className:"video"},l.default.createElement("div",{className:"img-flow ratio-16-9"},this.props.localVideoUrl&&l.default.createElement("video",{controls:!0,poster:this.props.imageUrl,src:this.props.localVideoUrl}),!this.props.localVideoUrl&&this.props.embedCode&&l.default.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.embedCode}})))}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(578),d=r(c),h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onActiveFilterUpdate=n.onActiveFilterUpdate.bind(n),n.getTotalPostCount=n.getTotalPostCount.bind(n),n.getCategoryTree=n.getCategoryTree.bind(n),n}return a(t,e),s(t,[{key:"onActiveFilterUpdate",value:function(e,t){var n=this.props.activeFilter===e?null:e;this.props.activeFilterCallback(n,n?t:null)}},{key:"getTotalPostCount",value:function(e,t){var n=this,r=t+e.NumberOfArticles;return e.Subcategory&&e.Subcategory.length&&e.Subcategory.forEach(function(e){r=n.getTotalPostCount(e,r)}),r}},{key:"getCategoryTree",value:function(e,t){var n=this,r=this.getTotalPostCount(e,0);if(e.Subcategory&&e.Subcategory.length){var i=u.default.createElement(u.default.Fragment,null,u.default.createElement(d.default,{name:"All "+e.Name,postCount:r,isExpandable:!1,key:"all-"+e.Id,categoryId:e.Id,categoryParentId:e.ParentId,isActive:this.props.activeFilter===e.Id,onActiveFilterUpdateCallback:this.onActiveFilterUpdate}),e.Subcategory.map(function(e,t){return n.getCategoryTree(e,t)}));return u.default.createElement(d.default,{name:e.Name,postCount:r,isExpandable:!0,key:"toggle-"+e.Id,id:e.Id,children:i})}return u.default.createElement(d.default,{name:e.Name,postCount:e.NumberOfArticles,isExpandable:!1,key:"filter-"+e.Id,categoryId:e.Id,categoryParentId:e.ParentId,isActive:this.props.activeFilter===e.Id,onActiveFilterUpdateCallback:this.onActiveFilterUpdate})}},{key:"render",value:function(){var e=this;return u.default.createElement("aside",{className:"column secondary"},u.default.createElement("h2",{className:"boxHeading"},u.default.createElement("span",null,"Filter by product type")),u.default.createElement("ul",{className:"post-feed__filters"},this.props.filters.map(function(t,n){return e.getCategoryTree(t,n)})))}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={isExpanded:!1},n.onFilterItemClick=n.onFilterItemClick.bind(n),n}return o(t,e),a(t,[{key:"onFilterItemClick",value:function(){this.props.isExpandable?this.setState({isExpanded:!this.state.isExpanded}):this.props.onActiveFilterUpdateCallback(this.props.categoryId,this.props.categoryParentId)}},{key:"render",value:function(){return l.default.createElement("li",{className:"post-feed__filters-item "+(this.props.isActive?"active":"")},l.default.createElement("button",{type:"button",role:"treeitem",className:(this.props.isExpandable?"post-feed__filters-item--expandable":"")+(this.state.isExpanded?" expanded":"")+" post-feed__filters-item-text",onClick:this.onFilterItemClick,"aria-expanded":this.props.isExpandable?this.state.isExpanded:null,"aria-controls":this.props.isExpandable?"list-"+this.props.id:null},this.props.isExpandable?l.default.createElement("span",{className:"visually-hidden-accessible"},"Expand"):null,this.props.name," (",this.props.postCount,")"),this.props.children?l.default.createElement("ul",{className:"post-feed__filters--sub","aria-hidden":!this.state.isExpanded,id:"list-"+this.props.id,role:"group"},l.default.createElement(l.default.Fragment,null,this.props.children)):null)}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.feedAPIurls={posts:"/api/ArticlesAboutProducts/GetArticles",postsInCategory:"/api/ArticlesAboutProducts/GetArticlesForGivenCategory",filters:"/api/ArticlesAboutProducts/GetArticlesCategories"},t.sortingOptions={latest:"desc",earliest:"asc"},t.postCount={delta:4,noFilters:4,starting:8}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(167),d=r(c),h=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={responsive:{0:{items:1},700:{items:2},900:{items:4}}},n}return a(t,e),s(t,[{key:"render",value:function(){for(var e=this,t=[],n=0;n<this.props.items.length;n++)t.push(u.default.createElement("div",{className:"teaser-list__carousel-item",dangerouslySetInnerHTML:{__html:this.props.items[n].innerHTML}}));return u.default.createElement(u.default.Fragment,null,u.default.createElement("button",{type:"button",title:"Show previous lide",className:"teaser-list__carousel-button teaser-list__carousel-button--prev",onClick:function(){return e.Carousel.slidePrev()}}),u.default.createElement(d.default,{buttonsDisabled:!0,items:t,responsive:this.state.responsive,ref:function(t){return e.Carousel=t}}),u.default.createElement("button",{type:"button",title:"Show next slide",className:"teaser-list__carousel-button teaser-list__carousel-button--next",onClick:function(){return e.Carousel.slideNext()}}))}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),u=r(l),c=n(582),d=r(c),h=n(583),f=r(h),p=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={activeTab:0},n.handleClick=n.handleClick.bind(n),n}return a(t,e),s(t,[{key:"handleClick",value:function(e){this.setState({activeTab:e})}},{key:"render",value:function(){var e=this;return u.default.createElement("div",{className:"tabs-component"},u.default.createElement("div",{className:"tabs-component__content"},this.props.items.map(function(t,n){return u.default.createElement(f.default,{key:n,index:n,url:t.url,title:t.title,isActive:e.state.activeTab===n,handleClick:e.handleClick})})),u.default.createElement("div",{className:"tabs-component__button",role:"tablist"},this.props.items.map(function(t,n){return u.default.createElement(d.default,{key:n,index:n,text:t.title,isActive:e.state.activeTab===n,handleClick:e.handleClick})})))}}]),t}(l.Component);t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleClick=n.handleClick.bind(n),n}return o(t,e),a(t,[{key:"handleClick",value:function(){this.props.handleClick(this.props.index)}},{key:"render",value:function(){return l.default.createElement("button",{type:"button",role:"tab","aria-selected":this.props.isActive,"aria-controls":"tabcontent-id-"+this.props.index,id:"tab-button-id-"+this.props.index,className:"tabs-component__button-item "+(this.props.isActive?"active":""),onClick:this.handleClick},this.props.text)}}]),t}(s.Component);t.default=u},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=function(e){return e&&e.__esModule?e:{default:e}}(s),u=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleClick=n.handleClick.bind(n),n}return o(t,e),a(t,[{key:"handleClick",value:function(){this.props.handleClick(this.props.index)}},{key:"render",value:function(){var e=void 0;return this.props.url&&(e=l.default.createElement("figure",{className:"tabs-component__content-figure"},l.default.createElement("img",{className:"tabs-component__content-image",src:this.props.url,alt:this.props.alt?this.props.alt:this.props.title}))),l.default.createElement("div",{className:"tabs-component__content-item "+(this.props.isActive?"active ":" ")+(this.props.url?"tabs-component__content-item--image":""),onClick:this.handleClick,id:"tabcontent-id-"+this.props.index,role:"tabpanel","aria-labelledby":"tab-button-id-"+this.props.index,"aria-hidden":!this.props.isActive},e)}}]),t}(s.Component);t.default=u}]);
