Skip to content

Instantly share code, notes, and snippets.

@drupol
Last active January 24, 2018 21:41
Show Gist options
  • Save drupol/336d23e8f6675fba0803b57f91dc5b02 to your computer and use it in GitHub Desktop.
Save drupol/336d23e8f6675fba0803b57f91dc5b02 to your computer and use it in GitHub Desktop.
Lorenz attractors
license: gpl-3.0

Lorenz Attractors

Description here.

webpackJsonp([0],{175:function(e,t,n){"use strict";function o(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(){var e=.95*window.innerWidth,t=.95*window.innerHeight;A=x.webgl?new m.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0}):new m.CanvasRenderer,k=new m.Scene,O=new m.PerspectiveCamera(33,window.innerWidth/window.innerHeight,1,1e4),O.position.set(50,50,50),O.lookAt(0,0,0),k.add(O),A.setSize(e,t),A.setClearColor(S.background_color,1),A.setPixelRatio(window.devicePixelRatio),C=A.domElement,C.name="canvas",C.addEventListener("dblclick",r,!1),C.addEventListener("click",onclick,!1),document.body.appendChild(C),E=new T(O,C),E.enableDamping=!0}function r(e){var t=new m.Vector3;t.set(e.clientX/window.innerWidth*1.05*2-1,-e.clientY/window.innerHeight*1.05*2+1,0),t.unproject(O);var n=t.sub(O.position).normalize(),o=-O.position.z/n.z,i=O.position.clone().add(n.multiplyScalar(o));S.x=Math.round(i.x),S.y=Math.round(i.y),S.z=Math.round(i.z);for(var r=0;r<Object.keys(P.__folders).length;r++)for(var a=Object.keys(P.__folders)[r],s=0;s<P.__folders[a].__controllers.length;s++)P.__folders[a].__controllers[s].updateDisplay()}function a(){requestAnimationFrame(a),A.render(k,O)}function s(e){for(var t=JSON.parse(JSON.stringify(e)),n=0;n<t.count;n++)t.x=e.x+4*(Math.random()-.5),t.y=e.y+4*(Math.random()-.5),t.z=e.z+4*(Math.random()-.5),R.postMessage(t)}function l(e){for(var t=new m.Geometry,n=[],o=b.scaleSequential(b.interpolateRainbow),i=0;i<e.length;i++)n[i]=new m.Color(o(Math.log(e.length/e.points[i].d)));t.vertices=e.points,t.colors=n,k.add(new m.Line(t,new m.LineBasicMaterial({linewidth:S.linewidth,fog:!0,vertexColors:m.VertexColors})))}function d(e){P=new y.GUI({load:_(),preset:"Default"}),P.remember(e);var t=P.addFolder("Position");t.add(e,"x",0,100).min(0).max(100).listen(),t.add(e,"y",0,100).min(0).max(100).listen(),t.add(e,"z",0,100).min(0).max(100).listen(),t.open();var n=P.addFolder("Parameters");n.add(e,"sigma").name("Sigma (σ)").min(-10).max(100).step(.1),n.add(e,"rho").name("Rho (ρ)").min(0).max(100).step(.1),n.add(e,"beta").name("Beta (β)").min(0).max(20).step(.1),n.add(e,"definition").name("Step").min(0).max(.1).step(1e-4),n.add(e,"length").name("Length").min(1).max(2e4).step(1e3),n.add(e,"count").name("Count").min(1).max(20).step(1),n.add(e,"linewidth").name("Line thickness").min(1).max(10).step(1),n.addColor(e,"background_color").name("Background color").onChange(function(e){k.background=new m.Color(e)}),n.open();var o=P.addFolder("Camera");o.add(e.camera,"mode",e.camera.mode).listen().onChange(function(e){alert(e),"perspective"===e&&O.toPerspective(),"orthographic"===e&&O.toOrthographic(),E.update()}),o.open(),P.add(e,"axis").name("Draw axis?").listen().onChange(function(e){h(e)}),P.add(e,"grid").name("Draw grids?").listen().onChange(function(e){u(e)}),P.add(e,"clear").name("Clear the scene"),P.add(e,"draw").name("Draw the attractor"),P.add(e,"download").name("Download")}function c(){for(;k.children.length>0;)k.remove(k.children[0]);u(S.grid),h(S.axis)}function u(e){if(!0===e){var t=new m.GridHelper(100,10);t.position.set(50,0,50),t.name="gridXZ";var n=new m.GridHelper(100,10);n.rotation.x=Math.PI/2,n.position.set(50,50,0),n.name="gridXY";var o=new m.GridHelper(100,10);o.rotation.z=Math.PI/2,o.position.set(0,50,50),o.name="gridYZ",k.add(t),k.add(n),k.add(o)}else k.remove(k.getObjectByName("gridXZ")),k.remove(k.getObjectByName("gridXY")),k.remove(k.getObjectByName("gridYZ"))}function h(e){if(!0===e){var t=new m.AxisHelper(100);t.name="axis",k.add(t)}else k.remove(k.getObjectByName("axis"))}function _(){return{preset:"Default",closed:!1,remembered:{Default:{0:{x:30,y:30,z:0,count:10,length:1e4,sigma:10,rho:28,beta:8/3}},Preset1:{0:{x:30,y:30,z:0,count:10,length:1e4,sigma:28,rho:46.92,beta:4}},Preset2:{0:{x:30,y:30,z:0,count:10,length:1e4,sigma:10,rho:99.96,beta:8/3}},Preset3:{0:{x:21,y:69,z:0,count:10,length:1e4,sigma:-.3,rho:9,beta:2.7}}}}}function p(e,t,n){var o=C.toDataURL("image/png"),i=document.createElement("a");i.download=n,i.href=o,i.dataset.downloadurl=["image/png",i.download,i.href].join(":"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}var f=n(49),m=o(f),g=n(91),b=o(g),v=n(466),y=o(v),w=n(173),x=o(w);n(467);var C,E,A,k,O,S,P,T=n(174)(m),L=n(468),R=new L;R.onmessage=function(e){l(e.data)},window.addEventListener("resize",function(){O.aspect=window.innerWidth/window.innerHeight,O.updateProjectionMatrix(),A.setSize(.95*window.innerWidth,.95*window.innerHeight)},!1),window.addEventListener("load",function(){S={x:0,y:0,z:0,count:10,length:1e4,sigma:10,rho:28,beta:8/3,definition:.001,camera:{mode:{Orthographic:"orthographic",Perspective:"perspective"}},draw:function(){s(S)},clear:function(){c()},download:function(){var e="lorenz-attractor-"+(new Date).getTime().toString();p(C,"canvas",e)},linewidth:2,axis:!0,grid:!0,background_color:"#000000"},d(S),i(),c(),a()})},466:function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e,t){var n=e.__state.conversionName.toString(),o=Math.round(e.r),i=Math.round(e.g),r=Math.round(e.b),a=e.a,s=Math.round(e.h),l=e.s.toFixed(1),d=e.v.toFixed(1);if(t||"THREE_CHAR_HEX"===n||"SIX_CHAR_HEX"===n){for(var c=e.hex.toString(16);c.length<6;)c="0"+c;return"#"+c}return"CSS_RGB"===n?"rgb("+o+","+i+","+r+")":"CSS_RGBA"===n?"rgba("+o+","+i+","+r+","+a+")":"HEX"===n?"0x"+e.hex.toString(16):"RGB_ARRAY"===n?"["+o+","+i+","+r+"]":"RGBA_ARRAY"===n?"["+o+","+i+","+r+","+a+"]":"RGB_OBJ"===n?"{r:"+o+",g:"+i+",b:"+r+"}":"RGBA_OBJ"===n?"{r:"+o+",g:"+i+",b:"+r+",a:"+a+"}":"HSV_OBJ"===n?"{h:"+s+",s:"+l+",v:"+d+"}":"HSVA_OBJ"===n?"{h:"+s+",s:"+l+",v:"+d+",a:"+a+"}":"unknown format"}function t(e,t,n){Object.defineProperty(e,t,{get:function(){return"RGB"===this.__state.space?this.__state[t]:(D.recalculateRGB(this,t,n),this.__state[t])},set:function(e){"RGB"!==this.__state.space&&(D.recalculateRGB(this,t,n),this.__state.space="RGB"),this.__state[t]=e}})}function n(e,t){Object.defineProperty(e,t,{get:function(){return"HSV"===this.__state.space?this.__state[t]:(D.recalculateHSV(this),this.__state[t])},set:function(e){"HSV"!==this.__state.space&&(D.recalculateHSV(this),this.__state.space="HSV"),this.__state[t]=e}})}function o(e){if("0"===e||k.isUndefined(e))return 0;var t=e.match(G);return k.isNull(t)?0:parseFloat(t[1])}function i(e){var t=e.toString();return t.indexOf(".")>-1?t.length-t.indexOf(".")-1:0}function r(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function a(e,t,n,o,i){return o+(e-t)/(n-t)*(i-o)}function s(e,t,n,o){e.style.background="",k.each($,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+o+" 100%); "})}function l(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}function d(e){setTimeout(e,1e3/60)}function c(e,t,n){var o=document.createElement("li");return t&&o.appendChild(t),n?e.__ul.insertBefore(o,n):e.__ul.appendChild(o),e.onResize(),o}function u(e,t){var n=e.__preset_select[e.__preset_select.selectedIndex];n.innerHTML=t?n.value+"*":n.value}function h(e,t,n){if(n.__li=t,n.__gui=e,k.extend(n,{options:function(t){if(arguments.length>1){var o=n.__li.nextElementSibling;return n.remove(),p(e,n.object,n.property,{before:o,factoryArgs:[k.toArray(arguments)]})}if(k.isArray(t)||k.isObject(t)){var i=n.__li.nextElementSibling;return n.remove(),p(e,n.object,n.property,{before:i,factoryArgs:[t]})}},name:function(e){return n.__li.firstElementChild.firstElementChild.innerHTML=e,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof Q){var o=new K(n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});k.each(["updateDisplay","onChange","onFinishChange","step"],function(e){var t=n[e],i=o[e];n[e]=o[e]=function(){var e=Array.prototype.slice.call(arguments);return i.apply(o,e),t.apply(n,e)}}),U.addClass(t,"has-slider"),n.domElement.insertBefore(o.domElement,n.domElement.firstElementChild)}else if(n instanceof K){var i=function(t){if(k.isNumber(n.__min)&&k.isNumber(n.__max)){var o=n.__li.firstElementChild.firstElementChild.innerHTML,i=n.__gui.__listening.indexOf(n)>-1;n.remove();var r=p(e,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return r.name(o),i&&r.listen(),r}return t};n.min=k.compose(i,n.min),n.max=k.compose(i,n.max)}else n instanceof X?(U.bind(t,"click",function(){U.fakeEvent(n.__checkbox,"click")}),U.bind(n.__checkbox,"click",function(e){e.stopPropagation()})):n instanceof Z?(U.bind(t,"click",function(){U.fakeEvent(n.__button,"click")}),U.bind(t,"mouseover",function(){U.addClass(n.__button,"hover")}),U.bind(t,"mouseout",function(){U.removeClass(n.__button,"hover")})):n instanceof q&&(U.addClass(t,"color"),n.updateDisplay=k.compose(function(e){return t.style.borderLeftColor=n.__color.toString(),e},n.updateDisplay),n.updateDisplay());n.setValue=k.compose(function(t){return e.getRoot().__preset_select&&n.isModified()&&u(e.getRoot(),!0),t},n.setValue)}function _(e,t){var n=e.getRoot(),o=n.__rememberedObjects.indexOf(t.object);if(-1!==o){var i=n.__rememberedObjectIndecesToControllers[o];if(void 0===i&&(i={},n.__rememberedObjectIndecesToControllers[o]=i),i[t.property]=t,n.load&&n.load.remembered){var r=n.load.remembered,a=void 0;if(r[e.preset])a=r[e.preset];else{if(!r[re])return;a=r[re]}if(a[o]&&void 0!==a[o][t.property]){var s=a[o][t.property];t.initialValue=s,t.setValue(s)}}}}function p(e,t,n,o){if(void 0===t[n])throw new Error('Object "'+t+'" has no property "'+n+'"');var i=void 0;if(o.color)i=new q(t,n);else{var r=[t,n].concat(o.factoryArgs);i=te.apply(e,r)}o.before instanceof F&&(o.before=o.before.__li),_(e,i),U.addClass(i.domElement,"c");var a=document.createElement("span");U.addClass(a,"property-name"),a.innerHTML=i.property;var s=document.createElement("div");s.appendChild(a),s.appendChild(i.domElement);var l=c(e,s,o.before);return U.addClass(l,he.CLASS_CONTROLLER_ROW),i instanceof q?U.addClass(l,"color"):U.addClass(l,B(i.getValue())),h(e,l,i),e.__controllers.push(i),i}function f(e,t){return document.location.href+"."+t}function m(e,t,n){var o=document.createElement("option");o.innerHTML=t,o.value=t,e.__preset_select.appendChild(o),n&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function g(e,t){t.style.display=e.useLocalStorage?"block":"none"}function b(e){var t=e.__save_row=document.createElement("li");U.addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),U.addClass(t,"save-row");var n=document.createElement("span");n.innerHTML="&nbsp;",U.addClass(n,"button gears");var o=document.createElement("span");o.innerHTML="Save",U.addClass(o,"button"),U.addClass(o,"save");var i=document.createElement("span");i.innerHTML="New",U.addClass(i,"button"),U.addClass(i,"save-as");var r=document.createElement("span");r.innerHTML="Revert",U.addClass(r,"button"),U.addClass(r,"revert");var a=e.__preset_select=document.createElement("select");if(e.load&&e.load.remembered?k.each(e.load.remembered,function(t,n){m(e,n,n===e.preset)}):m(e,re,!1),U.bind(a,"change",function(){for(var t=0;t<e.__preset_select.length;t++)e.__preset_select[t].innerHTML=e.__preset_select[t].value;e.preset=this.value}),t.appendChild(a),t.appendChild(n),t.appendChild(o),t.appendChild(i),t.appendChild(r),ae){var s=document.getElementById("dg-local-explain"),l=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block","true"===localStorage.getItem(f(e,"isLocal"))&&l.setAttribute("checked","checked"),g(e,s),U.bind(l,"change",function(){e.useLocalStorage=!e.useLocalStorage,g(e,s)})}var d=document.getElementById("dg-new-constructor");U.bind(d,"keydown",function(e){!e.metaKey||67!==e.which&&67!==e.keyCode||se.hide()}),U.bind(n,"click",function(){d.innerHTML=JSON.stringify(e.getSaveObject(),void 0,2),se.show(),d.focus(),d.select()}),U.bind(o,"click",function(){e.save()}),U.bind(i,"click",function(){var t=prompt("Enter a new preset name.");t&&e.saveAs(t)}),U.bind(r,"click",function(){e.revert()})}function v(e){function t(t){return t.preventDefault(),e.width+=i-t.clientX,e.onResize(),i=t.clientX,!1}function n(){U.removeClass(e.__closeButton,he.CLASS_DRAG),U.unbind(window,"mousemove",t),U.unbind(window,"mouseup",n)}function o(o){return o.preventDefault(),i=o.clientX,U.addClass(e.__closeButton,he.CLASS_DRAG),U.bind(window,"mousemove",t),U.bind(window,"mouseup",n),!1}var i=void 0;e.__resize_handle=document.createElement("div"),k.extend(e.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),U.bind(e.__resize_handle,"mousedown",o),U.bind(e.__closeButton,"mousedown",o),e.domElement.insertBefore(e.__resize_handle,e.domElement.firstElementChild)}function y(e,t){e.domElement.style.width=t+"px",e.__save_row&&e.autoPlace&&(e.__save_row.style.width=t+"px"),e.__closeButton&&(e.__closeButton.style.width=t+"px")}function w(e,t){var n={};return k.each(e.__rememberedObjects,function(o,i){var r={},a=e.__rememberedObjectIndecesToControllers[i];k.each(a,function(e,n){r[n]=t?e.initialValue:e.getValue()}),n[i]=r}),n}function x(e){for(var t=0;t<e.__preset_select.length;t++)e.__preset_select[t].value===e.preset&&(e.__preset_select.selectedIndex=t)}function C(e){0!==e.length&&ne.call(window,function(){C(e)}),k.each(e,function(e){e.updateDisplay()})}var E=Array.prototype.forEach,A=Array.prototype.slice,k={BREAK:{},extend:function(e){return this.each(A.call(arguments,1),function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(n){this.isUndefined(t[n])||(e[n]=t[n])}.bind(this))},this),e},defaults:function(e){return this.each(A.call(arguments,1),function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(n){this.isUndefined(e[n])&&(e[n]=t[n])}.bind(this))},this),e},compose:function(){var e=A.call(arguments);return function(){for(var t=A.call(arguments),n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},each:function(e,t,n){if(e)if(E&&e.forEach&&e.forEach===E)e.forEach(t,n);else if(e.length===e.length+0){var o=void 0,i=void 0;for(o=0,i=e.length;o<i;o++)if(o in e&&t.call(n,e[o],o)===this.BREAK)return}else for(var r in e)if(t.call(n,e[r],r)===this.BREAK)return},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var o=void 0;return function(){function i(){o=null,n||e.apply(r,a)}var r=this,a=arguments,s=n||!o;clearTimeout(o),o=setTimeout(i,t),s&&e.apply(r,a)}},toArray:function(e){return e.toArray?e.toArray():A.call(e)},isUndefined:function(e){return void 0===e},isNull:function(e){return null===e},isNaN:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return isNaN(e)}),isArray:Array.isArray||function(e){return e.constructor===Array},isObject:function(e){return e===Object(e)},isNumber:function(e){return e===e+0},isString:function(e){return e===e+""},isBoolean:function(e){return!1===e||!0===e},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)}},O=[{litmus:k.isString,conversions:{THREE_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString(),0)}},write:e},SIX_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9]{6})$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString(),0)}},write:e},CSS_RGB:{read:function(e){var t=e.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:e},CSS_RGBA:{read:function(e){var t=e.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:e}}},{litmus:k.isNumber,conversions:{HEX:{read:function(e){return{space:"HEX",hex:e,conversionName:"HEX"}},write:function(e){return e.hex}}}},{litmus:k.isArray,conversions:{RGB_ARRAY:{read:function(e){return 3===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2]}},write:function(e){return[e.r,e.g,e.b]}},RGBA_ARRAY:{read:function(e){return 4===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2],a:e[3]}},write:function(e){return[e.r,e.g,e.b,e.a]}}}},{litmus:k.isObject,conversions:{RGBA_OBJ:{read:function(e){return!!(k.isNumber(e.r)&&k.isNumber(e.g)&&k.isNumber(e.b)&&k.isNumber(e.a))&&{space:"RGB",r:e.r,g:e.g,b:e.b,a:e.a}},write:function(e){return{r:e.r,g:e.g,b:e.b,a:e.a}}},RGB_OBJ:{read:function(e){return!!(k.isNumber(e.r)&&k.isNumber(e.g)&&k.isNumber(e.b))&&{space:"RGB",r:e.r,g:e.g,b:e.b}},write:function(e){return{r:e.r,g:e.g,b:e.b}}},HSVA_OBJ:{read:function(e){return!!(k.isNumber(e.h)&&k.isNumber(e.s)&&k.isNumber(e.v)&&k.isNumber(e.a))&&{space:"HSV",h:e.h,s:e.s,v:e.v,a:e.a}},write:function(e){return{h:e.h,s:e.s,v:e.v,a:e.a}}},HSV_OBJ:{read:function(e){return!!(k.isNumber(e.h)&&k.isNumber(e.s)&&k.isNumber(e.v))&&{space:"HSV",h:e.h,s:e.s,v:e.v}},write:function(e){return{h:e.h,s:e.s,v:e.v}}}}}],S=void 0,P=void 0,T=function(){P=!1;var e=arguments.length>1?k.toArray(arguments):arguments[0];return k.each(O,function(t){if(t.litmus(e))return k.each(t.conversions,function(t,n){if(S=t.read(e),!1===P&&!1!==S)return P=S,S.conversionName=n,S.conversion=t,k.BREAK}),k.BREAK}),P},L=void 0,R={hsv_to_rgb:function(e,t,n){var o=Math.floor(e/60)%6,i=e/60-Math.floor(e/60),r=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=[[n,s,r],[a,n,r],[r,n,s],[r,a,n],[s,r,n],[n,r,a]][o];return{r:255*l[0],g:255*l[1],b:255*l[2]}},rgb_to_hsv:function(e,t,n){var o=Math.min(e,t,n),i=Math.max(e,t,n),r=i-o,a=void 0,s=void 0;return 0===i?{h:NaN,s:0,v:0}:(s=r/i,a=e===i?(t-n)/r:t===i?2+(n-e)/r:4+(e-t)/r,a/=6,a<0&&(a+=1),{h:360*a,s:s,v:i/255})},rgb_to_hex:function(e,t,n){var o=this.hex_with_component(0,2,e);return o=this.hex_with_component(o,1,t),o=this.hex_with_component(o,0,n)},component_from_hex:function(e,t){return e>>8*t&255},hex_with_component:function(e,t,n){return n<<(L=8*t)|e&~(255<<L)}},B="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},M=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},N=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),H=function e(t,n,o){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,o)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(o)},z=function(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)},j=function(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},D=function(){function t(){if(M(this,t),this.__state=T.apply(this,arguments),!1===this.__state)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return N(t,[{key:"toString",value:function(){return e(this)}},{key:"toHexString",value:function(){return e(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),t}();D.recalculateRGB=function(e,t,n){if("HEX"===e.__state.space)e.__state[t]=R.component_from_hex(e.__state.hex,n);else{if("HSV"!==e.__state.space)throw new Error("Corrupted color state");k.extend(e.__state,R.hsv_to_rgb(e.__state.h,e.__state.s,e.__state.v))}},D.recalculateHSV=function(e){var t=R.rgb_to_hsv(e.r,e.g,e.b);k.extend(e.__state,{s:t.s,v:t.v}),k.isNaN(t.h)?k.isUndefined(e.__state.h)&&(e.__state.h=0):e.__state.h=t.h},D.COMPONENTS=["r","g","b","h","s","v","hex","a"],t(D.prototype,"r",2),t(D.prototype,"g",1),t(D.prototype,"b",0),n(D.prototype,"h"),n(D.prototype,"s"),n(D.prototype,"v"),Object.defineProperty(D.prototype,"a",{get:function(){return this.__state.a},set:function(e){this.__state.a=e}}),Object.defineProperty(D.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=R.rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(e){this.__state.space="HEX",this.__state.hex=e}});var F=function(){function e(t,n){M(this,e),this.initialValue=t[n],this.domElement=document.createElement("div"),this.object=t,this.property=n,this.__onChange=void 0,this.__onFinishChange=void 0}return N(e,[{key:"onChange",value:function(e){return this.__onChange=e,this}},{key:"onFinishChange",value:function(e){return this.__onFinishChange=e,this}},{key:"setValue",value:function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),e}(),V={HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},I={};k.each(V,function(e,t){k.each(e,function(e){I[e]=t})});var G=/(\d+(\.\d+)?)px/,U={makeSelectable:function(e,t){void 0!==e&&void 0!==e.style&&(e.onselectstart=t?function(){return!1}:function(){},e.style.MozUserSelect=t?"auto":"none",e.style.KhtmlUserSelect=t?"auto":"none",e.unselectable=t?"on":"off")},makeFullscreen:function(e,t,n){var o=n,i=t;k.isUndefined(i)&&(i=!0),k.isUndefined(o)&&(o=!0),e.style.position="absolute",i&&(e.style.left=0,e.style.right=0),o&&(e.style.top=0,e.style.bottom=0)},fakeEvent:function(e,t,n,o){var i=n||{},r=I[t];if(!r)throw new Error("Event type "+t+" not supported.");var a=document.createEvent(r);switch(r){case"MouseEvents":var s=i.x||i.clientX||0,l=i.y||i.clientY||0;a.initMouseEvent(t,i.bubbles||!1,i.cancelable||!0,window,i.clickCount||1,0,0,s,l,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var d=a.initKeyboardEvent||a.initKeyEvent;k.defaults(i,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),d(t,i.bubbles||!1,i.cancelable,window,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.keyCode,i.charCode);break;default:a.initEvent(t,i.bubbles||!1,i.cancelable||!0)}k.defaults(a,o),e.dispatchEvent(a)},bind:function(e,t,n,o){var i=o||!1;return e.addEventListener?e.addEventListener(t,n,i):e.attachEvent&&e.attachEvent("on"+t,n),U},unbind:function(e,t,n,o){var i=o||!1;return e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent&&e.detachEvent("on"+t,n),U},addClass:function(e,t){if(void 0===e.className)e.className=t;else if(e.className!==t){var n=e.className.split(/ +/);-1===n.indexOf(t)&&(n.push(t),e.className=n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return U},removeClass:function(e,t){if(t)if(e.className===t)e.removeAttribute("class");else{var n=e.className.split(/ +/),o=n.indexOf(t);-1!==o&&(n.splice(o,1),e.className=n.join(" "))}else e.className=void 0;return U},hasClass:function(e,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(e.className)||!1},getWidth:function(e){var t=getComputedStyle(e);return o(t["border-left-width"])+o(t["border-right-width"])+o(t["padding-left"])+o(t["padding-right"])+o(t.width)},getHeight:function(e){var t=getComputedStyle(e);return o(t["border-top-width"])+o(t["border-bottom-width"])+o(t["padding-top"])+o(t["padding-bottom"])+o(t.height)},getOffset:function(e){var t=e,n={left:0,top:0};if(t.offsetParent)do{n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent}while(t);return n},isActive:function(e){return e===document.activeElement&&(e.type||e.href)}},X=function(e){function t(e,n){function o(){r.setValue(!r.__prev)}M(this,t);var i=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),r=i;return i.__prev=i.getValue(),i.__checkbox=document.createElement("input"),i.__checkbox.setAttribute("type","checkbox"),U.bind(i.__checkbox,"change",o,!1),i.domElement.appendChild(i.__checkbox),i.updateDisplay(),i}return z(t,e),N(t,[{key:"setValue",value:function(e){var n=H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),n}},{key:"updateDisplay",value:function(){return!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(F),W=function(e){function t(e,n,o){M(this,t);var i=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),r=o,a=i;if(i.__select=document.createElement("select"),k.isArray(r)){var s={};k.each(r,function(e){s[e]=e}),r=s}return k.each(r,function(e,t){var n=document.createElement("option");n.innerHTML=t,n.setAttribute("value",e),a.__select.appendChild(n)}),i.updateDisplay(),U.bind(i.__select,"change",function(){var e=this.options[this.selectedIndex].value;a.setValue(e)}),i.domElement.appendChild(i.__select),i}return z(t,e),N(t,[{key:"setValue",value:function(e){var n=H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),n}},{key:"updateDisplay",value:function(){return U.isActive(this.__select)?this:(this.__select.value=this.getValue(),H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this))}}]),t}(F),Y=function(e){function t(e,n){function o(){a.setValue(a.__input.value)}function i(){a.__onFinishChange&&a.__onFinishChange.call(a,a.getValue())}M(this,t);var r=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),a=r;return r.__input=document.createElement("input"),r.__input.setAttribute("type","text"),U.bind(r.__input,"keyup",o),U.bind(r.__input,"change",o),U.bind(r.__input,"blur",i),U.bind(r.__input,"keydown",function(e){13===e.keyCode&&this.blur()}),r.updateDisplay(),r.domElement.appendChild(r.__input),r}return z(t,e),N(t,[{key:"updateDisplay",value:function(){return U.isActive(this.__input)||(this.__input.value=this.getValue()),H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(F),J=function(e){function t(e,n,o){M(this,t);var r=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),a=o||{};return r.__min=a.min,r.__max=a.max,r.__step=a.step,k.isUndefined(r.__step)?0===r.initialValue?r.__impliedStep=1:r.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(r.initialValue))/Math.LN10))/10:r.__impliedStep=r.__step,r.__precision=i(r.__impliedStep),r}return z(t,e),N(t,[{key:"setValue",value:function(e){var n=e;return void 0!==this.__min&&n<this.__min?n=this.__min:void 0!==this.__max&&n>this.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!=0&&(n=Math.round(n/this.__step)*this.__step),H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,n)}},{key:"min",value:function(e){return this.__min=e,this}},{key:"max",value:function(e){return this.__max=e,this}},{key:"step",value:function(e){return this.__step=e,this.__impliedStep=e,this.__precision=i(e),this}}]),t}(F),K=function(e){function t(e,n,o){function i(){var e=parseFloat(u.__input.value);k.isNaN(e)||u.setValue(e)}function r(){u.__onFinishChange&&u.__onFinishChange.call(u,u.getValue())}function a(){r()}function s(e){var t=h-e.clientY;u.setValue(u.getValue()+t*u.__impliedStep),h=e.clientY}function l(){U.unbind(window,"mousemove",s),U.unbind(window,"mouseup",l),r()}function d(e){U.bind(window,"mousemove",s),U.bind(window,"mouseup",l),h=e.clientY}M(this,t);var c=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,o));c.__truncationSuspended=!1;var u=c,h=void 0;return c.__input=document.createElement("input"),c.__input.setAttribute("type","text"),U.bind(c.__input,"change",i),U.bind(c.__input,"blur",a),U.bind(c.__input,"mousedown",d),U.bind(c.__input,"keydown",function(e){13===e.keyCode&&(u.__truncationSuspended=!0,this.blur(),u.__truncationSuspended=!1,r())}),c.updateDisplay(),c.domElement.appendChild(c.__input),c}return z(t,e),N(t,[{key:"updateDisplay",value:function(){return this.__input.value=this.__truncationSuspended?this.getValue():r(this.getValue(),this.__precision),H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(J),Q=function(e){function t(e,n,o,i,r){function s(e){document.activeElement.blur(),U.bind(window,"mousemove",l),U.bind(window,"mouseup",d),l(e)}function l(e){e.preventDefault();var t=p.__background.getBoundingClientRect();return p.setValue(a(e.clientX,t.left,t.right,p.__min,p.__max)),!1}function d(){U.unbind(window,"mousemove",l),U.unbind(window,"mouseup",d),p.__onFinishChange&&p.__onFinishChange.call(p,p.getValue())}function c(e){1===e.touches.length&&(U.bind(window,"touchmove",u),U.bind(window,"touchend",h),u(e))}function u(e){var t=e.touches[0].clientX,n=p.__background.getBoundingClientRect();p.setValue(a(t,n.left,n.right,p.__min,p.__max))}function h(){U.unbind(window,"touchmove",u),U.unbind(window,"touchend",h),p.__onFinishChange&&p.__onFinishChange.call(p,p.getValue())}M(this,t);var _=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{min:o,max:i,step:r})),p=_;return _.__background=document.createElement("div"),_.__foreground=document.createElement("div"),U.bind(_.__background,"mousedown",s),U.bind(_.__background,"touchstart",c),U.addClass(_.__background,"slider"),U.addClass(_.__foreground,"slider-fg"),_.updateDisplay(),_.__background.appendChild(_.__foreground),_.domElement.appendChild(_.__background),_}return z(t,e),N(t,[{key:"updateDisplay",value:function(){var e=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*e+"%",H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(J),Z=function(e){function t(e,n,o){M(this,t);var i=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),r=i;return i.__button=document.createElement("div"),i.__button.innerHTML=void 0===o?"Fire":o,U.bind(i.__button,"click",function(e){return e.preventDefault(),r.fire(),!1}),U.addClass(i.__button,"button"),i.domElement.appendChild(i.__button),i}return z(t,e),N(t,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),t}(F),q=function(e){function t(e,n){function o(e){u(e),U.bind(window,"mousemove",u),U.bind(window,"touchmove",u),U.bind(window,"mouseup",r),U.bind(window,"touchend",r)}function i(e){h(e),U.bind(window,"mousemove",h),U.bind(window,"touchmove",h),U.bind(window,"mouseup",a),U.bind(window,"touchend",a)}function r(){U.unbind(window,"mousemove",u),U.unbind(window,"touchmove",u),U.unbind(window,"mouseup",r),U.unbind(window,"touchend",r),c()}function a(){U.unbind(window,"mousemove",h),U.unbind(window,"touchmove",h),U.unbind(window,"mouseup",a),U.unbind(window,"touchend",a),c()}function d(){var e=T(this.value);!1!==e?(p.__color.__state=e,p.setValue(p.__color.toOriginal())):this.value=p.__color.toString()}function c(){p.__onFinishChange&&p.__onFinishChange.call(p,p.__color.toOriginal())}function u(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=p.__saturation_field.getBoundingClientRect(),n=e.touches&&e.touches[0]||e,o=n.clientX,i=n.clientY,r=(o-t.left)/(t.right-t.left),a=1-(i-t.top)/(t.bottom-t.top);return a>1?a=1:a<0&&(a=0),r>1?r=1:r<0&&(r=0),p.__color.v=a,p.__color.s=r,p.setValue(p.__color.toOriginal()),!1}function h(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=p.__hue_field.getBoundingClientRect(),n=e.touches&&e.touches[0]||e,o=n.clientY,i=1-(o-t.top)/(t.bottom-t.top);return i>1?i=1:i<0&&(i=0),p.__color.h=360*i,p.setValue(p.__color.toOriginal()),!1}M(this,t);var _=j(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));_.__color=new D(_.getValue()),_.__temp=new D(0);var p=_;_.domElement=document.createElement("div"),U.makeSelectable(_.domElement,!1),_.__selector=document.createElement("div"),_.__selector.className="selector",_.__saturation_field=document.createElement("div"),_.__saturation_field.className="saturation-field",_.__field_knob=document.createElement("div"),_.__field_knob.className="field-knob",_.__field_knob_border="2px solid ",_.__hue_knob=document.createElement("div"),_.__hue_knob.className="hue-knob",_.__hue_field=document.createElement("div"),_.__hue_field.className="hue-field",_.__input=document.createElement("input"),_.__input.type="text",_.__input_textShadow="0 1px 1px ",U.bind(_.__input,"keydown",function(e){13===e.keyCode&&d.call(this)}),U.bind(_.__input,"blur",d),U.bind(_.__selector,"mousedown",function(){U.addClass(this,"drag").bind(window,"mouseup",function(){U.removeClass(p.__selector,"drag")})}),U.bind(_.__selector,"touchstart",function(){U.addClass(this,"drag").bind(window,"touchend",function(){U.removeClass(p.__selector,"drag")})});var f=document.createElement("div");return k.extend(_.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),k.extend(_.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:_.__field_knob_border+(_.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),k.extend(_.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),k.extend(_.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),k.extend(f.style,{width:"100%",height:"100%",background:"none"}),s(f,"top","rgba(0,0,0,0)","#000"),k.extend(_.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),l(_.__hue_field),k.extend(_.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:_.__input_textShadow+"rgba(0,0,0,0.7)"}),U.bind(_.__saturation_field,"mousedown",o),U.bind(_.__saturation_field,"touchstart",o),U.bind(_.__field_knob,"mousedown",o),U.bind(_.__field_knob,"touchstart",o),U.bind(_.__hue_field,"mousedown",i),U.bind(_.__hue_field,"touchstart",i),_.__saturation_field.appendChild(f),_.__selector.appendChild(_.__field_knob),_.__selector.appendChild(_.__saturation_field),_.__selector.appendChild(_.__hue_field),_.__hue_field.appendChild(_.__hue_knob),_.domElement.appendChild(_.__input),_.domElement.appendChild(_.__selector),_.updateDisplay(),_}return z(t,e),N(t,[{key:"updateDisplay",value:function(){var e=T(this.getValue());if(!1!==e){var t=!1;k.each(D.COMPONENTS,function(n){if(!k.isUndefined(e[n])&&!k.isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}},this),t&&k.extend(this.__color.__state,e)}k.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n;k.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,s(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),k.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"})}}]),t}(F),$=["-moz-","-o-","-webkit-","-ms-",""],ee={load:function(e,t){var n=t||document,o=n.createElement("link");o.type="text/css",o.rel="stylesheet",o.href=e,n.getElementsByTagName("head")[0].appendChild(o)},inject:function(e,t){var n=t||document,o=document.createElement("style");o.type="text/css",o.innerHTML=e;var i=n.getElementsByTagName("head")[0];try{i.appendChild(o)}catch(e){}}},te=function(e,t){var n=e[t];return k.isArray(arguments[2])||k.isObject(arguments[2])?new W(e,t,arguments[2]):k.isNumber(n)?k.isNumber(arguments[2])&&k.isNumber(arguments[3])?k.isNumber(arguments[4])?new Q(e,t,arguments[2],arguments[3],arguments[4]):new Q(e,t,arguments[2],arguments[3]):k.isNumber(arguments[4])?new K(e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new K(e,t,{min:arguments[2],max:arguments[3]}):k.isString(n)?new Y(e,t):k.isFunction(n)?new Z(e,t,""):k.isBoolean(n)?new X(e,t):null},ne=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||d,oe=function(){function e(){M(this,e),this.backgroundElement=document.createElement("div"),k.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),U.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),k.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;U.bind(this.backgroundElement,"click",function(){t.hide()})}return N(e,[{key:"show",value:function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),k.defer(function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"})}},{key:"hide",value:function(){var e=this,t=function t(){e.domElement.style.display="none",e.backgroundElement.style.display="none",U.unbind(e.domElement,"webkitTransitionEnd",t),U.unbind(e.domElement,"transitionend",t),U.unbind(e.domElement,"oTransitionEnd",t)};U.bind(this.domElement,"webkitTransitionEnd",t),U.bind(this.domElement,"transitionend",t),U.bind(this.domElement,"oTransitionEnd",t),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-U.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-U.getHeight(this.domElement)/2+"px"}}]),e}(),ie=function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n");ee.inject(ie);var re="Default",ae=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}(),se=void 0,le=!0,de=void 0,ce=!1,ue=[],he=function e(t){var n=this,o=t||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),U.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],o=k.defaults(o,{closeOnTop:!1,autoPlace:!0,width:e.DEFAULT_WIDTH}),o=k.defaults(o,{resizable:o.autoPlace,hideable:o.autoPlace}),k.isUndefined(o.load)?o.load={preset:re}:o.preset&&(o.load.preset=o.preset),k.isUndefined(o.parent)&&o.hideable&&ue.push(this),o.resizable=k.isUndefined(o.parent)&&o.resizable,o.autoPlace&&k.isUndefined(o.scrollable)&&(o.scrollable=!0);var i=ae&&"true"===localStorage.getItem(f(this,"isLocal")),r=void 0;if(Object.defineProperties(this,{parent:{get:function(){return o.parent}},scrollable:{get:function(){return o.scrollable}},autoPlace:{get:function(){return o.autoPlace}},closeOnTop:{get:function(){return o.closeOnTop}},preset:{get:function(){return n.parent?n.getRoot().preset:o.load.preset},set:function(e){n.parent?n.getRoot().preset=e:o.load.preset=e,x(this),n.revert()}},width:{get:function(){return o.width},set:function(e){o.width=e,y(n,e)}},name:{get:function(){return o.name},set:function(e){o.name=e,titleRowName&&(titleRowName.innerHTML=o.name)}},closed:{get:function(){return o.closed},set:function(t){o.closed=t,o.closed?U.addClass(n.__ul,e.CLASS_CLOSED):U.removeClass(n.__ul,e.CLASS_CLOSED),this.onResize(),n.__closeButton&&(n.__closeButton.innerHTML=t?e.TEXT_OPEN:e.TEXT_CLOSED)}},load:{get:function(){return o.load}},useLocalStorage:{get:function(){return i},set:function(e){ae&&(i=e,e?U.bind(window,"unload",r):U.unbind(window,"unload",r),localStorage.setItem(f(n,"isLocal"),e))}}}),k.isUndefined(o.parent)){if(o.closed=!1,U.addClass(this.domElement,e.CLASS_MAIN),U.makeSelectable(this.domElement,!1),ae&&i){n.useLocalStorage=!0;var a=localStorage.getItem(f(this,"gui"));a&&(o.load=JSON.parse(a))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=e.TEXT_CLOSED,U.addClass(this.__closeButton,e.CLASS_CLOSE_BUTTON),o.closeOnTop?(U.addClass(this.__closeButton,e.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(U.addClass(this.__closeButton,e.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),U.bind(this.__closeButton,"click",function(){n.closed=!n.closed})}else{void 0===o.closed&&(o.closed=!0);var s=document.createTextNode(o.name);U.addClass(s,"controller-name");var l=c(n,s),d=function(e){return e.preventDefault(),n.closed=!n.closed,!1};U.addClass(this.__ul,e.CLASS_CLOSED),U.addClass(l,"title"),U.bind(l,"click",d),o.closed||(this.closed=!1)}o.autoPlace&&(k.isUndefined(o.parent)&&(le&&(de=document.createElement("div"),U.addClass(de,"dg"),U.addClass(de,e.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(de),le=!1),de.appendChild(this.domElement),U.addClass(this.domElement,e.CLASS_AUTO_PLACE)),this.parent||y(n,o.width)),this.__resizeHandler=function(){n.onResizeDebounced()},U.bind(window,"resize",this.__resizeHandler),U.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),U.bind(this.__ul,"transitionend",this.__resizeHandler),U.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),o.resizable&&v(this),r=function(){ae&&"true"===localStorage.getItem(f(n,"isLocal"))&&localStorage.setItem(f(n,"gui"),JSON.stringify(n.getSaveObject()))},this.saveToLocalStorageIfPossible=r,o.parent||function(){var e=n.getRoot();e.width+=1,k.defer(function(){e.width-=1})}()};return he.toggleHide=function(){ce=!ce,k.each(ue,function(e){e.domElement.style.display=ce?"none":""})},he.CLASS_AUTO_PLACE="a",he.CLASS_AUTO_PLACE_CONTAINER="ac",he.CLASS_MAIN="main",he.CLASS_CONTROLLER_ROW="cr",he.CLASS_TOO_TALL="taller-than-window",he.CLASS_CLOSED="closed",he.CLASS_CLOSE_BUTTON="close-button",he.CLASS_CLOSE_TOP="close-top",he.CLASS_CLOSE_BOTTOM="close-bottom",he.CLASS_DRAG="drag",he.DEFAULT_WIDTH=245,he.TEXT_CLOSED="Close Controls",he.TEXT_OPEN="Open Controls",he._keydownHandler=function(e){"text"===document.activeElement.type||72!==e.which&&72!==e.keyCode||he.toggleHide()},U.bind(window,"keydown",he._keydownHandler,!1),k.extend(he.prototype,{add:function(e,t){return p(this,e,t,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(e,t){return p(this,e,t,{color:!0})},remove:function(e){this.__ul.removeChild(e.__li),this.__controllers.splice(this.__controllers.indexOf(e),1);var t=this;k.defer(function(){t.onResize()})},destroy:function(){this.autoPlace&&de.removeChild(this.domElement),U.unbind(window,"keydown",he._keydownHandler,!1),U.unbind(window,"resize",this.__resizeHandler),this.saveToLocalStorageIfPossible&&U.unbind(window,"unload",this.saveToLocalStorageIfPossible)},addFolder:function(e){if(void 0!==this.__folders[e])throw new Error('You already have a folder in this GUI by the name "'+e+'"');var t={name:e,parent:this};t.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[e]&&(t.closed=this.load.folders[e].closed,t.load=this.load.folders[e]);var n=new he(t);this.__folders[e]=n;var o=c(this,n.domElement);return U.addClass(o,"folder"),n},removeFolder:function(e){this.__ul.removeChild(e.domElement.parentElement),delete this.__folders[e.name],this.load&&this.load.folders&&this.load.folders[e.name]&&delete this.load.folders[e.name];var t=this;k.defer(function(){t.onResize()})},open:function(){this.closed=!1},close:function(){this.closed=!0},onResize:function(){var e=this.getRoot();if(e.scrollable){var t=U.getOffset(e.__ul).top,n=0;k.each(e.__ul.childNodes,function(t){e.autoPlace&&t===e.__save_row||(n+=U.getHeight(t))}),window.innerHeight-t-20<n?(U.addClass(e.domElement,he.CLASS_TOO_TALL),e.__ul.style.height=window.innerHeight-t-20+"px"):(U.removeClass(e.domElement,he.CLASS_TOO_TALL),e.__ul.style.height="auto")}e.__resize_handle&&k.defer(function(){e.__resize_handle.style.height=e.__ul.offsetHeight+"px"}),e.__closeButton&&(e.__closeButton.style.width=e.width+"px")},onResizeDebounced:k.debounce(function(){this.onResize()},50),remember:function(){if(k.isUndefined(se)&&(se=new oe,se.domElement.innerHTML='<div id="dg-save" class="dg dialogue">\n\n Here\'s the new load parameter for your <code>GUI</code>\'s constructor:\n\n <textarea id="dg-new-constructor"></textarea>\n\n <div id="dg-save-locally">\n\n <input id="dg-local-storage" type="checkbox"/> Automatically save\n values to <code>localStorage</code> on exit.\n\n <div id="dg-local-explain">The values saved to <code>localStorage</code> will\n override those passed to <code>dat.GUI</code>\'s constructor. This makes it\n easier to work incrementally, but <code>localStorage</code> is fragile,\n and your friends may not see the same values you do.\n\n </div>\n\n </div>\n\n</div>'),this.parent)throw new Error("You can only call remember on a top level GUI.");var e=this;k.each(Array.prototype.slice.call(arguments),function(t){0===e.__rememberedObjects.length&&b(e),-1===e.__rememberedObjects.indexOf(t)&&e.__rememberedObjects.push(t)}),this.autoPlace&&y(this,this.width)},getRoot:function(){for(var e=this;e.parent;)e=e.parent;return e},getSaveObject:function(){var e=this.load;return e.closed=this.closed,this.__rememberedObjects.length>0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=w(this)),e.folders={},k.each(this.__folders,function(t,n){e.folders[n]=t.getSaveObject()}),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=w(this),u(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered[re]=w(this,!0)),this.load.remembered[e]=w(this),this.preset=e,m(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){k.each(this.__controllers,function(t){this.getRoot().load.remembered?_(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())},this),k.each(this.__folders,function(e){e.revert(e)}),e||u(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&C(this.__listening)},updateDisplay:function(){k.each(this.__controllers,function(e){e.updateDisplay()}),k.each(this.__folders,function(e){e.updateDisplay()})}}),{color:{Color:D,math:R,interpret:T},controllers:{Controller:F,BooleanController:X,OptionController:W,StringController:Y,NumberController:J,NumberControllerBox:K,NumberControllerSlider:Q,FunctionController:Z,ColorController:q},dom:{dom:U},gui:{GUI:he},GUI:he}})},467:function(e,t,n){var o=n(49);o.CombinedCamera=function(e,t,n,i,r,a,s){o.Camera.call(this),this.fov=n,this.far=r,this.near=i,this.left=-e/2,this.right=e/2,this.top=t/2,this.bottom=-t/2,this.aspect=e/t,this.zoom=1,this.view=null,this.cameraO=new o.OrthographicCamera(e/-2,e/2,t/2,t/-2,a,s),this.cameraP=new o.PerspectiveCamera(n,e/t,i,r),this.toPerspective()},o.CombinedCamera.prototype=Object.create(o.Camera.prototype),o.CombinedCamera.prototype.constructor=o.CombinedCamera,o.CombinedCamera.prototype.toPerspective=function(){this.near=this.cameraP.near,this.far=this.cameraP.far,this.cameraP.aspect=this.aspect,this.cameraP.fov=this.fov/this.zoom,this.cameraP.view=this.view,this.cameraP.updateProjectionMatrix(),this.projectionMatrix=this.cameraP.projectionMatrix,this.inPerspectiveMode=!0,this.inOrthographicMode=!1},o.CombinedCamera.prototype.toOrthographic=function(){var e=this.fov,t=this.cameraP.aspect,n=this.cameraP.near,o=this.cameraP.far,i=(n+o)/2,r=Math.tan(e*Math.PI/180/2)*i,a=r*t;r/=this.zoom,a/=this.zoom,this.cameraO.left=-a,this.cameraO.right=a,this.cameraO.top=r,this.cameraO.bottom=-r,this.cameraO.view=this.view,this.cameraO.updateProjectionMatrix(),this.near=this.cameraO.near,this.far=this.cameraO.far,this.projectionMatrix=this.cameraO.projectionMatrix,this.inPerspectiveMode=!1,this.inOrthographicMode=!0},o.CombinedCamera.prototype.copy=function(e){return o.Camera.prototype.copy.call(this,e),this.fov=e.fov,this.far=e.far,this.near=e.near,this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this.aspect=e.aspect,this.cameraO.copy(e.cameraO),this.cameraP.copy(e.cameraP),this.inOrthographicMode=e.inOrthographicMode,this.inPerspectiveMode=e.inPerspectiveMode,this},o.CombinedCamera.prototype.setViewOffset=function(e,t,n,o,i,r){this.view={fullWidth:e,fullHeight:t,offsetX:n,offsetY:o,width:i,height:r},this.inPerspectiveMode?(this.aspect=e/t,this.toPerspective()):this.toOrthographic()},o.CombinedCamera.prototype.clearViewOffset=function(){this.view=null,this.updateProjectionMatrix()},o.CombinedCamera.prototype.setSize=function(e,t){this.cameraP.aspect=e/t,this.left=-e/2,this.right=e/2,this.top=t/2,this.bottom=-t/2},o.CombinedCamera.prototype.setFov=function(e){this.fov=e,this.inPerspectiveMode?this.toPerspective():this.toOrthographic()},o.CombinedCamera.prototype.updateProjectionMatrix=function(){this.inPerspectiveMode?this.toPerspective():(this.toPerspective(),this.toOrthographic())},o.CombinedCamera.prototype.setLens=function(e,t){void 0===t&&(t=35);var n=.5*t/(e*Math.max(this.cameraP.aspect,1)),i=2*o.Math.RAD2DEG*Math.atan(n);return this.setFov(i),i},o.CombinedCamera.prototype.setZoom=function(e){this.zoom=e,this.inPerspectiveMode?this.toPerspective():this.toOrthographic()},o.CombinedCamera.prototype.toFrontView=function(){this.rotation.x=0,this.rotation.y=0,this.rotation.z=0},o.CombinedCamera.prototype.toBackView=function(){this.rotation.x=0,this.rotation.y=Math.PI,this.rotation.z=0},o.CombinedCamera.prototype.toLeftView=function(){this.rotation.x=0,this.rotation.y=-Math.PI/2,this.rotation.z=0},o.CombinedCamera.prototype.toRightView=function(){this.rotation.x=0,this.rotation.y=Math.PI/2,this.rotation.z=0},o.CombinedCamera.prototype.toTopView=function(){this.rotation.x=-Math.PI/2,this.rotation.y=0,this.rotation.z=0},o.CombinedCamera.prototype.toBottomView=function(){this.rotation.x=Math.PI/2,this.rotation.y=0,this.rotation.z=0}},468:function(e,t,n){e.exports=function(){return new Worker(n.p+"lorenzWorker.min.js")}}},[175]);
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Lorenz Attractors</title>
<script type="text/javascript" src="vendors.min.js"></script><script type="text/javascript" src="app.min.js"></script></head>
<body style="background-color: #000000;">
</body>
</html>
!function(t){function e(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,a){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){"use strict";self.addEventListener("message",function(t){for(var e=[],n=t.data.length,r=t.data.sigma,o=t.data.rho,u=t.data.beta,i=t.data.definition,s={x:t.data.x,y:t.data.y,z:t.data.z},c=0;c<n;++c)s=a(s.x,s.y,s.z,i,r,o,u),e.push(s);postMessage({points:e,length:n})},!1);var a=function(t,e,n,a,r,o,u){return{x:t+a*r*(e-t),y:e+a*(t*(o-n)-e),z:n+a*(t*e-u*n),d:Math.pow(t,2)+Math.pow(e,2)+Math.pow(n,2)}}}]);
This file has been truncated, but you can view the full file.
!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,o,a){for(var s,u,c,l=0,h=[];l<r.length;l++)u=r[l],i[u]&&h.push(i[u][0]),i[u]=0;for(s in o)Object.prototype.hasOwnProperty.call(o,s)&&(t[s]=o[s]);for(n&&n(r,o,a);h.length;)h.shift()();if(a)for(l=0;l<a.length;l++)c=e(e.s=a[l]);return c};var r={},i={1:0};e.e=function(t){function n(){s.onerror=s.onload=null,clearTimeout(u);var e=i[t];0!==e&&(e&&e[1](new Error("Loading chunk "+t+" failed.")),i[t]=void 0)}var r=i[t];if(0===r)return new Promise(function(t){t()});if(r)return r[2];var o=new Promise(function(e,n){r=i[t]=[e,n]});r[2]=o;var a=document.getElementsByTagName("head")[0],s=document.createElement("script");s.type="text/javascript",s.charset="utf-8",s.async=!0,s.timeout=12e4,e.nc&&s.setAttribute("nonce",e.nc),s.src=e.p+""+t+".min.js";var u=setTimeout(n,12e4);return s.onerror=s.onload=n,a.appendChild(s),o},e.m=t,e.c=r,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e.oe=function(t){throw console.error(t),t},e(e.s=469)}([function(t,e,n){"use strict";function r(t){return t>1?0:t<-1?u:Math.acos(t)}function i(t){return t>1?c:t<-1?-c:Math.asin(t)}function o(t){return(t=w(t/2))*t}n.d(e,"i",function(){return a}),n.d(e,"j",function(){return s}),n.d(e,"o",function(){return u}),n.d(e,"l",function(){return c}),n.d(e,"q",function(){return l}),n.d(e,"w",function(){return h}),n.d(e,"h",function(){return f}),n.d(e,"r",function(){return d}),n.d(e,"a",function(){return p}),n.d(e,"d",function(){return m}),n.d(e,"e",function(){return v}),n.d(e,"g",function(){return g}),n.d(e,"f",function(){return y}),n.d(e,"k",function(){return b}),n.d(e,"n",function(){return _}),n.d(e,"p",function(){return x}),n.d(e,"t",function(){return w}),n.d(e,"s",function(){return M}),n.d(e,"u",function(){return E}),n.d(e,"v",function(){return T}),e.b=r,e.c=i,e.m=o;var a=1e-6,s=1e-12,u=Math.PI,c=u/2,l=u/4,h=2*u,f=180/u,d=u/180,p=Math.abs,m=Math.atan,v=Math.atan2,g=Math.cos,y=Math.ceil,b=Math.exp,_=(Math.floor,Math.log),x=Math.pow,w=Math.sin,M=Math.sign||function(t){return t>0?1:t<0?-1:0},E=Math.sqrt,T=Math.tan},function(t,e,n){"use strict";var r=n(52);n.d(e,"b",function(){return r.a});var i=n(201);n.d(e,"e",function(){return i.a});var o=n(104);n.d(e,"f",function(){return o.a});var a=n(202);n.d(e,"g",function(){return a.a});var s=n(53);n.d(e,"h",function(){return s.a});var u=n(54);n.d(e,"i",function(){return u.a});var c=n(33);n.d(e,"a",function(){return c.a});var l=n(203);n.d(e,"j",function(){return l.a});var h=n(231);n.d(e,"k",function(){return h.a});var f=n(4);n.d(e,"l",function(){return f.b});var d=n(57);n.d(e,"m",function(){return d.a});var p=n(105);n.d(e,"n",function(){return p.a});var m=n(108);n.d(e,"o",function(){return m.b});var v=n(232);n.d(e,"p",function(){return v.a});var g=n(233);n.d(e,"q",function(){return g.a});var y=n(58);n.d(e,"r",function(){return y.a});var b=n(56);n.d(e,"d",function(){return b.c}),n.d(e,"c",function(){return b.a})},function(t,e,n){"use strict";function r(t,e,n,a){function s(e){return t(e=new Date(+e)),e}return s.floor=s,s.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},s.round=function(t){var e=s(t),n=s.ceil(t);return t-e<n-t?e:n},s.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},s.range=function(n,r,i){var o,a=[];if(n=s.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;do{a.push(o=new Date(+n)),e(n,i),t(n)}while(o<n&&n<r);return a},s.filter=function(n){return r(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(s.count=function(e,r){return i.setTime(+e),o.setTime(+r),t(i),t(o),Math.floor(n(i,o))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(a?function(e){return a(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}e.a=r;var i=new Date,o=new Date},function(t,e,n){"use strict";var r=n(92);n.d(e,"b",function(){return r.c}),n.d(e,"d",function(){return r.b}),n.d(e,"c",function(){return r.a});var i=n(17);n.d(e,"a",function(){return i.a});var o=n(93);n.d(e,"e",function(){return o.a});var a=n(177);n.d(e,"f",function(){return a.a});var s=n(178);n.d(e,"g",function(){return s.a});var u=n(95);n.d(e,"h",function(){return u.a});var c=n(97);n.d(e,"i",function(){return c.a});var l=n(179);n.d(e,"j",function(){return l.a});var h=n(182);n.d(e,"w",function(){return h.a});var f=n(183);n.d(e,"x",function(){return f.a});var d=n(101);n.d(e,"y",function(){return d.a});var p=n(184);n.d(e,"k",function(){return p.a});var m=n(185);n.d(e,"l",function(){return m.a});var v=n(186);n.d(e,"m",function(){return v.a});var g=n(187);n.d(e,"n",function(){return g.a});var y=n(102);n.d(e,"o",function(){return y.a});var b=n(94);n.d(e,"p",function(){return b.a});var _=n(188);n.d(e,"q",function(){return _.a});var x=n(50);n.d(e,"r",function(){return x.a});var w=n(99);n.d(e,"s",function(){return w.a});var M=n(189);n.d(e,"t",function(){return M.a});var E=n(190);n.d(e,"u",function(){return E.a});var T=n(191);n.d(e,"v",function(){return T.a});var S=n(100);n.d(e,"B",function(){return S.a}),n.d(e,"z",function(){return S.b}),n.d(e,"A",function(){return S.c});var A=n(103);n.d(e,"C",function(){return A.a});var O=n(96);n.d(e,"D",function(){return O.a});var C=n(192);n.d(e,"E",function(){return C.a})},function(t,e,n){"use strict";function r(t,e){this._groups=t,this._parents=e}function i(){return new r([[document.documentElement]],N)}n.d(e,"c",function(){return N}),e.a=r;var o=n(204),a=n(205),s=n(206),u=n(207),c=n(106),l=n(209),h=n(210),f=n(211),d=n(212),p=n(213),m=n(214),v=n(215),g=n(216),y=n(217),b=n(218),_=n(219),x=n(108),w=n(220),M=n(221),E=n(222),T=n(223),S=n(224),A=n(225),O=n(226),C=n(227),R=n(228),L=n(229),j=n(56),P=n(230),N=[null];r.prototype=i.prototype={constructor:r,select:o.a,selectAll:a.a,filter:s.a,data:u.a,enter:c.b,exit:l.a,merge:h.a,order:f.a,sort:d.a,call:p.a,nodes:m.a,node:v.a,size:g.a,empty:y.a,each:b.a,attr:_.a,style:x.a,property:w.a,classed:M.a,text:E.a,html:T.a,raise:S.a,lower:A.a,append:O.a,insert:C.a,remove:R.a,datum:L.a,on:j.b,dispatch:P.a},e.b=i},function(t,e,n){"use strict";var r=n(59);n.d(e,"a",function(){return r.a});var i=n(115);n.d(e,"b",function(){return i.a});var o=n(62);n.d(e,"c",function(){return o.b});var a=n(113);n.d(e,"d",function(){return a.a});var s=n(116);n.d(e,"g",function(){return s.a});var u=n(34);n.d(e,"m",function(){return u.a});var c=n(117);n.d(e,"n",function(){return c.a});var l=n(238);n.d(e,"r",function(){return l.a});var h=n(118);n.d(e,"s",function(){return h.a});var f=n(239);n.d(e,"t",function(){return f.a}),n.d(e,"u",function(){return f.b});var d=n(242);n.d(e,"v",function(){return d.a});var p=n(112);n.d(e,"o",function(){return p.a}),n.d(e,"p",function(){return p.b}),n.d(e,"q",function(){return p.c});var m=n(243);n.d(e,"j",function(){return m.a}),n.d(e,"k",function(){return m.b});var v=n(244);n.d(e,"l",function(){return v.a});var g=n(245);n.d(e,"h",function(){return g.a}),n.d(e,"i",function(){return g.b});var y=n(246);n.d(e,"e",function(){return y.b}),n.d(e,"f",function(){return y.a});var b=n(247);n.d(e,"w",function(){return b.a})},function(t,e,n){"use strict";function r(t,e){var n=o(t,e);if(n.state>h)throw new Error("too late; already scheduled");return n}function i(t,e){var n=o(t,e);if(n.state>d)throw new Error("too late; already started");return n}function o(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function a(t,e,n){function r(t){n.state=f,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}function i(r){var l,h,v,y;if(n.state!==f)return a();for(l in c)if(y=c[l],y.name===n.name){if(y.state===p)return Object(u.c)(i);y.state===m?(y.state=g,y.timer.stop(),y.on.call("interrupt",t,t.__data__,y.index,y.group),delete c[l]):+l<e&&(y.state=g,y.timer.stop(),delete c[l])}if(Object(u.c)(function(){n.state===p&&(n.state=m,n.timer.restart(o,n.delay,n.time),o(r))}),n.state=d,n.on.call("start",t,t.__data__,n.index,n.group),n.state===d){for(n.state=p,s=new Array(v=n.tween.length),l=0,h=-1;l<v;++l)(y=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(s[++h]=y);s.length=h+1}}function o(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=v,1),i=-1,o=s.length;++i<o;)s[i].call(null,r);n.state===v&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){n.state=g,n.timer.stop(),delete c[e];for(var r in c)return;delete t.__transition}var s,c=t.__transition;c[e]=n,n.timer=Object(u.d)(r,0,n.time)}n.d(e,"c",function(){return f}),n.d(e,"d",function(){return d}),n.d(e,"b",function(){return v}),n.d(e,"a",function(){return g}),e.g=r,e.h=i,e.f=o;var s=n(12),u=n(35),c=Object(s.a)("start","end","interrupt"),l=[],h=0,f=1,d=2,p=3,m=4,v=5,g=6;e.e=function(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};a(t,n,{name:e,index:r,group:i,on:c,tween:l,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:h})}},function(t,e,n){"use strict";var r=n(60);n.d(e,"a",function(){return r.e}),n.d(e,"f",function(){return r.g}),n.d(e,"d",function(){return r.f});var i=n(236);n.d(e,"e",function(){return i.a}),n.d(e,"c",function(){return i.b});var o=n(237);n.d(e,"b",function(){return o.a})},function(t,e,n){"use strict";function r(t){return Object(d.b)({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function i(t){return o(function(){return t})()}function o(t){function e(t){return t=x(t[0]*h.r,t[1]*h.r),[t[0]*A+y,b-t[1]*A]}function n(t){return(t=x.invert((t[0]-y)/A,(b-t[1])/A))&&[t[0]*h.h,t[1]*h.h]}function i(t,e){return t=g(t,e),[t[0]*A+y,b-t[1]*A]}function o(){x=Object(c.a)(_=Object(f.b)(j,P,N),g);var t=g(R,L);return y=O-t[0]*A,b=C+t[1]*A,d()}function d(){return T=S=null,e}var g,y,b,_,x,w,M,E,T,S,A=150,O=480,C=250,R=0,L=0,j=0,P=0,N=0,I=null,U=a.a,D=null,k=l.a,F=.5,B=Object(m.a)(i,F);return e.stream=function(t){return T&&S===t?T:T=v(r(_)(U(B(k(S=t)))))},e.preclip=function(t){return arguments.length?(U=t,I=void 0,d()):U},e.postclip=function(t){return arguments.length?(k=t,D=w=M=E=null,d()):k},e.clipAngle=function(t){return arguments.length?(U=+t?Object(s.a)(I=t*h.r):(I=null,a.a),d()):I*h.h},e.clipExtent=function(t){return arguments.length?(k=null==t?(D=w=M=E=null,l.a):Object(u.a)(D=+t[0][0],w=+t[0][1],M=+t[1][0],E=+t[1][1]),d()):null==D?null:[[D,w],[M,E]]},e.scale=function(t){return arguments.length?(A=+t,o()):A},e.translate=function(t){return arguments.length?(O=+t[0],C=+t[1],o()):[O,C]},e.center=function(t){return arguments.length?(R=t[0]%360*h.r,L=t[1]%360*h.r,o()):[R*h.h,L*h.h]},e.rotate=function(t){return arguments.length?(j=t[0]%360*h.r,P=t[1]%360*h.r,N=t.length>2?t[2]%360*h.r:0,o()):[j*h.h,P*h.h,N*h.h]},e.precision=function(t){return arguments.length?(B=Object(m.a)(i,F=t*t),d()):Object(h.u)(F)},e.fitExtent=function(t,n){return Object(p.a)(e,t,n)},e.fitSize=function(t,n){return Object(p.c)(e,t,n)},e.fitWidth=function(t,n){return Object(p.d)(e,t,n)},e.fitHeight=function(t,n){return Object(p.b)(e,t,n)},function(){return g=t.apply(this,arguments),e.invert=g.invert&&n,o()}}e.a=i,e.b=o;var a=n(131),s=n(137),u=n(39),c=n(130),l=n(73),h=n(0),f=n(38),d=n(40),p=n(76),m=n(341),v=Object(d.b)({point:function(t,e){this.stream.point(t*h.r,e*h.r)}})},function(t,e,n){"use strict";n.d(e,"d",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"e",function(){return s});var r=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},function(t,e,n){"use strict";function r(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function i(t){return Object(a.l)().transition(t)}function o(){return++E}e.a=r,e.b=i,e.c=o;var a=n(1),s=n(253),u=n(254),c=n(255),l=n(256),h=n(257),f=n(258),d=n(259),p=n(260),m=n(261),v=n(262),g=n(263),y=n(264),b=n(265),_=n(266),x=n(267),w=n(268),M=n(36),E=0,T=a.l.prototype;r.prototype=i.prototype={constructor:r,select:v.a,selectAll:g.a,filter:f.a,merge:d.a,selection:y.a,transition:w.a,call:T.call,nodes:T.nodes,node:T.node,size:T.size,empty:T.empty,each:T.each,on:p.a,attr:s.a,attrTween:u.a,style:b.a,styleTween:_.a,text:x.a,remove:m.a,tween:M.a,delay:c.a,duration:l.a,ease:h.a}},function(t,e,n){"use strict";function r(){}e.a=r},function(t,e,n){"use strict";var r=n(199);n.d(e,"a",function(){return r.a})},function(t,e,n){"use strict";var r=n(288);n.d(e,"a",function(){return r.a})},function(t,e,n){"use strict";function r(t,e){t&&s.hasOwnProperty(t.type)&&s[t.type](t,e)}function i(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function o(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)i(t[n],e,1);e.polygonEnd()}var a={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)r(n[i].geometry,e)}},s={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){i(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)i(n[r],e,0)},Polygon:function(t,e){o(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)o(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)r(n[i],e)}};e.a=function(t,e){t&&a.hasOwnProperty(t.type)?a[t.type](t,e):r(t,e)}},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o});var r=Array.prototype,i=r.map,o=r.slice},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";e.a=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";function r(){this.reset()}function i(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}e.a=function(){return new r},r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(t){i(o,t,this.t),i(this,o.s,this.s),this.s?this.t+=o.t:this.s=o.t},valueOf:function(){return this.s}};var o=new r},function(t,e,n){"use strict";e.a=function(){return Math.random()}},function(t,e,n){"use strict";e.a=function(t){return null===t?NaN:+t}},function(t,e,n){"use strict";function r(t,e){return function(n){return t+n*e}}function i(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function o(t,e){var n=e-t;return n?r(t,n>180||n<-180?n-360*Math.round(n/360):n):Object(u.a)(isNaN(t)?e:t)}function a(t){return 1==(t=+t)?s:function(e,n){return n-e?i(e,n,t):Object(u.a)(isNaN(e)?n:e)}}function s(t,e){var n=e-t;return n?r(t,n):Object(u.a)(isNaN(t)?e:t)}e.c=o,e.b=a,e.a=s;var u=n(114)},function(t,e,n){"use strict";var r=n(289);n.d(e,"d",function(){return r.a});var i=n(290);n.d(e,"e",function(){return i.a});var o=n(65);n.d(e,"c",function(){return o.a});var a=n(291);n.d(e,"b",function(){return a.a});var s=n(292);n.d(e,"f",function(){return s.a});var u=n(293);n.d(e,"a",function(){return u.a})},function(t,e,n){"use strict";function r(t){return[Object(l.e)(t[1],t[0]),Object(l.c)(t[2])]}function i(t){var e=t[0],n=t[1],r=Object(l.g)(n);return[r*Object(l.g)(e),r*Object(l.t)(e),Object(l.t)(n)]}function o(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function a(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function s(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function u(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function c(t){var e=Object(l.u)(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}e.g=r,e.a=i,e.d=o,e.c=a,e.b=s,e.f=u,e.e=c;var l=n(0)},function(t,e,n){"use strict";function r(t){return function(e,n){var r=Object(o.g)(e),i=Object(o.g)(n),a=t(r*i);return[a*i*Object(o.t)(e),a*Object(o.t)(n)]}}function i(t){return function(e,n){var r=Object(o.u)(e*e+n*n),i=t(r),a=Object(o.t)(i),s=Object(o.g)(i);return[Object(o.e)(e*a,r*s),Object(o.c)(r&&n*a/r)]}}e.b=r,e.a=i;var o=n(0)},function(t,e,n){"use strict";e.a=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(r-e)/t.value;++s<u;)o=a[s],o.y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c}},function(t,e,n){"use strict";function r(t){var e=t.domain;return t.ticks=function(t){var n=e();return Object(o.B)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){return Object(u.a)(e(),t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,s=i.length-1,u=i[a],c=i[s];return c<u&&(r=u,u=c,c=r,r=a,a=s,s=r),r=Object(o.z)(u,c,n),r>0?(u=Math.floor(u/r)*r,c=Math.ceil(c/r)*r,r=Object(o.z)(u,c,n)):r<0&&(u=Math.ceil(u*r)/r,c=Math.floor(c*r)/r,r=Object(o.z)(u,c,n)),r>0?(i[a]=Math.floor(u/r)*r,i[s]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(u*r)/r,i[s]=Math.floor(c*r)/r,e(i)),t},t}function i(){var t=Object(s.b)(s.c,a.m);return t.copy=function(){return Object(s.a)(t,i())},r(t)}e.b=r,e.a=i;var o=n(3),a=n(5),s=n(43),u=n(401)},function(t,e,n){"use strict";e.a=function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})}},function(t,e,n){"use strict";function r(t){return t>1?0:t<-1?d:Math.acos(t)}function i(t){return t>=1?p:t<=-1?-p:Math.asin(t)}n.d(e,"a",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"e",function(){return s}),n.d(e,"h",function(){return u}),n.d(e,"i",function(){return c}),n.d(e,"k",function(){return l}),n.d(e,"l",function(){return h}),n.d(e,"f",function(){return f}),n.d(e,"j",function(){return d}),n.d(e,"g",function(){return p}),n.d(e,"m",function(){return m}),e.b=r,e.c=i;var o=Math.abs,a=Math.atan2,s=Math.cos,u=Math.max,c=Math.min,l=Math.sin,h=Math.sqrt,f=1e-12,d=Math.PI,p=d/2,m=2*d},function(t,e,n){"use strict";e.a=function(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],s=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}},function(t,e,n){"use strict";e.a=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}},function(t,e,n){"use strict";function r(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function i(t,e){return e[1]-t[1]||e[0]-t[0]}function o(t,e){var n,r,o,m=t.sort(i).pop();for(c=[],s=new Array(t.length),a=new p.b,u=new p.b;;)if(o=f.c,m&&(!o||m[1]<o.y||m[1]===o.y&&m[0]<o.x))m[0]===n&&m[1]===r||(Object(l.a)(m),n=m[0],r=m[1]),m=t.pop();else{if(!o)break;Object(l.b)(o.arc)}if(Object(h.d)(),e){var v=+e[0][0],g=+e[0][1],y=+e[1][0],b=+e[1][1];Object(d.a)(v,g,y,b),Object(h.b)(v,g,y,b)}this.edges=c,this.cells=s,a=u=c=s=null}n.d(e,"f",function(){return m}),n.d(e,"g",function(){return v}),n.d(e,"a",function(){return a}),n.d(e,"b",function(){return s}),n.d(e,"c",function(){return u}),n.d(e,"e",function(){return c}),e.d=o;var a,s,u,c,l=n(460),h=n(170),f=n(171),d=n(90),p=n(89),m=1e-6,v=1e-12;o.prototype={constructor:o,polygons:function(){var t=this.edges;return this.cells.map(function(e){var n=e.halfedges.map(function(n){return Object(h.a)(e,t[n])});return n.data=e.site.data,n})},triangles:function(){var t=[],e=this.edges;return this.cells.forEach(function(n,i){if(a=(o=n.halfedges).length)for(var o,a,s,u=n.site,c=-1,l=e[o[a-1]],h=l.left===u?l.right:l.left;++c<a;)s=h,l=e[o[c]],h=l.left===u?l.right:l.left,s&&h&&i<s.index&&i<h.index&&r(u,s,h)<0&&t.push([u.data,s.data,h.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,s=o.cells.length;!(i=o.cells[a]);)if(++a>=s)return null;var u=t-i.site[0],c=e-i.site[1],l=u*u+c*c;do{i=o.cells[r=a],a=null,i.halfedges.forEach(function(n){var r=o.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],c=e-s[1],h=u*u+c*c;h<l&&(l=h,a=s.index)}})}while(null!==a);return o._found=r,null==n||l<=n*n?i.site:null}}},function(t,e,n){"use strict";e.a=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e-=t,function(n){return t+e*n}}},function(t,e,n){"use strict";var r=n(64);n.d(e,"b",function(){return r.b}),n.d(e,"d",function(){return r.c}),n.d(e,"e",function(){return r.d});var i=n(250);n.d(e,"c",function(){return i.a});var o=n(251);n.d(e,"a",function(){return o.a})},function(t,e,n){"use strict";function r(t,e){var n,r;return function(){var i=Object(a.h)(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,u=r.length;s<u;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function i(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Object(a.h)(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var u={name:e,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===e){i[c]=u;break}c===l&&i.push(u)}o.tween=i}}function o(t,e,n){var r=t._id;return t.each(function(){var t=Object(a.h)(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return Object(a.f)(t,r).value[e]}}e.b=o;var a=n(6);e.a=function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var o,s=Object(a.f)(this.node(),n).tween,u=0,c=s.length;u<c;++u)if((o=s[u]).name===t)return o.value;return null}return this.each((null==e?r:i)(n,t,e))}},function(t,e,n){"use strict";var r=n(72);e.a=function(t){return t=Object(r.a)(Math.abs(t)),t?t[1]:NaN}},function(t,e,n){"use strict";function r(t,e){return[t>c.o?t-c.w:t<-c.o?t+c.w:t,e]}function i(t,e,n){return(t%=c.w)?e||n?Object(u.a)(a(t),s(e,n)):a(t):e||n?s(e,n):r}function o(t){return function(e,n){return e+=t,[e>c.o?e-c.w:e<-c.o?e+c.w:e,n]}}function a(t){var e=o(t);return e.invert=o(-t),e}function s(t,e){function n(t,e){var n=Object(c.g)(e),s=Object(c.g)(t)*n,u=Object(c.t)(t)*n,l=Object(c.t)(e),h=l*r+s*i;return[Object(c.e)(u*o-h*a,s*r-l*i),Object(c.c)(h*o+u*a)]}var r=Object(c.g)(t),i=Object(c.t)(t),o=Object(c.g)(e),a=Object(c.t)(e);return n.invert=function(t,e){var n=Object(c.g)(e),s=Object(c.g)(t)*n,u=Object(c.t)(t)*n,l=Object(c.t)(e),h=l*o-u*a;return[Object(c.e)(u*o+l*a,s*r+h*i),Object(c.c)(h*r-s*i)]},n}e.b=i;var u=n(130),c=n(0);r.invert=r,e.a=function(t){function e(e){return e=t(e[0]*c.r,e[1]*c.r),e[0]*=c.h,e[1]*=c.h,e}return t=i(t[0]*c.r,t[1]*c.r,t.length>2?t[2]*c.r:0),e.invert=function(e){return e=t.invert(e[0]*c.r,e[1]*c.r),e[0]*=c.h,e[1]*=c.h,e},e}},function(t,e,n){"use strict";function r(t,e,n,r){function h(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function f(i,o,a,s){var u=0,c=0;if(null==i||(u=d(i,a))!==(c=d(o,a))||m(i,o)<0^a>0)do{s.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+a+4)%4)!==c);else s.point(o[0],o[1])}function d(r,o){return Object(i.a)(r[0]-t)<i.i?o>0?0:3:Object(i.a)(r[0]-n)<i.i?o>0?2:1:Object(i.a)(r[1]-e)<i.i?o>0?1:0:o>0?3:2}function p(t,e){return m(t.x,e.x)}function m(t,e){var n=d(t,1),r=d(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(i){function d(t,e){h(t,e)&&j.point(t,e)}function m(){for(var e=0,n=0,i=w.length;n<i;++n)for(var o,a,s=w[n],u=1,c=s.length,l=s[0],h=l[0],f=l[1];u<c;++u)o=h,a=f,l=s[u],h=l[0],f=l[1],a<=r?f>r&&(h-o)*(r-a)>(f-a)*(t-o)&&++e:f<=r&&(h-o)*(r-a)<(f-a)*(t-o)&&--e;return e}function v(){j=P,x=[],w=[],L=!0}function g(){var t=m(),e=L&&t,n=(x=Object(u.n)(x)).length;(e||n)&&(i.polygonStart(),e&&(i.lineStart(),f(null,null,1,i),i.lineEnd()),n&&Object(s.a)(x,p,t,f,i),i.polygonEnd()),j=i,x=w=M=null}function y(){N.point=_,w&&w.push(M=[]),R=!0,C=!1,A=O=NaN}function b(){x&&(_(E,T),S&&C&&P.rejoin(),x.push(P.result())),N.point=d,C&&j.lineEnd()}function _(i,o){var s=h(i,o);if(w&&M.push([i,o]),R)E=i,T=o,S=s,R=!1,s&&(j.lineStart(),j.point(i,o));else if(s&&C)j.point(i,o);else{var u=[A=Math.max(l,Math.min(c,A)),O=Math.max(l,Math.min(c,O))],f=[i=Math.max(l,Math.min(c,i)),o=Math.max(l,Math.min(c,o))];Object(a.a)(u,f,t,e,n,r)?(C||(j.lineStart(),j.point(u[0],u[1])),j.point(f[0],f[1]),s||j.lineEnd(),L=!1):s&&(j.lineStart(),j.point(i,o),L=!1)}A=i,O=o,C=s}var x,w,M,E,T,S,A,O,C,R,L,j=i,P=Object(o.a)(),N={point:d,lineStart:y,lineEnd:b,polygonStart:v,polygonEnd:g};return N}}e.a=r;var i=n(0),o=n(133),a=n(331),s=n(134),u=n(3),c=1e9,l=-c},function(t,e,n){"use strict";function r(t){return function(e){var n=new i;for(var r in t)n[r]=t[r];return n.stream=e,n}}function i(){}e.b=r,e.a=function(t){return{stream:r(t)}},i.prototype={constructor:i,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}}},function(t,e,n){"use strict";e.a=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,c=t.value&&(i-n)/t.value;++s<u;)o=a[s],o.x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c}},function(t,e,n){"use strict";var r=n(81);e.a=function(t,e){return function(n,i){var o=Object(r.a)(n).mimeType(t).response(e);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return o.get(i)}return o}}},function(t,e,n){"use strict";function r(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Object(d.a)(e)}function i(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:r(t)}}}function o(t){return function(e,n){var r=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:r(t)}}}function a(t,e,n,r){var i=t[0],o=t[1],a=e[0],s=e[1];return o<i?(i=n(o,i),a=r(s,a)):(i=n(i,o),a=r(a,s)),function(t){return a(i(t))}}function s(t,e,n,r){var i=Math.min(t.length,e.length)-1,o=new Array(i),a=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)o[s]=n(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(e){var n=Object(l.b)(t,e,1,i)-1;return a[n](o[n](e))}}function u(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function c(t,e){function n(){return c=Math.min(v.length,g.length)>2?s:a,l=d=null,u}function u(e){return(l||(l=c(v,g,b?i(t):t,y)))(+e)}var c,l,d,v=m,g=m,y=h.a,b=!1;return u.invert=function(t){return(d||(d=c(g,v,r,b?o(e):e)))(+t)},u.domain=function(t){return arguments.length?(v=f.a.call(t,p.a),n()):v.slice()},u.range=function(t){return arguments.length?(g=f.b.call(t),n()):g.slice()},u.rangeRound=function(t){return g=f.b.call(t),y=h.r,n()},u.clamp=function(t){return arguments.length?(b=!!t,n()):b},u.interpolate=function(t){return arguments.length?(y=t,n()):y},n()}e.c=r,e.a=u,e.b=c;var l=n(3),h=n(5),f=n(15),d=n(82),p=n(151),m=[0,1]},function(t,e,n){"use strict";var r=n(2);n.d(e,"g",function(){return r.a});var i=n(407);n.d(e,"h",function(){return i.a}),n.d(e,"i",function(){return i.b}),n.d(e,"L",function(){return i.a}),n.d(e,"M",function(){return i.b});var o=n(408);n.d(e,"r",function(){return o.a}),n.d(e,"s",function(){return o.b}),n.d(e,"V",function(){return o.a}),n.d(e,"W",function(){return o.b});var a=n(409);n.d(e,"j",function(){return a.a}),n.d(e,"k",function(){return a.b});var s=n(410);n.d(e,"e",function(){return s.a}),n.d(e,"f",function(){return s.b});var u=n(411);n.d(e,"a",function(){return u.b}),n.d(e,"b",function(){return u.a});var c=n(412);n.d(e,"B",function(){return c.g}),n.d(e,"C",function(){return c.h}),n.d(e,"t",function(){return c.g}),n.d(e,"u",function(){return c.h}),n.d(e,"l",function(){return c.c}),n.d(e,"m",function(){return c.d}),n.d(e,"x",function(){return c.k}),n.d(e,"y",function(){return c.l}),n.d(e,"z",function(){return c.m}),n.d(e,"A",function(){return c.n}),n.d(e,"v",function(){return c.i}),n.d(e,"w",function(){return c.j}),n.d(e,"c",function(){return c.a}),n.d(e,"d",function(){return c.b}),n.d(e,"p",function(){return c.e}),n.d(e,"q",function(){return c.f});var l=n(413);n.d(e,"n",function(){return l.a}),n.d(e,"o",function(){return l.b});var h=n(414);n.d(e,"D",function(){return h.a}),n.d(e,"E",function(){return h.b});var f=n(415);n.d(e,"N",function(){return f.a}),n.d(e,"O",function(){return f.b});var d=n(416);n.d(e,"J",function(){return d.a}),n.d(e,"K",function(){return d.b});var p=n(417);n.d(e,"F",function(){return p.a}),n.d(e,"G",function(){return p.b});var m=n(418);n.d(e,"_5",function(){return m.g}),n.d(e,"_6",function(){return m.h}),n.d(e,"X",function(){return m.g}),n.d(e,"Y",function(){return m.h}),n.d(e,"P",function(){return m.c}),n.d(e,"Q",function(){return m.d}),n.d(e,"_1",function(){return m.k}),n.d(e,"_2",function(){return m.l}),n.d(e,"_3",function(){return m.m}),n.d(e,"_4",function(){return m.n}),n.d(e,"Z",function(){return m.i}),n.d(e,"_0",function(){return m.j}),n.d(e,"H",function(){return m.a}),n.d(e,"I",function(){return m.b}),n.d(e,"T",function(){return m.e}),n.d(e,"U",function(){return m.f});var v=n(419);n.d(e,"R",function(){return v.a}),n.d(e,"S",function(){return v.b});var g=n(420);n.d(e,"_7",function(){return g.a}),n.d(e,"_8",function(){return g.b})},function(t,e,n){"use strict";function r(t){this._context=t}r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},e.a=function(t){return new r(t)}},function(t,e,n){"use strict";e.a=function(){}},function(t,e,n){"use strict";function r(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function i(t){this._context=t}e.c=r,e.a=i,i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},e.b=function(t){return new i(t)}},function(t,e,n){"use strict";function r(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function i(t,e){this._context=t,this._k=(1-e)/6}e.c=r,e.a=i,i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:r(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:r(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.b=function t(e){function n(t){return new i(t,e)}return n.tension=function(e){return t(+e)},n}(0)},function(t,e,n){"use strict";function r(){}function i(t,e){this.x=t||0,this.y=e||0}function o(t,e,n,r,a,s,u,c,l,h){Object.defineProperty(this,"id",{value:Es++}),this.uuid=Ms.generateUUID(),this.name="",this.image=void 0!==t?t:o.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:o.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:ya,this.wrapT=void 0!==r?r:ya,this.magFilter=void 0!==a?a:Ma,this.minFilter=void 0!==s?s:Ta,this.anisotropy=void 0!==l?l:1,this.format=void 0!==u?u:Ba,this.type=void 0!==c?c:Sa,this.offset=new i(0,0),this.repeat=new i(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==h?h:ds,this.version=0,this.onUpdate=null}function a(t,e,n,r){this.x=t||0,this.y=e||0,this.z=n||0,this.w=void 0!==r?r:1}function s(t,e,n){this.uuid=Ms.generateUUID(),this.width=t,this.height=e,this.scissor=new a(0,0,t,e),this.scissorTest=!1,this.viewport=new a(0,0,t,e),n=n||{},void 0===n.minFilter&&(n.minFilter=Ma),this.texture=new o(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 u(t,e,n){s.call(this,t,e,n),this.activeCubeFace=0,this.activeMipMapLevel=0}function c(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._w=void 0!==r?r:1}function l(t,e,n){this.x=t||0,this.y=e||0,this.z=n||0}function h(){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 f(t,e,n,r,i,a,s,u,c,l,h,f){o.call(this,null,a,s,u,c,l,r,i,h,f),this.image={data:t,width:e,height:n},this.magFilter=void 0!==c?c:_a,this.minFilter=void 0!==l?l:_a,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function d(t,e,n,r,i,a,s,u,c,l){t=void 0!==t?t:[],e=void 0!==e?e:la,o.call(this,t,e,n,r,i,a,s,u,c,l),this.flipY=!1}function p(){this.seq=[],this.map={}}function m(t,e,n){var r=t[0];if(r<=0||r>0)return t;var i=e*n,o=As[i];if(void 0===o&&(o=new Float32Array(i),As[i]=o),0!==e){r.toArray(o,0);for(var a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function v(t,e){var n=Os[e];void 0===n&&(n=new Int32Array(e),Os[e]=n);for(var r=0;r!==e;++r)n[r]=t.allocTextureUnit();return n}function g(t,e){t.uniform1f(this.addr,e)}function y(t,e){t.uniform1i(this.addr,e)}function b(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)}function _(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)}function x(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)}function w(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)}function M(t,e){void 0===e.elements?t.uniformMatrix3fv(this.addr,!1,e):(Rs.set(e.elements),t.uniformMatrix3fv(this.addr,!1,Rs))}function E(t,e){void 0===e.elements?t.uniformMatrix4fv(this.addr,!1,e):(Cs.set(e.elements),t.uniformMatrix4fv(this.addr,!1,Cs))}function T(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTexture2D(e||Ts,r)}function S(t,e,n){var r=n.allocTextureUnit();t.uniform1i(this.addr,r),n.setTextureCube(e||Ss,r)}function A(t,e){t.uniform2iv(this.addr,e)}function O(t,e){t.uniform3iv(this.addr,e)}function C(t,e){t.uniform4iv(this.addr,e)}function R(t){switch(t){case 5126:return g;case 35664:return b;case 35665:return _;case 35666:return x;case 35674:return w;case 35675:return M;case 35676:return E;case 35678:return T;case 35680:return S;case 5124:case 35670:return y;case 35667:case 35671:return A;case 35668:case 35672:return O;case 35669:case 35673:return C}}function L(t,e){t.uniform1fv(this.addr,e)}function j(t,e){t.uniform1iv(this.addr,e)}function P(t,e){t.uniform2fv(this.addr,m(e,this.size,2))}function N(t,e){t.uniform3fv(this.addr,m(e,this.size,3))}function I(t,e){t.uniform4fv(this.addr,m(e,this.size,4))}function U(t,e){t.uniformMatrix2fv(this.addr,!1,m(e,this.size,4))}function D(t,e){t.uniformMatrix3fv(this.addr,!1,m(e,this.size,9))}function k(t,e){t.uniformMatrix4fv(this.addr,!1,m(e,this.size,16))}function F(t,e,n){var r=e.length,i=v(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTexture2D(e[o]||Ts,i[o])}function B(t,e,n){var r=e.length,i=v(n,r);t.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.setTextureCube(e[o]||Ss,i[o])}function z(t){switch(t){case 5126:return L;case 35664:return P;case 35665:return N;case 35666:return I;case 35674:return U;case 35675:return D;case 35676:return k;case 35678:return F;case 35680:return B;case 5124:case 35670:return j;case 35667:case 35671:return A;case 35668:case 35672:return O;case 35669:case 35673:return C}}function G(t,e,n){this.id=t,this.addr=n,this.setValue=R(e.type)}function H(t,e,n){this.id=t,this.addr=n,this.size=e.size,this.setValue=z(e.type)}function V(t){this.id=t,p.call(this)}function W(t,e){t.seq.push(e),t.map[e.id]=e}function X(t,e,n){var r=t.name,i=r.length;for(Ls.lastIndex=0;;){var o=Ls.exec(r),a=Ls.lastIndex,s=o[1],u="]"===o[2],c=o[3];if(u&&(s|=0),void 0===c||"["===c&&a+2===i){W(n,void 0===c?new G(s,t,e):new H(s,t,e));break}var l=n.map,h=l[s];void 0===h&&(h=new V(s),W(n,h)),n=h}}function q(t,e,n){p.call(this),this.renderer=n;for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;++i){var o=t.getActiveUniform(e,i),a=o.name;X(o,t.getUniformLocation(e,a),this)}}function Y(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}function Z(t,e){this.min=void 0!==t?t:new i(1/0,1/0),this.max=void 0!==e?e:new i(-1/0,-1/0)}function J(t,e){function n(){var t=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),e=new Uint16Array([0,1,2,0,2,3]);o=p.createBuffer(),a=p.createBuffer(),p.bindBuffer(p.ARRAY_BUFFER,o),p.bufferData(p.ARRAY_BUFFER,t,p.STATIC_DRAW),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,a),p.bufferData(p.ELEMENT_ARRAY_BUFFER,e,p.STATIC_DRAW),f=p.createTexture(),d=p.createTexture(),m.bindTexture(p.TEXTURE_2D,f),p.texImage2D(p.TEXTURE_2D,0,p.RGB,16,16,0,p.RGB,p.UNSIGNED_BYTE,null),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),m.bindTexture(p.TEXTURE_2D,d),p.texImage2D(p.TEXTURE_2D,0,p.RGBA,16,16,0,p.RGBA,p.UNSIGNED_BYTE,null),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),s={vertexShader:["uniform lowp int renderType;","uniform vec3 screenPosition;","uniform vec2 scale;","uniform float rotation;","uniform sampler2D occlusionMap;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float vVisibility;","void main() {","vUV = uv;","vec2 pos = position;","if ( renderType == 2 ) {","vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );","visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );","visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );","vVisibility = visibility.r / 9.0;","vVisibility *= 1.0 - visibility.g / 9.0;","vVisibility *= visibility.b / 9.0;","vVisibility *= 1.0 - visibility.a / 9.0;","pos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;","pos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;","}","gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );","}"].join("\n"),fragmentShader:["uniform lowp int renderType;","uniform sampler2D map;","uniform float opacity;","uniform vec3 color;","varying vec2 vUV;","varying float vVisibility;","void main() {","if ( renderType == 0 ) {","gl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );","} else if ( renderType == 1 ) {","gl_FragColor = texture2D( map, vUV );","} else {","vec4 texture = texture2D( map, vUV );","texture.a *= opacity * vVisibility;","gl_FragColor = texture;","gl_FragColor.rgb *= color;","}","}"].join("\n")},u=r(s),c={vertex:p.getAttribLocation(u,"position"),uv:p.getAttribLocation(u,"uv")},h={renderType:p.getUniformLocation(u,"renderType"),map:p.getUniformLocation(u,"map"),occlusionMap:p.getUniformLocation(u,"occlusionMap"),opacity:p.getUniformLocation(u,"opacity"),color:p.getUniformLocation(u,"color"),scale:p.getUniformLocation(u,"scale"),rotation:p.getUniformLocation(u,"rotation"),screenPosition:p.getUniformLocation(u,"screenPosition")}}function r(e){var n=p.createProgram(),r=p.createShader(p.FRAGMENT_SHADER),i=p.createShader(p.VERTEX_SHADER),o="precision "+t.getPrecision()+" float;\n";return p.shaderSource(r,o+e.fragmentShader),p.shaderSource(i,o+e.vertexShader),p.compileShader(r),p.compileShader(i),p.attachShader(n,r),p.attachShader(n,i),p.linkProgram(n),n}var o,a,s,u,c,h,f,d,p=t.context,m=t.state;this.render=function(r,s,v){if(0!==e.length){var g=new l,y=v.w/v.z,b=.5*v.z,_=.5*v.w,x=16/v.w,w=new i(x*y,x),M=new l(1,1,0),E=new i(1,1),T=new Z;T.min.set(v.x,v.y),T.max.set(v.x+(v.z-16),v.y+(v.w-16)),void 0===u&&n(),p.useProgram(u),m.initAttributes(),m.enableAttribute(c.vertex),m.enableAttribute(c.uv),m.disableUnusedAttributes(),p.uniform1i(h.occlusionMap,0),p.uniform1i(h.map,1),p.bindBuffer(p.ARRAY_BUFFER,o),p.vertexAttribPointer(c.vertex,2,p.FLOAT,!1,16,0),p.vertexAttribPointer(c.uv,2,p.FLOAT,!1,16,8),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,a),m.disable(p.CULL_FACE),m.buffers.depth.setMask(!1);for(var S=0,A=e.length;S<A;S++){x=16/v.w,w.set(x*y,x);var O=e[S];if(g.set(O.matrixWorld.elements[12],O.matrixWorld.elements[13],O.matrixWorld.elements[14]),g.applyMatrix4(s.matrixWorldInverse),g.applyMatrix4(s.projectionMatrix),M.copy(g),E.x=v.x+M.x*b+b-8,E.y=v.y+M.y*_+_-8,!0===T.containsPoint(E)){m.activeTexture(p.TEXTURE0),m.bindTexture(p.TEXTURE_2D,null),m.activeTexture(p.TEXTURE1),m.bindTexture(p.TEXTURE_2D,f),p.copyTexImage2D(p.TEXTURE_2D,0,p.RGB,E.x,E.y,16,16,0),p.uniform1i(h.renderType,0),p.uniform2f(h.scale,w.x,w.y),p.uniform3f(h.screenPosition,M.x,M.y,M.z),m.disable(p.BLEND),m.enable(p.DEPTH_TEST),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0),m.activeTexture(p.TEXTURE0),m.bindTexture(p.TEXTURE_2D,d),p.copyTexImage2D(p.TEXTURE_2D,0,p.RGBA,E.x,E.y,16,16,0),p.uniform1i(h.renderType,1),m.disable(p.DEPTH_TEST),m.activeTexture(p.TEXTURE1),m.bindTexture(p.TEXTURE_2D,f),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0),O.positionScreen.copy(M),O.customUpdateCallback?O.customUpdateCallback(O):O.updateLensFlares(),p.uniform1i(h.renderType,2),m.enable(p.BLEND);for(var C=0,R=O.lensFlares.length;C<R;C++){var L=O.lensFlares[C];L.opacity>.001&&L.scale>.001&&(M.x=L.x,M.y=L.y,M.z=L.z,x=L.size*L.scale/v.w,w.x=x*y,w.y=x,p.uniform3f(h.screenPosition,M.x,M.y,M.z),p.uniform2f(h.scale,w.x,w.y),p.uniform1f(h.rotation,L.rotation),p.uniform1f(h.opacity,L.opacity),p.uniform3f(h.color,L.color.r,L.color.g,L.color.b),m.setBlending(L.blending,L.blendEquation,L.blendSrc,L.blendDst),t.setTexture2D(L.texture,1),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0))}}}m.enable(p.CULL_FACE),m.enable(p.DEPTH_TEST),m.buffers.depth.setMask(!0),t.resetGLState()}}}function Q(t,e){function n(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),e=new Uint16Array([0,1,2,0,2,3]);a=p.createBuffer(),s=p.createBuffer(),p.bindBuffer(p.ARRAY_BUFFER,a),p.bufferData(p.ARRAY_BUFFER,t,p.STATIC_DRAW),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,s),p.bufferData(p.ELEMENT_ARRAY_BUFFER,e,p.STATIC_DRAW),u=r(),h={position:p.getAttribLocation(u,"position"),uv:p.getAttribLocation(u,"uv")},f={uvOffset:p.getUniformLocation(u,"uvOffset"),uvScale:p.getUniformLocation(u,"uvScale"),rotation:p.getUniformLocation(u,"rotation"),scale:p.getUniformLocation(u,"scale"),color:p.getUniformLocation(u,"color"),map:p.getUniformLocation(u,"map"),opacity:p.getUniformLocation(u,"opacity"),modelViewMatrix:p.getUniformLocation(u,"modelViewMatrix"),projectionMatrix:p.getUniformLocation(u,"projectionMatrix"),fogType:p.getUniformLocation(u,"fogType"),fogDensity:p.getUniformLocation(u,"fogDensity"),fogNear:p.getUniformLocation(u,"fogNear"),fogFar:p.getUniformLocation(u,"fogFar"),fogColor:p.getUniformLocation(u,"fogColor"),alphaTest:p.getUniformLocation(u,"alphaTest")};var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=8,n.height=8;var i=n.getContext("2d");i.fillStyle="white",i.fillRect(0,0,8,8),d=new o(n),d.needsUpdate=!0}function r(){var e=p.createProgram(),n=p.createShader(p.VERTEX_SHADER),r=p.createShader(p.FRAGMENT_SHADER);return p.shaderSource(n,["precision "+t.getPrecision()+" float;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),p.shaderSource(r,["precision "+t.getPrecision()+" float;","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),p.compileShader(n),p.compileShader(r),p.attachShader(e,n),p.attachShader(e,r),p.linkProgram(e),e}function i(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var a,s,u,h,f,d,p=t.context,m=t.state,v=new l,g=new c,y=new l;this.render=function(r,o){if(0!==e.length){void 0===u&&n(),p.useProgram(u),m.initAttributes(),m.enableAttribute(h.position),m.enableAttribute(h.uv),m.disableUnusedAttributes(),m.disable(p.CULL_FACE),m.enable(p.BLEND),p.bindBuffer(p.ARRAY_BUFFER,a),p.vertexAttribPointer(h.position,2,p.FLOAT,!1,16,0),p.vertexAttribPointer(h.uv,2,p.FLOAT,!1,16,8),p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,s),p.uniformMatrix4fv(f.projectionMatrix,!1,o.projectionMatrix.elements),m.activeTexture(p.TEXTURE0),p.uniform1i(f.map,0);var c=0,l=0,b=r.fog;b?(p.uniform3f(f.fogColor,b.color.r,b.color.g,b.color.b),b.isFog?(p.uniform1f(f.fogNear,b.near),p.uniform1f(f.fogFar,b.far),p.uniform1i(f.fogType,1),c=1,l=1):b.isFogExp2&&(p.uniform1f(f.fogDensity,b.density),p.uniform1i(f.fogType,2),c=2,l=2)):(p.uniform1i(f.fogType,0),c=0,l=0);for(var _=0,x=e.length;_<x;_++){var w=e[_];w.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,w.matrixWorld),w.z=-w.modelViewMatrix.elements[14]}e.sort(i);for(var M=[],_=0,x=e.length;_<x;_++){var w=e[_],E=w.material;if(!1!==E.visible){p.uniform1f(f.alphaTest,E.alphaTest),p.uniformMatrix4fv(f.modelViewMatrix,!1,w.modelViewMatrix.elements),w.matrixWorld.decompose(v,g,y),M[0]=y.x,M[1]=y.y;var T=0;r.fog&&E.fog&&(T=l),c!==T&&(p.uniform1i(f.fogType,T),c=T),null!==E.map?(p.uniform2f(f.uvOffset,E.map.offset.x,E.map.offset.y),p.uniform2f(f.uvScale,E.map.repeat.x,E.map.repeat.y)):(p.uniform2f(f.uvOffset,0,0),p.uniform2f(f.uvScale,1,1)),p.uniform1f(f.opacity,E.opacity),p.uniform3f(f.color,E.color.r,E.color.g,E.color.b),p.uniform1f(f.rotation,E.rotation),p.uniform2fv(f.scale,M),m.setBlending(E.blending,E.blendEquation,E.blendSrc,E.blendDst),m.buffers.depth.setTest(E.depthTest),m.buffers.depth.setMask(E.depthWrite),E.map?t.setTexture2D(E.map,0):t.setTexture2D(d,0),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0)}}m.enable(p.CULL_FACE),t.resetGLState()}}}function K(){Object.defineProperty(this,"id",{value:Ds++}),this.uuid=Ms.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=So,this.side=go,this.shading=xo,this.vertexColors=wo,this.opacity=1,this.transparent=!1,this.blendSrc=Bo,this.blendDst=zo,this.blendEquation=Lo,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Jo,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,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.needsUpdate=!0}function $(t){K.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,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function tt(t){K.call(this),this.type="MeshDepthMaterial",this.depthPacking=xs,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(t)}function et(t,e){this.min=void 0!==t?t:new l(1/0,1/0,1/0),this.max=void 0!==e?e:new l(-1/0,-1/0,-1/0)}function nt(t,e){this.center=void 0!==t?t:new l,this.radius=void 0!==e?e:0}function rt(){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 it(t,e){this.normal=void 0!==t?t:new l(1,0,0),this.constant=void 0!==e?e:0}function ot(t,e,n,r,i,o){this.planes=[void 0!==t?t:new it,void 0!==e?e:new it,void 0!==n?n:new it,void 0!==r?r:new it,void 0!==i?i:new it,void 0!==o?o:new it]}function at(t,e,n,r){function o(e,n,r,i){var o=e.geometry,a=null,s=M,u=e.customDepthMaterial;if(r&&(s=E,u=e.customDistanceMaterial),u)a=u;else{var c=!1;n.morphTargets&&(o&&o.isBufferGeometry?c=o.morphAttributes&&o.morphAttributes.position&&o.morphAttributes.position.length>0:o&&o.isGeometry&&(c=o.morphTargets&&o.morphTargets.length>0)),e.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var l=e.isSkinnedMesh&&n.skinning,h=0;c&&(h|=_),l&&(h|=x),a=s[h]}if(t.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var f=a.uuid,d=n.uuid,p=T[f];void 0===p&&(p={},T[f]=p);var m=p[d];void 0===m&&(m=a.clone(),p[d]=m),a=m}a.visible=n.visible,a.wireframe=n.wireframe;var v=n.side;return D.renderSingleSided&&v==bo&&(v=go),D.renderReverseSided&&(v===go?v=yo:v===yo&&(v=go)),a.side=v,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r&&void 0!==a.uniforms.lightPos&&a.uniforms.lightPos.value.copy(i),a}function u(e,r,i,a){if(!1!==e.visible){if(e.layers.test(r.layers)&&(e.isMesh||e.isLine||e.isPoints)&&e.castShadow&&(!e.frustumCulled||d.intersectsObject(e))){e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,e.matrixWorld);var s=n.update(e),c=e.material;if(Array.isArray(c))for(var l=s.groups,h=0,f=l.length;h<f;h++){var p=l[h],m=c[p.materialIndex];if(m&&m.visible){var v=o(e,m,a,b);t.renderBufferDirect(i,null,s,v,e,p)}}else if(c.visible){var v=o(e,c,a,b);t.renderBufferDirect(i,null,s,v,e,null)}}for(var g=e.children,y=0,_=g.length;y<_;y++)u(g[y],r,i,a)}}var c=t.context,f=t.state,d=new ot,p=new h,m=e.shadows,v=new i,g=new i(r.maxTextureSize,r.maxTextureSize),y=new l,b=new l,_=1,x=2,w=1+(_|x),M=new Array(w),E=new Array(w),T={},S=[new l(1,0,0),new l(-1,0,0),new l(0,0,1),new l(0,0,-1),new l(0,1,0),new l(0,-1,0)],A=[new l(0,1,0),new l(0,1,0),new l(0,1,0),new l(0,1,0),new l(0,0,1),new l(0,0,-1)],O=[new a,new a,new a,new a,new a,new a],C=new tt;C.depthPacking=ws,C.clipping=!0;for(var R=Us.distanceRGBA,L=Ns.clone(R.uniforms),j=0;j!==w;++j){var P=0!=(j&_),N=0!=(j&x),I=C.clone();I.morphTargets=P,I.skinning=N,M[j]=I;var U=new $({defines:{USE_SHADOWMAP:""},uniforms:L,vertexShader:R.vertexShader,fragmentShader:R.fragmentShader,morphTargets:P,skinning:N,clipping:!0});E[j]=U}var D=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=mo,this.renderReverseSided=!0,this.renderSingleSided=!0,this.render=function(e,n){if(!1!==D.enabled&&(!1!==D.autoUpdate||!1!==D.needsUpdate)&&0!==m.length){f.disable(c.BLEND),f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);for(var r,i,o=0,a=m.length;o<a;o++){var l=m[o],h=l.shadow;if(void 0!==h){var _=h.camera,x=h.matrix;if(b.setFromMatrixPosition(l.matrixWorld),_.position.copy(b),v.copy(h.mapSize),v.min(g),l&&l.isPointLight){r=6,i=!0;var w=v.x,M=v.y;O[0].set(2*w,M,w,M),O[1].set(0,M,w,M),O[2].set(3*w,M,w,M),O[3].set(w,M,w,M),O[4].set(3*w,0,w,M),O[5].set(w,0,w,M),v.x*=4,v.y*=2,x.makeTranslation(-b.x,-b.y,-b.z)}else r=1,i=!1,y.setFromMatrixPosition(l.target.matrixWorld),_.lookAt(y),_.updateMatrixWorld(),_.matrixWorldInverse.getInverse(_.matrixWorld),x.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),x.multiply(_.projectionMatrix),x.multiply(_.matrixWorldInverse);if(null===h.map){var E={minFilter:_a,magFilter:_a,format:Ba};h.map=new s(v.x,v.y,E),h.map.texture.name=l.name+".shadowMap",_.updateProjectionMatrix()}h.isSpotLightShadow&&h.update(l);var T=h.map;t.setRenderTarget(T),t.clear();for(var C=0;C<r;C++){if(i){y.copy(_.position),y.add(S[C]),_.up.copy(A[C]),_.lookAt(y),_.updateMatrixWorld(),_.matrixWorldInverse.getInverse(_.matrixWorld);var R=O[C];f.viewport(R)}p.multiplyMatrices(_.projectionMatrix,_.matrixWorldInverse),d.setFromMatrix(p),u(e,n,_,i)}}else console.warn("THREE.WebGLShadowMap:",l,"has no shadow.")}var L=t.getClearColor(),j=t.getClearAlpha();t.setClearColor(L,j),D.needsUpdate=!1}}}function st(t,e){this.origin=void 0!==t?t:new l,this.direction=void 0!==e?e:new l}function ut(t,e,n,r){this._x=t||0,this._y=e||0,this._z=n||0,this._order=r||ut.DefaultOrder}function ct(){this.mask=1}function lt(){function t(){i.setFromEuler(r,!1)}function e(){r.setFromQuaternion(i,void 0,!1)}Object.defineProperty(this,"id",{value:ks++}),this.uuid=Ms.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=lt.DefaultUp.clone();var n=new l,r=new ut,i=new c,o=new l(1,1,1);r.onChange(t),i.onChange(e),Object.defineProperties(this,{position:{enumerable:!0,value:n},rotation:{enumerable:!0,value:r},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:o},modelViewMatrix:{value:new h},normalMatrix:{value:new rt}}),this.matrix=new h,this.matrixWorld=new h,this.matrixAutoUpdate=lt.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ct,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={},this.onBeforeRender=function(){},this.onAfterRender=function(){}}function ht(t,e){this.start=void 0!==t?t:new l,this.end=void 0!==e?e:new l}function ft(t,e,n){this.a=void 0!==t?t:new l,this.b=void 0!==e?e:new l,this.c=void 0!==n?n:new l}function dt(t,e,n,r,i,o){this.a=t,this.b=e,this.c=n,this.normal=r&&r.isVector3?r:new l,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 pt(t){K.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=ea,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(t)}function mt(t,e,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.uuid=Ms.generateUUID(),this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===n,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function vt(t,e){mt.call(this,new Int8Array(t),e)}function gt(t,e){mt.call(this,new Uint8Array(t),e)}function yt(t,e){mt.call(this,new Uint8ClampedArray(t),e)}function bt(t,e){mt.call(this,new Int16Array(t),e)}function _t(t,e){mt.call(this,new Uint16Array(t),e)}function xt(t,e){mt.call(this,new Int32Array(t),e)}function wt(t,e){mt.call(this,new Uint32Array(t),e)}function Mt(t,e){mt.call(this,new Float32Array(t),e)}function Et(t,e){mt.call(this,new Float64Array(t),e)}function Tt(){this.indices=[],this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function St(t){if(0===t.length)return-1/0;for(var e=t[0],n=1,r=t.length;n<r;++n)t[n]>e&&(e=t[n]);return e}function At(){return Fs++}function Ot(){Object.defineProperty(this,"id",{value:At()}),this.uuid=Ms.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 Ct(){Object.defineProperty(this,"id",{value:At()}),this.uuid=Ms.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 Rt(t,e){lt.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new Ct,this.material=void 0!==e?e:new pt({color:16777215*Math.random()}),this.drawMode=ls,this.updateMorphTargets()}function Lt(t,e,n,r,i,o){Ot.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o},this.fromBufferGeometry(new jt(t,e,n,r,i,o)),this.mergeVertices()}function jt(t,e,n,r,i,o){function a(t,e,n,r,i,o,a,m,v,g,y){var b,_,x=o/v,w=a/g,M=o/2,E=a/2,T=m/2,S=v+1,A=g+1,O=0,C=0,R=new l;for(_=0;_<A;_++){var L=_*w-E;for(b=0;b<S;b++){var j=b*x-M;R[t]=j*r,R[e]=L*i,R[n]=T,c.push(R.x,R.y,R.z),R[t]=0,R[e]=0,R[n]=m>0?1:-1,h.push(R.x,R.y,R.z),f.push(b/v),f.push(1-_/g),O+=1}}for(_=0;_<g;_++)for(b=0;b<v;b++){var P=d+b+S*_,N=d+b+S*(_+1),I=d+(b+1)+S*(_+1),U=d+(b+1)+S*_;u.push(P,N,U),u.push(N,I,U),C+=6}s.addGroup(p,C,y),p+=C,d+=O}Ct.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};var s=this;r=Math.floor(r)||1,i=Math.floor(i)||1,o=Math.floor(o)||1;var u=[],c=[],h=[],f=[],d=0,p=0;a("z","y","x",-1,-1,n,e,t,o,i,0),a("z","y","x",1,-1,n,e,-t,o,i,1),a("x","z","y",1,1,t,n,e,r,o,2),a("x","z","y",1,-1,t,n,-e,r,o,3),a("x","y","z",1,-1,t,e,n,r,i,4),a("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(u),this.addAttribute("position",new Mt(c,3)),this.addAttribute("normal",new Mt(h,3)),this.addAttribute("uv",new Mt(f,2))}function Pt(t,e,n,r){Ot.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r},this.fromBufferGeometry(new Nt(t,e,n,r)),this.mergeVertices()}function Nt(t,e,n,r){Ct.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};var i,o,a=t/2,s=e/2,u=Math.floor(n)||1,c=Math.floor(r)||1,l=u+1,h=c+1,f=t/u,d=e/c,p=[],m=[],v=[],g=[];for(o=0;o<h;o++){var y=o*d-s;for(i=0;i<l;i++){var b=i*f-a;m.push(b,-y,0),v.push(0,0,1),g.push(i/u),g.push(1-o/c)}}for(o=0;o<c;o++)for(i=0;i<u;i++){var _=i+l*o,x=i+l*(o+1),w=i+1+l*(o+1),M=i+1+l*o;p.push(_,x,M),p.push(x,w,M)}this.setIndex(p),this.addAttribute("position",new Mt(m,3)),this.addAttribute("normal",new Mt(v,3)),this.addAttribute("uv",new Mt(g,2))}function It(){lt.call(this),this.type="Camera",this.matrixWorldInverse=new h,this.projectionMatrix=new h}function Ut(t,e,n,r){It.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t: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!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Dt(t,e,n,r,i,o){It.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=void 0!==i?i:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()}function kt(t){function e(e,n){var r=e.array,i=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,o=t.createBuffer();t.bindBuffer(n,o),t.bufferData(n,r,i),e.onUploadCallback();var a=t.FLOAT;return r instanceof Float32Array?a=t.FLOAT:r instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):r instanceof Uint16Array?a=t.UNSIGNED_SHORT:r instanceof Int16Array?a=t.SHORT:r instanceof Uint32Array?a=t.UNSIGNED_INT:r instanceof Int32Array?a=t.INT:r instanceof Int8Array?a=t.BYTE:r instanceof Uint8Array&&(a=t.UNSIGNED_BYTE),{buffer:o,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version}}function n(e,n,r){var i=n.array,o=n.updateRange;t.bindBuffer(r,e),!1===n.dynamic?t.bufferData(r,i,t.STATIC_DRAW):-1===o.count?t.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."):(t.bufferSubData(r,o.offset*i.BYTES_PER_ELEMENT,i.subarray(o.offset,o.offset+o.count)),o.count=0)}function r(t){return t.isInterleavedBufferAttribute&&(t=t.data),a[t.uuid]}function i(e){var n=a[e.uuid];n&&(t.deleteBuffer(n.buffer),delete a[e.uuid])}function o(t,r){t.isInterleavedBufferAttribute&&(t=t.data);var i=a[t.uuid];void 0===i?a[t.uuid]=e(t,r):i.version<t.version&&(n(i.buffer,t,r),i.version=t.version)}var a={};return{get:r,remove:i,update:o}}function Ft(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function Bt(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function zt(){function t(){o=-1,s=-1}function e(t,e,n,r,u){var c,l;n.transparent?(c=a,l=++s):(c=i,l=++o);var h=c[l];h?(h.id=t.id,h.object=t,h.geometry=e,h.material=n,h.program=n.program,h.renderOrder=t.renderOrder,h.z=r,h.group=u):(h={id:t.id,object:t,geometry:e,material:n,program:n.program,renderOrder:t.renderOrder,z:r,group:u},c.push(h))}function n(){i.length=o+1,a.length=s+1}function r(){i.sort(Ft),a.sort(Bt)}var i=[],o=-1,a=[],s=-1;return{opaque:i,transparent:a,init:t,push:e,finish:n,sort:r}}function Gt(){function t(t,e){var r=t.id+","+e.id,i=n[r];return void 0===i&&(i=new zt,n[r]=i),i}function e(){n={}}var n={};return{get:t,dispose:e}}function Ht(t,e,n){function r(t){s=t}function i(n){n.array instanceof Uint32Array&&e.get("OES_element_index_uint")?(u=t.UNSIGNED_INT,c=4):n.array instanceof Uint16Array?(u=t.UNSIGNED_SHORT,c=2):(u=t.UNSIGNED_BYTE,c=1)}function o(e,r){t.drawElements(s,r,u,e*c),n.calls++,n.vertices+=r,s===t.TRIANGLES&&(n.faces+=r/3)}function a(r,i,o){var a=e.get("ANGLE_instanced_arrays");if(null===a)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");a.drawElementsInstancedANGLE(s,o,u,i*c,r.maxInstancedCount),n.calls++,n.vertices+=o*r.maxInstancedCount,s===t.TRIANGLES&&(n.faces+=r.maxInstancedCount*o/3)}var s,u,c;this.setMode=r,this.setIndex=i,this.render=o,this.renderInstances=a}function Vt(t,e,n){function r(t){a=t}function i(e,r){t.drawArrays(a,e,r),n.calls++,n.vertices+=r,a===t.TRIANGLES&&(n.faces+=r/3)}function o(r,i,o){var s=e.get("ANGLE_instanced_arrays");if(null===s)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");var u=r.attributes.position;u.isInterleavedBufferAttribute?(o=u.data.count,s.drawArraysInstancedANGLE(a,0,o,r.maxInstancedCount)):s.drawArraysInstancedANGLE(a,i,o,r.maxInstancedCount),n.calls++,n.vertices+=o*r.maxInstancedCount,a===t.TRIANGLES&&(n.faces+=r.maxInstancedCount*o/3)}var a;this.setMode=r,this.render=i,this.renderInstances=o}function Wt(t,e,n){function r(t){var i=t.target,o=s[i.id];null!==o.index&&e.remove(o.index);for(var a in o.attributes)e.remove(o.attributes[a]);i.removeEventListener("dispose",r),delete s[i.id];var c=u[i.id];c&&(e.remove(c),delete u[i.id]),c=u[o.id],c&&(e.remove(c),delete u[o.id]),n.geometries--}function i(t,e){var i=s[e.id];return i||(e.addEventListener("dispose",r),e.isBufferGeometry?i=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new Ct).setFromObject(t)),i=e._bufferGeometry),s[e.id]=i,n.geometries++,i)}function o(n){var r=n.index,i=n.attributes;null!==r&&e.update(r,t.ELEMENT_ARRAY_BUFFER);for(var o in i)e.update(i[o],t.ARRAY_BUFFER);var a=n.morphAttributes;for(var o in a)for(var s=a[o],u=0,c=s.length;u<c;u++)e.update(s[u],t.ARRAY_BUFFER)}function a(n){var r=u[n.id];if(r)return r;var i=[],o=n.index,a=n.attributes;if(null!==o)for(var s=o.array,c=0,l=s.length;c<l;c+=3){var h=s[c+0],f=s[c+1],d=s[c+2];i.push(h,f,f,d,d,h)}else for(var s=a.position.array,c=0,l=s.length/3-1;c<l;c+=3){var h=c+0,f=c+1,d=c+2;i.push(h,f,f,d,d,h)}return r=new(St(i)>65535?wt:_t)(i,1),e.update(r,t.ELEMENT_ARRAY_BUFFER),u[n.id]=r,r}var s={},u={};return{get:i,update:o,getWireframeAttribute:a}}function Xt(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var n;switch(e.type){case"DirectionalLight":n={direction:new l,color:new Y,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"SpotLight":n={position:new l,direction:new l,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 l,color:new Y,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new i};break;case"HemisphereLight":n={direction:new l,skyColor:new Y,groundColor:new Y};break;case"RectAreaLight":n={color:new Y,position:new l,halfWidth:new l,halfHeight:new l}}return t[e.id]=n,n}}}function qt(t,e,n){function r(t){var r=n.frame,i=t.geometry,a=e.get(t,i);return o[a.id]!==r&&(i.isGeometry&&a.updateFromObject(t),e.update(a),o[a.id]=r),a}function i(){o={}}var o={};return{update:r,clear:i}}function Yt(t){for(var e=t.split("\n"),n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join("\n")}function Zt(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),!1===t.getShaderParameter(r,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(r)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(r),Yt(n)),r}function Jt(t){switch(t){case ds:return["Linear","( value )"];case ps:return["sRGB","( value )"];case vs:return["RGBE","( value )"];case ys:return["RGBM","( value, 7.0 )"];case bs:return["RGBM","( value, 16.0 )"];case _s:return["RGBD","( value, 256.0 )"];case ms:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function Qt(t,e){var n=Jt(e);return"vec4 "+t+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Kt(t,e){var n=Jt(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function $t(t,e){var n;switch(e){case oa:n="Linear";break;case aa:n="Reinhard";break;case sa:n="Uncharted2";break;case ua:n="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function te(t,e,n){return t=t||{},[t.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(re).join("\n")}function ee(t){var e=[];for(var n in t){var r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\n")}function ne(t,e,n){for(var r={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),o=0;o<i;o++){var a=t.getActiveAttrib(e,o),s=a.name;r[s]=t.getAttribLocation(e,s)}return r}function re(t){return""!==t}function ie(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function oe(t){function e(t,e){var n=Is[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return oe(n)}var n=/^[ \t]*#include +<([\w\d.]+)>/gm;return t.replace(n,e)}function ae(t){function e(t,e,n,r){for(var i="",o=parseInt(e);o<parseInt(n);o++)i+=r.replace(/\[ i \]/g,"[ "+o+" ]");return i}var n=/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;return t.replace(n,e)}function se(t,e,n,r){var i=t.context,o=n.extensions,a=n.defines,s=n.__webglShader.vertexShader,u=n.__webglShader.fragmentShader,c="SHADOWMAP_TYPE_BASIC";r.shadowMapType===mo?c="SHADOWMAP_TYPE_PCF":r.shadowMapType===vo&&(c="SHADOWMAP_TYPE_PCF_SOFT");var l="ENVMAP_TYPE_CUBE",h="ENVMAP_MODE_REFLECTION",f="ENVMAP_BLENDING_MULTIPLY";if(r.envMap){switch(n.envMap.mapping){case la:case ha:l="ENVMAP_TYPE_CUBE";break;case ma:case va:l="ENVMAP_TYPE_CUBE_UV";break;case fa:case da:l="ENVMAP_TYPE_EQUIREC";break;case pa:l="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case ha:case da:h="ENVMAP_MODE_REFRACTION"}switch(n.combine){case ea:f="ENVMAP_BLENDING_MULTIPLY";break;case na:f="ENVMAP_BLENDING_MIX";break;case ra:f="ENVMAP_BLENDING_ADD"}}var d,p,m=t.gammaFactor>0?t.gammaFactor:1,v=te(o,r,t.extensions),g=ee(a),y=i.createProgram();n.isRawShaderMaterial?(d=[g,"\n"].filter(re).join("\n"),p=[v,g,"\n"].filter(re).join("\n")):(d=["precision "+r.precision+" float;","precision "+r.precision+" int;","#define SHADER_NAME "+n.__webglShader.name,g,r.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+m,"#define MAX_BONES "+r.maxBones,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+h:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.displacementMap&&r.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexColors?"#define USE_COLOR":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&!1===r.flatShading?"#define USE_MORPHNORMALS":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+r.numClippingPlanes,r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+c:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(re).join("\n"),p=[v,"precision "+r.precision+" float;","precision "+r.precision+" int;","#define SHADER_NAME "+n.__webglShader.name,g,r.alphaTest?"#define ALPHATEST "+r.alphaTest:"","#define GAMMA_FACTOR "+m,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+l:"",r.envMap?"#define "+h:"",r.envMap?"#define "+f:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexColors?"#define USE_COLOR":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+r.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(r.numClippingPlanes-r.numClipIntersection),r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+c:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",r.envMap&&t.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",r.toneMapping!==ia?"#define TONE_MAPPING":"",r.toneMapping!==ia?Is.tonemapping_pars_fragment:"",r.toneMapping!==ia?$t("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.outputEncoding||r.mapEncoding||r.envMapEncoding||r.emissiveMapEncoding?Is.encodings_pars_fragment:"",r.mapEncoding?Qt("mapTexelToLinear",r.mapEncoding):"",r.envMapEncoding?Qt("envMapTexelToLinear",r.envMapEncoding):"",r.emissiveMapEncoding?Qt("emissiveMapTexelToLinear",r.emissiveMapEncoding):"",r.outputEncoding?Kt("linearToOutputTexel",r.outputEncoding):"",r.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(re).join("\n")),s=oe(s,r),s=ie(s,r),u=oe(u,r),u=ie(u,r),n.isShaderMaterial||(s=ae(s),u=ae(u));var b=d+s,_=p+u,x=Zt(i,i.VERTEX_SHADER,b),w=Zt(i,i.FRAGMENT_SHADER,_);i.attachShader(y,x),i.attachShader(y,w),void 0!==n.index0AttributeName?i.bindAttribLocation(y,0,n.index0AttributeName):!0===r.morphTargets&&i.bindAttribLocation(y,0,"position"),i.linkProgram(y);var M=i.getProgramInfoLog(y),E=i.getShaderInfoLog(x),T=i.getShaderInfoLog(w),S=!0,A=!0;!1===i.getProgramParameter(y,i.LINK_STATUS)?(S=!1,console.error("THREE.WebGLProgram: shader error: ",i.getError(),"gl.VALIDATE_STATUS",i.getProgramParameter(y,i.VALIDATE_STATUS),"gl.getProgramInfoLog",M,E,T)):""!==M?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",M):""!==E&&""!==T||(A=!1),A&&(this.diagnostics={runnable:S,material:n,programLog:M,vertexShader:{log:E,prefix:d},fragmentShader:{log:T,prefix:p}}),i.deleteShader(x),i.deleteShader(w);var O;this.getUniforms=function(){return void 0===O&&(O=new q(i,y,t)),O};var C;return this.getAttributes=function(){return void 0===C&&(C=ne(i,y)),C},this.destroy=function(){i.deleteProgram(y),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=Bs++,this.code=e,this.usedTimes=1,this.program=y,this.vertexShader=x,this.fragmentShader=w,this}function ue(t,e){function n(t){var n=t.skeleton,r=n.bones;if(e.floatVertexTextures)return 1024;var i=e.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 r(t,e){var n;return t?t.isTexture?n=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),n=t.texture.encoding):n=ds,n===ds&&e&&(n=ms),n}var i=[],o={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},a=["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(i,a,s,u,c,l){var h=o[i.type],f=l.isSkinnedMesh?n(l):0,d=t.getPrecision();null!==i.precision&&(d=e.getMaxPrecision(i.precision))!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",d,"instead.");var p=t.getRenderTarget();return{shaderID:h,precision:d,supportsVertexTextures:e.vertexTextures,outputEncoding:r(p?p.texture:null,t.gammaOutput),map:!!i.map,mapEncoding:r(i.map,t.gammaInput),envMap:!!i.envMap,envMapMode:i.envMap&&i.envMap.mapping,envMapEncoding:r(i.envMap,t.gammaInput),envMapCubeUV:!!i.envMap&&(i.envMap.mapping===ma||i.envMap.mapping===va),lightMap:!!i.lightMap,aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:r(i.emissiveMap,t.gammaInput),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,combine:i.combine,vertexColors:i.vertexColors,fog:!!s,useFog:i.fog,fogExp:s&&s.isFogExp2,flatShading:i.shading===_o,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:e.logarithmicDepthBuffer,skinning:i.skinning&&f>0,maxBones:f,useVertexTexture:e.floatVertexTextures,morphTargets:i.morphTargets,morphNormals:i.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numClippingPlanes:u,numClipIntersection:c,dithering:i.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&a.shadows.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:i.side===bo,flipSided:i.side===yo,depthPacking:void 0!==i.depthPacking&&i.depthPacking}},this.getProgramCode=function(t,e){var n=[];if(e.shaderID?n.push(e.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(var r in t.defines)n.push(r),n.push(t.defines[r]);for(var i=0;i<a.length;i++)n.push(e[a[i]]);return n.join()},this.acquireProgram=function(e,n,r){for(var o,a=0,s=i.length;a<s;a++){var u=i[a];if(u.code===r){o=u,++o.usedTimes;break}}return void 0===o&&(o=new se(t,r,e,n),i.push(o)),o},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=i.indexOf(t);i[e]=i[i.length-1],i.pop(),t.destroy()}},this.programs=i}function ce(t,e,n,r,i,o,a){function s(t,e){if(t.width>e||t.height>e){var n=e/Math.max(t.width,t.height),r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=Math.floor(t.width*n),r.height=Math.floor(t.height*n);return r.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,r.width,r.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+r.width+"x"+r.height,t),r}return t}function u(t){return Ms.isPowerOfTwo(t.width)&&Ms.isPowerOfTwo(t.height)}function c(t){if(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement){var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=Ms.nearestPowerOfTwo(t.width),e.height=Ms.nearestPowerOfTwo(t.height);return e.getContext("2d").drawImage(t,0,0,e.width,e.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+e.width+"x"+e.height,t),e}return t}function l(t){return t.wrapS!==ya||t.wrapT!==ya||t.minFilter!==_a&&t.minFilter!==Ma}function h(e){return e===_a||e===xa||e===wa?t.NEAREST:t.LINEAR}function f(t){var e=t.target;e.removeEventListener("dispose",f),p(e),a.textures--}function d(t){var e=t.target;e.removeEventListener("dispose",d),m(e),a.textures--}function p(e){var n=r.get(e);if(e.image&&n.__image__webglTextureCube)t.deleteTexture(n.__image__webglTextureCube);else{if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture)}r.remove(e)}function m(e){var n=r.get(e),i=r.get(e.texture);if(e){if(void 0!==i.__webglTexture&&t.deleteTexture(i.__webglTexture),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLRenderTargetCube)for(var o=0;o<6;o++)t.deleteFramebuffer(n.__webglFramebuffer[o]),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[o]);else t.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(e.texture),r.remove(e)}}function v(e,i){var o=r.get(e);if(e.version>0&&o.__version!==e.version){var a=e.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==a.complete)return void _(o,e,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_2D,o.__webglTexture)}function g(e,c){var l=r.get(e);if(6===e.image.length)if(e.version>0&&l.__version!==e.version){l.__image__webglTextureCube||(e.addEventListener("dispose",f),l.__image__webglTextureCube=t.createTexture(),a.textures++),n.activeTexture(t.TEXTURE0+c),n.bindTexture(t.TEXTURE_CUBE_MAP,l.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var h=e&&e.isCompressedTexture,d=e.image[0]&&e.image[0].isDataTexture,p=[],m=0;m<6;m++)p[m]=h||d?d?e.image[m].image:e.image[m]:s(e.image[m],i.maxCubemapSize);var v=p[0],g=u(v),y=o(e.format),_=o(e.type);b(t.TEXTURE_CUBE_MAP,e,g);for(var m=0;m<6;m++)if(h)for(var x,w=p[m].mipmaps,M=0,E=w.length;M<E;M++)x=w[M],e.format!==Ba&&e.format!==Fa?n.getCompressedTextureFormats().indexOf(y)>-1?n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+m,M,y,x.width,x.height,0,x.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+m,M,y,x.width,x.height,0,y,_,x.data);else d?n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,y,p[m].width,p[m].height,0,y,_,p[m].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,y,y,_,p[m]);e.generateMipmaps&&g&&t.generateMipmap(t.TEXTURE_CUBE_MAP),l.__version=e.version,e.onUpdate&&e.onUpdate(e)}else n.activeTexture(t.TEXTURE0+c),n.bindTexture(t.TEXTURE_CUBE_MAP,l.__image__webglTextureCube)}function y(e,i){n.activeTexture(t.TEXTURE0+i),n.bindTexture(t.TEXTURE_CUBE_MAP,r.get(e).__webglTexture)}function b(n,a,s){var u;if(s?(t.texParameteri(n,t.TEXTURE_WRAP_S,o(a.wrapS)),t.texParameteri(n,t.TEXTURE_WRAP_T,o(a.wrapT)),t.texParameteri(n,t.TEXTURE_MAG_FILTER,o(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,o(a.minFilter))):(t.texParameteri(n,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(n,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),a.wrapS===ya&&a.wrapT===ya||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",a),t.texParameteri(n,t.TEXTURE_MAG_FILTER,h(a.magFilter)),t.texParameteri(n,t.TEXTURE_MIN_FILTER,h(a.minFilter)),a.minFilter!==_a&&a.minFilter!==Ma&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",a)),u=e.get("EXT_texture_filter_anisotropic")){if(a.type===ja&&null===e.get("OES_texture_float_linear"))return;if(a.type===Pa&&null===e.get("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(t.texParameterf(n,u.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function _(e,r,h){void 0===e.__webglInit&&(e.__webglInit=!0,r.addEventListener("dispose",f),e.__webglTexture=t.createTexture(),a.textures++),n.activeTexture(t.TEXTURE0+h),n.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var d=s(r.image,i.maxTextureSize);l(r)&&!1===u(d)&&(d=c(d));var p=u(d),m=o(r.format),v=o(r.type);b(t.TEXTURE_2D,r,p);var g,y=r.mipmaps;if(r.isDepthTexture){var _=t.DEPTH_COMPONENT;if(r.type===ja){if(!A)throw new Error("Float Depth Texture only supported in WebGL2.0");_=t.DEPTH_COMPONENT32F}else A&&(_=t.DEPTH_COMPONENT16);r.format===Va&&_===t.DEPTH_COMPONENT&&r.type!==Ca&&r.type!==La&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ca,v=o(r.type)),r.format===Wa&&(_=t.DEPTH_STENCIL,r.type!==Da&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Da,v=o(r.type))),n.texImage2D(t.TEXTURE_2D,0,_,d.width,d.height,0,m,v,null)}else if(r.isDataTexture)if(y.length>0&&p){for(var x=0,w=y.length;x<w;x++)g=y[x],n.texImage2D(t.TEXTURE_2D,x,m,g.width,g.height,0,m,v,g.data);r.generateMipmaps=!1}else n.texImage2D(t.TEXTURE_2D,0,m,d.width,d.height,0,m,v,d.data);else if(r.isCompressedTexture)for(var x=0,w=y.length;x<w;x++)g=y[x],r.format!==Ba&&r.format!==Fa?n.getCompressedTextureFormats().indexOf(m)>-1?n.compressedTexImage2D(t.TEXTURE_2D,x,m,g.width,g.height,0,g.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(t.TEXTURE_2D,x,m,g.width,g.height,0,m,v,g.data);else if(y.length>0&&p){for(var x=0,w=y.length;x<w;x++)g=y[x],n.texImage2D(t.TEXTURE_2D,x,m,m,v,g);r.generateMipmaps=!1}else n.texImage2D(t.TEXTURE_2D,0,m,m,v,d);r.generateMipmaps&&p&&t.generateMipmap(t.TEXTURE_2D),e.__version=r.version,r.onUpdate&&r.onUpdate(r)}function x(e,i,a,s){var u=o(i.texture.format),c=o(i.texture.type);n.texImage2D(s,0,u,i.width,i.height,0,u,c,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,a,s,r.get(i.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function w(e,n){t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):n.depthBuffer&&n.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,n.width,n.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function M(e,n){if(n&&n.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported!");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!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),v(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(n.depthTexture.format===Va)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,i,0);else{if(n.depthTexture.format!==Wa)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,i,0)}}function E(e){var n=r.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");M(n.__webglFramebuffer,e)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=t.createRenderbuffer(),w(n.__webglDepthbuffer[o],e)}else t.bindFramebuffer(t.FRAMEBUFFER,n.__webglFramebuffer),n.__webglDepthbuffer=t.createRenderbuffer(),w(n.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}function T(e){var i=r.get(e),o=r.get(e.texture);e.addEventListener("dispose",d),o.__webglTexture=t.createTexture(),a.textures++;var s=!0===e.isWebGLRenderTargetCube,c=u(e);if(s){i.__webglFramebuffer=[];for(var l=0;l<6;l++)i.__webglFramebuffer[l]=t.createFramebuffer()}else i.__webglFramebuffer=t.createFramebuffer();if(s){n.bindTexture(t.TEXTURE_CUBE_MAP,o.__webglTexture),b(t.TEXTURE_CUBE_MAP,e.texture,c);for(var l=0;l<6;l++)x(i.__webglFramebuffer[l],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+l);e.texture.generateMipmaps&&c&&t.generateMipmap(t.TEXTURE_CUBE_MAP),n.bindTexture(t.TEXTURE_CUBE_MAP,null)}else n.bindTexture(t.TEXTURE_2D,o.__webglTexture),b(t.TEXTURE_2D,e.texture,c),x(i.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),e.texture.generateMipmaps&&c&&t.generateMipmap(t.TEXTURE_2D),n.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&E(e)}function S(e){var i=e.texture;if(i.generateMipmaps&&u(e)&&i.minFilter!==_a&&i.minFilter!==Ma){var o=e&&e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,a=r.get(i).__webglTexture;n.bindTexture(o,a),t.generateMipmap(o),n.bindTexture(o,null)}}var A="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext;this.setTexture2D=v,this.setTextureCube=g,this.setTextureCubeDynamic=y,this.setupRenderTarget=T,this.updateRenderTargetMipmap=S}function le(){function t(t){var e=t.uuid,n=r[e];return void 0===n&&(n={},r[e]=n),n}function e(t){delete r[t.uuid]}function n(){r={}}var r={};return{get:t,remove:e,clear:n}}function he(t,e,n){function r(){var e=!1,n=new a,r=null,i=new a;return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,a,s){!0===s&&(e*=a,r*=a,o*=a),n.set(e,r,o,a),!1===i.equals(n)&&(t.clearColor(e,r,o,a),i.copy(n))},reset:function(){e=!1,r=null,i.set(0,0,0,1)}}}function i(){var e=!1,n=null,r=null,i=null;return{setTest:function(e){e?d(t.DEPTH_TEST):p(t.DEPTH_TEST)},setMask:function(r){n===r||e||(t.depthMask(r),n=r)},setFunc:function(e){if(r!==e){if(e)switch(e){case qo:t.depthFunc(t.NEVER);break;case Yo:t.depthFunc(t.ALWAYS);break;case Zo:t.depthFunc(t.LESS);break;case Jo:t.depthFunc(t.LEQUAL);break;case Qo:t.depthFunc(t.EQUAL);break;case Ko:t.depthFunc(t.GEQUAL);break;case $o:t.depthFunc(t.GREATER);break;case ta:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);r=e}},setLocked:function(t){e=t},setClear:function(e){i!==e&&(t.clearDepth(e),i=e)},reset:function(){e=!1,n=null,r=null,i=null}}}function o(){var e=!1,n=null,r=null,i=null,o=null,a=null,s=null,u=null,c=null;return{setTest:function(e){e?d(t.STENCIL_TEST):p(t.STENCIL_TEST)},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,a){r===e&&i===n&&o===a||(t.stencilFunc(e,n,a),r=e,i=n,o=a)},setOp:function(e,n,r){a===e&&s===n&&u===r||(t.stencilOp(e,n,r),a=e,s=n,u=r)},setLocked:function(t){e=t},setClear:function(e){c!==e&&(t.clearStencil(e),c=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,a=null,s=null,u=null,c=null}}}function s(e,n,r){var i=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;a<r;a++)t.texImage2D(n+a,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,i);return o}function u(){L.setClear(0,0,0,1),j.setClear(1),P.setClear(0),d(t.DEPTH_TEST),j.setFunc(Jo),y(!1),b(uo),d(t.CULL_FACE),d(t.BLEND),v(So)}function c(){for(var t=0,e=I.length;t<e;t++)I[t]=0}function l(n){if(I[n]=1,0===U[n]&&(t.enableVertexAttribArray(n),U[n]=1),0!==D[n]){e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,0),D[n]=0}}function h(n,r){if(I[n]=1,0===U[n]&&(t.enableVertexAttribArray(n),U[n]=1),D[n]!==r){e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(n,r),D[n]=r}}function f(){for(var e=0,n=U.length;e!==n;++e)U[e]!==I[e]&&(t.disableVertexAttribArray(e),U[e]=0)}function d(e){!0!==k[e]&&(t.enable(e),k[e]=!0)}function p(e){!1!==k[e]&&(t.disable(e),k[e]=!1)}function m(){if(null===F&&(F=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")))for(var n=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),r=0;r<n.length;r++)F.push(n[r]);return F}function v(e,r,i,o,a,s,u,c){e!==To?d(t.BLEND):p(t.BLEND),e===B&&c===q||(e===Ao?c?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE)):e===Oo?c?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR)):e===Co?c?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR)):c?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)),B=e,q=c),e===Ro?(a=a||r,s=s||i,u=u||o,r===z&&a===V||(t.blendEquationSeparate(n(r),n(a)),z=r,V=a),i===G&&o===H&&s===W&&u===X||(t.blendFuncSeparate(n(i),n(o),n(s),n(u)),G=i,H=o,W=s,X=u)):(z=null,G=null,H=null,V=null,W=null,X=null)}function g(e){e.side===bo?p(t.CULL_FACE):d(t.CULL_FACE),y(e.side===yo),!0===e.transparent?v(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):v(To),j.setFunc(e.depthFunc),j.setTest(e.depthTest),j.setMask(e.depthWrite),L.setMask(e.colorWrite),x(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)}function y(e){Y!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),Y=e)}function b(e){e!==so?(d(t.CULL_FACE),e!==Z&&(e===uo?t.cullFace(t.BACK):e===co?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):p(t.CULL_FACE),Z=e}function _(e){e!==J&&(nt&&t.lineWidth(e),J=e)}function x(e,n,r){e?(d(t.POLYGON_OFFSET_FILL),Q===n&&K===r||(t.polygonOffset(n,r),Q=n,K=r)):p(t.POLYGON_OFFSET_FILL)}function w(){return $}function M(e){$=e,e?d(t.SCISSOR_TEST):p(t.SCISSOR_TEST)}function E(e){void 0===e&&(e=t.TEXTURE0+tt-1),rt!==e&&(t.activeTexture(e),rt=e)}function T(e,n){null===rt&&E();var r=it[rt];void 0===r&&(r={type:void 0,texture:void 0},it[rt]=r),r.type===e&&r.texture===n||(t.bindTexture(e,n||st[e]),r.type=e,r.texture=n)}function S(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error(t)}}function A(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error(t)}}function O(e){!1===ot.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),ot.copy(e))}function C(e){!1===at.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),at.copy(e))}function R(){for(var e=0;e<U.length;e++)1===U[e]&&(t.disableVertexAttribArray(e),U[e]=0);k={},F=null,rt=null,it={},B=null,Y=null,Z=null,L.reset(),j.reset(),P.reset()}var L=new r,j=new i,P=new o,N=t.getParameter(t.MAX_VERTEX_ATTRIBS),I=new Uint8Array(N),U=new Uint8Array(N),D=new Uint8Array(N),k={},F=null,B=null,z=null,G=null,H=null,V=null,W=null,X=null,q=!1,Y=null,Z=null,J=null,Q=null,K=null,$=null,tt=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),et=parseFloat(/^WebGL\ ([0-9])/.exec(t.getParameter(t.VERSION))[1]),nt=parseFloat(et)>=1,rt=null,it={},ot=new a,at=new a,st={};return st[t.TEXTURE_2D]=s(t.TEXTURE_2D,t.TEXTURE_2D,1),st[t.TEXTURE_CUBE_MAP]=s(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),{buffers:{color:L,depth:j,stencil:P},init:u,initAttributes:c,enableAttribute:l,enableAttributeAndDivisor:h,disableUnusedAttributes:f,enable:d,disable:p,getCompressedTextureFormats:m,setBlending:v,setMaterial:g,setFlipSided:y,setCullFace:b,setLineWidth:_,setPolygonOffset:x,getScissorTest:w,setScissorTest:M,activeTexture:E,bindTexture:T,compressedTexImage2D:S,texImage2D:A,scissor:O,viewport:C,reset:R}}function fe(t,e,n){function r(){if(void 0!==o)return o;var n=e.get("EXT_texture_filter_anisotropic");return o=null!==n?t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}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 u=!0===n.logarithmicDepthBuffer&&!!e.get("EXT_frag_depth"),c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_TEXTURE_SIZE),f=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),d=t.getParameter(t.MAX_VERTEX_ATTRIBS),p=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),m=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),g=l>0,y=!!e.get("OES_texture_float");return{getMaxAnisotropy:r,getMaxPrecision:i,precision:a,logarithmicDepthBuffer:u,maxTextures:c,maxVertexTextures:l,maxTextureSize:h,maxCubemapSize:f,maxAttributes:d,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y}}function de(t){var e={};return{get:function(n){if(void 0!==e[n])return e[n];var r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":r=t.getExtension("WEBGL_compressed_texture_etc1");break;default:r=t.getExtension(n)}return null===r&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),e[n]=r,r}}}function pe(){function t(){c.value!==r&&(c.value=r,c.needsUpdate=i>0),n.numPlanes=i,n.numIntersection=0}function e(t,e,r,i){var o=null!==t?t.length:0,a=null;if(0!==o){if(a=c.value,!0!==i||null===a){var l=r+4*o,h=e.matrixWorldInverse;u.getNormalMatrix(h),(null===a||a.length<l)&&(a=new Float32Array(l));for(var f=0,d=r;f!==o;++f,d+=4)s.copy(t[f]).applyMatrix4(h,u),s.normal.toArray(a,d),a[d+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 it,u=new rt,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(t,n,a){var s=0!==t.length||n||0!==i||o;return o=n,r=e(t,a,0),i=t.length,s},this.beginShadows=function(){a=!0,e(null)},this.endShadows=function(){a=!1,t()},this.setState=function(n,s,u,l,h,f){if(!o||null===n||0===n.length||a&&!u)a?e(null):t();else{var d=a?0:i,p=4*d,m=h.clippingState||null;c.value=m,m=e(n,l,p,f);for(var v=0;v!==p;++v)m[v]=r[v];h.clippingState=m,this.numIntersection=s?this.numPlanes:0,this.numPlanes+=d}}}function me(t){function e(){return null===nt?yt:1}function n(){Jt.init(),Jt.scissor(ct.copy(bt).multiplyScalar(yt)),Jt.viewport(ht.copy(xt).multiplyScalar(yt)),Jt.buffers.color.setClear(dt.r,dt.g,dt.b,mt,G)}function r(){et=null,ut=null,st="",it=-1,Jt.reset()}function i(t){t.preventDefault(),r(),n(),Qt.clear(),ee.clear()}function o(t){var e=t.target;e.removeEventListener("dispose",o),s(e)}function s(t){u(t),Qt.remove(t)}function u(t){var e=Qt.get(t).program;t.program=void 0,void 0!==e&&ne.releaseProgram(e)}function c(t,e,n){t.render(function(t){tt.renderBufferImmediate(t,e,n)})}function d(t,e){return Math.abs(e[0])-Math.abs(t[0])}function p(t,e,n,r){if(n&&n.isInstancedBufferGeometry&&null===Yt.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");void 0===r&&(r=0),Jt.initAttributes();var i=n.attributes,o=e.getAttributes(),a=t.defaultAttributeValues;for(var s in o){var u=o[s];if(u>=0){var c=i[s];if(void 0!==c){var l=c.normalized,h=c.itemSize,f=$t.get(c),d=f.buffer,p=f.type,m=f.bytesPerElement;if(c.isInterleavedBufferAttribute){var v=c.data,g=v.stride,y=c.offset;v&&v.isInstancedInterleavedBuffer?(Jt.enableAttributeAndDivisor(u,v.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=v.meshPerAttribute*v.count)):Jt.enableAttribute(u),Bt.bindBuffer(Bt.ARRAY_BUFFER,d),Bt.vertexAttribPointer(u,h,p,l,g*m,(r*g+y)*m)}else c.isInstancedBufferAttribute?(Jt.enableAttributeAndDivisor(u,c.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=c.meshPerAttribute*c.count)):Jt.enableAttribute(u),Bt.bindBuffer(Bt.ARRAY_BUFFER,d),Bt.vertexAttribPointer(u,h,p,l,0,r*h*m)}else if(void 0!==a){var b=a[s];if(void 0!==b)switch(b.length){case 2:Bt.vertexAttrib2fv(u,b);break;case 3:Bt.vertexAttrib3fv(u,b);break;case 4:Bt.vertexAttrib4fv(u,b);break;default:Bt.vertexAttrib1fv(u,b)}}}}Jt.disableUnusedAttributes()}function m(t,e,n){if(t.visible){if(t.layers.test(e.layers))if(t.isLight)V.push(t);else if(t.isSprite)t.frustumCulled&&!wt.intersectsSprite(t)||Z.push(t);else if(t.isLensFlare)K.push(t);else if(t.isImmediateRenderObject)n&&At.setFromMatrixPosition(t.matrixWorld).applyMatrix4(St),W.push(t,null,t.material,At.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||wt.intersectsObject(t))){n&&At.setFromMatrixPosition(t.matrixWorld).applyMatrix4(St);var r=ee.update(t),i=t.material;if(Array.isArray(i))for(var o=r.groups,a=0,s=o.length;a<s;a++){var u=o[a],c=i[u.materialIndex];c&&c.visible&&W.push(t,r,c,At.z,u)}else i.visible&&W.push(t,r,i,At.z,null)}for(var l=t.children,a=0,s=l.length;a<s;a++)m(l[a],e,n)}}function v(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i],s=a.object,u=a.geometry,c=void 0===r?a.material:r,l=a.group;if(s.onBeforeRender(tt,e,n,u,c,l),n.isArrayCamera&&n.enabled)for(var h=n.cameras,f=0,d=h.length;f<d;f++){var p=h[f],m=p.bounds;tt.setViewport(m.x*vt*yt,m.y*gt*yt,m.z*vt*yt,m.w*gt*yt),tt.setScissor(m.x*vt*yt,m.y*gt*yt,m.z*vt*yt,m.w*gt*yt),tt.setScissorTest(!0),g(s,e,p,u,c,l)}else g(s,e,n,u,c,l);s.onAfterRender(tt,e,n,u,c,l)}}function g(t,e,n,r,i,o){if(t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){Jt.setMaterial(i);var a=b(n,e.fog,i,t);st="",c(t,a,i)}else tt.renderBufferDirect(n,e.fog,r,i,t,o)}function y(t,e,n){var r=Qt.get(t),i=ne.getParameters(t,Pt,e,Mt.numPlanes,Mt.numIntersection,n),a=ne.getProgramCode(t,i),s=r.program,c=!0;if(void 0===s)t.addEventListener("dispose",o);else if(s.code!==a)u(t);else{if(void 0!==i.shaderID)return;c=!1}if(c){if(i.shaderID){var l=Us[i.shaderID];r.__webglShader={name:t.type,uniforms:Ns.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else r.__webglShader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.__webglShader=r.__webglShader,s=ne.acquireProgram(t,i,a),r.program=s,t.program=s}var h=s.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var f=0;f<tt.maxMorphTargets;f++)h["morphTarget"+f]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(var f=0;f<tt.maxMorphNormals;f++)h["morphNormal"+f]>=0&&t.numSupportedMorphNormals++}var d=r.__webglShader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(r.numClippingPlanes=Mt.numPlanes,r.numIntersection=Mt.numIntersection,d.clippingPlanes=Mt.uniform),r.fog=e,r.lightsHash=Pt.hash,t.lights&&(d.ambientLightColor.value=Pt.ambient,d.directionalLights.value=Pt.directional,d.spotLights.value=Pt.spot,d.rectAreaLights.value=Pt.rectArea,d.pointLights.value=Pt.point,d.hemisphereLights.value=Pt.hemi,d.directionalShadowMap.value=Pt.directionalShadowMap,d.directionalShadowMatrix.value=Pt.directionalShadowMatrix,d.spotShadowMap.value=Pt.spotShadowMap,d.spotShadowMatrix.value=Pt.spotShadowMatrix,d.pointShadowMap.value=Pt.pointShadowMap,d.pointShadowMatrix.value=Pt.pointShadowMatrix);var p=r.program.getUniforms(),m=q.seqWithValue(p.seq,d);r.uniformsList=m}function b(t,e,n,r){ft=0;var i=Qt.get(n);if(Et&&(Tt||t!==ut)){var o=t===ut&&n.id===it;Mt.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,t,i,o)}!1===n.needsUpdate&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==e?n.needsUpdate=!0:n.lights&&i.lightsHash!==Pt.hash?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===Mt.numPlanes&&i.numIntersection===Mt.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(y(n,e,r),n.needsUpdate=!1);var a=!1,s=!1,u=!1,c=i.program,l=c.getUniforms(),h=i.__webglShader.uniforms;if(c.id!==et&&(Bt.useProgram(c.program),et=c.id,a=!0,s=!0,u=!0),n.id!==it&&(it=n.id,s=!0),a||t!==ut){if(l.setValue(Bt,"projectionMatrix",t.projectionMatrix),Zt.logarithmicDepthBuffer&&l.setValue(Bt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),t!==ut&&(ut=t,s=!0,u=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var d=l.map.cameraPosition;void 0!==d&&d.setValue(Bt,At.setFromMatrixPosition(t.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&l.setValue(Bt,"viewMatrix",t.matrixWorldInverse),l.setValue(Bt,"toneMappingExposure",tt.toneMappingExposure),l.setValue(Bt,"toneMappingWhitePoint",tt.toneMappingWhitePoint)}if(n.skinning){l.setOptional(Bt,r,"bindMatrix"),l.setOptional(Bt,r,"bindMatrixInverse");var p=r.skeleton;if(p){var m=p.bones;if(Zt.floatVertexTextures){if(void 0===p.boneTexture){var v=Math.sqrt(4*m.length);v=Ms.nextPowerOfTwo(Math.ceil(v)),v=Math.max(v,4);var g=new Float32Array(v*v*4);g.set(p.boneMatrices);var b=new f(g,v,v,Ba,ja);p.boneMatrices=g,p.boneTexture=b,p.boneTextureSize=v}l.setValue(Bt,"boneTexture",p.boneTexture),l.setValue(Bt,"boneTextureSize",p.boneTextureSize)}else l.setOptional(Bt,p,"boneMatrices")}}return s&&(n.lights&&L(h,u),e&&n.fog&&E(h,e),(n.isMeshBasicMaterial||n.isMeshLambertMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.isMeshNormalMaterial||n.isMeshDepthMaterial)&&_(h,n),n.isLineBasicMaterial?x(h,n):n.isLineDashedMaterial?(x(h,n),w(h,n)):n.isPointsMaterial?M(h,n):n.isMeshLambertMaterial?T(h,n):n.isMeshToonMaterial?A(h,n):n.isMeshPhongMaterial?S(h,n):n.isMeshPhysicalMaterial?C(h,n):n.isMeshStandardMaterial?O(h,n):n.isMeshDepthMaterial?n.displacementMap&&(h.displacementMap.value=n.displacementMap,h.displacementScale.value=n.displacementScale,h.displacementBias.value=n.displacementBias):n.isMeshNormalMaterial&&R(h,n),void 0!==h.ltcMat&&(h.ltcMat.value=Ps.LTC_MAT_TEXTURE),void 0!==h.ltcMag&&(h.ltcMag.value=Ps.LTC_MAG_TEXTURE),q.upload(Bt,i.uniformsList,h,tt)),l.setValue(Bt,"modelViewMatrix",r.modelViewMatrix),l.setValue(Bt,"normalMatrix",r.normalMatrix),l.setValue(Bt,"modelMatrix",r.matrixWorld),c}function _(t,e){t.opacity.value=e.opacity,t.diffuse.value=e.color,e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),t.map.value=e.map,t.specularMap.value=e.specularMap,t.alphaMap.value=e.alphaMap,e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var n;if(e.map?n=e.map:e.specularMap?n=e.specularMap:e.displacementMap?n=e.displacementMap:e.normalMap?n=e.normalMap:e.bumpMap?n=e.bumpMap:e.roughnessMap?n=e.roughnessMap:e.metalnessMap?n=e.metalnessMap:e.alphaMap?n=e.alphaMap:e.emissiveMap&&(n=e.emissiveMap),void 0!==n){n.isWebGLRenderTarget&&(n=n.texture);var r=n.offset,i=n.repeat;t.offsetRepeat.value.set(r.x,r.y,i.x,i.y)}t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio}function x(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}function w(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}function M(t,e){if(t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*yt,t.scale.value=.5*gt,t.map.value=e.map,null!==e.map){var n=e.map.offset,r=e.map.repeat;t.offsetRepeat.value.set(n.x,n.y,r.x,r.y)}}function E(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}function T(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}function S(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function A(t,e){S(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}function O(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}function C(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,O(t,e)}function R(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function L(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}function j(t){for(var e=0,n=0,r=t.length;n<r;n++){var i=t[n];i.castShadow&&(Pt.shadows[e]=i,e++)}Pt.shadows.length=e}function P(t,e){var n,r,i,o,a,s,u,c,l=0,h=0,f=0,d=e.matrixWorldInverse,p=0,m=0,v=0,g=0,y=0;for(n=0,r=t.length;n<r;n++)if(i=t[n],a=i.color,s=i.intensity,u=i.distance,c=i.shadow&&i.shadow.map?i.shadow.map.texture:null,i.isAmbientLight)l+=a.r*s,h+=a.g*s,f+=a.b*s;else if(i.isDirectionalLight){var b=re.get(i);b.color.copy(i.color).multiplyScalar(i.intensity),b.direction.setFromMatrixPosition(i.matrixWorld),At.setFromMatrixPosition(i.target.matrixWorld),b.direction.sub(At),b.direction.transformDirection(d),b.shadow=i.castShadow,i.castShadow&&(o=i.shadow,b.shadowBias=o.bias,b.shadowRadius=o.radius,b.shadowMapSize=o.mapSize),Pt.directionalShadowMap[p]=c,Pt.directionalShadowMatrix[p]=i.shadow.matrix,Pt.directional[p]=b,p++}else if(i.isSpotLight){var b=re.get(i);b.position.setFromMatrixPosition(i.matrixWorld),b.position.applyMatrix4(d),b.color.copy(a).multiplyScalar(s),b.distance=u,b.direction.setFromMatrixPosition(i.matrixWorld),At.setFromMatrixPosition(i.target.matrixWorld),b.direction.sub(At),b.direction.transformDirection(d),b.coneCos=Math.cos(i.angle),b.penumbraCos=Math.cos(i.angle*(1-i.penumbra)),b.decay=0===i.distance?0:i.decay,b.shadow=i.castShadow,i.castShadow&&(o=i.shadow,b.shadowBias=o.bias,b.shadowRadius=o.radius,b.shadowMapSize=o.mapSize),Pt.spotShadowMap[v]=c,Pt.spotShadowMatrix[v]=i.shadow.matrix,Pt.spot[v]=b,v++}else if(i.isRectAreaLight){var b=re.get(i);b.color.copy(a).multiplyScalar(s/(i.width*i.height)),b.position.setFromMatrixPosition(i.matrixWorld),b.position.applyMatrix4(d),Lt.identity(),Ot.copy(i.matrixWorld),Ot.premultiply(d),Lt.extractRotation(Ot),b.halfWidth.set(.5*i.width,0,0),b.halfHeight.set(0,.5*i.height,0),b.halfWidth.applyMatrix4(Lt),b.halfHeight.applyMatrix4(Lt),Pt.rectArea[g]=b,g++}else if(i.isPointLight){var b=re.get(i);b.position.setFromMatrixPosition(i.matrixWorld),b.position.applyMatrix4(d),b.color.copy(i.color).multiplyScalar(i.intensity),b.distance=i.distance,b.decay=0===i.distance?0:i.decay,b.shadow=i.castShadow,i.castShadow&&(o=i.shadow,b.shadowBias=o.bias,b.shadowRadius=o.radius,b.shadowMapSize=o.mapSize),Pt.pointShadowMap[m]=c,Pt.pointShadowMatrix[m]=i.shadow.matrix,Pt.point[m]=b,m++}else if(i.isHemisphereLight){var b=re.get(i);b.direction.setFromMatrixPosition(i.matrixWorld),b.direction.transformDirection(d),b.direction.normalize(),b.skyColor.copy(i.color).multiplyScalar(s),b.groundColor.copy(i.groundColor).multiplyScalar(s),Pt.hemi[y]=b,y++}Pt.ambient[0]=l,Pt.ambient[1]=h,Pt.ambient[2]=f,Pt.directional.length=p,Pt.spot.length=v,Pt.rectArea.length=g,Pt.point.length=m,Pt.hemi.length=y,Pt.hash=p+","+m+","+v+","+g+","+y+","+Pt.shadows.length}function N(){var t=ft;return t>=Zt.maxTextures&&console.warn("WebGLRenderer: trying to use "+t+" texture units while this GPU supports only "+Zt.maxTextures),ft+=1,t}function I(t){var e;if(t===ga)return Bt.REPEAT;if(t===ya)return Bt.CLAMP_TO_EDGE;if(t===ba)return Bt.MIRRORED_REPEAT;if(t===_a)return Bt.NEAREST;if(t===xa)return Bt.NEAREST_MIPMAP_NEAREST;if(t===wa)return Bt.NEAREST_MIPMAP_LINEAR;if(t===Ma)return Bt.LINEAR;if(t===Ea)return Bt.LINEAR_MIPMAP_NEAREST;if(t===Ta)return Bt.LINEAR_MIPMAP_LINEAR;if(t===Sa)return Bt.UNSIGNED_BYTE;if(t===Na)return Bt.UNSIGNED_SHORT_4_4_4_4;if(t===Ia)return Bt.UNSIGNED_SHORT_5_5_5_1;if(t===Ua)return Bt.UNSIGNED_SHORT_5_6_5;if(t===Aa)return Bt.BYTE;if(t===Oa)return Bt.SHORT;if(t===Ca)return Bt.UNSIGNED_SHORT;if(t===Ra)return Bt.INT;if(t===La)return Bt.UNSIGNED_INT;if(t===ja)return Bt.FLOAT;if(t===Pa&&null!==(e=Yt.get("OES_texture_half_float")))return e.HALF_FLOAT_OES;if(t===ka)return Bt.ALPHA;if(t===Fa)return Bt.RGB;if(t===Ba)return Bt.RGBA;if(t===za)return Bt.LUMINANCE;if(t===Ga)return Bt.LUMINANCE_ALPHA;if(t===Va)return Bt.DEPTH_COMPONENT;if(t===Wa)return Bt.DEPTH_STENCIL;if(t===Lo)return Bt.FUNC_ADD;if(t===jo)return Bt.FUNC_SUBTRACT;if(t===Po)return Bt.FUNC_REVERSE_SUBTRACT;if(t===Uo)return Bt.ZERO;if(t===Do)return Bt.ONE;if(t===ko)return Bt.SRC_COLOR;if(t===Fo)return Bt.ONE_MINUS_SRC_COLOR;if(t===Bo)return Bt.SRC_ALPHA;if(t===zo)return Bt.ONE_MINUS_SRC_ALPHA;if(t===Go)return Bt.DST_ALPHA;if(t===Ho)return Bt.ONE_MINUS_DST_ALPHA;if(t===Vo)return Bt.DST_COLOR;if(t===Wo)return Bt.ONE_MINUS_DST_COLOR;if(t===Xo)return Bt.SRC_ALPHA_SATURATE;if((t===Xa||t===qa||t===Ya||t===Za)&&null!==(e=Yt.get("WEBGL_compressed_texture_s3tc"))){if(t===Xa)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===qa)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===Ya)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===Za)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((t===Ja||t===Qa||t===Ka||t===$a)&&null!==(e=Yt.get("WEBGL_compressed_texture_pvrtc"))){if(t===Ja)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===Qa)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===Ka)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===$a)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t===ts&&null!==(e=Yt.get("WEBGL_compressed_texture_etc1")))return e.COMPRESSED_RGB_ETC1_WEBGL;if((t===No||t===Io)&&null!==(e=Yt.get("EXT_blend_minmax"))){if(t===No)return e.MIN_EXT;if(t===Io)return e.MAX_EXT}return t===Da&&null!==(e=Yt.get("WEBGL_depth_texture"))?e.UNSIGNED_INT_24_8_WEBGL:0}console.log("THREE.WebGLRenderer",oo),t=t||{};var U=void 0!==t.canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),D=void 0!==t.context?t.context:null,k=void 0!==t.alpha&&t.alpha,F=void 0===t.depth||t.depth,B=void 0===t.stencil||t.stencil,z=void 0!==t.antialias&&t.antialias,G=void 0===t.premultipliedAlpha||t.premultipliedAlpha,H=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,V=[],W=null,X=new Float32Array(8),Z=[],K=[];this.domElement=U,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=oa,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var tt=this,et=null,nt=null,rt=null,it=-1,st="",ut=null,ct=new a,lt=null,ht=new a,ft=0,dt=new Y(0),mt=0,vt=U.width,gt=U.height,yt=1,bt=new a(0,0,vt,gt),_t=!1,xt=new a(0,0,vt,gt),wt=new ot,Mt=new pe,Et=!1,Tt=!1,St=new h,At=new l,Ot=new h,Lt=new h,Pt={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},It={geometries:0,textures:0},Ft={frame:0,calls:0,vertices:0,faces:0,points:0};this.info={render:Ft,memory:It,programs:null};var Bt;try{var zt={alpha:k,depth:F,stencil:B,antialias:z,premultipliedAlpha:G,preserveDrawingBuffer:H};if(null===(Bt=D||U.getContext("webgl",zt)||U.getContext("experimental-webgl",zt)))throw null!==U.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===Bt.getShaderPrecisionFormat&&(Bt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),U.addEventListener("webglcontextlost",i,!1)}catch(t){console.error("THREE.WebGLRenderer: "+t)}var Yt=new de(Bt);Yt.get("WEBGL_depth_texture"),Yt.get("OES_texture_float"),Yt.get("OES_texture_float_linear"),Yt.get("OES_texture_half_float"),Yt.get("OES_texture_half_float_linear"),Yt.get("OES_standard_derivatives"),Yt.get("ANGLE_instanced_arrays"),Yt.get("OES_element_index_uint")&&(Ct.MaxIndex=4294967296);var Zt=new fe(Bt,Yt,t),Jt=new he(Bt,Yt,I),Qt=new le,Kt=new ce(Bt,Yt,Jt,Qt,Zt,I,It),$t=new kt(Bt),te=new Wt(Bt,$t,It),ee=new qt(Bt,te,Ft),ne=new ue(this,Zt),re=new Xt,ie=new Gt;this.info.programs=ne.programs;var oe,ae,se,me,ve=new Vt(Bt,Yt,Ft),ge=new Ht(Bt,Yt,Ft);n(),this.context=Bt,this.capabilities=Zt,this.extensions=Yt,this.properties=Qt,this.state=Jt;var ye=new at(this,Pt,ee,Zt);this.shadowMap=ye;var be=new Q(this,Z),_e=new J(this,K);this.getContext=function(){return Bt},this.getContextAttributes=function(){return Bt.getContextAttributes()},this.forceContextLoss=function(){var t=Yt.get("WEBGL_lose_context");t&&t.loseContext()},this.getMaxAnisotropy=function(){return Zt.getMaxAnisotropy()},this.getPrecision=function(){return Zt.precision},this.getPixelRatio=function(){return yt},this.setPixelRatio=function(t){void 0!==t&&(yt=t,this.setSize(xt.z,xt.w,!1))},this.getSize=function(){return{width:vt,height:gt}},this.setSize=function(t,e,n){vt=t,gt=e,U.width=t*yt,U.height=e*yt,!1!==n&&(U.style.width=t+"px",U.style.height=e+"px"),this.setViewport(0,0,t,e)},this.setViewport=function(t,e,n,r){Jt.viewport(xt.set(t,e,n,r))},this.setScissor=function(t,e,n,r){Jt.scissor(bt.set(t,e,n,r))},this.setScissorTest=function(t){Jt.setScissorTest(_t=t)},this.getClearColor=function(){return dt},this.setClearColor=function(t,e){dt.set(t),mt=void 0!==e?e:1,Jt.buffers.color.setClear(dt.r,dt.g,dt.b,mt,G)},this.getClearAlpha=function(){return mt},this.setClearAlpha=function(t){mt=t,Jt.buffers.color.setClear(dt.r,dt.g,dt.b,mt,G)},this.clear=function(t,e,n){var r=0;(void 0===t||t)&&(r|=Bt.COLOR_BUFFER_BIT),(void 0===e||e)&&(r|=Bt.DEPTH_BUFFER_BIT),(void 0===n||n)&&(r|=Bt.STENCIL_BUFFER_BIT),Bt.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(t,e,n,r){this.setRenderTarget(t),this.clear(e,n,r)},this.resetGLState=r,this.dispose=function(){U.removeEventListener("webglcontextlost",i,!1),ie.dispose()},this.renderBufferImmediate=function(t,e,n){Jt.initAttributes();var r=Qt.get(t);t.hasPositions&&!r.position&&(r.position=Bt.createBuffer()),t.hasNormals&&!r.normal&&(r.normal=Bt.createBuffer()),t.hasUvs&&!r.uv&&(r.uv=Bt.createBuffer()),t.hasColors&&!r.color&&(r.color=Bt.createBuffer());var i=e.getAttributes();if(t.hasPositions&&(Bt.bindBuffer(Bt.ARRAY_BUFFER,r.position),Bt.bufferData(Bt.ARRAY_BUFFER,t.positionArray,Bt.DYNAMIC_DRAW),Jt.enableAttribute(i.position),Bt.vertexAttribPointer(i.position,3,Bt.FLOAT,!1,0,0)),t.hasNormals){if(Bt.bindBuffer(Bt.ARRAY_BUFFER,r.normal),!n.isMeshPhongMaterial&&!n.isMeshStandardMaterial&&!n.isMeshNormalMaterial&&n.shading===_o)for(var o=0,a=3*t.count;o<a;o+=9){var s=t.normalArray,u=(s[o+0]+s[o+3]+s[o+6])/3,c=(s[o+1]+s[o+4]+s[o+7])/3,l=(s[o+2]+s[o+5]+s[o+8])/3;s[o+0]=u,s[o+1]=c,s[o+2]=l,s[o+3]=u,s[o+4]=c,s[o+5]=l,s[o+6]=u,s[o+7]=c,s[o+8]=l}Bt.bufferData(Bt.ARRAY_BUFFER,t.normalArray,Bt.DYNAMIC_DRAW),Jt.enableAttribute(i.normal),Bt.vertexAttribPointer(i.normal,3,Bt.FLOAT,!1,0,0)}t.hasUvs&&n.map&&(Bt.bindBuffer(Bt.ARRAY_BUFFER,r.uv),Bt.bufferData(Bt.ARRAY_BUFFER,t.uvArray,Bt.DYNAMIC_DRAW),Jt.enableAttribute(i.uv),Bt.vertexAttribPointer($t.uv,2,Bt.FLOAT,!1,0,0)),t.hasColors&&n.vertexColors!==wo&&(Bt.bindBuffer(Bt.ARRAY_BUFFER,r.color),Bt.bufferData(Bt.ARRAY_BUFFER,t.colorArray,Bt.DYNAMIC_DRAW),Jt.enableAttribute(i.color),Bt.vertexAttribPointer(i.color,3,Bt.FLOAT,!1,0,0)),Jt.disableUnusedAttributes(),Bt.drawArrays(Bt.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,n,r,i,o,a){Jt.setMaterial(i);var s=b(t,n,i,o),u=r.id+"_"+s.id+"_"+(!0===i.wireframe),c=!1;u!==st&&(st=u,c=!0);var l=o.morphTargetInfluences;if(void 0!==l){for(var h=[],f=0,m=l.length;f<m;f++){var v=l[f];h.push([v,f])}h.sort(d),h.length>8&&(h.length=8);for(var g=r.morphAttributes,f=0,m=h.length;f<m;f++){var v=h[f];if(X[f]=v[0],0!==v[0]){var y=v[1];!0===i.morphTargets&&g.position&&r.addAttribute("morphTarget"+f,g.position[y]),!0===i.morphNormals&&g.normal&&r.addAttribute("morphNormal"+f,g.normal[y])}else!0===i.morphTargets&&r.removeAttribute("morphTarget"+f),!0===i.morphNormals&&r.removeAttribute("morphNormal"+f)}for(var f=h.length,_=X.length;f<_;f++)X[f]=0;s.getUniforms().setValue(Bt,"morphTargetInfluences",X),c=!0}var y=r.index,x=r.attributes.position,w=1;!0===i.wireframe&&(y=te.getWireframeAttribute(r),w=2);var M=ve;null!==y&&(M=ge,M.setIndex(y)),c&&(p(i,s,r),null!==y&&Bt.bindBuffer(Bt.ELEMENT_ARRAY_BUFFER,$t.get(y).buffer));var E=0;null!==y?E=y.count:void 0!==x&&(E=x.count);var T=r.drawRange.start*w,S=r.drawRange.count*w,A=null!==a?a.start*w:0,O=null!==a?a.count*w:1/0,C=Math.max(T,A),R=Math.min(E,T+S,A+O)-1,L=Math.max(0,R-C+1);if(0!==L){if(o.isMesh)if(!0===i.wireframe)Jt.setLineWidth(i.wireframeLinewidth*e()),M.setMode(Bt.LINES);else switch(o.drawMode){case ls:M.setMode(Bt.TRIANGLES);break;case hs:M.setMode(Bt.TRIANGLE_STRIP);break;case fs:M.setMode(Bt.TRIANGLE_FAN)}else if(o.isLine){var j=i.linewidth;void 0===j&&(j=1),Jt.setLineWidth(j*e()),o.isLineSegments?M.setMode(Bt.LINES):o.isLineLoop?M.setMode(Bt.LINE_LOOP):M.setMode(Bt.LINE_STRIP)}else o.isPoints&&M.setMode(Bt.POINTS);r&&r.isInstancedBufferGeometry?r.maxInstancedCount>0&&M.renderInstances(r,C,L):M.render(C,L)}},this.compile=function(t,e){V=[],t.traverse(function(t){t.isLight&&V.push(t)}),P(V,e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var n=0;n<e.material.length;n++)y(e.material[n],t.fog,e);else y(e.material,t.fog,e)})},this.render=function(t,e,n,r){if(void 0!==e&&!0!==e.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");st="",it=-1,ut=null,!0===t.autoUpdate&&t.updateMatrixWorld(),e.onBeforeRender(tt),null===e.parent&&e.updateMatrixWorld(),e.matrixWorldInverse.getInverse(e.matrixWorld),St.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),wt.setFromMatrix(St),V.length=0,Z.length=0,K.length=0,Tt=this.localClippingEnabled,Et=Mt.init(this.clippingPlanes,Tt,e),W=ie.get(t,e),W.init(),m(t,e,tt.sortObjects),W.finish(),!0===tt.sortObjects&&W.sort(),Et&&Mt.beginShadows(),j(V),ye.render(t,e),P(V,e),Et&&Mt.endShadows(),Ft.frame++,Ft.calls=0,Ft.vertices=0,Ft.faces=0,Ft.points=0,void 0===n&&(n=null),this.setRenderTarget(n);var i=t.background;null===i?Jt.buffers.color.setClear(dt.r,dt.g,dt.b,mt,G):i&&i.isColor&&(Jt.buffers.color.setClear(i.r,i.g,i.b,1,G),r=!0),(this.autoClear||r)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),i&&i.isCubeTexture?(void 0===se&&(se=new Ut,me=new Rt(new jt(5,5,5),new $({uniforms:Us.cube.uniforms,vertexShader:Us.cube.vertexShader,fragmentShader:Us.cube.fragmentShader,side:yo,depthTest:!1,depthWrite:!1,fog:!1}))),se.projectionMatrix.copy(e.projectionMatrix),se.matrixWorld.extractRotation(e.matrixWorld),se.matrixWorldInverse.getInverse(se.matrixWorld),me.material.uniforms.tCube.value=i,me.modelViewMatrix.multiplyMatrices(se.matrixWorldInverse,me.matrixWorld),ee.update(me),tt.renderBufferDirect(se,null,me.geometry,me.material,me,null)):i&&i.isTexture&&(void 0===oe&&(oe=new Dt(-1,1,1,-1,0,1),ae=new Rt(new Nt(2,2),new pt({depthTest:!1,depthWrite:!1,fog:!1}))),ae.material.map=i,ee.update(ae),tt.renderBufferDirect(oe,null,ae.geometry,ae.material,ae,null));var o=W.opaque,a=W.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;o.length&&v(o,t,e,s),a.length&&v(a,t,e,s)}else o.length&&v(o,t,e),a.length&&v(a,t,e);be.render(t,e),_e.render(t,e,ht),n&&Kt.updateRenderTargetMipmap(n),Jt.buffers.depth.setTest(!0),Jt.buffers.depth.setMask(!0),Jt.buffers.color.setMask(!0),e.isArrayCamera&&e.enabled&&tt.setScissorTest(!1),e.onAfterRender(tt)},this.setFaceCulling=function(t,e){Jt.setCullFace(t),Jt.setFlipSided(e===ho)},this.allocTextureUnit=N,this.setTexture2D=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTarget&&(t||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),Kt.setTexture2D(e,n)}}(),this.setTexture=function(){var t=!1;return function(e,n){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),Kt.setTexture2D(e,n)}}(),this.setTextureCube=function(){var t=!1;return function(e,n){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?Kt.setTextureCube(e,n):Kt.setTextureCubeDynamic(e,n)}}(),this.getRenderTarget=function(){return nt},this.setRenderTarget=function(t){nt=t,t&&void 0===Qt.get(t).__webglFramebuffer&&Kt.setupRenderTarget(t);var e,n=t&&t.isWebGLRenderTargetCube;if(t){var r=Qt.get(t);e=n?r.__webglFramebuffer[t.activeCubeFace]:r.__webglFramebuffer,ct.copy(t.scissor),lt=t.scissorTest,ht.copy(t.viewport)}else e=null,ct.copy(bt).multiplyScalar(yt),lt=_t,ht.copy(xt).multiplyScalar(yt);if(rt!==e&&(Bt.bindFramebuffer(Bt.FRAMEBUFFER,e),rt=e),Jt.scissor(ct),Jt.setScissorTest(lt),Jt.viewport(ht),n){var i=Qt.get(t.texture);Bt.framebufferTexture2D(Bt.FRAMEBUFFER,Bt.COLOR_ATTACHMENT0,Bt.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,i.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,n,r,i,o){if(!1===(t&&t.isWebGLRenderTarget))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");var a=Qt.get(t).__webglFramebuffer;if(a){var s=!1;a!==rt&&(Bt.bindFramebuffer(Bt.FRAMEBUFFER,a),s=!0);try{var u=t.texture,c=u.format,l=u.type;if(c!==Ba&&I(c)!==Bt.getParameter(Bt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(l===Sa||I(l)===Bt.getParameter(Bt.IMPLEMENTATION_COLOR_READ_TYPE)||l===ja&&(Yt.get("OES_texture_float")||Yt.get("WEBGL_color_buffer_float"))||l===Pa&&Yt.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");Bt.checkFramebufferStatus(Bt.FRAMEBUFFER)===Bt.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&Bt.readPixels(e,n,r,i,I(c),I(l),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&Bt.bindFramebuffer(Bt.FRAMEBUFFER,rt)}}}}function ve(t,e){this.name="",this.color=new Y(t),this.density=void 0!==e?e:25e-5}function ge(t,e,n){this.name="",this.color=new Y(t),this.near=void 0!==e?e:1,this.far=void 0!==n?n:1e3}function ye(){lt.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function be(t,e,n,r,i){lt.call(this),this.lensFlares=[],this.positionScreen=new l,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,n,r,i)}function _e(t){K.call(this),this.type="SpriteMaterial",this.color=new Y(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function xe(t){lt.call(this),this.type="Sprite",this.material=void 0!==t?t:new _e}function we(){lt.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Me(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.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 h)}}function Ee(){lt.call(this),this.type="Bone"}function Te(t,e){Rt.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new h,this.bindMatrixInverse=new h;var n=this.initBones(),r=new Me(n);this.bind(r,this.matrixWorld),this.normalizeSkinWeights()}function Se(t){K.call(this),this.type="LineBasicMaterial",this.color=new Y(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Ae(t,e,n){if(1===n)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Oe(t,e);lt.call(this),this.type="Line",this.geometry=void 0!==t?t:new Ct,this.material=void 0!==e?e:new Se({color:16777215*Math.random()})}function Oe(t,e){Ae.call(this,t,e),this.type="LineSegments"}function Ce(t,e){Ae.call(this,t,e),this.type="LineLoop"}function Re(t){K.call(this),this.type="PointsMaterial",this.color=new Y(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.lights=!1,this.setValues(t)}function Le(t,e){lt.call(this),this.type="Points",this.geometry=void 0!==t?t:new Ct,this.material=void 0!==e?e:new Re({color:16777215*Math.random()})}function je(){lt.call(this),this.type="Group"}function Pe(t,e,n,r,i,a,s,u,c){function l(){requestAnimationFrame(l),t.readyState>=t.HAVE_CURRENT_DATA&&(h.needsUpdate=!0)}o.call(this,t,e,n,r,i,a,s,u,c),this.generateMipmaps=!1;var h=this;l()}function Ne(t,e,n,r,i,a,s,u,c,l,h,f){o.call(this,null,a,s,u,c,l,r,i,h,f),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function Ie(t,e,n,r,i,a,s,u,c){o.call(this,t,e,n,r,i,a,s,u,c),this.needsUpdate=!0}function Ue(t,e,n,r,i,a,s,u,c,l){if((l=void 0!==l?l:Va)!==Va&&l!==Wa)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===Va&&(n=Ca),void 0===n&&l===Wa&&(n=Da),o.call(this,null,r,i,a,s,u,l,n,c),this.image={width:t,height:e},this.magFilter=void 0!==s?s:_a,this.minFilter=void 0!==u?u:_a,this.flipY=!1,this.generateMipmaps=!1}function De(t){Ct.call(this),this.type="WireframeGeometry";var e,n,r,i,o,a,s,u,c,h,f=[],d=[0,0],p={},m=["a","b","c"];if(t&&t.isGeometry){var v=t.faces;for(e=0,r=v.length;e<r;e++){var g=v[e];for(n=0;n<3;n++)s=g[m[n]],u=g[m[(n+1)%3]],d[0]=Math.min(s,u),d[1]=Math.max(s,u),c=d[0]+","+d[1],void 0===p[c]&&(p[c]={index1:d[0],index2:d[1]})}for(c in p)a=p[c],h=t.vertices[a.index1],f.push(h.x,h.y,h.z),h=t.vertices[a.index2],f.push(h.x,h.y,h.z)}else if(t&&t.isBufferGeometry){var y,b,_,x,w,M,E,T;if(h=new l,null!==t.index){for(y=t.attributes.position,b=t.index,_=t.groups,0===_.length&&(_=[{start:0,count:b.count,materialIndex:0}]),i=0,o=_.length;i<o;++i)for(x=_[i],w=x.start,M=x.count,e=w,r=w+M;e<r;e+=3)for(n=0;n<3;n++)s=b.getX(e+n),u=b.getX(e+(n+1)%3),d[0]=Math.min(s,u),d[1]=Math.max(s,u),c=d[0]+","+d[1],void 0===p[c]&&(p[c]={index1:d[0],index2:d[1]});for(c in p)a=p[c],h.fromBufferAttribute(y,a.index1),f.push(h.x,h.y,h.z),h.fromBufferAttribute(y,a.index2),f.push(h.x,h.y,h.z)}else for(y=t.attributes.position,e=0,r=y.count/3;e<r;e++)for(n=0;n<3;n++)E=3*e+n,h.fromBufferAttribute(y,E),f.push(h.x,h.y,h.z),T=3*e+(n+1)%3,h.fromBufferAttribute(y,T),f.push(h.x,h.y,h.z)}this.addAttribute("position",new Mt(f,3))}function ke(t,e,n){Ot.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:n},this.fromBufferGeometry(new Fe(t,e,n)),this.mergeVertices()}function Fe(t,e,n){Ct.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:n};var r,i,o=[],a=[],s=[],u=[],c=new l,h=new l,f=new l,d=new l,p=new l,m=e+1;for(r=0;r<=n;r++){var v=r/n;for(i=0;i<=e;i++){var g=i/e;h=t(g,v,h),a.push(h.x,h.y,h.z),g-1e-5>=0?(f=t(g-1e-5,v,f),d.subVectors(h,f)):(f=t(g+1e-5,v,f),d.subVectors(f,h)),v-1e-5>=0?(f=t(g,v-1e-5,f),p.subVectors(h,f)):(f=t(g,v+1e-5,f),p.subVectors(f,h)),c.crossVectors(d,p).normalize(),s.push(c.x,c.y,c.z),u.push(g,v)}}for(r=0;r<n;r++)for(i=0;i<e;i++){var y=r*m+i,b=r*m+i+1,_=(r+1)*m+i+1,x=(r+1)*m+i;o.push(y,b,x),o.push(b,_,x)}this.setIndex(o),this.addAttribute("position",new Mt(a,3)),this.addAttribute("normal",new Mt(s,3)),this.addAttribute("uv",new Mt(u,2))}function Be(t,e,n,r){Ot.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},this.fromBufferGeometry(new ze(t,e,n,r)),this.mergeVertices()}function ze(t,e,n,r){function o(t,e,n,r){var i,o,a=Math.pow(2,r),u=[];for(i=0;i<=a;i++){u[i]=[];var c=t.clone().lerp(n,i/a),l=e.clone().lerp(n,i/a),h=a-i;for(o=0;o<=h;o++)u[i][o]=0===o&&i===a?c:c.clone().lerp(l,o/h)}for(i=0;i<a;i++)for(o=0;o<2*(a-i)-1;o++){var f=Math.floor(o/2);o%2==0?(s(u[i][f+1]),s(u[i+1][f]),s(u[i][f])):(s(u[i][f+1]),s(u[i+1][f+1]),s(u[i+1][f]))}}function a(){for(var t=0;t<m.length;t+=6){var e=m[t+0],n=m[t+2],r=m[t+4],i=Math.max(e,n,r),o=Math.min(e,n,r);i>.9&&o<.1&&(e<.2&&(m[t+0]+=1),n<.2&&(m[t+2]+=1),r<.2&&(m[t+4]+=1))}}function s(t){p.push(t.x,t.y,t.z)}function u(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function c(){for(var t=new l,e=new l,n=new l,r=new l,o=new i,a=new i,s=new i,u=0,c=0;u<p.length;u+=9,c+=6){t.set(p[u+0],p[u+1],p[u+2]),e.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]),s.set(m[c+4],m[c+5]),r.copy(t).add(e).add(n).divideScalar(3);var d=f(r);h(o,c+0,t,d),h(a,c+2,e,d),h(s,c+4,n,d)}}function h(t,e,n,r){r<0&&1===t.x&&(m[e]=t.x-1),0===n.x&&0===n.z&&(m[e]=r/2/Math.PI+.5)}function f(t){return Math.atan2(t.z,-t.x)}function d(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}Ct.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:r},n=n||1,r=r||0;var p=[],m=[];!function(t){for(var n=new l,r=new l,i=new l,a=0;a<e.length;a+=3)u(e[a+0],n),u(e[a+1],r),u(e[a+2],i),o(n,r,i,t)}(r),function(t){for(var e=new l,n=0;n<p.length;n+=3)e.x=p[n+0],e.y=p[n+1],e.z=p[n+2],e.normalize().multiplyScalar(t),p[n+0]=e.x,p[n+1]=e.y,p[n+2]=e.z}(n),function(){for(var t=new l,e=0;e<p.length;e+=3){t.x=p[e+0],t.y=p[e+1],t.z=p[e+2];var n=f(t)/2/Math.PI+.5,r=d(t)/Math.PI+.5;m.push(n,1-r)}c(),a()}(),this.addAttribute("position",new Mt(p,3)),this.addAttribute("normal",new Mt(p.slice(),3)),this.addAttribute("uv",new Mt(m,2)),this.normalizeNormals()}function Ge(t,e){Ot.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new He(t,e)),this.mergeVertices()}function He(t,e){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];ze.call(this,n,r,t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ve(t,e){Ot.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new We(t,e)),this.mergeVertices()}function We(t,e){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];ze.call(this,n,r,t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Xe(t,e){Ot.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new qe(t,e)),this.mergeVertices()}function qe(t,e){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];ze.call(this,r,i,t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Ye(t,e){Ot.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new Ze(t,e)),this.mergeVertices()}function Ze(t,e){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];ze.call(this,i,o,t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function Je(t,e,n,r,i,o){Ot.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:i},void 0!==o&&console.warn("THREE.TubeGeometry: taper has been removed.");var a=new Qe(t,e,n,r,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals,this.fromBufferGeometry(a),this.mergeVertices()}function Qe(t,e,n,r,o){function a(i){var o=t.getPointAt(i/e),a=c.normals[i],s=c.binormals[i];for(f=0;f<=r;f++){var u=f/r*Math.PI*2,l=Math.sin(u),h=-Math.cos(u);p.x=h*a.x+l*s.x,p.y=h*a.y+l*s.y,p.z=h*a.z+l*s.z,p.normalize(),g.push(p.x,p.y,p.z),d.x=o.x+n*p.x,d.y=o.y+n*p.y,d.z=o.z+n*p.z,v.push(d.x,d.y,d.z)}}function s(){for(f=1;f<=e;f++)for(h=1;h<=r;h++){var t=(r+1)*(f-1)+(h-1),n=(r+1)*f+(h-1),i=(r+1)*f+h,o=(r+1)*(f-1)+h;b.push(t,n,o),b.push(n,i,o)}}function u(){for(h=0;h<=e;h++)for(f=0;f<=r;f++)m.x=h/e,m.y=f/r,y.push(m.x,m.y)}Ct.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:n,radialSegments:r,closed:o},e=e||64,n=n||1,r=r||8,o=o||!1;var c=t.computeFrenetFrames(e,o);this.tangents=c.tangents,this.normals=c.normals,this.binormals=c.binormals;var h,f,d=new l,p=new l,m=new i,v=[],g=[],y=[],b=[];!function(){for(h=0;h<e;h++)a(h);a(!1===o?e:0),u(),s()}(),this.setIndex(b),this.addAttribute("position",new Mt(v,3)),this.addAttribute("normal",new Mt(g,3)),this.addAttribute("uv",new Mt(y,2))}function Ke(t,e,n,r,i,o,a){Ot.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,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 $e(t,e,n,r,i,o)),this.mergeVertices()}function $e(t,e,n,r,i,o){function a(t,e,n,r,i){var o=Math.cos(t),a=Math.sin(t),s=n/e*t,u=Math.cos(s);i.x=r*(2+u)*.5*o,i.y=r*(2+u)*a*.5,i.z=r*Math.sin(s)*.5}Ct.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:n,radialSegments:r,p:i,q:o},t=t||100,e=e||40,n=Math.floor(n)||64,r=Math.floor(r)||8,i=i||2,o=o||3;var s,u,c=[],h=[],f=[],d=[],p=new l,m=new l,v=new l,g=new l,y=new l,b=new l,_=new l;for(s=0;s<=n;++s){var x=s/n*i*Math.PI*2;for(a(x,i,o,t,v),a(x+.01,i,o,t,g),b.subVectors(g,v),_.addVectors(g,v),y.crossVectors(b,_),_.crossVectors(y,b),y.normalize(),_.normalize(),u=0;u<=r;++u){var w=u/r*Math.PI*2,M=-e*Math.cos(w),E=e*Math.sin(w);p.x=v.x+(M*_.x+E*y.x),p.y=v.y+(M*_.y+E*y.y),p.z=v.z+(M*_.z+E*y.z),h.push(p.x,p.y,p.z),m.subVectors(p,v).normalize(),f.push(m.x,m.y,m.z),d.push(s/n),d.push(u/r)}}for(u=1;u<=n;u++)for(s=1;s<=r;s++){var T=(r+1)*(u-1)+(s-1),S=(r+1)*u+(s-1),A=(r+1)*u+s,O=(r+1)*(u-1)+s;c.push(T,S,O),c.push(S,A,O)}this.setIndex(c),this.addAttribute("position",new Mt(h,3)),this.addAttribute("normal",new Mt(f,3)),this.addAttribute("uv",new Mt(d,2))}function tn(t,e,n,r,i){Ot.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},this.fromBufferGeometry(new en(t,e,n,r,i)),this.mergeVertices()}function en(t,e,n,r,i){Ct.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:n,tubularSegments:r,arc:i},t=t||100,e=e||40,n=Math.floor(n)||8,r=Math.floor(r)||6,i=i||2*Math.PI;var o,a,s=[],u=[],c=[],h=[],f=new l,d=new l,p=new l;for(o=0;o<=n;o++)for(a=0;a<=r;a++){var m=a/r*i,v=o/n*Math.PI*2;d.x=(t+e*Math.cos(v))*Math.cos(m),d.y=(t+e*Math.cos(v))*Math.sin(m),d.z=e*Math.sin(v),u.push(d.x,d.y,d.z),f.x=t*Math.cos(m),f.y=t*Math.sin(m),p.subVectors(d,f).normalize(),c.push(p.x,p.y,p.z),h.push(a/r),h.push(o/n)}for(o=1;o<=n;o++)for(a=1;a<=r;a++){var g=(r+1)*o+a-1,y=(r+1)*(o-1)+a-1,b=(r+1)*(o-1)+a,_=(r+1)*o+a;s.push(g,y,_),s.push(y,b,_)}this.setIndex(s),this.addAttribute("position",new Mt(u,3)),this.addAttribute("normal",new Mt(c,3)),this.addAttribute("uv",new Mt(h,2))}function nn(t,e){Ot.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new rn(t,e)),this.mergeVertices()}function rn(t,e){if(void 0===t)return void(t=[]);Ct.call(this),this.type="ExtrudeBufferGeometry",t=Array.isArray(t)?t:[t],this.addShapeList(t,e),this.computeVertexNormals()}function on(t,e){Ot.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new an(t,e)),this.mergeVertices()}function an(t,e){e=e||{};var n=e.font;if(!1===(n&&n.isFont))return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Ot;var r=n.generateShapes(t,e.size,e.curveSegments);e.amount=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),rn.call(this,r,e),this.type="TextBufferGeometry"}function sn(t,e,n,r,i,o,a){Ot.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},this.fromBufferGeometry(new un(t,e,n,r,i,o,a)),this.mergeVertices()}function un(t,e,n,r,i,o,a){Ct.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=t||50,e=Math.max(3,Math.floor(e)||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 s,u,c=o+a,h=0,f=[],d=new l,p=new l,m=[],v=[],g=[],y=[];for(u=0;u<=n;u++){var b=[],_=u/n;for(s=0;s<=e;s++){var x=s/e;d.x=-t*Math.cos(r+x*i)*Math.sin(o+_*a),d.y=t*Math.cos(o+_*a),d.z=t*Math.sin(r+x*i)*Math.sin(o+_*a),v.push(d.x,d.y,d.z),p.set(d.x,d.y,d.z).normalize(),g.push(p.x,p.y,p.z),y.push(x,1-_),b.push(h++)}f.push(b)}for(u=0;u<n;u++)for(s=0;s<e;s++){var w=f[u][s+1],M=f[u][s],E=f[u+1][s],T=f[u+1][s+1];(0!==u||o>0)&&m.push(w,M,T),(u!==n-1||c<Math.PI)&&m.push(M,E,T)}this.setIndex(m),this.addAttribute("position",new Mt(v,3)),this.addAttribute("normal",new Mt(g,3)),this.addAttribute("uv",new Mt(y,2))}function cn(t,e,n,r,i,o){Ot.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:o},this.fromBufferGeometry(new ln(t,e,n,r,i,o)),this.mergeVertices()}function ln(t,e,n,r,o,a){Ct.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:n,phiSegments:r,thetaStart:o,thetaLength:a},t=t||20,e=e||50,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 s,u,c,h=[],f=[],d=[],p=[],m=t,v=(e-t)/r,g=new l,y=new i;for(u=0;u<=r;u++){for(c=0;c<=n;c++)s=o+c/n*a,g.x=m*Math.cos(s),g.y=m*Math.sin(s),f.push(g.x,g.y,g.z),d.push(0,0,1),y.x=(g.x/e+1)/2,y.y=(g.y/e+1)/2,p.push(y.x,y.y);m+=v}for(u=0;u<r;u++){var b=u*(n+1);for(c=0;c<n;c++){s=c+b;var _=s,x=s+n+1,w=s+n+2,M=s+1;h.push(_,x,M),h.push(x,w,M)}}this.setIndex(h),this.addAttribute("position",new Mt(f,3)),this.addAttribute("normal",new Mt(d,3)),this.addAttribute("uv",new Mt(p,2))}function hn(t,e,n,r){Ot.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},this.fromBufferGeometry(new fn(t,e,n,r)),this.mergeVertices()}function fn(t,e,n,r){Ct.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:r},e=Math.floor(e)||12,n=n||0,r=r||2*Math.PI,r=Ms.clamp(r,0,2*Math.PI);var o,a,s,u=[],c=[],h=[],f=1/e,d=new l,p=new i;for(a=0;a<=e;a++){var m=n+a*f*r,v=Math.sin(m),g=Math.cos(m);for(s=0;s<=t.length-1;s++)d.x=t[s].x*v,d.y=t[s].y,d.z=t[s].x*g,c.push(d.x,d.y,d.z),p.x=a/e,p.y=s/(t.length-1),h.push(p.x,p.y)}for(a=0;a<e;a++)for(s=0;s<t.length-1;s++){o=s+a*t.length;var y=o,b=o+t.length,_=o+t.length+1,x=o+1;u.push(y,b,x),u.push(b,_,x)}if(this.setIndex(u),this.addAttribute("position",new Mt(c,3)),this.addAttribute("uv",new Mt(h,2)),this.computeVertexNormals(),r===2*Math.PI){var w=this.attributes.normal.array,M=new l,E=new l,T=new l;for(o=e*t.length*3,a=0,s=0;a<t.length;a++,s+=3)M.x=w[s+0],M.y=w[s+1],M.z=w[s+2],E.x=w[o+s+0],E.y=w[o+s+1],E.z=w[o+s+2],T.addVectors(M,E).normalize(),w[s+0]=w[o+s+0]=T.x,w[s+1]=w[o+s+1]=T.y,w[s+2]=w[o+s+2]=T.z}}function dn(t,e){Ot.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new pn(t,e)),this.mergeVertices()}function pn(t,e){function n(t){var n,s,c,l=i.length/3,h=t.extractPoints(e),f=h.shape,d=h.holes;if(!1===zs.isClockWise(f))for(f=f.reverse(),n=0,s=d.length;n<s;n++)c=d[n],!0===zs.isClockWise(c)&&(d[n]=c.reverse());var p=zs.triangulateShape(f,d);for(n=0,s=d.length;n<s;n++)c=d[n],f=f.concat(c);for(n=0,s=f.length;n<s;n++){var m=f[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 v=p[n],g=v[0]+l,y=v[1]+l,b=v[2]+l;r.push(g,y,b),u+=3}}Ct.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var r=[],i=[],o=[],a=[],s=0,u=0;if(!1===Array.isArray(t))n(t);else for(var c=0;c<t.length;c++)n(t[c]),this.addGroup(s,u,c),s+=u,u=0;this.setIndex(r),this.addAttribute("position",new Mt(i,3)),this.addAttribute("normal",new Mt(o,3)),this.addAttribute("uv",new Mt(a,2))}function mn(t,e){Ct.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var n,r,i,o,a=[],s=Math.cos(Ms.DEG2RAD*e),u=[0,0],c={},l=["a","b","c"];t.isBufferGeometry?(o=new Ot,o.fromBufferGeometry(t)):o=t.clone(),o.mergeVertices(),o.computeFaceNormals();for(var h=o.vertices,f=o.faces,d=0,p=f.length;d<p;d++)for(var m=f[d],v=0;v<3;v++)n=m[l[v]],r=m[l[(v+1)%3]],u[0]=Math.min(n,r),u[1]=Math.max(n,r),i=u[0]+","+u[1],void 0===c[i]?c[i]={index1:u[0],index2:u[1],face1:d,face2:void 0}:c[i].face2=d;for(i in c){var g=c[i];if(void 0===g.face2||f[g.face1].normal.dot(f[g.face2].normal)<=s){var y=h[g.index1];a.push(y.x,y.y,y.z),y=h[g.index2],a.push(y.x,y.y,y.z)}}this.addAttribute("position",new Mt(a,3))}function vn(t,e,n,r,i,o,a,s){Ot.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new gn(t,e,n,r,i,o,a,s)),this.mergeVertices()}function gn(t,e,n,r,o,a,s,u){function c(n){var o,a,c,g=new i,_=new l,x=0,w=!0===n?t:e,M=!0===n?1:-1;for(a=v,o=1;o<=r;o++)d.push(0,y*M,0),p.push(0,M,0),m.push(.5,.5),v++;for(c=v,o=0;o<=r;o++){var E=o/r,T=E*u+s,S=Math.cos(T),A=Math.sin(T);_.x=w*A,_.y=y*M,_.z=w*S,d.push(_.x,_.y,_.z),p.push(0,M,0),g.x=.5*S+.5,g.y=.5*A*M+.5,m.push(g.x,g.y),v++}for(o=0;o<r;o++){var O=a+o,C=c+o;!0===n?f.push(C,C+1,O):f.push(C+1,C,O),x+=3}h.addGroup(b,x,!0===n?1:2),b+=x}Ct.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:u};var h=this;t=void 0!==t?t:20,e=void 0!==e?e:20,n=void 0!==n?n:100,r=Math.floor(r)||8,o=Math.floor(o)||1,a=void 0!==a&&a,s=void 0!==s?s:0,u=void 0!==u?u:2*Math.PI;var f=[],d=[],p=[],m=[],v=0,g=[],y=n/2,b=0;!function(){var i,a,c=new l,_=new l,x=0,w=(e-t)/n;for(a=0;a<=o;a++){var M=[],E=a/o,T=E*(e-t)+t;for(i=0;i<=r;i++){var S=i/r,A=S*u+s,O=Math.sin(A),C=Math.cos(A);_.x=T*O,_.y=-E*n+y,_.z=T*C,d.push(_.x,_.y,_.z),c.set(O,w,C).normalize(),p.push(c.x,c.y,c.z),m.push(S,1-E),M.push(v++)}g.push(M)}for(i=0;i<r;i++)for(a=0;a<o;a++){var R=g[a][i],L=g[a+1][i],j=g[a+1][i+1],P=g[a][i+1];f.push(R,L,P),f.push(L,j,P),x+=6}h.addGroup(b,x,0),b+=x}(),!1===a&&(t>0&&c(!0),e>0&&c(!1)),this.setIndex(f),this.addAttribute("position",new Mt(d,3)),this.addAttribute("normal",new Mt(p,3)),this.addAttribute("uv",new Mt(m,2))}function yn(t,e,n,r,i,o,a){vn.call(this,0,t,e,n,r,i,o,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function bn(t,e,n,r,i,o,a){gn.call(this,0,t,e,n,r,i,o,a),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:a}}function _n(t,e,n,r){Ot.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new xn(t,e,n,r)),this.mergeVertices()}function xn(t,e,n,r){Ct.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},t=t||50,e=void 0!==e?Math.max(3,e):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var o,a,s=[],u=[],c=[],h=[],f=new l,d=new i;for(u.push(0,0,0),c.push(0,0,1),h.push(.5,.5),a=0,o=3;a<=e;a++,o+=3){var p=n+a/e*r;f.x=t*Math.cos(p),f.y=t*Math.sin(p),u.push(f.x,f.y,f.z),c.push(0,0,1),d.x=(u[o]/t+1)/2,d.y=(u[o+1]/t+1)/2,h.push(d.x,d.y)}for(o=1;o<=e;o++)s.push(o,o+1,0);this.setIndex(s),this.addAttribute("position",new Mt(u,3)),this.addAttribute("normal",new Mt(c,3)),this.addAttribute("uv",new Mt(h,2))}function wn(t){$.call(this,{uniforms:Ns.merge([Ps.lights,{opacity:{value:1}}]),vertexShader:Is.shadow_vert,fragmentShader:Is.shadow_frag}),this.lights=!0,this.transparent=!0,Object.defineProperties(this,{opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}}}),this.setValues(t)}function Mn(t){$.call(this,t),this.type="RawShaderMaterial"}function En(t){K.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(t)}function Tn(t){En.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function Sn(t){K.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=ea,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(t)}function An(t){Sn.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function On(t){K.call(this,t),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(t)}function Cn(t){K.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=ea,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(t)}function Rn(t){K.call(this),this.type="LineDashedMaterial",this.color=new Y(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.lights=!1,this.setValues(t)}function Ln(t,e,n){var r=this,i=!1,o=0,a=0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){a++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,a),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,a),o===a&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)}}function jn(t){this.manager=void 0!==t?t:Ws}function Pn(t){this.manager=void 0!==t?t:Ws,this._parser=null}function Nn(t){this.manager=void 0!==t?t:Ws,this._parser=null}function In(t){this.manager=void 0!==t?t:Ws}function Un(t){this.manager=void 0!==t?t:Ws}function Dn(t){this.manager=void 0!==t?t:Ws}function kn(t,e){lt.call(this),this.type="Light",this.color=new Y(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function Fn(t,e,n){kn.call(this,t,n),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(lt.DefaultUp),this.updateMatrix(),this.groundColor=new Y(e)}function Bn(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new i(512,512),this.map=null,this.matrix=new h}function zn(){Bn.call(this,new Ut(50,1,.5,500))}function Gn(t,e,n,r,i,o){kn.call(this,t,e),this.type="SpotLight",this.position.copy(lt.DefaultUp),this.updateMatrix(),this.target=new lt,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/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 zn}function Hn(t,e,n,r){kn.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==n?n:0,this.decay=void 0!==r?r:1,this.shadow=new Bn(new Ut(90,1,.5,500))}function Vn(){Bn.call(this,new Dt(-5,5,5,-5,.5,500))}function Wn(t,e){kn.call(this,t,e),this.type="DirectionalLight",this.position.copy(lt.DefaultUp),this.updateMatrix(),this.target=new lt,this.shadow=new Vn}function Xn(t,e){kn.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function qn(t,e,n,r){kn.call(this,t,e),this.type="RectAreaLight",this.position.set(0,1,0),this.updateMatrix(),this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}function Yn(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n}function Zn(t,e,n,r){Yn.call(this,t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Jn(t,e,n,r){Yn.call(this,t,e,n,r)}function Qn(t,e,n,r){Yn.call(this,t,e,n,r)}function Kn(t,e,n,r){if(void 0===t)throw new Error("track name is undefined");if(void 0===e||0===e.length)throw new Error("no keyframes in track named "+t);this.name=t,this.times=Xs.convertArray(e,this.TimeBufferType),this.values=Xs.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation),this.validate(),this.optimize()}function $n(t,e,n,r){Kn.call(this,t,e,n,r)}function tr(t,e,n,r){Yn.call(this,t,e,n,r)}function er(t,e,n,r){Kn.call(this,t,e,n,r)}function nr(t,e,n,r){Kn.call(this,t,e,n,r)}function rr(t,e,n,r){Kn.call(this,t,e,n,r)}function ir(t,e,n){Kn.call(this,t,e,n)}function or(t,e,n,r){Kn.call(this,t,e,n,r)}function ar(t,e,n,r){Kn.apply(this,arguments)}function sr(t,e,n){this.name=t,this.tracks=n,this.duration=void 0!==e?e:-1,this.uuid=Ms.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function ur(t){this.manager=void 0!==t?t:Ws,this.textures={}}function cr(t){this.manager=void 0!==t?t:Ws}function lr(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}}function hr(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:Ws,this.withCredentials=!1}function fr(t){this.manager=void 0!==t?t:Ws,this.texturePath=""}function dr(t,e,n,r,i){var o=.5*(r-e),a=.5*(i-n),s=t*t;return(2*n-2*r+o+a)*(t*s)+(-3*n+3*r-2*o-a)*s+o*t+n}function pr(t,e){var n=1-t;return n*n*e}function mr(t,e){return 2*(1-t)*t*e}function vr(t,e){return t*t*e}function gr(t,e,n,r){return pr(t,e)+mr(t,n)+vr(t,r)}function yr(t,e){var n=1-t;return n*n*n*e}function br(t,e){var n=1-t;return 3*n*n*t*e}function _r(t,e){return 3*(1-t)*t*t*e}function xr(t,e){return t*t*t*e}function wr(t,e,n,r,i){return yr(t,e)+br(t,n)+_r(t,r)+xr(t,i)}function Mr(){this.arcLengthDivisions=200}function Er(t,e){Mr.call(this),this.v1=t,this.v2=e}function Tr(){Mr.call(this),this.curves=[],this.autoClose=!1}function Sr(t,e,n,r,i,o,a,s){Mr.call(this),this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s||0}function Ar(t){Mr.call(this),this.points=void 0===t?[]:t}function Or(t,e,n,r){Mr.call(this),this.v0=t,this.v1=e,this.v2=n,this.v3=r}function Cr(t,e,n){Mr.call(this),this.v0=t,this.v1=e,this.v2=n}function Rr(t){Tr.call(this),this.currentPoint=new i,t&&this.fromPoints(t)}function Lr(){Rr.apply(this,arguments),this.holes=[]}function jr(){this.subPaths=[],this.currentPath=null}function Pr(t){this.data=t}function Nr(t){this.manager=void 0!==t?t:Ws}function Ir(t){this.manager=void 0!==t?t:Ws}function Ur(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ut,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ut,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Dr(t,e,n){lt.call(this),this.type="CubeCamera";var r=new Ut(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new l(1,0,0)),this.add(r);var i=new Ut(90,1,t,e);i.up.set(0,-1,0),i.lookAt(new l(-1,0,0)),this.add(i);var o=new Ut(90,1,t,e);o.up.set(0,0,1),o.lookAt(new l(0,1,0)),this.add(o);var a=new Ut(90,1,t,e);a.up.set(0,0,-1),a.lookAt(new l(0,-1,0)),this.add(a);var s=new Ut(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new l(0,0,1)),this.add(s);var c=new Ut(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new l(0,0,-1)),this.add(c);var h={format:Fa,magFilter:Ma,minFilter:Ma};this.renderTarget=new u(n,n,h),this.renderTarget.texture.name="CubeCamera",this.updateCubeMap=function(t,e){null===this.parent&&this.updateMatrixWorld();var n=this.renderTarget,u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,n.activeCubeFace=0,t.render(e,r,n),n.activeCubeFace=1,t.render(e,i,n),n.activeCubeFace=2,t.render(e,o,n),n.activeCubeFace=3,t.render(e,a,n),n.activeCubeFace=4,t.render(e,s,n),n.texture.generateMipmaps=u,n.activeCubeFace=5,t.render(e,c,n),t.setRenderTarget(null)}}function kr(t){Ut.call(this),this.enabled=!1,this.cameras=t||[]}function Fr(){lt.call(this),this.type="AudioListener",this.context=tu.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function Br(t){lt.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function zr(t){Br.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Gr(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function Hr(t,e,n){this.binding=t,this.valueSize=n;var r,i=Float64Array;switch(e){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 Vr(t,e,n){var r=n||Wr.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}function Wr(t,e,n){this.path=e,this.parsedPath=n||Wr.parseTrackName(e),this.node=Wr.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function Xr(t){this.uuid=Ms.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var n=0,r=arguments.length;n!==r;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var i=this;this.stats={objects:{get total(){return i._objects.length},get inUse(){return this.total-i.nCachedObjects_}},get bindingsPerObject(){return i._bindings.length}}}function qr(t,e,n){this._mixer=t,this._clip=e,this._localRoot=n||null;for(var r=e.tracks,i=r.length,o=new Array(i),a={endingStart:ss,endingEnd:ss},s=0;s!==i;++s){var u=r[s].createInterpolant(null);o[s]=u,u.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=ns,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 Yr(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Zr(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function Jr(){Ct.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Qr(t,e,n,r){this.uuid=Ms.generateUUID(),this.data=t,this.itemSize=e,this.offset=n,this.normalized=!0===r}function Kr(t,e){this.uuid=Ms.generateUUID(),this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function $r(t,e,n){Kr.call(this,t,e),this.meshPerAttribute=n||1}function ti(t,e,n){mt.call(this,t,e),this.meshPerAttribute=n||1}function ei(t,e,n,r){this.ray=new st(t,e),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 ni(t,e){return t.distance-e.distance}function ri(t,e,n,r){if(!1!==t.visible&&(t.raycast(e,n),!0===r))for(var i=t.children,o=0,a=i.length;o<a;o++)ri(i[o],e,n,!0)}function ii(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}function oi(t,e,n){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==n?n:0,this}function ai(t,e,n){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==n?n:0,this}function si(t,e){Rt.call(this,t,e),this.animationsMap={},this.animationsList=[];var n=this.geometry.morphTargets.length,r=n-1,i=n/1;this.createAnimation("__default",0,r,i),this.setAnimationWeight("__default",1)}function ui(t){lt.call(this),this.material=t,this.render=function(t){}}function ci(t,e,n,r){this.object=t,this.size=void 0!==e?e: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 u=new Ct,c=new Mt(2*a*3,3);u.addAttribute("position",c),Oe.call(this,u,new Se({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function li(t){lt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1;for(var e=new Ct,n=[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],r=0,i=1;r<32;r++,i++){var o=r/32*Math.PI*2,a=i/32*Math.PI*2;n.push(Math.cos(o),Math.sin(o),1,Math.cos(a),Math.sin(a),1)}e.addAttribute("position",new Mt(n,3));var s=new Se({fog:!1});this.cone=new Oe(e,s),this.add(this.cone),this.update()}function hi(t){this.bones=this.getBoneList(t);for(var e=new Ct,n=[],r=[],i=new Y(0,0,1),o=new Y(0,1,0),a=0;a<this.bones.length;a++){var s=this.bones[a];s.parent&&s.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(i.r,i.g,i.b),r.push(o.r,o.g,o.b))}e.addAttribute("position",new Mt(n,3)),e.addAttribute("color",new Mt(r,3));var u=new Se({vertexColors:Eo,depthTest:!1,depthWrite:!1,transparent:!0});Oe.call(this,e,u),this.root=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function fi(t,e){this.light=t,this.light.updateMatrixWorld();var n=new un(e,4,2),r=new pt({wireframe:!0,fog:!1});r.color.copy(this.light.color),Rt.call(this,n,r),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1}function di(t){lt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1;var e=new Se({color:t.color}),n=new Ct;n.addAttribute("position",new mt(new Float32Array(15),3)),this.add(new Ae(n,e)),this.update()}function pi(t,e){lt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1;var n=new We(e);n.rotateY(.5*Math.PI);var r=new pt({vertexColors:Eo,wireframe:!0}),i=n.getAttribute("position"),o=new Float32Array(3*i.count);n.addAttribute("color",new mt(o,3)),this.add(new Rt(n,r)),this.update()}function mi(t,e,n,r){t=t||10,e=e||10,n=new Y(void 0!==n?n:4473924),r=new Y(void 0!==r?r:8947848);for(var i=e/2,o=t/e,a=t/2,s=[],u=[],c=0,l=0,h=-a;c<=e;c++,h+=o){s.push(-a,0,h,a,0,h),s.push(h,0,-a,h,0,a);var f=c===i?n:r;f.toArray(u,l),l+=3,f.toArray(u,l),l+=3,f.toArray(u,l),l+=3,f.toArray(u,l),l+=3}var d=new Ct;d.addAttribute("position",new Mt(s,3)),d.addAttribute("color",new Mt(u,3));var p=new Se({vertexColors:Eo});Oe.call(this,d,p)}function vi(t,e,n,r,i,o){t=t||10,e=e||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,u,c,l,h,f,d=[],p=[];for(c=0;c<=e;c++)u=c/e*(2*Math.PI),a=Math.sin(u)*t,s=Math.cos(u)*t,d.push(0,0,0),d.push(a,0,s),f=1&c?i:o,p.push(f.r,f.g,f.b),p.push(f.r,f.g,f.b);for(c=0;c<=n;c++)for(f=1&c?i:o,h=t-t/n*c,l=0;l<r;l++)u=l/r*(2*Math.PI),a=Math.sin(u)*h,s=Math.cos(u)*h,d.push(a,0,s),p.push(f.r,f.g,f.b),u=(l+1)/r*(2*Math.PI),a=Math.sin(u)*h,s=Math.cos(u)*h,d.push(a,0,s),p.push(f.r,f.g,f.b);var m=new Ct;m.addAttribute("position",new Mt(d,3)),m.addAttribute("color",new Mt(p,3));var v=new Se({vertexColors:Eo});Oe.call(this,m,v)}function gi(t,e,n,r){this.object=t,this.size=void 0!==e?e: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 u=new Ct,c=new Mt(2*a*3,3);u.addAttribute("position",c),Oe.call(this,u,new Se({color:i,linewidth:o})),this.matrixAutoUpdate=!1,this.update()}function yi(t,e){lt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,void 0===e&&(e=1);var n=new Ct;n.addAttribute("position",new Mt([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var r=new Se({fog:!1});this.add(new Ae(n,r)),n=new Ct,n.addAttribute("position",new Mt([0,0,0,0,0,1],3)),this.add(new Ae(n,r)),this.update()}function bi(t){function e(t,e,r){n(t,r),n(e,r)}function n(t,e){o.push(0,0,0),a.push(e.r,e.g,e.b),void 0===s[t]&&(s[t]=[]),s[t].push(o.length/3-1)}var r=new Ct,i=new Se({color:16777215,vertexColors:Mo}),o=[],a=[],s={},u=new Y(16755200),c=new Y(16711680),l=new Y(43775),h=new Y(16777215),f=new Y(3355443);e("n1","n2",u),e("n2","n4",u),e("n4","n3",u),e("n3","n1",u),e("f1","f2",u),e("f2","f4",u),e("f4","f3",u),e("f3","f1",u),e("n1","f1",u),e("n2","f2",u),e("n3","f3",u),e("n4","f4",u),e("p","n1",c),e("p","n2",c),e("p","n3",c),e("p","n4",c),e("u1","u2",l),e("u2","u3",l),e("u3","u1",l),e("c","t",h),e("p","c",f),e("cn1","cn2",f),e("cn3","cn4",f),e("cf1","cf2",f),e("cf3","cf4",f),r.addAttribute("position",new Mt(o,3)),r.addAttribute("color",new Mt(a,3)),Oe.call(this,r,i),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}function _i(t,e){this.object=t,void 0===e&&(e=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 Ct;i.setIndex(new mt(n,1)),i.addAttribute("position",new mt(r,3)),Oe.call(this,i,new Se({color:e})),this.matrixAutoUpdate=!1,this.update()}function xi(t,e,n,r,i,o){lt.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===eu&&(eu=new Ct,eu.addAttribute("position",new Mt([0,0,0,0,1,0],3)),nu=new gn(0,.5,1,5,1),nu.translate(0,-.5,0)),this.position.copy(e),this.line=new Ae(eu,new Se({color:r})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Rt(nu,new pt({color:r})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,i,o)}function wi(t){t=t||1;var e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new Ct;r.addAttribute("position",new Mt(e,3)),r.addAttribute("color",new Mt(n,3));var i=new Se({vertexColors:Eo});Oe.call(this,r,i)}function Mi(){function t(t,o,a,s){e=t,n=a,r=-3*t+3*o-2*a-s,i=2*t-2*o+a+s}var e=0,n=0,r=0,i=0;return{initCatmullRom:function(e,n,r,i,o){t(n,r,o*(r-e),o*(i-n))},initNonuniformCatmullRom:function(e,n,r,i,o,a,s){var u=(n-e)/o-(r-e)/(o+a)+(r-n)/a,c=(r-n)/a-(i-n)/(a+s)+(i-r)/s;u*=a,c*=a,t(n,r,u,c)},calc:function(t){var o=t*t;return e+n*t+r*o+i*(o*t)}}}function Ei(t){Mr.call(this),this.points=t||[],this.closed=!1}function Ti(t,e,n,r){Mr.call(this),this.v0=t,this.v1=e,this.v2=n,this.v3=r}function Si(t,e,n){Mr.call(this),this.v0=t,this.v1=e,this.v2=n}function Ai(t,e){Mr.call(this),this.v1=t,this.v2=e}function Oi(t,e,n,r,i,o){Sr.call(this,t,e,n,n,r,i,o)}function Ci(t,e,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new dt(t,e,n,i,o,a)}function Ri(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t}function Li(t){return void 0===t&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t}function ji(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Le(t,e)}function Pi(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new xe(t)}function Ni(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Le(t,e)}function Ii(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Re(t)}function Ui(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Re(t)}function Di(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Re(t)}function ki(t,e,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new l(t,e,n)}function Fi(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new mt(t,e).setDynamic(!0)}function Bi(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new vt(t,e)}function zi(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new gt(t,e)}function Gi(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new yt(t,e)}function Hi(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new bt(t,e)}function Vi(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new _t(t,e)}function Wi(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new xt(t,e)}function Xi(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new wt(t,e)}function qi(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Mt(t,e)}function Yi(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Et(t,e)}function Zi(t){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom",this.closed=!0}function Ji(t){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}function Qi(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ei.call(this,t),this.type="catmullrom"}function Ki(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new _i(t,e)}function $i(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Oe(new mn(t.geometry),new Se({color:void 0!==e?e:16777215}))}function to(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Oe(new De(t.geometry),new Se({color:void 0!==e?e:16777215}))}function eo(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new jn(t)}function no(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Nn(t)}function ro(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}}function io(){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(){}}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"WebGLRenderTargetCube",function(){return u}),n.d(e,"WebGLRenderTarget",function(){return s}),n.d(e,"WebGLRenderer",function(){return me}),n.d(e,"ShaderLib",function(){return Us}),n.d(e,"UniformsLib",function(){return Ps}),n.d(e,"UniformsUtils",function(){return Ns}),n.d(e,"ShaderChunk",function(){return Is}),n.d(e,"FogExp2",function(){return ve}),n.d(e,"Fog",function(){return ge}),n.d(e,"Scene",function(){return ye}),n.d(e,"LensFlare",function(){return be}),n.d(e,"Sprite",function(){return xe}),n.d(e,"LOD",function(){return we}),n.d(e,"SkinnedMesh",function(){return Te}),n.d(e,"Skeleton",function(){return Me}),n.d(e,"Bone",function(){return Ee}),n.d(e,"Mesh",function(){return Rt}),n.d(e,"LineSegments",function(){return Oe}),n.d(e,"LineLoop",function(){return Ce}),n.d(e,"Line",function(){return Ae}),n.d(e,"Points",function(){return Le}),n.d(e,"Group",function(){return je}),n.d(e,"VideoTexture",function(){return Pe}),n.d(e,"DataTexture",function(){return f}),n.d(e,"CompressedTexture",function(){return Ne}),n.d(e,"CubeTexture",function(){return d}),n.d(e,"CanvasTexture",function(){return Ie}),n.d(e,"DepthTexture",function(){return Ue}),n.d(e,"Texture",function(){return o}),n.d(e,"CompressedTextureLoader",function(){return Pn}),n.d(e,"DataTextureLoader",function(){return Nn}),n.d(e,"CubeTextureLoader",function(){return Un}),n.d(e,"TextureLoader",function(){return Dn}),n.d(e,"ObjectLoader",function(){return fr}),n.d(e,"MaterialLoader",function(){return ur}),n.d(e,"BufferGeometryLoader",function(){return cr}),n.d(e,"DefaultLoadingManager",function(){return Ws}),n.d(e,"LoadingManager",function(){return Ln}),n.d(e,"JSONLoader",function(){return hr}),n.d(e,"ImageLoader",function(){return In}),n.d(e,"FontLoader",function(){return Nr}),n.d(e,"FileLoader",function(){return jn}),n.d(e,"Loader",function(){return lr}),n.d(e,"Cache",function(){return Vs}),n.d(e,"AudioLoader",function(){return Ir}),n.d(e,"SpotLightShadow",function(){return zn}),n.d(e,"SpotLight",function(){return Gn}),n.d(e,"PointLight",function(){return Hn}),n.d(e,"RectAreaLight",function(){return qn}),n.d(e,"HemisphereLight",function(){return Fn}),n.d(e,"DirectionalLightShadow",function(){return Vn}),n.d(e,"DirectionalLight",function(){return Wn}),n.d(e,"AmbientLight",function(){return Xn}),n.d(e,"LightShadow",function(){return Bn}),n.d(e,"Light",function(){return kn}),n.d(e,"StereoCamera",function(){return Ur}),n.d(e,"PerspectiveCamera",function(){return Ut}),n.d(e,"OrthographicCamera",function(){return Dt}),n.d(e,"CubeCamera",function(){return Dr}),n.d(e,"ArrayCamera",function(){return kr}),n.d(e,"Camera",function(){return It}),n.d(e,"AudioListener",function(){return Fr}),n.d(e,"PositionalAudio",function(){return zr}),n.d(e,"AudioContext",function(){return tu}),n.d(e,"AudioAnalyser",function(){return Gr}),n.d(e,"Audio",function(){return Br}),n.d(e,"VectorKeyframeTrack",function(){return $n}),n.d(e,"StringKeyframeTrack",function(){return rr}),n.d(e,"QuaternionKeyframeTrack",function(){return er}),n.d(e,"NumberKeyframeTrack",function(){return nr}),n.d(e,"ColorKeyframeTrack",function(){return or}),n.d(e,"BooleanKeyframeTrack",function(){return ir}),n.d(e,"PropertyMixer",function(){return Hr}),n.d(e,"PropertyBinding",function(){return Wr}),n.d(e,"KeyframeTrack",function(){return ar}),n.d(e,"AnimationUtils",function(){return Xs}),n.d(e,"AnimationObjectGroup",function(){return Xr}),n.d(e,"AnimationMixer",function(){return Yr}),n.d(e,"AnimationClip",function(){return sr}),n.d(e,"Uniform",function(){return Zr}),n.d(e,"InstancedBufferGeometry",function(){return Jr}),n.d(e,"BufferGeometry",function(){return Ct}),n.d(e,"GeometryIdCount",function(){return At}),n.d(e,"Geometry",function(){return Ot}),n.d(e,"InterleavedBufferAttribute",function(){return Qr}),n.d(e,"InstancedInterleavedBuffer",function(){return $r}),n.d(e,"InterleavedBuffer",function(){return Kr}),n.d(e,"InstancedBufferAttribute",function(){return ti}),n.d(e,"Face3",function(){return dt}),n.d(e,"Object3D",function(){return lt}),n.d(e,"Raycaster",function(){return ei}),n.d(e,"Layers",function(){return ct}),n.d(e,"EventDispatcher",function(){return r}),n.d(e,"Clock",function(){return ii}),n.d(e,"QuaternionLinearInterpolant",function(){return tr}),n.d(e,"LinearInterpolant",function(){return Jn}),n.d(e,"DiscreteInterpolant",function(){return Qn}),n.d(e,"CubicInterpolant",function(){return Zn}),n.d(e,"Interpolant",function(){return Yn}),n.d(e,"Triangle",function(){return ft}),n.d(e,"Math",function(){return Ms}),n.d(e,"Spherical",function(){return oi}),n.d(e,"Cylindrical",function(){return ai}),n.d(e,"Plane",function(){return it}),n.d(e,"Frustum",function(){return ot}),n.d(e,"Sphere",function(){return nt}),n.d(e,"Ray",function(){return st}),n.d(e,"Matrix4",function(){return h}),n.d(e,"Matrix3",function(){return rt}),n.d(e,"Box3",function(){return et}),n.d(e,"Box2",function(){return Z}),n.d(e,"Line3",function(){return ht}),n.d(e,"Euler",function(){return ut}),n.d(e,"Vector4",function(){return a}),n.d(e,"Vector3",function(){return l}),n.d(e,"Vector2",function(){return i}),n.d(e,"Quaternion",function(){return c}),n.d(e,"Color",function(){return Y}),n.d(e,"MorphBlendMesh",function(){return si}),n.d(e,"ImmediateRenderObject",function(){return ui}),n.d(e,"VertexNormalsHelper",function(){return ci}),n.d(e,"SpotLightHelper",function(){return li}),n.d(e,"SkeletonHelper",function(){return hi}),n.d(e,"PointLightHelper",function(){return fi}),n.d(e,"RectAreaLightHelper",function(){return di}),n.d(e,"HemisphereLightHelper",function(){return pi}),n.d(e,"GridHelper",function(){return mi}),n.d(e,"PolarGridHelper",function(){return vi}),n.d(e,"FaceNormalsHelper",function(){return gi}),n.d(e,"DirectionalLightHelper",function(){return yi}),n.d(e,"CameraHelper",function(){return bi}),n.d(e,"BoxHelper",function(){return _i}),n.d(e,"ArrowHelper",function(){return xi}),n.d(e,"AxisHelper",function(){return wi}),n.d(e,"CatmullRomCurve3",function(){return Ei}),n.d(e,"CubicBezierCurve3",function(){return Ti}),n.d(e,"QuadraticBezierCurve3",function(){return Si}),n.d(e,"LineCurve3",function(){return Ai}),n.d(e,"ArcCurve",function(){return Oi}),n.d(e,"EllipseCurve",function(){return Sr}),n.d(e,"SplineCurve",function(){return Ar}),n.d(e,"CubicBezierCurve",function(){return Or}),n.d(e,"QuadraticBezierCurve",function(){return Cr}),n.d(e,"LineCurve",function(){return Er}),n.d(e,"Shape",function(){return Lr}),n.d(e,"Path",function(){return Rr}),n.d(e,"ShapePath",function(){return jr}),n.d(e,"Font",function(){return Pr}),n.d(e,"CurvePath",function(){return Tr}),n.d(e,"Curve",function(){return Mr}),n.d(e,"ShapeUtils",function(){return zs}),n.d(e,"SceneUtils",function(){return su}),n.d(e,"WireframeGeometry",function(){return De}),n.d(e,"ParametricGeometry",function(){return ke}),n.d(e,"ParametricBufferGeometry",function(){return Fe}),n.d(e,"TetrahedronGeometry",function(){return Ge}),n.d(e,"TetrahedronBufferGeometry",function(){return He}),n.d(e,"OctahedronGeometry",function(){return Ve}),n.d(e,"OctahedronBufferGeometry",function(){return We}),n.d(e,"IcosahedronGeometry",function(){return Xe}),n.d(e,"IcosahedronBufferGeometry",function(){return qe}),n.d(e,"DodecahedronGeometry",function(){return Ye}),n.d(e,"DodecahedronBufferGeometry",function(){return Ze}),n.d(e,"PolyhedronGeometry",function(){return Be}),n.d(e,"PolyhedronBufferGeometry",function(){return ze}),n.d(e,"TubeGeometry",function(){return Je}),n.d(e,"TubeBufferGeometry",function(){return Qe}),n.d(e,"TorusKnotGeometry",function(){return Ke}),n.d(e,"TorusKnotBufferGeometry",function(){return $e}),n.d(e,"TorusGeometry",function(){return tn}),n.d(e,"TorusBufferGeometry",function(){return en}),n.d(e,"TextGeometry",function(){return on}),n.d(e,"TextBufferGeometry",function(){return an}),n.d(e,"SphereGeometry",function(){return sn}),n.d(e,"SphereBufferGeometry",function(){return un}),n.d(e,"RingGeometry",function(){return cn}),n.d(e,"RingBufferGeometry",function(){return ln}),n.d(e,"PlaneGeometry",function(){return Pt}),n.d(e,"PlaneBufferGeometry",function(){return Nt}),n.d(e,"LatheGeometry",function(){return hn}),n.d(e,"LatheBufferGeometry",function(){return fn}),n.d(e,"ShapeGeometry",function(){return dn}),n.d(e,"ShapeBufferGeometry",function(){return pn}),n.d(e,"ExtrudeGeometry",function(){return nn}),n.d(e,"ExtrudeBufferGeometry",function(){return rn}),n.d(e,"EdgesGeometry",function(){return mn}),n.d(e,"ConeGeometry",function(){return yn}),n.d(e,"ConeBufferGeometry",function(){return bn}),n.d(e,"CylinderGeometry",function(){return vn}),n.d(e,"CylinderBufferGeometry",function(){return gn}),n.d(e,"CircleGeometry",function(){return _n}),n.d(e,"CircleBufferGeometry",function(){return xn}),n.d(e,"BoxGeometry",function(){return Lt}),n.d(e,"BoxBufferGeometry",function(){return jt}),n.d(e,"ShadowMaterial",function(){return wn}),n.d(e,"SpriteMaterial",function(){return _e}),n.d(e,"RawShaderMaterial",function(){return Mn}),n.d(e,"ShaderMaterial",function(){return $}),n.d(e,"PointsMaterial",function(){return Re});n.d(e,"MeshPhysicalMaterial",function(){return Tn}),n.d(e,"MeshStandardMaterial",function(){return En}),n.d(e,"MeshPhongMaterial",function(){return Sn}),n.d(e,"MeshToonMaterial",function(){return An}),n.d(e,"MeshNormalMaterial",function(){return On}),n.d(e,"MeshLambertMaterial",function(){return Cn}),n.d(e,"MeshDepthMaterial",function(){return tt}),n.d(e,"MeshBasicMaterial",function(){return pt}),n.d(e,"LineDashedMaterial",function(){return Rn}),n.d(e,"LineBasicMaterial",function(){return Se}),n.d(e,"Material",function(){return K}),n.d(e,"Float64BufferAttribute",function(){return Et}),n.d(e,"Float32BufferAttribute",function(){return Mt}),n.d(e,"Uint32BufferAttribute",function(){return wt}),n.d(e,"Int32BufferAttribute",function(){return xt}),n.d(e,"Uint16BufferAttribute",function(){return _t}),n.d(e,"Int16BufferAttribute",function(){return bt}),n.d(e,"Uint8ClampedBufferAttribute",function(){return yt}),n.d(e,"Uint8BufferAttribute",function(){return gt}),n.d(e,"Int8BufferAttribute",function(){return vt}),n.d(e,"BufferAttribute",function(){return mt}),n.d(e,"REVISION",function(){return oo}),n.d(e,"MOUSE",function(){return ao}),n.d(e,"CullFaceNone",function(){return so}),n.d(e,"CullFaceBack",function(){return uo}),n.d(e,"CullFaceFront",function(){return co}),n.d(e,"CullFaceFrontBack",function(){return lo}),n.d(e,"FrontFaceDirectionCW",function(){return ho}),n.d(e,"FrontFaceDirectionCCW",function(){return fo}),n.d(e,"BasicShadowMap",function(){return po}),n.d(e,"PCFShadowMap",function(){return mo}),n.d(e,"PCFSoftShadowMap",function(){return vo}),n.d(e,"FrontSide",function(){return go}),n.d(e,"BackSide",function(){return yo}),n.d(e,"DoubleSide",function(){return bo}),n.d(e,"FlatShading",function(){return _o}),n.d(e,"SmoothShading",function(){return xo}),n.d(e,"NoColors",function(){return wo}),n.d(e,"FaceColors",function(){return Mo}),n.d(e,"VertexColors",function(){return Eo}),n.d(e,"NoBlending",function(){return To}),n.d(e,"NormalBlending",function(){return So}),n.d(e,"AdditiveBlending",function(){return Ao}),n.d(e,"SubtractiveBlending",function(){return Oo}),n.d(e,"MultiplyBlending",function(){return Co}),n.d(e,"CustomBlending",function(){return Ro}),n.d(e,"AddEquation",function(){return Lo}),n.d(e,"SubtractEquation",function(){return jo}),n.d(e,"ReverseSubtractEquation",function(){return Po}),n.d(e,"MinEquation",function(){return No}),n.d(e,"MaxEquation",function(){return Io}),n.d(e,"ZeroFactor",function(){return Uo}),n.d(e,"OneFactor",function(){return Do}),n.d(e,"SrcColorFactor",function(){return ko}),n.d(e,"OneMinusSrcColorFactor",function(){return Fo}),n.d(e,"SrcAlphaFactor",function(){return Bo}),n.d(e,"OneMinusSrcAlphaFactor",function(){return zo}),n.d(e,"DstAlphaFactor",function(){return Go}),n.d(e,"OneMinusDstAlphaFactor",function(){return Ho}),n.d(e,"DstColorFactor",function(){return Vo}),n.d(e,"OneMinusDstColorFactor",function(){return Wo}),n.d(e,"SrcAlphaSaturateFactor",function(){return Xo}),n.d(e,"NeverDepth",function(){return qo}),n.d(e,"AlwaysDepth",function(){return Yo}),n.d(e,"LessDepth",function(){return Zo}),n.d(e,"LessEqualDepth",function(){return Jo}),n.d(e,"EqualDepth",function(){return Qo}),n.d(e,"GreaterEqualDepth",function(){return Ko}),n.d(e,"GreaterDepth",function(){return $o}),n.d(e,"NotEqualDepth",function(){return ta}),n.d(e,"MultiplyOperation",function(){return ea}),n.d(e,"MixOperation",function(){return na}),n.d(e,"AddOperation",function(){return ra}),n.d(e,"NoToneMapping",function(){return ia}),n.d(e,"LinearToneMapping",function(){return oa}),n.d(e,"ReinhardToneMapping",function(){return aa}),n.d(e,"Uncharted2ToneMapping",function(){return sa}),n.d(e,"CineonToneMapping",function(){return ua}),n.d(e,"UVMapping",function(){return ca}),n.d(e,"CubeReflectionMapping",function(){return la}),n.d(e,"CubeRefractionMapping",function(){return ha}),n.d(e,"EquirectangularReflectionMapping",function(){return fa}),n.d(e,"EquirectangularRefractionMapping",function(){return da}),n.d(e,"SphericalReflectionMapping",function(){return pa}),n.d(e,"CubeUVReflectionMapping",function(){return ma}),n.d(e,"CubeUVRefractionMapping",function(){return va}),n.d(e,"RepeatWrapping",function(){return ga}),n.d(e,"ClampToEdgeWrapping",function(){return ya}),n.d(e,"MirroredRepeatWrapping",function(){return ba}),n.d(e,"NearestFilter",function(){return _a}),n.d(e,"NearestMipMapNearestFilter",function(){return xa}),n.d(e,"NearestMipMapLinearFilter",function(){return wa}),n.d(e,"LinearFilter",function(){return Ma}),n.d(e,"LinearMipMapNearestFilter",function(){return Ea}),n.d(e,"LinearMipMapLinearFilter",function(){return Ta}),n.d(e,"UnsignedByteType",function(){return Sa}),n.d(e,"ByteType",function(){return Aa}),n.d(e,"ShortType",function(){return Oa}),n.d(e,"UnsignedShortType",function(){return Ca}),n.d(e,"IntType",function(){return Ra}),n.d(e,"UnsignedIntType",function(){return La}),n.d(e,"FloatType",function(){return ja}),n.d(e,"HalfFloatType",function(){return Pa}),n.d(e,"UnsignedShort4444Type",function(){return Na}),n.d(e,"UnsignedShort5551Type",function(){return Ia}),n.d(e,"UnsignedShort565Type",function(){return Ua}),n.d(e,"UnsignedInt248Type",function(){return Da}),n.d(e,"AlphaFormat",function(){return ka}),n.d(e,"RGBFormat",function(){return Fa}),n.d(e,"RGBAFormat",function(){return Ba}),n.d(e,"LuminanceFormat",function(){return za}),n.d(e,"LuminanceAlphaFormat",function(){return Ga}),n.d(e,"RGBEFormat",function(){return Ha}),n.d(e,"DepthFormat",function(){return Va}),n.d(e,"DepthStencilFormat",function(){return Wa}),n.d(e,"RGB_S3TC_DXT1_Format",function(){return Xa}),n.d(e,"RGBA_S3TC_DXT1_Format",function(){return qa}),n.d(e,"RGBA_S3TC_DXT3_Format",function(){return Ya}),n.d(e,"RGBA_S3TC_DXT5_Format",function(){return Za}),n.d(e,"RGB_PVRTC_4BPPV1_Format",function(){return Ja}),n.d(e,"RGB_PVRTC_2BPPV1_Format",function(){return Qa}),n.d(e,"RGBA_PVRTC_4BPPV1_Format",function(){return Ka}),n.d(e,"RGBA_PVRTC_2BPPV1_Format",function(){return $a}),n.d(e,"RGB_ETC1_Format",function(){return ts}),n.d(e,"LoopOnce",function(){return es}),n.d(e,"LoopRepeat",function(){return ns}),n.d(e,"LoopPingPong",function(){return rs}),n.d(e,"InterpolateDiscrete",function(){return is}),n.d(e,"InterpolateLinear",function(){return os}),n.d(e,"InterpolateSmooth",function(){return as}),n.d(e,"ZeroCurvatureEnding",function(){return ss}),n.d(e,"ZeroSlopeEnding",function(){return us}),n.d(e,"WrapAroundEnding",function(){return cs}),n.d(e,"TrianglesDrawMode",function(){return ls}),n.d(e,"TriangleStripDrawMode",function(){return hs}),n.d(e,"TriangleFanDrawMode",function(){return fs}),n.d(e,"LinearEncoding",function(){return ds}),n.d(e,"sRGBEncoding",function(){return ps}),n.d(e,"GammaEncoding",function(){return ms}),n.d(e,"RGBEEncoding",function(){return vs}),n.d(e,"LogLuvEncoding",function(){return gs}),n.d(e,"RGBM7Encoding",function(){return ys}),n.d(e,"RGBM16Encoding",function(){return bs}),n.d(e,"RGBDEncoding",function(){return _s}),n.d(e,"BasicDepthPacking",function(){return xs}),n.d(e,"RGBADepthPacking",function(){return ws}),n.d(e,"CubeGeometry",function(){return Lt}),n.d(e,"Face4",function(){return Ci}),n.d(e,"LineStrip",function(){return uu}),n.d(e,"LinePieces",function(){return cu}),n.d(e,"MeshFaceMaterial",function(){return Ri}),n.d(e,"MultiMaterial",function(){return Li}),n.d(e,"PointCloud",function(){return ji}),n.d(e,"Particle",function(){return Pi}),n.d(e,"ParticleSystem",function(){return Ni}),n.d(e,"PointCloudMaterial",function(){return Ii}),n.d(e,"ParticleBasicMaterial",function(){return Ui}),n.d(e,"ParticleSystemMaterial",function(){return Di}),n.d(e,"Vertex",function(){return ki}),n.d(e,"DynamicBufferAttribute",function(){return Fi}),n.d(e,"Int8Attribute",function(){return Bi}),n.d(e,"Uint8Attribute",function(){return zi}),n.d(e,"Uint8ClampedAttribute",function(){return Gi}),n.d(e,"Int16Attribute",function(){return Hi}),n.d(e,"Uint16Attribute",function(){return Vi}),n.d(e,"Int32Attribute",function(){return Wi}),n.d(e,"Uint32Attribute",function(){return Xi}),n.d(e,"Float32Attribute",function(){return qi}),n.d(e,"Float64Attribute",function(){return Yi}),n.d(e,"ClosedSplineCurve3",function(){return Zi}),n.d(e,"SplineCurve3",function(){return Ji}),n.d(e,"Spline",function(){return Qi}),n.d(e,"BoundingBoxHelper",function(){return Ki}),n.d(e,"EdgesHelper",function(){return $i}),n.d(e,"WireframeHelper",function(){return to}),n.d(e,"XHRLoader",function(){return eo}),n.d(e,"BinaryTextureLoader",function(){return no}),n.d(e,"GeometryUtils",function(){return lu}),n.d(e,"ImageUtils",function(){return hu}),n.d(e,"Projector",function(){return ro}),n.d(e,"CanvasRenderer",function(){return io}),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),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)&&(e[i]=r[i])}return e}}(),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var n=this._listeners,r=n[t];if(void 0!==r){var i=r.indexOf(e);-1!==i&&r.splice(i,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners,n=e[t.type];if(void 0!==n){t.target=this;var r=[],i=0,o=n.length;for(i=0;i<o;i++)r[i]=n[i];for(i=0;i<o;i++)r[i].call(this,t)}}}});var oo="85",ao={LEFT:0,MIDDLE:1,RIGHT:2},so=0,uo=1,co=2,lo=3,ho=0,fo=1,po=0,mo=1,vo=2,go=0,yo=1,bo=2,_o=1,xo=2,wo=0,Mo=1,Eo=2,To=0,So=1,Ao=2,Oo=3,Co=4,Ro=5,Lo=100,jo=101,Po=102,No=103,Io=104,Uo=200,Do=201,ko=202,Fo=203,Bo=204,zo=205,Go=206,Ho=207,Vo=208,Wo=209,Xo=210,qo=0,Yo=1,Zo=2,Jo=3,Qo=4,Ko=5,$o=6,ta=7,ea=0,na=1,ra=2,ia=0,oa=1,aa=2,sa=3,ua=4,ca=300,la=301,ha=302,fa=303,da=304,pa=305,ma=306,va=307,ga=1e3,ya=1001,ba=1002,_a=1003,xa=1004,wa=1005,Ma=1006,Ea=1007,Ta=1008,Sa=1009,Aa=1010,Oa=1011,Ca=1012,Ra=1013,La=1014,ja=1015,Pa=1016,Na=1017,Ia=1018,Ua=1019,Da=1020,ka=1021,Fa=1022,Ba=1023,za=1024,Ga=1025,Ha=Ba,Va=1026,Wa=1027,Xa=2001,qa=2002,Ya=2003,Za=2004,Ja=2100,Qa=2101,Ka=2102,$a=2103,ts=2151,es=2200,ns=2201,rs=2202,is=2300,os=2301,as=2302,ss=2400,us=2401,cs=2402,ls=0,hs=1,fs=2,ds=3e3,ps=3001,ms=3007,vs=3002,gs=3003,ys=3004,bs=3005,_s=3006,xs=3200,ws=3201,Ms={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=new Array(36),r=0;return function(){for(var i=0;i<36;i++)8===i||13===i||18===i||23===i?n[i]="-":14===i?n[i]="4":(r<=2&&(r=33554432+16777216*Math.random()|0),t=15&r,r>>=4,n[i]=e[19===i?3&t|8:t]);return n.join("")}}(),clamp:function(t,e,n){return Math.max(e,Math.min(n,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)},lerp:function(t,e,n){return(1-n)*t+n*e},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*Ms.DEG2RAD},radToDeg:function(t){return t*Ms.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}};Object.defineProperties(i.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(i.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t=new i,e=new i;return function(n,r){return t.set(n,n),e.set(r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.multiplyScalar(Math.max(t,Math.min(e,n))/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(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}});var Es=0;o.DEFAULT_IMAGE=void 0,o.DEFAULT_MAPPING=ca,Object.defineProperty(o.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(o.prototype,r.prototype,{constructor:o,isTexture:!0,clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){if(void 0!==t.textures[this.uuid])return t.textures[this.uuid];var e={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],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var n=this.image;void 0===n.uuid&&(n.uuid=Ms.generateUUID()),void 0===t.images[n.uuid]&&(t.images[n.uuid]={uuid:n.uuid,url:function(t){var e;return void 0!==t.toDataURL?e=t:(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0,t.width,t.height)),e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(n)}),e.image=n.uuid}return t.textures[this.uuid]=e,e},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===ca){if(t.multiply(this.repeat),t.add(this.offset),t.x<0||t.x>1)switch(this.wrapS){case ga:t.x=t.x-Math.floor(t.x);break;case ya:t.x=t.x<0?0:1;break;case ba:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case ga:t.y=t.y-Math.floor(t.y);break;case ya:t.y=t.y<0?0:1;break;case ba:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.assign(a.prototype,{isVector4:!0,set:function(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,n,r,i,o=t.elements,a=o[0],s=o[4],u=o[8],c=o[1],l=o[5],h=o[9],f=o[2],d=o[6],p=o[10];if(Math.abs(s-c)<.01&&Math.abs(u-f)<.01&&Math.abs(h-d)<.01){if(Math.abs(s+c)<.1&&Math.abs(u+f)<.1&&Math.abs(h+d)<.1&&Math.abs(a+l+p-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(a+1)/2,v=(l+1)/2,g=(p+1)/2,y=(s+c)/4,b=(u+f)/4,_=(h+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(m),r=y/n,i=b/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(v),n=y/r,i=_/r):g<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(g),n=b/i,r=_/i),this.set(n,r,i,e),this}var x=Math.sqrt((d-h)*(d-h)+(u-f)*(u-f)+(c-s)*(c-s));return Math.abs(x)<.001&&(x=1),this.x=(d-h)/x,this.y=(u-f)/x,this.z=(c-s)/x,this.w=Math.acos((a+l+p-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t=new a,e=new a;return function(n,r){return t.set(n,n,n,n),e.set(r,r,r,r),this.clamp(t,e)}}(),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(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),Object.assign(s.prototype,r.prototype,{isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),u.prototype=Object.create(s.prototype),u.prototype.constructor=u,u.prototype.isWebGLRenderTargetCube=!0,Object.assign(c,{slerp:function(t,e,n,r){return n.copy(t).slerp(e,r)},slerpFlat:function(t,e,n,r,i,o,a){var s=n[r+0],u=n[r+1],c=n[r+2],l=n[r+3],h=i[o+0],f=i[o+1],d=i[o+2],p=i[o+3];if(l!==p||s!==h||u!==f||c!==d){var m=1-a,v=s*h+u*f+c*d+l*p,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var b=Math.sqrt(y),_=Math.atan2(b,v*g);m=Math.sin(m*_)/b,a=Math.sin(a*_)/b}var x=a*g;if(s=s*m+h*x,u=u*m+f*x,c=c*m+d*x,l=l*m+p*x,m===1-a){var w=1/Math.sqrt(s*s+u*u+c*c+l*l);s*=w,u*=w,c*=w,l*=w}}t[e]=s,t[e+1]=u,t[e+2]=c,t[e+3]=l}}),Object.defineProperties(c.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(c.prototype,{set:function(t,e,n,r){return this._x=t,this._y=e,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(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!1===(t&&t.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=t._x,r=t._y,i=t._z,o=t.order,a=Math.cos,s=Math.sin,u=a(n/2),c=a(r/2),l=a(i/2),h=s(n/2),f=s(r/2),d=s(i/2);return"XYZ"===o?(this._x=h*c*l+u*f*d,this._y=u*f*l-h*c*d,this._z=u*c*d+h*f*l,this._w=u*c*l-h*f*d):"YXZ"===o?(this._x=h*c*l+u*f*d,this._y=u*f*l-h*c*d,this._z=u*c*d-h*f*l,this._w=u*c*l+h*f*d):"ZXY"===o?(this._x=h*c*l-u*f*d,this._y=u*f*l+h*c*d,this._z=u*c*d+h*f*l,this._w=u*c*l-h*f*d):"ZYX"===o?(this._x=h*c*l-u*f*d,this._y=u*f*l+h*c*d,this._z=u*c*d-h*f*l,this._w=u*c*l+h*f*d):"YZX"===o?(this._x=h*c*l+u*f*d,this._y=u*f*l+h*c*d,this._z=u*c*d-h*f*l,this._w=u*c*l-h*f*d):"XZY"===o&&(this._x=h*c*l-u*f*d,this._y=u*f*l-h*c*d,this._z=u*c*d+h*f*l,this._w=u*c*l+h*f*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],u=n[9],c=n[2],l=n[6],h=n[10],f=r+s+h;return f>0?(e=.5/Math.sqrt(f+1),this._w=.25/e,this._x=(l-u)*e,this._y=(o-c)*e,this._z=(a-i)*e):r>s&&r>h?(e=2*Math.sqrt(1+r-s-h),this._w=(l-u)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(o+c)/e):s>h?(e=2*Math.sqrt(1+s-r-h),this._w=(o-c)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(u+l)/e):(e=2*Math.sqrt(1+h-r-s),this._w=(a-i)/e,this._x=(o+c)/e,this._y=(u+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new l;return function(n,r){return void 0===e&&(e=new l),t=n.dot(r)+1,t<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var n=t._x,r=t._y,i=t._z,o=t._w,a=e._x,s=e._y,u=e._z,c=e._w;return this._x=n*c+o*a+r*u-i*s,this._y=r*c+o*s+i*a-n*u,this._z=i*c+o*u+n*s-r*a,this._w=o*c-n*a-r*s-i*u,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var n=this._x,r=this._y,i=this._z,o=this._w,a=o*t._w+n*t._x+r*t._y+i*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),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 u=Math.atan2(s,a),c=Math.sin((1-e)*u)/s,l=Math.sin(e*u)/s;return this._w=o*c+this._w*l,this._x=n*c+this._x*l,this._y=r*c+this._y*l,this._z=i*c+this._z*l,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(l.prototype,{isVector3:!0,set:function(t,e,n){return this.x=t,this.y=e,this.z=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t=new c;return function(e){return!1===(e&&e.isEuler)&&console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(e))}}(),applyAxisAngle:function(){var t=new c;return function(e,n){return this.applyQuaternion(t.setFromAxisAngle(e,n))}}(),applyMatrix3:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this},applyMatrix4:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;this.x=i[0]*e+i[4]*n+i[8]*r+i[12],this.y=i[1]*e+i[5]*n+i[9]*r+i[13],this.z=i[2]*e+i[6]*n+i[10]*r+i[14];var o=i[3]*e+i[7]*n+i[11]*r+i[15];return this.divideScalar(o)},applyQuaternion:function(t){var e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,a=t.z,s=t.w,u=s*e+o*r-a*n,c=s*n+a*e-i*r,l=s*r+i*n-o*e,h=-i*e-o*n-a*r;return this.x=u*s+h*-i+c*-a-l*-o,this.y=c*s+h*-o+l*-i-u*-a,this.z=l*s+h*-a+u*-o-c*-i,this},project:function(){var t=new h;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new h;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new l,e=new l;return function(n,r){return t.set(n,n,n),e.set(r,r,r),this.clamp(t,e)}}(),clampLength:function(t,e){var n=this.length();return this.multiplyScalar(Math.max(t,Math.min(e,n))/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(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,n){return this.subVectors(e,t).multiplyScalar(n).add(t)},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var n=this.x,r=this.y,i=this.z;return this.x=r*t.z-i*t.y,this.y=i*t.x-n*t.z,this.z=n*t.y-r*t.x,this},crossVectors:function(t,e){var n=t.x,r=t.y,i=t.z,o=e.x,a=e.y,s=e.z;return this.x=r*s-i*a,this.y=i*o-n*s,this.z=n*a-r*o,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new l;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new l;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(Ms.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){return this.setFromMatrixColumn(t,3)},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(h.prototype,{isMatrix4:!0,set:function(t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,m){var v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=i,v[5]=o,v[9]=a,v[13]=s,v[2]=u,v[6]=c,v[10]=l,v[14]=h,v[3]=f,v[7]=d,v[11]=p,v[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 h).fromArray(this.elements)},copy:function(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},copyPosition:function(t){var e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this},extractBasis:function(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this},extractRotation:function(){var t=new l;return function(e){var n=this.elements,r=e.elements,i=1/t.setFromMatrixColumn(e,0).length(),o=1/t.setFromMatrixColumn(e,1).length(),a=1/t.setFromMatrixColumn(e,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(t){!1===(t&&t.isEuler)&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),u=Math.sin(r),c=Math.cos(i),l=Math.sin(i);if("XYZ"===t.order){var h=o*c,f=o*l,d=a*c,p=a*l;e[0]=s*c,e[4]=-s*l,e[8]=u,e[1]=f+d*u,e[5]=h-p*u,e[9]=-a*s,e[2]=p-h*u,e[6]=d+f*u,e[10]=o*s}else if("YXZ"===t.order){var m=s*c,v=s*l,g=u*c,y=u*l;e[0]=m+y*a,e[4]=g*a-v,e[8]=o*u,e[1]=o*l,e[5]=o*c,e[9]=-a,e[2]=v*a-g,e[6]=y+m*a,e[10]=o*s}else if("ZXY"===t.order){var m=s*c,v=s*l,g=u*c,y=u*l;e[0]=m-y*a,e[4]=-o*l,e[8]=g+v*a,e[1]=v+g*a,e[5]=o*c,e[9]=y-m*a,e[2]=-o*u,e[6]=a,e[10]=o*s}else if("ZYX"===t.order){var h=o*c,f=o*l,d=a*c,p=a*l;e[0]=s*c,e[4]=d*u-f,e[8]=h*u+p,e[1]=s*l,e[5]=p*u+h,e[9]=f*u-d,e[2]=-u,e[6]=a*s,e[10]=o*s}else if("YZX"===t.order){var b=o*s,_=o*u,x=a*s,w=a*u;e[0]=s*c,e[4]=w-b*l,e[8]=x*l+_,e[1]=l,e[5]=o*c,e[9]=-a*c,e[2]=-u*c,e[6]=_*l+x,e[10]=b-w*l}else if("XZY"===t.order){var b=o*s,_=o*u,x=a*s,w=a*u;e[0]=s*c,e[4]=-l,e[8]=u*c,e[1]=b*l+w,e[5]=o*c,e[9]=_*l-x,e[2]=x*l-_,e[6]=a*c,e[10]=w*l+b}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,n=t._x,r=t._y,i=t._z,o=t._w,a=n+n,s=r+r,u=i+i,c=n*a,l=n*s,h=n*u,f=r*s,d=r*u,p=i*u,m=o*a,v=o*s,g=o*u;return e[0]=1-(f+p),e[4]=l-g,e[8]=h+v,e[1]=l+g,e[5]=1-(c+p),e[9]=d-m,e[2]=h-v,e[6]=d+m,e[10]=1-(c+f),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t=new l,e=new l,n=new l;return function(r,i,o){var a=this.elements;return n.subVectors(r,i),0===n.lengthSq()&&(n.z=1),n.normalize(),t.crossVectors(o,n),0===t.lengthSq()&&(n.z+=1e-4,t.crossVectors(o,n)),t.normalize(),e.crossVectors(n,t),a[0]=t.x,a[4]=e.x,a[8]=n.x,a[1]=t.y,a[5]=e.y,a[9]=n.y,a[2]=t.z,a[6]=e.z,a[10]=n.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[4],s=n[8],u=n[12],c=n[1],l=n[5],h=n[9],f=n[13],d=n[2],p=n[6],m=n[10],v=n[14],g=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],M=r[8],E=r[12],T=r[1],S=r[5],A=r[9],O=r[13],C=r[2],R=r[6],L=r[10],j=r[14],P=r[3],N=r[7],I=r[11],U=r[15];return i[0]=o*x+a*T+s*C+u*P,i[4]=o*w+a*S+s*R+u*N,i[8]=o*M+a*A+s*L+u*I,i[12]=o*E+a*O+s*j+u*U,i[1]=c*x+l*T+h*C+f*P,i[5]=c*w+l*S+h*R+f*N,i[9]=c*M+l*A+h*L+f*I,i[13]=c*E+l*O+h*j+f*U,i[2]=d*x+p*T+m*C+v*P,i[6]=d*w+p*S+m*R+v*N,i[10]=d*M+p*A+m*L+v*I,i[14]=d*E+p*O+m*j+v*U,i[3]=g*x+y*T+b*C+_*P,i[7]=g*w+y*S+b*R+_*N,i[11]=g*M+y*A+b*L+_*I,i[15]=g*E+y*O+b*j+_*U,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new l;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix4(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],a=t[5],s=t[9],u=t[13],c=t[2],l=t[6],h=t[10],f=t[14];return t[3]*(+i*s*l-r*u*l-i*a*h+n*u*h+r*a*f-n*s*f)+t[7]*(+e*s*f-e*u*h+i*o*h-r*o*f+r*u*c-i*s*c)+t[11]*(+e*u*l-e*a*f-i*o*l+n*o*f+i*a*c-n*u*c)+t[15]*(-r*a*c-e*s*l+e*a*h+r*o*l-n*o*h+n*s*c)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var n=this.elements,r=t.elements,i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],c=r[5],l=r[6],h=r[7],f=r[8],d=r[9],p=r[10],m=r[11],v=r[12],g=r[13],y=r[14],b=r[15],_=d*y*h-g*p*h+g*l*m-c*y*m-d*l*b+c*p*b,x=v*p*h-f*y*h-v*l*m+u*y*m+f*l*b-u*p*b,w=f*g*h-v*d*h+v*c*m-u*g*m-f*c*b+u*d*b,M=v*d*l-f*g*l-v*c*p+u*g*p+f*c*y-u*d*y,E=i*_+o*x+a*w+s*M;if(0===E){var T="THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0";if(!0===e)throw new Error(T);return console.warn(T),this.identity()}var S=1/E;return n[0]=_*S,n[1]=(g*p*s-d*y*s-g*a*m+o*y*m+d*a*b-o*p*b)*S,n[2]=(c*y*s-g*l*s+g*a*h-o*y*h-c*a*b+o*l*b)*S,n[3]=(d*l*s-c*p*s-d*a*h+o*p*h+c*a*m-o*l*m)*S,n[4]=x*S,n[5]=(f*y*s-v*p*s+v*a*m-i*y*m-f*a*b+i*p*b)*S,n[6]=(v*l*s-u*y*s-v*a*h+i*y*h+u*a*b-i*l*b)*S,n[7]=(u*p*s-f*l*s+f*a*h-i*p*h-u*a*m+i*l*m)*S,n[8]=w*S,n[9]=(v*d*s-f*g*s-v*o*m+i*g*m+f*o*b-i*d*b)*S,n[10]=(u*g*s-v*c*s+v*o*h-i*g*h-u*o*b+i*c*b)*S,n[11]=(f*c*s-u*d*s-f*o*h+i*d*h+u*o*m-i*c*m)*S,n[12]=M*S,n[13]=(f*g*a-v*d*a+v*o*p-i*g*p-f*o*y+i*d*y)*S,n[14]=(v*c*a-u*g*a-v*o*l+i*g*l+u*o*y-i*c*y)*S,n[15]=(u*d*a-f*c*a+f*o*l-i*d*l-u*o*p+i*c*p)*S,this},scale:function(t){var e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))},makeTranslation:function(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,a=t.y,s=t.z,u=i*o,c=i*a;return this.set(u*o+n,u*a-r*s,u*s+r*a,0,u*a+r*s,c*a+n,c*s-r*o,0,u*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this},makeScale:function(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this},makeShear:function(t,e,n){return this.set(1,e,n,0,t,1,n,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,n){return this.makeRotationFromQuaternion(e),this.scale(n),this.setPosition(t),this},decompose:function(){var t=new l,e=new h;return function(n,r,i){var o=this.elements,a=t.set(o[0],o[1],o[2]).length(),s=t.set(o[4],o[5],o[6]).length(),u=t.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],e.copy(this);var c=1/a,l=1/s,h=1/u;return e.elements[0]*=c,e.elements[1]*=c,e.elements[2]*=c,e.elements[4]*=l,e.elements[5]*=l,e.elements[6]*=l,e.elements[8]*=h,e.elements[9]*=h,e.elements[10]*=h,r.setFromRotationMatrix(e),i.x=a,i.y=s,i.z=u,this}}(),makePerspective:function(t,e,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/(e-t),u=2*i/(n-r),c=(e+t)/(e-t),l=(n+r)/(n-r),h=-(o+i)/(o-i),f=-2*o*i/(o-i);return a[0]=s,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=u,a[9]=l,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=f,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,e,n,r,i,o){var a=this.elements,s=1/(e-t),u=1/(n-r),c=1/(o-i),l=(e+t)*s,h=(n+r)*u,f=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-l,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-f,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<16;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}),f.prototype=Object.create(o.prototype),f.prototype.constructor=f,f.prototype.isDataTexture=!0,d.prototype=Object.create(o.prototype),d.prototype.constructor=d,d.prototype.isCubeTexture=!0,Object.defineProperty(d.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var Ts=new o,Ss=new d,As=[],Os=[],Cs=new Float32Array(16),Rs=new Float32Array(9);V.prototype.setValue=function(t,e){for(var n=this.seq,r=0,i=n.length;r!==i;++r){var o=n[r];o.setValue(t,e[o.id])}};var Ls=/([\w\d_]+)(\])?(\[|\.)?/g;q.prototype.setValue=function(t,e,n){var r=this.map[e];void 0!==r&&r.setValue(t,n,this.renderer)},q.prototype.setOptional=function(t,e,n){var r=e[n];void 0!==r&&this.setValue(t,n,r)},q.upload=function(t,e,n,r){for(var i=0,o=e.length;i!==o;++i){var a=e[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(t,s.value,r)}},q.seqWithValue=function(t,e){for(var n=[],r=0,i=t.length;r!==i;++r){var o=t[r];o.id in e&&n.push(o)}return n};var js={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(Y.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,n){return this.r=t,this.g=e,this.b=n,this},setHSL:function(){function t(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}return function(e,n,r){if(e=Ms.euclideanModulo(e,1),n=Ms.clamp(n,0,1),r=Ms.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=t(o,i,e+1/3),this.g=t(o,i,e),this.b=t(o,i,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){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,e(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,e(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,u=parseInt(r[3],10)/100;return e(r[5]),this.setHSL(a,s,u)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(t)){var c=n[1],l=c.length;if(3===l)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}if(t&&t.length>0){var c=js[t];void 0!==c?this.setHex(c):console.warn("THREE.Color: Unknown color "+t)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this},convertGammaToLinear:function(){var t=this.r,e=this.g,n=this.b;return this.r=t*t,this.g=e*e,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(t){var e,n,r=t||{h:0,s:0,l:0},i=this.r,o=this.g,a=this.b,s=Math.max(i,o,a),u=Math.min(i,o,a),c=(u+s)/2;if(u===s)e=0,n=0;else{var l=s-u;switch(n=c<=.5?l/(s+u):l/(2-s-u),s){case i:e=(o-a)/l+(o<a?6:0);break;case o:e=(a-i)/l+2;break;case a:e=(i-o)/l+4}e/=6}return r.h=e,r.s=n,r.l=c,r},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(t,e,n){var r=this.getHSL();return r.h+=t,r.s+=e,r.l+=n,this.setHSL(r.h,r.s,r.l),this},add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var Ps={common:{diffuse:{value:new Y(15658734)},opacity:{value:1},map:{value:null},offsetRepeat:{value:new a(0,0,1,1)},specularMap:{value:null},alphaMap:{value:null},envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new 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:{}}},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},offsetRepeat:{value:new a(0,0,1,1)}}},Ns={merge:function(t){for(var e={},n=0;n<t.length;n++){var r=this.clone(t[n]);for(var i in r)e[i]=r[i]}return e},clone:function(t){var e={};for(var n in t){e[n]={};for(var r in t[n]){var i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture)?e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}},Is={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 theta = acos( dot( N, V ) );\n\tvec2 uv = vec2(\n\t\tsqrt( saturate( roughness ) ),\n\t\tsaturate( theta / ( 0.5 * PI ) ) );\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.86267 + (0.49788 + 0.01436 * y ) * y;\n\tfloat b = 3.45068 + (4.18814 + y) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt( 1.0 - x * x ) - 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 * transpose( 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\tvec3 result = vec3( LTC_ClippedSphereFormFactor( vectorFormFactor ) );\n\treturn 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 = dFdx( surf_pos );\n\t\tvec3 vSigmaY = dFdy( surf_pos );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t\t\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\t\tvec4 plane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t\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 transpose( const in mat3 v ) {\n\tmat3 tmp;\n\ttmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n\ttmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n\ttmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n\treturn tmp;\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:"#ifdef FLIP_SIDED\n\tobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;\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 += normal * ( 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, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\tsampleUV.y = saturate( flipNormal * reflectVec.y * 0.5 + 0.5 );\n\t\tsampleUV.x = atan( flipNormal * reflectVec.z, flipNormal * reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\tvec3 reflectView = flipNormal * normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#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\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\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\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\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\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:"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};\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 ltcMat;\tuniform sampler2D ltcMag;\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#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 = saturate( reflectVec.y * 0.5 + 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};\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_BlinnPhong( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in BlinnPhongMaterial 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 = BlinnExponentToGGXRoughness( material.specularShininess );\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\tfloat norm = texture2D( ltcMag, uv ).a;\n\t\tvec4 t = texture2D( ltcMat, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( 1, 0, t.y ),\n\t\t\tvec3( 0, t.z, 0 ),\n\t\t\tvec3( t.w, 0, t.x )\n\t\t);\n\t\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), rectCoords );\n\t}\n#endif\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_Direct_RectArea\t\tRE_Direct_RectArea_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\tfloat norm = texture2D( ltcMag, uv ).a;\n\t\tvec4 t = texture2D( ltcMat, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( 1, 0, t.y ),\n\t\t\tvec3( 0, t.z, 0 ),\n\t\t\tvec3( t.w, 0, t.x )\n\t\t);\n\t\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), 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_template:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\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 ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\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\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\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#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\t#ifndef STANDARD\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\n\t#else\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\n\t#endif\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\tgl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\t#endif\n#endif\n",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\tvec4 mapTexel = texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) * offsetRepeat.zw + offsetRepeat.xy );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform vec4 offsetRepeat;\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_flip:"#ifdef DOUBLE_SIDED\n\tfloat flipNormal = ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n#else\n\tfloat flipNormal = 1.0;\n#endif\n",normal_fragment:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal ) * flipNormal;\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 1.0 - 2.0 * rgb.xyz;\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:"#ifdef USE_SKINNING\n\tvec4 mvPosition = modelViewMatrix * skinned;\n#else\n\tvec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n#endif\ngl_Position = projectionMatrix * mvPosition;\n",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\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\treturn (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn 1.0;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\tfloat dp = ( length( lightToPosition ) - shadowBias ) / 1000.0;\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",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\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",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\tskinned = bindMatrixInverse * skinned;\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:"#define saturate(a) clamp( a, 0.0, 1.0 )\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 vec4 offsetRepeat;\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 = uv * offsetRepeat.zw + offsetRepeat.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( PHONG ) || defined( PHYSICAL ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\t#ifdef USE_SKINNING\n\t\tvec4 worldPosition = modelMatrix * skinned;\n\t#else\n\t\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\t#endif\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\n#include <common>\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}\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( 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#include <begin_vertex>\n\t#include <displacementmap_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}\n",distanceRGBA_frag:"uniform vec3 lightPos;\nvarying vec4 vWorldPosition;\n#include <common>\n#include <packing>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tgl_FragColor = packDepthToRGBA( length( vWorldPosition.xyz - lightPos.xyz ) / 1000.0 );\n}\n",distanceRGBA_vert:"varying vec4 vWorldPosition;\n#include <common>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <skinbase_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\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 <normal_flip>\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>\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 <normal_flip>\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>\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>\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_flip>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\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 <displacementmap_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\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>\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 <specularmap_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_flip>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_template>\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 <specularmap_pars_fragment>\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 <displacementmap_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\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_flip>\n\t#include <normal_fragment>\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 <displacementmap_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_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 float opacity;\n#include <common>\n#include <packing>\n#include <bsdfs>\n#include <lights_pars>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( 0.0, 0.0, 0.0, opacity * ( 1.0 - getShadowMask() ) );\n}\n",shadow_vert:"#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}\n"},Us={basic:{uniforms:Ns.merge([Ps.common,Ps.aomap,Ps.lightmap,Ps.fog]),vertexShader:Is.meshbasic_vert,fragmentShader:Is.meshbasic_frag},lambert:{uniforms:Ns.merge([Ps.common,Ps.aomap,Ps.lightmap,Ps.emissivemap,Ps.fog,Ps.lights,{emissive:{value:new Y(0)}}]),vertexShader:Is.meshlambert_vert,fragmentShader:Is.meshlambert_frag},phong:{uniforms:Ns.merge([Ps.common,Ps.aomap,Ps.lightmap,Ps.emissivemap,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,Ps.gradientmap,Ps.fog,Ps.lights,{emissive:{value:new Y(0)},specular:{value:new Y(1118481)},shininess:{value:30}}]),vertexShader:Is.meshphong_vert,fragmentShader:Is.meshphong_frag},standard:{uniforms:Ns.merge([Ps.common,Ps.aomap,Ps.lightmap,Ps.emissivemap,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,Ps.roughnessmap,Ps.metalnessmap,Ps.fog,Ps.lights,{emissive:{value:new Y(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Is.meshphysical_vert,fragmentShader:Is.meshphysical_frag},points:{uniforms:Ns.merge([Ps.points,Ps.fog]),vertexShader:Is.points_vert,fragmentShader:Is.points_frag},dashed:{uniforms:Ns.merge([Ps.common,Ps.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Is.linedashed_vert,fragmentShader:Is.linedashed_frag},depth:{uniforms:Ns.merge([Ps.common,Ps.displacementmap]),vertexShader:Is.depth_vert,fragmentShader:Is.depth_frag},normal:{uniforms:Ns.merge([Ps.common,Ps.bumpmap,Ps.normalmap,Ps.displacementmap,{opacity:{value:1}}]),vertexShader:Is.normal_vert,fragmentShader:Is.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Is.cube_vert,fragmentShader:Is.cube_frag},equirect:{uniforms:{tEquirect:{value:null},tFlip:{value:-1}},vertexShader:Is.equirect_vert,fragmentShader:Is.equirect_frag},distanceRGBA:{uniforms:{lightPos:{value:new l}},vertexShader:Is.distanceRGBA_vert,fragmentShader:Is.distanceRGBA_frag}};Us.physical={uniforms:Ns.merge([Us.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:Is.meshphysical_vert,fragmentShader:Is.meshphysical_frag},Object.assign(Z.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new i;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.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(t){var e=t||new i;return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){var e=t||new i;return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return(e||new i).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return(e||new i).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new i;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}});var Ds=0;Object.assign(K.prototype,r.prototype,{isMaterial:!0,setValues:function(t){if(void 0!==t)for(var e in t){var n=t[e];if(void 0!==n){var r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]="overdraw"===e?Number(n):n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}else console.warn("THREE.Material: '"+e+"' parameter is undefined.")}},toJSON:function(t){function e(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}var n=void 0===t;n&&(t={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()),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(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(t).uuid),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(t).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(t).uuid,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(t).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(t).uuid,r.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(r.size=this.size),void 0!==this.sizeAttenuation&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==So&&(r.blending=this.blending),this.shading!==xo&&(r.shading=this.shading),this.side!==go&&(r.side=this.side),this.vertexColors!==wo&&(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,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),r.skinning=this.skinning,r.morphTargets=this.morphTargets,r.dithering=this.dithering,n){var i=e(t.textures),o=e(t.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(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.shading=t.shading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,n=null;if(null!==e){var r=e.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),$.prototype=Object.create(K.prototype),$.prototype.constructor=$,$.prototype.isShaderMaterial=!0,$.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Ns.clone(t.uniforms),this.defines=t.defines,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},$.prototype.toJSON=function(t){var e=K.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},tt.prototype=Object.create(K.prototype),tt.prototype.constructor=tt,tt.prototype.isMeshDepthMaterial=!0,tt.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},Object.assign(et.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,u=t.length;s<u;s+=3){var c=t[s],l=t[s+1],h=t[s+2];c<e&&(e=c),l<n&&(n=l),h<r&&(r=h),c>i&&(i=c),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromBufferAttribute:function(t){for(var e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0,s=0,u=t.count;s<u;s++){var c=t.getX(s),l=t.getY(s),h=t.getZ(s);c<e&&(e=c),l<n&&(n=l),h<r&&(r=h),c>i&&(i=c),l>o&&(o=l),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(i,o,a),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new l;return function(e,n){var r=t.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(r),this.max.copy(e).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.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(t){var e=t||new l;return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){var e=t||new l;return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){var t=new l;return function(e){var n=this;return e.updateMatrixWorld(!0),e.traverse(function(e){var r,i,o=e.geometry;if(void 0!==o)if(o.isGeometry){var a=o.vertices;for(r=0,i=a.length;r<i;r++)t.copy(a[r]),t.applyMatrix4(e.matrixWorld),n.expandByPoint(t)}else if(o.isBufferGeometry){var s=o.attributes.position;if(void 0!==s)for(r=0,i=s.count;r<i;r++)t.fromBufferAttribute(s,r).applyMatrix4(e.matrixWorld),n.expandByPoint(t)}}),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return(e||new l).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new l;return function(e){return this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=t.constant&&n>=t.constant},clampPoint:function(t,e){return(e||new l).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new l;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new l;return function(e){var n=e||new nt;return this.getCenter(n.center),n.radius=.5*this.getSize(t).length(),n}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new l,new l,new l,new l,new l,new l,new l,new l];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(nt.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new et;return function(e,n){var r=this.center;void 0!==n?r.copy(n):t.setFromPoints(e).getCenter(r);for(var i=0,o=0,a=e.length;o<a;o++)i=Math.max(i,r.distanceToSquared(e[o]));return this.radius=Math.sqrt(i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(this.center.dot(t.normal)-t.constant)<=this.radius},clampPoint:function(t,e){var n=this.center.distanceToSquared(t),r=e||new l;return r.copy(t),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r},getBoundingBox:function(t){var e=t||new et;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(rt.prototype,{isMatrix3:!0,set:function(t,e,n,r,i,o,a,s,u){var c=this.elements;return c[0]=t,c[1]=r,c[2]=a,c[3]=e,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=u,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(t){var e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new l;return function(e){for(var n=0,r=e.count;n<r;n++)t.x=e.getX(n),t.y=e.getY(n),t.z=e.getZ(n),t.applyMatrix3(this),e.setXYZ(n,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.elements,r=e.elements,i=this.elements,o=n[0],a=n[3],s=n[6],u=n[1],c=n[4],l=n[7],h=n[2],f=n[5],d=n[8],p=r[0],m=r[3],v=r[6],g=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=o*p+a*g+s*_,i[3]=o*m+a*y+s*x,i[6]=o*v+a*b+s*w,i[1]=u*p+c*g+l*_,i[4]=u*m+c*y+l*x,i[7]=u*v+c*b+l*w,i[2]=h*p+f*g+d*_,i[5]=h*m+f*y+d*x,i[8]=h*v+f*b+d*w,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],c=t[8];return e*o*c-e*a*u-n*i*c+n*a*s+r*i*u-r*o*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");var n=t.elements,r=this.elements,i=n[0],o=n[1],a=n[2],s=n[3],u=n[4],c=n[5],l=n[6],h=n[7],f=n[8],d=f*u-c*h,p=c*l-f*s,m=h*s-u*l,v=i*d+o*p+a*m;if(0===v){var g="THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0";if(!0===e)throw new Error(g);return console.warn(g),this.identity()}var y=1/v;return r[0]=d*y,r[1]=(a*h-f*o)*y,r[2]=(c*o-a*u)*y,r[3]=p*y,r[4]=(f*i-a*l)*y,r[5]=(a*s-c*i)*y,r[6]=m*y,r[7]=(o*l-h*i)*y,r[8]=(u*i-o*s)*y,this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},equals:function(t){for(var e=this.elements,n=t.elements,r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var n=0;n<9;n++)this.elements[n]=t[n+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}}),Object.assign(it.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new l,e=new l;return function(n,r,i){var o=t.subVectors(i,r).cross(e.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(o,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return this.orthoPoint(t,e).sub(t).negate()},orthoPoint:function(t,e){var n=this.distanceToPoint(t);return(e||new l).copy(this.normal).multiplyScalar(n)},intersectLine:function(){var t=new l;return function(e,n){var r=n||new l,i=e.delta(t),o=this.normal.dot(i);if(0!==o){var a=-(e.start.dot(this.normal)+this.constant)/o;if(!(a<0||a>1))return r.copy(i).multiplyScalar(a).add(e.start)}else if(0===this.distanceToPoint(e.start))return r.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return(t||new l).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new l,e=new rt;return function(n,r){var i=this.coplanarPoint(t).applyMatrix4(n),o=r||e.getNormalMatrix(n),a=this.normal.applyMatrix3(o).normalize();return this.constant=-i.dot(a),this}}(),translate:function(t){return this.constant=this.constant-t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(ot.prototype,{set:function(t,e,n,r,i,o){var a=this.planes;return a[0].copy(t),a[1].copy(e),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(t){for(var e=this.planes,n=0;n<6;n++)e[n].copy(t.planes[n]);return this},setFromMatrix:function(t){var e=this.planes,n=t.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],c=n[6],l=n[7],h=n[8],f=n[9],d=n[10],p=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return e[0].setComponents(a-r,l-s,p-h,y-m).normalize(),e[1].setComponents(a+r,l+s,p+h,y+m).normalize(),e[2].setComponents(a+i,l+u,p+f,y+v).normalize(),e[3].setComponents(a-i,l-u,p-f,y-v).normalize(),e[4].setComponents(a-o,l-c,p-d,y-g).normalize(),e[5].setComponents(a+o,l+c,p+d,y+g).normalize(),this},intersectsObject:function(){var t=new nt;return function(e){var n=e.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),t.copy(n.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSprite:function(){var t=new nt;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,n=t.center,r=-t.radius,i=0;i<6;i++){if(e[i].distanceToPoint(n)<r)return!1}return!0},intersectsBox:function(){var t=new l,e=new l;return function(n){for(var r=this.planes,i=0;i<6;i++){var o=r[i];t.x=o.normal.x>0?n.min.x:n.max.x,e.x=o.normal.x>0?n.max.x:n.min.x,t.y=o.normal.y>0?n.min.y:n.max.y,e.y=o.normal.y>0?n.max.y:n.min.y,t.z=o.normal.z>0?n.min.z:n.max.z,e.z=o.normal.z>0?n.max.z:n.min.z;var a=o.distanceToPoint(t),s=o.distanceToPoint(e);if(a<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}}),Object.assign(st.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return(e||new l).copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new l;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){var n=e||new l;n.subVectors(t,this.origin);var r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.direction).multiplyScalar(r).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new l;return function(e){var n=t.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(n).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new l,e=new l,n=new l;return function(r,i,o,a){t.copy(r).add(i).multiplyScalar(.5),e.copy(i).sub(r).normalize(),n.copy(this.origin).sub(t);var s,u,c,l,h=.5*r.distanceTo(i),f=-this.direction.dot(e),d=n.dot(this.direction),p=-n.dot(e),m=n.lengthSq(),v=Math.abs(1-f*f);if(v>0)if(s=f*p-d,u=f*d-p,l=h*v,s>=0)if(u>=-l)if(u<=l){var g=1/v;s*=g,u*=g,c=s*(s+f*u+2*d)+u*(f*s+u+2*p)+m}else u=h,s=Math.max(0,-(f*u+d)),c=-s*s+u*(u+2*p)+m;else u=-h,s=Math.max(0,-(f*u+d)),c=-s*s+u*(u+2*p)+m;else u<=-l?(s=Math.max(0,-(-f*h+d)),u=s>0?-h:Math.min(Math.max(-h,-p),h),c=-s*s+u*(u+2*p)+m):u<=l?(s=0,u=Math.min(Math.max(-h,-p),h),c=u*(u+2*p)+m):(s=Math.max(0,-(f*h+d)),u=s>0?h:Math.min(Math.max(-h,-p),h),c=-s*s+u*(u+2*p)+m);else u=f>0?-h:h,s=Math.max(0,-(f*u+d)),c=-s*s+u*(u+2*p)+m;return o&&o.copy(this.direction).multiplyScalar(s).add(this.origin),a&&a.copy(e).multiplyScalar(u).add(t),c}}(),intersectSphere:function(){var t=new l;return function(e,n){t.subVectors(e.center,this.origin);var r=t.dot(this.direction),i=t.dot(t)-r*r,o=e.radius*e.radius;if(i>o)return null;var a=Math.sqrt(o-i),s=r-a,u=r+a;return s<0&&u<0?null:s<0?this.at(u,n):this.at(s,n)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null},intersectPlane:function(t,e){var n=this.distanceToPlane(t);return null===n?null:this.at(n,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var n,r,i,o,a,s,u=1/this.direction.x,c=1/this.direction.y,l=1/this.direction.z,h=this.origin;return u>=0?(n=(t.min.x-h.x)*u,r=(t.max.x-h.x)*u):(n=(t.max.x-h.x)*u,r=(t.min.x-h.x)*u),c>=0?(i=(t.min.y-h.y)*c,o=(t.max.y-h.y)*c):(i=(t.max.y-h.y)*c,o=(t.min.y-h.y)*c),n>o||i>r?null:((i>n||n!==n)&&(n=i),(o<r||r!==r)&&(r=o),l>=0?(a=(t.min.z-h.z)*l,s=(t.max.z-h.z)*l):(a=(t.max.z-h.z)*l,s=(t.min.z-h.z)*l),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,e)))},intersectsBox:function(){var t=new l;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new l,e=new l,n=new l,r=new l;return function(i,o,a,s,u){e.subVectors(o,i),n.subVectors(a,i),r.crossVectors(e,n);var c,l=this.direction.dot(r);if(l>0){if(s)return null;c=1}else{if(!(l<0))return null;c=-1,l=-l}t.subVectors(this.origin,i);var h=c*this.direction.dot(n.crossVectors(t,n));if(h<0)return null;var f=c*this.direction.dot(e.cross(t));if(f<0)return null;if(h+f>l)return null;var d=-c*t.dot(r);return d<0?null:this.at(d/l,u)}}(),applyMatrix4:function(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this.direction.normalize(),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),ut.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],ut.DefaultOrder="XYZ",Object.defineProperties(ut.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(ut.prototype,{isEuler:!0,set:function(t,e,n,r){return this._x=t,this._y=e,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(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,n){var r=Ms.clamp,i=t.elements,o=i[0],a=i[4],s=i[8],u=i[1],c=i[5],l=i[9],h=i[2],f=i[6],d=i[10];return e=e||this._order,"XYZ"===e?(this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(f,c),this._z=0)):"YXZ"===e?(this._x=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(u,c)):(this._y=Math.atan2(-h,o),this._z=0)):"ZXY"===e?(this._x=Math.asin(r(f,-1,1)),Math.abs(f)<.99999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(u,o))):"ZYX"===e?(this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(f,d),this._z=Math.atan2(u,o)):(this._x=0,this._z=Math.atan2(-a,c))):"YZX"===e?(this._z=Math.asin(r(u,-1,1)),Math.abs(u)<.99999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(f,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==n&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new h;return function(e,n,r){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,n,r)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new c;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new l(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(ct.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var ks=0;lt.DefaultUp=new l(0,1,0),lt.DefaultMatrixAutoUpdate=!0,Object.assign(lt.prototype,r.prototype,{isObject3D:!0,applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new c;return function(e,n){return t.setFromAxisAngle(e,n),this.quaternion.multiply(t),this}}(),rotateX:function(){var t=new l(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new l(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new l(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new l;return function(e,n){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(n)),this}}(),translateX:function(){var t=new l(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new l(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new l(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new h;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new h;return function(e){this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1)for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);var n=this.children.indexOf(t);-1!==n&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(n,1))},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n],o=i.getObjectByProperty(t,e);if(void 0!==o)return o}},getWorldPosition:function(t){var e=t||new l;return this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new l,e=new l;return function(n){var r=n||new c;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,r,e),r}}(),getWorldRotation:function(){var t=new c;return function(e){var n=e||new ut;return this.getWorldQuaternion(t),n.setFromQuaternion(t,this.rotation.order,!1)}}(),getWorldScale:function(){var t=new l,e=new c;return function(n){var r=n||new l;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,r),r}}(),getWorldDirection:function(){var t=new c;return function(e){var n=e||new l;return this.getWorldQuaternion(t),n.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].updateMatrixWorld(t)},toJSON:function(t){function e(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}function n(t){var e=[];for(var n in t){var r=t[n];delete r.metadata,e.push(r)}return e}var r=void 0===t||""===t,i={};r&&(t={geometries:{},materials:{},textures:{},images:{}},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),"{}"!==JSON.stringify(this.userData)&&(o.userData=this.userData),!0===this.castShadow&&(o.castShadow=!0),!0===this.receiveShadow&&(o.receiveShadow=!0),!1===this.visible&&(o.visible=!1),o.matrix=this.matrix.toArray(),void 0!==this.geometry&&(o.geometry=e(t.geometries,this.geometry)),void 0!==this.material)if(Array.isArray(this.material)){for(var a=[],s=0,u=this.material.length;s<u;s++)a.push(e(t.materials,this.material[s]));o.material=a}else o.material=e(t.materials,this.material);if(this.children.length>0){o.children=[];for(var s=0;s<this.children.length;s++)o.children.push(this.children[s].toJSON(t).object)}if(r){var c=n(t.geometries),l=n(t.materials),h=n(t.textures),f=n(t.images);c.length>0&&(i.geometries=c),l.length>0&&(i.materials=l),h.length>0&&(i.textures=h),f.length>0&&(i.images=f)}return i.object=o,i},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var n=0;n<t.children.length;n++){var r=t.children[n];this.add(r.clone())}return this}}),Object.assign(ht.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return(t||new l).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return(t||new l).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){var n=e||new l;return this.delta(n).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new l,e=new l;return function(n,r){t.subVectors(n,this.start),e.subVectors(this.end,this.start);var i=e.dot(e),o=e.dot(t),a=o/i;return r&&(a=Ms.clamp(a,0,1)),a}}(),closestPointToPoint:function(t,e,n){var r=this.closestPointToPointParameter(t,e),i=n||new l;return this.delta(i).multiplyScalar(r).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Object.assign(ft,{normal:function(){var t=new l;return function(e,n,r,i){var o=i||new l;o.subVectors(r,n),t.subVectors(e,n),o.cross(t);var a=o.lengthSq();return a>0?o.multiplyScalar(1/Math.sqrt(a)):o.set(0,0,0)}}(),barycoordFromPoint:function(){var t=new l,e=new l,n=new l;return function(r,i,o,a,s){t.subVectors(a,i),e.subVectors(o,i),n.subVectors(r,i);var u=t.dot(t),c=t.dot(e),h=t.dot(n),f=e.dot(e),d=e.dot(n),p=u*f-c*c,m=s||new l;if(0===p)return m.set(-2,-1,-1);var v=1/p,g=(f*h-c*d)*v,y=(u*d-c*h)*v;return m.set(1-g-y,y,g)}}(),containsPoint:function(){var t=new l;return function(e,n,r,i){var o=ft.barycoordFromPoint(e,n,r,i,t);return o.x>=0&&o.y>=0&&o.x+o.y<=1}}()}),Object.assign(ft.prototype,{set:function(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this},setFromPointsAndIndices:function(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new l,e=new l;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){return(t||new l).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return ft.normal(this.a,this.b,this.c,t)},plane:function(t){return(t||new it).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return ft.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return ft.containsPoint(t,this.a,this.b,this.c)},closestPointToPoint:function(){var t=new it,e=[new ht,new ht,new ht],n=new l,r=new l;return function(i,o){var a=o||new l,s=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(i,n),!0===this.containsPoint(n))a.copy(n);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var u=0;u<e.length;u++){e[u].closestPointToPoint(n,!0,r);var c=n.distanceToSquared(r);c<s&&(s=c,a.copy(r))}}return a}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Object.assign(dt.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,n=t.vertexNormals.length;e<n;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(var e=0,n=t.vertexColors.length;e<n;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),pt.prototype=Object.create(K.prototype),pt.prototype.constructor=pt,pt.prototype.isMeshBasicMaterial=!0,pt.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},Object.defineProperty(mt.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(mt.prototype,{isBufferAttribute:!0,setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==t?t.length/this.itemSize:0,this.array=t},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.itemSize,n*=e.itemSize;for(var r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),o=new Y),e[n++]=o.r,e[n++]=o.g,e[n++]=o.b}return this},copyIndicesArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];e[n++]=o.a,e[n++]=o.b,e[n++]=o.c}return this},copyVector2sArray:function(t){for(var e=this.array,n=0,r=0,o=t.length;r<o;r++){var a=t[r];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),a=new i),e[n++]=a.x,e[n++]=a.y}return this},copyVector3sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),o=new l),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z}return this},copyVector4sArray:function(t){for(var e=this.array,n=0,r=0,i=t.length;r<i;r++){var o=t[r];void 0===o&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),o=new a),e[n++]=o.x,e[n++]=o.y,e[n++]=o.z,e[n++]=o.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),vt.prototype=Object.create(mt.prototype),vt.prototype.constructor=vt,gt.prototype=Object.create(mt.prototype),gt.prototype.constructor=gt,yt.prototype=Object.create(mt.prototype),yt.prototype.constructor=yt,bt.prototype=Object.create(mt.prototype),bt.prototype.constructor=bt,_t.prototype=Object.create(mt.prototype),_t.prototype.constructor=_t,xt.prototype=Object.create(mt.prototype),xt.prototype.constructor=xt,wt.prototype=Object.create(mt.prototype),wt.prototype.constructor=wt,Mt.prototype=Object.create(mt.prototype),Mt.prototype.constructor=Mt,Et.prototype=Object.create(mt.prototype),Et.prototype.constructor=Et,Object.assign(Tt.prototype,{computeGroups:function(t){for(var e,n=[],r=void 0,i=t.faces,o=0;o<i.length;o++){var a=i[o];a.materialIndex!==r&&(r=a.materialIndex,void 0!==e&&(e.count=3*o-e.start,n.push(e)),e={start:3*o,materialIndex:r})}void 0!==e&&(e.count=3*o-e.start,n.push(e)),this.groups=n},fromGeometry:function(t){var e,n=t.faces,r=t.vertices,o=t.faceVertexUvs,a=o[0]&&o[0].length>0,s=o[1]&&o[1].length>0,u=t.morphTargets,c=u.length;if(c>0){e=[];for(var l=0;l<c;l++)e[l]=[];this.morphTargets.position=e}var h,f=t.morphNormals,d=f.length;if(d>0){h=[];for(var l=0;l<d;l++)h[l]=[];this.morphTargets.normal=h}for(var p=t.skinIndices,m=t.skinWeights,v=p.length===r.length,g=m.length===r.length,l=0;l<n.length;l++){var y=n[l];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 x=y.vertexColors;if(3===x.length)this.colors.push(x[0],x[1],x[2]);else{var w=y.color;this.colors.push(w,w,w)}if(!0===a){var M=o[0][l];void 0!==M?this.uvs.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",l),this.uvs.push(new i,new i,new i))}if(!0===s){var M=o[1][l];void 0!==M?this.uvs2.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",l),this.uvs2.push(new i,new i,new i))}for(var E=0;E<c;E++){var T=u[E].vertices;e[E].push(T[y.a],T[y.b],T[y.c])}for(var E=0;E<d;E++){var S=f[E].vertexNormals[l];h[E].push(S.a,S.b,S.c)}v&&this.skinIndices.push(p[y.a],p[y.b],p[y.c]),g&&this.skinWeights.push(m[y.a],m[y.b],m[y.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var Fs=0;Object.assign(Ot.prototype,r.prototype,{isGeometry:!0,applyMatrix:function(t){for(var e=(new rt).getNormalMatrix(t),n=0,r=this.vertices.length;n<r;n++){this.vertices[n].applyMatrix4(t)}for(var n=0,r=this.faces.length;n<r;n++){var i=this.faces[n];i.normal.applyMatrix3(e).normalize();for(var o=0,a=i.vertexNormals.length;o<a;o++)i.vertexNormals[o].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new h;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new h;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new h;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new h;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new h;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new lt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(t,e,r,i){var o=void 0!==s?[f[t].clone(),f[e].clone(),f[r].clone()]:[],a=void 0!==u?[n.colors[t].clone(),n.colors[e].clone(),n.colors[r].clone()]:[],l=new dt(t,e,r,o,a,i);n.faces.push(l),void 0!==c&&n.faceVertexUvs[0].push([d[t].clone(),d[e].clone(),d[r].clone()]),void 0!==h&&n.faceVertexUvs[1].push([p[t].clone(),p[e].clone(),p[r].clone()])}var n=this,r=null!==t.index?t.index.array:void 0,o=t.attributes,a=o.position.array,s=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,h=void 0!==o.uv2?o.uv2.array:void 0;void 0!==h&&(this.faceVertexUvs[1]=[]);for(var f=[],d=[],p=[],m=0,v=0;m<a.length;m+=3,v+=2)n.vertices.push(new l(a[m],a[m+1],a[m+2])),void 0!==s&&f.push(new l(s[m],s[m+1],s[m+2])),void 0!==u&&n.colors.push(new Y(u[m],u[m+1],u[m+2])),void 0!==c&&d.push(new i(c[v],c[v+1])),void 0!==h&&p.push(new i(h[v],h[v+1]));var g=t.groups;if(g.length>0)for(var m=0;m<g.length;m++)for(var y=g[m],b=y.start,_=y.count,v=b,x=b+_;v<x;v+=3)void 0!==r?e(r[v],r[v+1],r[v+2],y.materialIndex):e(v,v+1,v+2,y.materialIndex);else if(void 0!==r)for(var m=0;m<r.length;m+=3)e(r[m],r[m+1],r[m+2]);else for(var m=0;m<a.length/3;m+=3)e(m,m+1,m+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,n=0===e?1:1/e,r=new h;return r.set(n,0,0,-n*t.x,0,n,0,-n*t.y,0,0,n,-n*t.z,0,0,0,1),this.applyMatrix(r),this},computeFaceNormals:function(){for(var t=new l,e=new l,n=0,r=this.faces.length;n<r;n++){var i=this.faces[n],o=this.vertices[i.a],a=this.vertices[i.b],s=this.vertices[i.c];t.subVectors(s,a),e.subVectors(o,a),t.cross(e),t.normalize(),i.normal.copy(t)}},computeVertexNormals:function(t){void 0===t&&(t=!0);var e,n,r,i,o,a;for(a=new Array(this.vertices.length),e=0,n=this.vertices.length;e<n;e++)a[e]=new l;if(t){var s,u,c,h=new l,f=new l;for(r=0,i=this.faces.length;r<i;r++)o=this.faces[r],s=this.vertices[o.a],u=this.vertices[o.b],c=this.vertices[o.c],h.subVectors(c,u),f.subVectors(s,u),h.cross(f),a[o.a].add(h),a[o.b].add(h),a[o.c].add(h)}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(e=0,n=this.vertices.length;e<n;e++)a[e].normalize();for(r=0,i=this.faces.length;r<i;r++){o=this.faces[r];var d=o.vertexNormals;3===d.length?(d[0].copy(a[o.a]),d[1].copy(a[o.b]),d[2].copy(a[o.c])):(d[0]=a[o.a].clone(),d[1]=a[o.b].clone(),d[2]=a[o.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,n;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){n=this.faces[t];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 t,e,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=[]),t=0,e=i.vertexNormals.length;t<e;t++)i.__originalVertexNormals[t]?i.__originalVertexNormals[t].copy(i.vertexNormals[t]):i.__originalVertexNormals[t]=i.vertexNormals[t].clone();var o=new Ot;for(o.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var a,s,u=this.morphNormals[t].faceNormals,c=this.morphNormals[t].vertexNormals;for(n=0,r=this.faces.length;n<r;n++)a=new l,s={a:new l,b:new l,c:new l},u.push(a),c.push(s)}var h=this.morphNormals[t];o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals();var a,s;for(n=0,r=this.faces.length;n<r;n++)i=this.faces[n],a=h.faceNormals[n],s=h.vertexNormals[n],a.copy(i.normal),s.a.copy(i.vertexNormals[0]),s.b.copy(i.vertexNormals[1]),s.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},computeLineDistances:function(){for(var t=0,e=this.vertices,n=0,r=e.length;n<r;n++)n>0&&(t+=e[n].distanceTo(e[n-1])),this.lineDistances[n]=t},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new et),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new nt),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,n){if(!1===(t&&t.isGeometry))return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);var r,i=this.vertices.length,o=this.vertices,a=t.vertices,s=this.faces,u=t.faces,c=this.faceVertexUvs[0],l=t.faceVertexUvs[0],h=this.colors,f=t.colors;void 0===n&&(n=0),void 0!==e&&(r=(new rt).getNormalMatrix(e));for(var d=0,p=a.length;d<p;d++){var m=a[d],v=m.clone();void 0!==e&&v.applyMatrix4(e),o.push(v)}for(var d=0,p=f.length;d<p;d++)h.push(f[d].clone());for(d=0,p=u.length;d<p;d++){var g,y,b,_=u[d],x=_.vertexNormals,w=_.vertexColors;g=new dt(_.a+i,_.b+i,_.c+i),g.normal.copy(_.normal),void 0!==r&&g.normal.applyMatrix3(r).normalize();for(var M=0,E=x.length;M<E;M++)y=x[M].clone(),void 0!==r&&y.applyMatrix3(r).normalize(),g.vertexNormals.push(y);g.color.copy(_.color);for(var M=0,E=w.length;M<E;M++)b=w[M],g.vertexColors.push(b.clone());g.materialIndex=_.materialIndex+n,s.push(g)}for(d=0,p=l.length;d<p;d++){var T=l[d],S=[];if(void 0!==T){for(var M=0,E=T.length;M<E;M++)S.push(T[M].clone());c.push(S)}}},mergeMesh:function(t){if(!1===(t&&t.isMesh))return void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t);t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)},mergeVertices:function(){var t,e,n,r,i,o,a,s,u={},c=[],l=[],h=Math.pow(10,4);for(n=0,r=this.vertices.length;n<r;n++)t=this.vertices[n],e=Math.round(t.x*h)+"_"+Math.round(t.y*h)+"_"+Math.round(t.z*h),void 0===u[e]?(u[e]=n,c.push(this.vertices[n]),l[n]=c.length-1):l[n]=l[u[e]];var f=[];for(n=0,r=this.faces.length;n<r;n++){i=this.faces[n],i.a=l[i.a],i.b=l[i.b],i.c=l[i.c],o=[i.a,i.b,i.c];for(var d=0;d<3;d++)if(o[d]===o[(d+1)%3]){f.push(n);break}}for(n=f.length-1;n>=0;n--){var p=f[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-c.length;return this.vertices=c,m},sortFacesByMaterialIndex:function(){function t(t,e){return t.materialIndex-e.materialIndex}for(var e=this.faces,n=e.length,r=0;r<n;r++)e[r]._id=r;e.sort(t);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 u=e[r]._id;i&&i.push(a[u]),o&&o.push(s[u])}i&&(this.faceVertexUvs[0]=i),o&&(this.faceVertexUvs[1]=o)},toJSON:function(){function t(t,e,n){return n?t|1<<e:t&~(1<<e)}function e(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==f[e]?f[e]:(f[e]=h.length/3,h.push(t.x,t.y,t.z),f[e])}function n(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==p[e]?p[e]:(p[e]=d.length,d.push(t.getHex()),p[e])}function r(t){var e=t.x.toString()+t.y.toString();return void 0!==v[e]?v[e]:(v[e]=m.length/2,m.push(t.x,t.y),v[e])}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=[],u=0;u<this.vertices.length;u++){var c=this.vertices[u];s.push(c.x,c.y,c.z)}for(var l=[],h=[],f={},d=[],p={},m=[],v={},u=0;u<this.faces.length;u++){var g=this.faces[u],y=void 0!==this.faceVertexUvs[0][u],b=g.normal.length()>0,_=g.vertexNormals.length>0,x=1!==g.color.r||1!==g.color.g||1!==g.color.b,w=g.vertexColors.length>0,M=0;if(M=t(M,0,0),M=t(M,1,!0),M=t(M,2,!1),M=t(M,3,y),M=t(M,4,b),M=t(M,5,_),M=t(M,6,x),M=t(M,7,w),l.push(M),l.push(g.a,g.b,g.c),l.push(g.materialIndex),y){var E=this.faceVertexUvs[0][u];l.push(r(E[0]),r(E[1]),r(E[2]))}if(b&&l.push(e(g.normal)),_){var T=g.vertexNormals;l.push(e(T[0]),e(T[1]),e(T[2]))}if(x&&l.push(n(g.color)),w){var S=g.vertexColors;l.push(n(S[0]),n(S[1]),n(S[2]))}}return i.data={},i.data.vertices=s,i.data.normals=h,d.length>0&&(i.data.colors=d),m.length>0&&(i.data.uvs=[m]),i.data.faces=l,i},clone:function(){return(new Ot).copy(this)},copy:function(t){var e,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=t.name;var s=t.vertices;for(e=0,n=s.length;e<n;e++)this.vertices.push(s[e].clone());var u=t.colors;for(e=0,n=u.length;e<n;e++)this.colors.push(u[e].clone());var c=t.faces;for(e=0,n=c.length;e<n;e++)this.faces.push(c[e].clone());for(e=0,n=t.faceVertexUvs.length;e<n;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),r=0,i=l.length;r<i;r++){var h=l[r],f=[];for(o=0,a=h.length;o<a;o++){var d=h[o];f.push(d.clone())}this.faceVertexUvs[e].push(f)}}var p=t.morphTargets;for(e=0,n=p.length;e<n;e++){var m={};if(m.name=p[e].name,void 0!==p[e].vertices)for(m.vertices=[],r=0,i=p[e].vertices.length;r<i;r++)m.vertices.push(p[e].vertices[r].clone());if(void 0!==p[e].normals)for(m.normals=[],r=0,i=p[e].normals.length;r<i;r++)m.normals.push(p[e].normals[r].clone());this.morphTargets.push(m)}var v=t.morphNormals;for(e=0,n=v.length;e<n;e++){var g={};if(void 0!==v[e].vertexNormals)for(g.vertexNormals=[],r=0,i=v[e].vertexNormals.length;r<i;r++){var y=v[e].vertexNormals[r],b={};b.a=y.a.clone(),b.b=y.b.clone(),b.c=y.c.clone(),g.vertexNormals.push(b)}if(void 0!==v[e].faceNormals)for(g.faceNormals=[],r=0,i=v[e].faceNormals.length;r<i;r++)g.faceNormals.push(v[e].faceNormals[r].clone());this.morphNormals.push(g)}var _=t.skinWeights;for(e=0,n=_.length;e<n;e++)this.skinWeights.push(_[e].clone());var x=t.skinIndices;for(e=0,n=x.length;e<n;e++)this.skinIndices.push(x[e].clone());var w=t.lineDistances;for(e=0,n=w.length;e<n;e++)this.lineDistances.push(w[e]);var M=t.boundingBox;null!==M&&(this.boundingBox=M.clone());var E=t.boundingSphere;return null!==E&&(this.boundingSphere=E.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Ct.MaxIndex=65535,Object.assign(Ct.prototype,r.prototype,{isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(St(t)>65535?wt:_t)(t,1):this.index=t},addAttribute:function(t,e){return!1===(e&&e.isBufferAttribute)&&!1===(e&&e.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new mt(arguments[1],arguments[2]))):"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(e)):(this.attributes[t]=e,this)},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){(new rt).getNormalMatrix(t).applyToBufferAttribute(n),n.needsUpdate=!0}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new h;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new h;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new h;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new h;return function(e,n,r){return t.makeTranslation(e,n,r),this.applyMatrix(t),this}}(),scale:function(){var t=new h;return function(e,n,r){return t.makeScale(e,n,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new lt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var n=new Mt(3*e.vertices.length,3),r=new Mt(3*e.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(e.vertices)),this.addAttribute("color",r.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var i=new Mt(e.lineDistances.length,1);this.addAttribute("lineDistance",i.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var n=e.__directGeometry;if(!0===e.elementsNeedUpdate&&(n=void 0,e.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(e);n.verticesNeedUpdate=e.verticesNeedUpdate,n.normalsNeedUpdate=e.normalsNeedUpdate,n.colorsNeedUpdate=e.colorsNeedUpdate,n.uvsNeedUpdate=e.uvsNeedUpdate,n.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=n}var r;return!0===e.verticesNeedUpdate&&(r=this.attributes.position,void 0!==r&&(r.copyVector3sArray(e.vertices),r.needsUpdate=!0),e.verticesNeedUpdate=!1),!0===e.normalsNeedUpdate&&(r=this.attributes.normal,void 0!==r&&(r.copyVector3sArray(e.normals),r.needsUpdate=!0),e.normalsNeedUpdate=!1),!0===e.colorsNeedUpdate&&(r=this.attributes.color,void 0!==r&&(r.copyColorsArray(e.colors),r.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(r=this.attributes.uv,void 0!==r&&(r.copyVector2sArray(e.uvs),r.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(r=this.attributes.lineDistance,void 0!==r&&(r.copyArray(e.lineDistances),r.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new Tt).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new mt(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var n=new Float32Array(3*t.normals.length);this.addAttribute("normal",new mt(n,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new mt(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var i=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new mt(i,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var o=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new mt(o,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var a=St(t.indices)>65535?Uint32Array:Uint16Array,s=new a(3*t.indices.length);this.setIndex(new mt(s,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var u in t.morphTargets){for(var c=[],l=t.morphTargets[u],h=0,f=l.length;h<f;h++){var d=l[h],p=new Mt(3*d.length,3);c.push(p.copyVector3sArray(d))}this.morphAttributes[u]=c}if(t.skinIndices.length>0){var m=new Mt(4*t.skinIndices.length,4);this.addAttribute("skinIndex",m.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var v=new Mt(4*t.skinWeights.length,4);this.addAttribute("skinWeight",v.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new et);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):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 t=new et,e=new l;return function(){null===this.boundingSphere&&(this.boundingSphere=new nt);var n=this.attributes.position;if(n){var r=this.boundingSphere.center;t.setFromBufferAttribute(n),t.getCenter(r);for(var i=0,o=0,a=n.count;o<a;o++)e.x=n.getX(o),e.y=n.getY(o),e.z=n.getZ(o),i=Math.max(i,r.distanceToSquared(e));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 t=this.index,e=this.attributes,n=this.groups;if(e.position){var r=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new mt(new Float32Array(r.length),3));else for(var i=e.normal.array,o=0,a=i.length;o<a;o++)i[o]=0;var s,u,c,h=e.normal.array,f=new l,d=new l,p=new l,m=new l,v=new l;if(t){var g=t.array;0===n.length&&this.addGroup(0,g.length);for(var y=0,b=n.length;y<b;++y)for(var _=n[y],x=_.start,w=_.count,o=x,a=x+w;o<a;o+=3)s=3*g[o+0],u=3*g[o+1],c=3*g[o+2],f.fromArray(r,s),d.fromArray(r,u),p.fromArray(r,c),m.subVectors(p,d),v.subVectors(f,d),m.cross(v),h[s]+=m.x,h[s+1]+=m.y,h[s+2]+=m.z,h[u]+=m.x,h[u+1]+=m.y,h[u+2]+=m.z,h[c]+=m.x,h[c+1]+=m.y,h[c+2]+=m.z}else for(var o=0,a=r.length;o<a;o+=9)f.fromArray(r,o),d.fromArray(r,o+3),p.fromArray(r,o+6),m.subVectors(p,d),v.subVectors(f,d),m.cross(v),h[o]=m.x,h[o+1]=m.y,h[o+2]=m.z,h[o+3]=m.x,h[o+4]=m.y,h[o+5]=m.z,h[o+6]=m.x,h[o+7]=m.y,h[o+8]=m.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(!1===(t&&t.isBufferGeometry))return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0);var n=this.attributes;for(var r in n)if(void 0!==t.attributes[r])for(var i=n[r],o=i.array,a=t.attributes[r],s=a.array,u=a.itemSize,c=0,l=u*e;c<s.length;c++,l++)o[l]=s[c];return this},normalizeNormals:function(){for(var t,e,n,r,i=this.attributes.normal,o=0,a=i.count;o<a;o++)t=i.getX(o),e=i.getY(o),n=i.getZ(o),r=1/Math.sqrt(t*t+e*e+n*n),i.setXYZ(o,t*r,e*r,n*r)},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Ct,e=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(e.length*a),u=0,c=0,l=0,h=e.length;l<h;l++){u=e[l]*a;for(var f=0;f<a;f++)s[c++]=o[u++]}t.addAttribute(r,new mt(s,a))}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){var i=Array.prototype.slice.call(r.array);t.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);t.data.attributes[n]={itemSize:a.itemSize,type:a.array.constructor.name,array:i,normalized:a.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var u=this.boundingSphere;return null!==u&&(t.data.boundingSphere={center:u.center.toArray(),radius:u.radius}),t},clone:function(){return(new Ct).copy(this)},copy:function(t){var e,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var i=t.index;null!==i&&this.setIndex(i.clone());var o=t.attributes;for(e in o){var a=o[e];this.addAttribute(e,a.clone())}var s=t.morphAttributes;for(e in s){var u=[],c=s[e];for(n=0,r=c.length;n<r;n++)u.push(c[n].clone());this.morphAttributes[e]=u}var l=t.groups;for(n=0,r=l.length;n<r;n++){var h=l[n];this.addGroup(h.start,h.count,h.materialIndex)}var f=t.boundingBox;null!==f&&(this.boundingBox=f.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Rt.prototype=Object.assign(Object.create(lt.prototype),{constructor:Rt,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return lt.prototype.copy.call(this,t),this.drawMode=t.drawMode,this},updateMorphTargets:function(){var t=this.geometry.morphTargets;if(void 0!==t&&t.length>0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var e=0,n=t.length;e<n;e++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[t[e].name]=e}},raycast:function(){function t(t,e,n,r,i,o,a){return ft.barycoordFromPoint(t,e,n,r,y),i.multiplyScalar(y.x),o.multiplyScalar(y.y),a.multiplyScalar(y.z),i.add(o).add(a),i.clone()}function e(t,e,n,r,i,o,a){var s=t.material;if(null===(s.side===yo?n.intersectTriangle(o,i,r,!0,a):n.intersectTriangle(r,i,o,s.side!==bo,a)))return null;_.copy(a),_.applyMatrix4(t.matrixWorld);var u=e.ray.origin.distanceTo(_);return u<e.near||u>e.far?null:{distance:u,point:_.clone(),object:t}}function n(n,r,i,o,a,l,h,f){s.fromBufferAttribute(o,l),u.fromBufferAttribute(o,h),c.fromBufferAttribute(o,f);var d=e(n,r,i,s,u,c,b);return d&&(a&&(m.fromBufferAttribute(a,l),v.fromBufferAttribute(a,h),g.fromBufferAttribute(a,f),d.uv=t(b,s,u,c,m,v,g)),d.face=new dt(l,h,f,ft.normal(s,u,c)),d.faceIndex=l),d}var r=new h,o=new st,a=new nt,s=new l,u=new l,c=new l,f=new l,d=new l,p=new l,m=new i,v=new i,g=new i,y=new l,b=new l,_=new l;return function(i,l){var h=this.geometry,y=this.material,_=this.matrixWorld;if(void 0!==y&&(null===h.boundingSphere&&h.computeBoundingSphere(),a.copy(h.boundingSphere),a.applyMatrix4(_),!1!==i.ray.intersectsSphere(a)&&(r.getInverse(_),o.copy(i.ray).applyMatrix4(r),null===h.boundingBox||!1!==o.intersectsBox(h.boundingBox)))){var x;if(h.isBufferGeometry){var w,M,E,T,S,A=h.index,O=h.attributes.position,C=h.attributes.uv;if(null!==A)for(T=0,S=A.count;T<S;T+=3)w=A.getX(T),M=A.getX(T+1),E=A.getX(T+2),(x=n(this,i,o,O,C,w,M,E))&&(x.faceIndex=Math.floor(T/3),l.push(x));else for(T=0,S=O.count;T<S;T+=3)w=T,M=T+1,E=T+2,(x=n(this,i,o,O,C,w,M,E))&&(x.index=w,l.push(x))}else if(h.isGeometry){var R,L,j,P,N=Array.isArray(y),I=h.vertices,U=h.faces,D=h.faceVertexUvs[0];D.length>0&&(P=D);for(var k=0,F=U.length;k<F;k++){var B=U[k],z=N?y[B.materialIndex]:y;if(void 0!==z){if(R=I[B.a],L=I[B.b],j=I[B.c],!0===z.morphTargets){var G=h.morphTargets,H=this.morphTargetInfluences;s.set(0,0,0),u.set(0,0,0),c.set(0,0,0);for(var V=0,W=G.length;V<W;V++){var X=H[V];if(0!==X){var q=G[V].vertices;s.addScaledVector(f.subVectors(q[B.a],R),X),u.addScaledVector(d.subVectors(q[B.b],L),X),c.addScaledVector(p.subVectors(q[B.c],j),X)}}s.add(R),u.add(L),c.add(j),R=s,L=u,j=c}if(x=e(this,i,o,R,L,j,b)){if(P&&P[k]){var Y=P[k];m.copy(Y[0]),v.copy(Y[1]),g.copy(Y[2]),x.uv=t(b,R,L,j,m,v,g)}x.face=B,x.faceIndex=k,l.push(x)}}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Lt.prototype=Object.create(Ot.prototype),Lt.prototype.constructor=Lt,jt.prototype=Object.create(Ct.prototype),jt.prototype.constructor=jt,Pt.prototype=Object.create(Ot.prototype),Pt.prototype.constructor=Pt,Nt.prototype=Object.create(Ct.prototype),Nt.prototype.constructor=Nt,It.prototype=Object.assign(Object.create(lt.prototype),{constructor:It,isCamera:!0,copy:function(t){return lt.prototype.copy.call(this,t),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new c;return function(e){var n=e||new l;return this.getWorldQuaternion(t),n.set(0,0,-1).applyQuaternion(t)}}(),clone:function(){return(new this.constructor).copy(this)}}),Ut.prototype=Object.assign(Object.create(It.prototype),{constructor:Ut,isPerspectiveCamera:!0,copy:function(t){return It.prototype.copy.call(this,t),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*Ms.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*Ms.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*Ms.RAD2DEG*Math.atan(Math.tan(.5*Ms.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(t,e,n,r,i,o){this.aspect=t/e,this.view={fullWidth:t,fullHeight:e,offsetX:n,offsetY:r,width:i,height:o},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*Ms.DEG2RAD*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r,o=this.view;if(null!==o){var a=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/a,e-=o.offsetY*n/s,r*=o.width/a,n*=o.height/s}var u=this.filmOffset;0!==u&&(i+=t*u/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far)},toJSON:function(t){var e=lt.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Dt.prototype=Object.assign(Object.create(It.prototype),{constructor:Dt,isOrthographicCamera:!0,copy:function(t){return It.prototype.copy.call(this,t),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,n,r,i,o){this.view={fullWidth:t,fullHeight:e,offsetX:n,offsetY:r,width:i,height:o},this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null,this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-t,o=n+t,a=r+e,s=r-e;if(null!==this.view){var u=this.zoom/(this.view.width/this.view.fullWidth),c=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;i+=l*(this.view.offsetX/u),o=i+l*(this.view.width/u),a-=h*(this.view.offsetY/c),s=a-h*(this.view.height/c)}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far)},toJSON:function(t){var e=lt.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}});var Bs=0;ve.prototype.isFogExp2=!0,ve.prototype.clone=function(){return new ve(this.color.getHex(),this.density)},ve.prototype.toJSON=function(t){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},ge.prototype.isFog=!0,ge.prototype.clone=function(){return new ge(this.color.getHex(),this.near,this.far)},ge.prototype.toJSON=function(t){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},ye.prototype=Object.assign(Object.create(lt.prototype),{constructor:ye,copy:function(t,e){return lt.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=lt.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),be.prototype=Object.assign(Object.create(lt.prototype),{constructor:be,isLensFlare:!0,copy:function(t){lt.prototype.copy.call(this,t),this.positionScreen.copy(t.positionScreen),this.customUpdateCallback=t.customUpdateCallback;for(var e=0,n=t.lensFlares.length;e<n;e++)this.lensFlares.push(t.lensFlares[e]);return this},add:function(t,e,n,r,i,o){void 0===e&&(e=-1),void 0===n&&(n=0),void 0===o&&(o=1),void 0===i&&(i=new Y(16777215)),void 0===r&&(r=So),n=Math.min(n,Math.max(0,n)),this.lensFlares.push({texture:t,size:e,distance:n,x:0,y:0,z:0,scale:1,rotation:0,opacity:o,color:i,blending:r})},updateLensFlares:function(){var t,e,n=this.lensFlares.length,r=2*-this.positionScreen.x,i=2*-this.positionScreen.y;for(t=0;t<n;t++)e=this.lensFlares[t],e.x=this.positionScreen.x+r*e.distance,e.y=this.positionScreen.y+i*e.distance,e.wantedRotation=e.x*Math.PI*.25,e.rotation+=.25*(e.wantedRotation-e.rotation)}}),_e.prototype=Object.create(K.prototype),_e.prototype.constructor=_e,_e.prototype.isSpriteMaterial=!0,_e.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},xe.prototype=Object.assign(Object.create(lt.prototype),{constructor:xe,isSprite:!0,raycast:function(){var t=new l,e=new l,n=new l;return function(r,i){e.setFromMatrixPosition(this.matrixWorld),r.ray.closestPointToPoint(e,t),n.setFromMatrixScale(this.matrixWorld);var o=n.x*n.y/4;if(!(e.distanceToSquared(t)>o)){var a=r.ray.origin.distanceTo(t);a<r.near||a>r.far||i.push({distance:a,point:t.clone(),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)}}),we.prototype=Object.assign(Object.create(lt.prototype),{constructor:we,copy:function(t){lt.prototype.copy.call(this,t,!1);for(var e=t.levels,n=0,r=e.length;n<r;n++){var i=e[n];this.addLevel(i.object.clone(),i.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var n=this.levels,r=0;r<n.length&&!(e<n[r].distance);r++);n.splice(r,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,n=1,r=e.length;n<r&&!(t<e[n].distance);n++);return e[n-1].object},raycast:function(){var t=new l;return function(e,n){t.setFromMatrixPosition(this.matrixWorld);var r=e.ray.origin.distanceTo(t);this.getObjectForDistance(r).raycast(e,n)}}(),update:function(){var t=new l,e=new l;return function(n){var r=this.levels;if(r.length>1){t.setFromMatrixPosition(n.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var i=t.distanceTo(e);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(t){var e=lt.prototype.toJSON.call(this,t);e.object.levels=[];for(var n=this.levels,r=0,i=n.length;r<i;r++){var o=n[r];e.object.levels.push({object:o.object.uuid,distance:o.distance})}return e}}),Object.assign(Me.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var n=new h;this.bones[t]&&n.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(n)}},pose:function(){var t,e,n;for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,n=this.bones.length;e<n;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new h,e=new h;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 u=n[a]?n[a].matrixWorld:e;t.multiplyMatrices(u,r[a]),t.toArray(i,16*a)}void 0!==o&&(o.needsUpdate=!0)}}(),clone:function(){return new Me(this.bones,this.boneInverses)}}),Ee.prototype=Object.assign(Object.create(lt.prototype),{constructor:Ee,isBone:!0}),Te.prototype=Object.assign(Object.create(Rt.prototype),{constructor:Te,isSkinnedMesh:!0,initBones:function(){var t,e,n,r,i=[];if(this.geometry&&void 0!==this.geometry.bones){for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],t=new Ee,i.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(n=0,r=this.geometry.bones.length;n<r;n++)e=this.geometry.bones[n],-1!==e.parent&&null!==e.parent&&void 0!==i[e.parent]?i[e.parent].add(i[n]):this.add(i[n])}return this.updateMatrixWorld(!0),i},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var n=this.geometry.skinWeights[e];t=1/n.lengthManhattan(),t!==1/0?n.multiplyScalar(t):n.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var r=new a,i=this.geometry.attributes.skinWeight;for(e=0;e<i.count;e++)r.x=i.getX(e),r.y=i.getY(e),r.z=i.getZ(e),r.w=i.getW(e),t=1/r.lengthManhattan(),t!==1/0?r.multiplyScalar(t):r.set(1,0,0,0),i.setXYZW(e,r.x,r.y,r.z,r.w)}},updateMatrixWorld:function(t){Rt.prototype.updateMatrixWorld.call(this,t),"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)}}),Se.prototype=Object.create(K.prototype),Se.prototype.constructor=Se,Se.prototype.isLineBasicMaterial=!0,Se.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Ae.prototype=Object.assign(Object.create(lt.prototype),{constructor:Ae,isLine:!0,raycast:function(){var t=new h,e=new st,n=new nt;return function(r,i){var o=r.linePrecision,a=o*o,s=this.geometry,u=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(u),!1!==r.ray.intersectsSphere(n)){t.getInverse(u),e.copy(r.ray).applyMatrix4(t);var c=new l,h=new l,f=new l,d=new l,p=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var m=s.index,v=s.attributes,g=v.position.array;if(null!==m)for(var y=m.array,b=0,_=y.length-1;b<_;b+=p){var x=y[b],w=y[b+1];c.fromArray(g,3*x),h.fromArray(g,3*w);var M=e.distanceSqToSegment(c,h,d,f);if(!(M>a)){d.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(d);E<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}else for(var b=0,_=g.length/3-1;b<_;b+=p){c.fromArray(g,3*b),h.fromArray(g,3*b+3);var M=e.distanceSqToSegment(c,h,d,f);if(!(M>a)){d.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(d);E<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}}else if(s.isGeometry)for(var T=s.vertices,S=T.length,b=0;b<S-1;b+=p){var M=e.distanceSqToSegment(T[b],T[b+1],d,f);if(!(M>a)){d.applyMatrix4(this.matrixWorld);var E=r.ray.origin.distanceTo(d);E<r.near||E>r.far||i.push({distance:E,point:f.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Oe.prototype=Object.assign(Object.create(Ae.prototype),{constructor:Oe,isLineSegments:!0}),Ce.prototype=Object.assign(Object.create(Ae.prototype),{constructor:Ce,isLineLoop:!0}),Re.prototype=Object.create(K.prototype),Re.prototype.constructor=Re,Re.prototype.isPointsMaterial=!0,Re.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this},Le.prototype=Object.assign(Object.create(lt.prototype),{constructor:Le,isPoints:!0,raycast:function(){var t=new h,e=new st,n=new nt;return function(r,i){function o(t,n){var o=e.distanceSqToPoint(t);if(o<f){var s=e.closestPointToPoint(t);s.applyMatrix4(u);var c=r.ray.origin.distanceTo(s);if(c<r.near||c>r.far)return;i.push({distance:c,distanceToRay:Math.sqrt(o),point:s.clone(),index:n,face:null,object:a})}}var a=this,s=this.geometry,u=this.matrixWorld,c=r.params.Points.threshold;if(null===s.boundingSphere&&s.computeBoundingSphere(),n.copy(s.boundingSphere),n.applyMatrix4(u),n.radius+=c,!1!==r.ray.intersectsSphere(n)){t.getInverse(u),e.copy(r.ray).applyMatrix4(t);var h=c/((this.scale.x+this.scale.y+this.scale.z)/3),f=h*h,d=new l;if(s.isBufferGeometry){var p=s.index,m=s.attributes,v=m.position.array;if(null!==p)for(var g=p.array,y=0,b=g.length;y<b;y++){var _=g[y];d.fromArray(v,3*_),o(d,_)}else for(var y=0,x=v.length/3;y<x;y++)d.fromArray(v,3*y),o(d,y)}else for(var w=s.vertices,y=0,x=w.length;y<x;y++)o(w[y],y)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),je.prototype=Object.assign(Object.create(lt.prototype),{constructor:je}),Pe.prototype=Object.create(o.prototype),Pe.prototype.constructor=Pe,Ne.prototype=Object.create(o.prototype),Ne.prototype.constructor=Ne,Ne.prototype.isCompressedTexture=!0,Ie.prototype=Object.create(o.prototype),Ie.prototype.constructor=Ie,Ue.prototype=Object.create(o.prototype),Ue.prototype.constructor=Ue,Ue.prototype.isDepthTexture=!0,De.prototype=Object.create(Ct.prototype),De.prototype.constructor=De,ke.prototype=Object.create(Ot.prototype),ke.prototype.constructor=ke,Fe.prototype=Object.create(Ct.prototype),Fe.prototype.constructor=Fe,Be.prototype=Object.create(Ot.prototype),Be.prototype.constructor=Be,ze.prototype=Object.create(Ct.prototype),ze.prototype.constructor=ze,Ge.prototype=Object.create(Ot.prototype),Ge.prototype.constructor=Ge,He.prototype=Object.create(ze.prototype),He.prototype.constructor=He,Ve.prototype=Object.create(Ot.prototype),Ve.prototype.constructor=Ve,We.prototype=Object.create(ze.prototype),We.prototype.constructor=We,Xe.prototype=Object.create(Ot.prototype),Xe.prototype.constructor=Xe,qe.prototype=Object.create(ze.prototype),qe.prototype.constructor=qe,Ye.prototype=Object.create(Ot.prototype),Ye.prototype.constructor=Ye,Ze.prototype=Object.create(ze.prototype),Ze.prototype.constructor=Ze,Je.prototype=Object.create(Ot.prototype),Je.prototype.constructor=Je,Qe.prototype=Object.create(Ct.prototype),Qe.prototype.constructor=Qe,Ke.prototype=Object.create(Ot.prototype),Ke.prototype.constructor=Ke,$e.prototype=Object.create(Ct.prototype),$e.prototype.constructor=$e,tn.prototype=Object.create(Ot.prototype),tn.prototype.constructor=tn,en.prototype=Object.create(Ct.prototype),en.prototype.constructor=en;var zs={area:function(t){for(var e=t.length,n=0,r=e-1,i=0;i<e;r=i++)n+=t[r].x*t[i].y-t[i].x*t[r].y;return.5*n},triangulate:function(){function t(t,e,n,r,i,o){var a,s,u,c,l,h,f,d,p;if(s=t[o[e]].x,u=t[o[e]].y,c=t[o[n]].x,l=t[o[n]].y,h=t[o[r]].x,f=t[o[r]].y,(c-s)*(f-u)-(l-u)*(h-s)<=0)return!1;var m,v,g,y,b,_,x,w,M,E,T,S,A,O,C;for(m=h-c,v=f-l,g=s-h,y=u-f,b=c-s,_=l-u,a=0;a<i;a++)if(d=t[o[a]].x,p=t[o[a]].y,!(d===s&&p===u||d===c&&p===l||d===h&&p===f)&&(x=d-s,w=p-u,M=d-c,E=p-l,T=d-h,S=p-f,C=m*E-v*M,A=b*w-_*x,O=g*S-y*T,C>=-Number.EPSILON&&O>=-Number.EPSILON&&A>=-Number.EPSILON))return!1;return!0}return function(e,n){var r=e.length;if(r<3)return null;var i,o,a,s=[],u=[],c=[];if(zs.area(e)>0)for(o=0;o<r;o++)u[o]=o;else for(o=0;o<r;o++)u[o]=r-1-o;var l=r,h=2*l;for(o=l-1;l>2;){if(h--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),n?c:s;if(i=o,l<=i&&(i=0),o=i+1,l<=o&&(o=0),a=o+1,l<=a&&(a=0),t(e,i,o,a,l,u)){var f,d,p,m,v;for(f=u[i],d=u[o],p=u[a],s.push([e[f],e[d],e[p]]),c.push([u[i],u[o],u[a]]),m=o,v=o+1;v<l;m++,v++)u[m]=u[v];l--,h=2*l}}return n?c:s}}(),triangulateShape:function(t,e){function n(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function r(t,e,n){return t.x!==e.x?t.x<e.x?t.x<=n.x&&n.x<=e.x:e.x<=n.x&&n.x<=t.x:t.y<e.y?t.y<=n.y&&n.y<=e.y:e.y<=n.y&&n.y<=t.y}function i(t,e,n,i,o){var a=e.x-t.x,s=e.y-t.y,u=i.x-n.x,c=i.y-n.y,l=t.x-n.x,h=t.y-n.y,f=s*u-a*c,d=s*l-a*h;if(Math.abs(f)>Number.EPSILON){var p;if(f>0){if(d<0||d>f)return[];if((p=c*l-u*h)<0||p>f)return[]}else{if(d>0||d<f)return[];if((p=c*l-u*h)>0||p<f)return[]}if(0===p)return!o||0!==d&&d!==f?[t]:[];if(p===f)return!o||0!==d&&d!==f?[e]:[];if(0===d)return[n];if(d===f)return[i];var m=p/f;return[{x:t.x+m*a,y:t.y+m*s}]}if(0!==d||c*l!=u*h)return[];var v=0===a&&0===s,g=0===u&&0===c;if(v&&g)return t.x!==n.x||t.y!==n.y?[]:[t];if(v)return r(n,i,t)?[t]:[];if(g)return r(t,e,n)?[n]:[];var y,b,_,x,w,M,E,T;return 0!==a?(t.x<e.x?(y=t,_=t.x,b=e,x=e.x):(y=e,_=e.x,b=t,x=t.x),n.x<i.x?(w=n,E=n.x,M=i,T=i.x):(w=i,E=i.x,M=n,T=n.x)):(t.y<e.y?(y=t,_=t.y,b=e,x=e.y):(y=e,_=e.y,b=t,x=t.y),n.y<i.y?(w=n,E=n.y,M=i,T=i.y):(w=i,E=i.y,M=n,T=n.y)),_<=E?x<E?[]:x===E?o?[]:[w]:x<=T?[w,b]:[w,M]:_>T?[]:_===T?o?[]:[y]:x<=T?[y,b]:[y,M]}function o(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=n.x-t.x,s=n.y-t.y,u=r.x-t.x,c=r.y-t.y,l=i*s-o*a,h=i*c-o*u;if(Math.abs(l)>Number.EPSILON){var f=u*s-c*a;return l>0?h>=0&&f>=0:h>=0||f>=0}return h>0}n(t),e.forEach(n);for(var a,s,u,c,l,h,f={},d=t.concat(),p=0,m=e.length;p<m;p++)Array.prototype.push.apply(d,e[p]);for(a=0,s=d.length;a<s;a++)l=d[a].x+":"+d[a].y,void 0!==f[l]&&console.warn("THREE.ShapeUtils: Duplicate point",l,a),f[l]=a;var v=function(t,e){for(var n,r,a,s,u,c,l,h,f,d,p,m=t.concat(),v=[],g=[],y=0,b=e.length;y<b;y++)v.push(y);for(var _=0,x=2*v.length;v.length>0;){if(--x<0){console.log("Infinite Loop! Holes left:"+v.length+", Probably Hole outside Shape!");break}for(a=_;a<m.length;a++){s=m[a],r=-1;for(var y=0;y<v.length;y++)if(c=v[y],l=s.x+":"+s.y+":"+c,void 0===g[l]){n=e[c];for(var w=0;w<n.length;w++)if(u=n[w],function(t,e){var r=m.length-1,i=t-1;i<0&&(i=r);var a=t+1;a>r&&(a=0);var s=o(m[t],m[i],m[a],n[e]);if(!s)return!1;var u=n.length-1,c=e-1;c<0&&(c=u);var l=e+1;return l>u&&(l=0),!!(s=o(n[e],n[c],n[l],m[t]))}(a,w)&&!function(t,e){var n,r,o;for(n=0;n<m.length;n++)if(r=n+1,r%=m.length,o=i(t,e,m[n],m[r],!0),o.length>0)return!0;return!1}(s,u)&&!function(t,n){var r,o,a,s,u;for(r=0;r<v.length;r++)for(o=e[v[r]],a=0;a<o.length;a++)if(s=a+1,s%=o.length,u=i(t,n,o[a],o[s],!0),u.length>0)return!0;return!1}(s,u)){r=w,v.splice(y,1),h=m.slice(0,a+1),f=m.slice(a),d=n.slice(r),p=n.slice(0,r+1),m=h.concat(d).concat(p).concat(f),_=a;break}if(r>=0)break;g[l]=!0}if(r>=0)break}}return m}(t,e),g=zs.triangulate(v,!1);for(a=0,s=g.length;a<s;a++)for(c=g[a],u=0;u<3;u++)l=c[u].x+":"+c[u].y,void 0!==(h=f[l])&&(c[u]=h);return g.concat()},isClockWise:function(t){return zs.area(t)<0}};nn.prototype=Object.create(Ot.prototype),nn.prototype.constructor=nn,rn.prototype=Object.create(Ct.prototype),rn.prototype.constructor=rn,rn.prototype.getArrays=function(){var t=this.getAttribute("position"),e=t?Array.prototype.slice.call(t.array):[],n=this.getAttribute("uv"),r=n?Array.prototype.slice.call(n.array):[],i=this.index;return{position:e,uv:r,index:i?Array.prototype.slice.call(i.array):[]}},rn.prototype.addShapeList=function(t,e){var n=t.length;e.arrays=this.getArrays();for(var r=0;r<n;r++){var i=t[r];this.addShape(i,e)}this.setIndex(e.arrays.index),this.addAttribute("position",new Mt(e.arrays.position,3)),this.addAttribute("uv",new Mt(e.arrays.uv,2))},rn.prototype.addShape=function(t,e){function n(t,e,n){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(n).add(t)}function r(t,e,n){var r,o,a=1,s=t.x-e.x,u=t.y-e.y,c=n.x-t.x,l=n.y-t.y,h=s*s+u*u,f=s*l-u*c;if(Math.abs(f)>Number.EPSILON){var d=Math.sqrt(h),p=Math.sqrt(c*c+l*l),m=e.x-u/d,v=e.y+s/d,g=n.x-l/p,y=n.y+c/p,b=((g-m)*l-(y-v)*c)/(s*l-u*c);r=m+s*b-t.x,o=v+u*b-t.y;var _=r*r+o*o;if(_<=2)return new i(r,o);a=Math.sqrt(_/2)}else{var x=!1;s>Number.EPSILON?c>Number.EPSILON&&(x=!0):s<-Number.EPSILON?c<-Number.EPSILON&&(x=!0):Math.sign(u)===Math.sign(l)&&(x=!0),x?(r=-u,o=s,a=Math.sqrt(h)):(r=s,o=u,a=Math.sqrt(h/2))}return new i(r/a,o/a)}function o(t,e){var n,r;for(Q=t.length;--Q>=0;){n=Q,r=Q-1,r<0&&(r=t.length-1);var i=0,o=O+2*T;for(i=0;i<o;i++){var a=Y*i,s=Y*(i+1);u(e+n+a,e+r+a,e+r+s,e+n+s,t,i,o,n,r)}}}function a(t,e,n){x.push(t),x.push(e),x.push(n)}function s(t,e,n){c(t),c(e),c(n);var r=y.length/3,i=L.generateTopUV(I,y,r-3,r-2,r-1);h(i[0]),h(i[1]),h(i[2])}function u(t,e,n,r,i,o,a,s,u){c(t),c(e),c(r),c(e),c(n),c(r);var l=y.length/3,f=L.generateSideWallUV(I,y,l-6,l-3,l-2,l-1);h(f[0]),h(f[1]),h(f[3]),h(f[1]),h(f[2]),h(f[3])}function c(t){b.push(y.length/3),y.push(x[3*t+0]),y.push(x[3*t+1]),y.push(x[3*t+2])}function h(t){_.push(t.x),_.push(t.y)}var f,d,p,m,v,g=e.arrays?e.arrays:this.getArrays(),y=g.position,b=g.index,_=g.uv,x=[],w=void 0!==e.amount?e.amount:100,M=void 0!==e.bevelThickness?e.bevelThickness:6,E=void 0!==e.bevelSize?e.bevelSize:M-2,T=void 0!==e.bevelSegments?e.bevelSegments:3,S=void 0===e.bevelEnabled||e.bevelEnabled,A=void 0!==e.curveSegments?e.curveSegments:12,O=void 0!==e.steps?e.steps:1,C=e.extrudePath,R=!1,L=void 0!==e.UVGenerator?e.UVGenerator:nn.WorldUVGenerator;C&&(f=C.getSpacedPoints(O),R=!0,S=!1,d=void 0!==e.frames?e.frames:C.computeFrenetFrames(O,!1),p=new l,m=new l,v=new l),S||(T=0,M=0,E=0);var j,P,N,I=this,U=t.extractPoints(A),D=U.shape,k=U.holes,F=!zs.isClockWise(D);if(F){for(D=D.reverse(),P=0,N=k.length;P<N;P++)j=k[P],zs.isClockWise(j)&&(k[P]=j.reverse());F=!1}var B=zs.triangulateShape(D,k),z=D;for(P=0,N=k.length;P<N;P++)j=k[P],D=D.concat(j);for(var G,H,V,W,X,q,Y=D.length,Z=B.length,J=[],Q=0,K=z.length,$=K-1,tt=Q+1;Q<K;Q++,$++,tt++)$===K&&($=0),tt===K&&(tt=0),J[Q]=r(z[Q],z[$],z[tt]);var et,nt=[],rt=J.concat();for(P=0,N=k.length;P<N;P++){for(j=k[P],et=[],Q=0,K=j.length,$=K-1,tt=Q+1;Q<K;Q++,$++,tt++)$===K&&($=0),tt===K&&(tt=0),et[Q]=r(j[Q],j[$],j[tt]);nt.push(et),rt=rt.concat(et)}for(G=0;G<T;G++){for(V=G/T,W=M*Math.cos(V*Math.PI/2),H=E*Math.sin(V*Math.PI/2),Q=0,K=z.length;Q<K;Q++)X=n(z[Q],J[Q],H),a(X.x,X.y,-W);for(P=0,N=k.length;P<N;P++)for(j=k[P],et=nt[P],Q=0,K=j.length;Q<K;Q++)X=n(j[Q],et[Q],H),a(X.x,X.y,-W)}for(H=E,Q=0;Q<Y;Q++)X=S?n(D[Q],rt[Q],H):D[Q],R?(m.copy(d.normals[0]).multiplyScalar(X.x),p.copy(d.binormals[0]).multiplyScalar(X.y),v.copy(f[0]).add(m).add(p),a(v.x,v.y,v.z)):a(X.x,X.y,0);var it;for(it=1;it<=O;it++)for(Q=0;Q<Y;Q++)X=S?n(D[Q],rt[Q],H):D[Q],R?(m.copy(d.normals[it]).multiplyScalar(X.x),p.copy(d.binormals[it]).multiplyScalar(X.y),v.copy(f[it]).add(m).add(p),a(v.x,v.y,v.z)):a(X.x,X.y,w/O*it);for(G=T-1;G>=0;G--){for(V=G/T,W=M*Math.cos(V*Math.PI/2),H=E*Math.sin(V*Math.PI/2),Q=0,K=z.length;Q<K;Q++)X=n(z[Q],J[Q],H),a(X.x,X.y,w+W);for(P=0,N=k.length;P<N;P++)for(j=k[P],et=nt[P],Q=0,K=j.length;Q<K;Q++)X=n(j[Q],et[Q],H),R?a(X.x,X.y+f[O-1].y,f[O-1].x+W):a(X.x,X.y,w+W)}!function(){var t=y.length/3;if(S){var n=0,r=Y*n;for(Q=0;Q<Z;Q++)q=B[Q],s(q[2]+r,q[1]+r,q[0]+r);for(n=O+2*T,r=Y*n,Q=0;Q<Z;Q++)q=B[Q],s(q[0]+r,q[1]+r,q[2]+r)}else{for(Q=0;Q<Z;Q++)q=B[Q],s(q[2],q[1],q[0]);for(Q=0;Q<Z;Q++)q=B[Q],s(q[0]+Y*O,q[1]+Y*O,q[2]+Y*O)}I.addGroup(t,y.length/3-t,void 0!==e.material?e.material:0)}(),function(){var t=y.length/3,n=0;for(o(z,n),n+=z.length,P=0,N=k.length;P<N;P++)j=k[P],o(j,n),n+=j.length;I.addGroup(t,y.length/3-t,void 0!==e.extrudeMaterial?e.extrudeMaterial:1)}(),e.arrays||(this.setIndex(b),this.addAttribute("position",new Mt(y,3)),this.addAttribute("uv",new Mt(e.arrays.uv,2)))},nn.WorldUVGenerator={generateTopUV:function(t,e,n,r,o){var a=e[3*n],s=e[3*n+1],u=e[3*r],c=e[3*r+1],l=e[3*o],h=e[3*o+1];return[new i(a,s),new i(u,c),new i(l,h)]},generateSideWallUV:function(t,e,n,r,o,a){var s=e[3*n],u=e[3*n+1],c=e[3*n+2],l=e[3*r],h=e[3*r+1],f=e[3*r+2],d=e[3*o],p=e[3*o+1],m=e[3*o+2],v=e[3*a],g=e[3*a+1],y=e[3*a+2];return Math.abs(u-h)<.01?[new i(s,1-c),new i(l,1-f),new i(d,1-m),new i(v,1-y)]:[new i(u,1-c),new i(h,1-f),new i(p,1-m),new i(g,1-y)]}},on.prototype=Object.create(Ot.prototype),on.prototype.constructor=on,an.prototype=Object.create(rn.prototype),an.prototype.constructor=an,sn.prototype=Object.create(Ot.prototype),sn.prototype.constructor=sn,un.prototype=Object.create(Ct.prototype),un.prototype.constructor=un,cn.prototype=Object.create(Ot.prototype),cn.prototype.constructor=cn,ln.prototype=Object.create(Ct.prototype),ln.prototype.constructor=ln,hn.prototype=Object.create(Ot.prototype),hn.prototype.constructor=hn,fn.prototype=Object.create(Ct.prototype),fn.prototype.constructor=fn,dn.prototype=Object.create(Ot.prototype),dn.prototype.constructor=dn,pn.prototype=Object.create(Ct.prototype),pn.prototype.constructor=pn,mn.prototype=Object.create(Ct.prototype),mn.prototype.constructor=mn,vn.prototype=Object.create(Ot.prototype),vn.prototype.constructor=vn,gn.prototype=Object.create(Ct.prototype),gn.prototype.constructor=gn,yn.prototype=Object.create(vn.prototype),yn.prototype.constructor=yn,bn.prototype=Object.create(gn.prototype),bn.prototype.constructor=bn,_n.prototype=Object.create(Ot.prototype),_n.prototype.constructor=_n,xn.prototype=Object.create(Ct.prototype),xn.prototype.constructor=xn;var Gs=Object.freeze({WireframeGeometry:De,ParametricGeometry:ke,ParametricBufferGeometry:Fe,TetrahedronGeometry:Ge,TetrahedronBufferGeometry:He,OctahedronGeometry:Ve,OctahedronBufferGeometry:We,IcosahedronGeometry:Xe,IcosahedronBufferGeometry:qe,DodecahedronGeometry:Ye,DodecahedronBufferGeometry:Ze,PolyhedronGeometry:Be,PolyhedronBufferGeometry:ze,TubeGeometry:Je,TubeBufferGeometry:Qe,TorusKnotGeometry:Ke,TorusKnotBufferGeometry:$e,TorusGeometry:tn,TorusBufferGeometry:en,TextGeometry:on,TextBufferGeometry:an,SphereGeometry:sn,SphereBufferGeometry:un,RingGeometry:cn,RingBufferGeometry:ln,PlaneGeometry:Pt,PlaneBufferGeometry:Nt,LatheGeometry:hn,LatheBufferGeometry:fn,ShapeGeometry:dn,ShapeBufferGeometry:pn,ExtrudeGeometry:nn,ExtrudeBufferGeometry:rn,EdgesGeometry:mn,ConeGeometry:yn,ConeBufferGeometry:bn,CylinderGeometry:vn,CylinderBufferGeometry:gn,CircleGeometry:_n,CircleBufferGeometry:xn,BoxGeometry:Lt,BoxBufferGeometry:jt});wn.prototype=Object.create($.prototype),wn.prototype.constructor=wn,wn.prototype.isShadowMaterial=!0,Mn.prototype=Object.create($.prototype),Mn.prototype.constructor=Mn,Mn.prototype.isRawShaderMaterial=!0,En.prototype=Object.create(K.prototype),En.prototype.constructor=En,En.prototype.isMeshStandardMaterial=!0,En.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Tn.prototype=Object.create(En.prototype),Tn.prototype.constructor=Tn,Tn.prototype.isMeshPhysicalMaterial=!0,Tn.prototype.copy=function(t){return En.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Sn.prototype=Object.create(K.prototype),Sn.prototype.constructor=Sn,Sn.prototype.isMeshPhongMaterial=!0,Sn.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},An.prototype=Object.create(Sn.prototype),An.prototype.constructor=An,An.prototype.isMeshToonMaterial=!0,An.prototype.copy=function(t){return Sn.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},On.prototype=Object.create(K.prototype),On.prototype.constructor=On,On.prototype.isMeshNormalMaterial=!0,On.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Cn.prototype=Object.create(K.prototype),Cn.prototype.constructor=Cn,Cn.prototype.isMeshLambertMaterial=!0,Cn.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Rn.prototype=Object.create(K.prototype),Rn.prototype.constructor=Rn,Rn.prototype.isLineDashedMaterial=!0,Rn.prototype.copy=function(t){return K.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var Hs=Object.freeze({ShadowMaterial:wn,SpriteMaterial:_e,RawShaderMaterial:Mn,ShaderMaterial:$,PointsMaterial:Re,MeshPhysicalMaterial:Tn,MeshStandardMaterial:En,MeshPhongMaterial:Sn,MeshToonMaterial:An,MeshNormalMaterial:On,MeshLambertMaterial:Cn,MeshDepthMaterial:tt,MeshBasicMaterial:pt,LineDashedMaterial:Rn,LineBasicMaterial:Se,Material:K}),Vs={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},Ws=new Ln;Object.assign(jn.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Vs.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=/^data:(.*?)(;base64)?,(.*)$/,s=t.match(a);if(s){var u=s[1],c=!!s[2],l=s[3];l=window.decodeURIComponent(l),c&&(l=window.atob(l));try{var h,f=(this.responseType||"").toLowerCase();switch(f){case"arraybuffer":case"blob":h=new ArrayBuffer(l.length);for(var d=new Uint8Array(h),p=0;p<l.length;p++)d[p]=l.charCodeAt(p);"blob"===f&&(h=new Blob([h],{type:u}));break;case"document":var m=new DOMParser;h=m.parseFromString(l,u);break;case"json":h=JSON.parse(l);break;default:h=l}window.setTimeout(function(){e&&e(h),i.manager.itemEnd(t)},0)}catch(e){window.setTimeout(function(){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},0)}}else{var v=new XMLHttpRequest;v.open("GET",t,!0),v.addEventListener("load",function(n){var o=n.target.response;Vs.add(t,o),200===this.status?(e&&e(o),i.manager.itemEnd(t)):0===this.status?(console.warn("THREE.FileLoader: HTTP Status 0 received."),e&&e(o),i.manager.itemEnd(t)):(r&&r(n),i.manager.itemEnd(t),i.manager.itemError(t))},!1),void 0!==n&&v.addEventListener("progress",function(t){n(t)},!1),v.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),void 0!==this.responseType&&(v.responseType=this.responseType),void 0!==this.withCredentials&&(v.withCredentials=this.withCredentials),v.overrideMimeType&&v.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(var g in this.requestHeader)v.setRequestHeader(g,this.requestHeader[g]);v.send(null)}return i.manager.itemStart(t),v},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Pn.prototype,{load:function(t,e,n,r){var i=this,o=[],a=new Ne;a.image=o;var s=new jn(this.manager);if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var u=0,c=0,l=t.length;c<l;++c)!function(c){s.load(t[c],function(t){var n=i._parser(t,!0);o[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(u+=1)&&(1===n.mipmapCount&&(a.minFilter=Ma),a.format=n.format,a.needsUpdate=!0,e&&e(a))},n,r)}(c);else s.load(t,function(t){var n=i._parser(t,!0);if(n.isCubemap)for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var u=0;u<n.mipmapCount;u++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+u]),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=Ma),a.format=n.format,a.needsUpdate=!0,e&&e(a)},n,r);return a},setPath:function(t){return this.path=t,this}}),Object.assign(Nn.prototype,{load:function(t,e,n,r){var i=this,o=new f,a=new jn(this.manager);return a.setResponseType("arraybuffer"),a.load(t,function(t){var n=i._parser(t);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:ya,o.wrapT=void 0!==n.wrapT?n.wrapT:ya,o.magFilter=void 0!==n.magFilter?n.magFilter:Ma,o.minFilter=void 0!==n.minFilter?n.minFilter:Ta,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=Ma),o.needsUpdate=!0,e&&e(o,n))},n,r),o}}),Object.assign(In.prototype,{load:function(t,e,n,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t);var i=this,o=Vs.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout(function(){e&&e(o),i.manager.itemEnd(t)},0),o;var a=document.createElementNS("http://www.w3.org/1999/xhtml","img");return a.addEventListener("load",function(){Vs.add(t,this),e&&e(this),i.manager.itemEnd(t)},!1),a.addEventListener("error",function(e){r&&r(e),i.manager.itemEnd(t),i.manager.itemError(t)},!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(t),a.src=t,a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Un.prototype,{load:function(t,e,n,r){var i=new d,o=new In(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);for(var a=0,s=0;s<t.length;++s)!function(n){o.load(t[n],function(t){i.images[n]=t,6==++a&&(i.needsUpdate=!0,e&&e(i))},void 0,r)}(s);return i},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Dn.prototype,{load:function(t,e,n,r){var i=new In(this.manager);i.setCrossOrigin(this.crossOrigin),i.setPath(this.path);var a=new o;return a.image=i.load(t,function(){var n=t.search(/\.(jpg|jpeg)$/)>0||0===t.search(/^data\:image\/jpeg/);a.format=n?Fa:Ba,a.needsUpdate=!0,void 0!==e&&e(a)},n,r),a},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),kn.prototype=Object.assign(Object.create(lt.prototype),{constructor:kn,isLight:!0,copy:function(t){return lt.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=lt.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),Fn.prototype=Object.assign(Object.create(kn.prototype),{constructor:Fn,isHemisphereLight:!0,copy:function(t){return kn.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(Bn.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),zn.prototype=Object.assign(Object.create(Bn.prototype),{constructor:zn,isSpotLightShadow:!0,update:function(t){var e=this.camera,n=2*Ms.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||e.far;n===e.fov&&r===e.aspect&&i===e.far||(e.fov=n,e.aspect=r,e.far=i,e.updateProjectionMatrix())}}),Gn.prototype=Object.assign(Object.create(kn.prototype),{constructor:Gn,isSpotLight:!0,copy:function(t){return kn.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Hn.prototype=Object.assign(Object.create(kn.prototype),{constructor:Hn,isPointLight:!0,copy:function(t){return kn.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),Vn.prototype=Object.assign(Object.create(Bn.prototype),{constructor:Vn}),Wn.prototype=Object.assign(Object.create(kn.prototype),{constructor:Wn,isDirectionalLight:!0,copy:function(t){return kn.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Xn.prototype=Object.assign(Object.create(kn.prototype),{constructor:Xn,isAmbientLight:!0}),qn.prototype=Object.assign(Object.create(kn.prototype),{constructor:qn,isRectAreaLight:!0,copy:function(t){return kn.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=kn.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}});var Xs={arraySlice:function(t,e,n){return Xs.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==n?n:t.length)):t.slice(e,n)},convertArray:function(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){function e(e,n){return t[e]-t[n]}for(var n=t.length,r=new Array(n),i=0;i!==n;++i)r[i]=i;return r.sort(e),r},sortedArray:function(t,e,n){for(var r=t.length,i=new t.constructor(r),o=0,a=0;a!==r;++o)for(var s=n[o]*e,u=0;u!==e;++u)i[a++]=t[s+u];return i},flattenJSON:function(t,e,n,r){for(var i=1,o=t[0];void 0!==o&&void 0===o[r];)o=t[i++];if(void 0!==o){var a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(e.push(o.time),n.push.apply(n,a)),o=t[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(e.push(o.time),n.push(a)),o=t[i++]}while(void 0!==o)}}};Object.assign(Yn.prototype,{evaluate:function(t){var e=this.parameterPositions,n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{var o;n:{r:if(!(t<r)){for(var a=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,t,i)}if(n===a)break;if(i=r,r=e[++n],t<r)break e}o=e.length;break n}{if(t>=i)break t;var s=e[1];t<s&&(n=2,i=s);for(var a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(n===a)break;if(r=i,i=e[--n-1],t>=i)break e}o=n,n=0}}for(;n<o;){var u=n+o>>>1;t<e[u]?o=u:n=u+1}if(r=e[n],void 0===(i=e[n-1]))return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return n=e.length,this._cachedIndex=n,this.afterEnd_(n-1,i,t)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r,o=0;o!==r;++o)e[o]=n[i+o];return e},interpolate_:function(t,e,n,r){throw new Error("call to abstract method")},intervalChanged_:function(t,e,n){}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(Yn.prototype,{beforeStart_:Yn.prototype.copySampleValue_,afterEnd_:Yn.prototype.copySampleValue_}),Zn.prototype=Object.assign(Object.create(Yn.prototype),{constructor:Zn,DefaultSettings_:{endingStart:ss,endingEnd:ss},intervalChanged_:function(t,e,n){var r=this.parameterPositions,i=t-2,o=t+1,a=r[i],s=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case us:i=t,a=2*e-n;break;case cs:i=r.length-2,a=e+r[i]-r[i+1];break;default:i=t,a=n}if(void 0===s)switch(this.getSettings_().endingEnd){case us:o=t,s=2*n-e;break;case cs:o=1,s=n+r[1]-r[0];break;default:o=t-1,s=e}var u=.5*(n-e),c=this.valueSize;this._weightPrev=u/(e-a),this._weightNext=u/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c},interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,u=s-a,c=this._offsetPrev,l=this._offsetNext,h=this._weightPrev,f=this._weightNext,d=(n-e)/(r-e),p=d*d,m=p*d,v=-h*m+2*h*p-h*d,g=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*d+1,y=(-1-f)*m+(1.5+f)*p+.5*d,b=f*m-f*p,_=0;_!==a;++_)i[_]=v*o[c+_]+g*o[u+_]+y*o[s+_]+b*o[l+_];return i}}),Jn.prototype=Object.assign(Object.create(Yn.prototype),{constructor:Jn,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,u=s-a,c=(n-e)/(r-e),l=1-c,h=0;h!==a;++h)i[h]=o[u+h]*l+o[s+h]*c;return i}}),Qn.prototype=Object.assign(Object.create(Yn.prototype),{constructor:Qn,interpolate_:function(t,e,n,r){return this.copySampleValue_(t-1)}});var qs;qs={TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:os,InterpolantFactoryMethodDiscrete:function(t){return new Qn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Jn(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new Zn(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case is:e=this.InterpolantFactoryMethodDiscrete;break;case os:e=this.InterpolantFactoryMethodLinear;break;case as:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){var n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(n);this.setInterpolation(this.DefaultInterpolation)}return void console.warn(n)}this.createInterpolant=e},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return is;case this.InterpolantFactoryMethodLinear:return os;case this.InterpolantFactoryMethodSmooth:return as}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,n=0,r=e.length;n!==r;++n)e[n]*=t;return this},trim:function(t,e){for(var n=this.times,r=n.length,i=0,o=r-1;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);var a=this.getValueSize();this.times=Xs.arraySlice(n,i,o),this.values=Xs.arraySlice(this.values,i*a,o*a)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("invalid value size in track",this),t=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("track is empty",this),t=!1);for(var o=null,a=0;a!==i;a++){var s=n[a];if("number"==typeof s&&isNaN(s)){console.error("time is not a valid number",this,a,s),t=!1;break}if(null!==o&&o>s){console.error("out of order keys",this,a,s,o),t=!1;break}o=s}if(void 0!==r&&Xs.isTypedArray(r))for(var a=0,u=r.length;a!==u;++a){var c=r[a];if(isNaN(c)){console.error("value is not a valid number",this,a,c),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,n=this.getValueSize(),r=this.getInterpolation()===as,i=1,o=t.length-1,a=1;a<o;++a){var s=!1,u=t[a];if(u!==t[a+1]&&(1!==a||u!==u[0]))if(r)s=!0;else for(var c=a*n,l=c-n,h=c+n,f=0;f!==n;++f){var d=e[c+f];if(d!==e[l+f]||d!==e[h+f]){s=!0;break}}if(s){if(a!==i){t[i]=t[a];for(var p=a*n,m=i*n,f=0;f!==n;++f)e[m+f]=e[p+f]}++i}}if(o>0){t[i]=t[o];for(var p=o*n,m=i*n,f=0;f!==n;++f)e[m+f]=e[p+f];++i}return i!==t.length&&(this.times=Xs.arraySlice(t,0,i),this.values=Xs.arraySlice(e,0,i*n)),this}},$n.prototype=Object.assign(Object.create(qs),{constructor:$n,ValueTypeName:"vector"}),tr.prototype=Object.assign(Object.create(Yn.prototype),{constructor:tr,interpolate_:function(t,e,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=t*a,u=(n-e)/(r-e),l=s+a;s!==l;s+=4)c.slerpFlat(i,0,o,s-a,o,s,u);return i}}),er.prototype=Object.assign(Object.create(qs),{constructor:er,ValueTypeName:"quaternion",DefaultInterpolation:os,InterpolantFactoryMethodLinear:function(t){return new tr(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),nr.prototype=Object.assign(Object.create(qs),{constructor:nr,ValueTypeName:"number"}),rr.prototype=Object.assign(Object.create(qs),{constructor:rr,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:is,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ir.prototype=Object.assign(Object.create(qs),{constructor:ir,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:is,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),or.prototype=Object.assign(Object.create(qs),{constructor:or,ValueTypeName:"color"}),ar.prototype=qs,qs.constructor=ar,Object.assign(ar,{parse:function(t){if(void 0===t.type)throw new Error("track type undefined, can not parse");var e=ar._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var n=[],r=[];Xs.flattenJSON(t.keys,n,r,"value"),t.times=n,t.values=r}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,n=t.constructor;if(void 0!==n.toJSON)e=n.toJSON(t);else{e={name:t.name,times:Xs.convertArray(t.times,Array),values:Xs.convertArray(t.values,Array)};var r=t.getInterpolation();r!==t.DefaultInterpolation&&(e.interpolation=r)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return nr;case"vector":case"vector2":case"vector3":case"vector4":return $n;case"color":return or;case"quaternion":return er;case"bool":case"boolean":return ir;case"string":return rr}throw new Error("Unsupported typeName: "+t)}}),Object.assign(sr,{parse:function(t){for(var e=[],n=t.tracks,r=1/(t.fps||1),i=0,o=n.length;i!==o;++i)e.push(ar.parse(n[i]).scale(r));return new sr(t.name,t.duration,e)},toJSON:function(t){for(var e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e},i=0,o=n.length;i!==o;++i)e.push(ar.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(t,e,n,r){for(var i=e.length,o=[],a=0;a<i;a++){var s=[],u=[];s.push((a+i-1)%i,a,(a+1)%i),u.push(0,1,0);var c=Xs.getKeyframeOrder(s);s=Xs.sortedArray(s,1,c),u=Xs.sortedArray(u,1,c),r||0!==s[0]||(s.push(i),u.push(u[0])),o.push(new nr(".morphTargetInfluences["+e[a].name+"]",s,u).scale(1/n))}return new sr(t,-1,o)},findByName:function(t,e){var n=t;if(!Array.isArray(t)){var r=t;n=r.geometry&&r.geometry.animations||r.animations}for(var i=0;i<n.length;i++)if(n[i].name===e)return n[i];return null},CreateClipsFromMorphTargetSequences:function(t,e,n){for(var r={},i=/^([\w-]*?)([\d]+)$/,o=0,a=t.length;o<a;o++){var s=t[o],u=s.name.match(i);if(u&&u.length>1){var c=u[1],l=r[c];l||(r[c]=l=[]),l.push(s)}}var h=[];for(var c in r)h.push(sr.CreateFromMorphTargetSequence(c,r[c],e,n));return h},parseAnimation:function(t,e){if(!t)return console.error(" no animation in JSONLoader data"),null;for(var n=function(t,e,n,r,i){if(0!==n.length){var o=[],a=[];Xs.flattenJSON(n,o,a,r),0!==o.length&&i.push(new t(e,o,a))}},r=[],i=t.name||"default",o=t.length||-1,a=t.fps||30,s=t.hierarchy||[],u=0;u<s.length;u++){var c=s[u].keys;if(c&&0!==c.length)if(c[0].morphTargets){for(var l={},h=0;h<c.length;h++)if(c[h].morphTargets)for(var f=0;f<c[h].morphTargets.length;f++)l[c[h].morphTargets[f]]=-1;for(var d in l){for(var p=[],m=[],f=0;f!==c[h].morphTargets.length;++f){var v=c[h];p.push(v.time),m.push(v.morphTarget===d?1:0)}r.push(new nr(".morphTargetInfluence["+d+"]",p,m))}o=l.length*(a||1)}else{var g=".bones["+e[u].name+"]";n($n,g+".position",c,"pos",r),n(er,g+".quaternion",c,"rot",r),n($n,g+".scale",c,"scl",r)}}return 0===r.length?null:new sr(i,o,r)}}),Object.assign(sr.prototype,{resetDuration:function(){for(var t=this.tracks,e=0,n=0,r=t.length;n!==r;++n){var i=this.tracks[n];e=Math.max(e,i.times[i.times.length-1])}this.duration=e},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(ur.prototype,{load:function(t,e,n,r){var i=this,o=new jn(i.manager);o.setResponseType("json"),o.load(t,function(t){e(i.parse(t))},n,r)},setTextures:function(t){this.textures=t},parse:function(t){function e(t){return void 0===n[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),n[t]}var n=this.textures,r=new Hs[t.type];if(void 0!==t.uuid&&(r.uuid=t.uuid),void 0!==t.name&&(r.name=t.name),void 0!==t.color&&r.color.setHex(t.color),void 0!==t.roughness&&(r.roughness=t.roughness),void 0!==t.metalness&&(r.metalness=t.metalness),void 0!==t.emissive&&r.emissive.setHex(t.emissive),void 0!==t.specular&&r.specular.setHex(t.specular),void 0!==t.shininess&&(r.shininess=t.shininess),void 0!==t.clearCoat&&(r.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(r.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(r.uniforms=t.uniforms),void 0!==t.vertexShader&&(r.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(r.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(r.vertexColors=t.vertexColors),void 0!==t.fog&&(r.fog=t.fog),void 0!==t.shading&&(r.shading=t.shading),void 0!==t.blending&&(r.blending=t.blending),void 0!==t.side&&(r.side=t.side),void 0!==t.opacity&&(r.opacity=t.opacity),void 0!==t.transparent&&(r.transparent=t.transparent),void 0!==t.alphaTest&&(r.alphaTest=t.alphaTest),void 0!==t.depthTest&&(r.depthTest=t.depthTest),void 0!==t.depthWrite&&(r.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(r.colorWrite=t.colorWrite),void 0!==t.wireframe&&(r.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(r.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(r.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(r.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.skinning&&(r.skinning=t.skinning),void 0!==t.morphTargets&&(r.morphTargets=t.morphTargets),void 0!==t.size&&(r.size=t.size),void 0!==t.sizeAttenuation&&(r.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(r.map=e(t.map)),void 0!==t.alphaMap&&(r.alphaMap=e(t.alphaMap),r.transparent=!0),void 0!==t.bumpMap&&(r.bumpMap=e(t.bumpMap)),void 0!==t.bumpScale&&(r.bumpScale=t.bumpScale),void 0!==t.normalMap&&(r.normalMap=e(t.normalMap)),void 0!==t.normalScale){var o=t.normalScale;!1===Array.isArray(o)&&(o=[o,o]),r.normalScale=(new i).fromArray(o)}return void 0!==t.displacementMap&&(r.displacementMap=e(t.displacementMap)),void 0!==t.displacementScale&&(r.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(r.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(r.roughnessMap=e(t.roughnessMap)),void 0!==t.metalnessMap&&(r.metalnessMap=e(t.metalnessMap)),void 0!==t.emissiveMap&&(r.emissiveMap=e(t.emissiveMap)),void 0!==t.emissiveIntensity&&(r.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(r.specularMap=e(t.specularMap)),void 0!==t.envMap&&(r.envMap=e(t.envMap)),void 0!==t.reflectivity&&(r.reflectivity=t.reflectivity),void 0!==t.lightMap&&(r.lightMap=e(t.lightMap)),void 0!==t.lightMapIntensity&&(r.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(r.aoMap=e(t.aoMap)),void 0!==t.aoMapIntensity&&(r.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(r.gradientMap=e(t.gradientMap)),r}}),Object.assign(cr.prototype,{load:function(t,e,n,r){var i=this,o=new jn(i.manager);o.setResponseType("json"),o.load(t,function(t){e(i.parse(t))},n,r)},parse:function(t){var e=new Ct,n=t.data.index;if(void 0!==n){var r=new Ys[n.type](n.array);e.setIndex(new mt(r,1))}var i=t.data.attributes;for(var o in i){var a=i[o],r=new Ys[a.type](a.array);e.addAttribute(o,new mt(r,a.itemSize,a.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var u=0,c=s.length;u!==c;++u){var h=s[u];e.addGroup(h.start,h.count,h.materialIndex)}var f=t.data.boundingSphere;if(void 0!==f){var d=new l;void 0!==f.center&&d.fromArray(f.center),e.boundingSphere=new nt(d,f.radius)}return e}});var Ys={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};lr.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,n=0,r=e.length;n<r;n+=2){var i=e[n],o=e[n+1];if(i.test(t))return o}return null}},Object.assign(lr.prototype,{crossOrigin:void 0,extractUrlBase:function(t){var e=t.split("/");return 1===e.length?"./":(e.pop(),e.join("/")+"/")},initMaterials:function(t,e,n){for(var r=[],i=0;i<t.length;++i)r[i]=this.createMaterial(t[i],e,n);return r},createMaterial:function(){var t={NoBlending:To,NormalBlending:So,AdditiveBlending:Ao,SubtractiveBlending:Oo,MultiplyBlending:Co,CustomBlending:Ro},e=new Y,n=new Dn,r=new ur;return function(i,o,a){function s(t,e,r,i,s){var c,l=o+t,h=lr.Handlers.get(l);null!==h?c=h.load(l):(n.setCrossOrigin(a),c=n.load(l)),void 0!==e&&(c.repeat.fromArray(e),1!==e[0]&&(c.wrapS=ga),1!==e[1]&&(c.wrapT=ga)),void 0!==r&&c.offset.fromArray(r),void 0!==i&&("repeat"===i[0]&&(c.wrapS=ga),"mirror"===i[0]&&(c.wrapS=ba),"repeat"===i[1]&&(c.wrapT=ga),"mirror"===i[1]&&(c.wrapT=ba)),void 0!==s&&(c.anisotropy=s);var f=Ms.generateUUID();return u[f]=c,f}var u={},c={uuid:Ms.generateUUID(),type:"MeshLambertMaterial"};for(var l in i){var h=i[l];switch(l){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":c.name=h;break;case"blending":c.blending=t[h];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",l,"is no longer supported.");break;case"colorDiffuse":c.color=e.fromArray(h).getHex();break;case"colorSpecular":c.specular=e.fromArray(h).getHex();break;case"colorEmissive":c.emissive=e.fromArray(h).getHex();break;case"specularCoef":c.shininess=h;break;case"shading":"basic"===h.toLowerCase()&&(c.type="MeshBasicMaterial"),"phong"===h.toLowerCase()&&(c.type="MeshPhongMaterial"),"standard"===h.toLowerCase()&&(c.type="MeshStandardMaterial");break;case"mapDiffuse":c.map=s(h,i.mapDiffuseRepeat,i.mapDiffuseOffset,i.mapDiffuseWrap,i.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":c.emissiveMap=s(h,i.mapEmissiveRepeat,i.mapEmissiveOffset,i.mapEmissiveWrap,i.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":c.lightMap=s(h,i.mapLightRepeat,i.mapLightOffset,i.mapLightWrap,i.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":c.aoMap=s(h,i.mapAORepeat,i.mapAOOffset,i.mapAOWrap,i.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":c.bumpMap=s(h,i.mapBumpRepeat,i.mapBumpOffset,i.mapBumpWrap,i.mapBumpAnisotropy);break;case"mapBumpScale":c.bumpScale=h;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":c.normalMap=s(h,i.mapNormalRepeat,i.mapNormalOffset,i.mapNormalWrap,i.mapNormalAnisotropy);break;case"mapNormalFactor":c.normalScale=[h,h];break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":c.specularMap=s(h,i.mapSpecularRepeat,i.mapSpecularOffset,i.mapSpecularWrap,i.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":c.metalnessMap=s(h,i.mapMetalnessRepeat,i.mapMetalnessOffset,i.mapMetalnessWrap,i.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":c.roughnessMap=s(h,i.mapRoughnessRepeat,i.mapRoughnessOffset,i.mapRoughnessWrap,i.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":c.alphaMap=s(h,i.mapAlphaRepeat,i.mapAlphaOffset,i.mapAlphaWrap,i.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":c.side=yo;break;case"doubleSided":c.side=bo;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),c.opacity=h;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":c[l]=h;break;case"vertexColors":!0===h&&(c.vertexColors=Eo),"face"===h&&(c.vertexColors=Mo);break;default:console.error("THREE.Loader.createMaterial: Unsupported",l,h)}}return"MeshBasicMaterial"===c.type&&delete c.emissive,"MeshPhongMaterial"!==c.type&&delete c.specular,c.opacity<1&&(c.transparent=!0),r.setTextures(u),r.parse(c)}}()}),Object.assign(hr.prototype,{load:function(t,e,n,r){var i=this,o=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:lr.prototype.extractUrlBase(t),a=new jn(this.manager);a.setResponseType("json"),a.setWithCredentials(this.withCredentials),a.load(t,function(n){var r=n.metadata;if(void 0!==r){var a=r.type;if(void 0!==a){if("object"===a.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");if("scene"===a.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.SceneLoader instead.")}}var s=i.parse(n,o);e(s.geometry,s.materials)},n,r)},setTexturePath:function(t){this.texturePath=t},parse:function(){function t(t,e){function n(t,e){return t&1<<e}var r,o,a,s,u,c,h,f,d,p,m,v,g,y,b,_,x,w,M,E,T,S,A,O,C,R,L,j=t.faces,P=t.vertices,N=t.normals,I=t.colors,U=t.scale,D=0;if(void 0!==t.uvs){for(r=0;r<t.uvs.length;r++)t.uvs[r].length&&D++;for(r=0;r<D;r++)e.faceVertexUvs[r]=[]}for(s=0,u=P.length;s<u;)w=new l,w.x=P[s++]*U,w.y=P[s++]*U,w.z=P[s++]*U,e.vertices.push(w);for(s=0,u=j.length;s<u;)if(p=j[s++],m=n(p,0),v=n(p,1),g=n(p,3),y=n(p,4),b=n(p,5),_=n(p,6),x=n(p,7),m){if(E=new dt,E.a=j[s],E.b=j[s+1],E.c=j[s+3],T=new dt,T.a=j[s+1],T.b=j[s+2],T.c=j[s+3],s+=4,v&&(d=j[s++],E.materialIndex=d,T.materialIndex=d),a=e.faces.length,g)for(r=0;r<D;r++)for(O=t.uvs[r],e.faceVertexUvs[r][a]=[],e.faceVertexUvs[r][a+1]=[],o=0;o<4;o++)f=j[s++],R=O[2*f],L=O[2*f+1],C=new i(R,L),2!==o&&e.faceVertexUvs[r][a].push(C),0!==o&&e.faceVertexUvs[r][a+1].push(C);if(y&&(h=3*j[s++],E.normal.set(N[h++],N[h++],N[h]),T.normal.copy(E.normal)),b)for(r=0;r<4;r++)h=3*j[s++],A=new l(N[h++],N[h++],N[h]),2!==r&&E.vertexNormals.push(A),0!==r&&T.vertexNormals.push(A);if(_&&(c=j[s++],S=I[c],E.color.setHex(S),T.color.setHex(S)),x)for(r=0;r<4;r++)c=j[s++],S=I[c],2!==r&&E.vertexColors.push(new Y(S)),0!==r&&T.vertexColors.push(new Y(S));e.faces.push(E),e.faces.push(T)}else{if(M=new dt,M.a=j[s++],M.b=j[s++],M.c=j[s++],v&&(d=j[s++],M.materialIndex=d),a=e.faces.length,g)for(r=0;r<D;r++)for(O=t.uvs[r],e.faceVertexUvs[r][a]=[],o=0;o<3;o++)f=j[s++],R=O[2*f],L=O[2*f+1],C=new i(R,L),e.faceVertexUvs[r][a].push(C);if(y&&(h=3*j[s++],M.normal.set(N[h++],N[h++],N[h])),b)for(r=0;r<3;r++)h=3*j[s++],A=new l(N[h++],N[h++],N[h]),M.vertexNormals.push(A);if(_&&(c=j[s++],M.color.setHex(I[c])),x)for(r=0;r<3;r++)c=j[s++],M.vertexColors.push(new Y(I[c]));e.faces.push(M)}}function e(t,e){var n=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var r=0,i=t.skinWeights.length;r<i;r+=n){var o=t.skinWeights[r],s=n>1?t.skinWeights[r+1]:0,u=n>2?t.skinWeights[r+2]:0,c=n>3?t.skinWeights[r+3]:0;e.skinWeights.push(new a(o,s,u,c))}if(t.skinIndices)for(var r=0,i=t.skinIndices.length;r<i;r+=n){var l=t.skinIndices[r],h=n>1?t.skinIndices[r+1]:0,f=n>2?t.skinIndices[r+2]:0,d=n>3?t.skinIndices[r+3]:0;e.skinIndices.push(new a(l,h,f,d))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}function n(t,e){var n=t.scale;if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r<i;r++){e.morphTargets[r]={},e.morphTargets[r].name=t.morphTargets[r].name,e.morphTargets[r].vertices=[];for(var o=e.morphTargets[r].vertices,a=t.morphTargets[r].vertices,s=0,u=a.length;s<u;s+=3){var c=new l;c.x=a[s]*n,c.y=a[s+1]*n,c.z=a[s+2]*n,o.push(c)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var h=e.faces,f=t.morphColors[0].colors,r=0,i=h.length;r<i;r++)h[r].color.fromArray(f,3*r)}}function r(t,e){var n=[],r=[];void 0!==t.animation&&r.push(t.animation),void 0!==t.animations&&(t.animations.length?r=r.concat(t.animations):r.push(t.animations));for(var i=0;i<r.length;i++){var o=sr.parseAnimation(r[i],e.bones);o&&n.push(o)}if(e.morphTargets){var a=sr.CreateClipsFromMorphTargetSequences(e.morphTargets,10);n=n.concat(a)}n.length>0&&(e.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 Ot;return t(i,a),e(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:lr.prototype.initMaterials(i.materials,o,this.crossOrigin)}}}()}),Object.assign(fr.prototype,{load:function(t,e,n,r){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var i=this;new jn(i.manager).load(t,function(n){var o=null;try{o=JSON.parse(n)}catch(e){return void 0!==r&&r(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.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 "+t+". Use THREE.JSONLoader instead.");i.parse(o,e)},n,r)},setTexturePath:function(t){this.texturePath=t},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t,e){var n=this.parseGeometries(t.geometries),r=this.parseImages(t.images,function(){void 0!==e&&e(a)}),i=this.parseTextures(t.textures,r),o=this.parseMaterials(t.materials,i),a=this.parseObject(t.object,n,o);return t.animations&&(a.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(a),a},parseGeometries:function(t){var e={};if(void 0!==t)for(var n=new hr,r=new cr,i=0,o=t.length;i<o;i++){var a,s=t[i];switch(s.type){case"PlaneGeometry":case"PlaneBufferGeometry":a=new Gs[s.type](s.width,s.height,s.widthSegments,s.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":a=new Gs[s.type](s.width,s.height,s.depth,s.widthSegments,s.heightSegments,s.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":a=new Gs[s.type](s.radius,s.segments,s.thetaStart,s.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":a=new Gs[s.type](s.radiusTop,s.radiusBottom,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":a=new Gs[s.type](s.radius,s.height,s.radialSegments,s.heightSegments,s.openEnded,s.thetaStart,s.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":a=new Gs[s.type](s.radius,s.widthSegments,s.heightSegments,s.phiStart,s.phiLength,s.thetaStart,s.thetaLength);break;case"DodecahedronGeometry":case"IcosahedronGeometry":case"OctahedronGeometry":case"TetrahedronGeometry":a=new Gs[s.type](s.radius,s.detail);break;case"RingGeometry":case"RingBufferGeometry":a=new Gs[s.type](s.innerRadius,s.outerRadius,s.thetaSegments,s.phiSegments,s.thetaStart,s.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":a=new Gs[s.type](s.radius,s.tube,s.radialSegments,s.tubularSegments,s.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":a=new Gs[s.type](s.radius,s.tube,s.tubularSegments,s.radialSegments,s.p,s.q);break;case"LatheGeometry":case"LatheBufferGeometry":a=new Gs[s.type](s.points,s.segments,s.phiStart,s.phiLength);break;case"BufferGeometry":a=r.parse(s);break;case"Geometry":a=n.parse(s,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+s.type+'"');continue}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),e[s.uuid]=a}return e},parseMaterials:function(t,e){var n={};if(void 0!==t){var r=new ur;r.setTextures(e);for(var i=0,o=t.length;i<o;i++){var a=t[i];if("MultiMaterial"===a.type){for(var s=[],u=0;u<a.materials.length;u++)s.push(r.parse(a.materials[u]));n[a.uuid]=s}else n[a.uuid]=r.parse(a)}}return n},parseAnimations:function(t){for(var e=[],n=0;n<t.length;n++){var r=sr.parse(t[n]);e.push(r)}return e},parseImages:function(t,e){var n=this,r={};if(void 0!==t&&t.length>0){var i=new Ln(e),o=new In(i);o.setCrossOrigin(this.crossOrigin);for(var a=0,s=t.length;a<s;a++){var u=t[a],c=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u.url)?u.url:n.texturePath+u.url;r[u.uuid]=function(t){return n.manager.itemStart(t),o.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemEnd(t),n.manager.itemError(t)})}(c)}}return r},parseTextures:function(t,e){function n(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var r={};if(void 0!==t)for(var i=0,a=t.length;i<a;i++){var s=t[i];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===e[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var u=new o(e[s.image]);u.needsUpdate=!0,u.uuid=s.uuid,void 0!==s.name&&(u.name=s.name),void 0!==s.mapping&&(u.mapping=n(s.mapping,Zs)),void 0!==s.offset&&u.offset.fromArray(s.offset),void 0!==s.repeat&&u.repeat.fromArray(s.repeat),void 0!==s.wrap&&(u.wrapS=n(s.wrap[0],Js),u.wrapT=n(s.wrap[1],Js)),void 0!==s.minFilter&&(u.minFilter=n(s.minFilter,Qs)),void 0!==s.magFilter&&(u.magFilter=n(s.magFilter,Qs)),void 0!==s.anisotropy&&(u.anisotropy=s.anisotropy),void 0!==s.flipY&&(u.flipY=s.flipY),r[s.uuid]=u}return r},parseObject:function(){var t=new h;return function(e,n,r){function i(t){return void 0===n[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),n[t]}function o(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],n=0,i=t.length;n<i;n++){var o=t[n];void 0===r[o]&&console.warn("THREE.ObjectLoader: Undefined material",o),e.push(r[o])}return e}return void 0===r[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),r[t]}}var a;switch(e.type){case"Scene":a=new ye,void 0!==e.background&&Number.isInteger(e.background)&&(a.background=new Y(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?a.fog=new ge(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new ve(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":a=new Ut(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(a.focus=e.focus),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.filmGauge&&(a.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(a.filmOffset=e.filmOffset),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new Dt(e.left,e.right,e.top,e.bottom,e.near,e.far);break;case"AmbientLight":a=new Xn(e.color,e.intensity);break;case"DirectionalLight":a=new Wn(e.color,e.intensity);break;case"PointLight":a=new Hn(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new qn(e.color,e.intensity,e.width,e.height);break;case"SpotLight":a=new Gn(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":a=new Fn(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var s=i(e.geometry),u=o(e.material);a=s.bones&&s.bones.length>0?new Te(s,u):new Rt(s,u);break;case"LOD":a=new we;break;case"Line":a=new Ae(i(e.geometry),o(e.material),e.mode);break;case"LineLoop":a=new Ce(i(e.geometry),o(e.material));break;case"LineSegments":a=new Oe(i(e.geometry),o(e.material));break;case"PointCloud":case"Points":a=new Le(i(e.geometry),o(e.material));break;case"Sprite":a=new xe(o(e.material));break;case"Group":a=new je;break;default:a=new lt}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.children)for(var c in e.children)a.add(this.parseObject(e.children[c],n,r));if("LOD"===e.type)for(var l=e.levels,h=0;h<l.length;h++){var f=l[h],c=a.getObjectByProperty("uuid",f.object);void 0!==c&&a.addLevel(c,f.distance)}return a}}()});var Zs={UVMapping:ca,CubeReflectionMapping:la,CubeRefractionMapping:ha,EquirectangularReflectionMapping:fa,EquirectangularRefractionMapping:da,SphericalReflectionMapping:pa,CubeUVReflectionMapping:ma,CubeUVRefractionMapping:va},Js={RepeatWrapping:ga,ClampToEdgeWrapping:ya,MirroredRepeatWrapping:ba},Qs={NearestFilter:_a,NearestMipMapNearestFilter:xa,NearestMipMapLinearFilter:wa,LinearFilter:Ma,LinearMipMapNearestFilter:Ea,LinearMipMapLinearFilter:Ta};Object.assign(Mr.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t){var e=this.getUtoTmapping(t);return this.getPoint(e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,n,r=[],i=this.getPoint(0),o=0;for(r.push(0),n=1;n<=t;n++)e=this.getPoint(n/t),o+=e.distanceTo(i),r.push(o),i=e;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var n,r=this.getLengths(),i=0,o=r.length;n=e||t*r[o-1];for(var a,s=0,u=o-1;s<=u;)if(i=Math.floor(s+(u-s)/2),(a=r[i]-n)<0)s=i+1;else{if(!(a>0)){u=i;break}u=i-1}if(i=u,r[i]===n)return i/(o-1);var c=r[i];return(i+(n-c)/(r[i+1]-c))/(o-1)},getTangent:function(t){var e=t-1e-4,n=t+1e-4;e<0&&(e=0),n>1&&(n=1);var r=this.getPoint(e);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var n,r,i,o=new l,a=[],s=[],u=[],c=new l,f=new h;for(n=0;n<=t;n++)r=n/t,a[n]=this.getTangentAt(r),a[n].normalize();s[0]=new l,u[0]=new l;var d=Number.MAX_VALUE,p=Math.abs(a[0].x),m=Math.abs(a[0].y),v=Math.abs(a[0].z);for(p<=d&&(d=p,o.set(1,0,0)),m<=d&&(d=m,o.set(0,1,0)),v<=d&&o.set(0,0,1),c.crossVectors(a[0],o).normalize(),s[0].crossVectors(a[0],c),u[0].crossVectors(a[0],s[0]),n=1;n<=t;n++)s[n]=s[n-1].clone(),u[n]=u[n-1].clone(),c.crossVectors(a[n-1],a[n]),c.length()>Number.EPSILON&&(c.normalize(),i=Math.acos(Ms.clamp(a[n-1].dot(a[n]),-1,1)),s[n].applyMatrix4(f.makeRotationAxis(c,i))),u[n].crossVectors(a[n],s[n]);if(!0===e)for(i=Math.acos(Ms.clamp(s[0].dot(s[t]),-1,1)),i/=t,a[0].dot(c.crossVectors(s[0],s[t]))>0&&(i=-i),n=1;n<=t;n++)s[n].applyMatrix4(f.makeRotationAxis(a[n],i*n)),u[n].crossVectors(a[n],s[n]);return{tangents:a,normals:s,binormals:u}}}),Er.prototype=Object.create(Mr.prototype),Er.prototype.constructor=Er,Er.prototype.isLineCurve=!0,Er.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(t).add(this.v1),e},Er.prototype.getPointAt=function(t){return this.getPoint(t)},Er.prototype.getTangent=function(t){return this.v2.clone().sub(this.v1).normalize()},Tr.prototype=Object.assign(Object.create(Mr.prototype),{constructor:Tr,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Er(e,t))},getPoint:function(t){for(var e=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=e){var i=n[r]-e,o=this.curves[r],a=o.getLength(),s=0===a?0:1-i/a;return o.getPointAt(s)}r++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.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 t=[],e=0,n=0,r=this.curves.length;n<r;n++)e+=this.curves[n].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],n=0;n<=t;n++)e.push(this.getPoint(n/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,n=[],r=0,i=this.curves;r<i.length;r++)for(var o=i[r],a=o&&o.isEllipseCurve?2*t:o&&o.isLineCurve?1:o&&o.isSplineCurve?t*o.points.length:t,s=o.getPoints(a),u=0;u<s.length;u++){var c=s[u];e&&e.equals(c)||(n.push(c),e=c)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},createPointsGeometry:function(t){var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){for(var e=new Ot,n=0,r=t.length;n<r;n++){var i=t[n];e.vertices.push(new l(i.x,i.y,i.z||0))}return e}}),Sr.prototype=Object.create(Mr.prototype),Sr.prototype.constructor=Sr,Sr.prototype.isEllipseCurve=!0,Sr.prototype.getPoint=function(t){for(var e=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;n<0;)n+=e;for(;n>e;)n-=e;n<Number.EPSILON&&(n=r?0:e),!0!==this.aClockwise||r||(n===e?n=-e:n-=e);var o=this.aStartAngle+t*n,a=this.aX+this.xRadius*Math.cos(o),s=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var u=Math.cos(this.aRotation),c=Math.sin(this.aRotation),l=a-this.aX,h=s-this.aY;a=l*u-h*c+this.aX,s=l*c+h*u+this.aY}return new i(a,s)},Ar.prototype=Object.create(Mr.prototype),Ar.prototype.constructor=Ar,Ar.prototype.isSplineCurve=!0,Ar.prototype.getPoint=function(t){var e=this.points,n=(e.length-1)*t,r=Math.floor(n),o=n-r,a=e[0===r?r:r-1],s=e[r],u=e[r>e.length-2?e.length-1:r+1],c=e[r>e.length-3?e.length-1:r+2];return new i(dr(o,a.x,s.x,u.x,c.x),dr(o,a.y,s.y,u.y,c.y))},Or.prototype=Object.create(Mr.prototype),Or.prototype.constructor=Or,Or.prototype.getPoint=function(t){var e=this.v0,n=this.v1,r=this.v2,o=this.v3;return new i(wr(t,e.x,n.x,r.x,o.x),wr(t,e.y,n.y,r.y,o.y))},Cr.prototype=Object.create(Mr.prototype),Cr.prototype.constructor=Cr,Cr.prototype.getPoint=function(t){var e=this.v0,n=this.v1,r=this.v2;return new i(gr(t,e.x,n.x,r.x),gr(t,e.y,n.y,r.y))};var Ks=Object.assign(Object.create(Tr.prototype),{fromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,n=t.length;e<n;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var n=new Er(this.currentPoint.clone(),new i(t,e));this.curves.push(n),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,n,r){var o=new Cr(this.currentPoint.clone(),new i(t,e),new i(n,r));this.curves.push(o),this.currentPoint.set(n,r)},bezierCurveTo:function(t,e,n,r,o,a){var s=new Or(this.currentPoint.clone(),new i(t,e),new i(n,r),new i(o,a));this.curves.push(s),this.currentPoint.set(o,a)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t),n=new Ar(e);this.curves.push(n),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+a,e+s,n,r,i,o)},absarc:function(t,e,n,r,i,o){this.absellipse(t,e,n,n,r,i,o)},ellipse:function(t,e,n,r,i,o,a,s){var u=this.currentPoint.x,c=this.currentPoint.y;this.absellipse(t+u,e+c,n,r,i,o,a,s)},absellipse:function(t,e,n,r,i,o,a,s){var u=new Sr(t,e,n,r,i,o,a,s);if(this.curves.length>0){var c=u.getPoint(0);c.equals(this.currentPoint)||this.lineTo(c.x,c.y)}this.curves.push(u);var l=u.getPoint(1);this.currentPoint.copy(l)}});Rr.prototype=Ks,Ks.constructor=Rr,Lr.prototype=Object.assign(Object.create(Ks),{constructor:Lr,getPointsHoles:function(t){for(var e=[],n=0,r=this.holes.length;n<r;n++)e[n]=this.holes[n].getPoints(t);return e},extractAllPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},extractPoints:function(t){return this.extractAllPoints(t)}}),Object.assign(jr.prototype,{moveTo:function(t,e){this.currentPath=new Rr,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,n,r){this.currentPath.quadraticCurveTo(t,e,n,r)},bezierCurveTo:function(t,e,n,r,i,o){this.currentPath.bezierCurveTo(t,e,n,r,i,o)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function n(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n],o=new Lr;o.curves=i.curves,e.push(o)}return e}var r=zs.isClockWise,i=this.subPaths;if(0===i.length)return[];if(!0===e)return n(i);var o,a,s,u=[];if(1===i.length)return a=i[0],s=new Lr,s.curves=a.curves,u.push(s),u;var c=!r(i[0].getPoints());c=t?!c:c;var l,h=[],f=[],d=[],p=0;f[p]=void 0,d[p]=[];for(var m=0,v=i.length;m<v;m++)a=i[m],l=a.getPoints(),o=r(l),o=t?!o:o,o?(!c&&f[p]&&p++,f[p]={s:new Lr,p:l},f[p].s.curves=a.curves,c&&p++,d[p]=[]):d[p].push({h:a,p:l[0]});if(!f[0])return n(i);if(f.length>1){for(var g=!1,y=[],b=0,_=f.length;b<_;b++)h[b]=[];for(var b=0,_=f.length;b<_;b++)for(var x=d[b],w=0;w<x.length;w++){for(var M=x[w],E=!0,T=0;T<f.length;T++)(function(t,e){for(var n=e.length,r=!1,i=n-1,o=0;o<n;i=o++){var a=e[i],s=e[o],u=s.x-a.x,c=s.y-a.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(a=e[o],u=-u,s=e[i],c=-c),t.y<a.y||t.y>s.y)continue;if(t.y===a.y){if(t.x===a.x)return!0}else{var l=c*(t.x-a.x)-u*(t.y-a.y);if(0===l)return!0;if(l<0)continue;r=!r}}else{if(t.y!==a.y)continue;if(s.x<=t.x&&t.x<=a.x||a.x<=t.x&&t.x<=s.x)return!0}}return r})(M.p,f[T].p)&&(b!==T&&y.push({froms:b,tos:T,hole:w}),E?(E=!1,h[T].push(M)):g=!0);E&&h[b].push(M)}y.length>0&&(g||(d=h))}for(var S,m=0,A=f.length;m<A;m++){s=f[m].s,u.push(s),S=d[m];for(var O=0,C=S.length;O<C;O++)s.holes.push(S[O].h)}return u}}),Object.assign(Pr.prototype,{isFont:!0,generateShapes:function(t,e,n){function r(t,e,r,o){var a=i.glyphs[t]||i.glyphs["?"];if(a){var s,u,c,l,h,f,d,p,m,v,g,y=new jr,b=[];if(a.o)for(var _=a._cachedOutline||(a._cachedOutline=a.o.split(" ")),x=0,w=_.length;x<w;){var M=_[x++];switch(M){case"m":s=_[x++]*e+r,u=_[x++]*e+o,y.moveTo(s,u);break;case"l":s=_[x++]*e+r,u=_[x++]*e+o,y.lineTo(s,u);break;case"q":if(c=_[x++]*e+r,l=_[x++]*e+o,d=_[x++]*e+r,p=_[x++]*e+o,y.quadraticCurveTo(d,p,c,l),g=b[b.length-1]){h=g.x,f=g.y;for(var E=1;E<=n;E++){var T=E/n;gr(T,h,d,c),gr(T,f,p,l)}}break;case"b":if(c=_[x++]*e+r,l=_[x++]*e+o,d=_[x++]*e+r,p=_[x++]*e+o,m=_[x++]*e+r,v=_[x++]*e+o,y.bezierCurveTo(d,p,m,v,c,l),g=b[b.length-1]){h=g.x,f=g.y;for(var E=1;E<=n;E++){var T=E/n;wr(T,h,d,m,c),wr(T,f,p,v,l)}}}}return{offsetX:a.ha*e,path:y}}}void 0===e&&(e=100),void 0===n&&(n=4);for(var i=this.data,o=function(t){for(var n=String(t).split(""),o=e/i.resolution,a=(i.boundingBox.yMax-i.boundingBox.yMin+i.underlineThickness)*o,s=0,u=0,c=[],l=0;l<n.length;l++){var h=n[l];if("\n"===h)s=0,u-=a;else{var f=r(h,o,s,u);s+=f.offsetX,c.push(f.path)}}return c}(t),a=[],s=0,u=o.length;s<u;s++)Array.prototype.push.apply(a,o[s].toShapes());return a}}),Object.assign(Nr.prototype,{load:function(t,e,n,r){var i=this;new jn(this.manager).load(t,function(t){var n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}var r=i.parse(n);e&&e(r)},n,r)},parse:function(t){return new Pr(t)}});var $s,tu={getContext:function(){return void 0===$s&&($s=new(window.AudioContext||window.webkitAudioContext)),$s},setContext:function(t){$s=t}};Object.assign(Ir.prototype,{load:function(t,e,n,r){var i=new jn(this.manager);i.setResponseType("arraybuffer"),i.load(t,function(t){tu.getContext().decodeAudioData(t,function(t){e(t)})},n,r)}}),Object.assign(Ur.prototype,{update:function(){var t,e,n,r,i,o,a,s,u=new h,c=new h;return function(l){if(t!==this||e!==l.focus||n!==l.fov||r!==l.aspect*this.aspect||i!==l.near||o!==l.far||a!==l.zoom||s!==this.eyeSep){t=this,e=l.focus,n=l.fov,r=l.aspect*this.aspect,i=l.near,o=l.far,a=l.zoom;var h=l.projectionMatrix.clone();s=this.eyeSep/2;var f,d,p=s*i/e,m=i*Math.tan(Ms.DEG2RAD*n*.5)/a;c.elements[12]=-s,u.elements[12]=s,f=-m*r+p,d=m*r+p,h.elements[0]=2*i/(d-f),h.elements[8]=(d+f)/(d-f),this.cameraL.projectionMatrix.copy(h),f=-m*r-p,d=m*r-p,h.elements[0]=2*i/(d-f),h.elements[8]=(d+f)/(d-f),this.cameraR.projectionMatrix.copy(h)}this.cameraL.matrixWorld.copy(l.matrixWorld).multiply(c),this.cameraR.matrixWorld.copy(l.matrixWorld).multiply(u)}}()}),Dr.prototype=Object.create(lt.prototype),Dr.prototype.constructor=Dr,kr.prototype=Object.assign(Object.create(Ut.prototype),{constructor:kr,isArrayCamera:!0}),Fr.prototype=Object.assign(Object.create(lt.prototype),{constructor:Fr,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(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.value=t},updateMatrixWorld:function(){var t=new l,e=new c,n=new l,r=new l;return function(i){lt.prototype.updateMatrixWorld.call(this,i);var o=this.context.listener,a=this.up;this.matrixWorld.decompose(t,e,n),r.set(0,0,-1).applyQuaternion(e),o.positionX?(o.positionX.setValueAtTime(t.x,this.context.currentTime),o.positionY.setValueAtTime(t.y,this.context.currentTime),o.positionZ.setValueAtTime(t.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(t.x,t.y,t.z),o.setOrientation(r.x,r.y,r.z,a.x,a.y,a.z))}}()}),Br.prototype=Object.assign(Object.create(lt.prototype),{constructor:Br,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setBuffer:function(t){return this.buffer=t,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 t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),t.start(0,this.startTime),this.isPlaying=!0,this.source=t,this.connect()},pause:function(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),this.startTime=this.context.currentTime,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.startTime=0,this.isPlaying=!1,this)},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=t,!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(t){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this)},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.value=t,this}}),zr.prototype=Object.assign(Object.create(Br.prototype),{constructor:zr,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new l;return function(e){lt.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(Gr.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),n=0;n<e.length;n++)t+=e[n];return t/e.length}}),Object.assign(Hr.prototype,{accumulate:function(t,e){var n=this.buffer,r=this.valueSize,i=t*r+r,o=this.cumulativeWeight;if(0===o){for(var a=0;a!==r;++a)n[i+a]=n[a];o=e}else{o+=e;var s=e/o;this._mixBufferRegion(n,i,0,s,r)}this.cumulativeWeight=o},apply:function(t){var e=this.valueSize,n=this.buffer,r=t*e+e,i=this.cumulativeWeight,o=this.binding;if(this.cumulativeWeight=0,i<1){var a=3*e;this._mixBufferRegion(n,r,a,1-i,e)}for(var s=e,u=e+e;s!==u;++s)if(n[s]!==n[s+e]){o.setValue(n,r);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,n=this.valueSize,r=3*n;t.getValue(e,r);for(var i=n,o=r;i!==o;++i)e[i]=e[r+i%n];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,n,r,i){if(r>=.5)for(var o=0;o!==i;++o)t[e+o]=t[n+o]},_slerp:function(t,e,n,r){c.slerpFlat(t,e,t,e,t,n,r)},_lerp:function(t,e,n,r,i){for(var o=1-r,a=0;a!==i;++a){var s=e+a;t[s]=t[s]*o+t[n+a]*r}}}),Object.assign(Vr.prototype,{getValue:function(t,e){this.bind();var n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)},setValue:function(t,e){for(var n=this._bindings,r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}}),Object.assign(Wr,{Composite:Vr,create:function(t,e,n){return t&&t.isAnimationObjectGroup?new Wr.Composite(t,e,n):new Wr(t,e,n)},parseTrackName:function(){var t=/((?:[\w-]+[\/:])*)/,e=/([\w-\.]+)?/,n=/(?:\.([\w-]+)(?:\[(.+)\])?)?/,r=/\.([\w-]+)(?:\[(.+)\])?/,i=new RegExp("^"+t.source+e.source+n.source+r.source+"$"),o=["material","materials","bones"];return function(t){var e=i.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){var a=n.nodeName.substring(r+1);-1!==o.indexOf(a)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=a)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}}(),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var n=function(t){for(var n=0;n<t.bones.length;n++){var r=t.bones[n];if(r.name===e)return r}return null}(t.skeleton);if(n)return n}if(t.children){var r=function(t){for(var n=0;n<t.length;n++){var i=t[n];if(i.name===e||i.uuid===e)return i;var o=r(i.children);if(o)return o}return null},i=r(t.children);if(i)return i}return null}}),Object.assign(Wr.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(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)t[e++]=n[r]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.node[this.propertyName]=t[e]},function(t,e){this.node[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.node[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++]},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var n=this.resolvedProperty,r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,n=e.objectName,r=e.propertyName,i=e.propertyIndex;if(t||(t=Wr.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error(" trying to update node for track: "+this.path+" but it wasn't found.");if(n){var o=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error(" can not bind to material as node does not have a material",this);if(!t.material.materials)return void console.error(" can not bind to material.materials as node.material does not have a materials array",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error(" can not bind to bones as node does not have a skeleton",this);t=t.skeleton.bones;for(var a=0;a<t.length;a++)if(t[a].name===o){o=a;break}break;default:if(void 0===t[n])return void console.error(" can not bind to objectName of node, undefined",this);t=t[n]}if(void 0!==o){if(void 0===t[o])return void console.error(" trying to bind to objectIndex of objectName, but is undefined:",this,t);t=t[o]}}var s=t[r];if(void 0===s){var u=e.nodeName;return void console.error(" trying to update property for track: "+u+"."+r+" but it wasn't found.",t)}var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var l=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry",this);if(!t.geometry.morphTargets)return void console.error(" can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets",this);for(var a=0;a<this.node.geometry.morphTargets.length;a++)if(t.geometry.morphTargets[a].name===i){i=a;break}}l=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(l=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(l=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][c]},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(Wr.prototype,{_getValue_unbound:Wr.prototype.getValue,_setValue_unbound:Wr.prototype.setValue}),Object.assign(Xr.prototype,{isAnimationObjectGroup:!0,add:function(t){for(var e=this._objects,n=e.length,r=this.nCachedObjects_,i=this._indicesByUUID,o=this._paths,a=this._parsedPaths,s=this._bindings,u=s.length,c=0,l=arguments.length;c!==l;++c){var h=arguments[c],f=h.uuid,d=i[f],p=void 0;if(void 0===d){d=n++,i[f]=d,e.push(h);for(var m=0,v=u;m!==v;++m)s[m].push(new Wr(h,o[m],a[m]))}else if(d<r){p=e[d];var g=--r,y=e[g];i[y.uuid]=d,e[d]=y,i[f]=g,e[g]=h;for(var m=0,v=u;m!==v;++m){var b=s[m],_=b[g],x=b[d];b[d]=_,void 0===x&&(x=new Wr(h,o[m],a[m])),b[g]=x}}else e[d]!==p&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=r},remove:function(t){for(var e=this._objects,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,o=i.length,a=0,s=arguments.length;a!==s;++a){var u=arguments[a],c=u.uuid,l=r[c];if(void 0!==l&&l>=n){var h=n++,f=e[h];r[f.uuid]=l,e[l]=f,r[c]=h,e[h]=u;for(var d=0,p=o;d!==p;++d){var m=i[d],v=m[h],g=m[l];m[l]=v,m[h]=g}}}this.nCachedObjects_=n},uncache:function(t){for(var e=this._objects,n=e.length,r=this.nCachedObjects_,i=this._indicesByUUID,o=this._bindings,a=o.length,s=0,u=arguments.length;s!==u;++s){var c=arguments[s],l=c.uuid,h=i[l];if(void 0!==h)if(delete i[l],h<r){var f=--r,d=e[f],p=--n,m=e[p];i[d.uuid]=h,e[h]=d,i[m.uuid]=f,e[f]=m,e.pop();for(var v=0,g=a;v!==g;++v){var y=o[v],b=y[f],_=y[p];y[h]=b,y[f]=_,y.pop()}}else{var p=--n,m=e[p];i[m.uuid]=h,e[h]=m,e.pop();for(var v=0,g=a;v!==g;++v){var y=o[v];y[h]=y[p],y.pop()}}}this.nCachedObjects_=r},subscribe_:function(t,e){var n=this._bindingsIndicesByPath,r=n[t],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,u=s.length,c=this.nCachedObjects_,l=new Array(u);r=i.length,n[t]=r,o.push(t),a.push(e),i.push(l);for(var h=c,f=s.length;h!==f;++h){var d=s[h];l[h]=new Wr(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];e[t[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}),Object.assign(qr.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(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){var r=this._clip.duration,i=t._clip.duration,o=i/r,a=r/i;t.warp(1,o,e),this.warp(a,1,e)}return this},crossFadeTo:function(t,e,n){return t.crossFadeFrom(this,e,n)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,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,u=o.sampleValues;return s[0]=i,s[1]=i+n,u[0]=t/a,u[1]=e/a,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,n,r){if(!this.enabled)return void this._updateWeight(t);var i=this._startTime;if(null!==i){var o=(t-i)*n;if(o<0||0===n)return;this._startTime=null,e=n*o}e*=this._updateTimeScale(t);var a=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var u=this._interpolants,c=this._propertyBindings,l=0,h=u.length;l!==h;++l)u[l].evaluate(a),c[l].accumulate(r,s)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n){e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var n=this._clip.duration,r=this.loop,i=this._loopCount;if(r===es){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=n)e=n;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var o=r===rs;if(-1===i&&(t>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),e>=n||e<0){var a=Math.floor(e/n);e-=n*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?n:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(0===s){var u=t<0;this._setEndings(u,!u,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=e,n-e}return this.time=e,e},_setEndings:function(t,e,n){var r=this._interpolantSettings;n?(r.endingStart=us,r.endingEnd=us):(r.endingStart=t?this.zeroSlopeAtStart?us:ss:cs,r.endingEnd=e?this.zeroSlopeAtEnd?us:ss:cs)},_scheduleFading:function(t,e,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]=e,a[1]=i+t,s[1]=n,this}}),Object.assign(Yr.prototype,r.prototype,{_bindAction:function(t,e){var n=t._localRoot||this._root,r=t._clip.tracks,i=r.length,o=t._propertyBindings,a=t._interpolants,s=n.uuid,u=this._bindingsByRootAndName,c=u[s];void 0===c&&(c={},u[s]=c);for(var l=0;l!==i;++l){var h=r[l],f=h.name,d=c[f];if(void 0!==d)o[l]=d;else{if(void 0!==(d=o[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,f));continue}var p=e&&e._propertyBindings[l].binding.parsedPath;d=new Hr(Wr.create(n,f,p),h.ValueTypeName,h.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,s,f),o[l]=d}a[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,n=t._clip.uuid,r=this._actionsByClip[n];this._bindAction(t,r&&r.knownActions[0]),this._addInactiveAction(t,n,e)}for(var i=t._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,n){var r=this._actions,i=this._actionsByClip,o=i[e];if(void 0===o)o={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,i[e]=o;else{var a=o.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),o.actionByRoot[n]=t},_removeInactiveAction:function(t){var e=this._actions,n=e[e.length-1],r=t._cacheIndex;n._cacheIndex=r,e[r]=n,e.pop(),t._cacheIndex=null;var i=t._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,u=s[s.length-1],c=t._byClipCacheIndex;u._byClipCacheIndex=c,s[c]=u,s.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,n=0,r=e.length;n!==r;++n){var i=e[n];0==--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(t){var e=this._actions,n=t._cacheIndex,r=this._nActiveActions++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackAction:function(t){var e=this._actions,n=t._cacheIndex,r=--this._nActiveActions,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_addInactiveBinding:function(t,e,n){var r=this._bindingsByRootAndName,i=r[e],o=this._bindings;void 0===i&&(i={},r[e]=i),i[n]=t,t._cacheIndex=o.length,o.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,n=t.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=e[e.length-1],u=t._cacheIndex;s._cacheIndex=u,e[u]=s,e.pop(),delete a[i];t:{for(var c in a)break t;delete o[r]}},_lendBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=this._nActiveBindings++,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_takeBackBinding:function(t){var e=this._bindings,n=t._cacheIndex,r=--this._nActiveBindings,i=e[r];t._cacheIndex=r,e[r]=t,i._cacheIndex=n,e[n]=i},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,n=t[e];return void 0===n&&(n=new Jn(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=e,t[e]=n),n},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,n=t.__cacheIndex,r=--this._nActiveControlInterpolants,i=e[r];t.__cacheIndex=r,e[r]=t,i.__cacheIndex=n,e[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?sr.findByName(n,t):t,o=null!==i?i.uuid:t,a=this._actionsByClip[o],s=null;if(void 0!==a){var u=a.actionByRoot[r];if(void 0!==u)return u;s=a.knownActions[0],null===i&&(i=s._clip)}if(null===i)return null;var c=new qr(this,i,e);return this._bindAction(c,s),this._addInactiveAction(c,o,r),c},existingAction:function(t,e){var n=e||this._root,r=n.uuid,i="string"==typeof t?sr.findByName(n,t):t,o=i?i.uuid:t,a=this._actionsByClip[o];return void 0!==a?a.actionByRoot[r]||null:null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,n=this._bindings,r=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var i=0;i!==e;++i)t[i].reset();for(var i=0;i!==r;++i)n[i].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,n=this._nActiveActions,r=this.time+=t,i=Math.sign(t),o=this._accuIndex^=1,a=0;a!==n;++a){e[a]._update(r,t,i,o)}for(var s=this._bindings,u=this._nActiveBindings,a=0;a!==u;++a)s[a].apply(o);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,n=t.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 u=o[a];this._deactivateAction(u);var c=u._cacheIndex,l=e[e.length-1];u._cacheIndex=null,u._byClipCacheIndex=null,l._cacheIndex=c,e[c]=l,e.pop(),this._removeInactiveBindingsForAction(u)}delete r[n]}},uncacheRoot:function(t){var e=t.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot,o=i[e];void 0!==o&&(this._deactivateAction(o),this._removeInactiveAction(o))}var a=this._bindingsByRootAndName,s=a[e];if(void 0!==s)for(var u in s){var c=s[u];c.restoreOriginalState(),this._removeInactiveBinding(c)}},uncacheAction:function(t,e){var n=this.existingAction(t,e);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}),Zr.prototype.clone=function(){return new Zr(void 0===this.value.clone?this.value:this.value.clone())},Jr.prototype=Object.assign(Object.create(Ct.prototype),{constructor:Jr,isInstancedBufferGeometry:!0,addGroup:function(t,e,n){this.groups.push({start:t,count:e,materialIndex:n})},copy:function(t){var e=t.index;null!==e&&this.setIndex(e.clone());var n=t.attributes;for(var r in n){var i=n[r];this.addAttribute(r,i.clone())}for(var o=t.groups,a=0,s=o.length;a<s;a++){var u=o[a];this.addGroup(u.start,u.count,u.materialIndex)}return this}}),Object.defineProperties(Qr.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Qr.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this},setXYZ:function(t,e,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this},setXYZW:function(t,e,n,r,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=n,this.data.array[t+2]=r,this.data.array[t+3]=i,this}}),Object.defineProperty(Kr.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Kr.prototype,{isInterleavedBuffer:!0,setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==t?t.length/this.stride:0,this.array=t},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,n){t*=this.stride,n*=e.stride;for(var r=0,i=this.stride;r<i;r++)this.array[t+r]=e.array[n+r];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),$r.prototype=Object.assign(Object.create(Kr.prototype),{constructor:$r,isInstancedInterleavedBuffer:!0,copy:function(t){return Kr.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),ti.prototype=Object.assign(Object.create(mt.prototype),{constructor:ti,isInstancedBufferAttribute:!0,copy:function(t){return mt.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(ei.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e){var n=[];return ri(t,this,n,e),n.sort(ni),n},intersectObjects:function(t,e){var n=[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var r=0,i=t.length;r<i;r++)ri(t[r],this,n,e);return n.sort(ni),n}}),Object.assign(ii.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},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(oi.prototype,{set:function(t,e,n){return this.radius=t,this.phi=e,this.theta=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(Ms.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(ai.prototype,{set:function(t,e,n){return this.radius=t,this.theta=e,this.y=n,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),si.prototype=Object.create(Rt.prototype),si.prototype.constructor=si,si.prototype.createAnimation=function(t,e,n,r){var i={start:e,end:n,length:n-e+1,fps:r,duration:(n-e)/r,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[t]=i,this.animationsList.push(i)},si.prototype.autoCreateAnimations=function(t){for(var e,n=/([a-z]+)_?(\d+)/i,r={},i=this.geometry,o=0,a=i.morphTargets.length;o<a;o++){var s=i.morphTargets[o],u=s.name.match(n);if(u&&u.length>1){var c=u[1];r[c]||(r[c]={start:1/0,end:-1/0});var l=r[c];o<l.start&&(l.start=o),o>l.end&&(l.end=o),e||(e=c)}}for(var c in r){var l=r[c];this.createAnimation(c,l.start,l.end,t)}this.firstAnimation=e},si.prototype.setAnimationDirectionForward=function(t){var e=this.animationsMap[t];e&&(e.direction=1,e.directionBackwards=!1)},si.prototype.setAnimationDirectionBackward=function(t){var e=this.animationsMap[t];e&&(e.direction=-1,e.directionBackwards=!0)},si.prototype.setAnimationFPS=function(t,e){var n=this.animationsMap[t];n&&(n.fps=e,n.duration=(n.end-n.start)/n.fps)},si.prototype.setAnimationDuration=function(t,e){var n=this.animationsMap[t];n&&(n.duration=e,n.fps=(n.end-n.start)/n.duration)},si.prototype.setAnimationWeight=function(t,e){var n=this.animationsMap[t];n&&(n.weight=e)},si.prototype.setAnimationTime=function(t,e){var n=this.animationsMap[t];n&&(n.time=e)},si.prototype.getAnimationTime=function(t){var e=0,n=this.animationsMap[t];return n&&(e=n.time),e},si.prototype.getAnimationDuration=function(t){var e=-1,n=this.animationsMap[t];return n&&(e=n.duration),e},si.prototype.playAnimation=function(t){var e=this.animationsMap[t];e?(e.time=0,e.active=!0):console.warn("THREE.MorphBlendMesh: animation["+t+"] undefined in .playAnimation()")},si.prototype.stopAnimation=function(t){var e=this.animationsMap[t];e&&(e.active=!1)},si.prototype.update=function(t){for(var e=0,n=this.animationsList.length;e<n;e++){var r=this.animationsList[e];if(r.active){var i=r.duration/r.length;r.time+=r.direction*t,r.mirroredLoop?(r.time>r.duration||r.time<0)&&(r.direction*=-1,r.time>r.duration&&(r.time=r.duration,r.directionBackwards=!0),r.time<0&&(r.time=0,r.directionBackwards=!1)):(r.time=r.time%r.duration,r.time<0&&(r.time+=r.duration));var o=r.start+Ms.clamp(Math.floor(r.time/i),0,r.length-1),a=r.weight;o!==r.currentFrame&&(this.morphTargetInfluences[r.lastFrame]=0,this.morphTargetInfluences[r.currentFrame]=1*a,this.morphTargetInfluences[o]=0,r.lastFrame=r.currentFrame,r.currentFrame=o);var s=r.time%i/i;r.directionBackwards&&(s=1-s),r.currentFrame!==r.lastFrame?(this.morphTargetInfluences[r.currentFrame]=s*a,this.morphTargetInfluences[r.lastFrame]=(1-s)*a):this.morphTargetInfluences[r.currentFrame]=a}}},ui.prototype=Object.create(lt.prototype),ui.prototype.constructor=ui,ui.prototype.isImmediateRenderObject=!0,ci.prototype=Object.create(Oe.prototype),ci.prototype.constructor=ci,ci.prototype.update=function(){var t=new l,e=new l,n=new rt;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,u=a.faces,c=0,l=0,h=u.length;l<h;l++)for(var f=u[l],d=0,p=f.vertexNormals.length;d<p;d++){var m=s[f[r[d]]],v=f.vertexNormals[d];t.copy(m).applyMatrix4(i),e.copy(v).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(c,t.x,t.y,t.z),c+=1,o.setXYZ(c,e.x,e.y,e.z),c+=1}else if(a&&a.isBufferGeometry)for(var g=a.attributes.position,y=a.attributes.normal,c=0,d=0,p=g.count;d<p;d++)t.set(g.getX(d),g.getY(d),g.getZ(d)).applyMatrix4(i),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),o.setXYZ(c,t.x,t.y,t.z),c+=1,o.setXYZ(c,e.x,e.y,e.z),c+=1;o.needsUpdate=!0}}(),li.prototype=Object.create(lt.prototype),li.prototype.constructor=li,li.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},li.prototype.update=function(){var t=new l,e=new l;return function(){var n=this.light.distance?this.light.distance:1e3,r=n*Math.tan(this.light.angle);this.cone.scale.set(r,r,n),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.cone.material.color.copy(this.light.color)}}(),hi.prototype=Object.create(Oe.prototype),hi.prototype.constructor=hi,hi.prototype.getBoneList=function(t){var e=[];t&&t.isBone&&e.push(t);for(var n=0;n<t.children.length;n++)e.push.apply(e,this.getBoneList(t.children[n]));return e},hi.prototype.update=function(){var t=new l,e=new h,n=new h;return function(){var r=this.geometry,i=r.getAttribute("position");n.getInverse(this.root.matrixWorld);for(var o=0,a=0;o<this.bones.length;o++){var s=this.bones[o];s.parent&&s.parent.isBone&&(e.multiplyMatrices(n,s.matrixWorld),t.setFromMatrixPosition(e),i.setXYZ(a,t.x,t.y,t.z),e.multiplyMatrices(n,s.parent.matrixWorld),t.setFromMatrixPosition(e),i.setXYZ(a+1,t.x,t.y,t.z),a+=2)}r.getAttribute("position").needsUpdate=!0}}(),fi.prototype=Object.create(Rt.prototype),fi.prototype.constructor=fi,fi.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},fi.prototype.update=function(){this.material.color.copy(this.light.color)},di.prototype=Object.create(lt.prototype),di.prototype.constructor=di,di.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},di.prototype.update=function(){var t=this.children[0];t.material.color.copy(this.light.color);var e=.5*this.light.width,n=.5*this.light.height,r=t.geometry.attributes.position,i=r.array;i[0]=e,i[1]=-n,i[2]=0,i[3]=e,i[4]=n,i[5]=0,i[6]=-e,i[7]=n,i[8]=0,i[9]=-e,i[10]=-n,i[11]=0,i[12]=e,i[13]=-n,i[14]=0,r.needsUpdate=!0},pi.prototype=Object.create(lt.prototype),pi.prototype.constructor=pi,pi.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},pi.prototype.update=function(){var t=new l,e=new Y,n=new Y;return function(){var r=this.children[0],i=r.geometry.getAttribute("color");e.copy(this.light.color),n.copy(this.light.groundColor);for(var o=0,a=i.count;o<a;o++){var s=o<a/2?e:n;i.setXYZ(o,s.r,s.g,s.b)}r.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate()),i.needsUpdate=!0}}(),mi.prototype=Object.create(Oe.prototype),mi.prototype.constructor=mi,vi.prototype=Object.create(Oe.prototype),vi.prototype.constructor=vi,gi.prototype=Object.create(Oe.prototype),gi.prototype.constructor=gi,gi.prototype.update=function(){var t=new l,e=new l,n=new rt;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,u=0,c=0,l=s.length;c<l;c++){var h=s[c],f=h.normal;t.copy(a[h.a]).add(a[h.b]).add(a[h.c]).divideScalar(3).applyMatrix4(r),e.copy(f).applyMatrix3(n).normalize().multiplyScalar(this.size).add(t),i.setXYZ(u,t.x,t.y,t.z),u+=1,i.setXYZ(u,e.x,e.y,e.z),u+=1}i.needsUpdate=!0}}(),yi.prototype=Object.create(lt.prototype),yi.prototype.constructor=yi,yi.prototype.dispose=function(){var t=this.children[0],e=this.children[1];t.geometry.dispose(),t.material.dispose(),e.geometry.dispose(),e.material.dispose()},yi.prototype.update=function(){var t=new l,e=new l,n=new l;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),n.subVectors(e,t);var r=this.children[0],i=this.children[1];r.lookAt(n),r.material.color.copy(this.light.color),i.lookAt(n),i.scale.z=n.length()}}(),bi.prototype=Object.create(Oe.prototype),bi.prototype.constructor=bi,bi.prototype.update=function(){function t(t,o,a,s){r.set(o,a,s).unproject(i);var u=n[t];if(void 0!==u)for(var c=e.getAttribute("position"),l=0,h=u.length;l<h;l++)c.setXYZ(u[l],r.x,r.y,r.z)}var e,n,r=new l,i=new It;return function(){e=this.geometry,n=this.pointMap;i.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),_i.prototype=Object.create(Oe.prototype),_i.prototype.constructor=_i,_i.prototype.update=function(){var t=new et;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var n=t.min,r=t.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()}}}(),_i.prototype.setFromObject=function(t){return this.object=t,this.update(),this};var eu,nu;xi.prototype=Object.create(lt.prototype),xi.prototype.constructor=xi,xi.prototype.setDirection=function(){var t,e=new l;return function(n){n.y>.99999?this.quaternion.set(0,0,0,1):n.y<-.99999?this.quaternion.set(1,0,0,0):(e.set(n.z,0,-n.x).normalize(),t=Math.acos(n.y),this.quaternion.setFromAxisAngle(e,t))}}(),xi.prototype.setLength=function(t,e,n){void 0===e&&(e=.2*t),void 0===n&&(n=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()},xi.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},wi.prototype=Object.create(Oe.prototype),wi.prototype.constructor=wi;var ru=new l,iu=new Mi,ou=new Mi,au=new Mi;Ei.prototype=Object.create(Mr.prototype),Ei.prototype.constructor=Ei,Ei.prototype.getPoint=function(t){var e=this.points,n=e.length;n<2&&console.log("duh, you need at least 2 points");var r=(n-(this.closed?0:1))*t,i=Math.floor(r),o=r-i;this.closed?i+=i>0?0:(Math.floor(Math.abs(i)/e.length)+1)*e.length:0===o&&i===n-1&&(i=n-2,o=1);var a,s,u,c;if(this.closed||i>0?a=e[(i-1)%n]:(ru.subVectors(e[0],e[1]).add(e[0]),a=ru),s=e[i%n],u=e[(i+1)%n],this.closed||i+2<n?c=e[(i+2)%n]:(ru.subVectors(e[n-1],e[n-2]).add(e[n-1]),c=ru),void 0===this.type||"centripetal"===this.type||"chordal"===this.type){var h="chordal"===this.type?.5:.25,f=Math.pow(a.distanceToSquared(s),h),d=Math.pow(s.distanceToSquared(u),h),p=Math.pow(u.distanceToSquared(c),h);d<1e-4&&(d=1),f<1e-4&&(f=d),p<1e-4&&(p=d),iu.initNonuniformCatmullRom(a.x,s.x,u.x,c.x,f,d,p),ou.initNonuniformCatmullRom(a.y,s.y,u.y,c.y,f,d,p),au.initNonuniformCatmullRom(a.z,s.z,u.z,c.z,f,d,p)}else if("catmullrom"===this.type){var m=void 0!==this.tension?this.tension:.5;iu.initCatmullRom(a.x,s.x,u.x,c.x,m),ou.initCatmullRom(a.y,s.y,u.y,c.y,m),au.initCatmullRom(a.z,s.z,u.z,c.z,m)}return new l(iu.calc(o),ou.calc(o),au.calc(o))},Ti.prototype=Object.create(Mr.prototype),Ti.prototype.constructor=Ti,Ti.prototype.getPoint=function(t){var e=this.v0,n=this.v1,r=this.v2,i=this.v3;return new l(wr(t,e.x,n.x,r.x,i.x),wr(t,e.y,n.y,r.y,i.y),wr(t,e.z,n.z,r.z,i.z))},Si.prototype=Object.create(Mr.prototype),Si.prototype.constructor=Si,Si.prototype.getPoint=function(t){var e=this.v0,n=this.v1,r=this.v2;return new l(gr(t,e.x,n.x,r.x),gr(t,e.y,n.y,r.y),gr(t,e.z,n.z,r.z))},Ai.prototype=Object.create(Mr.prototype),Ai.prototype.constructor=Ai,Ai.prototype.getPoint=function(t){if(1===t)return this.v2.clone();var e=new l;return e.subVectors(this.v2,this.v1),e.multiplyScalar(t),e.add(this.v1),e},Oi.prototype=Object.create(Sr.prototype),Oi.prototype.constructor=Oi;var su={createMultiMaterialObject:function(t,e){for(var n=new je,r=0,i=e.length;r<i;r++)n.add(new Rt(t,e[r]));return n},detach:function(t,e,n){t.applyMatrix(e.matrixWorld),e.remove(t),n.add(t)},attach:function(t,e,n){var r=new h;r.getInverse(n.matrixWorld),t.applyMatrix(r),e.remove(t),n.add(t)}},uu=0,cu=1;Mr.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Mr.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Zi.prototype=Object.create(Ei.prototype),Ji.prototype=Object.create(Ei.prototype),Qi.prototype=Object.create(Ei.prototype),Object.assign(Qi.prototype,{initFromArray:function(t){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(t){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(t){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),mi.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Object.assign(Z.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(et.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),ht.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Ms.random16=function(){return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."),Math.random()},Object.assign(rt.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(t){return console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(t)},applyToBuffer:function(t,e,n){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(t,e,n){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(h.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new l),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(t){return console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(t)},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.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(t,e,n){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(t,e,n){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,r,n,i,o)}}),it.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},c.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(st.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(Lr.prototype,{extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new nn(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new dn(this,t)}}),Object.assign(i.prototype,{fromAttribute:function(t,e,n){return console.error("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)}}),Object.assign(l.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(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,n){return console.error("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)}}),Object.assign(a.prototype,{fromAttribute:function(t,e,n){return console.error("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)}}),Ot.prototype.computeTangents=function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")},Object.assign(lt.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)}}),Object.defineProperties(lt.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},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(we.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Me.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Mr.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Ut.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(kn.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(mt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}}}),Object.assign(Ct.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},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(Ct.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.defineProperties(Zr.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(K.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}}}),Object.defineProperties(Sn.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($.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(me.prototype,{getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},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(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},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.")}}),Object.defineProperties(me.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."),this.shadowMap.cullFace=t}}}),Object.defineProperties(at.prototype,{cullFace:{get:function(){return this.renderReverseSided?co:uo},set:function(t){var e=t!==uo;console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to "+e+"."),this.renderReverseSided=e}}}),Object.defineProperties(s.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Br.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new Ir).load(t,function(t){e.setBuffer(t)}),this},Gr.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};var lu={merge:function(t,e,n){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var r;e.isMesh&&(e.matrixAutoUpdate&&e.updateMatrix(),r=e.matrix,e=e.geometry),t.merge(e,r,n)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},hu={crossOrigin:void 0,loadTexture:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new Dn;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),o},loadTextureCube:function(t,e,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new Un;i.setCrossOrigin(this.crossOrigin);var o=i.load(t,n,void 0,r);return e&&(o.mapping=e),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.")}}},function(t,e,n){"use strict";var r=n(21);e.a=function(t,e,n){if(null==n&&(n=r.a),i=t.length){if((e=+e)<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,o=(i-1)*e,a=Math.floor(o),s=+n(t[a],a,t);return s+(+n(t[a+1],a+1,t)-s)*(o-a)}}},function(t,e,n){"use strict";var r=n(200);n.d(e,"a",function(){return r.a});var i=n(109);n.d(e,"b",function(){return i.a}),n.d(e,"c",function(){return i.b})},function(t,e,n){"use strict";function r(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===a.b&&e.documentElement.namespaceURI===a.b?e.createElement(t):e.createElementNS(n,t)}}function i(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var o=n(53),a=n(54);e.a=function(t){var e=Object(o.a)(t);return(e.local?i:r)(e)}},function(t,e,n){"use strict";var r=n(54);e.a=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.a.hasOwnProperty(e)?{space:r.a[e],local:t}:t}},function(t,e,n){"use strict";n.d(e,"b",function(){return r});var r="http://www.w3.org/1999/xhtml";e.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(t,e,n){"use strict";var r=n(56);e.a=function(){for(var t,e=r.c;t=e.sourceEvent;)e=t;return e}},function(t,e,n){"use strict";function r(t,e,n){return t=i(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function i(t,e,n){return function(r){var i=l;l=r;try{t.call(this,this.__data__,e,n)}finally{l=i}}}function o(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function a(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function s(t,e,n){var o=c.hasOwnProperty(t.type)?r:i;return function(r,i,a){var s,u=this.__on,c=o(e,i,a);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function u(t,e,n,r){var i=l;t.sourceEvent=l,l=t;try{return e.apply(n,r)}finally{l=i}}n.d(e,"c",function(){return l}),e.a=u;var c={},l=null;if("undefined"!=typeof document){"onmouseenter"in document.documentElement||(c={mouseenter:"mouseover",mouseleave:"mouseout"})}e.b=function(t,e,n){var r,i,u=o(t+""),c=u.length;{if(!(arguments.length<2)){for(l=e?s:a,null==n&&(n=!1),r=0;r<c;++r)this.each(l(u[r],e,n));return this}var l=this.node().__on;if(l)for(var h,f=0,d=l.length;f<d;++f)for(r=0,h=l[f];r<c;++r)if((i=u[r]).type===h.type&&i.name===h.name)return h.value}}},function(t,e,n){"use strict";function r(){}e.a=function(t){return null==t?r:function(){return this.querySelector(t)}}},function(t,e,n){"use strict";e.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,e,n){"use strict";var r=n(7),i=n(112),o=n(115),a=n(116),s=n(34),u=n(117),c=n(118),l=n(114);e.a=function(t,e){var n,h=typeof e;return null==e||"boolean"===h?Object(l.a)(e):("number"===h?s.a:"string"===h?(n=Object(r.a)(e))?(e=n,i.a):c.a:e instanceof r.a?i.a:e instanceof Date?a.a:Array.isArray(e)?o.a:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?u.a:s.a)(t,e)}},function(t,e,n){"use strict";function r(){}function i(t){var e;return t=(t+"").trim().toLowerCase(),(e=x.exec(t))?(e=parseInt(e[1],16),new c(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=w.exec(t))?o(parseInt(e[1],16)):(e=M.exec(t))?new c(e[1],e[2],e[3],1):(e=E.exec(t))?new c(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=T.exec(t))?a(e[1],e[2],e[3],e[4]):(e=S.exec(t))?a(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=A.exec(t))?l(e[1],e[2]/100,e[3]/100,1):(e=O.exec(t))?l(e[1],e[2]/100,e[3]/100,e[4]):C.hasOwnProperty(t)?o(C[t]):"transparent"===t?new c(NaN,NaN,NaN,0):null}function o(t){return new c(t>>16&255,t>>8&255,255&t,1)}function a(t,e,n,r){return r<=0&&(t=e=n=NaN),new c(t,e,n,r)}function s(t){return t instanceof r||(t=i(t)),t?(t=t.rgb(),new c(t.r,t.g,t.b,t.opacity)):new c}function u(t,e,n,r){return 1===arguments.length?s(t):new c(t,e,n,null==r?1:r)}function c(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function l(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new d(t,e,n,r)}function h(t){if(t instanceof d)return new d(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=i(t)),!t)return new d;if(t instanceof d)return t;t=t.rgb();var e=t.r/255,n=t.g/255,o=t.b/255,a=Math.min(e,n,o),s=Math.max(e,n,o),u=NaN,c=s-a,l=(s+a)/2;return c?(u=e===s?(n-o)/c+6*(n<o):n===s?(o-e)/c+2:(e-n)/c+4,c/=l<.5?s+a:2-s-a,u*=60):c=l>0&&l<1?0:u,new d(u,c,l,t.opacity)}function f(t,e,n,r){return 1===arguments.length?h(t):new d(t,e,n,null==r?1:r)}function d(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function p(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e.a=r,n.d(e,"d",function(){return v}),n.d(e,"c",function(){return g}),e.e=i,e.h=s,e.g=u,e.b=c,e.f=f;var m=n(61),v=.7,g=1/v,y="\\s*([+-]?\\d+)\\s*",b="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",x=/^#([0-9a-f]{3})$/,w=/^#([0-9a-f]{6})$/,M=new RegExp("^rgb\\("+[y,y,y]+"\\)$"),E=new RegExp("^rgb\\("+[_,_,_]+"\\)$"),T=new RegExp("^rgba\\("+[y,y,y,b]+"\\)$"),S=new RegExp("^rgba\\("+[_,_,_,b]+"\\)$"),A=new RegExp("^hsl\\("+[b,_,_]+"\\)$"),O=new RegExp("^hsla\\("+[b,_,_,b]+"\\)$"),C={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(m.a)(r,i,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Object(m.a)(c,u,Object(m.b)(r,{brighter:function(t){return t=null==t?g:Math.pow(g,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?v:Math.pow(v,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Object(m.a)(d,f,Object(m.b)(r,{brighter:function(t){return t=null==t?g:Math.pow(g,t),new d(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?v:Math.pow(v,t),new d(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new c(p(t>=240?t-240:t+120,i,r),p(t,i,r),p(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}))},function(t,e,n){"use strict";function r(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}e.b=r,e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e,n){"use strict";function r(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}e.a=r,e.b=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[i],a=t[i+1],s=i>0?t[i-1]:2*o-a,u=i<e-1?t[i+2]:2*a-o;return r((n-i/e)*e,s,o,a,u)}}},function(t,e,n){"use strict";var r=(n(248),n(10));n.d(e,"c",function(){return r.b});var i=n(279);n.d(e,"a",function(){return i.a});var o=n(119);n.d(e,"b",function(){return o.a})},function(t,e,n){"use strict";function r(){return b||(w(i),b=x.now()+_)}function i(){b=0}function o(){this._call=this._time=this._next=null}function a(t,e,n){var r=new o;return r.restart(t,e,n),r}function s(){r(),++p;for(var t,e=f;e;)(t=b-e._time)>=0&&e._call.call(null,t),e=e._next;--p}function u(){b=(y=x.now())+_,p=m=0;try{s()}finally{p=0,l(),b=0}}function c(){var t=x.now(),e=t-y;e>g&&(_-=e,y=t)}function l(){for(var t,e,n=f,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:f=e);d=t,h(r)}function h(t){if(!p){m&&(m=clearTimeout(m));t-b>24?(t<1/0&&(m=setTimeout(u,t-x.now()-_)),v&&(v=clearInterval(v))):(v||(y=x.now(),v=setInterval(c,g)),p=1,w(u))}}e.b=r,e.a=o,e.c=a,e.d=s;var f,d,p=0,m=0,v=0,g=1e3,y=0,b=0,_=0,x="object"==typeof performance&&performance.now?performance:Date,w="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};o.prototype=a.prototype={constructor:o,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?r():+n)+(null==e?0:+e),this._next||d===this||(d?d._next=this:f=this,d=this),this._call=t,this._time=n,h()},stop:function(){this._call&&(this._call=null,this._time=1/0,h())}}},function(t,e,n){"use strict";function r(){}function i(t,e){var n=new r;if(t instanceof r)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var i,o=-1,a=t.length;if(null==e)for(;++o<a;)n.set(o,t[o]);else for(;++o<a;)n.set(e(i=t[o],o,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}n.d(e,"b",function(){return o});var o="$";r.prototype=i.prototype={constructor:r,has:function(t){return o+t in this},get:function(t){return this[o+t]},set:function(t,e){return this[o+t]=e,this},remove:function(t){var e=o+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===o&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===o&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===o&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===o&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===o&&++t;return t},empty:function(){for(var t in this)if(t[0]===o)return!1;return!0},each:function(t){for(var e in this)e[0]===o&&t(this[e],e.slice(1),this)}},e.a=i},function(t,e,n){"use strict";var r=n(67);n.d(e,"e",function(){return r.a});var i=n(294);n.d(e,"c",function(){return i.c}),n.d(e,"d",function(){return i.d}),n.d(e,"a",function(){return i.a}),n.d(e,"b",function(){return i.b});var o=n(295);n.d(e,"h",function(){return o.c}),n.d(e,"i",function(){return o.d}),n.d(e,"f",function(){return o.a}),n.d(e,"g",function(){return o.b})},function(t,e,n){"use strict";function r(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}")}function i(t,e){var n=r(t);return function(r,i){return e(n(r),i,t)}}function o(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}var a={},s={},u=34,c=10,l=13;e.a=function(t){function e(t,e){var o,a,s=n(t,function(t,n){if(o)return o(t,n-1);a=t,o=e?i(t,e):r(t)});return s.columns=a||[],s}function n(t,e){function n(){if(d)return s;if(p)return p=!1,a;var e,n,r=h;if(t.charCodeAt(r)===u){for(;h++<o&&t.charCodeAt(h)!==u||t.charCodeAt(++h)===u;);return(e=h)>=o?d=!0:(n=t.charCodeAt(h++))===c?p=!0:n===l&&(p=!0,t.charCodeAt(h)===c&&++h),t.slice(r+1,e-1).replace(/""/g,'"')}for(;h<o;){if((n=t.charCodeAt(e=h++))===c)p=!0;else if(n===l)p=!0,t.charCodeAt(h)===c&&++h;else if(n!==v)continue;return t.slice(r,e)}return d=!0,t.slice(r,o)}var r,i=[],o=t.length,h=0,f=0,d=o<=0,p=!1;for(t.charCodeAt(o-1)===c&&--o,t.charCodeAt(o-1)===l&&--o;(r=n())!==s;){for(var m=[];r!==a&&r!==s;)m.push(r),r=n();e&&null==(m=e(m,f++))||i.push(m)}return i}function h(e,n){return null==n&&(n=o(e)),[n.map(p).join(t)].concat(e.map(function(e){return n.map(function(t){return p(e[t])}).join(t)})).join("\n")}function f(t){return t.map(d).join("\n")}function d(e){return e.map(p).join(t)}function p(t){return null==t?"":m.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}var m=new RegExp('["'+t+"\n\r]"),v=t.charCodeAt(0);return{parse:e,parseRows:n,format:h,formatRows:f}}},function(t,e,n){"use strict";e.a=function(){return 1e-6*(Math.random()-.5)}},function(t,e,n){"use strict";var r=n(299);n.d(e,"a",function(){return r.a})},function(t,e,n){"use strict";e.a=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}},function(t,e,n){"use strict";var r=n(317);n.d(e,"b",function(){return r.a}),n.d(e,"a",function(){return r.b}),n.d(e,"d",function(){return r.c});var i=n(124);n.d(e,"c",function(){return i.a});var o=n(125);n.d(e,"e",function(){return o.a});var a=n(323);n.d(e,"f",function(){return a.a});var s=n(324);n.d(e,"g",function(){return s.a});var u=n(325);n.d(e,"h",function(){return u.a})},function(t,e,n){"use strict";e.a=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";function r(t,e){function n(t,e){var n=Object(i.u)(s-2*o*Object(i.t)(e))/o;return[n*Object(i.t)(t*=o),u-n*Object(i.g)(t)]}var r=Object(i.t)(t),o=(r+Object(i.t)(e))/2;if(Object(i.a)(o)<i.i)return Object(a.a)(t);var s=1+r*(2*o-r),u=Object(i.u)(s)/o;return n.invert=function(t,e){var n=u-e;return[Object(i.e)(t,Object(i.a)(n))/o*Object(i.s)(n),Object(i.c)((s-(t*t+n*n)*o*o)/(2*o))]},n}e.a=r;var i=n(0),o=n(75),a=n(342);e.b=function(){return Object(o.a)(r).scale(155.424).center([0,33.6442])}},function(t,e,n){"use strict";function r(t){var e=0,n=i.o/3,r=Object(o.b)(t),a=r(e,n);return a.parallels=function(t){return arguments.length?r(e=t[0]*i.r,n=t[1]*i.r):[e*i.h,n*i.h]},a}e.a=r;var i=n(0),o=n(8)},function(t,e,n){"use strict";function r(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Object(u.a)(n,t.stream(c.a)),e(c.a.result()),null!=r&&t.clipExtent(r),t}function i(t,e,n){return r(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])},n)}function o(t,e,n){return i(t,[[0,0],e],n)}function a(t,e,n){return r(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function s(t,e,n){return r(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}e.a=i,e.c=o,e.d=a,e.b=s;var u=n(14),c=n(140)},function(t,e,n){"use strict";function r(t,e){return[t,Object(o.n)(Object(o.v)((o.l+e)/2))]}function i(t){function e(){var e=o.o*h(),s=c(Object(a.a)(c.rotate()).invert([0,0]));return d(null==p?[[s[0]-e,s[1]-e],[s[0]+e,s[1]+e]]:t===r?[[Math.max(s[0]-e,p),n],[Math.min(s[0]+e,i),u]]:[[p,Math.max(s[1]-e,n)],[i,Math.min(s[1]+e,u)]])}var n,i,u,c=Object(s.a)(t),l=c.center,h=c.scale,f=c.translate,d=c.clipExtent,p=null;return c.scale=function(t){return arguments.length?(h(t),e()):h()},c.translate=function(t){return arguments.length?(f(t),e()):f()},c.center=function(t){return arguments.length?(l(t),e()):l()},c.clipExtent=function(t){return arguments.length?(null==t?p=n=i=u=null:(p=+t[0][0],n=+t[0][1],i=+t[1][0],u=+t[1][1]),e()):null==p?null:[[p,n],[i,u]]},e()}e.c=r,e.b=i;var o=n(0),a=n(38),s=n(8);r.invert=function(t,e){return[t,2*Object(o.d)(Object(o.k)(e))-o.l]},e.a=function(){return i(r).scale(961/o.w)}},function(t,e,n){"use strict";function r(t,e){var n,r,i,a,c,l=new u(t),h=+t.value&&(l.value=t.value),f=[l];for(null==e&&(e=o);n=f.pop();)if(h&&(n.value=+n.data.value),(i=e(n.data))&&(c=i.length))for(n.children=new Array(c),a=c-1;a>=0;--a)f.push(r=n.children[a]=new u(i[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(s)}function i(){return r(this).eachBefore(a)}function o(t){return t.children}function a(t){t.data=t.data.data}function s(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function u(t){this.data=t,this.depth=this.height=0,this.parent=null}e.c=r,e.b=s,e.a=u;var c=n(356),l=n(357),h=n(358),f=n(359),d=n(360),p=n(361),m=n(362),v=n(363),g=n(364),y=n(365),b=n(366);u.prototype=r.prototype={constructor:u,count:c.a,each:l.a,eachAfter:f.a,eachBefore:h.a,sum:d.a,sort:p.a,path:m.a,ancestors:v.a,descendants:g.a,leaves:y.a,links:b.a,copy:i}},function(t,e,n){"use strict";function r(t){return null==t?null:i(t)}function i(t){if("function"!=typeof t)throw new Error;return t}e.a=r,e.b=i},function(t,e,n){"use strict";function r(t,e,n,r,a,s){for(var u,c,l,h,f,d,p,m,v,g,y,b=[],_=e.children,x=0,w=0,M=_.length,E=e.value;x<M;){l=a-n,h=s-r;do{f=_[w++].value}while(!f&&w<M);for(d=p=f,g=Math.max(h/l,l/h)/(E*t),y=f*f*g,v=Math.max(p/y,y/d);w<M;++w){if(f+=c=_[w].value,c<d&&(d=c),c>p&&(p=c),y=f*f*g,(m=Math.max(p/y,y/d))>v){f-=c;break}v=m}b.push(u={value:f,dice:l<h,children:_.slice(x,w)}),u.dice?Object(i.a)(u,n,r,a,E?r+=h*f/E:s):Object(o.a)(u,n,r,E?n+=l*f/E:a,s),E-=f,x=w}return b}n.d(e,"b",function(){return a}),e.c=r;var i=n(26),o=n(41),a=(1+Math.sqrt(5))/2;e.a=function t(e){function n(t,n,i,o,a){r(e,t,n,i,o,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(a)},function(t,e,n){"use strict";function r(t){return function(e,n){t(null==e?n:null)}}function i(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}var o=n(23),a=n(12);e.a=function(t,e){function n(t){var e,n=d.status;if(!n&&i(d)||n>=200&&n<300||304===n){if(c)try{e=c.call(s,d)}catch(t){return void h.call("error",s,t)}else e=d;h.call("load",s,e)}else h.call("error",s,t)}var s,u,c,l,h=Object(a.a)("beforesend","progress","load","error"),f=Object(o.c)(),d=new XMLHttpRequest,p=null,m=null,v=0;if("undefined"==typeof XDomainRequest||"withCredentials"in d||!/^(http(s)?:)?\/\//.test(t)||(d=new XDomainRequest),"onload"in d?d.onload=d.onerror=d.ontimeout=n:d.onreadystatechange=function(t){d.readyState>3&&n(t)},d.onprogress=function(t){h.call("progress",s,t)},s={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?f.get(t):(null==e?f.remove(t):f.set(t,e+""),s)},mimeType:function(t){return arguments.length?(u=null==t?null:t+"",s):u},responseType:function(t){return arguments.length?(l=t,s):l},timeout:function(t){return arguments.length?(v=+t,s):v},user:function(t){return arguments.length<1?p:(p=null==t?null:t+"",s)},password:function(t){return arguments.length<1?m:(m=null==t?null:t+"",s)},response:function(t){return c=t,s},get:function(t,e){return s.send("GET",t,e)},post:function(t,e){return s.send("POST",t,e)},send:function(e,n,i){return d.open(e,t,!0,p,m),null==u||f.has("accept")||f.set("accept",u+",*/*"),d.setRequestHeader&&f.each(function(t,e){d.setRequestHeader(e,t)}),null!=u&&d.overrideMimeType&&d.overrideMimeType(u),null!=l&&(d.responseType=l),v>0&&(d.timeout=v),null==i&&"function"==typeof n&&(i=n,n=null),null!=i&&1===i.length&&(i=r(i)),null!=i&&s.on("error",i).on("load",function(t){i(null,t)}),h.call("beforesend",s,d),d.send(null==n?null:n),s},abort:function(){return d.abort(),s},on:function(){var t=h.on.apply(h,arguments);return t===h?s:t}},null!=e){if("function"!=typeof e)throw new Error("invalid callback: "+e);return s.get(e)}return s}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";var r=n(84);n.d(e,"d",function(){return r.a}),n.d(e,"c",function(){return r.b}),n.d(e,"f",function(){return r.c}),n.d(e,"g",function(){return r.d}),n.d(e,"h",function(){return r.e});var i=n(154);n.d(e,"e",function(){return i.a});var o=n(155);n.d(e,"a",function(){return o.a});var a=n(421);n.d(e,"b",function(){return a.a})},function(t,e,n){"use strict";function r(t){return i=Object(c.a)(t),o=i.format,a=i.parse,s=i.utcFormat,u=i.utcParse,i}n.d(e,"b",function(){return o}),n.d(e,"c",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"e",function(){return u}),e.a=r;var i,o,a,s,u,c=n(154);r({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})},function(t,e,n){"use strict";var r=n(13),i=n(16),o=n(45),a=n(86);e.a=function(){function t(t){var i,o,a,h=t.length,f=!1;for(null==u&&(l=c(a=Object(r.a)())),i=0;i<=h;++i)!(i<h&&s(o=t[i],i,t))===f&&((f=!f)?l.lineStart():l.lineEnd()),f&&l.point(+e(o,i,t),+n(o,i,t));if(a)return l=null,a+""||null}var e=a.a,n=a.b,s=Object(i.a)(!0),u=null,c=o.a,l=null;return t.x=function(n){return arguments.length?(e="function"==typeof n?n:Object(i.a)(+n),t):e},t.y=function(e){return arguments.length?(n="function"==typeof e?e:Object(i.a)(+e),t):n},t.defined=function(e){return arguments.length?(s="function"==typeof e?e:Object(i.a)(!!e),t):s},t.curve=function(e){return arguments.length?(c=e,null!=u&&(l=c(u)),t):c},t.context=function(e){return arguments.length?(null==e?u=l=null:l=c(u=e),t):u},t}},function(t,e,n){"use strict";function r(t){return t[0]}function i(t){return t[1]}e.a=r,e.b=i},function(t,e,n){"use strict";function r(t,e,n){var r=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>o.f){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>o.f){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*l+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(r,i,a,s,t._x2,t._y2)}function i(t,e){this._context=t,this._alpha=e}e.b=r;var o=n(29),a=n(48);i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:r(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new i(t,e):new a.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";function r(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}e.b=r;var i=n(31);e.a=function(t){var e=t.map(r);return Object(i.a)(t).sort(function(t,n){return e[t]-e[n]})}},function(t,e,n){"use strict";function r(){this._=null}function i(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function o(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function a(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function s(t){for(;t.L;)t=t.L;return t}e.a=i,r.prototype={constructor:r,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=s(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(o(this,n),t=n,n=t.U),n.C=!1,r.C=!0,a(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(a(this,n),t=n,n=t.U),n.C=!1,r.C=!0,o(this,r))),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,u=t.L,c=t.R;if(n=u?c?s(c):u:c,i?i.L===t?i.L=n:i.R=n:this._=n,u&&c?(r=n.C,n.C=t.C,n.L=u,u.U=n,n!==c?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=c,c.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(e=i.R,e.C&&(e.C=!1,i.C=!0,o(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,a(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,o(this,i),t=this._;break}}else if(e=i.L,e.C&&(e.C=!1,i.C=!0,a(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,o(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,a(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},e.b=r},function(t,e,n){"use strict";function r(t,e,n,r){var i=[null,null],a=c.e.push(i)-1;return i.left=t,i.right=e,n&&o(i,t,e,n),r&&o(i,e,t,r),c.b[t.index].halfedges.push(a),c.b[e.index].halfedges.push(a),i}function i(t,e,n){var r=[e,n];return r.left=t,r}function o(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function a(t,e,n,r,i){var o,a=t[0],s=t[1],u=a[0],c=a[1],l=s[0],h=s[1],f=0,d=1,p=l-u,m=h-c;if(o=e-u,p||!(o>0)){if(o/=p,p<0){if(o<f)return;o<d&&(d=o)}else if(p>0){if(o>d)return;o>f&&(f=o)}if(o=r-u,p||!(o<0)){if(o/=p,p<0){if(o>d)return;o>f&&(f=o)}else if(p>0){if(o<f)return;o<d&&(d=o)}if(o=n-c,m||!(o>0)){if(o/=m,m<0){if(o<f)return;o<d&&(d=o)}else if(m>0){if(o>d)return;o>f&&(f=o)}if(o=i-c,m||!(o<0)){if(o/=m,m<0){if(o>d)return;o>f&&(f=o)}else if(m>0){if(o<f)return;o<d&&(d=o)}return!(f>0||d<1)||(f>0&&(t[0]=[u+f*p,c+f*m]),d<1&&(t[1]=[u+d*p,c+d*m]),!0)}}}}}function s(t,e,n,r,i){var o=t[1];if(o)return!0;var a,s,u=t[0],c=t.left,l=t.right,h=c[0],f=c[1],d=l[0],p=l[1],m=(h+d)/2,v=(f+p)/2;if(p===f){if(m<e||m>=r)return;if(h>d){if(u){if(u[1]>=i)return}else u=[m,n];o=[m,i]}else{if(u){if(u[1]<n)return}else u=[m,i];o=[m,n]}}else if(a=(h-d)/(p-f),s=v-a*m,a<-1||a>1)if(h>d){if(u){if(u[1]>=i)return}else u=[(n-s)/a,n];o=[(i-s)/a,i]}else{if(u){if(u[1]<n)return}else u=[(i-s)/a,i];o=[(n-s)/a,n]}else if(f<p){if(u){if(u[0]>=r)return}else u=[e,a*e+s];o=[r,a*r+s]}else{if(u){if(u[0]<e)return}else u=[r,a*r+s];o=[e,a*e+s]}return t[0]=u,t[1]=o,!0}function u(t,e,n,r){for(var i,o=c.e.length;o--;)s(i=c.e[o],t,e,n,r)&&a(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>c.f||Math.abs(i[0][1]-i[1][1])>c.f)||delete c.e[o]}e.c=r,e.b=i,e.d=o,e.a=u;var c=n(32)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(176);n.d(e,"version",function(){return r.a});var i=n(3);n.d(e,"bisect",function(){return i.b}),n.d(e,"bisectRight",function(){return i.d}),n.d(e,"bisectLeft",function(){return i.c}),n.d(e,"ascending",function(){return i.a}),n.d(e,"bisector",function(){return i.e}),n.d(e,"cross",function(){return i.f}),n.d(e,"descending",function(){return i.g}),n.d(e,"deviation",function(){return i.h}),n.d(e,"extent",function(){return i.i}),n.d(e,"histogram",function(){return i.j}),n.d(e,"thresholdFreedmanDiaconis",function(){return i.w}),n.d(e,"thresholdScott",function(){return i.x}),n.d(e,"thresholdSturges",function(){return i.y}),n.d(e,"max",function(){return i.k}),n.d(e,"mean",function(){return i.l}),n.d(e,"median",function(){return i.m}),n.d(e,"merge",function(){return i.n}),n.d(e,"min",function(){return i.o}),n.d(e,"pairs",function(){return i.p}),n.d(e,"permute",function(){return i.q}),n.d(e,"quantile",function(){return i.r}),n.d(e,"range",function(){return i.s}),n.d(e,"scan",function(){return i.t}),n.d(e,"shuffle",function(){return i.u}),n.d(e,"sum",function(){return i.v}),n.d(e,"ticks",function(){return i.B}),n.d(e,"tickIncrement",function(){return i.z}),n.d(e,"tickStep",function(){return i.A}),n.d(e,"transpose",function(){return i.C}),n.d(e,"variance",function(){return i.D}),n.d(e,"zip",function(){return i.E});var o=n(193);n.d(e,"axisTop",function(){return o.d}),n.d(e,"axisRight",function(){return o.c}),n.d(e,"axisBottom",function(){return o.a}),n.d(e,"axisLeft",function(){return o.b});var a=n(197);n.d(e,"brush",function(){return a.a}),n.d(e,"brushX",function(){return a.c}),n.d(e,"brushY",function(){return a.d}),n.d(e,"brushSelection",function(){return a.b});var s=n(283);n.d(e,"chord",function(){return s.a}),n.d(e,"ribbon",function(){return s.b});var u=n(23);n.d(e,"nest",function(){return u.d}),n.d(e,"set",function(){return u.e}),n.d(e,"map",function(){return u.c}),n.d(e,"keys",function(){return u.b}),n.d(e,"values",function(){return u.f}),n.d(e,"entries",function(){return u.a});var c=n(7);n.d(e,"color",function(){return c.a}),n.d(e,"rgb",function(){return c.f}),n.d(e,"hsl",function(){return c.d}),n.d(e,"lab",function(){return c.e}),n.d(e,"hcl",function(){return c.c}),n.d(e,"cubehelix",function(){return c.b});var l=n(12);n.d(e,"dispatch",function(){return l.a});var h=n(51);n.d(e,"drag",function(){return h.a}),n.d(e,"dragDisable",function(){return h.b}),n.d(e,"dragEnable",function(){return h.c});var f=n(66);n.d(e,"dsvFormat",function(){return f.e}),n.d(e,"csvParse",function(){return f.c}),n.d(e,"csvParseRows",function(){return f.d}),n.d(e,"csvFormat",function(){return f.a}),n.d(e,"csvFormatRows",function(){return f.b}),n.d(e,"tsvParse",function(){return f.h}),n.d(e,"tsvParseRows",function(){return f.i}),n.d(e,"tsvFormat",function(){return f.f}),n.d(e,"tsvFormatRows",function(){return f.g});var d=n(121);n.d(e,"easeLinear",function(){return d.y}),n.d(e,"easeQuad",function(){return d.D}),n.d(e,"easeQuadIn",function(){return d.E}),n.d(e,"easeQuadOut",function(){return d.G}),n.d(e,"easeQuadInOut",function(){return d.F}),n.d(e,"easeCubic",function(){return d.m}),n.d(e,"easeCubicIn",function(){return d.n}),n.d(e,"easeCubicOut",function(){return d.p}),n.d(e,"easeCubicInOut",function(){return d.o}),n.d(e,"easePoly",function(){return d.z}),n.d(e,"easePolyIn",function(){return d.A}),n.d(e,"easePolyOut",function(){return d.C}),n.d(e,"easePolyInOut",function(){return d.B}),n.d(e,"easeSin",function(){return d.H}),n.d(e,"easeSinIn",function(){return d.I}),n.d(e,"easeSinOut",function(){return d.K}),n.d(e,"easeSinInOut",function(){return d.J}),n.d(e,"easeExp",function(){return d.u}),n.d(e,"easeExpIn",function(){return d.v}),n.d(e,"easeExpOut",function(){return d.x}),n.d(e,"easeExpInOut",function(){return d.w}),n.d(e,"easeCircle",function(){return d.i}),n.d(e,"easeCircleIn",function(){return d.j}),n.d(e,"easeCircleOut",function(){return d.l}),n.d(e,"easeCircleInOut",function(){return d.k}),n.d(e,"easeBounce",function(){return d.e}),n.d(e,"easeBounceIn",function(){return d.f}),n.d(e,"easeBounceOut",function(){return d.h}),n.d(e,"easeBounceInOut",function(){return d.g}),n.d(e,"easeBack",function(){return d.a}),n.d(e,"easeBackIn",function(){return d.b}),n.d(e,"easeBackOut",function(){return d.d}),n.d(e,"easeBackInOut",function(){return d.c}),n.d(e,"easeElastic",function(){return d.q}),n.d(e,"easeElasticIn",function(){return d.r}),n.d(e,"easeElasticOut",function(){return d.t}),n.d(e,"easeElasticInOut",function(){return d.s});var p=n(296);n.d(e,"forceCenter",function(){return p.a}),n.d(e,"forceCollide",function(){return p.b}),n.d(e,"forceLink",function(){return p.c}),n.d(e,"forceManyBody",function(){return p.d}),n.d(e,"forceRadial",function(){return p.e}),n.d(e,"forceSimulation",function(){return p.f}),n.d(e,"forceX",function(){return p.g}),n.d(e,"forceY",function(){return p.h});var m=n(71);n.d(e,"formatDefaultLocale",function(){return m.b}),n.d(e,"format",function(){return m.a}),n.d(e,"formatPrefix",function(){return m.d}),n.d(e,"formatLocale",function(){return m.c}),n.d(e,"formatSpecifier",function(){return m.e}),n.d(e,"precisionFixed",function(){return m.f}),n.d(e,"precisionPrefix",function(){return m.g}),n.d(e,"precisionRound",function(){return m.h});var v=n(326);n.d(e,"geoArea",function(){return v.c}),n.d(e,"geoBounds",function(){return v.h}),n.d(e,"geoCentroid",function(){return v.i}),n.d(e,"geoCircle",function(){return v.j}),n.d(e,"geoClipAntimeridian",function(){return v.k}),n.d(e,"geoClipCircle",function(){return v.l}),n.d(e,"geoClipExtent",function(){return v.m}),n.d(e,"geoClipRectangle",function(){return v.n}),n.d(e,"geoContains",function(){return v.u}),n.d(e,"geoDistance",function(){return v.v}),n.d(e,"geoGraticule",function(){return v.A}),n.d(e,"geoGraticule10",function(){return v.B}),n.d(e,"geoInterpolate",function(){return v.D}),n.d(e,"geoLength",function(){return v.E}),n.d(e,"geoPath",function(){return v.L}),n.d(e,"geoAlbers",function(){return v.a}),n.d(e,"geoAlbersUsa",function(){return v.b}),n.d(e,"geoAzimuthalEqualArea",function(){return v.d}),n.d(e,"geoAzimuthalEqualAreaRaw",function(){return v.e}),n.d(e,"geoAzimuthalEquidistant",function(){return v.f}),n.d(e,"geoAzimuthalEquidistantRaw",function(){return v.g}),n.d(e,"geoConicConformal",function(){return v.o}),n.d(e,"geoConicConformalRaw",function(){return v.p}),n.d(e,"geoConicEqualArea",function(){return v.q}),n.d(e,"geoConicEqualAreaRaw",function(){return v.r}),n.d(e,"geoConicEquidistant",function(){return v.s}),n.d(e,"geoConicEquidistantRaw",function(){return v.t}),n.d(e,"geoEquirectangular",function(){return v.w}),n.d(e,"geoEquirectangularRaw",function(){return v.x}),n.d(e,"geoGnomonic",function(){return v.y}),n.d(e,"geoGnomonicRaw",function(){return v.z}),n.d(e,"geoIdentity",function(){return v.C}),n.d(e,"geoProjection",function(){return v.M}),n.d(e,"geoProjectionMutator",function(){return v.N}),n.d(e,"geoMercator",function(){return v.F}),n.d(e,"geoMercatorRaw",function(){return v.G}),n.d(e,"geoNaturalEarth1",function(){return v.H}),n.d(e,"geoNaturalEarth1Raw",function(){return v.I}),n.d(e,"geoOrthographic",function(){return v.J}),n.d(e,"geoOrthographicRaw",function(){return v.K}),n.d(e,"geoStereographic",function(){return v.P}),n.d(e,"geoStereographicRaw",function(){return v.Q}),n.d(e,"geoTransverseMercator",function(){return v.T}),n.d(e,"geoTransverseMercatorRaw",function(){return v.U}),n.d(e,"geoRotation",function(){return v.O}),n.d(e,"geoStream",function(){return v.R}),n.d(e,"geoTransform",function(){return v.S});var g=n(354);n.d(e,"cluster",function(){return g.a}),n.d(e,"hierarchy",function(){return g.b}),n.d(e,"pack",function(){return g.c}),n.d(e,"packSiblings",function(){return g.e}),n.d(e,"packEnclose",function(){return g.d}),n.d(e,"partition",function(){return g.f}),n.d(e,"stratify",function(){return g.g}),n.d(e,"tree",function(){return g.h}),n.d(e,"treemap",function(){return g.i}),n.d(e,"treemapBinary",function(){return g.j}),n.d(e,"treemapDice",function(){return g.k}),n.d(e,"treemapSlice",function(){return g.m}),n.d(e,"treemapSliceDice",function(){return g.n}),n.d(e,"treemapSquarify",function(){return g.o}),n.d(e,"treemapResquarify",function(){return g.l});var y=n(5);n.d(e,"interpolate",function(){return y.a}),n.d(e,"interpolateArray",function(){return y.b}),n.d(e,"interpolateBasis",function(){return y.c}),n.d(e,"interpolateBasisClosed",function(){return y.d}),n.d(e,"interpolateDate",function(){return y.g}),n.d(e,"interpolateNumber",function(){return y.m}),n.d(e,"interpolateObject",function(){return y.n}),n.d(e,"interpolateRound",function(){return y.r}),n.d(e,"interpolateString",function(){return y.s}),n.d(e,"interpolateTransformCss",function(){return y.t}),n.d(e,"interpolateTransformSvg",function(){return y.u}),n.d(e,"interpolateZoom",function(){return y.v}),n.d(e,"interpolateRgb",function(){return y.o}),n.d(e,"interpolateRgbBasis",function(){return y.p}),n.d(e,"interpolateRgbBasisClosed",function(){return y.q}),n.d(e,"interpolateHsl",function(){return y.j}),n.d(e,"interpolateHslLong",function(){return y.k}),n.d(e,"interpolateLab",function(){return y.l}),n.d(e,"interpolateHcl",function(){return y.h}),n.d(e,"interpolateHclLong",function(){return y.i}),n.d(e,"interpolateCubehelix",function(){return y.e}),n.d(e,"interpolateCubehelixLong",function(){return y.f}),n.d(e,"quantize",function(){return y.w});var b=n(13);n.d(e,"path",function(){return b.a});var _=n(376);n.d(e,"polygonArea",function(){return _.a}),n.d(e,"polygonCentroid",function(){return _.b}),n.d(e,"polygonHull",function(){return _.d}),n.d(e,"polygonContains",function(){return _.c}),n.d(e,"polygonLength",function(){return _.e});var x=n(69);n.d(e,"quadtree",function(){return x.a});var w=n(383);n.d(e,"queue",function(){return w.a});var M=n(386);n.d(e,"randomUniform",function(){return M.f}),n.d(e,"randomNormal",function(){return M.e}),n.d(e,"randomLogNormal",function(){return M.d}),n.d(e,"randomBates",function(){return M.a}),n.d(e,"randomIrwinHall",function(){return M.c}),n.d(e,"randomExponential",function(){return M.b});var E=n(391);n.d(e,"request",function(){return E.d}),n.d(e,"html",function(){return E.b}),n.d(e,"json",function(){return E.c}),n.d(e,"text",function(){return E.e}),n.d(e,"xml",function(){return E.g}),n.d(e,"csv",function(){return E.a}),n.d(e,"tsv",function(){return E.f});var T=n(398);n.d(e,"scaleBand",function(){return T.i}),n.d(e,"scalePoint",function(){return T.o}),n.d(e,"scaleIdentity",function(){return T.j}),n.d(e,"scaleLinear",function(){return T.l}),n.d(e,"scaleLog",function(){return T.m}),n.d(e,"scaleOrdinal",function(){return T.n}),n.d(e,"scaleImplicit",function(){return T.k}),n.d(e,"scalePow",function(){return T.p}),n.d(e,"scaleSqrt",function(){return T.t}),n.d(e,"scaleQuantile",function(){return T.q}),n.d(e,"scaleQuantize",function(){return T.r}),n.d(e,"scaleThreshold",function(){return T.u}),n.d(e,"scaleTime",function(){return T.v}),n.d(e,"scaleUtc",function(){return T.w}),n.d(e,"schemeCategory10",function(){return T.x}),n.d(e,"schemeCategory20b",function(){return T.z}),n.d(e,"schemeCategory20c",function(){return T.A}),n.d(e,"schemeCategory20",function(){return T.y}),n.d(e,"interpolateCubehelixDefault",function(){return T.b}),n.d(e,"interpolateRainbow",function(){return T.f}),n.d(e,"interpolateWarm",function(){return T.h}),n.d(e,"interpolateCool",function(){return T.a}),n.d(e,"interpolateViridis",function(){return T.g}),n.d(e,"interpolateMagma",function(){return T.d}),n.d(e,"interpolateInferno",function(){return T.c}),n.d(e,"interpolatePlasma",function(){return T.e}),n.d(e,"scaleSequential",function(){return T.s});var S=n(1);n.d(e,"creator",function(){return S.b}),n.d(e,"local",function(){return S.e}),n.d(e,"matcher",function(){return S.f}),n.d(e,"mouse",function(){return S.g}),n.d(e,"namespace",function(){return S.h}),n.d(e,"namespaces",function(){return S.i}),n.d(e,"clientPoint",function(){return S.a}),n.d(e,"select",function(){return S.j}),n.d(e,"selectAll",function(){return S.k}),n.d(e,"selection",function(){return S.l}),n.d(e,"selector",function(){return S.m}),n.d(e,"selectorAll",function(){return S.n}),n.d(e,"style",function(){return S.o}),n.d(e,"touch",function(){return S.p}),n.d(e,"touches",function(){return S.q}),n.d(e,"window",function(){return S.r}),n.d(e,"event",function(){return S.d}),n.d(e,"customEvent",function(){return S.c});var A=n(431);n.d(e,"arc",function(){return A.a}),n.d(e,"area",function(){return A.b}),n.d(e,"line",function(){return A.v}),n.d(e,"pie",function(){return A.A}),n.d(e,"areaRadial",function(){return A.c}),n.d(e,"radialArea",function(){return A.C}),n.d(e,"lineRadial",function(){return A.w}),n.d(e,"radialLine",function(){return A.D}),n.d(e,"pointRadial",function(){return A.B}),n.d(e,"linkHorizontal",function(){return A.x}),n.d(e,"linkVertical",function(){return A.z}),n.d(e,"linkRadial",function(){return A.y}),n.d(e,"symbol",function(){return A.P}),n.d(e,"symbols",function(){return A.X}),n.d(e,"symbolCircle",function(){return A.Q}),n.d(e,"symbolCross",function(){return A.R}),n.d(e,"symbolDiamond",function(){return A.S}),n.d(e,"symbolSquare",function(){return A.T}),n.d(e,"symbolStar",function(){return A.U}),n.d(e,"symbolTriangle",function(){return A.V}),n.d(e,"symbolWye",function(){return A.W}),n.d(e,"curveBasisClosed",function(){return A.e}),n.d(e,"curveBasisOpen",function(){return A.f}),n.d(e,"curveBasis",function(){return A.d}),n.d(e,"curveBundle",function(){return A.g}),n.d(e,"curveCardinalClosed",function(){return A.i}),n.d(e,"curveCardinalOpen",function(){return A.j}),n.d(e,"curveCardinal",function(){return A.h}),n.d(e,"curveCatmullRomClosed",function(){return A.l}),n.d(e,"curveCatmullRomOpen",function(){return A.m}),n.d(e,"curveCatmullRom",function(){return A.k}),n.d(e,"curveLinearClosed",function(){return A.o}),n.d(e,"curveLinear",function(){return A.n}),n.d(e,"curveMonotoneX",function(){return A.p}),n.d(e,"curveMonotoneY",function(){return A.q}),n.d(e,"curveNatural",function(){return A.r}),n.d(e,"curveStep",function(){return A.s}),n.d(e,"curveStepAfter",function(){return A.t}),n.d(e,"curveStepBefore",function(){return A.u}),n.d(e,"stack",function(){return A.E}),n.d(e,"stackOffsetExpand",function(){return A.G}),n.d(e,"stackOffsetDiverging",function(){return A.F}),n.d(e,"stackOffsetNone",function(){return A.H}),n.d(e,"stackOffsetSilhouette",function(){return A.I}),n.d(e,"stackOffsetWiggle",function(){return A.J}),n.d(e,"stackOrderAscending",function(){return A.K}),n.d(e,"stackOrderDescending",function(){return A.L}),n.d(e,"stackOrderInsideOut",function(){return A.M}),n.d(e,"stackOrderNone",function(){return A.N}),n.d(e,"stackOrderReverse",function(){return A.O});var O=n(44);n.d(e,"timeInterval",function(){return O.g}),n.d(e,"timeMillisecond",function(){return O.h}),n.d(e,"timeMilliseconds",function(){return O.i}),n.d(e,"utcMillisecond",function(){return O.L}),n.d(e,"utcMilliseconds",function(){return O.M}),n.d(e,"timeSecond",function(){return O.r}),n.d(e,"timeSeconds",function(){return O.s}),n.d(e,"utcSecond",function(){return O.V}),n.d(e,"utcSeconds",function(){return O.W}),n.d(e,"timeMinute",function(){return O.j}),n.d(e,"timeMinutes",function(){return O.k}),n.d(e,"timeHour",function(){return O.e}),n.d(e,"timeHours",function(){return O.f}),n.d(e,"timeDay",function(){return O.a}),n.d(e,"timeDays",function(){return O.b}),n.d(e,"timeWeek",function(){return O.B}),n.d(e,"timeWeeks",function(){return O.C}),n.d(e,"timeSunday",function(){return O.t}),n.d(e,"timeSundays",function(){return O.u}),n.d(e,"timeMonday",function(){return O.l}),n.d(e,"timeMondays",function(){return O.m}),n.d(e,"timeTuesday",function(){return O.x}),n.d(e,"timeTuesdays",function(){return O.y}),n.d(e,"timeWednesday",function(){return O.z}),n.d(e,"timeWednesdays",function(){return O.A}),n.d(e,"timeThursday",function(){return O.v}),n.d(e,"timeThursdays",function(){return O.w}),n.d(e,"timeFriday",function(){return O.c}),n.d(e,"timeFridays",function(){return O.d}),n.d(e,"timeSaturday",function(){return O.p}),n.d(e,"timeSaturdays",function(){return O.q}),n.d(e,"timeMonth",function(){return O.n}),n.d(e,"timeMonths",function(){return O.o}),n.d(e,"timeYear",function(){return O.D}),n.d(e,"timeYears",function(){return O.E}),n.d(e,"utcMinute",function(){return O.N}),n.d(e,"utcMinutes",function(){return O.O}),n.d(e,"utcHour",function(){return O.J}),n.d(e,"utcHours",function(){return O.K}),n.d(e,"utcDay",function(){return O.F}),n.d(e,"utcDays",function(){return O.G}),n.d(e,"utcWeek",function(){return O._5}),n.d(e,"utcWeeks",function(){return O._6}),n.d(e,"utcSunday",function(){return O.X}),n.d(e,"utcSundays",function(){return O.Y}),n.d(e,"utcMonday",function(){return O.P}),n.d(e,"utcMondays",function(){return O.Q}),n.d(e,"utcTuesday",function(){return O._1}),n.d(e,"utcTuesdays",function(){return O._2}),n.d(e,"utcWednesday",function(){return O._3}),n.d(e,"utcWednesdays",function(){return O._4}),n.d(e,"utcThursday",function(){return O.Z}),n.d(e,"utcThursdays",function(){return O._0}),n.d(e,"utcFriday",function(){return O.H}),n.d(e,"utcFridays",function(){return O.I}),n.d(e,"utcSaturday",function(){return O.T}),n.d(e,"utcSaturdays",function(){return O.U}),n.d(e,"utcMonth",function(){return O.R}),n.d(e,"utcMonths",function(){return O.S}),n.d(e,"utcYear",function(){return O._7}),n.d(e,"utcYears",function(){return O._8});var C=n(83);n.d(e,"timeFormatDefaultLocale",function(){return C.d}),n.d(e,"timeFormat",function(){return C.c}),n.d(e,"timeParse",function(){return C.f}),n.d(e,"utcFormat",function(){return C.g}),n.d(e,"utcParse",function(){return C.h}),n.d(e,"timeFormatLocale",function(){return C.e}),n.d(e,"isoFormat",function(){return C.a}),n.d(e,"isoParse",function(){return C.b});var R=n(35);n.d(e,"now",function(){return R.b}),n.d(e,"timer",function(){return R.d}),n.d(e,"timerFlush",function(){return R.e}),n.d(e,"timeout",function(){return R.c}),n.d(e,"interval",function(){return R.a});var L=n(63);n.d(e,"transition",function(){return L.c}),n.d(e,"active",function(){return L.a}),n.d(e,"interrupt",function(){return L.b});var j=n(456);n.d(e,"voronoi",function(){return j.a});var P=n(461);n.d(e,"zoom",function(){return P.a}),n.d(e,"zoomTransform",function(){return P.c}),n.d(e,"zoomIdentity",function(){return P.b})},function(t,e,n){"use strict";n.d(e,"b",function(){return a}),n.d(e,"a",function(){return s});var r=n(17),i=n(93),o=Object(i.a)(r.a),a=o.right,s=o.left;e.c=a},function(t,e,n){"use strict";function r(t){return function(e,n){return Object(i.a)(t(e),n)}}var i=n(17);e.a=function(t){return 1===t.length&&(t=r(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}},function(t,e,n){"use strict";function r(t,e){return[t,e]}e.b=r,e.a=function(t,e){null==e&&(e=r);for(var n=0,i=t.length-1,o=t[0],a=new Array(i<0?0:i);n<i;)a[n]=e(o,o=t[++n]);return a}},function(t,e,n){"use strict";var r=n(96);e.a=function(t,e){var n=Object(r.a)(t,e);return n?Math.sqrt(n):n}},function(t,e,n){"use strict";var r=n(21);e.a=function(t,e){var n,i,o=t.length,a=0,s=-1,u=0,c=0;if(null==e)for(;++s<o;)isNaN(n=Object(r.a)(t[s]))||(i=n-u,u+=i/++a,c+=i*(n-u));else for(;++s<o;)isNaN(n=Object(r.a)(e(t[s],s,t)))||(i=n-u,u+=i/++a,c+=i*(n-u));if(a>1)return c/(a-1)}},function(t,e,n){"use strict";e.a=function(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}},function(t,e,n){"use strict";n.d(e,"b",function(){return i}),n.d(e,"a",function(){return o});var r=Array.prototype,i=r.slice,o=r.map},function(t,e,n){"use strict";e.a=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}},function(t,e,n){"use strict";function r(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),u=r/Math.pow(10,i);return i>=0?(u>=o?10:u>=a?5:u>=s?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=o?10:u>=a?5:u>=s?2:1)}function i(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=o?i*=10:u>=a?i*=5:u>=s&&(i*=2),e<t?-i:i}e.b=r,e.c=i;var o=Math.sqrt(50),a=Math.sqrt(10),s=Math.sqrt(2);e.a=function(t,e,n){var i,o,a,s,u=-1;if(e=+e,t=+t,n=+n,t===e&&n>0)return[t];if((i=e<t)&&(o=t,t=e,e=o),0===(s=r(t,e,n))||!isFinite(s))return[];if(s>0)for(t=Math.ceil(t/s),e=Math.floor(e/s),a=new Array(o=Math.ceil(e-t+1));++u<o;)a[u]=(t+u)*s;else for(t=Math.floor(t*s),e=Math.ceil(e*s),a=new Array(o=Math.ceil(t-e+1));++u<o;)a[u]=(t-u)/s;return i&&a.reverse(),a}},function(t,e,n){"use strict";e.a=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}},function(t,e,n){"use strict";e.a=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}},function(t,e,n){"use strict";function r(t){return t.length}var i=n(102);e.a=function(t){if(!(a=t.length))return[];for(var e=-1,n=Object(i.a)(t,r),o=new Array(n);++e<n;)for(var a,s=-1,u=o[e]=new Array(a);++s<a;)u[s]=t[s][e];return o}},function(t,e,n){"use strict";var r=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var i=document.documentElement;if(!i.matches){var o=i.webkitMatchesSelector||i.msMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector;r=function(t){return function(){return o.call(this,t)}}}}e.a=r},function(t,e,n){"use strict";function r(){return[]}e.a=function(t){return null==t?r:function(){return this.querySelectorAll(t)}}},function(t,e,n){"use strict";function r(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}e.a=r;var i=n(107),o=n(4);e.b=function(){return new o.a(this._enter||this._groups.map(i.a),this._parents)},r.prototype={constructor:r,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}}},function(t,e,n){"use strict";e.a=function(t){return new Array(t.length)}},function(t,e,n){"use strict";function r(t){return function(){this.style.removeProperty(t)}}function i(t,e,n){return function(){this.style.setProperty(t,e,n)}}function o(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function a(t,e){return t.style.getPropertyValue(e)||Object(s.a)(t).getComputedStyle(t,null).getPropertyValue(e)}e.b=a;var s=n(58);e.a=function(t,e,n){return arguments.length>1?this.each((null==e?r:"function"==typeof e?o:i)(t,e,null==n?"":n)):a(this.node(),t)}},function(t,e,n){"use strict";function r(t,e){var n=t.document.documentElement,r=Object(i.j)(t).on("dragstart.drag",null);e&&(r.on("click.drag",o.a,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}e.b=r;var i=n(1),o=n(110);e.a=function(t){var e=t.document.documentElement,n=Object(i.j)(t).on("dragstart.drag",o.a,!0);"onselectstart"in e?n.on("selectstart.drag",o.a,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}},function(t,e,n){"use strict";function r(){i.d.stopImmediatePropagation()}e.b=r;var i=n(1);e.a=function(){i.d.preventDefault(),i.d.stopImmediatePropagation()}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=Math.PI/180,i=180/Math.PI},function(t,e,n){"use strict";function r(t){return function(e){var n,r,o=e.length,a=new Array(o),s=new Array(o),u=new Array(o);for(n=0;n<o;++n)r=Object(i.f)(e[n]),a[n]=r.r||0,s[n]=r.g||0,u[n]=r.b||0;return a=t(a),s=t(s),u=t(u),r.opacity=1,function(t){return r.r=a(t),r.g=s(t),r.b=u(t),r+""}}}n.d(e,"b",function(){return u}),n.d(e,"c",function(){return c});var i=n(7),o=n(62),a=n(113),s=n(22);e.a=function t(e){function n(t,e){var n=r((t=Object(i.f)(t)).r,(e=Object(i.f)(e)).r),o=r(t.g,e.g),a=r(t.b,e.b),u=Object(s.a)(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=o(e),t.b=a(e),t.opacity=u(e),t+""}}var r=Object(s.b)(e);return n.gamma=t,n}(1);var u=r(o.b),c=r(a.a)},function(t,e,n){"use strict";var r=n(62);e.a=function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),o=t[(i+e-1)%e],a=t[i%e],s=t[(i+1)%e],u=t[(i+2)%e];return Object(r.a)((n-i/e)*e,o,a,s,u)}}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";var r=n(59);e.a=function(t,e){var n,i=e?e.length:0,o=t?Math.min(i,t.length):0,a=new Array(o),s=new Array(i);for(n=0;n<o;++n)a[n]=Object(r.a)(t[n],e[n]);for(;n<i;++n)s[n]=e[n];return function(t){for(n=0;n<o;++n)s[n]=a[n](t);return s}}},function(t,e,n){"use strict";e.a=function(t,e){var n=new Date;return t=+t,e-=t,function(r){return n.setTime(t+e*r),n}}},function(t,e,n){"use strict";var r=n(59);e.a=function(t,e){var n,i={},o={};null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={});for(n in e)n in t?i[n]=Object(r.a)(t[n],e[n]):o[n]=e[n];return function(t){for(n in i)o[n]=i[n](t);return o}}},function(t,e,n){"use strict";function r(t){return function(){return t}}function i(t){return function(e){return t(e)+""}}var o=n(34),a=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,s=new RegExp(a.source,"g");e.a=function(t,e){var n,u,c,l=a.lastIndex=s.lastIndex=0,h=-1,f=[],d=[];for(t+="",e+="";(n=a.exec(t))&&(u=s.exec(e));)(c=u.index)>l&&(c=e.slice(l,c),f[h]?f[h]+=c:f[++h]=c),(n=n[0])===(u=u[0])?f[h]?f[h]+=u:f[++h]=u:(f[++h]=null,d.push({i:h,x:Object(o.a)(n,u)})),l=s.lastIndex;return l<e.length&&(c=e.slice(l),f[h]?f[h]+=c:f[++h]=c),f.length<2?d[0]?i(d[0].x):r(e):(e=d.length,function(t){for(var n,r=0;r<e;++r)f[(n=d[r]).i]=n.x(t);return f.join("")})}},function(t,e,n){"use strict";var r=n(6);e.a=function(t,e){var n,i,o,a=t.__transition,s=!0;if(a){e=null==e?null:e+"";for(o in a)(n=a[o]).name===e?(i=n.state>r.d&&n.state<r.b,n.state=r.a,n.timer.stop(),i&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete a[o]):s=!1;s&&delete t.__transition}}},function(t,e,n){"use strict";var r=n(7),i=n(5);e.a=function(t,e){var n;return("number"==typeof e?i.m:e instanceof r.a?i.o:(n=Object(r.a)(e))?(e=n,i.o):i.s)(t,e)}},function(t,e,n){"use strict";var r=n(269);n.d(e,"y",function(){return r.a});var i=n(270);n.d(e,"D",function(){return i.b}),n.d(e,"E",function(){return i.a}),n.d(e,"G",function(){return i.c}),n.d(e,"F",function(){return i.b});var o=n(271);n.d(e,"m",function(){return o.b}),n.d(e,"n",function(){return o.a}),n.d(e,"p",function(){return o.c}),n.d(e,"o",function(){return o.b});var a=n(272);n.d(e,"z",function(){return a.b}),n.d(e,"A",function(){return a.a}),n.d(e,"C",function(){return a.c}),n.d(e,"B",function(){return a.b});var s=n(273);n.d(e,"H",function(){return s.b}),n.d(e,"I",function(){return s.a}),n.d(e,"K",function(){return s.c}),n.d(e,"J",function(){return s.b});var u=n(274);n.d(e,"u",function(){return u.b}),n.d(e,"v",function(){return u.a}),n.d(e,"x",function(){return u.c}),n.d(e,"w",function(){return u.b});var c=n(275);n.d(e,"i",function(){return c.b}),n.d(e,"j",function(){return c.a}),n.d(e,"l",function(){return c.c}),n.d(e,"k",function(){return c.b});var l=n(276);n.d(e,"e",function(){return l.c}),n.d(e,"f",function(){return l.a}),n.d(e,"h",function(){return l.c}),n.d(e,"g",function(){return l.b});var h=n(277);n.d(e,"a",function(){return h.b}),n.d(e,"b",function(){return h.a}),n.d(e,"d",function(){return h.c}),n.d(e,"c",function(){return h.b});var f=n(278);n.d(e,"q",function(){return f.c}),n.d(e,"r",function(){return f.a}),n.d(e,"t",function(){return f.c}),n.d(e,"s",function(){return f.b})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"d",function(){return i}),n.d(e,"b",function(){return a}),n.d(e,"e",function(){return s}),n.d(e,"c",function(){return u});var r=Math.cos,i=Math.sin,o=Math.PI,a=o/2,s=2*o,u=Math.max},function(t,e,n){"use strict";function r(t){return t.x}function i(t){return t.y}e.b=r,e.c=i;var o=n(12),a=n(23),s=n(35),u=Math.PI*(3-Math.sqrt(5));e.a=function(t){function e(){n(),g.call("tick",c),l<h&&(v.stop(),g.call("end",c))}function n(){var e,n,r=t.length;for(l+=(d-l)*f,m.each(function(t){t(l)}),e=0;e<r;++e)n=t[e],null==n.fx?n.x+=n.vx*=p:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=p:(n.y=n.fy,n.vy=0)}function r(){for(var e,n=0,r=t.length;n<r;++n){if(e=t[n],e.index=n,isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),o=n*u;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function i(e){return e.initialize&&e.initialize(t),e}var c,l=1,h=.001,f=1-Math.pow(h,1/300),d=0,p=.6,m=Object(a.c)(),v=Object(s.d)(e),g=Object(o.a)("tick","end");return null==t&&(t=[]),r(),c={tick:n,restart:function(){return v.restart(e),c},stop:function(){return v.stop(),c},nodes:function(e){return arguments.length?(t=e,r(),m.each(i),c):t},alpha:function(t){return arguments.length?(l=+t,c):l},alphaMin:function(t){return arguments.length?(h=+t,c):h},alphaDecay:function(t){return arguments.length?(f=+t,c):+f},alphaTarget:function(t){return arguments.length?(d=+t,c):d},velocityDecay:function(t){return arguments.length?(p=1-t,c):1-p},force:function(t,e){return arguments.length>1?(null==e?m.remove(t):m.set(t,i(e)),c):m.get(t)},find:function(e,n,r){var i,o,a,s,u,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c<l;++c)s=t[c],i=e-s.x,o=n-s.y,(a=i*i+o*o)<r&&(u=s,r=a);return u},on:function(t,e){return arguments.length>1?(g.on(t,e),c):g.on(t)}}}},function(t,e,n){"use strict";var r=n(37),i=n(318),o=n(319),a=n(125),s=n(126),u=n(127),c=n(322),l=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];e.a=function(t){function e(t){function e(t){var e,o,a,s=_,f=x;if("c"===b)f=w(t)+f,t="";else{t=+t;var m=t<0;if(t=w(Math.abs(t),y),m&&0==+t&&(m=!1),s=(m?"("===i?i:"-":"-"===i||"("===i?"":i)+s,f=f+("s"===b?l[8+u.b/3]:"")+(m&&"("===i?")":""),M)for(e=-1,o=t.length;++e<o;)if(48>(a=t.charCodeAt(e))||a>57){f=(46===a?d+t.slice(e+1):t.slice(e))+f,t=t.slice(0,e);break}}g&&!c&&(t=h(t,1/0));var E=s.length+t.length+f.length,T=E<v?new Array(v-E+1).join(n):"";switch(g&&c&&(t=h(T+t,T.length?v-f.length:1/0),T=""),r){case"<":t=s+t+f+T;break;case"=":t=s+T+t+f;break;case"^":t=T.slice(0,E=T.length>>1)+s+t+f+T.slice(E);break;default:t=T+s+t+f}return p(t)}t=Object(a.a)(t);var n=t.fill,r=t.align,i=t.sign,o=t.symbol,c=t.zero,v=t.width,g=t.comma,y=t.precision,b=t.type,_="$"===o?f[0]:"#"===o&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===o?f[1]:/[%p]/.test(b)?m:"",w=s.a[b],M=!b||/[defgprs%]/.test(b);return y=null==y?b?6:12:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),e.toString=function(){return t+""},e}function n(t,n){var i=e((t=Object(a.a)(t),t.type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor(Object(r.a)(n)/3))),s=Math.pow(10,-o),u=l[8+o/3];return function(t){return i(s*t)+u}}var h=t.grouping&&t.thousands?Object(i.a)(t.grouping,t.thousands):c.a,f=t.currency,d=t.decimal,p=t.numerals?Object(o.a)(t.numerals):c.a,m=t.percent||"%";return{format:e,formatPrefix:n}}},function(t,e,n){"use strict";function r(t){return new i(t)}function i(t){if(!(e=a.exec(t)))throw new Error("invalid format: "+t);var e,n=e[1]||" ",r=e[2]||">",i=e[3]||"-",s=e[4]||"",u=!!e[5],c=e[6]&&+e[6],l=!!e[7],h=e[8]&&+e[8].slice(1),f=e[9]||"";"n"===f?(l=!0,f="g"):o.a[f]||(f=""),(u||"0"===n&&"="===r)&&(u=!0,n="0",r="="),this.fill=n,this.align=r,this.sign=i,this.symbol=s,this.zero=u,this.width=c,this.comma=l,this.precision=h,this.type=f}e.a=r;var o=n(126),a=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;r.prototype=i.prototype,i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type}},function(t,e,n){"use strict";var r=n(320),i=n(127),o=n(321);e.a={"":r.a,"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Object(o.a)(100*t,e)},r:o.a,s:i.a,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}}},function(t,e,n){"use strict";n.d(e,"b",function(){return r});var r,i=n(72);e.a=function(t,e){var n=Object(i.a)(t,e);if(!n)return t+"";var o=n[0],a=n[1],s=a-(r=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,u=o.length;return s===u?o:s>u?o+new Array(s-u+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+Object(i.a)(t,Math.max(0,e+s-1))[0]}},function(t,e,n){"use strict";function r(){y.point=o}function i(){a(s,u)}function o(t,e){y.point=a,s=t,u=e,t*=d.r,e*=d.r,c=t,l=Object(d.g)(e=e/2+d.q),h=Object(d.t)(e)}function a(t,e){t*=d.r,e*=d.r,e=e/2+d.q;var n=t-c,r=n>=0?1:-1,i=r*n,o=Object(d.g)(e),a=Object(d.t)(e),s=h*a,u=l*o+s*Object(d.g)(i),f=s*r*Object(d.t)(i);v.add(Object(d.e)(f,u)),c=t,l=o,h=a}n.d(e,"a",function(){return v}),n.d(e,"b",function(){return y});var s,u,c,l,h,f=n(19),d=n(0),p=n(11),m=n(14),v=Object(f.a)(),g=Object(f.a)(),y={point:p.a,lineStart:p.a,lineEnd:p.a,polygonStart:function(){v.reset(),y.lineStart=r,y.lineEnd=i},polygonEnd:function(){var t=+v;g.add(t<0?d.w+t:t),this.lineStart=this.lineEnd=this.point=p.a},sphere:function(){g.add(d.w)}};e.c=function(t){return g.reset(),Object(m.a)(t,y),2*g}},function(t,e,n){"use strict";function r(t,e,n,r,a,u){if(n){var c=Object(s.g)(e),l=Object(s.t)(e),h=r*n;null==a?(a=e+r*s.w,u=e-h/2):(a=i(c,a),u=i(c,u),(r>0?a<u:a>u)&&(a+=r*s.w));for(var f,d=a;r>0?d>u:d<u;d-=h)f=Object(o.g)([c,-l*Object(s.g)(d),-l*Object(s.t)(d)]),t.point(f[0],f[1])}}function i(t,e){e=Object(o.a)(e),e[0]-=t,Object(o.e)(e);var n=Object(s.b)(-e[1]);return((-e[2]<0?-n:n)+s.w-s.i)%s.w}e.a=r;var o=n(24),a=n(329),s=n(0),u=n(38);e.b=function(){function t(t,e){n.push(t=i(t,e)),t[0]*=s.h,t[1]*=s.h}function e(){var t=o.apply(this,arguments),e=c.apply(this,arguments)*s.r,a=l.apply(this,arguments)*s.r;return n=[],i=Object(u.b)(-t[0]*s.r,-t[1]*s.r,0).invert,r(h,e,a,1),t={type:"Polygon",coordinates:[n]},n=i=null,t}var n,i,o=Object(a.a)([0,0]),c=Object(a.a)(90),l=Object(a.a)(6),h={point:t};return e.center=function(t){return arguments.length?(o="function"==typeof t?t:Object(a.a)([+t[0],+t[1]]),e):o},e.radius=function(t){return arguments.length?(c="function"==typeof t?t:Object(a.a)(+t),e):c},e.precision=function(t){return arguments.length?(l="function"==typeof t?t:Object(a.a)(+t),e):l},e}},function(t,e,n){"use strict";e.a=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}},function(t,e,n){"use strict";function r(t){var e,n=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,u){var c=a>0?s.o:-s.o,l=Object(s.a)(a-n);Object(s.a)(l-s.o)<s.i?(t.point(n,r=(r+u)/2>0?s.l:-s.l),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(c,r),t.point(a,r),e=0):o!==c&&l>=s.o&&(Object(s.a)(n-o)<s.i&&(n-=o*s.i),Object(s.a)(a-c)<s.i&&(a-=c*s.i),r=i(n,r,a,u),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(c,r),e=0),t.point(n=a,r=u),o=c},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}function i(t,e,n,r){var i,o,a=Object(s.t)(t-n);return Object(s.a)(a)>s.i?Object(s.d)((Object(s.t)(e)*(o=Object(s.g)(r))*Object(s.t)(n)-Object(s.t)(r)*(i=Object(s.g)(e))*Object(s.t)(t))/(i*o*a)):(e+r)/2}function o(t,e,n,r){var i;if(null==t)i=n*s.l,r.point(-s.o,i),r.point(0,i),r.point(s.o,i),r.point(s.o,0),r.point(s.o,-i),r.point(0,-i),r.point(-s.o,-i),r.point(-s.o,0),r.point(-s.o,i);else if(Object(s.a)(t[0]-e[0])>s.i){var o=t[0]<e[0]?s.o:-s.o;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}var a=n(132),s=n(0);e.a=Object(a.a)(function(){return!0},r,o,[-s.o,-s.l])},function(t,e,n){"use strict";function r(t){return t.length>1}function i(t,e){return((t=t.x)[0]<0?t[1]-s.l-s.i:s.l-t[1])-((e=e.x)[0]<0?e[1]-s.l-s.i:s.l-e[1])}var o=n(133),a=n(134),s=n(0),u=n(136),c=n(3);e.a=function(t,e,n,s){return function(l){function h(e,n){t(e,n)&&l.point(e,n)}function f(t,e){x.point(t,e)}function d(){T.point=f,x.lineStart()}function p(){T.point=h,x.lineEnd()}function m(t,e){_.push([t,e]),M.point(t,e)}function v(){M.lineStart(),_=[]}function g(){m(_[0][0],_[0][1]),M.lineEnd();var t,e,n,i,o=M.clean(),a=w.result(),s=a.length;if(_.pop(),y.push(_),_=null,s)if(1&o){if(n=a[0],(e=n.length-1)>0){for(E||(l.polygonStart(),E=!0),l.lineStart(),t=0;t<e;++t)l.point((i=n[t])[0],i[1]);l.lineEnd()}}else s>1&&2&o&&a.push(a.pop().concat(a.shift())),b.push(a.filter(r))}var y,b,_,x=e(l),w=Object(o.a)(),M=e(w),E=!1,T={point:h,lineStart:d,lineEnd:p,polygonStart:function(){T.point=m,T.lineStart=v,T.lineEnd=g,b=[],y=[]},polygonEnd:function(){T.point=h,T.lineStart=d,T.lineEnd=p,b=Object(c.n)(b);var t=Object(u.a)(y,s);b.length?(E||(l.polygonStart(),E=!0),Object(a.a)(b,i,t,n,l)):t&&(E||(l.polygonStart(),E=!0),l.lineStart(),n(null,null,1,l),l.lineEnd()),E&&(l.polygonEnd(),E=!1),b=y=null},sphere:function(){l.polygonStart(),l.lineStart(),n(null,null,1,l),l.lineEnd(),l.polygonEnd()}};return T}}},function(t,e,n){"use strict";var r=n(11);e.a=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:r.a,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}},function(t,e,n){"use strict";function r(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function i(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var o=n(135);e.a=function(t,e,n,a,s){var u,c,l=[],h=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],a=t[e];if(Object(o.a)(i,a)){for(s.lineStart(),u=0;u<e;++u)s.point((i=t[u])[0],i[1]);return void s.lineEnd()}l.push(n=new r(i,t,null,!0)),h.push(n.o=new r(i,null,n,!1)),l.push(n=new r(a,t,null,!1)),h.push(n.o=new r(a,null,n,!0))}}),l.length){for(h.sort(e),i(l),i(h),u=0,c=h.length;u<c;++u)h[u].e=n=!n;for(var f,d,p=l[0];;){for(var m=p,v=!0;m.v;)if((m=m.n)===p)return;f=m.z,s.lineStart();do{if(m.v=m.o.v=!0,m.e){if(v)for(u=0,c=f.length;u<c;++u)s.point((d=f[u])[0],d[1]);else a(m.x,m.n.x,1,s);m=m.n}else{if(v)for(f=m.p.z,u=f.length-1;u>=0;--u)s.point((d=f[u])[0],d[1]);else a(m.x,m.p.x,-1,s);m=m.p}m=m.o,f=m.z,v=!v}while(!m.v);s.lineEnd()}}}},function(t,e,n){"use strict";var r=n(0);e.a=function(t,e){return Object(r.a)(t[0]-e[0])<r.i&&Object(r.a)(t[1]-e[1])<r.i}},function(t,e,n){"use strict";var r=n(19),i=n(24),o=n(0),a=Object(r.a)();e.a=function(t,e){var n=e[0],r=e[1],s=[Object(o.t)(n),-Object(o.g)(n),0],u=0,c=0;a.reset();for(var l=0,h=t.length;l<h;++l)if(d=(f=t[l]).length)for(var f,d,p=f[d-1],m=p[0],v=p[1]/2+o.q,g=Object(o.t)(v),y=Object(o.g)(v),b=0;b<d;++b,m=x,g=M,y=E,p=_){var _=f[b],x=_[0],w=_[1]/2+o.q,M=Object(o.t)(w),E=Object(o.g)(w),T=x-m,S=T>=0?1:-1,A=S*T,O=A>o.o,C=g*M;if(a.add(Object(o.e)(C*S*Object(o.t)(A),y*E+C*Object(o.g)(A))),u+=O?T+S*o.w:T,O^m>=n^x>=n){var R=Object(i.c)(Object(i.a)(p),Object(i.a)(_));Object(i.e)(R);var L=Object(i.c)(s,R);Object(i.e)(L);var j=(O^T>=0?-1:1)*Object(o.c)(L[2]);(r>j||r===j&&(R[0]||R[1]))&&(c+=O^T>=0?1:-1)}}return(u<-o.i||u<o.i&&a<-o.i)^1&c}},function(t,e,n){"use strict";var r=n(24),i=n(129),o=n(0),a=n(135),s=n(132);e.a=function(t){function e(e,n,r,o){Object(i.a)(o,t,f,r,e,n)}function n(t,e){return Object(o.g)(t)*Object(o.g)(e)>h}function u(t){var e,r,i,s,u;return{lineStart:function(){s=i=!1,u=1},point:function(h,f){var m,v=[h,f],g=n(h,f),y=d?g?0:l(h,f):g?l(h+(h<0?o.o:-o.o),f):0;if(!e&&(s=i=g)&&t.lineStart(),g!==i&&(!(m=c(e,v))||Object(a.a)(e,m)||Object(a.a)(v,m))&&(v[0]+=o.i,v[1]+=o.i,g=n(v[0],v[1])),g!==i)u=0,g?(t.lineStart(),m=c(v,e),t.point(m[0],m[1])):(m=c(e,v),t.point(m[0],m[1]),t.lineEnd()),e=m;else if(p&&e&&d^g){var b;y&r||!(b=c(v,e,!0))||(u=0,d?(t.lineStart(),t.point(b[0][0],b[0][1]),t.point(b[1][0],b[1][1]),t.lineEnd()):(t.point(b[1][0],b[1][1]),t.lineEnd(),t.lineStart(),t.point(b[0][0],b[0][1])))}!g||e&&Object(a.a)(e,v)||t.point(v[0],v[1]),e=v,i=g,r=y},lineEnd:function(){i&&t.lineEnd(),e=null},clean:function(){return u|(s&&i)<<1}}}function c(t,e,n){var i=Object(r.a)(t),a=Object(r.a)(e),s=[1,0,0],u=Object(r.c)(i,a),c=Object(r.d)(u,u),l=u[0],f=c-l*l;if(!f)return!n&&t;var d=h*c/f,p=-h*l/f,m=Object(r.c)(s,u),v=Object(r.f)(s,d),g=Object(r.f)(u,p);Object(r.b)(v,g);var y=m,b=Object(r.d)(v,y),_=Object(r.d)(y,y),x=b*b-_*(Object(r.d)(v,v)-1);if(!(x<0)){var w=Object(o.u)(x),M=Object(r.f)(y,(-b-w)/_);if(Object(r.b)(M,v),M=Object(r.g)(M),!n)return M;var E,T=t[0],S=e[0],A=t[1],O=e[1];S<T&&(E=T,T=S,S=E);var C=S-T,R=Object(o.a)(C-o.o)<o.i,L=R||C<o.i;if(!R&&O<A&&(E=A,A=O,O=E),L?R?A+O>0^M[1]<(Object(o.a)(M[0]-T)<o.i?A:O):A<=M[1]&&M[1]<=O:C>o.o^(T<=M[0]&&M[0]<=S)){var j=Object(r.f)(y,(-b+w)/_);return Object(r.b)(j,v),[M,Object(r.g)(j)]}}}function l(e,n){var r=d?t:o.o-t,i=0;return e<-r?i|=1:e>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}var h=Object(o.g)(t),f=6*o.r,d=h>0,p=Object(o.a)(h)>o.i;return Object(s.a)(n,u,e,d?[0,-t]:[-o.o,t-o.o])}},function(t,e,n){"use strict";var r=n(139),i=[null,null],o={type:"LineString",coordinates:i};e.a=function(t,e){return i[0]=t,i[1]=e,Object(r.a)(o)}},function(t,e,n){"use strict";function r(){m.point=o,m.lineEnd=i}function i(){m.point=m.lineEnd=f.a}function o(t,e){t*=h.r,e*=h.r,s=t,u=Object(h.t)(e),c=Object(h.g)(e),m.point=a}function a(t,e){t*=h.r,e*=h.r;var n=Object(h.t)(e),r=Object(h.g)(e),i=Object(h.a)(t-s),o=Object(h.g)(i),a=Object(h.t)(i),l=r*a,f=c*n-u*r*o,d=u*n+c*r*o;p.add(Object(h.e)(Object(h.u)(l*l+f*f),d)),s=t,u=n,c=r}var s,u,c,l=n(19),h=n(0),f=n(11),d=n(14),p=Object(l.a)(),m={sphere:f.a,point:f.a,lineStart:r,lineEnd:f.a,polygonStart:f.a,polygonEnd:f.a};e.a=function(t){return p.reset(),Object(d.a)(t,m),+p}},function(t,e,n){"use strict";function r(t,e){t<o&&(o=t),t>s&&(s=t),e<a&&(a=e),e>u&&(u=e)}var i=n(11),o=1/0,a=o,s=-o,u=s,c={point:r,lineStart:i.a,lineEnd:i.a,polygonStart:i.a,polygonEnd:i.a,result:function(){var t=[[o,a],[s,u]];return s=u=-(a=o=1/0),t}};e.a=c},function(t,e,n){"use strict";var r=n(74);e.a=function(){return Object(r.b)().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}},function(t,e,n){"use strict";function r(t,e){return[t,e]}e.b=r;var i=n(8);r.invert=r,e.a=function(){return Object(i.a)(r).scale(152.63)}},function(t,e,n){"use strict";function r(t,e,n){var r=t.x,i=t.y,o=e.r+n.r,a=t.r+n.r,s=e.x-r,u=e.y-i,c=s*s+u*u;if(c){var l=.5+((a*=a)-(o*=o))/(2*c),h=Math.sqrt(Math.max(0,2*o*(a+c)-(a-=c)*a-o*o))/(2*c);n.x=r+l*s+h*u,n.y=i+l*u-h*s}else n.x=r+a,n.y=i}function i(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return i*i-1e-6>n*n+r*r}function o(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function a(t){this._=t,this.next=null,this.previous=null}function s(t){if(!(c=t.length))return 0;var e,n,s,c,l,h,f,d,p,m,v;if(e=t[0],e.x=0,e.y=0,!(c>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(c>2))return e.r+n.r;r(n,e,s=t[2]),e=new a(e),n=new a(n),s=new a(s),e.next=s.previous=n,n.next=e.previous=s,s.next=n.previous=e;t:for(f=3;f<c;++f){r(e._,n._,s=t[f]),s=new a(s),d=n.next,p=e.previous,m=n._.r,v=e._.r;do{if(m<=v){if(i(d._,s._)){n=d,e.next=n,n.previous=e,--f;continue t}m+=d._.r,d=d.next}else{if(i(p._,s._)){e=p,e.next=n,n.previous=e,--f;continue t}v+=p._.r,p=p.previous}}while(d!==p.next);for(s.previous=e,s.next=n,e.next=n.previous=n=s,l=o(e);(s=s.next)!==n;)(h=o(s))<l&&(e=s,l=h);n=e.next}for(e=[n._],s=n;(s=s.next)!==n;)e.push(s._);for(s=Object(u.a)(e),f=0;f<c;++f)e=t[f],e.x-=s.x,e.y-=s.y;return s.r}e.b=s;var u=n(144);e.a=function(t){return s(t),t}},function(t,e,n){"use strict";function r(t,e){var n,r;if(a(e,t))return[e];for(n=0;n<t.length;++n)if(i(e,t[n])&&a(c(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(i(c(t[n],t[r]),e)&&i(c(t[n],e),t[r])&&i(c(t[r],e),t[n])&&a(l(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function i(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function o(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function a(t,e){for(var n=0;n<e.length;++n)if(!o(t,e[n]))return!1;return!0}function s(t){switch(t.length){case 1:return u(t[0]);case 2:return c(t[0],t[1]);case 3:return l(t[0],t[1],t[2])}}function u(t){return{x:t.x,y:t.y,r:t.r}}function c(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function l(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,d=r-c,p=i-s,m=i-l,v=u-o,g=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+u*u,_=y-c*c-l*l+h*h,x=d*p-f*m,w=(p*_-m*b)/(2*x)-r,M=(m*v-p*g)/x,E=(d*b-f*_)/(2*x)-i,T=(f*g-d*v)/x,S=M*M+T*T-1,A=2*(o+w*M+E*T),O=w*w+E*E-o*o,C=-(S?(A+Math.sqrt(A*A-4*S*O))/(2*S):O/A);return{x:r+w+M*C,y:i+E+T*C,r:C}}var h=n(368);e.a=function(t){for(var e,n,i=0,a=(t=Object(h.a)(h.b.call(t))).length,u=[];i<a;)e=t[i],n&&o(n,e)?++i:(n=s(u=r(u,e)),i=0);return n}},function(t,e,n){"use strict";function r(){return 0}e.a=r,e.b=function(t){return function(){return t}}},function(t,e,n){"use strict";e.a=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}},function(t,e,n){"use strict";var r=n(20);e.a=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var o;if(null!=r)o=r,r=null;else do{r=2*e()-1,o=2*e()-1,i=r*r+o*o}while(!i||i>1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(r.a)},function(t,e,n){"use strict";var r=n(20);e.a=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(r.a)},function(t,e,n){"use strict";function r(t,e){return function(n){return t(n.responseText,e)}}var i=n(81);e.a=function(t,e){return function(n,o,a){arguments.length<3&&(a=o,o=null);var s=Object(i.a)(n).mimeType(t);return s.row=function(t){return arguments.length?s.response(r(e,o=t)):o},s.row(o),a?s.get(a):s}}},function(t,e,n){"use strict";function r(t){function e(e){var r=e+"",i=n.get(r);if(!i){if(u!==a)return u;n.set(r,i=s.push(e))}return t[(i-1)%t.length]}var n=Object(i.c)(),s=[],u=a;return t=null==t?[]:o.b.call(t),e.domain=function(t){if(!arguments.length)return s.slice();s=[],n=Object(i.c)();for(var r,o,a=-1,u=t.length;++a<u;)n.has(o=(r=t[a])+"")||n.set(o,s.push(r));return e},e.range=function(n){return arguments.length?(t=o.b.call(n),e):t.slice()},e.unknown=function(t){return arguments.length?(u=t,e):u},e.copy=function(){return r().domain(s).range(t).unknown(u)},e}n.d(e,"b",function(){return a}),e.a=r;var i=n(23),o=n(15),a={name:"implicit"}},function(t,e,n){"use strict";e.a=function(t){return+t}},function(t,e,n){"use strict";e.a=function(t,e){t=t.slice();var n,r=0,i=t.length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}},function(t,e,n){"use strict";function r(t){return new Date(t)}function i(t){return t instanceof Date?+t:+new Date(+t)}function o(t,e,n,u,c,_,x,w,M){function E(r){return(x(r)<r?C:_(r)<r?R:c(r)<r?L:u(r)<r?j:e(r)<r?n(r)<r?P:N:t(r)<r?I:U)(r)}function T(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=Object(a.e)(function(t){return t[2]}).right(D,o);s===D.length?(i=Object(a.A)(n/b,r/b,e),e=t):s?(s=D[o/D[s-1][2]<D[s][2]/o?s-1:s],i=s[1],e=s[0]):(i=Math.max(Object(a.A)(n,r,e),1),e=w)}return null==i?e:e.every(i)}var S=Object(h.b)(h.c,s.m),A=S.invert,O=S.domain,C=M(".%L"),R=M(":%S"),L=M("%I:%M"),j=M("%I %p"),P=M("%a %d"),N=M("%b %d"),I=M("%B"),U=M("%Y"),D=[[x,1,d],[x,5,5*d],[x,15,15*d],[x,30,30*d],[_,1,p],[_,5,5*p],[_,15,15*p],[_,30,30*p],[c,1,m],[c,3,3*m],[c,6,6*m],[c,12,12*m],[u,1,v],[u,2,2*v],[n,1,g],[e,1,y],[e,3,3*y],[t,1,b]];return S.invert=function(t){return new Date(A(t))},S.domain=function(t){return arguments.length?O(l.a.call(t,i)):O().map(r)},S.ticks=function(t,e){var n,r=O(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=T(t,i,o,e),n=n?n.range(i,o+1):[],a?n.reverse():n},S.tickFormat=function(t,e){return null==e?E:M(e)},S.nice=function(t,e){var n=O();return(t=T(t,n[0],n[n.length-1],e))?O(Object(f.a)(n,t)):S},S.copy=function(){return Object(h.a)(S,o(t,e,n,u,c,_,x,w,M))},S}e.a=o;var a=n(3),s=n(5),u=n(44),c=n(83),l=n(15),h=n(43),f=n(152),d=1e3,p=60*d,m=60*p,v=24*m,g=7*v,y=30*v,b=365*v;e.b=function(){return o(u.D,u.n,u.B,u.a,u.e,u.j,u.r,u.h,c.c).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}},function(t,e,n){"use strict";function r(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function i(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function o(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function a(t){function e(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=pt[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function n(t,e){return function(n){var r,s,u=o(1900),c=a(u,t,n+="",0);if(c!=n.length)return null;if("Q"in u)return new Date(u.Q);if("p"in u&&(u.H=u.H%12+12*u.p),"V"in u){if(u.V<1||u.V>53)return null;"w"in u||(u.w=1),"Z"in u?(r=i(o(u.y)),s=r.getUTCDay(),r=s>4||0===s?dt.P.ceil(r):Object(dt.P)(r),r=dt.F.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(r=e(o(u.y)),s=r.getDay(),r=s>4||0===s?dt.l.ceil(r):Object(dt.l)(r),r=dt.a.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),s="Z"in u?i(o(u.y)).getUTCDay():e(o(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(s+5)%7:u.w+7*u.U-(s+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,i(u)):e(u)}}function a(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=Qt[i in pt?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function s(t,e,n){var r=Ft.exec(e.slice(n));return r?(t.p=Bt[r[0].toLowerCase()],n+r[0].length):-1}function u(t,e,n){var r=Ht.exec(e.slice(n));return r?(t.w=Vt[r[0].toLowerCase()],n+r[0].length):-1}function mt(t,e,n){var r=zt.exec(e.slice(n));return r?(t.w=Gt[r[0].toLowerCase()],n+r[0].length):-1}function vt(t,e,n){var r=qt.exec(e.slice(n));return r?(t.m=Yt[r[0].toLowerCase()],n+r[0].length):-1}function gt(t,e,n){var r=Wt.exec(e.slice(n));return r?(t.m=Xt[r[0].toLowerCase()],n+r[0].length):-1}function yt(t,e,n){return a(t,Lt,e,n)}function bt(t,e,n){return a(t,jt,e,n)}function _t(t,e,n){return a(t,Pt,e,n)}function xt(t){return Ut[t.getDay()]}function wt(t){return It[t.getDay()]}function Mt(t){return kt[t.getMonth()]}function Et(t){return Dt[t.getMonth()]}function Tt(t){return Nt[+(t.getHours()>=12)]}function St(t){return Ut[t.getUTCDay()]}function At(t){return It[t.getUTCDay()]}function Ot(t){return kt[t.getUTCMonth()]}function Ct(t){return Dt[t.getUTCMonth()]}function Rt(t){return Nt[+(t.getUTCHours()>=12)]}var Lt=t.dateTime,jt=t.date,Pt=t.time,Nt=t.periods,It=t.days,Ut=t.shortDays,Dt=t.months,kt=t.shortMonths,Ft=c(Nt),Bt=l(Nt),zt=c(It),Gt=l(It),Ht=c(Ut),Vt=l(Ut),Wt=c(Dt),Xt=l(Dt),qt=c(kt),Yt=l(kt),Zt={a:xt,A:wt,b:Mt,B:Et,c:null,d:R,e:R,f:I,H:L,I:j,j:P,L:N,m:U,M:D,p:Tt,Q:ht,s:ft,S:k,u:F,U:B,V:z,w:G,W:H,x:null,X:null,y:V,Y:W,Z:X,"%":lt},Jt={a:St,A:At,b:Ot,B:Ct,c:null,d:q,e:q,f:K,H:Y,I:Z,j:J,L:Q,m:$,M:tt,p:Rt,Q:ht,s:ft,S:et,u:nt,U:rt,V:it,w:ot,W:at,x:null,X:null,y:st,Y:ut,Z:ct,"%":lt},Qt={a:u,A:mt,b:vt,B:gt,c:yt,d:_,e:_,f:S,H:w,I:w,j:x,L:T,m:b,M:M,p:s,Q:O,s:C,S:E,u:f,U:d,V:p,w:h,W:m,x:bt,X:_t,y:g,Y:v,Z:y,"%":A};return Zt.x=e(jt,Zt),Zt.X=e(Pt,Zt),Zt.c=e(Lt,Zt),Jt.x=e(jt,Jt),Jt.X=e(Pt,Jt),Jt.c=e(Lt,Jt),{format:function(t){var n=e(t+="",Zt);return n.toString=function(){return t},n},parse:function(t){var e=n(t+="",r);return e.toString=function(){return t},e},utcFormat:function(t){var n=e(t+="",Jt);return n.toString=function(){return t},n},utcParse:function(t){var e=n(t,i);return e.toString=function(){return t},e}}}function s(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function u(t){return t.replace(gt,"\\$&")}function c(t){return new RegExp("^(?:"+t.map(u).join("|")+")","i")}function l(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function h(t,e,n){var r=mt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function f(t,e,n){var r=mt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function d(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function p(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function m(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function v(t,e,n){var r=mt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function g(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function y(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function b(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function _(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function x(t,e,n){var r=mt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function w(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function M(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function E(t,e,n){var r=mt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function T(t,e,n){var r=mt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function S(t,e,n){var r=mt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function A(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function O(t,e,n){var r=mt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function C(t,e,n){var r=mt.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function R(t,e){return s(t.getDate(),e,2)}function L(t,e){return s(t.getHours(),e,2)}function j(t,e){return s(t.getHours()%12||12,e,2)}function P(t,e){return s(1+dt.a.count(Object(dt.D)(t),t),e,3)}function N(t,e){return s(t.getMilliseconds(),e,3)}function I(t,e){return N(t,e)+"000"}function U(t,e){return s(t.getMonth()+1,e,2)}function D(t,e){return s(t.getMinutes(),e,2)}function k(t,e){return s(t.getSeconds(),e,2)}function F(t){var e=t.getDay();return 0===e?7:e}function B(t,e){return s(dt.t.count(Object(dt.D)(t),t),e,2)}function z(t,e){var n=t.getDay();return t=n>=4||0===n?Object(dt.v)(t):dt.v.ceil(t),s(dt.v.count(Object(dt.D)(t),t)+(4===Object(dt.D)(t).getDay()),e,2)}function G(t){return t.getDay()}function H(t,e){return s(dt.l.count(Object(dt.D)(t),t),e,2)}function V(t,e){return s(t.getFullYear()%100,e,2)}function W(t,e){return s(t.getFullYear()%1e4,e,4)}function X(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+s(e/60|0,"0",2)+s(e%60,"0",2)}function q(t,e){return s(t.getUTCDate(),e,2)}function Y(t,e){return s(t.getUTCHours(),e,2)}function Z(t,e){return s(t.getUTCHours()%12||12,e,2)}function J(t,e){return s(1+dt.F.count(Object(dt._7)(t),t),e,3)}function Q(t,e){return s(t.getUTCMilliseconds(),e,3)}function K(t,e){return Q(t,e)+"000"}function $(t,e){return s(t.getUTCMonth()+1,e,2)}function tt(t,e){return s(t.getUTCMinutes(),e,2)}function et(t,e){return s(t.getUTCSeconds(),e,2)}function nt(t){var e=t.getUTCDay();return 0===e?7:e}function rt(t,e){return s(dt.X.count(Object(dt._7)(t),t),e,2)}function it(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Object(dt.Z)(t):dt.Z.ceil(t),s(dt.Z.count(Object(dt._7)(t),t)+(4===Object(dt._7)(t).getUTCDay()),e,2)}function ot(t){return t.getUTCDay()}function at(t,e){return s(dt.P.count(Object(dt._7)(t),t),e,2)}function st(t,e){return s(t.getUTCFullYear()%100,e,2)}function ut(t,e){return s(t.getUTCFullYear()%1e4,e,4)}function ct(){return"+0000"}function lt(){return"%"}function ht(t){return+t}function ft(t){return Math.floor(+t/1e3)}e.a=a;var dt=n(44),pt={"-":"",_:" ",0:"0"},mt=/^\s*\d+/,vt=/^%/,gt=/[\\^$*+?|[\]().{}]/g},function(t,e,n){"use strict";function r(t){return t.toISOString()}n.d(e,"b",function(){return o});var i=n(84),o="%Y-%m-%dT%H:%M:%S.%LZ",a=Date.prototype.toISOString?r:Object(i.d)(o);e.a=a},function(t,e,n){"use strict";var r=n(13),i=n(16),o=n(45),a=n(85),s=n(86);e.a=function(){function t(t){var e,i,o,a,s,m=t.length,v=!1,g=new Array(m),y=new Array(m);for(null==f&&(p=d(s=Object(r.a)())),e=0;e<=m;++e){if(!(e<m&&h(a=t[e],e,t))===v)if(v=!v)i=e,p.areaStart(),p.lineStart();else{for(p.lineEnd(),p.lineStart(),o=e-1;o>=i;--o)p.point(g[o],y[o]);p.lineEnd(),p.areaEnd()}v&&(g[e]=+n(a,e,t),y[e]=+c(a,e,t),p.point(u?+u(a,e,t):g[e],l?+l(a,e,t):y[e]))}if(s)return p=null,s+""||null}function e(){return Object(a.a)().defined(h).curve(d).context(f)}var n=s.a,u=null,c=Object(i.a)(0),l=s.b,h=Object(i.a)(!0),f=null,d=o.a,p=null;return t.x=function(e){return arguments.length?(n="function"==typeof e?e:Object(i.a)(+e),u=null,t):n},t.x0=function(e){return arguments.length?(n="function"==typeof e?e:Object(i.a)(+e),t):n},t.x1=function(e){return arguments.length?(u=null==e?null:"function"==typeof e?e:Object(i.a)(+e),t):u},t.y=function(e){return arguments.length?(c="function"==typeof e?e:Object(i.a)(+e),l=null,t):c},t.y0=function(e){return arguments.length?(c="function"==typeof e?e:Object(i.a)(+e),t):c},t.y1=function(e){return arguments.length?(l=null==e?null:"function"==typeof e?e:Object(i.a)(+e),t):l},t.lineX0=t.lineY0=function(){return e().x(n).y(c)},t.lineY1=function(){return e().x(n).y(l)},t.lineX1=function(){return e().x(u).y(c)},t.defined=function(e){return arguments.length?(h="function"==typeof e?e:Object(i.a)(!!e),t):h},t.curve=function(e){return arguments.length?(d=e,null!=f&&(p=d(f)),t):d},t.context=function(e){return arguments.length?(null==e?f=p=null:p=d(f=e),t):f},t}},function(t,e,n){"use strict";function r(t){this._curve=t}function i(t){function e(e){return new r(t(e))}return e._curve=t,e}n.d(e,"a",function(){return a}),e.b=i;var o=n(45),a=i(o.a);r.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}}},function(t,e,n){"use strict";function r(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Object(i.b)(t)):e()._curve},t}e.b=r;var i=n(157),o=n(85);e.a=function(){return r(Object(o.a)().curve(i.a))}},function(t,e,n){"use strict";e.a=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=Array.prototype.slice},function(t,e,n){"use strict";var r=n(29);e.a={draw:function(t,e){var n=Math.sqrt(e/r.j);t.moveTo(n,0),t.arc(0,0,n,0,r.m)}}},function(t,e,n){"use strict";e.a={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}}},function(t,e,n){"use strict";var r=Math.sqrt(1/3),i=2*r;e.a={draw:function(t,e){var n=Math.sqrt(e/i),o=n*r;t.moveTo(0,-n),t.lineTo(o,0),t.lineTo(0,n),t.lineTo(-o,0),t.closePath()}}},function(t,e,n){"use strict";var r=n(29),i=Math.sin(r.j/10)/Math.sin(7*r.j/10),o=Math.sin(r.m/10)*i,a=-Math.cos(r.m/10)*i;e.a={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),i=o*n,s=a*n;t.moveTo(0,-n),t.lineTo(i,s);for(var u=1;u<5;++u){var c=r.m*u/5,l=Math.cos(c),h=Math.sin(c);t.lineTo(h*n,-l*n),t.lineTo(l*i-h*s,h*i+l*s)}t.closePath()}}},function(t,e,n){"use strict";e.a={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}}},function(t,e,n){"use strict";var r=Math.sqrt(3);e.a={draw:function(t,e){var n=-Math.sqrt(e/(3*r));t.moveTo(0,2*n),t.lineTo(-r*n,-n),t.lineTo(r*n,-n),t.closePath()}}},function(t,e,n){"use strict";var r=-.5,i=Math.sqrt(3)/2,o=1/Math.sqrt(12),a=3*(o/2+1);e.a={draw:function(t,e){var n=Math.sqrt(e/a),s=n/2,u=n*o,c=s,l=n*o+n,h=-c,f=l;t.moveTo(s,u),t.lineTo(c,l),t.lineTo(h,f),t.lineTo(r*s-i*u,i*s+r*u),t.lineTo(r*c-i*l,i*c+r*l),t.lineTo(r*h-i*f,i*h+r*f),t.lineTo(r*s+i*u,r*u-i*s),t.lineTo(r*c+i*l,r*l-i*c),t.lineTo(r*h+i*f,r*f-i*h),t.closePath()}}},function(t,e,n){"use strict";function r(t,e){this._context=t,this._k=(1-e)/6}e.a=r;var i=n(46),o=n(48);r.prototype={areaStart:i.a,areaEnd:i.a,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Object(o.c)(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.b=function t(e){function n(t){return new r(t,e)}return n.tension=function(e){return t(+e)},n}(0)},function(t,e,n){"use strict";function r(t,e){this._context=t,this._k=(1-e)/6}e.a=r;var i=n(48);r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Object(i.c)(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.b=function t(e){function n(t){return new r(t,e)}return n.tension=function(e){return t(+e)},n}(0)},function(t,e,n){"use strict";function r(t){return l.b[t.index]={site:t,halfedges:[]}}function i(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function o(t,e){return e[+(e.left!==t.site)]}function a(t,e){return e[+(e.left===t.site)]}function s(){for(var t,e,n,r,o=0,a=l.b.length;o<a;++o)if((t=l.b[o])&&(r=(e=t.halfedges).length)){var s=new Array(r),u=new Array(r);for(n=0;n<r;++n)s[n]=n,u[n]=i(t,l.e[e[n]]);for(s.sort(function(t,e){return u[e]-u[t]}),n=0;n<r;++n)u[n]=e[s[n]];for(n=0;n<r;++n)e[n]=u[n]}}function u(t,e,n,r){var i,s,u,h,f,d,p,m,v,g,y,b,_=l.b.length,x=!0;for(i=0;i<_;++i)if(s=l.b[i]){for(u=s.site,f=s.halfedges,h=f.length;h--;)l.e[f[h]]||f.splice(h,1);for(h=0,d=f.length;h<d;)g=a(s,l.e[f[h]]),y=g[0],b=g[1],p=o(s,l.e[f[++h%d]]),m=p[0],v=p[1],(Math.abs(y-m)>l.f||Math.abs(b-v)>l.f)&&(f.splice(h,0,l.e.push(Object(c.b)(u,g,Math.abs(y-t)<l.f&&r-b>l.f?[t,Math.abs(m-t)<l.f?v:r]:Math.abs(b-r)<l.f&&n-y>l.f?[Math.abs(v-r)<l.f?m:n,r]:Math.abs(y-n)<l.f&&b-e>l.f?[n,Math.abs(m-n)<l.f?v:e]:Math.abs(b-e)<l.f&&y-t>l.f?[Math.abs(v-e)<l.f?m:t,e]:null))-1),++d);d&&(x=!1)}if(x){var w,M,E,T=1/0;for(i=0,x=null;i<_;++i)(s=l.b[i])&&(u=s.site,w=u[0]-t,M=u[1]-e,(E=w*w+M*M)<T&&(T=E,x=s));if(x){var S=[t,e],A=[t,r],O=[n,r],C=[n,e];x.halfedges.push(l.e.push(Object(c.b)(u=x.site,S,A))-1,l.e.push(Object(c.b)(u,A,O))-1,l.e.push(Object(c.b)(u,O,C))-1,l.e.push(Object(c.b)(u,C,S))-1)}}for(i=0;i<_;++i)(s=l.b[i])&&(s.halfedges.length||delete l.b[i])}e.c=r,e.a=o,e.d=s,e.b=u;var c=n(90),l=n(32)},function(t,e,n){"use strict";function r(){Object(s.a)(this),this.x=this.y=this.arc=this.site=this.cy=null}function i(t){var e=t.P,n=t.N;if(e&&n){var i=e.site,o=t.site,s=n.site;if(i!==s){var l=o[0],h=o[1],f=i[0]-l,d=i[1]-h,p=s[0]-l,m=s[1]-h,v=2*(f*m-d*p);if(!(v>=-u.g)){var g=f*f+d*d,y=p*p+m*m,b=(m*g-d*y)/v,_=(f*y-p*g)/v,x=c.pop()||new r;x.arc=t,x.site=o,x.x=b+l,x.y=(x.cy=_+h)+Math.sqrt(b*b+_*_),t.circle=x;for(var w=null,M=u.c._;M;)if(x.y<M.y||x.y===M.y&&x.x<=M.x){if(!M.L){w=M.P;break}M=M.L}else{if(!M.R){w=M;break}M=M.R}u.c.insert(w,x),w||(a=x)}}}}function o(t){var e=t.circle;e&&(e.P||(a=e.N),u.c.remove(e),c.push(e),Object(s.a)(e),t.circle=null)}n.d(e,"c",function(){return a}),e.a=i,e.b=o;var a,s=n(89),u=n(32),c=[]},function(t,e,n){"use strict";function r(t,e,n){this.k=t,this.x=e,this.y=n}function i(t){return t.__zoom||o}e.a=r,n.d(e,"c",function(){return o}),e.b=i,r.prototype={constructor:r,scale:function(t){return 1===t?this:new r(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new r(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var o=new r(1,0,0);i.prototype=r.prototype},function(t,e,n){var r={canvas:!!window.CanvasRenderingContext2D,webgl:function(){try{var t=document.createElement("canvas");return!(!window.WebGLRenderingContext||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}}(),workers:!!window.Worker,fileapi:window.File&&window.FileReader&&window.FileList&&window.Blob,getWebGLErrorMessage:function(){var t=document.createElement("div");return t.id="webgl-error-message",t.style.fontFamily="monospace",t.style.fontSize="13px",t.style.fontWeight="normal",t.style.textAlign="center",t.style.background="#fff",t.style.color="#000",t.style.padding="1.5em",t.style.width="400px",t.style.margin="5em auto 0",this.webgl||(t.innerHTML=window.WebGLRenderingContext?['Your graphics card does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">WebGL</a>.<br />','Find out how to get it <a href="http://get.webgl.org/" style="color:#000">here</a>.'].join("\n"):['Your browser does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">WebGL</a>.<br/>','Find out how to get it <a href="http://get.webgl.org/" style="color:#000">here</a>.'].join("\n")),t},addGetWebGLMessage:function(t){var e,n,i;t=t||{},e=void 0!==t.parent?t.parent:document.body,n=void 0!==t.id?t.id:"oldie",i=r.getWebGLErrorMessage(),i.id=n,e.appendChild(i)}};t.exports=r},function(t,e){t.exports=function(t){function e(e,n){function r(){return 2*Math.PI/60/60*N.autoRotateSpeed}function i(){return Math.pow(.95,N.zoomSpeed)}function o(t){G.theta-=t}function a(t){G.phi-=t}function s(e){N.object instanceof t.PerspectiveCamera?H/=e:N.object instanceof t.OrthographicCamera?(N.object.zoom=Math.max(N.minZoom,Math.min(N.maxZoom,N.object.zoom*e)),N.object.updateProjectionMatrix(),W=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),N.enableZoom=!1)}function u(e){N.object instanceof t.PerspectiveCamera?H*=e:N.object instanceof t.OrthographicCamera?(N.object.zoom=Math.max(N.minZoom,Math.min(N.maxZoom,N.object.zoom/e)),N.object.updateProjectionMatrix(),W=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),N.enableZoom=!1)}function c(t){X.set(t.clientX,t.clientY)}function l(t){K.set(t.clientX,t.clientY)}function h(t){Z.set(t.clientX,t.clientY)}function f(t){q.set(t.clientX,t.clientY),Y.subVectors(q,X);var e=N.domElement===document?N.domElement.body:N.domElement;o(2*Math.PI*Y.x/e.clientWidth*N.rotateSpeed),a(2*Math.PI*Y.y/e.clientHeight*N.rotateSpeed),X.copy(q),N.update()}function d(t){$.set(t.clientX,t.clientY),tt.subVectors($,K),tt.y>0?s(i()):tt.y<0&&u(i()),K.copy($),N.update()}function p(t){J.set(t.clientX,t.clientY),Q.subVectors(J,Z),rt(Q.x,Q.y),Z.copy(J),N.update()}function m(t){}function v(t){t.deltaY<0?u(i()):t.deltaY>0&&s(i()),N.update()}function g(t){switch(t.keyCode){case N.keys.UP:rt(0,N.keyPanSpeed),N.update();break;case N.keys.BOTTOM:rt(0,-N.keyPanSpeed),N.update();break;case N.keys.LEFT:rt(N.keyPanSpeed,0),N.update();break;case N.keys.RIGHT:rt(-N.keyPanSpeed,0),N.update()}}function y(t){X.set(t.touches[0].pageX,t.touches[0].pageY)}function b(t){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);K.set(0,r)}function _(t){Z.set(t.touches[0].pageX,t.touches[0].pageY)}function x(t){q.set(t.touches[0].pageX,t.touches[0].pageY),Y.subVectors(q,X);var e=N.domElement===document?N.domElement.body:N.domElement;o(2*Math.PI*Y.x/e.clientWidth*N.rotateSpeed),a(2*Math.PI*Y.y/e.clientHeight*N.rotateSpeed),X.copy(q),N.update()}function w(t){var e=t.touches[0].pageX-t.touches[1].pageX,n=t.touches[0].pageY-t.touches[1].pageY,r=Math.sqrt(e*e+n*n);$.set(0,r),tt.subVectors($,K),tt.y>0?u(i()):tt.y<0&&s(i()),K.copy($),N.update()}function M(t){J.set(t.touches[0].pageX,t.touches[0].pageY),Q.subVectors(J,Z),rt(Q.x,Q.y),Z.copy(J),N.update()}function E(t){}function T(t){if(!1!==N.enabled){if(t.preventDefault(),t.button===N.mouseButtons.ORBIT){if(!1===N.enableRotate)return;c(t),F=k.ROTATE}else if(t.button===N.mouseButtons.ZOOM){if(!1===N.enableZoom)return;l(t),F=k.DOLLY}else if(t.button===N.mouseButtons.PAN){if(!1===N.enablePan)return;h(t),F=k.PAN}F!==k.NONE&&(document.addEventListener("mousemove",S,!1),document.addEventListener("mouseup",A,!1),N.dispatchEvent(U))}}function S(t){if(!1!==N.enabled)if(t.preventDefault(),F===k.ROTATE){if(!1===N.enableRotate)return;f(t)}else if(F===k.DOLLY){if(!1===N.enableZoom)return;d(t)}else if(F===k.PAN){if(!1===N.enablePan)return;p(t)}}function A(t){!1!==N.enabled&&(m(t),document.removeEventListener("mousemove",S,!1),document.removeEventListener("mouseup",A,!1),N.dispatchEvent(D),F=k.NONE)}function O(t){!1===N.enabled||!1===N.enableZoom||F!==k.NONE&&F!==k.ROTATE||(t.preventDefault(),t.stopPropagation(),v(t),N.dispatchEvent(U),N.dispatchEvent(D))}function C(t){!1!==N.enabled&&!1!==N.enableKeys&&!1!==N.enablePan&&g(t)}function R(t){if(!1!==N.enabled){switch(t.touches.length){case 1:if(!1===N.enableRotate)return;y(t),F=k.TOUCH_ROTATE;break;case 2:if(!1===N.enableZoom)return;b(t),F=k.TOUCH_DOLLY;break;case 3:if(!1===N.enablePan)return;_(t),F=k.TOUCH_PAN;break;default:F=k.NONE}F!==k.NONE&&N.dispatchEvent(U)}}function L(t){if(!1!==N.enabled)switch(t.preventDefault(),t.stopPropagation(),t.touches.length){case 1:if(!1===N.enableRotate)return;if(F!==k.TOUCH_ROTATE)return;x(t);break;case 2:if(!1===N.enableZoom)return;if(F!==k.TOUCH_DOLLY)return;w(t);break;case 3:if(!1===N.enablePan)return;if(F!==k.TOUCH_PAN)return;M(t);break;default:F=k.NONE}}function j(t){!1!==N.enabled&&(E(t),N.dispatchEvent(D),F=k.NONE)}function P(t){t.preventDefault()}this.object=e,this.domElement=void 0!==n?n:document,this.enabled=!0,this.target=new t.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:t.MOUSE.LEFT,ZOOM:t.MOUSE.MIDDLE,PAN:t.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(){N.target.copy(N.target0),N.object.position.copy(N.position0),N.object.zoom=N.zoom0,N.object.updateProjectionMatrix(),N.dispatchEvent(I),N.update(),F=k.NONE},this.update=function(){var n=new t.Vector3,i=(new t.Quaternion).setFromUnitVectors(e.up,new t.Vector3(0,1,0)),a=i.clone().inverse(),s=new t.Vector3,u=new t.Quaternion;return function(){var t=N.object.position;return n.copy(t).sub(N.target),n.applyQuaternion(i),z.setFromVector3(n),N.autoRotate&&F===k.NONE&&o(r()),z.theta+=G.theta,z.phi+=G.phi,z.theta=Math.max(N.minAzimuthAngle,Math.min(N.maxAzimuthAngle,z.theta)),z.phi=Math.max(N.minPolarAngle,Math.min(N.maxPolarAngle,z.phi)),z.makeSafe(),z.radius*=H,z.radius=Math.max(N.minDistance,Math.min(N.maxDistance,z.radius)),N.target.add(V),n.setFromSpherical(z),n.applyQuaternion(a),t.copy(N.target).add(n),N.object.lookAt(N.target),!0===N.enableDamping?(G.theta*=1-N.dampingFactor,G.phi*=1-N.dampingFactor):G.set(0,0,0),H=1,V.set(0,0,0),!!(W||s.distanceToSquared(N.object.position)>B||8*(1-u.dot(N.object.quaternion))>B)&&(N.dispatchEvent(I),s.copy(N.object.position),u.copy(N.object.quaternion),W=!1,!0)}}(),this.dispose=function(){N.domElement.removeEventListener("contextmenu",P,!1),N.domElement.removeEventListener("mousedown",T,!1),N.domElement.removeEventListener("wheel",O,!1),N.domElement.removeEventListener("touchstart",R,!1),N.domElement.removeEventListener("touchend",j,!1),N.domElement.removeEventListener("touchmove",L,!1),document.removeEventListener("mousemove",S,!1),document.removeEventListener("mouseup",A,!1),window.removeEventListener("keydown",C,!1)};var N=this,I={type:"change"},U={type:"start"},D={type:"end"},k={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},F=k.NONE,B=1e-6,z=new t.Spherical,G=new t.Spherical,H=1,V=new t.Vector3,W=!1,X=new t.Vector2,q=new t.Vector2,Y=new t.Vector2,Z=new t.Vector2,J=new t.Vector2,Q=new t.Vector2,K=new t.Vector2,$=new t.Vector2,tt=new t.Vector2,et=function(){var e=new t.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),V.add(e)}}(),nt=function(){var e=new t.Vector3;return function(t,n){e.setFromMatrixColumn(n,1),e.multiplyScalar(t),V.add(e)}}(),rt=function(){var e=new t.Vector3;return function(n,r){var i=N.domElement===document?N.domElement.body:N.domElement;if(N.object instanceof t.PerspectiveCamera){var o=N.object.position;e.copy(o).sub(N.target);var a=e.length();a*=Math.tan(N.object.fov/2*Math.PI/180),et(2*n*a/i.clientHeight,N.object.matrix),nt(2*r*a/i.clientHeight,N.object.matrix)}else N.object instanceof t.OrthographicCamera?(et(n*(N.object.right-N.object.left)/N.object.zoom/i.clientWidth,N.object.matrix),nt(r*(N.object.top-N.object.bottom)/N.object.zoom/i.clientHeight,N.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),N.enablePan=!1)}}();N.domElement.addEventListener("contextmenu",P,!1),N.domElement.addEventListener("mousedown",T,!1),N.domElement.addEventListener("wheel",O,!1),N.domElement.addEventListener("touchstart",R,!1),N.domElement.addEventListener("touchend",j,!1),N.domElement.addEventListener("touchmove",L,!1),window.addEventListener("keydown",C,!1),this.update()}return e.prototype=Object.create(t.EventDispatcher.prototype),e.prototype.constructor=e,Object.defineProperties(e.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(t){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!t}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(t){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!t}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(t){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!t}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(t){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!t}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(t){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!t}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(t){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=t}}}),e}},,function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="4.12.2"},function(t,e,n){"use strict";var r=n(94);e.a=function(t,e,n){var i,o,a,s,u=t.length,c=e.length,l=new Array(u*c);for(null==n&&(n=r.b),i=a=0;i<u;++i)for(s=t[i],o=0;o<c;++o,++a)l[a]=n(s,e[o]);return l}},function(t,e,n){"use strict";e.a=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}},function(t,e,n){"use strict";var r=n(98),i=n(92),o=n(180),a=n(97),s=n(181),u=n(99),c=n(100),l=n(101);e.a=function(){function t(t){var r,o,a=t.length,s=new Array(a);for(r=0;r<a;++r)s[r]=e(t[r],r,t);var l=n(s),f=l[0],d=l[1],p=h(s,f,d);Array.isArray(p)||(p=Object(c.c)(f,d,p),p=Object(u.a)(Math.ceil(f/p)*p,Math.floor(d/p)*p,p));for(var m=p.length;p[0]<=f;)p.shift(),--m;for(;p[m-1]>d;)p.pop(),--m;var v,g=new Array(m+1);for(r=0;r<=m;++r)v=g[r]=[],v.x0=r>0?p[r-1]:f,v.x1=r<m?p[r]:d;for(r=0;r<a;++r)o=s[r],f<=o&&o<=d&&g[Object(i.c)(p,o,0,m)].push(t[r]);return g}var e=s.a,n=a.a,h=l.a;return t.value=function(n){return arguments.length?(e="function"==typeof n?n:Object(o.a)(n),t):e},t.domain=function(e){return arguments.length?(n="function"==typeof e?e:Object(o.a)([e[0],e[1]]),t):n},t.thresholds=function(e){return arguments.length?(h="function"==typeof e?e:Array.isArray(e)?Object(o.a)(r.b.call(e)):Object(o.a)(e),t):h},t}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(98),i=n(17),o=n(21),a=n(50);e.a=function(t,e,n){return t=r.a.call(t,o.a).sort(i.a),Math.ceil((n-e)/(2*(Object(a.a)(t,.75)-Object(a.a)(t,.25))*Math.pow(t.length,-1/3)))}},function(t,e,n){"use strict";var r=n(95);e.a=function(t,e,n){return Math.ceil((n-e)/(3.5*Object(r.a)(t)*Math.pow(t.length,-1/3)))}},function(t,e,n){"use strict";e.a=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r}},function(t,e,n){"use strict";var r=n(21);e.a=function(t,e){var n,i=t.length,o=i,a=-1,s=0;if(null==e)for(;++a<i;)isNaN(n=Object(r.a)(t[a]))?--o:s+=n;else for(;++a<i;)isNaN(n=Object(r.a)(e(t[a],a,t)))?--o:s+=n;if(o)return s/o}},function(t,e,n){"use strict";var r=n(17),i=n(21),o=n(50);e.a=function(t,e){var n,a=t.length,s=-1,u=[];if(null==e)for(;++s<a;)isNaN(n=Object(i.a)(t[s]))||u.push(n);else for(;++s<a;)isNaN(n=Object(i.a)(e(t[s],s,t)))||u.push(n);return Object(o.a)(u.sort(r.a),.5)}},function(t,e,n){"use strict";e.a=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(r=t[i],e=r.length;--e>=0;)n[--a]=r[e];return n}},function(t,e,n){"use strict";e.a=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}},function(t,e,n){"use strict";var r=n(17);e.a=function(t,e){if(n=t.length){var n,i,o=0,a=0,s=t[a];for(null==e&&(e=r.a);++o<n;)(e(i=t[o],s)<0||0!==e(s,s))&&(s=i,a=o);return 0===e(s,s)?a:void 0}}},function(t,e,n){"use strict";e.a=function(t,e,n){for(var r,i,o=(null==n?t.length:n)-(e=null==e?0:+e);o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t}},function(t,e,n){"use strict";e.a=function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}},function(t,e,n){"use strict";var r=n(103);e.a=function(){return Object(r.a)(arguments)}},function(t,e,n){"use strict";var r=n(194);n.d(e,"d",function(){return r.d}),n.d(e,"c",function(){return r.c}),n.d(e,"a",function(){return r.a}),n.d(e,"b",function(){return r.b})},function(t,e,n){"use strict";function r(t){return"translate("+(t+.5)+",0)"}function i(t){return"translate(0,"+(t+.5)+")"}function o(t){return function(e){return+t(e)}}function a(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function s(){return!this.__axis}function u(t,e){function n(n){var r=null==c?e.ticks?e.ticks.apply(e,u):e.domain():c,i=null==l?e.tickFormat?e.tickFormat.apply(e,u):p.a:l,d=Math.max(h,0)+_,E=e.range(),T=+E[0]+.5,S=+E[E.length-1]+.5,A=(e.bandwidth?a:o)(e.copy()),O=n.selection?n.selection():n,C=O.selectAll(".domain").data([null]),R=O.selectAll(".tick").data(r,e).order(),L=R.exit(),j=R.enter().append("g").attr("class","tick"),P=R.select("line"),N=R.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),R=R.merge(j),P=P.merge(j.append("line").attr("stroke","#000").attr(w+"2",x*h)),N=N.merge(j.append("text").attr("fill","#000").attr(w,x*d).attr("dy",t===m?"0em":t===g?"0.71em":"0.32em")),n!==O&&(C=C.transition(n),R=R.transition(n),P=P.transition(n),N=N.transition(n),L=L.transition(n).attr("opacity",b).attr("transform",function(t){return isFinite(t=A(t))?M(t):this.getAttribute("transform")}),j.attr("opacity",b).attr("transform",function(t){var e=this.parentNode.__axis;return M(e&&isFinite(e=e(t))?e:A(t))})),L.remove(),C.attr("d",t===y||t==v?"M"+x*f+","+T+"H0.5V"+S+"H"+x*f:"M"+T+","+x*f+"V0.5H"+S+"V"+x*f),R.attr("opacity",1).attr("transform",function(t){return M(A(t))}),P.attr(w+"2",x*h),N.attr(w,x*d).text(i),O.filter(s).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===v?"start":t===y?"end":"middle"),O.each(function(){this.__axis=A})}var u=[],c=null,l=null,h=6,f=6,_=3,x=t===m||t===y?-1:1,w=t===y||t===v?"x":"y",M=t===m||t===g?r:i;return n.scale=function(t){return arguments.length?(e=t,n):e},n.ticks=function(){return u=d.a.call(arguments),n},n.tickArguments=function(t){return arguments.length?(u=null==t?[]:d.a.call(t),n):u.slice()},n.tickValues=function(t){return arguments.length?(c=null==t?null:d.a.call(t),n):c&&c.slice()},n.tickFormat=function(t){return arguments.length?(l=t,n):l},n.tickSize=function(t){return arguments.length?(h=f=+t,n):h},n.tickSizeInner=function(t){return arguments.length?(h=+t,n):h},n.tickSizeOuter=function(t){return arguments.length?(f=+t,n):f},n.tickPadding=function(t){return arguments.length?(_=+t,n):_},n}function c(t){return u(m,t)}function l(t){return u(v,t)}function h(t){return u(g,t)}function f(t){return u(y,t)}e.d=c,e.c=l,e.a=h,e.b=f;var d=n(195),p=n(196),m=1,v=2,g=3,y=4,b=1e-6},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=Array.prototype.slice},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(198);n.d(e,"a",function(){return r.d}),n.d(e,"c",function(){return r.b}),n.d(e,"d",function(){return r.c}),n.d(e,"b",function(){return r.a})},function(t,e,n){"use strict";function r(t){return{type:t}}function i(){return!m.d.button}function o(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function a(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function s(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function u(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function c(){return h(E)}function l(){return h(T)}function h(t){function e(e){var i=e.property("__brush",h).selectAll(".overlay").data([r("overlay")]);i.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",A.overlay).merge(i).each(function(){var t=a(this).extent;Object(m.j)(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([r("selection")]).enter().append("rect").attr("class","selection").attr("cursor",A.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var o=e.selectAll(".handle").data(t.handles,function(t){return t.type});o.exit().remove(),o.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return A[t.type]}),e.each(n).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",l)}function n(){var t=Object(m.j)(this),e=a(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-I/2:e[0][0]-I/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-I/2:e[0][1]-I/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+I:I}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+I:I})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e){return t.__brush.emitter||new c(t,e)}function c(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function l(){function e(){var t=Object(m.g)(B);!K||k||F||(Math.abs(t[0]-tt[0])>Math.abs(t[1]-tt[1])?F=!0:k=!0),tt=t,D=!0,Object(b.a)(),r()}function r(){var t;switch(I=tt[0]-$[0],U=tt[1]-$[1],G){case x:case _:H&&(I=Math.max(Y-l,Math.min(J-g,I)),h=l+I,y=g+I),V&&(U=Math.max(Z-f,Math.min(Q-j,U)),p=f+U,N=j+U);break;case w:H<0?(I=Math.max(Y-l,Math.min(J-l,I)),h=l+I,y=g):H>0&&(I=Math.max(Y-g,Math.min(J-g,I)),h=l,y=g+I),V<0?(U=Math.max(Z-f,Math.min(Q-f,U)),p=f+U,N=j):V>0&&(U=Math.max(Z-j,Math.min(Q-j,U)),p=f,N=j+U);break;case M:H&&(h=Math.max(Y,Math.min(J,l-I*H)),y=Math.max(Y,Math.min(J,g+I*H))),V&&(p=Math.max(Z,Math.min(Q,f-U*V)),N=Math.max(Z,Math.min(Q,j+U*V)))}y<h&&(H*=-1,t=l,l=g,g=t,t=h,h=y,y=t,z in O&&rt.attr("cursor",A[z=O[z]])),N<p&&(V*=-1,t=f,f=j,j=t,t=p,p=N,N=t,z in C&&rt.attr("cursor",A[z=C[z]])),W.selection&&(q=W.selection),k&&(h=q[0][0],y=q[1][0]),F&&(p=q[0][1],N=q[1][1]),q[0][0]===h&&q[0][1]===p&&q[1][0]===y&&q[1][1]===N||(W.selection=[[h,p],[y,N]],n.call(B),et.brush())}function i(){if(Object(b.b)(),m.d.touches){if(m.d.touches.length)return;S&&clearTimeout(S),S=setTimeout(function(){S=null},500),nt.on("touchmove.brush touchend.brush touchcancel.brush",null)}else Object(d.c)(m.d.view,D),it.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);nt.attr("pointer-events","all"),rt.attr("cursor",A.overlay),W.selection&&(q=W.selection),s(q)&&(W.selection=null,n.call(B)),et.end()}function o(){switch(m.d.keyCode){case 16:K=H&&V;break;case 18:G===w&&(H&&(g=y-I*H,l=h+I*H),V&&(j=N-U*V,f=p+U*V),G=M,r());break;case 32:G!==w&&G!==M||(H<0?g=y-I:H>0&&(l=h-I),V<0?j=N-U:V>0&&(f=p-U),G=x,rt.attr("cursor",A.selection),r());break;default:return}Object(b.a)()}function c(){switch(m.d.keyCode){case 16:K&&(k=F=K=!1,r());break;case 18:G===M&&(H<0?g=y:H>0&&(l=h),V<0?j=N:V>0&&(f=p),G=w,r());break;case 32:G===x&&(m.d.altKey?(H&&(g=y-I*H,l=h+I*H),V&&(j=N-U*V,f=p+U*V),G=M):(H<0?g=y:H>0&&(l=h),V<0?j=N:V>0&&(f=p),G=w),rt.attr("cursor",A[z]),r());break;default:return}Object(b.a)()}if(m.d.touches){if(m.d.changedTouches.length<m.d.touches.length)return Object(b.a)()}else if(S)return;if(P.apply(this,arguments)){var l,h,f,p,g,y,j,N,I,U,D,k,F,B=this,z=m.d.target.__data__.type,G="selection"===(m.d.metaKey?z="overlay":z)?_:m.d.altKey?M:w,H=t===T?null:R[z],V=t===E?null:L[z],W=a(B),X=W.extent,q=W.selection,Y=X[0][0],Z=X[0][1],J=X[1][0],Q=X[1][1],K=H&&V&&m.d.shiftKey,$=Object(m.g)(B),tt=$,et=u(B,arguments).beforestart();"overlay"===z?W.selection=q=[[l=t===T?Y:$[0],f=t===E?Z:$[1]],[g=t===T?J:l,j=t===E?Q:f]]:(l=q[0][0],f=q[0][1],g=q[1][0],j=q[1][1]),h=l,p=f,y=g,N=j;var nt=Object(m.j)(B).attr("pointer-events","none"),rt=nt.selectAll(".overlay").attr("cursor",A[z]);if(m.d.touches)nt.on("touchmove.brush",e,!0).on("touchend.brush touchcancel.brush",i,!0);else{var it=Object(m.j)(m.d.view).on("keydown.brush",o,!0).on("keyup.brush",c,!0).on("mousemove.brush",e,!0).on("mouseup.brush",i,!0);Object(d.b)(m.d.view)}Object(b.b)(),Object(v.b)(B),n.call(B),et.start()}}function h(){var e=this.__brush||{selection:null};return e.extent=j.apply(this,arguments),e.dim=t,e}var S,j=o,P=i,N=Object(f.a)(e,"start","brush","end"),I=6;return e.move=function(e,r){e.selection?e.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){function e(t){o.selection=1===t&&s(l)?null:h(t),n.call(i),a.brush()}var i=this,o=i.__brush,a=u(i,arguments),c=o.selection,l=t.input("function"==typeof r?r.apply(this,arguments):r,o.extent),h=Object(p.a)(c,l);return c&&l?e:e(1)}):e.each(function(){var e=this,i=arguments,o=e.__brush,a=t.input("function"==typeof r?r.apply(e,i):r,o.extent),c=u(e,i).beforestart();Object(v.b)(e),o.selection=null==a||s(a)?null:a,n.call(e),c.start().brush().end()})},c.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(n){Object(m.c)(new y.a(e,n,t.output(this.state.selection)),N.apply,N,[n,this.that,this.args])}},e.extent=function(t){return arguments.length?(j="function"==typeof t?t:Object(g.a)([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),e):j},e.filter=function(t){return arguments.length?(P="function"==typeof t?t:Object(g.a)(!!t),e):P},e.handleSize=function(t){return arguments.length?(I=+t,e):I},e.on=function(){var t=N.on.apply(N,arguments);return t===N?e:t},e}e.a=u,e.b=c,e.c=l;var f=n(12),d=n(51),p=n(5),m=n(1),v=n(63),g=n(280),y=n(281),b=n(282),_={name:"drag"},x={name:"space"},w={name:"handle"},M={name:"center"},E={name:"x",handles:["e","w"].map(r),input:function(t,e){return t&&[[t[0],e[0][1]],[t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},T={name:"y",handles:["n","s"].map(r),input:function(t,e){return t&&[[e[0][0],t[0]],[e[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},S={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(r),input:function(t){return t},output:function(t){return t}},A={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},O={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},C={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},R={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},L={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};e.d=function(){return h(S)}},function(t,e,n){"use strict";function r(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new i(r)}function i(t){this._=t}function o(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function a(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function s(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=u,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}var u={value:function(){}};i.prototype=r.prototype={constructor:i,on:function(t,e){var n,r=this._,i=o(t+"",r),u=-1,c=i.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<c;)if(n=(t=i[u]).type)r[n]=s(r[n],t.name,e);else if(null==e)for(n in r)r[n]=s(r[n],t.name,null);return this}for(;++u<c;)if((n=(t=i[u]).type)&&(n=a(r[n],t.name)))return n}},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new i(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],o=0,n=r.length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}},e.a=r},function(t,e,n){"use strict";function r(){return!u.d.button}function i(){return this.parentNode}function o(t){return null==t?{x:u.d.x,y:u.d.y}:t}function a(){return"ontouchstart"in this}var s=n(12),u=n(1),c=n(109),l=n(110),h=n(234),f=n(235);e.a=function(){function t(t){t.on("mousedown.drag",e).filter(T).on("touchstart.drag",p).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(){if(!x&&w.apply(this,arguments)){var t=g("mouse",M.apply(this,arguments),u.g,this,arguments);t&&(Object(u.j)(u.d.view).on("mousemove.drag",n,!0).on("mouseup.drag",d,!0),Object(c.a)(u.d.view),Object(l.b)(),_=!1,y=u.d.clientX,b=u.d.clientY,t("start"))}}function n(){if(Object(l.a)(),!_){var t=u.d.clientX-y,e=u.d.clientY-b;_=t*t+e*e>C}S.mouse("drag")}function d(){Object(u.j)(u.d.view).on("mousemove.drag mouseup.drag",null),Object(c.b)(u.d.view,_),Object(l.a)(),S.mouse("end")}function p(){if(w.apply(this,arguments)){var t,e,n=u.d.changedTouches,r=M.apply(this,arguments),i=n.length;for(t=0;t<i;++t)(e=g(n[t].identifier,r,u.p,this,arguments))&&(Object(l.b)(),e("start"))}}function m(){var t,e,n=u.d.changedTouches,r=n.length;for(t=0;t<r;++t)(e=S[n[t].identifier])&&(Object(l.a)(),e("drag"))}function v(){var t,e,n=u.d.changedTouches,r=n.length;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),t=0;t<r;++t)(e=S[n[t].identifier])&&(Object(l.b)(),e("end"))}function g(e,n,r,i,o){var a,s,c,l=r(n,e),h=A.copy();if(Object(u.c)(new f.a(t,"beforestart",a,e,O,l[0],l[1],0,0,h),function(){return null!=(u.d.subject=a=E.apply(i,o))&&(s=a.x-l[0]||0,c=a.y-l[1]||0,!0)}))return function d(p){var m,v=l;switch(p){case"start":S[e]=d,m=O++;break;case"end":delete S[e],--O;case"drag":l=r(n,e),m=O}Object(u.c)(new f.a(t,p,a,e,m,l[0]+s,l[1]+c,l[0]-v[0],l[1]-v[1],h),h.apply,h,[p,i,o])}}var y,b,_,x,w=r,M=i,E=o,T=a,S={},A=Object(s.a)("start","drag","end"),O=0,C=0;return t.filter=function(e){return arguments.length?(w="function"==typeof e?e:Object(h.a)(!!e),t):w},t.container=function(e){return arguments.length?(M="function"==typeof e?e:Object(h.a)(e),t):M},t.subject=function(e){return arguments.length?(E="function"==typeof e?e:Object(h.a)(e),t):E},t.touchable=function(e){return arguments.length?(T="function"==typeof e?e:Object(h.a)(!!e),t):T},t.on=function(){var e=A.on.apply(A,arguments);return e===A?t:e},t.clickDistance=function(e){return arguments.length?(C=(e=+e)*e,t):Math.sqrt(C)},t}},function(t,e,n){"use strict";function r(){return new i}function i(){this._="@"+(++o).toString(36)}e.a=r;var o=0;i.prototype=r.prototype={constructor:i,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}}},function(t,e,n){"use strict";var r=n(55),i=n(33);e.a=function(t){var e=Object(r.a)();return e.changedTouches&&(e=e.changedTouches[0]),Object(i.a)(t,e)}},function(t,e,n){"use strict";var r=n(4);e.a=function(t){return"string"==typeof t?new r.a([[document.querySelector(t)]],[document.documentElement]):new r.a([[t]],r.c)}},function(t,e,n){"use strict";var r=n(4),i=n(57);e.a=function(t){"function"!=typeof t&&(t=Object(i.a)(t));for(var e=this._groups,n=e.length,o=new Array(n),a=0;a<n;++a)for(var s,u,c=e[a],l=c.length,h=o[a]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u);return new r.a(o,this._parents)}},function(t,e,n){"use strict";var r=n(4),i=n(105);e.a=function(t){"function"!=typeof t&&(t=Object(i.a)(t));for(var e=this._groups,n=e.length,o=[],a=[],s=0;s<n;++s)for(var u,c=e[s],l=c.length,h=0;h<l;++h)(u=c[h])&&(o.push(t.call(u,u.__data__,h,c)),a.push(u));return new r.a(o,a)}},function(t,e,n){"use strict";var r=n(4),i=n(104);e.a=function(t){"function"!=typeof t&&(t=Object(i.a)(t));for(var e=this._groups,n=e.length,o=new Array(n),a=0;a<n;++a)for(var s,u=e[a],c=u.length,l=o[a]=[],h=0;h<c;++h)(s=u[h])&&t.call(s,s.__data__,h,u)&&l.push(s);return new r.a(o,this._parents)}},function(t,e,n){"use strict";function r(t,e,n,r,i,o){for(var s,u=0,c=e.length,l=o.length;u<l;++u)(s=e[u])?(s.__data__=o[u],r[u]=s):n[u]=new a.a(t,o[u]);for(;u<c;++u)(s=e[u])&&(i[u]=s)}function i(t,e,n,r,i,o,s){var c,l,h,f={},d=e.length,p=o.length,m=new Array(d);for(c=0;c<d;++c)(l=e[c])&&(m[c]=h=u+s.call(l,l.__data__,c,e),h in f?i[c]=l:f[h]=l);for(c=0;c<p;++c)h=u+s.call(t,o[c],c,o),(l=f[h])?(r[c]=l,l.__data__=o[c],f[h]=null):n[c]=new a.a(t,o[c]);for(c=0;c<d;++c)(l=e[c])&&f[m[c]]===l&&(i[c]=l)}var o=n(4),a=n(106),s=n(208),u="$";e.a=function(t,e){if(!t)return g=new Array(this.size()),d=-1,this.each(function(t){g[++d]=t}),g;var n=e?i:r,a=this._parents,u=this._groups;"function"!=typeof t&&(t=Object(s.a)(t));for(var c=u.length,l=new Array(c),h=new Array(c),f=new Array(c),d=0;d<c;++d){var p=a[d],m=u[d],v=m.length,g=t.call(p,p&&p.__data__,d,a),y=g.length,b=h[d]=new Array(y),_=l[d]=new Array(y);n(p,m,b,_,f[d]=new Array(v),g,e);for(var x,w,M=0,E=0;M<y;++M)if(x=b[M]){for(M>=E&&(E=M+1);!(w=_[E])&&++E<y;);x._next=w||null}}return l=new o.a(l,a),l._enter=h,l._exit=f,l}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";var r=n(107),i=n(4);e.a=function(){return new i.a(this._exit||this._groups.map(r.a),this._parents)}},function(t,e,n){"use strict";var r=n(4);e.a=function(t){for(var e=this._groups,n=t._groups,i=e.length,o=n.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c,l=e[u],h=n[u],f=l.length,d=s[u]=new Array(f),p=0;p<f;++p)(c=l[p]||h[p])&&(d[p]=c);for(;u<i;++u)s[u]=e[u];return new r.a(s,this._parents)}},function(t,e,n){"use strict";e.a=function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this}},function(t,e,n){"use strict";function r(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var i=n(4);e.a=function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=r);for(var n=this._groups,o=n.length,a=new Array(o),s=0;s<o;++s){for(var u,c=n[s],l=c.length,h=a[s]=new Array(l),f=0;f<l;++f)(u=c[f])&&(h[f]=u);h.sort(e)}return new i.a(a,this._parents).order()}},function(t,e,n){"use strict";e.a=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}},function(t,e,n){"use strict";e.a=function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}},function(t,e,n){"use strict";e.a=function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}},function(t,e,n){"use strict";e.a=function(){var t=0;return this.each(function(){++t}),t}},function(t,e,n){"use strict";e.a=function(){return!this.node()}},function(t,e,n){"use strict";e.a=function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this}},function(t,e,n){"use strict";function r(t){return function(){this.removeAttribute(t)}}function i(t){return function(){this.removeAttributeNS(t.space,t.local)}}function o(t,e){return function(){this.setAttribute(t,e)}}function a(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function s(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function u(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var c=n(53);e.a=function(t,e){var n=Object(c.a)(t);if(arguments.length<2){var l=this.node();return n.local?l.getAttributeNS(n.space,n.local):l.getAttribute(n)}return this.each((null==e?n.local?i:r:"function"==typeof e?n.local?u:s:n.local?a:o)(n,e))}},function(t,e,n){"use strict";function r(t){return function(){delete this[t]}}function i(t,e){return function(){this[t]=e}}function o(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}e.a=function(t,e){return arguments.length>1?this.each((null==e?r:"function"==typeof e?o:i)(t,e)):this.node()[t]}},function(t,e,n){"use strict";function r(t){return t.trim().split(/^|\s+/)}function i(t){return t.classList||new o(t)}function o(t){this._node=t,this._names=r(t.getAttribute("class")||"")}function a(t,e){for(var n=i(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function s(t,e){for(var n=i(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function u(t){return function(){a(this,t)}}function c(t){return function(){s(this,t)}}function l(t,e){return function(){(e.apply(this,arguments)?a:s)(this,t)}}o.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}},e.a=function(t,e){var n=r(t+"");if(arguments.length<2){for(var o=i(this.node()),a=-1,s=n.length;++a<s;)if(!o.contains(n[a]))return!1;return!0}return this.each(("function"==typeof e?l:e?u:c)(n,e))}},function(t,e,n){"use strict";function r(){this.textContent=""}function i(t){return function(){this.textContent=t}}function o(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}e.a=function(t){return arguments.length?this.each(null==t?r:("function"==typeof t?o:i)(t)):this.node().textContent}},function(t,e,n){"use strict";function r(){this.innerHTML=""}function i(t){return function(){this.innerHTML=t}}function o(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}e.a=function(t){return arguments.length?this.each(null==t?r:("function"==typeof t?o:i)(t)):this.node().innerHTML}},function(t,e,n){"use strict";function r(){this.nextSibling&&this.parentNode.appendChild(this)}e.a=function(){return this.each(r)}},function(t,e,n){"use strict";function r(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}e.a=function(){return this.each(r)}},function(t,e,n){"use strict";var r=n(52);e.a=function(t){var e="function"==typeof t?t:Object(r.a)(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}},function(t,e,n){"use strict";function r(){return null}var i=n(52),o=n(57);e.a=function(t,e){var n="function"==typeof t?t:Object(i.a)(t),a=null==e?r:"function"==typeof e?e:Object(o.a)(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),a.apply(this,arguments)||null)})}},function(t,e,n){"use strict";function r(){var t=this.parentNode;t&&t.removeChild(this)}e.a=function(){return this.each(r)}},function(t,e,n){"use strict";e.a=function(t){return arguments.length?this.property("__data__",t):this.node().__data__}},function(t,e,n){"use strict";function r(t,e,n){var r=Object(a.a)(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function i(t,e){return function(){return r(this,t,e)}}function o(t,e){return function(){return r(this,t,e.apply(this,arguments))}}var a=n(58);e.a=function(t,e){return this.each(("function"==typeof e?o:i)(t,e))}},function(t,e,n){"use strict";var r=n(4);e.a=function(t){return"string"==typeof t?new r.a([document.querySelectorAll(t)],[document.documentElement]):new r.a([null==t?[]:t],r.c)}},function(t,e,n){"use strict";var r=n(55),i=n(33);e.a=function(t,e,n){arguments.length<3&&(n=e,e=Object(r.a)().changedTouches);for(var o,a=0,s=e?e.length:0;a<s;++a)if((o=e[a]).identifier===n)return Object(i.a)(t,o);return null}},function(t,e,n){"use strict";var r=n(55),i=n(33);e.a=function(t,e){null==e&&(e=Object(r.a)().touches);for(var n=0,o=e?e.length:0,a=new Array(o);n<o;++n)a[n]=Object(i.a)(t,e[n]);return a}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s,u,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=u,this._=c}e.a=r,r.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t}},function(t,e,n){"use strict";function r(t){if(t instanceof o)return new o(t.l,t.a,t.b,t.opacity);if(t instanceof f){var e=t.h*m.a;return new o(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof p.b||(t=Object(p.h)(t));var n=c(t.r),r=c(t.g),i=c(t.b),s=a((.4124564*n+.3575761*r+.1804375*i)/v),u=a((.2126729*n+.7151522*r+.072175*i)/g);return new o(116*u-16,500*(s-u),200*(u-a((.0193339*n+.119192*r+.9503041*i)/y)),t.opacity)}function i(t,e,n,i){return 1===arguments.length?r(t):new o(t,e,n,null==i?1:i)}function o(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function a(t){return t>w?Math.pow(t,1/3):t/x+b}function s(t){return t>_?t*t*t:x*(t-b)}function u(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function c(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function l(t){if(t instanceof f)return new f(t.h,t.c,t.l,t.opacity);t instanceof o||(t=r(t));var e=Math.atan2(t.b,t.a)*m.b;return new f(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function h(t,e,n,r){return 1===arguments.length?l(t):new f(t,e,n,null==r?1:r)}function f(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}e.a=i,e.b=h;var d=n(61),p=n(60),m=n(111),v=.95047,g=1,y=1.08883,b=4/29,_=6/29,x=3*_*_,w=_*_*_;Object(d.a)(o,i,Object(d.b)(p.a,{brighter:function(t){return new o(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new o(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=g*s(t),e=v*s(e),n=y*s(n),new p.b(u(3.2404542*e-1.5371385*t-.4985314*n),u(-.969266*e+1.8760108*t+.041556*n),u(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),Object(d.a)(f,h,Object(d.b)(p.a,{brighter:function(t){return new f(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new f(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return r(this).rgb()}}))},function(t,e,n){"use strict";function r(t){if(t instanceof o)return new o(t.h,t.s,t.l,t.opacity);t instanceof s.b||(t=Object(s.h)(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(v*r+p*e-m*n)/(v+p-m),a=r-i,c=(d*(n-i)-h*a)/f,l=Math.sqrt(c*c+a*a)/(d*i*(1-i)),g=l?Math.atan2(c,a)*u.b-120:NaN;return new o(g<0?g+360:g,l,i,t.opacity)}function i(t,e,n,i){return 1===arguments.length?r(t):new o(t,e,n,null==i?1:i)}function o(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}e.a=i;var a=n(61),s=n(60),u=n(111),c=-.14861,l=1.78277,h=-.29227,f=-.90649,d=1.97294,p=d*f,m=d*l,v=l*h-f*c;Object(a.a)(o,i,Object(a.b)(s.a,{brighter:function(t){return t=null==t?s.c:Math.pow(s.c,t),new o(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?s.d:Math.pow(s.d,t),new o(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*u.a,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new s.b(255*(e+n*(c*r+l*i)),255*(e+n*(h*r+f*i)),255*(e+n*(d*r)),this.opacity)}}))},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e-=t,function(n){return Math.round(t+e*n)}}},function(t,e,n){"use strict";function r(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}function a(t,r,o,a,s,u){if(t!==o||r!==a){var c=s.push("translate(",null,e,null,n);u.push({i:c-4,x:Object(i.a)(t,o)},{i:c-2,x:Object(i.a)(r,a)})}else(o||a)&&s.push("translate("+o+e+a+n)}function s(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Object(i.a)(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}function u(t,e,n,a){t!==e?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Object(i.a)(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}function c(t,e,n,r,a,s){if(t!==n||e!==r){var u=a.push(o(a)+"scale(",null,",",null,")");s.push({i:u-4,x:Object(i.a)(t,n)},{i:u-2,x:Object(i.a)(e,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}return function(e,n){var r=[],i=[];return e=t(e),n=t(n),a(e.translateX,e.translateY,n.translateX,n.translateY,r,i),s(e.rotate,n.rotate,r,i),u(e.skewX,n.skewX,r,i),c(e.scaleX,e.scaleY,n.scaleX,n.scaleY,r,i),e=n=null,function(t){for(var e,n=-1,o=i.length;++n<o;)r[(e=i[n]).i]=e.x(t);return r.join("")}}}n.d(e,"a",function(){return a}),n.d(e,"b",function(){return s});var i=n(34),o=n(240),a=r(o.a,"px, ","px)","deg)"),s=r(o.b,", ",")",")")},function(t,e,n){"use strict";function r(t){return"none"===t?c.b:(o||(o=document.createElement("DIV"),a=document.documentElement,s=document.defaultView),o.style.transform=t,t=s.getComputedStyle(a.appendChild(o),null).getPropertyValue("transform"),a.removeChild(o),t=t.slice(7,-1).split(","),Object(c.a)(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function i(t){return null==t?c.b:(u||(u=document.createElementNS("http://www.w3.org/2000/svg","g")),u.setAttribute("transform",t),(t=u.transform.baseVal.consolidate())?(t=t.matrix,Object(c.a)(t.a,t.b,t.c,t.d,t.e,t.f)):c.b)}e.a=r,e.b=i;var o,a,s,u,c=n(241)},function(t,e,n){"use strict";n.d(e,"b",function(){return i});var r=180/Math.PI,i={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};e.a=function(t,e,n,i,o,a){var s,u,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*i)&&(n-=t*c,i-=e*c),(u=Math.sqrt(n*n+i*i))&&(n/=u,i/=u,c/=u),t*i<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*r,skewX:Math.atan(c)*r,scaleX:s,scaleY:u}}},function(t,e,n){"use strict";function r(t){return((t=Math.exp(t))+1/t)/2}function i(t){return((t=Math.exp(t))-1/t)/2}function o(t){return((t=Math.exp(2*t))-1)/(t+1)}var a=Math.SQRT2;e.a=function(t,e){var n,s,u=t[0],c=t[1],l=t[2],h=e[0],f=e[1],d=e[2],p=h-u,m=f-c,v=p*p+m*m;if(v<1e-12)s=Math.log(d/l)/a,n=function(t){return[u+t*p,c+t*m,l*Math.exp(a*t*s)]};else{var g=Math.sqrt(v),y=(d*d-l*l+4*v)/(2*l*2*g),b=(d*d-l*l-4*v)/(2*d*2*g),_=Math.log(Math.sqrt(y*y+1)-y),x=Math.log(Math.sqrt(b*b+1)-b);s=(x-_)/a,n=function(t){var e=t*s,n=r(_),h=l/(2*g)*(n*o(a*e+_)-i(_));return[u+h*p,c+h*m,l*n/r(a*e+_)]}}return n.duration=1e3*s,n}},function(t,e,n){"use strict";function r(t){return function(e,n){var r=t((e=Object(i.d)(e)).h,(n=Object(i.d)(n)).h),a=Object(o.a)(e.s,n.s),s=Object(o.a)(e.l,n.l),u=Object(o.a)(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=a(t),e.l=s(t),e.opacity=u(t),e+""}}}n.d(e,"b",function(){return a});var i=n(7),o=n(22);e.a=r(o.c);var a=r(o.a)},function(t,e,n){"use strict";function r(t,e){var n=Object(o.a)((t=Object(i.e)(t)).l,(e=Object(i.e)(e)).l),r=Object(o.a)(t.a,e.a),a=Object(o.a)(t.b,e.b),s=Object(o.a)(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=a(e),t.opacity=s(e),t+""}}e.a=r;var i=n(7),o=n(22)},function(t,e,n){"use strict";function r(t){return function(e,n){var r=t((e=Object(i.c)(e)).h,(n=Object(i.c)(n)).h),a=Object(o.a)(e.c,n.c),s=Object(o.a)(e.l,n.l),u=Object(o.a)(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=a(t),e.l=s(t),e.opacity=u(t),e+""}}}n.d(e,"b",function(){return a});var i=n(7),o=n(22);e.a=r(o.c);var a=r(o.a)},function(t,e,n){"use strict";function r(t){return function e(n){function r(e,r){var a=t((e=Object(i.b)(e)).h,(r=Object(i.b)(r)).h),s=Object(o.a)(e.s,r.s),u=Object(o.a)(e.l,r.l),c=Object(o.a)(e.opacity,r.opacity);return function(t){return e.h=a(t),e.s=s(t),e.l=u(Math.pow(t,n)),e.opacity=c(t),e+""}}return n=+n,r.gamma=e,r}(1)}n.d(e,"a",function(){return a});var i=n(7),o=n(22);e.b=r(o.c);var a=r(o.a)},function(t,e,n){"use strict";e.a=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}},function(t,e,n){"use strict";var r=n(1),i=n(249),o=n(252);r.l.prototype.interrupt=i.a,r.l.prototype.transition=o.a},function(t,e,n){"use strict";var r=n(119);e.a=function(t){return this.each(function(){Object(r.a)(this,t)})}},function(t,e,n){"use strict";var r=n(64);e.a=function(t,e,n){var i=new r.a;return e=null==e?0:+e,i.restart(function(n){i.stop(),t(n+e)},e,n),i}},function(t,e,n){"use strict";var r=n(64);e.a=function(t,e,n){var i=new r.a,o=e;return null==e?(i.restart(t,e,n),i):(e=+e,n=null==n?Object(r.b)():+n,i.restart(function r(a){a+=o,i.restart(r,o+=e,n),t(a)},e,n),i)}},function(t,e,n){"use strict";function r(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return u.time=Object(s.b)(),u;return n}var i=n(10),o=n(6),a=n(121),s=n(35),u={time:null,delay:0,duration:250,ease:a.o};e.a=function(t){var e,n;t instanceof i.a?(e=t._id,t=t._name):(e=Object(i.c)(),(n=u).time=Object(s.b)(),t=null==t?null:t+"");for(var a=this._groups,c=a.length,l=0;l<c;++l)for(var h,f=a[l],d=f.length,p=0;p<d;++p)(h=f[p])&&Object(o.e)(h,t,e,p,f,n||r(h,e));return new i.a(a,this._parents,t,e)}},function(t,e,n){"use strict";function r(t){return function(){this.removeAttribute(t)}}function i(t){return function(){this.removeAttributeNS(t.space,t.local)}}function o(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}}function a(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}function s(t,e,n){var r,i,o;return function(){var a,s=n(this);return null==s?void this.removeAttribute(t):(a=this.getAttribute(t),a===s?null:a===r&&s===i?o:o=e(r=a,i=s))}}function u(t,e,n){var r,i,o;return function(){var a,s=n(this);return null==s?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),a===s?null:a===r&&s===i?o:o=e(r=a,i=s))}}var c=n(5),l=n(1),h=n(36),f=n(120);e.a=function(t,e){var n=Object(l.h)(t),d="transform"===n?c.u:f.a;return this.attrTween(t,"function"==typeof e?(n.local?u:s)(n,d,Object(h.b)(this,"attr."+t,e)):null==e?(n.local?i:r)(n):(n.local?a:o)(n,d,e+""))}},function(t,e,n){"use strict";function r(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}function i(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n}var o=n(1);e.a=function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var a=Object(o.h)(t);return this.tween(n,(a.local?r:i)(a,e))}},function(t,e,n){"use strict";function r(t,e){return function(){Object(o.g)(this,t).delay=+e.apply(this,arguments)}}function i(t,e){return e=+e,function(){Object(o.g)(this,t).delay=e}}var o=n(6);e.a=function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?r:i)(e,t)):Object(o.f)(this.node(),e).delay}},function(t,e,n){"use strict";function r(t,e){return function(){Object(o.h)(this,t).duration=+e.apply(this,arguments)}}function i(t,e){return e=+e,function(){Object(o.h)(this,t).duration=e}}var o=n(6);e.a=function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?r:i)(e,t)):Object(o.f)(this.node(),e).duration}},function(t,e,n){"use strict";function r(t,e){if("function"!=typeof e)throw new Error;return function(){Object(i.h)(this,t).ease=e}}var i=n(6);e.a=function(t){var e=this._id;return arguments.length?this.each(r(e,t)):Object(i.f)(this.node(),e).ease}},function(t,e,n){"use strict";var r=n(1),i=n(10);e.a=function(t){"function"!=typeof t&&(t=Object(r.f)(t));for(var e=this._groups,n=e.length,o=new Array(n),a=0;a<n;++a)for(var s,u=e[a],c=u.length,l=o[a]=[],h=0;h<c;++h)(s=u[h])&&t.call(s,s.__data__,h,u)&&l.push(s);return new i.a(o,this._parents,this._name,this._id)}},function(t,e,n){"use strict";var r=n(10);e.a=function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,o=n.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c,l=e[u],h=n[u],f=l.length,d=s[u]=new Array(f),p=0;p<f;++p)(c=l[p]||h[p])&&(d[p]=c);for(;u<i;++u)s[u]=e[u];return new r.a(s,this._parents,this._name,this._id)}},function(t,e,n){"use strict";function r(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}function i(t,e,n){var i,a,s=r(e)?o.g:o.h;return function(){var r=s(this,t),o=r.on;o!==i&&(a=(i=o).copy()).on(e,n),r.on=a}}var o=n(6);e.a=function(t,e){var n=this._id;return arguments.length<2?Object(o.f)(this.node(),n).on.on(t):this.each(i(n,t,e))}},function(t,e,n){"use strict";function r(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}e.a=function(){return this.on("end.remove",r(this._id))}},function(t,e,n){"use strict";var r=n(1),i=n(10),o=n(6);e.a=function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(r.m)(t));for(var a=this._groups,s=a.length,u=new Array(s),c=0;c<s;++c)for(var l,h,f=a[c],d=f.length,p=u[c]=new Array(d),m=0;m<d;++m)(l=f[m])&&(h=t.call(l,l.__data__,m,f))&&("__data__"in l&&(h.__data__=l.__data__),p[m]=h,Object(o.e)(p[m],e,n,m,p,Object(o.f)(l,n)));return new i.a(u,this._parents,e,n)}},function(t,e,n){"use strict";var r=n(1),i=n(10),o=n(6);e.a=function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(r.n)(t));for(var a=this._groups,s=a.length,u=[],c=[],l=0;l<s;++l)for(var h,f=a[l],d=f.length,p=0;p<d;++p)if(h=f[p]){for(var m,v=t.call(h,h.__data__,p,f),g=Object(o.f)(h,n),y=0,b=v.length;y<b;++y)(m=v[y])&&Object(o.e)(m,e,n,y,v,g);u.push(v),c.push(h)}return new i.a(u,c,e,n)}},function(t,e,n){"use strict";var r=n(1),i=r.l.prototype.constructor;e.a=function(){return new i(this._groups,this._parents)}},function(t,e,n){"use strict";function r(t,e){var n,r,i;return function(){var o=Object(u.o)(this,t),a=(this.style.removeProperty(t),Object(u.o)(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function i(t){return function(){this.style.removeProperty(t)}}function o(t,e,n){var r,i;return function(){var o=Object(u.o)(this,t);return o===n?null:o===r?i:i=e(r=o,n)}}function a(t,e,n){var r,i,o;return function(){var a=Object(u.o)(this,t),s=n(this);return null==s&&(this.style.removeProperty(t),s=Object(u.o)(this,t)),a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}var s=n(5),u=n(1),c=n(36),l=n(120);e.a=function(t,e,n){var u="transform"==(t+="")?s.t:l.a;return null==e?this.styleTween(t,r(t,u)).on("end.style."+t,i(t)):this.styleTween(t,"function"==typeof e?a(t,u,Object(c.b)(this,"style."+t,e)):o(t,u,e+""),n)}},function(t,e,n){"use strict";function r(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}e.a=function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,r(t,e,null==n?"":n))}},function(t,e,n){"use strict";function r(t){return function(){this.textContent=t}}function i(t){return function(){var e=t(this);this.textContent=null==e?"":e}}var o=n(36);e.a=function(t){return this.tween("text","function"==typeof t?i(Object(o.b)(this,"text",t)):r(null==t?"":t+""))}},function(t,e,n){"use strict";var r=n(10),i=n(6);e.a=function(){for(var t=this._name,e=this._id,n=Object(r.c)(),o=this._groups,a=o.length,s=0;s<a;++s)for(var u,c=o[s],l=c.length,h=0;h<l;++h)if(u=c[h]){var f=Object(i.f)(u,e);Object(i.e)(u,t,n,h,c,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new r.a(o,this._parents,t,n)}},function(t,e,n){"use strict";function r(t){return+t}e.a=r},function(t,e,n){"use strict";function r(t){return t*t}function i(t){return t*(2-t)}function o(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}e.a=r,e.c=i,e.b=o},function(t,e,n){"use strict";function r(t){return t*t*t}function i(t){return--t*t*t+1}function o(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}e.a=r,e.c=i,e.b=o},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return o});var r=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),i=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),o=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3)},function(t,e,n){"use strict";function r(t){return 1-Math.cos(t*s)}function i(t){return Math.sin(t*s)}function o(t){return(1-Math.cos(a*t))/2}e.a=r,e.c=i,e.b=o;var a=Math.PI,s=a/2},function(t,e,n){"use strict";function r(t){return Math.pow(2,10*t-10)}function i(t){return 1-Math.pow(2,-10*t)}function o(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}e.a=r,e.c=i,e.b=o},function(t,e,n){"use strict";function r(t){return 1-Math.sqrt(1-t*t)}function i(t){return Math.sqrt(1- --t*t)}function o(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}e.a=r,e.c=i,e.b=o},function(t,e,n){"use strict";function r(t){return 1-i(1-t)}function i(t){return(t=+t)<a?m*t*t:t<u?m*(t-=s)*t+c:t<h?m*(t-=l)*t+f:m*(t-=d)*t+p}function o(t){return((t*=2)<=1?1-i(1-t):i(t-1)+1)/2}e.a=r,e.c=i,e.b=o;var a=4/11,s=6/11,u=8/11,c=.75,l=9/11,h=10/11,f=.9375,d=21/22,p=63/64,m=1/a/a},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return o});var r=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),i=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),o=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158)},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"b",function(){return a});var r=2*Math.PI,i=function t(e,n){function i(t){return e*Math.pow(2,10*--t)*Math.sin((o-t)/n)}var o=Math.asin(1/(e=Math.max(1,e)))*(n/=r);return i.amplitude=function(e){return t(e,n*r)},i.period=function(n){return t(e,n)},i}(1,.3),o=function t(e,n){function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+o)/n)}var o=Math.asin(1/(e=Math.max(1,e)))*(n/=r);return i.amplitude=function(e){return t(e,n*r)},i.period=function(n){return t(e,n)},i}(1,.3),a=function t(e,n){function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((o-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((o+t)/n))/2}var o=Math.asin(1/(e=Math.max(1,e)))*(n/=r);return i.amplitude=function(e){return t(e,n*r)},i.period=function(n){return t(e,n)},i}(1,.3)},function(t,e,n){"use strict";var r=n(10),i=n(6),o=[null];e.a=function(t,e){var n,a,s=t.__transition;if(s){e=null==e?null:e+"";for(a in s)if((n=s[a]).state>i.c&&n.name===e)return new r.a([[t]],o,e,+a)}return null}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";e.a=function(t,e,n){this.target=t,this.type=e,this.selection=n}},function(t,e,n){"use strict";function r(){i.d.stopImmediatePropagation()}e.b=r;var i=n(1);e.a=function(){i.d.preventDefault(),i.d.stopImmediatePropagation()}},function(t,e,n){"use strict";var r=n(284);n.d(e,"a",function(){return r.a});var i=n(285);n.d(e,"b",function(){return i.a})},function(t,e,n){"use strict";function r(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var i=n(3),o=n(122);e.a=function(){function t(t){var r,u,c,l,h,f,d=t.length,p=[],m=Object(i.s)(d),v=[],g=[],y=g.groups=new Array(d),b=new Array(d*d);for(r=0,h=-1;++h<d;){for(u=0,f=-1;++f<d;)u+=t[h][f];p.push(u),v.push(Object(i.s)(d)),r+=u}for(n&&m.sort(function(t,e){return n(p[t],p[e])}),a&&v.forEach(function(e,n){e.sort(function(e,r){return a(t[n][e],t[n][r])})}),r=Object(o.c)(0,o.e-e*d)/r,l=r?e:o.e/d,u=0,h=-1;++h<d;){for(c=u,f=-1;++f<d;){var _=m[h],x=v[_][f],w=t[_][x],M=u,E=u+=w*r;b[x*d+_]={index:_,subindex:x,startAngle:M,endAngle:E,value:w}}y[_]={index:_,startAngle:c,endAngle:u,value:p[_]},u+=l}for(h=-1;++h<d;)for(f=h-1;++f<d;){var T=b[f*d+h],S=b[h*d+f];(T.value||S.value)&&g.push(T.value<S.value?{source:S,target:T}:{source:T,target:S})}return s?g.sort(s):g}var e=0,n=null,a=null,s=null;return t.padAngle=function(n){return arguments.length?(e=Object(o.c)(0,n),t):e},t.sortGroups=function(e){return arguments.length?(n=e,t):n},t.sortSubgroups=function(e){return arguments.length?(a=e,t):a},t.sortChords=function(e){return arguments.length?(null==e?s=null:(s=r(e))._=e,t):s&&s._},t}},function(t,e,n){"use strict";function r(t){return t.source}function i(t){return t.target}function o(t){return t.radius}function a(t){return t.startAngle}function s(t){return t.endAngle}var u=n(286),c=n(287),l=n(122),h=n(13);e.a=function(){function t(){var t,r=u.a.call(arguments),i=e.apply(this,r),o=n.apply(this,r),a=+f.apply(this,(r[0]=i,r)),s=d.apply(this,r)-l.b,c=p.apply(this,r)-l.b,v=a*Object(l.a)(s),g=a*Object(l.d)(s),y=+f.apply(this,(r[0]=o,r)),b=d.apply(this,r)-l.b,_=p.apply(this,r)-l.b;if(m||(m=t=Object(h.a)()),m.moveTo(v,g),m.arc(0,0,a,s,c),s===b&&c===_||(m.quadraticCurveTo(0,0,y*Object(l.a)(b),y*Object(l.d)(b)),m.arc(0,0,y,b,_)),m.quadraticCurveTo(0,0,v,g),m.closePath(),t)return m=null,t+""||null}var e=r,n=i,f=o,d=a,p=s,m=null;return t.radius=function(e){return arguments.length?(f="function"==typeof e?e:Object(c.a)(+e),t):f},t.startAngle=function(e){return arguments.length?(d="function"==typeof e?e:Object(c.a)(+e),t):d},t.endAngle=function(e){return arguments.length?(p="function"==typeof e?e:Object(c.a)(+e),t):p},t.source=function(n){return arguments.length?(e=n,t):e},t.target=function(e){return arguments.length?(n=e,t):n},t.context=function(e){return arguments.length?(m=null==e?null:e,t):m},t}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=Array.prototype.slice},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";function r(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function i(){return new r}var o=Math.PI,a=2*o,s=a-1e-6;r.prototype=i.prototype={constructor:r,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,s=this._y1,u=n-t,c=r-e,l=a-t,h=s-e,f=l*l+h*h;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(h*u-c*l)>1e-6&&i){var d=n-a,p=r-s,m=u*u+c*c,v=d*d+p*p,g=Math.sqrt(m),y=Math.sqrt(f),b=i*Math.tan((o-Math.acos((m+f-v)/(2*g*y)))/2),_=b/y,x=b/g;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>l*p)+","+(this._x1=t+x*u)+","+(this._y1=e+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,u){t=+t,e=+e,n=+n;var c=n*Math.cos(r),l=n*Math.sin(r),h=t+c,f=e+l,d=1^u,p=u?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+h+","+f:(Math.abs(this._x1-h)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+h+","+f),n&&(p<0&&(p=p%a+a),p>s?this._+="A"+n+","+n+",0,1,"+d+","+(t-c)+","+(e-l)+"A"+n+","+n+",0,1,"+d+","+(this._x1=h)+","+(this._y1=f):p>1e-6&&(this._+="A"+n+","+n+",0,"+ +(p>=o)+","+d+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},e.a=i},function(t,e,n){"use strict";function r(){return{}}function i(t,e,n){t[e]=n}function o(){return Object(s.a)()}function a(t,e,n){t.set(e,n)}var s=n(65);e.a=function(){function t(e,r,i,o){if(r>=l.length)return null!=n&&e.sort(n),null!=u?u(e):e;for(var a,c,h,f=-1,d=e.length,p=l[r++],m=Object(s.a)(),v=i();++f<d;)(h=m.get(a=p(c=e[f])+""))?h.push(c):m.set(a,[c]);return m.each(function(e,n){o(v,n,t(e,r,i,o))}),v}function e(t,n){if(++n>l.length)return t;var r,i=h[n-1];return null!=u&&n>=l.length?r=t.entries():(r=[],t.each(function(t,i){r.push({key:i,values:e(t,n)})})),null!=i?r.sort(function(t,e){return i(t.key,e.key)}):r}var n,u,c,l=[],h=[];return c={object:function(e){return t(e,0,r,i)},map:function(e){return t(e,0,o,a)},entries:function(n){return e(t(n,0,o,a),0)},key:function(t){return l.push(t),c},sortKeys:function(t){return h[l.length-1]=t,c},sortValues:function(t){return n=t,c},rollup:function(t){return u=t,c}}}},function(t,e,n){"use strict";function r(){}function i(t,e){var n=new r;if(t instanceof r)t.each(function(t){n.add(t)});else if(t){var i=-1,o=t.length;if(null==e)for(;++i<o;)n.add(t[i]);else for(;++i<o;)n.add(e(t[i],i,t))}return n}var o=n(65),a=o.a.prototype;r.prototype=i.prototype={constructor:r,has:a.has,add:function(t){return t+="",this[o.b+t]=t,this},remove:a.remove,clear:a.clear,values:a.keys,size:a.size,empty:a.empty,each:a.each},e.a=i},function(t,e,n){"use strict";e.a=function(t){var e=[];for(var n in t)e.push(n);return e}},function(t,e,n){"use strict";e.a=function(t){var e=[];for(var n in t)e.push(t[n]);return e}},function(t,e,n){"use strict";e.a=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e}},function(t,e,n){"use strict";n.d(e,"c",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"a",function(){return s}),n.d(e,"b",function(){return u});var r=n(67),i=Object(r.a)(","),o=i.parse,a=i.parseRows,s=i.format,u=i.formatRows},function(t,e,n){"use strict";n.d(e,"c",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"a",function(){return s}),n.d(e,"b",function(){return u});var r=n(67),i=Object(r.a)("\t"),o=i.parse,a=i.parseRows,s=i.format,u=i.formatRows},function(t,e,n){"use strict";var r=n(297);n.d(e,"a",function(){return r.a});var i=n(298);n.d(e,"b",function(){return i.a});var o=n(312);n.d(e,"c",function(){return o.a});var a=n(313);n.d(e,"d",function(){return a.a});var s=n(314);n.d(e,"e",function(){return s.a});var u=n(123);n.d(e,"f",function(){return u.a});var c=n(315);n.d(e,"g",function(){return c.a});var l=n(316);n.d(e,"h",function(){return l.a})},function(t,e,n){"use strict";e.a=function(t,e){function n(){var n,i,o=r.length,a=0,s=0;for(n=0;n<o;++n)i=r[n],a+=i.x,s+=i.y;for(a=a/o-t,s=s/o-e,n=0;n<o;++n)i=r[n],i.x-=a,i.y-=s}var r;return null==t&&(t=0),null==e&&(e=0),n.initialize=function(t){r=t},n.x=function(e){return arguments.length?(t=+e,n):t},n.y=function(t){return arguments.length?(e=+t,n):e},n}},function(t,e,n){"use strict";function r(t){return t.x+t.vx}function i(t){return t.y+t.vy}var o=n(18),a=n(68),s=n(69);e.a=function(t){function e(){function t(t,e,n,r,i){var o=t.data,s=t.r,c=m+s;{if(!o)return e>d+c||r<d-c||n>p+c||i<p-c;if(o.index>u.index){var l=d-o.x-o.vx,f=p-o.y-o.vy,g=l*l+f*f;g<c*c&&(0===l&&(l=Object(a.a)(),g+=l*l),0===f&&(f=Object(a.a)(),g+=f*f),g=(c-(g=Math.sqrt(g)))/g*h,u.vx+=(l*=g)*(c=(s*=s)/(v+s)),u.vy+=(f*=g)*c,o.vx-=l*(c=1-c),o.vy-=f*c)}}}for(var e,o,u,d,p,m,v,g=c.length,y=0;y<f;++y)for(o=Object(s.a)(c,r,i).visitAfter(n),e=0;e<g;++e)u=c[e],m=l[u.index],v=m*m,d=u.x+u.vx,p=u.y+u.vy,o.visit(t)}function n(t){if(t.data)return t.r=l[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function u(){if(c){var e,n,r=c.length;for(l=new Array(r),e=0;e<r;++e)n=c[e],l[n.index]=+t(n,e,c)}}var c,l,h=1,f=1;return"function"!=typeof t&&(t=Object(o.a)(null==t?1:+t)),e.initialize=function(t){c=t,u()},e.iterations=function(t){return arguments.length?(f=+t,e):f},e.strength=function(t){return arguments.length?(h=+t,e):h},e.radius=function(n){return arguments.length?(t="function"==typeof n?n:Object(o.a)(+n),u(),e):t},e}},function(t,e,n){"use strict";function r(t,e,n){var r=new i(null==e?v.b:e,null==n?g.b:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function i(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function o(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}e.a=r;var a=n(300),s=n(301),u=n(302),c=n(303),l=n(304),h=n(305),f=n(306),d=n(307),p=n(308),m=n(309),v=n(310),g=n(311),y=r.prototype=i.prototype;y.copy=function(){var t,e,n=new i(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=o(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var a=0;a<4;++a)(e=r.source[a])&&(e.length?t.push({source:e,target:r.target[a]=new Array(4)}):r.target[a]=o(e));return n},y.add=a.b,y.addAll=a.a,y.cover=s.a,y.data=u.a,y.extent=c.a,y.find=l.a,y.remove=h.a,y.removeAll=h.b,y.root=f.a,y.size=d.a,y.visit=p.a,y.visitAfter=m.a,y.x=v.a,y.y=g.a},function(t,e,n){"use strict";function r(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,c,l,h,f,d=t._root,p={data:r},m=t._x0,v=t._y0,g=t._x1,y=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(o=(m+g)/2))?m=o:g=o,(l=n>=(a=(v+y)/2))?v=a:y=a,i=d,!(d=d[h=l<<1|c]))return i[h]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(o=(m+g)/2))?m=o:g=o,(l=n>=(a=(v+y)/2))?v=a:y=a}while((h=l<<1|c)==(f=(u>=a)<<1|s>=o));return i[f]=d,i[h]=p,t}function i(t){var e,n,i,o,a=t.length,s=new Array(a),u=new Array(a),c=1/0,l=1/0,h=-1/0,f=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(s[n]=i,u[n]=o,i<c&&(c=i),i>h&&(h=i),o<l&&(l=o),o>f&&(f=o));for(h<c&&(c=this._x0,h=this._x1),f<l&&(l=this._y0,f=this._y1),this.cover(c,l).cover(h,f),n=0;n<a;++n)r(this,s[n],u[n],t[n]);return this}e.a=i,e.b=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return r(this.cover(e,n),e,n,t)}},function(t,e,n){"use strict";e.a=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{if(!(n>t||t>i||r>e||e>o))return this;var a,s,u=i-n,c=this._root;switch(s=(e<(r+o)/2)<<1|t<(n+i)/2){case 0:do{a=new Array(4),a[s]=c,c=a}while(u*=2,i=n+u,o=r+u,t>i||e>o);break;case 1:do{a=new Array(4),a[s]=c,c=a}while(u*=2,n=i-u,o=r+u,n>t||e>o);break;case 2:do{a=new Array(4),a[s]=c,c=a}while(u*=2,i=n+u,r=o-u,t>i||r>e);break;case 3:do{a=new Array(4),a[s]=c,c=a}while(u*=2,n=i-u,r=o-u,n>t||r>e)}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}},function(t,e,n){"use strict";e.a=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t}},function(t,e,n){"use strict";e.a=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}},function(t,e,n){"use strict";var r=n(70);e.a=function(t,e,n){var i,o,a,s,u,c,l,h=this._x0,f=this._y0,d=this._x1,p=this._y1,m=[],v=this._root;for(v&&m.push(new r.a(v,h,f,d,p)),null==n?n=1/0:(h=t-n,f=e-n,d=t+n,p=e+n,n*=n);c=m.pop();)if(!(!(v=c.node)||(o=c.x0)>d||(a=c.y0)>p||(s=c.x1)<h||(u=c.y1)<f))if(v.length){var g=(o+s)/2,y=(a+u)/2;m.push(new r.a(v[3],g,y,s,u),new r.a(v[2],o,y,g,u),new r.a(v[1],g,a,s,y),new r.a(v[0],o,a,g,y)),(l=(e>=y)<<1|t>=g)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-l],m[m.length-1-l]=c)}else{var b=t-+this._x.call(null,v.data),_=e-+this._y.call(null,v.data),x=b*b+_*_;if(x<n){var w=Math.sqrt(n=x);h=t-w,f=e-w,d=t+w,p=e+w,i=v.data}}return i}},function(t,e,n){"use strict";function r(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}e.b=r,e.a=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,s,u,c,l,h,f,d=this._root,p=this._x0,m=this._y0,v=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((c=o>=(s=(p+v)/2))?p=s:v=s,(l=a>=(u=(m+g)/2))?m=u:g=u,e=d,!(d=d[h=l<<1|c]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)}},function(t,e,n){"use strict";e.a=function(){return this._root}},function(t,e,n){"use strict";e.a=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t}},function(t,e,n){"use strict";var r=n(70);e.a=function(t){var e,n,i,o,a,s,u=[],c=this._root;for(c&&u.push(new r.a(c,this._x0,this._y0,this._x1,this._y1));e=u.pop();)if(!t(c=e.node,i=e.x0,o=e.y0,a=e.x1,s=e.y1)&&c.length){var l=(i+a)/2,h=(o+s)/2;(n=c[3])&&u.push(new r.a(n,l,h,a,s)),(n=c[2])&&u.push(new r.a(n,i,h,l,s)),(n=c[1])&&u.push(new r.a(n,l,o,a,h)),(n=c[0])&&u.push(new r.a(n,i,o,l,h))}return this}},function(t,e,n){"use strict";var r=n(70);e.a=function(t){var e,n=[],i=[];for(this._root&&n.push(new r.a(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var a,s=e.x0,u=e.y0,c=e.x1,l=e.y1,h=(s+c)/2,f=(u+l)/2;(a=o[0])&&n.push(new r.a(a,s,u,h,f)),(a=o[1])&&n.push(new r.a(a,h,u,c,f)),(a=o[2])&&n.push(new r.a(a,s,f,h,l)),(a=o[3])&&n.push(new r.a(a,h,f,c,l))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this}},function(t,e,n){"use strict";function r(t){return t[0]}e.b=r,e.a=function(t){return arguments.length?(this._x=t,this):this._x}},function(t,e,n){"use strict";function r(t){return t[1]}e.b=r,e.a=function(t){return arguments.length?(this._y=t,this):this._y}},function(t,e,n){"use strict";function r(t){return t.index}function i(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var o=n(18),a=n(68),s=n(23);e.a=function(t){function e(t){return 1/Math.min(p[t.source.index],p[t.target.index])}function n(e){for(var n=0,r=t.length;n<b;++n)for(var i,o,s,u,c,l,d,p=0;p<r;++p)i=t[p],o=i.source,s=i.target,u=s.x+s.vx-o.x-o.vx||Object(a.a)(),c=s.y+s.vy-o.y-o.vy||Object(a.a)(),l=Math.sqrt(u*u+c*c),l=(l-f[p])/l*e*h[p],u*=l,c*=l,s.vx-=u*(d=m[p]),s.vy-=c*d,o.vx+=u*(d=1-d),o.vy+=c*d}function u(){if(d){var e,n,r=d.length,o=t.length,a=Object(s.c)(d,v);for(e=0,p=new Array(r);e<o;++e)n=t[e],n.index=e,"object"!=typeof n.source&&(n.source=i(a,n.source)),"object"!=typeof n.target&&(n.target=i(a,n.target)),p[n.source.index]=(p[n.source.index]||0)+1,p[n.target.index]=(p[n.target.index]||0)+1;for(e=0,m=new Array(o);e<o;++e)n=t[e],m[e]=p[n.source.index]/(p[n.source.index]+p[n.target.index]);h=new Array(o),c(),f=new Array(o),l()}}function c(){if(d)for(var e=0,n=t.length;e<n;++e)h[e]=+g(t[e],e,t)}function l(){if(d)for(var e=0,n=t.length;e<n;++e)f[e]=+y(t[e],e,t)}var h,f,d,p,m,v=r,g=e,y=Object(o.a)(30),b=1;return null==t&&(t=[]),n.initialize=function(t){d=t,u()},n.links=function(e){return arguments.length?(t=e,u(),n):t},n.id=function(t){return arguments.length?(v=t,n):v},n.iterations=function(t){return arguments.length?(b=+t,n):b},n.strength=function(t){return arguments.length?(g="function"==typeof t?t:Object(o.a)(+t),c(),n):g},n.distance=function(t){return arguments.length?(y="function"==typeof t?t:Object(o.a)(+t),l(),n):y},n}},function(t,e,n){"use strict";var r=n(18),i=n(68),o=n(69),a=n(123);e.a=function(){function t(t){var e,r=u.length,i=Object(o.a)(u,a.b,a.c).visitAfter(n);for(l=t,e=0;e<r;++e)c=u[e],i.visit(s)}function e(){if(u){var t,e,n=u.length;for(h=new Array(n),t=0;t<n;++t)e=u[t],h[e.index]=+f(e,t,u)}}function n(t){var e,n,r,i,o,a=0,s=0;if(t.length){for(r=i=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(a+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else{e=t,e.x=e.data.x,e.y=e.data.y;do{a+=h[e.data.index]}while(e=e.next)}t.value=a}function s(t,e,n,r){if(!t.value)return!0;var o=t.x-c.x,a=t.y-c.y,s=r-e,u=o*o+a*a;if(s*s/m<u)return u<p&&(0===o&&(o=Object(i.a)(),u+=o*o),0===a&&(a=Object(i.a)(),u+=a*a),u<d&&(u=Math.sqrt(d*u)),c.vx+=o*t.value*l/u,c.vy+=a*t.value*l/u),!0;if(!(t.length||u>=p)){(t.data!==c||t.next)&&(0===o&&(o=Object(i.a)(),u+=o*o),0===a&&(a=Object(i.a)(),u+=a*a),u<d&&(u=Math.sqrt(d*u)));do{t.data!==c&&(s=h[t.data.index]*l/u,c.vx+=o*s,c.vy+=a*s)}while(t=t.next)}}var u,c,l,h,f=Object(r.a)(-30),d=1,p=1/0,m=.81;return t.initialize=function(t){u=t,e()},t.strength=function(n){return arguments.length?(f="function"==typeof n?n:Object(r.a)(+n),e(),t):f},t.distanceMin=function(e){return arguments.length?(d=e*e,t):Math.sqrt(d)},t.distanceMax=function(e){return arguments.length?(p=e*e,t):Math.sqrt(p)},t.theta=function(e){return arguments.length?(m=e*e,t):Math.sqrt(m)},t}},function(t,e,n){"use strict";var r=n(18);e.a=function(t,e,n){function i(t){for(var r=0,i=a.length;r<i;++r){var o=a[r],c=o.x-e||1e-6,l=o.y-n||1e-6,h=Math.sqrt(c*c+l*l),f=(u[r]-h)*s[r]*t/h;o.vx+=c*f,o.vy+=l*f}}function o(){if(a){var e,n=a.length;for(s=new Array(n),u=new Array(n),e=0;e<n;++e)u[e]=+t(a[e],e,a),s[e]=isNaN(u[e])?0:+c(a[e],e,a)}}var a,s,u,c=Object(r.a)(.1);return"function"!=typeof t&&(t=Object(r.a)(+t)),null==e&&(e=0),null==n&&(n=0),i.initialize=function(t){a=t,o()},i.strength=function(t){return arguments.length?(c="function"==typeof t?t:Object(r.a)(+t),o(),i):c},i.radius=function(e){return arguments.length?(t="function"==typeof e?e:Object(r.a)(+e),o(),i):t},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(t){return arguments.length?(n=+t,i):n},i}},function(t,e,n){"use strict";var r=n(18);e.a=function(t){function e(t){for(var e,n=0,r=i.length;n<r;++n)e=i[n],e.vx+=(a[n]-e.x)*o[n]*t}function n(){if(i){var e,n=i.length;for(o=new Array(n),a=new Array(n),e=0;e<n;++e)o[e]=isNaN(a[e]=+t(i[e],e,i))?0:+s(i[e],e,i)}}var i,o,a,s=Object(r.a)(.1);return"function"!=typeof t&&(t=Object(r.a)(null==t?0:+t)),e.initialize=function(t){i=t,n()},e.strength=function(t){return arguments.length?(s="function"==typeof t?t:Object(r.a)(+t),n(),e):s},e.x=function(i){return arguments.length?(t="function"==typeof i?i:Object(r.a)(+i),n(),e):t},e}},function(t,e,n){"use strict";var r=n(18);e.a=function(t){function e(t){for(var e,n=0,r=i.length;n<r;++n)e=i[n],e.vy+=(a[n]-e.y)*o[n]*t}function n(){if(i){var e,n=i.length;for(o=new Array(n),a=new Array(n),e=0;e<n;++e)o[e]=isNaN(a[e]=+t(i[e],e,i))?0:+s(i[e],e,i)}}var i,o,a,s=Object(r.a)(.1);return"function"!=typeof t&&(t=Object(r.a)(null==t?0:+t)),e.initialize=function(t){i=t,n()},e.strength=function(t){return arguments.length?(s="function"==typeof t?t:Object(r.a)(+t),n(),e):s},e.y=function(i){return arguments.length?(t="function"==typeof i?i:Object(r.a)(+i),n(),e):t},e}},function(t,e,n){"use strict";function r(t){return i=Object(s.a)(t),o=i.format,a=i.formatPrefix,i}n.d(e,"b",function(){return o}),n.d(e,"c",function(){return a}),e.a=r;var i,o,a,s=n(124);r({decimal:".",thousands:",",grouping:[3],currency:["$",""]})},function(t,e,n){"use strict";e.a=function(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}},function(t,e,n){"use strict";e.a=function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}},function(t,e,n){"use strict";e.a=function(t,e){t=t.toPrecision(e);t:for(var n,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=n=i;break;case"0":0===o&&(o=i),n=i;break;case"e":break t;default:o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(n+1):t}},function(t,e,n){"use strict";var r=n(72);e.a=function(t,e){var n=Object(r.a)(t,e);if(!n)return t+"";var i=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(37);e.a=function(t){return Math.max(0,-Object(r.a)(Math.abs(t)))}},function(t,e,n){"use strict";var r=n(37);e.a=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Object(r.a)(e)/3)))-Object(r.a)(Math.abs(t)))}},function(t,e,n){"use strict";var r=n(37);e.a=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Object(r.a)(e)-Object(r.a)(t))+1}},function(t,e,n){"use strict";var r=n(128);n.d(e,"c",function(){return r.c});var i=n(327);n.d(e,"h",function(){return i.a});var o=n(328);n.d(e,"i",function(){return o.a});var a=n(129);n.d(e,"j",function(){return a.b});var s=n(131);n.d(e,"k",function(){return s.a});var u=n(137);n.d(e,"l",function(){return u.a});var c=n(330);n.d(e,"m",function(){return c.a});var l=n(39);n.d(e,"n",function(){return l.a});var h=n(332);n.d(e,"u",function(){return h.a});var f=n(138);n.d(e,"v",function(){return f.a});var d=n(333);n.d(e,"A",function(){return d.a}),n.d(e,"B",function(){return d.b});var p=n(334);n.d(e,"D",function(){return p.a});var m=n(139);n.d(e,"E",function(){return m.a});var v=n(335);n.d(e,"L",function(){return v.a});var g=n(141);n.d(e,"a",function(){return g.a});var y=n(343);n.d(e,"b",function(){return y.a});var b=n(344);n.d(e,"d",function(){return b.b}),n.d(e,"e",function(){return b.a});var _=n(345);n.d(e,"f",function(){return _.b}),n.d(e,"g",function(){return _.a});var x=n(346);n.d(e,"o",function(){return x.b}),n.d(e,"p",function(){return x.a});var w=n(74);n.d(e,"q",function(){return w.b}),n.d(e,"r",function(){return w.a});var M=n(347);n.d(e,"s",function(){return M.b}),n.d(e,"t",function(){return M.a});var E=n(142);n.d(e,"w",function(){return E.a}),n.d(e,"x",function(){return E.b});var T=n(348);n.d(e,"y",function(){return T.a}),n.d(e,"z",function(){return T.b});var S=n(349);n.d(e,"C",function(){return S.a});var A=n(8);n.d(e,"M",function(){return A.a}),n.d(e,"N",function(){return A.b});var O=n(77);n.d(e,"F",function(){return O.a}),n.d(e,"G",function(){return O.c});var C=n(350);n.d(e,"H",function(){return C.a}),n.d(e,"I",function(){return C.b});var R=n(351);n.d(e,"J",function(){return R.a}),n.d(e,"K",function(){return R.b});var L=n(352);n.d(e,"P",function(){return L.a}),n.d(e,"Q",function(){return L.b});var j=n(353);n.d(e,"T",function(){return j.a}),n.d(e,"U",function(){return j.b});var P=n(38);n.d(e,"O",function(){return P.a});var N=n(14);n.d(e,"R",function(){return N.a});var I=n(40);n.d(e,"S",function(){return I.a})},function(t,e,n){"use strict";function r(t,e){x.push(w=[d=t,m=t]),e<p&&(p=e),e>v&&(v=e)}function i(t,e){var n=Object(T.a)([t*S.r,e*S.r]);if(_){var r=Object(T.c)(_,n),i=[r[1],-r[0],0],o=Object(T.c)(i,r);Object(T.e)(o),o=Object(T.g)(o);var a,s=t-g,u=s>0?1:-1,c=o[0]*S.h*u,h=Object(S.a)(s)>180;h^(u*g<c&&c<u*t)?(a=o[1]*S.h)>v&&(v=a):(c=(c+360)%360-180,h^(u*g<c&&c<u*t)?(a=-o[1]*S.h)<p&&(p=a):(e<p&&(p=e),e>v&&(v=e))),h?t<g?l(d,t)>l(d,m)&&(m=t):l(t,m)>l(d,m)&&(d=t):m>=d?(t<d&&(d=t),t>m&&(m=t)):t>g?l(d,t)>l(d,m)&&(m=t):l(t,m)>l(d,m)&&(d=t)}else x.push(w=[d=t,m=t]);e<p&&(p=e),e>v&&(v=e),_=n,g=t}function o(){C.point=i}function a(){w[0]=d,w[1]=m,C.point=r,_=null}function s(t,e){if(_){var n=t-g;O.add(Object(S.a)(n)>180?n+(n>0?360:-360):n)}else y=t,b=e;E.b.point(t,e),i(t,e)}function u(){E.b.lineStart()}function c(){s(y,b),E.b.lineEnd(),Object(S.a)(O)>S.i&&(d=-(m=180)),w[0]=d,w[1]=m,_=null}function l(t,e){return(e-=t)<0?e+360:e}function h(t,e){return t[0]-e[0]}function f(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var d,p,m,v,g,y,b,_,x,w,M=n(19),E=n(128),T=n(24),S=n(0),A=n(14),O=Object(M.a)(),C={point:r,lineStart:o,lineEnd:a,polygonStart:function(){C.point=s,C.lineStart=u,C.lineEnd=c,O.reset(),E.b.polygonStart()},polygonEnd:function(){E.b.polygonEnd(),C.point=r,C.lineStart=o,C.lineEnd=a,E.a<0?(d=-(m=180),p=-(v=90)):O>S.i?v=90:O<-S.i&&(p=-90),w[0]=d,w[1]=m}};e.a=function(t){var e,n,r,i,o,a,s;if(v=m=-(d=p=1/0),x=[],Object(A.a)(t,C),n=x.length){for(x.sort(h),e=1,r=x[0],o=[r];e<n;++e)i=x[e],f(r,i[0])||f(r,i[1])?(l(r[0],i[1])>l(r[0],r[1])&&(r[1]=i[1]),l(i[0],r[1])>l(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=l(r[1],i[0]))>a&&(a=s,d=i[0],m=r[1])}return x=w=null,d===1/0||p===1/0?[[NaN,NaN],[NaN,NaN]]:[[d,p],[m,v]]}},function(t,e,n){"use strict";function r(t,e){t*=C.r,e*=C.r;var n=Object(C.g)(e);i(n*Object(C.g)(t),n*Object(C.t)(t),Object(C.t)(e))}function i(t,e,n){++d,m+=(t-m)/d,v+=(e-v)/d,g+=(n-g)/d}function o(){j.point=a}function a(t,e){t*=C.r,e*=C.r;var n=Object(C.g)(e);S=n*Object(C.g)(t),A=n*Object(C.t)(t),O=Object(C.t)(e),j.point=s,i(S,A,O)}function s(t,e){t*=C.r,e*=C.r;var n=Object(C.g)(e),r=n*Object(C.g)(t),o=n*Object(C.t)(t),a=Object(C.t)(e),s=Object(C.e)(Object(C.u)((s=A*a-O*o)*s+(s=O*r-S*a)*s+(s=S*o-A*r)*s),S*r+A*o+O*a);p+=s,y+=s*(S+(S=r)),b+=s*(A+(A=o)),_+=s*(O+(O=a)),i(S,A,O)}function u(){j.point=r}function c(){j.point=h}function l(){f(E,T),j.point=r}function h(t,e){E=t,T=e,t*=C.r,e*=C.r,j.point=f;var n=Object(C.g)(e);S=n*Object(C.g)(t),A=n*Object(C.t)(t),O=Object(C.t)(e),i(S,A,O)}function f(t,e){t*=C.r,e*=C.r;var n=Object(C.g)(e),r=n*Object(C.g)(t),o=n*Object(C.t)(t),a=Object(C.t)(e),s=A*a-O*o,u=O*r-S*a,c=S*o-A*r,l=Object(C.u)(s*s+u*u+c*c),h=Object(C.c)(l),f=l&&-h/l;x+=f*s,w+=f*u,M+=f*c,p+=h,y+=h*(S+(S=r)),b+=h*(A+(A=o)),_+=h*(O+(O=a)),i(S,A,O)}var d,p,m,v,g,y,b,_,x,w,M,E,T,S,A,O,C=n(0),R=n(11),L=n(14),j={sphere:R.a,point:r,lineStart:o,lineEnd:u,polygonStart:function(){j.lineStart=c,j.lineEnd=l},polygonEnd:function(){j.lineStart=o,j.lineEnd=u}};e.a=function(t){d=p=m=v=g=y=b=_=x=w=M=0,Object(L.a)(t,j);var e=x,n=w,r=M,i=e*e+n*n+r*r;return i<C.j&&(e=y,n=b,r=_,p<C.i&&(e=m,n=v,r=g),(i=e*e+n*n+r*r)<C.j)?[NaN,NaN]:[Object(C.e)(n,e)*C.h,Object(C.c)(r/Object(C.u)(i))*C.h]}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";var r=n(39);e.a=function(){var t,e,n,i=0,o=0,a=960,s=500;return n={stream:function(n){return t&&e===n?t:t=Object(r.a)(i,o,a,s)(e=n)},extent:function(r){return arguments.length?(i=+r[0][0],o=+r[0][1],a=+r[1][0],s=+r[1][1],t=e=null,n):[[i,o],[a,s]]}}}},function(t,e,n){"use strict";e.a=function(t,e,n,r,i,o){var a,s=t[0],u=t[1],c=e[0],l=e[1],h=0,f=1,d=c-s,p=l-u;if(a=n-s,d||!(a>0)){if(a/=d,d<0){if(a<h)return;a<f&&(f=a)}else if(d>0){if(a>f)return;a>h&&(h=a)}if(a=i-s,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>h&&(h=a)}else if(d>0){if(a<h)return;a<f&&(f=a)}if(a=r-u,p||!(a>0)){if(a/=p,p<0){if(a<h)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>h&&(h=a)}if(a=o-u,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>h&&(h=a)}else if(p>0){if(a<h)return;a<f&&(f=a)}return h>0&&(t[0]=s+h*d,t[1]=u+h*p),f<1&&(e[0]=s+f*d,e[1]=u+f*p),!0}}}}}},function(t,e,n){"use strict";function r(t,e){return!(!t||!d.hasOwnProperty(t.type))&&d[t.type](t,e)}function i(t,e){return 0===Object(l.a)(t,e)}function o(t,e){var n=Object(l.a)(t[0],t[1]);return Object(l.a)(t[0],e)+Object(l.a)(e,t[1])<=n+h.i}function a(t,e){return!!Object(c.a)(t.map(s),u(e))}function s(t){return t=t.map(u),t.pop(),t}function u(t){return[t[0]*h.r,t[1]*h.r]}var c=n(136),l=n(138),h=n(0),f={Feature:function(t,e){return r(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)if(r(n[i].geometry,e))return!0;return!1}},d={Sphere:function(){return!0},Point:function(t,e){return i(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)if(i(n[r],e))return!0;return!1},LineString:function(t,e){return o(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(o(n[r],e))return!0;return!1},Polygon:function(t,e){return a(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(a(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)if(r(n[i],e))return!0;return!1}};e.a=function(t,e){return(t&&f.hasOwnProperty(t.type)?f[t.type]:r)(t,e)}},function(t,e,n){"use strict";function r(t,e,n){var r=Object(s.s)(t,e-u.i,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function i(t,e,n){var r=Object(s.s)(t,e-u.i,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function o(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return Object(s.s)(Object(u.f)(c/_)*_,a,_).map(v).concat(Object(s.s)(Object(u.f)(d/x)*x,f,x).map(g)).concat(Object(s.s)(Object(u.f)(o/y)*y,n,y).filter(function(t){return Object(u.a)(t%_)>u.i}).map(p)).concat(Object(s.s)(Object(u.f)(h/b)*b,l,b).filter(function(t){return Object(u.a)(t%x)>u.i}).map(m))}var n,o,a,c,l,h,f,d,p,m,v,g,y=10,b=y,_=90,x=360,w=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[v(c).concat(g(f).slice(1),v(a).reverse().slice(1),g(d).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.extentMajor(e).extentMinor(e):t.extentMinor()},t.extentMajor=function(e){return arguments.length?(c=+e[0][0],a=+e[1][0],d=+e[0][1],f=+e[1][1],c>a&&(e=c,c=a,a=e),d>f&&(e=d,d=f,f=e),t.precision(w)):[[c,d],[a,f]]},t.extentMinor=function(e){return arguments.length?(o=+e[0][0],n=+e[1][0],h=+e[0][1],l=+e[1][1],o>n&&(e=o,o=n,n=e),h>l&&(e=h,h=l,l=e),t.precision(w)):[[o,h],[n,l]]},t.step=function(e){return arguments.length?t.stepMajor(e).stepMinor(e):t.stepMinor()},t.stepMajor=function(e){return arguments.length?(_=+e[0],x=+e[1],t):[_,x]},t.stepMinor=function(e){return arguments.length?(y=+e[0],b=+e[1],t):[y,b]},t.precision=function(e){return arguments.length?(w=+e,p=r(h,l,90),m=i(o,n,w),v=r(d,f,90),g=i(c,a,w),t):w},t.extentMajor([[-180,-90+u.i],[180,90-u.i]]).extentMinor([[-180,-80-u.i],[180,80+u.i]])}function a(){return o()()}e.a=o,e.b=a;var s=n(3),u=n(0)},function(t,e,n){"use strict";var r=n(0);e.a=function(t,e){var n=t[0]*r.r,i=t[1]*r.r,o=e[0]*r.r,a=e[1]*r.r,s=Object(r.g)(i),u=Object(r.t)(i),c=Object(r.g)(a),l=Object(r.t)(a),h=s*Object(r.g)(n),f=s*Object(r.t)(n),d=c*Object(r.g)(o),p=c*Object(r.t)(o),m=2*Object(r.c)(Object(r.u)(Object(r.m)(a-i)+s*c*Object(r.m)(o-n))),v=Object(r.t)(m),g=m?function(t){var e=Object(r.t)(t*=m)/v,n=Object(r.t)(m-t)/v,i=n*h+e*d,o=n*f+e*p,a=n*u+e*l;return[Object(r.e)(o,i)*r.h,Object(r.e)(a,Object(r.u)(i*i+o*o))*r.h]}:function(){return[n*r.h,i*r.h]};return g.distance=m,g}},function(t,e,n){"use strict";var r=n(73),i=n(14),o=n(336),a=n(140),s=n(337),u=n(338),c=n(339),l=n(340);e.a=function(t,e){function n(t){return t&&("function"==typeof d&&f.pointRadius(+d.apply(this,arguments)),Object(i.a)(t,h(f))),f.result()}var h,f,d=4.5;return n.area=function(t){return Object(i.a)(t,h(o.a)),o.a.result()},n.measure=function(t){return Object(i.a)(t,h(c.a)),c.a.result()},n.bounds=function(t){return Object(i.a)(t,h(a.a)),a.a.result()},n.centroid=function(t){return Object(i.a)(t,h(s.a)),s.a.result()},n.projection=function(e){return arguments.length?(h=null==e?(t=null,r.a):(t=e).stream,n):t},n.context=function(t){return arguments.length?(f=null==t?(e=null,new l.a):new u.a(e=t),"function"!=typeof d&&f.pointRadius(d),n):e},n.pointRadius=function(t){return arguments.length?(d="function"==typeof t?t:(f.pointRadius(+t),+t),n):d},n.projection(t).context(e)}},function(t,e,n){"use strict";function r(){v.point=i}function i(t,e){v.point=o,s=c=t,u=l=e}function o(t,e){m.add(l*t-c*e),c=t,l=e}function a(){o(s,u)}var s,u,c,l,h=n(19),f=n(0),d=n(11),p=Object(h.a)(),m=Object(h.a)(),v={point:d.a,lineStart:d.a,lineEnd:d.a,polygonStart:function(){v.lineStart=r,v.lineEnd=a},polygonEnd:function(){v.lineStart=v.lineEnd=v.point=d.a,p.add(Object(f.a)(m)),m.reset()},result:function(){var t=p/2;return p.reset(),t}};e.a=v},function(t,e,n){"use strict";function r(t,e){g+=t,y+=e,++b}function i(){S.point=o}function o(t,e){S.point=a,r(p=t,m=e)}function a(t,e){var n=t-p,i=e-m,o=Object(v.u)(n*n+i*i);_+=o*(p+t)/2,x+=o*(m+e)/2,w+=o,r(p=t,m=e)}function s(){S.point=r}function u(){S.point=l}function c(){h(f,d)}function l(t,e){S.point=h,r(f=p=t,d=m=e)}function h(t,e){var n=t-p,i=e-m,o=Object(v.u)(n*n+i*i);_+=o*(p+t)/2,x+=o*(m+e)/2,w+=o,o=m*t-p*e,M+=o*(p+t),E+=o*(m+e),T+=3*o,r(p=t,m=e)}var f,d,p,m,v=n(0),g=0,y=0,b=0,_=0,x=0,w=0,M=0,E=0,T=0,S={point:r,lineStart:i,lineEnd:s,polygonStart:function(){S.lineStart=u,S.lineEnd=c},polygonEnd:function(){S.point=r,S.lineStart=i,S.lineEnd=s},result:function(){var t=T?[M/T,E/T]:w?[_/w,x/w]:b?[g/b,y/b]:[NaN,NaN];return g=y=b=_=x=w=M=E=T=0,t}};e.a=S},function(t,e,n){"use strict";function r(t){this._context=t}e.a=r;var i=n(0),o=n(11);r.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,i.w)}},result:o.a}},function(t,e,n){"use strict";function r(t,e){p.point=i,a=u=t,s=c=e}function i(t,e){u-=t,c-=e,d.add(Object(h.u)(u*u+c*c)),u=t,c=e}var o,a,s,u,c,l=n(19),h=n(0),f=n(11),d=Object(l.a)(),p={point:f.a,lineStart:function(){p.point=r},lineEnd:function(){o&&i(a,s),p.point=f.a},polygonStart:function(){o=!0},polygonEnd:function(){o=null},result:function(){var t=+d;return d.reset(),t}};e.a=p},function(t,e,n){"use strict";function r(){this._string=[]}function i(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}e.a=r,r.prototype={_radius:4.5,_circle:i(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=i(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}}},function(t,e,n){"use strict";function r(t){return Object(s.b)({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function i(t,e){function n(r,i,o,s,u,l,h,f,d,p,m,v,g,y){var b=h-r,_=f-i,x=b*b+_*_;if(x>4*e&&g--){var w=s+p,M=u+m,E=l+v,T=Object(a.u)(w*w+M*M+E*E),S=Object(a.c)(E/=T),A=Object(a.a)(Object(a.a)(E)-1)<a.i||Object(a.a)(o-d)<a.i?(o+d)/2:Object(a.e)(M,w),O=t(A,S),C=O[0],R=O[1],L=C-r,j=R-i,P=_*L-b*j;(P*P/x>e||Object(a.a)((b*L+_*j)/x-.5)>.3||s*p+u*m+l*v<c)&&(n(r,i,o,s,u,l,C,R,A,w/=T,M/=T,E,g,y),y.point(C,R),n(C,R,A,w,M,E,h,f,d,p,m,v,g,y))}}return function(e){function r(n,r){n=t(n,r),e.point(n[0],n[1])}function i(){b=NaN,E.point=a,e.lineStart()}function a(r,i){var a=Object(o.a)([r,i]),s=t(r,i);n(b,_,y,x,w,M,b=s[0],_=s[1],y=r,x=a[0],w=a[1],M=a[2],u,e),e.point(b,_)}function s(){E.point=r,e.lineEnd()}function c(){i(),E.point=l,E.lineEnd=h}function l(t,e){a(f=t,e),d=b,p=_,m=x,v=w,g=M,E.point=a}function h(){n(b,_,y,x,w,M,d,p,f,m,v,g,u,e),E.lineEnd=s,s()}var f,d,p,m,v,g,y,b,_,x,w,M,E={point:r,lineStart:i,lineEnd:s,polygonStart:function(){e.polygonStart(),E.lineStart=c},polygonEnd:function(){e.polygonEnd(),E.lineStart=i}};return E}}var o=n(24),a=n(0),s=n(40),u=16,c=Object(a.g)(30*a.r);e.a=function(t,e){return+e?i(t,e):r(t)}},function(t,e,n){"use strict";function r(t){function e(t,e){return[t*n,Object(i.t)(e)/n]}var n=Object(i.g)(t);return e.invert=function(t,e){return[t/n,Object(i.c)(e*n)]},e}e.a=r;var i=n(0)},function(t,e,n){"use strict";function r(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}var i=n(0),o=n(141),a=n(74),s=n(76);e.a=function(){function t(t){var e=t[0],n=t[1];return f=null,c.point(e,n),f||(l.point(e,n),f)||(h.point(e,n),f)}function e(){return n=u=null,t}var n,u,c,l,h,f,d=Object(o.a)(),p=Object(a.b)().rotate([154,0]).center([-2,58.5]).parallels([55,65]),m=Object(a.b)().rotate([157,0]).center([-3,19.9]).parallels([8,18]),v={point:function(t,e){f=[t,e]}};return t.invert=function(t){var e=d.scale(),n=d.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?p:i>=.166&&i<.234&&r>=-.214&&r<-.115?m:d).invert(t)},t.stream=function(t){return n&&u===t?n:n=r([d.stream(u=t),p.stream(t),m.stream(t)])},t.precision=function(t){return arguments.length?(d.precision(t),p.precision(t),m.precision(t),e()):d.precision()},t.scale=function(e){return arguments.length?(d.scale(e),p.scale(.35*e),m.scale(e),t.translate(d.translate())):d.scale()},t.translate=function(t){if(!arguments.length)return d.translate();var n=d.scale(),r=+t[0],o=+t[1];return c=d.translate(t).clipExtent([[r-.455*n,o-.238*n],[r+.455*n,o+.238*n]]).stream(v),l=p.translate([r-.307*n,o+.201*n]).clipExtent([[r-.425*n+i.i,o+.12*n+i.i],[r-.214*n-i.i,o+.234*n-i.i]]).stream(v),h=m.translate([r-.205*n,o+.212*n]).clipExtent([[r-.214*n+i.i,o+.166*n+i.i],[r-.115*n-i.i,o+.234*n-i.i]]).stream(v),e()},t.fitExtent=function(e,n){return Object(s.a)(t,e,n)},t.fitSize=function(e,n){return Object(s.c)(t,e,n)},t.fitWidth=function(e,n){return Object(s.d)(t,e,n)},t.fitHeight=function(e,n){return Object(s.b)(t,e,n)},t.scale(1070)}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(0),i=n(25),o=n(8),a=Object(i.b)(function(t){return Object(r.u)(2/(1+t))});a.invert=Object(i.a)(function(t){return 2*Object(r.c)(t/2)}),e.b=function(){return Object(o.a)(a).scale(124.75).clipAngle(179.999)}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(0),i=n(25),o=n(8),a=Object(i.b)(function(t){return(t=Object(r.b)(t))&&t/Object(r.t)(t)});a.invert=Object(i.a)(function(t){return t}),e.b=function(){return Object(o.a)(a).scale(79.4188).clipAngle(179.999)}},function(t,e,n){"use strict";function r(t){return Object(o.v)((o.l+t)/2)}function i(t,e){function n(t,e){u>0?e<-o.l+o.i&&(e=-o.l+o.i):e>o.l-o.i&&(e=o.l-o.i);var n=u/Object(o.p)(r(e),a);return[n*Object(o.t)(a*t),u-n*Object(o.g)(a*t)]}var i=Object(o.g)(t),a=t===e?Object(o.t)(t):Object(o.n)(i/Object(o.g)(e))/Object(o.n)(r(e)/r(t)),u=i*Object(o.p)(r(t),a)/a;return a?(n.invert=function(t,e){var n=u-e,r=Object(o.s)(a)*Object(o.u)(t*t+n*n);return[Object(o.e)(t,Object(o.a)(n))/a*Object(o.s)(n),2*Object(o.d)(Object(o.p)(u/r,1/a))-o.l]},n):s.c}e.a=i;var o=n(0),a=n(75),s=n(77);e.b=function(){return Object(a.a)(i).scale(109.5).parallels([30,30])}},function(t,e,n){"use strict";function r(t,e){function n(t,e){var n=s-e,r=o*t;return[n*Object(i.t)(r),s-n*Object(i.g)(r)]}var r=Object(i.g)(t),o=t===e?Object(i.t)(t):(r-Object(i.g)(e))/(e-t),s=r/o+t;return Object(i.a)(o)<i.i?a.b:(n.invert=function(t,e){var n=s-e;return[Object(i.e)(t,Object(i.a)(n))/o*Object(i.s)(n),s-Object(i.s)(o)*Object(i.u)(t*t+n*n)]},n)}e.a=r;var i=n(0),o=n(75),a=n(142);e.b=function(){return Object(o.a)(r).scale(131.154).center([0,13.9389])}},function(t,e,n){"use strict";function r(t,e){var n=Object(i.g)(e),r=Object(i.g)(t)*n;return[n*Object(i.t)(t)/r,Object(i.t)(e)/r]}e.b=r;var i=n(0),o=n(25),a=n(8);r.invert=Object(o.a)(i.d),e.a=function(){return Object(a.a)(r).scale(144.049).clipAngle(60)}},function(t,e,n){"use strict";function r(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?o.a:Object(a.b)({point:function(i,o){this.stream.point(i*t+n,o*e+r)}})}var i=n(39),o=n(73),a=n(40),s=n(76);e.a=function(){function t(){return u=c=null,l}var e,n,a,u,c,l,h=1,f=0,d=0,p=1,m=1,v=o.a,g=null,y=o.a;return l={stream:function(t){return u&&c===t?u:u=v(y(c=t))},postclip:function(r){return arguments.length?(y=r,g=e=n=a=null,t()):y},clipExtent:function(r){return arguments.length?(y=null==r?(g=e=n=a=null,o.a):Object(i.a)(g=+r[0][0],e=+r[0][1],n=+r[1][0],a=+r[1][1]),t()):null==g?null:[[g,e],[n,a]]},scale:function(e){return arguments.length?(v=r((h=+e)*p,h*m,f,d),t()):h},translate:function(e){return arguments.length?(v=r(h*p,h*m,f=+e[0],d=+e[1]),t()):[f,d]},reflectX:function(e){return arguments.length?(v=r(h*(p=e?-1:1),h*m,f,d),t()):p<0},reflectY:function(e){return arguments.length?(v=r(h*p,h*(m=e?-1:1),f,d),t()):m<0},fitExtent:function(t,e){return Object(s.a)(l,t,e)},fitSize:function(t,e){return Object(s.c)(l,t,e)},fitWidth:function(t,e){return Object(s.d)(l,t,e)},fitHeight:function(t,e){return Object(s.b)(l,t,e)}}}},function(t,e,n){"use strict";function r(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}e.b=r;var i=n(8),o=n(0);r.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,s=a*a;r-=n=(r*(1.007226+a*(.015085+s*(.028874*a-.044475-.005916*s)))-e)/(1.007226+a*(.045255+s*(.259866*a-.311325-.005916*11*s)))}while(Object(o.a)(n)>o.i&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},e.a=function(){return Object(i.a)(r).scale(175.295)}},function(t,e,n){"use strict";function r(t,e){return[Object(i.g)(e)*Object(i.t)(t),Object(i.t)(e)]}e.b=r;var i=n(0),o=n(25),a=n(8);r.invert=Object(o.a)(i.c),e.a=function(){return Object(a.a)(r).scale(249.5).clipAngle(90+i.i)}},function(t,e,n){"use strict";function r(t,e){var n=Object(i.g)(e),r=1+Object(i.g)(t)*n;return[n*Object(i.t)(t)/r,Object(i.t)(e)/r]}e.b=r;var i=n(0),o=n(25),a=n(8);r.invert=Object(o.a)(function(t){return 2*Object(i.d)(t)}),e.a=function(){return Object(a.a)(r).scale(250).clipAngle(142)}},function(t,e,n){"use strict";function r(t,e){return[Object(i.n)(Object(i.v)((i.l+e)/2)),-t]}e.b=r;var i=n(0),o=n(77);r.invert=function(t,e){return[-e,2*Object(i.d)(Object(i.k)(t))-i.l]},e.a=function(){var t=Object(o.b)(r),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90]).scale(159.155)}},function(t,e,n){"use strict";var r=n(355);n.d(e,"a",function(){return r.a});var i=n(78);n.d(e,"b",function(){return i.c});var o=n(367);n.d(e,"c",function(){return o.a});var a=n(143);n.d(e,"e",function(){return a.a});var s=n(144);n.d(e,"d",function(){return s.a});var u=n(369);n.d(e,"f",function(){return u.a});var c=n(370);n.d(e,"g",function(){return c.a});var l=n(371);n.d(e,"h",function(){return l.a});var h=n(372);n.d(e,"i",function(){return h.a});var f=n(373);n.d(e,"j",function(){return f.a});var d=n(26);n.d(e,"k",function(){return d.a});var p=n(41);n.d(e,"m",function(){return p.a});var m=n(374);n.d(e,"n",function(){return m.a});var v=n(80);n.d(e,"o",function(){return v.a});var g=n(375);n.d(e,"l",function(){return g.a})},function(t,e,n){"use strict";function r(t,e){return t.parent===e.parent?1:2}function i(t){return t.reduce(o,0)/t.length}function o(t,e){return t+e.x}function a(t){return 1+t.reduce(s,0)}function s(t,e){return Math.max(t,e.y)}function u(t){for(var e;e=t.children;)t=e[0];return t}function c(t){for(var e;e=t.children;)t=e[e.length-1];return t}e.a=function(){function t(t){var r,l=0;t.eachAfter(function(t){var n=t.children;n?(t.x=i(n),t.y=a(n)):(t.x=r?l+=e(t,r):0,t.y=0,r=t)});var h=u(t),f=c(t),d=h.x-e(h,f)/2,p=f.x+e(f,h)/2;return t.eachAfter(s?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*o}:function(e){e.x=(e.x-d)/(p-d)*n,e.y=(1-(t.y?e.y/t.y:1))*o})}var e=r,n=1,o=1,s=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(e){return arguments.length?(s=!1,n=+e[0],o=+e[1],t):s?null:[n,o]},t.nodeSize=function(e){return arguments.length?(s=!0,n=+e[0],o=+e[1],t):s?[n,o]:null},t}},function(t,e,n){"use strict";function r(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}e.a=function(){return this.eachAfter(r)}},function(t,e,n){"use strict";e.a=function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this}},function(t,e,n){"use strict";e.a=function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this}},function(t,e,n){"use strict";e.a=function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this}},function(t,e,n){"use strict";e.a=function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}},function(t,e,n){"use strict";e.a=function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}},function(t,e,n){"use strict";function r(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}e.a=function(t){for(var e=this,n=r(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var o=i.length;t!==n;)i.splice(o,0,t),t=t.parent;return i}},function(t,e,n){"use strict";e.a=function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}},function(t,e,n){"use strict";e.a=function(){var t=[];return this.each(function(e){t.push(e)}),t}},function(t,e,n){"use strict";e.a=function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}},function(t,e,n){"use strict";e.a=function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}},function(t,e,n){"use strict";function r(t){return Math.sqrt(t.value)}function i(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function o(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,u=t(n)*e||0;if(u)for(i=0;i<a;++i)r[i].r+=u;if(o=Object(s.b)(r),u)for(i=0;i<a;++i)r[i].r-=u;n.r=o+u}}}function a(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var s=n(143),u=n(79),c=n(145);e.a=function(){function t(t){return t.x=n/2,t.y=s/2,e?t.eachBefore(i(e)).eachAfter(o(l,.5)).eachBefore(a(1)):t.eachBefore(i(r)).eachAfter(o(c.a,1)).eachAfter(o(l,t.r/Math.min(n,s))).eachBefore(a(Math.min(n,s)/(2*t.r))),t}var e=null,n=1,s=1,l=c.a;return t.radius=function(n){return arguments.length?(e=Object(u.a)(n),t):e},t.size=function(e){return arguments.length?(n=+e[0],s=+e[1],t):[n,s]},t.padding=function(e){return arguments.length?(l="function"==typeof e?e:Object(c.b)(+e),t):l},t}},function(t,e,n){"use strict";function r(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}n.d(e,"b",function(){return i}),e.a=r;var i=Array.prototype.slice},function(t,e,n){"use strict";var r=n(146),i=n(26);e.a=function(){function t(t){var i=t.height+1;return t.x0=t.y0=a,t.x1=n,t.y1=o/i,t.eachBefore(e(o,i)),s&&t.eachBefore(r.a),t}function e(t,e){return function(n){n.children&&Object(i.a)(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var r=n.x0,o=n.y0,s=n.x1-a,u=n.y1-a;s<r&&(r=s=(r+s)/2),u<o&&(o=u=(o+u)/2),n.x0=r,n.y0=o,n.x1=s,n.y1=u}}var n=1,o=1,a=0,s=!1;return t.round=function(e){return arguments.length?(s=!!e,t):s},t.size=function(e){return arguments.length?(n=+e[0],o=+e[1],t):[n,o]},t.padding=function(e){return arguments.length?(a=+e,t):a},t}},function(t,e,n){"use strict";function r(t){return t.id}function i(t){return t.parentId}var o=n(79),a=n(78),s="$",u={depth:-1},c={};e.a=function(){function t(t){var r,i,o,l,h,f,d,p=t.length,m=new Array(p),v={};for(i=0;i<p;++i)r=t[i],h=m[i]=new a.a(r),null!=(f=e(r,i,t))&&(f+="")&&(d=s+(h.id=f),v[d]=d in v?c:h);for(i=0;i<p;++i)if(h=m[i],null!=(f=n(t[i],i,t))&&(f+="")){if(!(l=v[s+f]))throw new Error("missing: "+f);if(l===c)throw new Error("ambiguous: "+f);l.children?l.children.push(h):l.children=[h],h.parent=l}else{if(o)throw new Error("multiple roots");o=h}if(!o)throw new Error("no root");if(o.parent=u,o.eachBefore(function(t){t.depth=t.parent.depth+1,--p}).eachBefore(a.b),o.parent=null,p>0)throw new Error("cycle");return o}var e=r,n=i;return t.id=function(n){return arguments.length?(e=Object(o.b)(n),t):e},t.parentId=function(e){return arguments.length?(n=Object(o.b)(e),t):n},t}},function(t,e,n){"use strict";function r(t,e){return t.parent===e.parent?1:2}function i(t){var e=t.children;return e?e[0]:t.t}function o(t){var e=t.children;return e?e[e.length-1]:t.t}function a(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function s(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)e=i[o],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function u(t,e,n){return t.a.parent===e.parent?t.a:n}function c(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function l(t){for(var e,n,r,i,o,a=new c(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new c(r[i],i)),n.parent=e;return(a.parent=new c(null,0)).children=[a],a}var h=n(78);c.prototype=Object.create(h.a.prototype),e.a=function(){function t(t){var r=l(t);if(r.eachAfter(e),r.parent.m=-r.z,r.eachBefore(n),m)t.eachBefore(h);else{var i=t,o=t,a=t;t.eachBefore(function(t){t.x<i.x&&(i=t),t.x>o.x&&(o=t),t.depth>a.depth&&(a=t)});var s=i===o?1:f(i,o)/2,u=s-i.x,c=d/(o.x+s+u),v=p/(a.depth||1);t.eachBefore(function(t){t.x=(t.x+u)*c,t.y=t.depth*v})}return t}function e(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){s(t);var i=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+f(t._,r._),t.m=t.z-i):t.z=i}else r&&(t.z=r.z+f(t._,r._));t.parent.A=c(t,r,t.parent.A||n[0])}function n(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function c(t,e,n){if(e){for(var r,s=t,c=t,l=e,h=s.parent.children[0],d=s.m,p=c.m,m=l.m,v=h.m;l=o(l),s=i(s),l&&s;)h=i(h),c=o(c),c.a=t,r=l.z+m-s.z-d+f(l._,s._),r>0&&(a(u(l,t,n),t,r),d+=r,p+=r),m+=l.m,d+=s.m,v+=h.m,p+=c.m;l&&!o(c)&&(c.t=l,c.m+=m-p),s&&!i(h)&&(h.t=s,h.m+=d-v,n=t)}return n}function h(t){t.x*=d,t.y=t.depth*p}var f=r,d=1,p=1,m=null;return t.separation=function(e){return arguments.length?(f=e,t):f},t.size=function(e){return arguments.length?(m=!1,d=+e[0],p=+e[1],t):m?null:[d,p]},t.nodeSize=function(e){return arguments.length?(m=!0,d=+e[0],p=+e[1],t):m?[d,p]:null},t}},function(t,e,n){"use strict";var r=n(146),i=n(80),o=n(79),a=n(145);e.a=function(){function t(t){return t.x0=t.y0=0,t.x1=u,t.y1=c,t.eachBefore(e),l=[0],s&&t.eachBefore(r.a),t}function e(t){var e=l[t.depth],r=t.x0+e,i=t.y0+e,o=t.x1-e,a=t.y1-e;o<r&&(r=o=(r+o)/2),a<i&&(i=a=(i+a)/2),t.x0=r,t.y0=i,t.x1=o,t.y1=a,t.children&&(e=l[t.depth+1]=h(t)/2,r+=m(t)-e,i+=f(t)-e,o-=d(t)-e,a-=p(t)-e,o<r&&(r=o=(r+o)/2),a<i&&(i=a=(i+a)/2),n(t,r,i,o,a))}var n=i.a,s=!1,u=1,c=1,l=[0],h=a.a,f=a.a,d=a.a,p=a.a,m=a.a;return t.round=function(e){return arguments.length?(s=!!e,t):s},t.size=function(e){return arguments.length?(u=+e[0],c=+e[1],t):[u,c]},t.tile=function(e){return arguments.length?(n=Object(o.b)(e),t):n},t.padding=function(e){return arguments.length?t.paddingInner(e).paddingOuter(e):t.paddingInner()},t.paddingInner=function(e){return arguments.length?(h="function"==typeof e?e:Object(a.b)(+e),t):h},t.paddingOuter=function(e){return arguments.length?t.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):t.paddingTop()},t.paddingTop=function(e){return arguments.length?(f="function"==typeof e?e:Object(a.b)(+e),t):f},t.paddingRight=function(e){return arguments.length?(d="function"==typeof e?e:Object(a.b)(+e),t):d},t.paddingBottom=function(e){return arguments.length?(p="function"==typeof e?e:Object(a.b)(+e),t):p},t.paddingLeft=function(e){return arguments.length?(m="function"==typeof e?e:Object(a.b)(+e),t):m},t}},function(t,e,n){"use strict";e.a=function(t,e,n,r,i){function o(t,e,n,r,i,a,s){if(t>=e-1){var c=u[t];return c.x0=r,c.y0=i,c.x1=a,c.y1=s,void 0}for(var h=l[t],f=n/2+h,d=t+1,p=e-1;d<p;){var m=d+p>>>1;l[m]<f?d=m+1:p=m}f-l[d-1]<l[d]-f&&t+1<d&&--d;var v=l[d]-h,g=n-v;if(a-r>s-i){var y=(r*g+a*v)/n;o(t,d,v,r,i,y,s),o(d,e,g,y,i,a,s)}else{var b=(i*g+s*v)/n;o(t,d,v,r,i,a,b),o(d,e,g,r,b,a,s)}}var a,s,u=t.children,c=u.length,l=new Array(c+1);for(l[0]=s=a=0;a<c;++a)l[a+1]=s+=u[a].value;o(0,c,t.value,e,n,r,i)}},function(t,e,n){"use strict";var r=n(26),i=n(41);e.a=function(t,e,n,o,a){(1&t.depth?i.a:r.a)(t,e,n,o,a)}},function(t,e,n){"use strict";var r=n(26),i=n(41),o=n(80);e.a=function t(e){function n(t,n,a,s,u){if((c=t._squarify)&&c.ratio===e)for(var c,l,h,f,d,p=-1,m=c.length,v=t.value;++p<m;){for(l=c[p],h=l.children,f=l.value=0,d=h.length;f<d;++f)l.value+=h[f].value;l.dice?Object(r.a)(l,n,a,s,a+=(u-a)*l.value/v):Object(i.a)(l,n,a,n+=(s-n)*l.value/v,u),v-=l.value}else t._squarify=c=Object(o.c)(e,t,n,a,s,u),c.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(o.b)},function(t,e,n){"use strict";var r=n(377);n.d(e,"a",function(){return r.a});var i=n(378);n.d(e,"b",function(){return i.a});var o=n(379);n.d(e,"d",function(){return o.a});var a=n(381);n.d(e,"c",function(){return a.a});var s=n(382);n.d(e,"e",function(){return s.a})},function(t,e,n){"use strict";e.a=function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[1]*i[0]-e[0]*i[1];return o/2}},function(t,e,n){"use strict";e.a=function(t){for(var e,n,r=-1,i=t.length,o=0,a=0,s=t[i-1],u=0;++r<i;)e=s,s=t[r],u+=n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return u*=3,[o/u,a/u]}},function(t,e,n){"use strict";function r(t,e){return t[0]-e[0]||t[1]-e[1]}function i(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&Object(o.a)(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}var o=n(380);e.a=function(t){if((n=t.length)<3)return null;var e,n,o=new Array(n),a=new Array(n);for(e=0;e<n;++e)o[e]=[+t[e][0],+t[e][1],e];for(o.sort(r),e=0;e<n;++e)a[e]=[o[e][0],-o[e][1]];var s=i(o),u=i(a),c=u[0]===s[0],l=u[u.length-1]===s[s.length-1],h=[];for(e=s.length-1;e>=0;--e)h.push(t[o[s[e]][2]]);for(e=+c;e<u.length-l;++e)h.push(t[o[u[e]][2]]);return h}},function(t,e,n){"use strict";e.a=function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}},function(t,e,n){"use strict";e.a=function(t,e){for(var n,r,i=t.length,o=t[i-1],a=e[0],s=e[1],u=o[0],c=o[1],l=!1,h=0;h<i;++h)o=t[h],n=o[0],r=o[1],r>s!=c>s&&a<(u-n)*(s-r)/(c-r)+n&&(l=!l),u=n,c=r;return l}},function(t,e,n){"use strict";e.a=function(t){for(var e,n,r=-1,i=t.length,o=t[i-1],a=o[0],s=o[1],u=0;++r<i;)e=a,n=s,o=t[r],a=o[0],s=o[1],e-=a,n-=s,u+=Math.sqrt(e*e+n*n);return u}},function(t,e,n){"use strict";var r=n(384);n.d(e,"a",function(){return r.a})},function(t,e,n){"use strict";function r(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function i(t){if(!t._start)try{o(t)}catch(e){if(t._tasks[t._ended+t._active-1])s(t,e);else if(!t._data)throw e}}function o(t){for(;t._start=t._waiting&&t._active<t._size;){var e=t._ended+t._active,n=t._tasks[e],r=n.length-1,i=n[r];n[r]=a(t,e),--t._waiting,++t._active,n=i.apply(null,n),t._tasks[e]&&(t._tasks[e]=n||h)}}function a(t,e){return function(n,r){t._tasks[e]&&(--t._active,++t._ended,t._tasks[e]=null,null==t._error&&(null!=n?s(t,n):(t._data[e]=r,t._waiting?i(t):u(t))))}}function s(t,e){var n,r=t._tasks.length;for(t._error=e,t._data=void 0,t._waiting=NaN;--r>=0;)if((n=t._tasks[r])&&(t._tasks[r]=null,n.abort))try{n.abort()}catch(e){}t._active=NaN,u(t)}function u(t){if(!t._active&&t._call){var e=t._data;t._data=void 0,t._call(t._error,e)}}function c(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new r(t)}e.a=c;var l=n(385),h={};r.prototype=c.prototype={constructor:r,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var e=l.a.call(arguments,1);return e.push(t),++this._waiting,this._tasks.push(e),i(this),this},abort:function(){return null==this._error&&s(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(e,n){t.apply(null,[e].concat(n))},u(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,u(this),this}}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=[].slice},function(t,e,n){"use strict";var r=n(387);n.d(e,"f",function(){return r.a});var i=n(147);n.d(e,"e",function(){return i.a});var o=n(388);n.d(e,"d",function(){return o.a});var a=n(389);n.d(e,"a",function(){return a.a});var s=n(148);n.d(e,"c",function(){return s.a});var u=n(390);n.d(e,"b",function(){return u.a})},function(t,e,n){"use strict";var r=n(20);e.a=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(r.a)},function(t,e,n){"use strict";var r=n(20),i=n(147);e.a=function t(e){function n(){var t=i.a.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(r.a)},function(t,e,n){"use strict";var r=n(20),i=n(148);e.a=function t(e){function n(t){var n=i.a.source(e)(t);return function(){return n()/t}}return n.source=t,n}(r.a)},function(t,e,n){"use strict";var r=n(20);e.a=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(r.a)},function(t,e,n){"use strict";var r=n(81);n.d(e,"d",function(){return r.a});var i=n(392);n.d(e,"b",function(){return i.a});var o=n(393);n.d(e,"c",function(){return o.a});var a=n(394);n.d(e,"e",function(){return a.a});var s=n(395);n.d(e,"g",function(){return s.a});var u=n(396);n.d(e,"a",function(){return u.a});var c=n(397);n.d(e,"f",function(){return c.a})},function(t,e,n){"use strict";var r=n(42);e.a=Object(r.a)("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)})},function(t,e,n){"use strict";var r=n(42);e.a=Object(r.a)("application/json",function(t){return JSON.parse(t.responseText)})},function(t,e,n){"use strict";var r=n(42);e.a=Object(r.a)("text/plain",function(t){return t.responseText})},function(t,e,n){"use strict";var r=n(42);e.a=Object(r.a)("application/xml",function(t){var e=t.responseXML;if(!e)throw new Error("parse error");return e})},function(t,e,n){"use strict";var r=n(66),i=n(149);e.a=Object(i.a)("text/csv",r.c)},function(t,e,n){"use strict";var r=n(66),i=n(149);e.a=Object(i.a)("text/tab-separated-values",r.h)},function(t,e,n){"use strict";var r=n(399);n.d(e,"i",function(){return r.a}),n.d(e,"o",function(){return r.b});var i=n(400);n.d(e,"j",function(){return i.a});var o=n(27);n.d(e,"l",function(){return o.a});var a=n(402);n.d(e,"m",function(){return a.a});var s=n(150);n.d(e,"n",function(){return s.a}),n.d(e,"k",function(){return s.b});var u=n(403);n.d(e,"p",function(){return u.a}),n.d(e,"t",function(){return u.b});var c=n(404);n.d(e,"q",function(){return c.a});var l=n(405);n.d(e,"r",function(){return l.a});var h=n(406);n.d(e,"u",function(){return h.a});var f=n(153);n.d(e,"v",function(){return f.b});var d=n(422);n.d(e,"w",function(){return d.a});var p=n(423);n.d(e,"x",function(){return p.a});var m=n(424);n.d(e,"z",function(){return m.a});var v=n(425);n.d(e,"A",function(){return v.a});var g=n(426);n.d(e,"y",function(){return g.a});var y=n(427);n.d(e,"b",function(){return y.a});var b=n(428);n.d(e,"f",function(){return b.b}),n.d(e,"h",function(){return b.c}),n.d(e,"a",function(){return b.a});var _=n(429);n.d(e,"g",function(){return _.a}),n.d(e,"d",function(){return _.c}),n.d(e,"c",function(){return _.b}),n.d(e,"e",function(){return _.d});var x=n(430);n.d(e,"s",function(){return x.a})},function(t,e,n){"use strict";function r(){function t(){var t=o().length,r=c[1]<c[0],i=c[r-0],s=c[1-r];e=(s-i)/Math.max(1,t-h+2*f),l&&(e=Math.floor(e)),i+=(s-i-e*(t-h))*d,n=e*(1-h),l&&(i=Math.round(i),n=Math.round(n));var p=Object(a.s)(t).map(function(t){return i+e*t});return u(r?p.reverse():p)}var e,n,i=Object(s.a)().unknown(void 0),o=i.domain,u=i.range,c=[0,1],l=!1,h=0,f=0,d=.5;return delete i.unknown,i.domain=function(e){return arguments.length?(o(e),t()):o()},i.range=function(e){return arguments.length?(c=[+e[0],+e[1]],t()):c.slice()},i.rangeRound=function(e){return c=[+e[0],+e[1]],l=!0,t()},i.bandwidth=function(){return n},i.step=function(){return e},i.round=function(e){return arguments.length?(l=!!e,t()):l},i.padding=function(e){return arguments.length?(h=f=Math.max(0,Math.min(1,e)),t()):h},i.paddingInner=function(e){return arguments.length?(h=Math.max(0,Math.min(1,e)),t()):h},i.paddingOuter=function(e){return arguments.length?(f=Math.max(0,Math.min(1,e)),t()):f},i.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),t()):d},i.copy=function(){return r().domain(o()).range(c).round(l).paddingInner(h).paddingOuter(f).align(d)},t()}function i(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return i(e())},t}function o(){return i(r().paddingInner(1))}e.a=r,e.b=o;var a=n(3),s=n(150)},function(t,e,n){"use strict";function r(){function t(t){return+t}var e=[0,1];return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=i.a.call(n,a.a),t):e.slice()},t.copy=function(){return r().domain(e)},Object(o.b)(t)}e.a=r;var i=n(15),o=n(27),a=n(151)},function(t,e,n){"use strict";var r=n(3),i=n(71);e.a=function(t,e,n){var o,a=t[0],s=t[t.length-1],u=Object(r.A)(a,s,null==e?10:e);switch(n=Object(i.e)(null==n?",f":n),n.type){case"s":var c=Math.max(Math.abs(a),Math.abs(s));return null!=n.precision||isNaN(o=Object(i.g)(u,c))||(n.precision=o),Object(i.d)(n,c);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(o=Object(i.h)(u,Math.max(Math.abs(a),Math.abs(s))))||(n.precision=o-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(o=Object(i.f)(u))||(n.precision=o-2*("%"===n.type))}return Object(i.a)(n)}},function(t,e,n){"use strict";function r(t,e){return(e=Math.log(e/t))?function(n){return Math.log(n/t)/e}:Object(f.a)(e)}function i(t,e){return t<0?function(n){return-Math.pow(-e,n)*Math.pow(-t,1-n)}:function(n){return Math.pow(e,n)*Math.pow(t,1-n)}}function o(t){return isFinite(t)?+("1e"+t):t<0?0:t}function a(t){return 10===t?o:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}function s(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}function u(t){return function(e){return-t(-e)}}function c(){function t(){return f=s(o),m=a(o),n()[0]<0&&(f=u(f),m=u(m)),e}var e=Object(p.b)(r,i).domain([1,10]),n=e.domain,o=10,f=s(10),m=a(10);return e.base=function(e){return arguments.length?(o=+e,t()):o},e.domain=function(e){return arguments.length?(n(e),t()):n()},e.ticks=function(t){var e,r=n(),i=r[0],a=r[r.length-1];(e=a<i)&&(h=i,i=a,a=h);var s,u,c,h=f(i),d=f(a),p=null==t?10:+t,v=[];if(!(o%1)&&d-h<p){if(h=Math.round(h)-1,d=Math.round(d)+1,i>0){for(;h<d;++h)for(u=1,s=m(h);u<o;++u)if(!((c=s*u)<i)){if(c>a)break;v.push(c)}}else for(;h<d;++h)for(u=o-1,s=m(h);u>=1;--u)if(!((c=s*u)<i)){if(c>a)break;v.push(c)}}else v=Object(l.B)(h,d,Math.min(d-h,p)).map(m);return e?v.reverse():v},e.tickFormat=function(t,n){if(null==n&&(n=10===o?".0e":","),"function"!=typeof n&&(n=Object(h.a)(n)),t===1/0)return n;null==t&&(t=10);var r=Math.max(1,o*t/e.ticks().length);return function(t){var e=t/m(Math.round(f(t)));return e*o<o-.5&&(e*=o),e<=r?n(t):""}},e.nice=function(){return n(Object(d.a)(n(),{floor:function(t){return m(Math.floor(f(t)))},ceil:function(t){return m(Math.ceil(f(t)))}}))},e.copy=function(){return Object(p.a)(e,c().base(o))},e}e.a=c;var l=n(3),h=n(71),f=n(82),d=n(152),p=n(43)},function(t,e,n){"use strict";function r(t,e){return t<0?-Math.pow(-t,e):Math.pow(t,e)}function i(){function t(t,e){return(e=r(e,n)-(t=r(t,n)))?function(i){return(r(i,n)-t)/e}:Object(a.a)(e)}function e(t,e){return e=r(e,n)-(t=r(t,n)),function(i){return r(t+e*i,1/n)}}var n=1,o=Object(u.b)(t,e),c=o.domain;return o.exponent=function(t){return arguments.length?(n=+t,c(c())):n},o.copy=function(){return Object(u.a)(o,i().exponent(n))},Object(s.b)(o)}function o(){return i().exponent(.5)}e.a=i,e.b=o;var a=n(82),s=n(27),u=n(43)},function(t,e,n){"use strict";function r(){function t(){var t=0,r=Math.max(1,a.length);for(s=new Array(r-1);++t<r;)s[t-1]=Object(i.r)(n,t/r);return e}function e(t){if(!isNaN(t=+t))return a[Object(i.b)(s,t)]}var n=[],a=[],s=[];return e.invertExtent=function(t){var e=a.indexOf(t);return e<0?[NaN,NaN]:[e>0?s[e-1]:n[0],e<s.length?s[e]:n[n.length-1]]},e.domain=function(e){if(!arguments.length)return n.slice();n=[];for(var r,o=0,a=e.length;o<a;++o)null==(r=e[o])||isNaN(r=+r)||n.push(r);return n.sort(i.a),t()},e.range=function(e){return arguments.length?(a=o.b.call(e),t()):a.slice()},e.quantiles=function(){return s.slice()},e.copy=function(){return r().domain(n).range(a)},e}e.a=r;var i=n(3),o=n(15)},function(t,e,n){"use strict";function r(){function t(t){if(t<=t)return l[Object(i.b)(c,t,0,u)]}function e(){var e=-1;for(c=new Array(u);++e<u;)c[e]=((e+1)*s-(e-u)*n)/(u+1);return t}var n=0,s=1,u=1,c=[.5],l=[0,1];return t.domain=function(t){return arguments.length?(n=+t[0],s=+t[1],e()):[n,s]},t.range=function(t){return arguments.length?(u=(l=o.b.call(t)).length-1,e()):l.slice()},t.invertExtent=function(t){var e=l.indexOf(t);return e<0?[NaN,NaN]:e<1?[n,c[0]]:e>=u?[c[u-1],s]:[c[e-1],c[e]]},t.copy=function(){return r().domain([n,s]).range(l)},Object(a.b)(t)}e.a=r;var i=n(3),o=n(15),a=n(27)},function(t,e,n){"use strict";function r(){function t(t){if(t<=t)return n[Object(i.b)(e,t,0,a)]}var e=[.5],n=[0,1],a=1;return t.domain=function(r){return arguments.length?(e=o.b.call(r),a=Math.min(e.length,n.length-1),t):e.slice()},t.range=function(r){return arguments.length?(n=o.b.call(r),a=Math.min(e.length,n.length-1),t):n.slice()},t.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},t.copy=function(){return r().domain(e).range(n)},t}e.a=r;var i=n(3),o=n(15)},function(t,e,n){"use strict";n.d(e,"b",function(){return o});var r=n(2),i=Object(r.a)(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Object(r.a)(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):i:null},e.a=i;var o=i.range},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var r=n(2),i=n(9),o=Object(r.a)(function(t){t.setTime(Math.floor(t/i.d)*i.d)},function(t,e){t.setTime(+t+e*i.d)},function(t,e){return(e-t)/i.d},function(t){return t.getUTCSeconds()});e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var r=n(2),i=n(9),o=Object(r.a)(function(t){t.setTime(Math.floor(t/i.c)*i.c)},function(t,e){t.setTime(+t+e*i.c)},function(t,e){return(e-t)/i.c},function(t){return t.getMinutes()});e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var r=n(2),i=n(9),o=Object(r.a)(function(t){var e=t.getTimezoneOffset()*i.c%i.b;e<0&&(e+=i.b),t.setTime(Math.floor((+t-e)/i.b)*i.b+e)},function(t,e){t.setTime(+t+e*i.b)},function(t,e){return(e-t)/i.b},function(t){return t.getHours()});e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(2),i=n(9),o=Object(r.a)(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.c)/i.a},function(t){return t.getDate()-1});e.b=o;var a=o.range},function(t,e,n){"use strict";function r(t){return Object(i.a)(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*o.c)/o.e})}n.d(e,"g",function(){return a}),n.d(e,"c",function(){return s}),n.d(e,"k",function(){return u}),n.d(e,"m",function(){return c}),n.d(e,"i",function(){return l}),n.d(e,"a",function(){return h}),n.d(e,"e",function(){return f}),n.d(e,"h",function(){return d}),n.d(e,"d",function(){return p}),n.d(e,"l",function(){return m}),n.d(e,"n",function(){return v}),n.d(e,"j",function(){return g}),n.d(e,"b",function(){return y}),n.d(e,"f",function(){return b});var i=n(2),o=n(9),a=r(0),s=r(1),u=r(2),c=r(3),l=r(4),h=r(5),f=r(6),d=a.range,p=s.range,m=u.range,v=c.range,g=l.range,y=h.range,b=f.range},function(t,e,n){"use strict";n.d(e,"b",function(){return o});var r=n(2),i=Object(r.a)(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()});e.a=i;var o=i.range},function(t,e,n){"use strict";n.d(e,"b",function(){return o});var r=n(2),i=Object(r.a)(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null},e.a=i;var o=i.range},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var r=n(2),i=n(9),o=Object(r.a)(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*i.c)},function(t,e){return(e-t)/i.c},function(t){return t.getUTCMinutes()});e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var r=n(2),i=n(9),o=Object(r.a)(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*i.b)},function(t,e){return(e-t)/i.b},function(t){return t.getUTCHours()});e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",function(){return a});var r=n(2),i=n(9),o=Object(r.a)(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/i.a},function(t){return t.getUTCDate()-1});e.a=o;var a=o.range},function(t,e,n){"use strict";function r(t){return Object(i.a)(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/o.e})}n.d(e,"g",function(){return a}),n.d(e,"c",function(){return s}),n.d(e,"k",function(){return u}),n.d(e,"m",function(){return c}),n.d(e,"i",function(){return l}),n.d(e,"a",function(){return h}),n.d(e,"e",function(){return f}),n.d(e,"h",function(){return d}),n.d(e,"d",function(){return p}),n.d(e,"l",function(){return m}),n.d(e,"n",function(){return v}),n.d(e,"j",function(){return g}),n.d(e,"b",function(){return y}),n.d(e,"f",function(){return b});var i=n(2),o=n(9),a=r(0),s=r(1),u=r(2),c=r(3),l=r(4),h=r(5),f=r(6),d=a.range,p=s.range,m=u.range,v=c.range,g=l.range,y=h.range,b=f.range},function(t,e,n){"use strict";n.d(e,"b",function(){return o});var r=n(2),i=Object(r.a)(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()});e.a=i;var o=i.range},function(t,e,n){"use strict";n.d(e,"b",function(){return o});var r=n(2),i=Object(r.a)(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null},e.a=i;var o=i.range},function(t,e,n){"use strict";function r(t){var e=new Date(t);return isNaN(e)?null:e}var i=n(155),o=n(84),a=+new Date("2000-01-01T00:00:00.000Z")?r:Object(o.e)(i.b);e.a=a},function(t,e,n){"use strict";var r=n(153),i=n(83),o=n(44);e.a=function(){return Object(r.a)(o._7,o.R,o._5,o.F,o.J,o.N,o.V,o.L,i.g).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}},function(t,e,n){"use strict";var r=n(28);e.a=Object(r.a)("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")},function(t,e,n){"use strict";var r=n(28);e.a=Object(r.a)("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6")},function(t,e,n){"use strict";var r=n(28);e.a=Object(r.a)("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9")},function(t,e,n){"use strict";var r=n(28);e.a=Object(r.a)("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5")},function(t,e,n){"use strict";var r=n(7),i=n(5);e.a=Object(i.f)(Object(r.b)(300,.5,0),Object(r.b)(-240,.5,1))},function(t,e,n){"use strict";n.d(e,"c",function(){return o}),n.d(e,"a",function(){return a});var r=n(7),i=n(5),o=Object(i.f)(Object(r.b)(-100,.75,.35),Object(r.b)(80,1.5,.8)),a=Object(i.f)(Object(r.b)(260,.75,.35),Object(r.b)(80,1.5,.8)),s=Object(r.b)();e.b=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return s.h=360*t-100,s.s=1.5-1.5*e,s.l=.8-.9*e,s+""}},function(t,e,n){"use strict";function r(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}n.d(e,"c",function(){return o}),n.d(e,"b",function(){return a}),n.d(e,"d",function(){return s});var i=n(28);e.a=r(Object(i.a)("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var o=r(Object(i.a)("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),a=r(Object(i.a)("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),s=r(Object(i.a)("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))},function(t,e,n){"use strict";function r(t){function e(e){var r=(e-n)/(o-n);return t(a?Math.max(0,Math.min(1,r)):r)}var n=0,o=1,a=!1;return e.domain=function(t){return arguments.length?(n=+t[0],o=+t[1],e):[n,o]},e.clamp=function(t){return arguments.length?(a=!!t,e):a},e.interpolator=function(n){return arguments.length?(t=n,e):t},e.copy=function(){return r(t).domain([n,o]).clamp(a)},Object(i.b)(e)}e.a=r;var i=n(27)},function(t,e,n){"use strict";var r=n(432);n.d(e,"a",function(){return r.a});var i=n(156);n.d(e,"b",function(){return i.a});var o=n(85);n.d(e,"v",function(){return o.a});var a=n(433);n.d(e,"A",function(){return a.a});var s=n(436);n.d(e,"c",function(){return s.a}),n.d(e,"C",function(){return s.a});var u=n(158);n.d(e,"w",function(){return u.a}),n.d(e,"D",function(){return u.a});var c=n(159);n.d(e,"B",function(){return c.a});var l=n(437);n.d(e,"x",function(){return l.a}),n.d(e,"z",function(){return l.c}),n.d(e,"y",function(){return l.b});var h=n(438);n.d(e,"P",function(){return h.a}),n.d(e,"X",function(){return h.b});var f=n(161);n.d(e,"Q",function(){return f.a});var d=n(162);n.d(e,"R",function(){return d.a});var p=n(163);n.d(e,"S",function(){return p.a});var m=n(165);n.d(e,"T",function(){return m.a});var v=n(164);n.d(e,"U",function(){return v.a});var g=n(166);n.d(e,"V",function(){return g.a});var y=n(167);n.d(e,"W",function(){return y.a});var b=n(439);n.d(e,"e",function(){return b.a});var _=n(440);n.d(e,"f",function(){return _.a});var x=n(47);n.d(e,"d",function(){return x.b});var w=n(441);n.d(e,"g",function(){return w.a});var M=n(168);n.d(e,"i",function(){return M.b});var E=n(169);n.d(e,"j",function(){return E.b});var T=n(48);n.d(e,"h",function(){return T.b});var S=n(442);n.d(e,"l",function(){return S.a});var A=n(443);n.d(e,"m",function(){return A.a});var O=n(87);n.d(e,"k",function(){return O.a});var C=n(444);n.d(e,"o",function(){return C.a});var R=n(45);n.d(e,"n",function(){return R.a});var L=n(445);n.d(e,"p",function(){return L.a}),n.d(e,"q",function(){return L.b});var j=n(446);n.d(e,"r",function(){return j.a});var P=n(447);n.d(e,"s",function(){return P.a}),n.d(e,"t",function(){return P.b}),n.d(e,"u",function(){return P.c});var N=n(448);n.d(e,"E",function(){return N.a});var I=n(449);n.d(e,"G",function(){return I.a});var U=n(450);n.d(e,"F",function(){return U.a});var D=n(30);n.d(e,"H",function(){return D.a});var k=n(451);n.d(e,"I",function(){return k.a});var F=n(452);n.d(e,"J",function(){return F.a});var B=n(88);n.d(e,"K",function(){return B.a});var z=n(453);n.d(e,"L",function(){return z.a});var G=n(454);n.d(e,"M",function(){return G.a});var H=n(31);n.d(e,"N",function(){return H.a});var V=n(455);n.d(e,"O",function(){return V.a})},function(t,e,n){"use strict";function r(t){return t.innerRadius}function i(t){return t.outerRadius}function o(t){return t.startAngle}function a(t){return t.endAngle}function s(t){return t&&t.padAngle}function u(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=(l*(e-o)-h*(t-i))/(h*u-l*c);return[t+f*u,e+f*c]}function c(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/Object(f.l)(s*s+u*u),l=c*u,h=-c*s,d=t+l,p=e+h,m=n+l,v=r+h,g=(d+m)/2,y=(p+v)/2,b=m-d,_=v-p,x=b*b+_*_,w=i-o,M=d*v-m*p,E=(_<0?-1:1)*Object(f.l)(Object(f.h)(0,w*w*x-M*M)),T=(M*_-b*E)/x,S=(-M*b-_*E)/x,A=(M*_+b*E)/x,O=(-M*b+_*E)/x,C=T-g,R=S-y,L=A-g,j=O-y;return C*C+R*R>L*L+j*j&&(T=A,S=O),{cx:T,cy:S,x01:-l,y01:-h,x11:T*(i/w-1),y11:S*(i/w-1)}}var l=n(13),h=n(16),f=n(29);e.a=function(){function t(){var t,r,i=+e.apply(this,arguments),o=+n.apply(this,arguments),a=m.apply(this,arguments)-f.g,s=v.apply(this,arguments)-f.g,h=Object(f.a)(s-a),b=s>a;if(y||(y=t=Object(l.a)()),o<i&&(r=o,o=i,i=r),o>f.f)if(h>f.m-f.f)y.moveTo(o*Object(f.e)(a),o*Object(f.k)(a)),y.arc(0,0,o,a,s,!b),i>f.f&&(y.moveTo(i*Object(f.e)(s),i*Object(f.k)(s)),y.arc(0,0,i,s,a,b));else{var _,x,w=a,M=s,E=a,T=s,S=h,A=h,O=g.apply(this,arguments)/2,C=O>f.f&&(p?+p.apply(this,arguments):Object(f.l)(i*i+o*o)),R=Object(f.i)(Object(f.a)(o-i)/2,+d.apply(this,arguments)),L=R,j=R;if(C>f.f){var P=Object(f.c)(C/i*Object(f.k)(O)),N=Object(f.c)(C/o*Object(f.k)(O));(S-=2*P)>f.f?(P*=b?1:-1,E+=P,T-=P):(S=0,E=T=(a+s)/2),(A-=2*N)>f.f?(N*=b?1:-1,w+=N,M-=N):(A=0,w=M=(a+s)/2)}var I=o*Object(f.e)(w),U=o*Object(f.k)(w),D=i*Object(f.e)(T),k=i*Object(f.k)(T);if(R>f.f){var F=o*Object(f.e)(M),B=o*Object(f.k)(M),z=i*Object(f.e)(E),G=i*Object(f.k)(E);if(h<f.j){var H=S>f.f?u(I,U,z,G,F,B,D,k):[D,k],V=I-H[0],W=U-H[1],X=F-H[0],q=B-H[1],Y=1/Object(f.k)(Object(f.b)((V*X+W*q)/(Object(f.l)(V*V+W*W)*Object(f.l)(X*X+q*q)))/2),Z=Object(f.l)(H[0]*H[0]+H[1]*H[1]);L=Object(f.i)(R,(i-Z)/(Y-1)),j=Object(f.i)(R,(o-Z)/(Y+1))}}A>f.f?j>f.f?(_=c(z,G,I,U,o,j,b),x=c(F,B,D,k,o,j,b),y.moveTo(_.cx+_.x01,_.cy+_.y01),j<R?y.arc(_.cx,_.cy,j,Object(f.d)(_.y01,_.x01),Object(f.d)(x.y01,x.x01),!b):(y.arc(_.cx,_.cy,j,Object(f.d)(_.y01,_.x01),Object(f.d)(_.y11,_.x11),!b),y.arc(0,0,o,Object(f.d)(_.cy+_.y11,_.cx+_.x11),Object(f.d)(x.cy+x.y11,x.cx+x.x11),!b),y.arc(x.cx,x.cy,j,Object(f.d)(x.y11,x.x11),Object(f.d)(x.y01,x.x01),!b))):(y.moveTo(I,U),y.arc(0,0,o,w,M,!b)):y.moveTo(I,U),i>f.f&&S>f.f?L>f.f?(_=c(D,k,F,B,i,-L,b),x=c(I,U,z,G,i,-L,b),y.lineTo(_.cx+_.x01,_.cy+_.y01),L<R?y.arc(_.cx,_.cy,L,Object(f.d)(_.y01,_.x01),Object(f.d)(x.y01,x.x01),!b):(y.arc(_.cx,_.cy,L,Object(f.d)(_.y01,_.x01),Object(f.d)(_.y11,_.x11),!b),y.arc(0,0,i,Object(f.d)(_.cy+_.y11,_.cx+_.x11),Object(f.d)(x.cy+x.y11,x.cx+x.x11),b),y.arc(x.cx,x.cy,L,Object(f.d)(x.y11,x.x11),Object(f.d)(x.y01,x.x01),!b))):y.arc(0,0,i,T,E,b):y.lineTo(D,k)}else y.moveTo(0,0);if(y.closePath(),t)return y=null,t+""||null}var e=r,n=i,d=Object(h.a)(0),p=null,m=o,v=a,g=s,y=null;return t.centroid=function(){var t=(+e.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+m.apply(this,arguments)+ +v.apply(this,arguments))/2-f.j/2;return[Object(f.e)(r)*t,Object(f.k)(r)*t]},t.innerRadius=function(n){return arguments.length?(e="function"==typeof n?n:Object(h.a)(+n),t):e},t.outerRadius=function(e){return arguments.length?(n="function"==typeof e?e:Object(h.a)(+e),t):n},t.cornerRadius=function(e){return arguments.length?(d="function"==typeof e?e:Object(h.a)(+e),t):d},t.padRadius=function(e){return arguments.length?(p=null==e?null:"function"==typeof e?e:Object(h.a)(+e),t):p},t.startAngle=function(e){return arguments.length?(m="function"==typeof e?e:Object(h.a)(+e),t):m},t.endAngle=function(e){return arguments.length?(v="function"==typeof e?e:Object(h.a)(+e),t):v},t.padAngle=function(e){return arguments.length?(g="function"==typeof e?e:Object(h.a)(+e),t):g},t.context=function(e){return arguments.length?(y=null==e?null:e,t):y},t}},function(t,e,n){"use strict";var r=n(16),i=n(434),o=n(435),a=n(29);e.a=function(){function t(t){var r,i,o,h,f,d=t.length,p=0,m=new Array(d),v=new Array(d),g=+u.apply(this,arguments),y=Math.min(a.m,Math.max(-a.m,c.apply(this,arguments)-g)),b=Math.min(Math.abs(y)/d,l.apply(this,arguments)),_=b*(y<0?-1:1);for(r=0;r<d;++r)(f=v[m[r]=r]=+e(t[r],r,t))>0&&(p+=f);for(null!=n?m.sort(function(t,e){return n(v[t],v[e])}):null!=s&&m.sort(function(e,n){return s(t[e],t[n])}),r=0,o=p?(y-d*_)/p:0;r<d;++r,g=h)i=m[r],f=v[i],h=g+(f>0?f*o:0)+_,v[i]={data:t[i],index:r,value:f,startAngle:g,endAngle:h,padAngle:b};return v}var e=o.a,n=i.a,s=null,u=Object(r.a)(0),c=Object(r.a)(a.m),l=Object(r.a)(0);return t.value=function(n){return arguments.length?(e="function"==typeof n?n:Object(r.a)(+n),t):e},t.sortValues=function(e){return arguments.length?(n=e,s=null,t):n},t.sort=function(e){return arguments.length?(s=e,n=null,t):s},t.startAngle=function(e){return arguments.length?(u="function"==typeof e?e:Object(r.a)(+e),t):u},t.endAngle=function(e){return arguments.length?(c="function"==typeof e?e:Object(r.a)(+e),t):c},t.padAngle=function(e){return arguments.length?(l="function"==typeof e?e:Object(r.a)(+e),t):l},t}},function(t,e,n){"use strict";e.a=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}},function(t,e,n){"use strict";e.a=function(t){return t}},function(t,e,n){"use strict";var r=n(157),i=n(156),o=n(158);e.a=function(){var t=Object(i.a)().curve(r.a),e=t.curve,n=t.lineX0,a=t.lineX1,s=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Object(o.b)(n())},delete t.lineX0,t.lineEndAngle=function(){return Object(o.b)(a())},delete t.lineX1,t.lineInnerRadius=function(){return Object(o.b)(s())},delete t.lineY0,t.lineOuterRadius=function(){return Object(o.b)(u())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Object(r.b)(t)):e()._curve},t}},function(t,e,n){"use strict";function r(t){return t.source}function i(t){return t.target}function o(t){function e(){var e,r=d.a.call(arguments),i=n.apply(this,r),c=o.apply(this,r);if(u||(u=e=Object(f.a)()),t(u,+a.apply(this,(r[0]=i,r)),+s.apply(this,r),+a.apply(this,(r[0]=c,r)),+s.apply(this,r)),e)return u=null,e+""||null}var n=r,o=i,a=m.a,s=m.b,u=null;return e.source=function(t){return arguments.length?(n=t,e):n},e.target=function(t){return arguments.length?(o=t,e):o},e.x=function(t){return arguments.length?(a="function"==typeof t?t:Object(p.a)(+t),e):a},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Object(p.a)(+t),e):s},e.context=function(t){return arguments.length?(u=null==t?null:t,e):u},e}function a(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function s(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function u(t,e,n,r,i){var o=Object(v.a)(e,n),a=Object(v.a)(e,n=(n+i)/2),s=Object(v.a)(r,n),u=Object(v.a)(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],s[0],s[1],u[0],u[1])}function c(){return o(a)}function l(){return o(s)}function h(){var t=o(u);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}e.a=c,e.c=l,e.b=h;var f=n(13),d=n(160),p=n(16),m=n(86),v=n(159)},function(t,e,n){"use strict";n.d(e,"b",function(){return f});var r=n(13),i=n(161),o=n(162),a=n(163),s=n(164),u=n(165),c=n(166),l=n(167),h=n(16),f=[i.a,o.a,a.a,u.a,s.a,c.a,l.a];e.a=function(){function t(){var t;if(o||(o=t=Object(r.a)()),e.apply(this,arguments).draw(o,+n.apply(this,arguments)),t)return o=null,t+""||null}var e=Object(h.a)(i.a),n=Object(h.a)(64),o=null;return t.type=function(n){return arguments.length?(e="function"==typeof n?n:Object(h.a)(n),t):e},t.size=function(e){return arguments.length?(n="function"==typeof e?e:Object(h.a)(+e),t):n},t.context=function(e){return arguments.length?(o=null==e?null:e,t):o},t}},function(t,e,n){"use strict";function r(t){this._context=t}var i=n(46),o=n(47);r.prototype={areaStart:i.a,areaEnd:i.a,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Object(o.c)(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},e.a=function(t){return new r(t)}},function(t,e,n){"use strict";function r(t){this._context=t}var i=n(47);r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Object(i.c)(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},e.a=function(t){return new r(t)}},function(t,e,n){"use strict";function r(t,e){this._basis=new i.a(t),this._beta=e}var i=n(47);r.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}},e.a=function t(e){function n(t){return 1===e?new i.a(t):new r(t,e)}return n.beta=function(e){return t(+e)},n}(.85)},function(t,e,n){"use strict";function r(t,e){this._context=t,this._alpha=e}var i=n(168),o=n(46),a=n(87);r.prototype={areaStart:o.a,areaEnd:o.a,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Object(a.b)(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new r(t,e):new i.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";function r(t,e){this._context=t,this._alpha=e}var i=n(169),o=n(87);r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Object(o.b)(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.a=function t(e){function n(t){return e?new r(t,e):new i.a(t,0)}return n.alpha=function(e){return t(+e)},n}(.5)},function(t,e,n){"use strict";function r(t){this._context=t}var i=n(46);r.prototype={areaStart:i.a,areaEnd:i.a,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},e.a=function(t){return new r(t)}},function(t,e,n){"use strict";function r(t){return t<0?-1:1}function i(t,e,n){var i=t._x1-t._x0,o=e-t._x1,a=(t._y1-t._y0)/(i||o<0&&-0),s=(n-t._y1)/(o||i<0&&-0),u=(a*o+s*i)/(i+o);return(r(a)+r(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}function o(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function a(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function s(t){this._context=t}function u(t){this._context=new c(t)}function c(t){this._context=t}function l(t){return new s(t)}function h(t){return new u(t)}e.a=l,e.b=h,s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:a(this,this._t0,o(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,t!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,a(this,o(this,n=i(this,t,e)),n);break;default:a(this,this._t0,n=i(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(u.prototype=Object.create(s.prototype)).point=function(t,e){s.prototype.point.call(this,e,t)},c.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}}},function(t,e,n){"use strict";function r(t){this._context=t}function i(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=i(t),o=i(e),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(r[0][a],o[0][a],r[1][a],o[1][a],t[s],e[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},e.a=function(t){return new r(t)}},function(t,e,n){"use strict";function r(t,e){this._context=t,this._t=e}function i(t){return new r(t,0)}function o(t){return new r(t,1)}e.c=i,e.b=o,r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},e.a=function(t){return new r(t,.5)}},function(t,e,n){"use strict";function r(t,e){return t[e]}var i=n(160),o=n(16),a=n(30),s=n(31);e.a=function(){function t(t){var r,i,o=e.apply(this,arguments),a=t.length,s=o.length,l=new Array(s);for(r=0;r<s;++r){for(var h,f=o[r],d=l[r]=new Array(a),p=0;p<a;++p)d[p]=h=[0,+c(t[p],f,p,t)],h.data=t[p];d.key=f}for(r=0,i=n(l);r<s;++r)l[i[r]].index=r;return u(l,i),l}var e=Object(o.a)([]),n=s.a,u=a.a,c=r;return t.keys=function(n){return arguments.length?(e="function"==typeof n?n:Object(o.a)(i.a.call(n)),t):e},t.value=function(e){return arguments.length?(c="function"==typeof e?e:Object(o.a)(+e),t):c},t.order=function(e){return arguments.length?(n=null==e?s.a:"function"==typeof e?e:Object(o.a)(i.a.call(e)),t):n},t.offset=function(e){return arguments.length?(u=null==e?a.a:e,t):u},t}},function(t,e,n){"use strict";var r=n(30);e.a=function(t,e){if((i=t.length)>0){for(var n,i,o,a=0,s=t[0].length;a<s;++a){for(o=n=0;n<i;++n)o+=t[n][a][1]||0;if(o)for(n=0;n<i;++n)t[n][a][1]/=o}Object(r.a)(t,e)}}},function(t,e,n){"use strict";e.a=function(t,e){if((s=t.length)>1)for(var n,r,i,o,a,s,u=0,c=t[e[0]].length;u<c;++u)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][u])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o}},function(t,e,n){"use strict";var r=n(30);e.a=function(t,e){if((n=t.length)>0){for(var n,i=0,o=t[e[0]],a=o.length;i<a;++i){for(var s=0,u=0;s<n;++s)u+=t[s][i][1]||0;o[i][1]+=o[i][0]=-u/2}Object(r.a)(t,e)}}},function(t,e,n){"use strict";var r=n(30);e.a=function(t,e){if((o=t.length)>0&&(i=(n=t[e[0]]).length)>0){for(var n,i,o,a=0,s=1;s<i;++s){for(var u=0,c=0,l=0;u<o;++u){for(var h=t[e[u]],f=h[s][1]||0,d=h[s-1][1]||0,p=(f-d)/2,m=0;m<u;++m){var v=t[e[m]];p+=(v[s][1]||0)-(v[s-1][1]||0)}c+=f,l+=p*f}n[s-1][1]+=n[s-1][0]=a,c&&(a-=l/c)}n[s-1][1]+=n[s-1][0]=a,Object(r.a)(t,e)}}},function(t,e,n){"use strict";var r=n(88);e.a=function(t){return Object(r.a)(t).reverse()}},function(t,e,n){"use strict";var r=n(31),i=n(88);e.a=function(t){var e,n,o=t.length,a=t.map(i.b),s=Object(r.a)(t).sort(function(t,e){return a[e]-a[t]}),u=0,c=0,l=[],h=[];for(e=0;e<o;++e)n=s[e],u<c?(u+=a[n],l.push(n)):(c+=a[n],h.push(n));return h.reverse().concat(l)}},function(t,e,n){"use strict";var r=n(31);e.a=function(t){return Object(r.a)(t).reverse()}},function(t,e,n){"use strict";var r=n(457);n.d(e,"a",function(){return r.a})},function(t,e,n){"use strict";var r=n(458),i=n(459),o=n(32);e.a=function(){function t(t){return new o.d(t.map(function(r,i){var a=[Math.round(e(r,i,t)/o.f)*o.f,Math.round(n(r,i,t)/o.f)*o.f];return a.index=i,a.data=r,a}),a)}var e=i.a,n=i.b,a=null;return t.polygons=function(e){return t(e).polygons()},t.links=function(e){return t(e).links()},t.triangles=function(e){return t(e).triangles()},t.x=function(n){return arguments.length?(e="function"==typeof n?n:Object(r.a)(+n),t):e},t.y=function(e){return arguments.length?(n="function"==typeof e?e:Object(r.a)(+e),t):n},t.extent=function(e){return arguments.length?(a=null==e?null:[[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]],t):a&&[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},t.size=function(e){return arguments.length?(a=null==e?null:[[0,0],[+e[0],+e[1]]],t):a&&[a[1][0]-a[0][0],a[1][1]-a[0][1]]},t}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";function r(t){return t[0]}function i(t){return t[1]}e.a=r,e.b=i},function(t,e,n){"use strict";function r(){Object(l.a)(this),this.edge=this.site=this.circle=null}function i(t){var e=m.pop()||new r;return e.site=t,e}function o(t){Object(f.b)(t),p.a.remove(t),m.push(t),Object(l.a)(t)}function a(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,s=t.N,u=[t];o(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<p.f&&Math.abs(r-c.circle.cy)<p.f;)a=c.P,u.unshift(c),o(c),c=a;u.unshift(c),Object(f.b)(c);for(var l=s;l.circle&&Math.abs(n-l.circle.x)<p.f&&Math.abs(r-l.circle.cy)<p.f;)s=l.N,u.push(l),o(l),l=s;u.push(l),Object(f.b)(l);var h,m=u.length;for(h=1;h<m;++h)l=u[h],c=u[h-1],Object(d.d)(l.edge,c.site,l.site,i);c=u[0],l=u[m-1],l.edge=Object(d.c)(c.site,l.site,null,i),Object(f.a)(c),Object(f.a)(l)}function s(t){for(var e,n,r,o,a=t[0],s=t[1],l=p.a._;l;)if((r=u(l,s)-a)>p.f)l=l.L;else{if(!((o=a-c(l,s))>p.f)){r>-p.f?(e=l.P,n=l):o>-p.f?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}Object(h.c)(t);var m=i(t);if(p.a.insert(e,m),e||n){if(e===n)return Object(f.b)(e),n=i(e.site),p.a.insert(m,n),m.edge=n.edge=Object(d.c)(e.site,m.site),Object(f.a)(e),void Object(f.a)(n);if(!n)return void(m.edge=Object(d.c)(e.site,m.site));Object(f.b)(e),Object(f.b)(n);var v=e.site,g=v[0],y=v[1],b=t[0]-g,_=t[1]-y,x=n.site,w=x[0]-g,M=x[1]-y,E=2*(b*M-_*w),T=b*b+_*_,S=w*w+M*M,A=[(M*T-_*S)/E+g,(b*S-w*T)/E+y];Object(d.d)(n.edge,v,x,A),m.edge=Object(d.c)(v,t,null,A),n.edge=Object(d.c)(t,x,null,A),Object(f.a)(e),Object(f.a)(n)}}function u(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;n=a.site;var s=n[0],u=n[1],c=u-e;if(!c)return s;var l=s-r,h=1/o-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-u+c/2+i-o/2)))/h+r:(r+s)/2}function c(t,e){var n=t.N;if(n)return u(n,e);var r=t.site;return r[1]===e?r[0]:1/0}e.b=a,e.a=s;var l=n(89),h=n(170),f=n(171),d=n(90),p=n(32),m=[]},function(t,e,n){"use strict";var r=n(462);n.d(e,"a",function(){return r.a});var i=n(172);n.d(e,"c",function(){return i.b}),n.d(e,"b",function(){return i.c})},function(t,e,n){"use strict";function r(){return!f.d.button}function i(){var t,e,n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,t=n.width.baseVal.value,e=n.height.baseVal.value):(t=n.clientWidth,e=n.clientHeight),[[0,0],[t,e]]}function o(){return this.__zoom||v.c}function a(){return-f.d.deltaY*(f.d.deltaMode?120:1)/500}function s(){return"ontouchstart"in this}function u(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var c=n(12),l=n(51),h=n(5),f=n(1),d=n(63),p=n(463),m=n(464),v=n(172),g=n(465);e.a=function(){function t(t){t.property("__zoom",o).on("wheel.zoom",w).on("mousedown.zoom",M).on("dblclick.zoom",E).filter(N).on("touchstart.zoom",T).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(t,e){return e=Math.max(I[0],Math.min(I[1],e)),e===t.k?t:new v.a(e,t.x,t.y)}function n(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new v.a(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function b(t,e,n){t.on("start.zoom",function(){_(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).end()}).tween("zoom",function(){var t=this,r=arguments,i=_(t,r),o=L.apply(t,r),a=n||y(o),s=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,c="function"==typeof e?e.apply(t,r):e,l=k(u.invert(a).concat(s/u.k),c.invert(a).concat(s/c.k));return function(t){if(1===t)t=c;else{var e=l(t),n=s/e[2];t=new v.a(n,a[0]-e[0]*n,a[1]-e[1]*n)}i.zoom(null,t)}})}function _(t,e){for(var n,r=0,i=F.length;r<i;++r)if((n=F[r]).that===t)return n;return new x(t,e)}function x(t,e){this.that=t,this.args=e,this.index=-1,this.active=0,this.extent=L.apply(t,e)}function w(){function t(){r.wheel=null,r.end()}if(R.apply(this,arguments)){var r=_(this,arguments),i=this.__zoom,o=Math.max(I[0],Math.min(I[1],i.k*Math.pow(2,P.apply(this,arguments)))),a=Object(f.g)(this);if(r.wheel)r.mouse[0][0]===a[0]&&r.mouse[0][1]===a[1]||(r.mouse[1]=i.invert(r.mouse[0]=a)),clearTimeout(r.wheel);else{if(i.k===o)return;r.mouse=[a,i.invert(a)],Object(d.b)(this),r.start()}Object(g.a)(),r.wheel=setTimeout(t,G),r.zoom("mouse",j(n(e(i,o),r.mouse[0],r.mouse[1]),r.extent,U))}}function M(){function t(){if(Object(g.a)(),!r.moved){var t=f.d.clientX-a,e=f.d.clientY-s;r.moved=t*t+e*e>H}r.zoom("mouse",j(n(r.that.__zoom,r.mouse[0]=Object(f.g)(r.that),r.mouse[1]),r.extent,U))}function e(){i.on("mousemove.zoom mouseup.zoom",null),Object(l.c)(f.d.view,r.moved),Object(g.a)(),r.end()}if(!C&&R.apply(this,arguments)){var r=_(this,arguments),i=Object(f.j)(f.d.view).on("mousemove.zoom",t,!0).on("mouseup.zoom",e,!0),o=Object(f.g)(this),a=f.d.clientX,s=f.d.clientY;Object(l.b)(f.d.view),Object(g.b)(),r.mouse=[o,this.__zoom.invert(o)],Object(d.b)(this),r.start()}}function E(){if(R.apply(this,arguments)){var r=this.__zoom,i=Object(f.g)(this),o=r.invert(i),a=r.k*(f.d.shiftKey?.5:2),s=j(n(e(r,a),i,o),L.apply(this,arguments),U);Object(g.a)(),D>0?Object(f.j)(this).transition().duration(D).call(b,s,i):Object(f.j)(this).call(t.transform,s)}}function T(){if(R.apply(this,arguments)){var t,e,n,r,i=_(this,arguments),o=f.d.changedTouches,a=o.length;for(Object(g.b)(),e=0;e<a;++e)n=o[e],r=Object(f.p)(this,o,n.identifier),r=[r,this.__zoom.invert(r),n.identifier],i.touch0?i.touch1||(i.touch1=r):(i.touch0=r,t=!0);if(O&&(O=clearTimeout(O),!i.touch1))return i.end(),void((r=Object(f.j)(this).on("dblclick.zoom"))&&r.apply(this,arguments));t&&(O=setTimeout(function(){O=null},z),Object(d.b)(this),i.start())}}function S(){var t,r,i,o,a=_(this,arguments),s=f.d.changedTouches,u=s.length;for(Object(g.a)(),O&&(O=clearTimeout(O)),t=0;t<u;++t)r=s[t],i=Object(f.p)(this,s,r.identifier),a.touch0&&a.touch0[2]===r.identifier?a.touch0[0]=i:a.touch1&&a.touch1[2]===r.identifier&&(a.touch1[0]=i);if(r=a.that.__zoom,a.touch1){var c=a.touch0[0],l=a.touch0[1],h=a.touch1[0],d=a.touch1[1],p=(p=h[0]-c[0])*p+(p=h[1]-c[1])*p,m=(m=d[0]-l[0])*m+(m=d[1]-l[1])*m;r=e(r,Math.sqrt(p/m)),i=[(c[0]+h[0])/2,(c[1]+h[1])/2],o=[(l[0]+d[0])/2,(l[1]+d[1])/2]}else{if(!a.touch0)return;i=a.touch0[0],o=a.touch0[1]}a.zoom("touch",j(n(r,i,o),a.extent,U))}function A(){var t,e,n=_(this,arguments),r=f.d.changedTouches,i=r.length;for(Object(g.b)(),C&&clearTimeout(C),C=setTimeout(function(){C=null},z),t=0;t<i;++t)e=r[t],n.touch0&&n.touch0[2]===e.identifier?delete n.touch0:n.touch1&&n.touch1[2]===e.identifier&&delete n.touch1;n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0?n.touch0[1]=this.__zoom.invert(n.touch0[0]):n.end()}var O,C,R=r,L=i,j=u,P=a,N=s,I=[0,1/0],U=[[-1/0,-1/0],[1/0,1/0]],D=250,k=h.v,F=[],B=Object(c.a)("start","zoom","end"),z=500,G=150,H=0;return t.transform=function(t,e){var n=t.selection?t.selection():t;n.property("__zoom",o),t!==n?b(t,e):n.interrupt().each(function(){_(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},t.scaleBy=function(e,n){t.scaleTo(e,function(){return this.__zoom.k*("function"==typeof n?n.apply(this,arguments):n)})},t.scaleTo=function(r,i){t.transform(r,function(){var t=L.apply(this,arguments),r=this.__zoom,o=y(t),a=r.invert(o),s="function"==typeof i?i.apply(this,arguments):i;return j(n(e(r,s),o,a),t,U)})},t.translateBy=function(e,n,r){t.transform(e,function(){return j(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof r?r.apply(this,arguments):r),L.apply(this,arguments),U)})},t.translateTo=function(e,n,r){t.transform(e,function(){var t=L.apply(this,arguments),e=this.__zoom,i=y(t);return j(v.c.translate(i[0],i[1]).scale(e.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof r?-r.apply(this,arguments):-r),t,U)})},x.prototype={start:function(){return 1==++this.active&&(this.index=F.push(this)-1,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(F.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(e){Object(f.c)(new m.a(t,e,this.that.__zoom),B.apply,B,[e,this.that,this.args])}},t.wheelDelta=function(e){return arguments.length?(P="function"==typeof e?e:Object(p.a)(+e),t):P},t.filter=function(e){return arguments.length?(R="function"==typeof e?e:Object(p.a)(!!e),t):R},t.touchable=function(e){return arguments.length?(N="function"==typeof e?e:Object(p.a)(!!e),t):N},t.extent=function(e){return arguments.length?(L="function"==typeof e?e:Object(p.a)([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),t):L},t.scaleExtent=function(e){return arguments.length?(I[0]=+e[0],I[1]=+e[1],t):[I[0],I[1]]},t.translateExtent=function(e){return arguments.length?(U[0][0]=+e[0][0],U[1][0]=+e[1][0],U[0][1]=+e[0][1],U[1][1]=+e[1][1],t):[[U[0][0],U[0][1]],[U[1][0],U[1][1]]]},t.constrain=function(e){return arguments.length?(j=e,t):j},t.duration=function(e){return arguments.length?(D=+e,t):D},t.interpolate=function(e){return arguments.length?(k=e,t):k},t.on=function(){var e=B.on.apply(B,arguments);return e===B?t:e},t.clickDistance=function(e){return arguments.length?(H=(e=+e)*e,t):Math.sqrt(H)},t}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";function r(t,e,n){this.target=t,this.type=e,this.transform=n}e.a=r},function(t,e,n){"use strict";function r(){i.d.stopImmediatePropagation()}e.b=r;var i=n(1);e.a=function(){i.d.preventDefault(),i.d.stopImmediatePropagation()}},,,,function(t,e,n){n(91),n(470),n(471),n(473),n(49),n(174),t.exports=n(173)},function(t,e,n){"use strict";function r(t,e){var n=t.__state.conversionName.toString(),r=Math.round(t.r),i=Math.round(t.g),o=Math.round(t.b),a=t.a,s=Math.round(t.h),u=t.s.toFixed(1),c=t.v.toFixed(1);if(e||"THREE_CHAR_HEX"===n||"SIX_CHAR_HEX"===n){for(var l=t.hex.toString(16);l.length<6;)l="0"+l;return"#"+l}return"CSS_RGB"===n?"rgb("+r+","+i+","+o+")":"CSS_RGBA"===n?"rgba("+r+","+i+","+o+","+a+")":"HEX"===n?"0x"+t.hex.toString(16):"RGB_ARRAY"===n?"["+r+","+i+","+o+"]":"RGBA_ARRAY"===n?"["+r+","+i+","+o+","+a+"]":"RGB_OBJ"===n?"{r:"+r+",g:"+i+",b:"+o+"}":"RGBA_OBJ"===n?"{r:"+r+",g:"+i+",b:"+o+",a:"+a+"}":"HSV_OBJ"===n?"{h:"+s+",s:"+u+",v:"+c+"}":"HSVA_OBJ"===n?"{h:"+s+",s:"+u+",v:"+c+",a:"+a+"}":"unknown format"}function i(t,e,n){Object.defineProperty(t,e,{get:function(){return"RGB"===this.__state.space?this.__state[e]:(G.recalculateRGB(this,e,n),this.__state[e])},set:function(t){"RGB"!==this.__state.space&&(G.recalculateRGB(this,e,n),this.__state.space="RGB"),this.__state[e]=t}})}function o(t,e){Object.defineProperty(t,e,{get:function(){return"HSV"===this.__state.space?this.__state[e]:(G.recalculateHSV(this),this.__state[e])},set:function(t){"HSV"!==this.__state.space&&(G.recalculateHSV(this),this.__state.space="HSV"),this.__state[e]=t}})}function a(t){if("0"===t||C.isUndefined(t))return 0;var e=t.match(X);return C.isNull(e)?0:parseFloat(e[1])}function s(t){var e=t.toString();return e.indexOf(".")>-1?e.length-e.indexOf(".")-1:0}function u(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function c(t,e,n,r,i){return r+(t-e)/(n-e)*(i-r)}function l(t,e,n,r){t.style.background="",C.each(nt,function(i){t.style.cssText+="background: "+i+"linear-gradient("+e+", "+n+" 0%, "+r+" 100%); "})}function h(t){t.style.background="",t.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",t.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",t.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",t.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",t.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}function f(t){setTimeout(t,1e3/60)}function d(t,e,n){var r=document.createElement("li");return e&&r.appendChild(e),n?t.__ul.insertBefore(r,n):t.__ul.appendChild(r),t.onResize(),r}function p(t,e){var n=t.__preset_select[t.__preset_select.selectedIndex];n.innerHTML=e?n.value+"*":n.value}function m(t,e,n){if(n.__li=e,n.__gui=t,C.extend(n,{options:function(e){if(arguments.length>1){var r=n.__li.nextElementSibling;return n.remove(),g(t,n.object,n.property,{before:r,factoryArgs:[C.toArray(arguments)]})}if(C.isArray(e)||C.isObject(e)){var i=n.__li.nextElementSibling;return n.remove(),g(t,n.object,n.property,{before:i,factoryArgs:[e]})}},name:function(t){return n.__li.firstElementChild.firstElementChild.innerHTML=t,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof $){var r=new K(n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});C.each(["updateDisplay","onChange","onFinishChange","step"],function(t){var e=n[t],i=r[t];n[t]=r[t]=function(){var t=Array.prototype.slice.call(arguments);return i.apply(r,t),e.apply(n,t)}}),q.addClass(e,"has-slider"),n.domElement.insertBefore(r.domElement,n.domElement.firstElementChild)}else if(n instanceof K){var i=function(e){if(C.isNumber(n.__min)&&C.isNumber(n.__max)){var r=n.__li.firstElementChild.firstElementChild.innerHTML,i=n.__gui.__listening.indexOf(n)>-1;n.remove();var o=g(t,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return o.name(r),i&&o.listen(),o}return e};n.min=C.compose(i,n.min),n.max=C.compose(i,n.max)}else n instanceof Y?(q.bind(e,"click",function(){q.fakeEvent(n.__checkbox,"click")}),q.bind(n.__checkbox,"click",function(t){t.stopPropagation()})):n instanceof tt?(q.bind(e,"click",function(){q.fakeEvent(n.__button,"click")}),q.bind(e,"mouseover",function(){q.addClass(n.__button,"hover")}),q.bind(e,"mouseout",function(){q.removeClass(n.__button,"hover")})):n instanceof et&&(q.addClass(e,"color"),n.updateDisplay=C.compose(function(t){return e.style.borderLeftColor=n.__color.toString(),t},n.updateDisplay),n.updateDisplay());n.setValue=C.compose(function(e){return t.getRoot().__preset_select&&n.isModified()&&p(t.getRoot(),!0),e},n.setValue)}function v(t,e){var n=t.getRoot(),r=n.__rememberedObjects.indexOf(e.object);if(-1!==r){var i=n.__rememberedObjectIndecesToControllers[r];if(void 0===i&&(i={},n.__rememberedObjectIndecesToControllers[r]=i),i[e.property]=e,n.load&&n.load.remembered){var o=n.load.remembered,a=void 0;if(o[t.preset])a=o[t.preset];else{if(!o[ut])return;a=o[ut]}if(a[r]&&void 0!==a[r][e.property]){var s=a[r][e.property];e.initialValue=s,e.setValue(s)}}}}function g(t,e,n,r){if(void 0===e[n])throw new Error('Object "'+e+'" has no property "'+n+'"');var i=void 0;if(r.color)i=new et(e,n);else{var o=[e,n].concat(r.factoryArgs);i=it.apply(t,o)}r.before instanceof H&&(r.before=r.before.__li),v(t,i),q.addClass(i.domElement,"c");var a=document.createElement("span");q.addClass(a,"property-name"),a.innerHTML=i.property;var s=document.createElement("div");s.appendChild(a),s.appendChild(i.domElement);var u=d(t,s,r.before);return q.addClass(u,mt.CLASS_CONTROLLER_ROW),i instanceof et?q.addClass(u,"color"):q.addClass(u,U(i.getValue())),m(t,u,i),t.__controllers.push(i),i}function y(t,e){return document.location.href+"."+e}function b(t,e,n){var r=document.createElement("option");r.innerHTML=e,r.value=e,t.__preset_select.appendChild(r),n&&(t.__preset_select.selectedIndex=t.__preset_select.length-1)}function _(t,e){e.style.display=t.useLocalStorage?"block":"none"}function x(t){var e=t.__save_row=document.createElement("li");q.addClass(t.domElement,"has-save"),t.__ul.insertBefore(e,t.__ul.firstChild),q.addClass(e,"save-row");var n=document.createElement("span");n.innerHTML="&nbsp;",q.addClass(n,"button gears");var r=document.createElement("span");r.innerHTML="Save",q.addClass(r,"button"),q.addClass(r,"save");var i=document.createElement("span");i.innerHTML="New",q.addClass(i,"button"),q.addClass(i,"save-as");var o=document.createElement("span");o.innerHTML="Revert",q.addClass(o,"button"),q.addClass(o,"revert");var a=t.__preset_select=document.createElement("select");if(t.load&&t.load.remembered?C.each(t.load.remembered,function(e,n){b(t,n,n===t.preset)}):b(t,ut,!1),q.bind(a,"change",function(){for(var e=0;e<t.__preset_select.length;e++)t.__preset_select[e].innerHTML=t.__preset_select[e].value;t.preset=this.value}),e.appendChild(a),e.appendChild(n),e.appendChild(r),e.appendChild(i),e.appendChild(o),ct){var s=document.getElementById("dg-local-explain"),u=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block","true"===localStorage.getItem(y(t,"isLocal"))&&u.setAttribute("checked","checked"),_(t,s),q.bind(u,"change",function(){t.useLocalStorage=!t.useLocalStorage,_(t,s)})}var c=document.getElementById("dg-new-constructor");q.bind(c,"keydown",function(t){!t.metaKey||67!==t.which&&67!==t.keyCode||lt.hide()}),q.bind(n,"click",function(){c.innerHTML=JSON.stringify(t.getSaveObject(),void 0,2),lt.show(),c.focus(),c.select()}),q.bind(r,"click",function(){t.save()}),q.bind(i,"click",function(){var e=prompt("Enter a new preset name.");e&&t.saveAs(e)}),q.bind(o,"click",function(){t.revert()})}function w(t){function e(e){return e.preventDefault(),t.width+=i-e.clientX,t.onResize(),i=e.clientX,!1}function n(){q.removeClass(t.__closeButton,mt.CLASS_DRAG),q.unbind(window,"mousemove",e),q.unbind(window,"mouseup",n)}function r(r){return r.preventDefault(),i=r.clientX,q.addClass(t.__closeButton,mt.CLASS_DRAG),q.bind(window,"mousemove",e),q.bind(window,"mouseup",n),!1}var i=void 0;t.__resize_handle=document.createElement("div"),C.extend(t.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),q.bind(t.__resize_handle,"mousedown",r),q.bind(t.__closeButton,"mousedown",r),t.domElement.insertBefore(t.__resize_handle,t.domElement.firstElementChild)}function M(t,e){t.domElement.style.width=e+"px",t.__save_row&&t.autoPlace&&(t.__save_row.style.width=e+"px"),t.__closeButton&&(t.__closeButton.style.width=e+"px")}function E(t,e){var n={};return C.each(t.__rememberedObjects,function(r,i){var o={},a=t.__rememberedObjectIndecesToControllers[i];C.each(a,function(t,n){o[n]=e?t.initialValue:t.getValue()}),n[i]=o}),n}function T(t){for(var e=0;e<t.__preset_select.length;e++)t.__preset_select[e].value===t.preset&&(t.__preset_select.selectedIndex=e)}function S(t){0!==t.length&&ot.call(window,function(){S(t)}),C.each(t,function(t){t.updateDisplay()})}Object.defineProperty(e,"__esModule",{value:!0});var A=Array.prototype.forEach,O=Array.prototype.slice,C={BREAK:{},extend:function(t){return this.each(O.call(arguments,1),function(e){(this.isObject(e)?Object.keys(e):[]).forEach(function(n){this.isUndefined(e[n])||(t[n]=e[n])}.bind(this))},this),t},defaults:function(t){return this.each(O.call(arguments,1),function(e){(this.isObject(e)?Object.keys(e):[]).forEach(function(n){this.isUndefined(t[n])&&(t[n]=e[n])}.bind(this))},this),t},compose:function(){var t=O.call(arguments);return function(){for(var e=O.call(arguments),n=t.length-1;n>=0;n--)e=[t[n].apply(this,e)];return e[0]}},each:function(t,e,n){if(t)if(A&&t.forEach&&t.forEach===A)t.forEach(e,n);else if(t.length===t.length+0){var r=void 0,i=void 0;for(r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===this.BREAK)return}else for(var o in t)if(e.call(n,t[o],o)===this.BREAK)return},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var r=void 0;return function(){function i(){r=null,n||t.apply(o,a)}var o=this,a=arguments,s=n||!r;clearTimeout(r),r=setTimeout(i,e),s&&t.apply(o,a)}},toArray:function(t){return t.toArray?t.toArray():O.call(t)},isUndefined:function(t){return void 0===t},isNull:function(t){return null===t},isNaN:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return isNaN(t)}),isArray:Array.isArray||function(t){return t.constructor===Array},isObject:function(t){return t===Object(t)},isNumber:function(t){return t===t+0},isString:function(t){return t===t+""},isBoolean:function(t){return!1===t||!0===t},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)}},R=[{litmus:C.isString,conversions:{THREE_CHAR_HEX:{read:function(t){var e=t.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==e&&{space:"HEX",hex:parseInt("0x"+e[1].toString()+e[1].toString()+e[2].toString()+e[2].toString()+e[3].toString()+e[3].toString(),0)}},write:r},SIX_CHAR_HEX:{read:function(t){var e=t.match(/^#([A-F0-9]{6})$/i);return null!==e&&{space:"HEX",hex:parseInt("0x"+e[1].toString(),0)}},write:r},CSS_RGB:{read:function(t){var e=t.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==e&&{space:"RGB",r:parseFloat(e[1]),g:parseFloat(e[2]),b:parseFloat(e[3])}},write:r},CSS_RGBA:{read:function(t){var e=t.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==e&&{space:"RGB",r:parseFloat(e[1]),g:parseFloat(e[2]),b:parseFloat(e[3]),a:parseFloat(e[4])}},write:r}}},{litmus:C.isNumber,conversions:{HEX:{read:function(t){return{space:"HEX",hex:t,conversionName:"HEX"}},write:function(t){return t.hex}}}},{litmus:C.isArray,conversions:{RGB_ARRAY:{read:function(t){return 3===t.length&&{space:"RGB",r:t[0],g:t[1],b:t[2]}},write:function(t){return[t.r,t.g,t.b]}},RGBA_ARRAY:{read:function(t){return 4===t.length&&{space:"RGB",r:t[0],g:t[1],b:t[2],a:t[3]}},write:function(t){return[t.r,t.g,t.b,t.a]}}}},{litmus:C.isObject,conversions:{RGBA_OBJ:{read:function(t){return!!(C.isNumber(t.r)&&C.isNumber(t.g)&&C.isNumber(t.b)&&C.isNumber(t.a))&&{space:"RGB",r:t.r,g:t.g,b:t.b,a:t.a}},write:function(t){return{r:t.r,g:t.g,b:t.b,a:t.a}}},RGB_OBJ:{read:function(t){return!!(C.isNumber(t.r)&&C.isNumber(t.g)&&C.isNumber(t.b))&&{space:"RGB",r:t.r,g:t.g,b:t.b}},write:function(t){return{r:t.r,g:t.g,b:t.b}}},HSVA_OBJ:{read:function(t){return!!(C.isNumber(t.h)&&C.isNumber(t.s)&&C.isNumber(t.v)&&C.isNumber(t.a))&&{space:"HSV",h:t.h,s:t.s,v:t.v,a:t.a}},write:function(t){return{h:t.h,s:t.s,v:t.v,a:t.a}}},HSV_OBJ:{read:function(t){return!!(C.isNumber(t.h)&&C.isNumber(t.s)&&C.isNumber(t.v))&&{space:"HSV",h:t.h,s:t.s,v:t.v}},write:function(t){return{h:t.h,s:t.s,v:t.v}}}}}],L=void 0,j=void 0,P=function(){j=!1;var t=arguments.length>1?C.toArray(arguments):arguments[0];return C.each(R,function(e){if(e.litmus(t))return C.each(e.conversions,function(e,n){if(L=e.read(t),!1===j&&!1!==L)return j=L,L.conversionName=n,L.conversion=e,C.BREAK}),C.BREAK}),j},N=void 0,I={hsv_to_rgb:function(t,e,n){var r=Math.floor(t/60)%6,i=t/60-Math.floor(t/60),o=n*(1-e),a=n*(1-i*e),s=n*(1-(1-i)*e),u=[[n,s,o],[a,n,o],[o,n,s],[o,a,n],[s,o,n],[n,o,a]][r];return{r:255*u[0],g:255*u[1],b:255*u[2]}},rgb_to_hsv:function(t,e,n){var r=Math.min(t,e,n),i=Math.max(t,e,n),o=i-r,a=void 0,s=void 0;return 0===i?{h:NaN,s:0,v:0}:(s=o/i,a=t===i?(e-n)/o:e===i?2+(n-t)/o:4+(t-e)/o,a/=6,a<0&&(a+=1),{h:360*a,s:s,v:i/255})},rgb_to_hex:function(t,e,n){var r=this.hex_with_component(0,2,t);return r=this.hex_with_component(r,1,e),r=this.hex_with_component(r,0,n)},component_from_hex:function(t,e){return t>>8*e&255},hex_with_component:function(t,e,n){return n<<(N=8*e)|t&~(255<<N)}},U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},k=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),F=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},B=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},z=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},G=function(){function t(){if(D(this,t),this.__state=P.apply(this,arguments),!1===this.__state)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return k(t,[{key:"toString",value:function(){return r(this)}},{key:"toHexString",value:function(){return r(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),t}();G.recalculateRGB=function(t,e,n){if("HEX"===t.__state.space)t.__state[e]=I.component_from_hex(t.__state.hex,n);else{if("HSV"!==t.__state.space)throw new Error("Corrupted color state");C.extend(t.__state,I.hsv_to_rgb(t.__state.h,t.__state.s,t.__state.v))}},G.recalculateHSV=function(t){var e=I.rgb_to_hsv(t.r,t.g,t.b);C.extend(t.__state,{s:e.s,v:e.v}),C.isNaN(e.h)?C.isUndefined(t.__state.h)&&(t.__state.h=0):t.__state.h=e.h},G.COMPONENTS=["r","g","b","h","s","v","hex","a"],i(G.prototype,"r",2),i(G.prototype,"g",1),i(G.prototype,"b",0),o(G.prototype,"h"),o(G.prototype,"s"),o(G.prototype,"v"),Object.defineProperty(G.prototype,"a",{get:function(){return this.__state.a},set:function(t){this.__state.a=t}}),Object.defineProperty(G.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=I.rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(t){this.__state.space="HEX",this.__state.hex=t}});var H=function(){function t(e,n){D(this,t),this.initialValue=e[n],this.domElement=document.createElement("div"),this.object=e,this.property=n,this.__onChange=void 0,this.__onFinishChange=void 0}return k(t,[{key:"onChange",value:function(t){return this.__onChange=t,this}},{key:"onFinishChange",value:function(t){return this.__onFinishChange=t,this}},{key:"setValue",value:function(t){return this.object[this.property]=t,this.__onChange&&this.__onChange.call(this,t),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),t}(),V={HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},W={};C.each(V,function(t,e){C.each(t,function(t){W[t]=e})});var X=/(\d+(\.\d+)?)px/,q={makeSelectable:function(t,e){void 0!==t&&void 0!==t.style&&(t.onselectstart=e?function(){return!1}:function(){},t.style.MozUserSelect=e?"auto":"none",t.style.KhtmlUserSelect=e?"auto":"none",t.unselectable=e?"on":"off")},makeFullscreen:function(t,e,n){var r=n,i=e;C.isUndefined(i)&&(i=!0),C.isUndefined(r)&&(r=!0),t.style.position="absolute",i&&(t.style.left=0,t.style.right=0),r&&(t.style.top=0,t.style.bottom=0)},fakeEvent:function(t,e,n,r){var i=n||{},o=W[e];if(!o)throw new Error("Event type "+e+" not supported.");var a=document.createEvent(o);switch(o){case"MouseEvents":var s=i.x||i.clientX||0,u=i.y||i.clientY||0;a.initMouseEvent(e,i.bubbles||!1,i.cancelable||!0,window,i.clickCount||1,0,0,s,u,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var c=a.initKeyboardEvent||a.initKeyEvent;C.defaults(i,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),c(e,i.bubbles||!1,i.cancelable,window,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.keyCode,i.charCode);break;default:a.initEvent(e,i.bubbles||!1,i.cancelable||!0)}C.defaults(a,r),t.dispatchEvent(a)},bind:function(t,e,n,r){var i=r||!1;return t.addEventListener?t.addEventListener(e,n,i):t.attachEvent&&t.attachEvent("on"+e,n),q},unbind:function(t,e,n,r){var i=r||!1;return t.removeEventListener?t.removeEventListener(e,n,i):t.detachEvent&&t.detachEvent("on"+e,n),q},addClass:function(t,e){if(void 0===t.className)t.className=e;else if(t.className!==e){var n=t.className.split(/ +/);-1===n.indexOf(e)&&(n.push(e),t.className=n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return q},removeClass:function(t,e){if(e)if(t.className===e)t.removeAttribute("class");else{var n=t.className.split(/ +/),r=n.indexOf(e);-1!==r&&(n.splice(r,1),t.className=n.join(" "))}else t.className=void 0;return q},hasClass:function(t,e){return new RegExp("(?:^|\\s+)"+e+"(?:\\s+|$)").test(t.className)||!1},getWidth:function(t){var e=getComputedStyle(t);return a(e["border-left-width"])+a(e["border-right-width"])+a(e["padding-left"])+a(e["padding-right"])+a(e.width)},getHeight:function(t){var e=getComputedStyle(t);return a(e["border-top-width"])+a(e["border-bottom-width"])+a(e["padding-top"])+a(e["padding-bottom"])+a(e.height)},getOffset:function(t){var e=t,n={left:0,top:0};if(e.offsetParent)do{n.left+=e.offsetLeft,n.top+=e.offsetTop,e=e.offsetParent}while(e);return n},isActive:function(t){return t===document.activeElement&&(t.type||t.href)}},Y=function(t){function e(t,n){function r(){o.setValue(!o.__prev)}D(this,e);var i=z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=i;return i.__prev=i.getValue(),i.__checkbox=document.createElement("input"),i.__checkbox.setAttribute("type","checkbox"),q.bind(i.__checkbox,"change",r,!1),i.domElement.appendChild(i.__checkbox),i.updateDisplay(),i}return B(e,t),k(e,[{key:"setValue",value:function(t){var n=F(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),n}},{key:"updateDisplay",value:function(){return!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),F(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(H),Z=function(t){function e(t,n,r){D(this,e);var i=z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=r,a=i;if(i.__select=document.createElement("select"),C.isArray(o)){var s={};C.each(o,function(t){s[t]=t}),o=s}return C.each(o,function(t,e){var n=document.createElement("option");n.innerHTML=e,n.setAttribute("value",t),a.__select.appendChild(n)}),i.updateDisplay(),q.bind(i.__select,"change",function(){var t=this.options[this.selectedIndex].value;a.setValue(t)}),i.domElement.appendChild(i.__select),i}return B(e,t),k(e,[{key:"setValue",value:function(t){var n=F(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,t);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),n}},{key:"updateDisplay",value:function(){return q.isActive(this.__select)?this:(this.__select.value=this.getValue(),F(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this))}}]),e}(H),J=function(t){function e(t,n){function r(){a.setValue(a.__input.value)}function i(){a.__onFinishChange&&a.__onFinishChange.call(a,a.getValue())}D(this,e);var o=z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),a=o;return o.__input=document.createElement("input"),o.__input.setAttribute("type","text"),q.bind(o.__input,"keyup",r),q.bind(o.__input,"change",r),q.bind(o.__input,"blur",i),q.bind(o.__input,"keydown",function(t){13===t.keyCode&&this.blur()}),o.updateDisplay(),o.domElement.appendChild(o.__input),o}return B(e,t),k(e,[{key:"updateDisplay",value:function(){return q.isActive(this.__input)||(this.__input.value=this.getValue()),F(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(H),Q=function(t){function e(t,n,r){D(this,e);var i=z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=r||{};return i.__min=o.min,i.__max=o.max,i.__step=o.step,C.isUndefined(i.__step)?0===i.initialValue?i.__impliedStep=1:i.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(i.initialValue))/Math.LN10))/10:i.__impliedStep=i.__step,i.__precision=s(i.__impliedStep),i}return B(e,t),k(e,[{key:"setValue",value:function(t){var n=t;return void 0!==this.__min&&n<this.__min?n=this.__min:void 0!==this.__max&&n>this.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!=0&&(n=Math.round(n/this.__step)*this.__step),F(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setValue",this).call(this,n)}},{key:"min",value:function(t){return this.__min=t,this}},{key:"max",value:function(t){return this.__max=t,this}},{key:"step",value:function(t){return this.__step=t,this.__impliedStep=t,this.__precision=s(t),this}}]),e}(H),K=function(t){function e(t,n,r){function i(){var t=parseFloat(h.__input.value);C.isNaN(t)||h.setValue(t)}function o(){h.__onFinishChange&&h.__onFinishChange.call(h,h.getValue())}function a(){o()}function s(t){var e=f-t.clientY;h.setValue(h.getValue()+e*h.__impliedStep),f=t.clientY}function u(){q.unbind(window,"mousemove",s),q.unbind(window,"mouseup",u),o()}function c(t){q.bind(window,"mousemove",s),q.bind(window,"mouseup",u),f=t.clientY}D(this,e);var l=z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));l.__truncationSuspended=!1;var h=l,f=void 0;return l.__input=document.createElement("input"),l.__input.setAttribute("type","text"),q.bind(l.__input,"change",i),q.bind(l.__input,"blur",a),q.bind(l.__input,"mousedown",c),q.bind(l.__input,"keydown",function(t){13===t.keyCode&&(h.__truncationSuspended=!0,this.blur(),h.__truncationSuspended=!1,o())}),l.updateDisplay(),l.domElement.appendChild(l.__input),l}return B(e,t),k(e,[{key:"updateDisplay",value:function(){return this.__input.value=this.__truncationSuspended?this.getValue():u(this.getValue(),this.__precision),F(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(Q),$=function(t){function e(t,n,r,i,o){function a(t){document.activeElement.blur(),q.bind(window,"mousemove",s),q.bind(window,"mouseup",u),s(t)}function s(t){t.preventDefault();var e=p.__background.getBoundingClientRect();return p.setValue(c(t.clientX,e.left,e.right,p.__min,p.__max)),!1}function u(){q.unbind(window,"mousemove",s),q.unbind(window,"mouseup",u),p.__onFinishChange&&p.__onFinishChange.call(p,p.getValue())}function l(t){1===t.touches.length&&(q.bind(window,"touchmove",h),q.bind(window,"touchend",f),h(t))}function h(t){var e=t.touches[0].clientX,n=p.__background.getBoundingClientRect();p.setValue(c(e,n.left,n.right,p.__min,p.__max))}function f(){q.unbind(window,"touchmove",h),q.unbind(window,"touchend",f),p.__onFinishChange&&p.__onFinishChange.call(p,p.getValue())}D(this,e);var d=z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,{min:r,max:i,step:o})),p=d;return d.__background=document.createElement("div"),d.__foreground=document.createElement("div"),q.bind(d.__background,"mousedown",a),q.bind(d.__background,"touchstart",l),q.addClass(d.__background,"slider"),q.addClass(d.__foreground,"slider-fg"),d.updateDisplay(),d.__background.appendChild(d.__foreground),d.domElement.appendChild(d.__background),d}return B(e,t),k(e,[{key:"updateDisplay",value:function(){var t=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*t+"%",F(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDisplay",this).call(this)}}]),e}(Q),tt=function(t){function e(t,n,r){D(this,e);var i=z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n)),o=i;return i.__button=document.createElement("div"),i.__button.innerHTML=void 0===r?"Fire":r,q.bind(i.__button,"click",function(t){return t.preventDefault(),o.fire(),!1}),q.addClass(i.__button,"button"),i.domElement.appendChild(i.__button),i}return B(e,t),k(e,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),e}(H),et=function(t){function e(t,n){function r(t){c(t),q.bind(window,"mousemove",c),q.bind(window,"touchmove",c),q.bind(window,"mouseup",o),q.bind(window,"touchend",o)}function i(t){f(t),q.bind(window,"mousemove",f),q.bind(window,"touchmove",f),q.bind(window,"mouseup",a),q.bind(window,"touchend",a)}function o(){q.unbind(window,"mousemove",c),q.unbind(window,"touchmove",c),q.unbind(window,"mouseup",o),q.unbind(window,"touchend",o),u()}function a(){q.unbind(window,"mousemove",f),q.unbind(window,"touchmove",f),q.unbind(window,"mouseup",a),q.unbind(window,"touchend",a),u()}function s(){var t=P(this.value);!1!==t?(p.__color.__state=t,p.setValue(p.__color.toOriginal())):this.value=p.__color.toString()}function u(){p.__onFinishChange&&p.__onFinishChange.call(p,p.__color.toOriginal())}function c(t){-1===t.type.indexOf("touch")&&t.preventDefault();var e=p.__saturation_field.getBoundingClientRect(),n=t.touches&&t.touches[0]||t,r=n.clientX,i=n.clientY,o=(r-e.left)/(e.right-e.left),a=1-(i-e.top)/(e.bottom-e.top);return a>1?a=1:a<0&&(a=0),o>1?o=1:o<0&&(o=0),p.__color.v=a,p.__color.s=o,p.setValue(p.__color.toOriginal()),!1}function f(t){-1===t.type.indexOf("touch")&&t.preventDefault();var e=p.__hue_field.getBoundingClientRect(),n=t.touches&&t.touches[0]||t,r=n.clientY,i=1-(r-e.top)/(e.bottom-e.top);return i>1?i=1:i<0&&(i=0),p.__color.h=360*i,p.setValue(p.__color.toOriginal()),!1}D(this,e);var d=z(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));d.__color=new G(d.getValue()),d.__temp=new G(0);var p=d;d.domElement=document.createElement("div"),q.makeSelectable(d.domElement,!1),d.__selector=document.createElement("div"),d.__selector.className="selector",d.__saturation_field=document.createElement("div"),d.__saturation_field.className="saturation-field",d.__field_knob=document.createElement("div"),d.__field_knob.className="field-knob",d.__field_knob_border="2px solid ",d.__hue_knob=document.createElement("div"),d.__hue_knob.className="hue-knob",d.__hue_field=document.createElement("div"),d.__hue_field.className="hue-field",d.__input=document.createElement("input"),d.__input.type="text",d.__input_textShadow="0 1px 1px ",q.bind(d.__input,"keydown",function(t){13===t.keyCode&&s.call(this)}),q.bind(d.__input,"blur",s),q.bind(d.__selector,"mousedown",function(){q.addClass(this,"drag").bind(window,"mouseup",function(){q.removeClass(p.__selector,"drag")})}),q.bind(d.__selector,"touchstart",function(){q.addClass(this,"drag").bind(window,"touchend",function(){q.removeClass(p.__selector,"drag")})});var m=document.createElement("div");return C.extend(d.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),C.extend(d.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:d.__field_knob_border+(d.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),C.extend(d.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),C.extend(d.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),C.extend(m.style,{width:"100%",height:"100%",background:"none"}),l(m,"top","rgba(0,0,0,0)","#000"),C.extend(d.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),h(d.__hue_field),C.extend(d.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:d.__input_textShadow+"rgba(0,0,0,0.7)"}),q.bind(d.__saturation_field,"mousedown",r),q.bind(d.__saturation_field,"touchstart",r),q.bind(d.__field_knob,"mousedown",r),q.bind(d.__field_knob,"touchstart",r),q.bind(d.__hue_field,"mousedown",i),q.bind(d.__hue_field,"touchstart",i),d.__saturation_field.appendChild(m),d.__selector.appendChild(d.__field_knob),d.__selector.appendChild(d.__saturation_field),d.__selector.appendChild(d.__hue_field),d.__hue_field.appendChild(d.__hue_knob),d.domElement.appendChild(d.__input),d.domElement.appendChild(d.__selector),d.updateDisplay(),d}return B(e,t),k(e,[{key:"updateDisplay",value:function(){var t=P(this.getValue());if(!1!==t){var e=!1;C.each(G.COMPONENTS,function(n){if(!C.isUndefined(t[n])&&!C.isUndefined(this.__color.__state[n])&&t[n]!==this.__color.__state[n])return e=!0,{}},this),e&&C.extend(this.__color.__state,t)}C.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,r=255-n;C.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,l(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),C.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+r+","+r+","+r+",.7)"})}}]),e}(H),nt=["-moz-","-o-","-webkit-","-ms-",""],rt={load:function(t,e){var n=e||document,r=n.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=t,n.getElementsByTagName("head")[0].appendChild(r)},inject:function(t,e){var n=e||document,r=document.createElement("style");r.type="text/css",r.innerHTML=t;var i=n.getElementsByTagName("head")[0];try{i.appendChild(r)}catch(t){}}},it=function(t,e){var n=t[e];return C.isArray(arguments[2])||C.isObject(arguments[2])?new Z(t,e,arguments[2]):C.isNumber(n)?C.isNumber(arguments[2])&&C.isNumber(arguments[3])?C.isNumber(arguments[4])?new $(t,e,arguments[2],arguments[3],arguments[4]):new $(t,e,arguments[2],arguments[3]):C.isNumber(arguments[4])?new K(t,e,{min:arguments[2],max:arguments[3],step:arguments[4]}):new K(t,e,{min:arguments[2],max:arguments[3]}):C.isString(n)?new J(t,e):C.isFunction(n)?new tt(t,e,""):C.isBoolean(n)?new Y(t,e):null},ot=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||f,at=function(){function t(){D(this,t),this.backgroundElement=document.createElement("div"),C.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),q.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),C.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var e=this;q.bind(this.backgroundElement,"click",function(){e.hide()})}return k(t,[{key:"show",value:function(){var t=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),C.defer(function(){t.backgroundElement.style.opacity=1,t.domElement.style.opacity=1,t.domElement.style.webkitTransform="scale(1)"})}},{key:"hide",value:function(){var t=this,e=function e(){t.domElement.style.display="none",t.backgroundElement.style.display="none",q.unbind(t.domElement,"webkitTransitionEnd",e),q.unbind(t.domElement,"transitionend",e),q.unbind(t.domElement,"oTransitionEnd",e)};q.bind(this.domElement,"webkitTransitionEnd",e),q.bind(this.domElement,"transitionend",e),q.bind(this.domElement,"oTransitionEnd",e),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-q.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-q.getHeight(this.domElement)/2+"px"}}]),t}(),st=function(t){if(t&&"undefined"!=typeof window){var e=document.createElement("style");return e.setAttribute("type","text/css"),e.innerHTML=t,document.head.appendChild(e),t}}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n");rt.inject(st);var ut="Default",ct=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}}(),lt=void 0,ht=!0,ft=void 0,dt=!1,pt=[],mt=function t(e){var n=this,r=e||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),q.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],r=C.defaults(r,{closeOnTop:!1,autoPlace:!0,width:t.DEFAULT_WIDTH}),r=C.defaults(r,{resizable:r.autoPlace,hideable:r.autoPlace}),C.isUndefined(r.load)?r.load={preset:ut}:r.preset&&(r.load.preset=r.preset),C.isUndefined(r.parent)&&r.hideable&&pt.push(this),r.resizable=C.isUndefined(r.parent)&&r.resizable,r.autoPlace&&C.isUndefined(r.scrollable)&&(r.scrollable=!0);var i=ct&&"true"===localStorage.getItem(y(this,"isLocal")),o=void 0;if(Object.defineProperties(this,{parent:{get:function(){return r.parent}},scrollable:{get:function(){return r.scrollable}},autoPlace:{get:function(){return r.autoPlace}},closeOnTop:{get:function(){return r.closeOnTop}},preset:{get:function(){return n.parent?n.getRoot().preset:r.load.preset},set:function(t){n.parent?n.getRoot().preset=t:r.load.preset=t,T(this),n.revert()}},width:{get:function(){return r.width},set:function(t){r.width=t,M(n,t)}},name:{get:function(){return r.name},set:function(t){r.name=t,titleRowName&&(titleRowName.innerHTML=r.name)}},closed:{get:function(){return r.closed},set:function(e){r.closed=e,r.closed?q.addClass(n.__ul,t.CLASS_CLOSED):q.removeClass(n.__ul,t.CLASS_CLOSED),this.onResize(),n.__closeButton&&(n.__closeButton.innerHTML=e?t.TEXT_OPEN:t.TEXT_CLOSED)}},load:{get:function(){return r.load}},useLocalStorage:{get:function(){return i},set:function(t){ct&&(i=t,t?q.bind(window,"unload",o):q.unbind(window,"unload",o),localStorage.setItem(y(n,"isLocal"),t))}}}),C.isUndefined(r.parent)){if(r.closed=!1,q.addClass(this.domElement,t.CLASS_MAIN),q.makeSelectable(this.domElement,!1),ct&&i){n.useLocalStorage=!0;var a=localStorage.getItem(y(this,"gui"));a&&(r.load=JSON.parse(a))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=t.TEXT_CLOSED,q.addClass(this.__closeButton,t.CLASS_CLOSE_BUTTON),r.closeOnTop?(q.addClass(this.__closeButton,t.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(q.addClass(this.__closeButton,t.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),q.bind(this.__closeButton,"click",function(){n.closed=!n.closed})}else{void 0===r.closed&&(r.closed=!0);var s=document.createTextNode(r.name);q.addClass(s,"controller-name");var u=d(n,s),c=function(t){return t.preventDefault(),n.closed=!n.closed,!1};q.addClass(this.__ul,t.CLASS_CLOSED),q.addClass(u,"title"),q.bind(u,"click",c),r.closed||(this.closed=!1)}r.autoPlace&&(C.isUndefined(r.parent)&&(ht&&(ft=document.createElement("div"),q.addClass(ft,"dg"),q.addClass(ft,t.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(ft),ht=!1),ft.appendChild(this.domElement),q.addClass(this.domElement,t.CLASS_AUTO_PLACE)),this.parent||M(n,r.width)),this.__resizeHandler=function(){n.onResizeDebounced()},q.bind(window,"resize",this.__resizeHandler),q.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),q.bind(this.__ul,"transitionend",this.__resizeHandler),q.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),r.resizable&&w(this),o=function(){ct&&"true"===localStorage.getItem(y(n,"isLocal"))&&localStorage.setItem(y(n,"gui"),JSON.stringify(n.getSaveObject()))},this.saveToLocalStorageIfPossible=o,r.parent||function(){var t=n.getRoot();t.width+=1,C.defer(function(){t.width-=1})}()};mt.toggleHide=function(){dt=!dt,C.each(pt,function(t){t.domElement.style.display=dt?"none":""})},mt.CLASS_AUTO_PLACE="a",mt.CLASS_AUTO_PLACE_CONTAINER="ac",mt.CLASS_MAIN="main",mt.CLASS_CONTROLLER_ROW="cr",mt.CLASS_TOO_TALL="taller-than-window",mt.CLASS_CLOSED="closed",mt.CLASS_CLOSE_BUTTON="close-button",mt.CLASS_CLOSE_TOP="close-top",mt.CLASS_CLOSE_BOTTOM="close-bottom",mt.CLASS_DRAG="drag",mt.DEFAULT_WIDTH=245,mt.TEXT_CLOSED="Close Controls",mt.TEXT_OPEN="Open Controls",mt._keydownHandler=function(t){"text"===document.activeElement.type||72!==t.which&&72!==t.keyCode||mt.toggleHide()},q.bind(window,"keydown",mt._keydownHandler,!1),C.extend(mt.prototype,{add:function(t,e){return g(this,t,e,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(t,e){return g(this,t,e,{color:!0})},remove:function(t){this.__ul.removeChild(t.__li),this.__controllers.splice(this.__controllers.indexOf(t),1);var e=this;C.defer(function(){e.onResize()})},destroy:function(){this.autoPlace&&ft.removeChild(this.domElement),q.unbind(window,"keydown",mt._keydownHandler,!1),q.unbind(window,"resize",this.__resizeHandler),this.saveToLocalStorageIfPossible&&q.unbind(window,"unload",this.saveToLocalStorageIfPoss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment