babylon.inspector.bundle.js 147 KB

12
  1. !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs"),require("babylonjs-loaders"),require("babylonjs-serializers"),require("babylonjs-gui")):"function"==typeof define&&define.amd?define("babylonjs-inspector",["babylonjs","babylonjs-loaders","babylonjs-serializers","babylonjs-gui"],t):"object"==typeof exports?exports["babylonjs-inspector"]=t(require("babylonjs"),require("babylonjs-loaders"),require("babylonjs-serializers"),require("babylonjs-gui")):e.INSPECTOR=t(e.BABYLON,e.BABYLON,e.BABYLON,e.BABYLON.GUI)}(window,function(e,t,n,r){return function(e){function t(t){for(var n,i,o=t[0],a=t[1],s=0,l=[];s<o.length;s++)i=o[s],r[i]&&l.push(r[i][0]),r[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(t);l.length;)l.shift()()}var n={},r={0:0};function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonp=window.webpackJsonp||[],a=o.push.bind(o);o.push=t,o=o.slice();for(var s=0;s<o.length;s++)t(o[s]);var p=a;return i(i.s=5)}([function(t,n){t.exports=e},function(e,t,n){"use strict";(function(){var n=this,r=n.attachEvent&&!n[o],i=n.document,o="addEventListener",a="removeEventListener",s="getBoundingClientRect",p=function(){for(var e,t=["","-webkit-","-moz-","-o-"],n=0;n<t.length;n++)if((e=i.createElement("div")).style.cssText="width:"+t[n]+"calc(9px)",e.style.length)return t[n]+"calc"}(),l=function(e){return"string"==typeof e||e instanceof String?i.querySelector(e):e},c=function(e,t){var c,u,d,h,f,_,b,v,m=[];void 0===(t=void 0!==t?t:{}).gutterSize&&(t.gutterSize=10),void 0===t.minSize&&(t.minSize=100),void 0===t.snapOffset&&(t.snapOffset=30),void 0===t.direction&&(t.direction="horizontal"),"horizontal"==t.direction?(c="width",d="clientWidth",h="clientX",f="left",_="gutter gutter-horizontal",b="paddingLeft",v="paddingRight",t.cursor||(t.cursor="ew-resize")):"vertical"==t.direction&&(c="height",d="clientHeight",h="clientY",f="top",_="gutter gutter-vertical",b="paddingTop",v="paddingBottom",t.cursor||(t.cursor="ns-resize")),t.blockDrag&&(_+=" blocked");var g=function(e){if(!t.blockDrag){var r=this,i=r.a,a=r.b;!r.dragging&&t.onDragStart&&t.onDragStart(),e.preventDefault(),r.dragging=!0,r.move=w.bind(r),r.stop=y.bind(r),n[o]("mouseup",r.stop),n[o]("touchend",r.stop),n[o]("touchcancel",r.stop),r.parent[o]("mousemove",r.move),r.parent[o]("touchmove",r.move),i[o]("selectstart",P),i[o]("dragstart",P),a[o]("selectstart",P),a[o]("dragstart",P),i.style.userSelect="none",i.style.webkitUserSelect="none",i.style.MozUserSelect="none",i.style.pointerEvents="none",a.style.userSelect="none",a.style.webkitUserSelect="none",a.style.MozUserSelect="none",a.style.pointerEvents="none",r.gutter.style.cursor=t.cursor,r.parent.style.cursor=t.cursor,x.call(r)}},y=function(){if(!t.blockDrag){var e=this,r=e.a,i=e.b;e.dragging&&t.onDragEnd&&t.onDragEnd(),e.dragging=!1,n[a]("mouseup",e.stop),n[a]("touchend",e.stop),n[a]("touchcancel",e.stop),e.parent[a]("mousemove",e.move),e.parent[a]("touchmove",e.move),delete e.stop,delete e.move,r[a]("selectstart",P),r[a]("dragstart",P),i[a]("selectstart",P),i[a]("dragstart",P),r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",i.style.userSelect="",i.style.webkitUserSelect="",i.style.MozUserSelect="",i.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor=""}},w=function(e){var n;this.dragging&&((n="touches"in e?e.touches[0][h]-this.start:e[h]-this.start)>this.aMin+t.snapOffset+this.aGutterSize?n<this.size-(this.bMin+t.snapOffset+this.bGutterSize)||(n=this.size-(this.bMin+this.bGutterSize)):n=this.aMin+this.aGutterSize,C.call(this,n),t.onDrag&&t.onDrag())},x=function(){var e=n.getComputedStyle(this.parent),t=this.parent[d]-parseFloat(e[b])-parseFloat(e[v]);this.size=this.a[s]()[c]+this.b[s]()[c]+this.aGutterSize+this.bGutterSize,this.percentage=Math.min(this.size/t*100,100),this.start=this.a[s]()[f]},C=function(e){this.a.style[c]=p+"("+e/this.size*this.percentage+"% - "+this.aGutterSize+"px)",this.b.style[c]=p+"("+(this.percentage-e/this.size*this.percentage)+"% - "+this.bGutterSize+"px)"},T=function(e,n,i){"string"==typeof n||n instanceof String||(n=r?t.sizes[u]+"%":p+"("+n+"% - "+i+"px)"),e.style[c]=n},P=function(){return!1},E=l(e[0]).parentNode;if(!t.sizes){var O=100/e.length;for(t.sizes=[],u=0;u<e.length;u++)t.sizes.push(O)}if(!Array.isArray(t.minSize)){var L=[];for(u=0;u<e.length;u++)L.push(t.minSize);t.minSize=L}for(u=0;u<e.length;u++){var S,D=l(e[u]),j=1==u,I=u==e.length-1,A=t.sizes[u],k=t.gutterSize;if(u>0&&((S={a:l(e[u-1]),b:D,aMin:t.minSize[u-1],bMin:t.minSize[u],dragging:!1,parent:E,isFirst:j,isLast:I,direction:t.direction}).aGutterSize=t.gutterSize,S.bGutterSize=t.gutterSize,j&&(S.aGutterSize=t.gutterSize/2),I&&(S.bGutterSize=t.gutterSize/2)),!r){if(u>0){var M=i.createElement("div");M.className=_,M.style[c]=t.gutterSize+"px",M[o]("mousedown",g.bind(S)),M[o]("touchstart",g.bind(S)),E.insertBefore(M,D),S.gutter=M}(0===u||u==e.length-1)&&(k=t.gutterSize/2)}T(D,A,k),u>0&&m.push(S)}return{setSizes:function(e){for(var t=0;t<e.length;t++)if(t>0){var n=m[t-1];T(n.a,e[t-1],n.aGutterSize),T(n.b,e[t],n.bGutterSize)}},collapse:function(e){var t;e===m.length?(t=m[e-1],x.call(t),C.call(t,t.size-t.bGutterSize)):(t=m[e],x.call(t),C.call(t,t.aGutterSize))},destroy:function(){for(var e=0;e<m.length;e++)m[e].parent.removeChild(m[e].gutter),m[e].a.style[c]="",m[e].b.style[c]=""}}};void 0!==e&&e.exports&&(t=e.exports=c),t.Split=c}).call(window)},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t);var r=n(0),i=function(){function e(e){this._obj=e}return e.prototype.correspondsTo=function(e){return e===this._obj},Object.defineProperty(e.prototype,"name",{get:function(){return e._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"object",{get:function(){return this._obj},enumerable:!0,configurable:!0}),e._name=r.Geometry.RandomId(),e}(),o=function(){function e(e,t,n){this._property=e,this._obj=t,this._parentObj=n||null}return Object.defineProperty(e.prototype,"name",{get:function(){return this._property},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._obj[this._property]},set:function(e){void 0!=e&&void 0!=this._obj[this._property]&&(this._obj instanceof r.Scene?this._obj.debugLayer.onPropertyChangedObservable.notifyObservers({object:this._obj,property:this._property,value:e,initialValue:this._obj[this._property]}):null!=this._parentObj?this._parentObj instanceof r.Scene?this._parentObj.debugLayer.onPropertyChangedObservable.notifyObservers({object:this._parentObj,property:this._property,value:e,initialValue:this._obj[this._property]}):this._parentObj.getScene().debugLayer.onPropertyChangedObservable.notifyObservers({object:this._parentObj,property:this._property,value:e,initialValue:this._obj[this._property]}):this._obj.getScene().debugLayer.onPropertyChangedObservable.notifyObservers({object:this._obj,property:this._property,value:e,initialValue:this._obj[this._property]})),this._obj[this._property]=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return et.GET_TYPE(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"obj",{get:function(){return this._obj},set:function(e){this._obj=e},enumerable:!0,configurable:!0}),e}(),a=function(){function e(){this.pause=!1,this._updatableProperties=[],this.interval=window.setInterval(this._update.bind(this),e.REFRESH_TIME)}return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e.prototype.add=function(e){this._updatableProperties.push(e)},e.prototype.remove=function(e){var t=this._updatableProperties.indexOf(e);-1!=t&&this._updatableProperties.splice(t,1)},e.prototype._update=function(){if(!this.pause)for(var e=0,t=this._updatableProperties;e<t.length;e++){t[e].update()}},e.prototype.dispose=function(){window.clearInterval(this.interval)},e.REFRESH_TIME=250,e}(),s=function(){function e(){this._div=et.CreateDiv()}return e.prototype.toHtml=function(){return this._div},e.prototype._build=function(){},e.prototype.dispose=function(){},e}(),p=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(e){function t(t,n){var i=e.call(this)||this,o=a.getInstance();return i._div.className="color-element",i._div.style.backgroundColor=i._toRgba(t),i.pline=n,i._input=et.CreateInput(),i._input.type="color",i._input.style.opacity="0",i._input.style.width="10px",i._input.style.height="15px",i._input.value=t.toHexString(),i._input.addEventListener("input",function(e){var t=r.Color3.FromHexString(i._input.value);t.r=parseFloat(t.r.toPrecision(2)),t.g=parseFloat(t.g.toPrecision(2)),t.b=parseFloat(t.b.toPrecision(2)),i.pline.validateInput(t),o.pause=!1}),i._div.appendChild(i._input),i._input.addEventListener("click",function(e){o.pause=!0}),i}return p(t,e),t.prototype.update=function(e){e&&(this._div.style.backgroundColor=this._toRgba(e),this._input.value=e.toHexString())},t.prototype._toRgba=function(e){if(e){var t=255*e.r|0,n=255*e.g|0,i=255*e.b|0,o=1;return e instanceof r.Color4&&(o=e.a),"rgba("+t+", "+n+", "+i+", "+o+")"}return""},t}(s),c=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(e){function t(t){var n=e.call(this)||this;return n._pause=!1,n._div.className="fa fa-search texture-element",n._textureDiv=et.CreateDiv("texture-viewer",n._div),n._canvas=et.CreateElement("canvas","texture-viewer-img",n._textureDiv),t&&(n._textureUrl=t.name),n._div.addEventListener("mouseover",n._showViewer.bind(n,"flex")),n._div.addEventListener("mouseout",n._showViewer.bind(n,"none")),n}return c(t,e),t.prototype.update=function(e){e&&e.url===this._textureUrl||(e&&(this._textureUrl=e.name),this._engine?(this._cube.material&&this._cube.material.dispose(!0,!0),this._cube.dispose()):this._initEngine(),this._populateScene())},t.prototype._populateScene=function(){var e=this,t=new r.CubeTexture(this._textureUrl,this._scene);t.coordinatesMode=r.Texture.SKYBOX_MODE,this._cube=r.Mesh.CreateBox("hdrSkyBox",10,this._scene);var n=new r.StandardMaterial("skyBox",this._scene);n.backFaceCulling=!1,n.reflectionTexture=t,n.reflectionTexture.coordinatesMode=r.Texture.SKYBOX_MODE,n.disableLighting=!0,this._cube.material=n,this._cube.registerBeforeRender(function(){e._cube.rotation.y+=.01})},t.prototype._initEngine=function(){var e=this;this._engine=new r.Engine(this._canvas),this._scene=new r.Scene(this._engine),this._scene.clearColor=new r.Color4(0,0,0,0),this._engine.runRenderLoop(function(){e._pause||e._scene.render()}),this._canvas.setAttribute("width","110"),this._canvas.setAttribute("height","110")},t.prototype._showViewer=function(e){"none"!=e?(this._engine||(this._initEngine(),this._populateScene()),this._pause=!1):this._pause=!0,this._textureDiv.style.display=e},t.prototype.dispose=function(){this._engine&&(this._engine.dispose(),this._engine=null)},t}(s),d=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t){return e.call(this,t)||this}return d(t,e),t.prototype._populateScene=function(){var e=this,t=new r.HDRCubeTexture(this._textureUrl,this._scene,512);t.coordinatesMode=r.Texture.SKYBOX_MODE,this._cube=r.Mesh.CreateBox("hdrSkyBox",10,this._scene);var n=new r.PBRMaterial("skyBox",this._scene);n.backFaceCulling=!1,n.reflectionTexture=t,n.microSurface=1,n.disableLighting=!0,this._cube.material=n,this._cube.registerBeforeRender(function(){e._cube.rotation.y+=.01})},t}(u),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(e){function t(t){var n=e.call(this)||this;n._div.className="fa fa-search texture-element",n._textureDiv=et.CreateDiv("texture-viewer",n._div);var r=et.CreateDiv("texture-viewer-img",n._textureDiv),i=et.CreateDiv(null,n._textureDiv);return t&&(i.textContent=t.getBaseSize().width+"px x "+t.getBaseSize().height+"px",r.style.backgroundImage="url('"+t.url+"')",r.style.width=t.getBaseSize().width+"px",r.style.height=t.getBaseSize().height+"px"),n._div.addEventListener("mouseover",n._showViewer.bind(n,"flex")),n._div.addEventListener("mouseout",n._showViewer.bind(n,"none")),n}return f(t,e),t.prototype.update=function(e){},t.prototype._showViewer=function(e){this._textureDiv.style.display=e},t}(s),b={format:function(e){var t=et.GET_TYPE(e)||"type_not_defined";return b[t]&&b[t].format?b[t].format(e):et.GET_TYPE(e)},type_not_defined:{properties:new Array,format:function(){return""}},Vector2:{type:r.Vector2,format:function(e){return"x:"+et.Trunc(e.x)+", y:"+et.Trunc(e.y)}},Vector3:{type:r.Vector3,format:function(e){return"x:"+et.Trunc(e.x)+", y:"+et.Trunc(e.y)+", z:"+et.Trunc(e.z)}},Color3:{type:r.Color3,format:function(e){return"R:"+e.r.toPrecision(2)+", G:"+e.g.toPrecision(2)+", B:"+e.b.toPrecision(2)},slider:{r:{min:0,max:1,step:.01},g:{min:0,max:1,step:.01},b:{min:0,max:1,step:.01}}},Color4:{type:r.Color4,format:function(e){return"R:"+e.r+", G:"+e.g+", B:"+e.b},slider:{r:{min:0,max:1,step:.01},g:{min:0,max:1,step:.01},b:{min:0,max:1,step:.01}}},Quaternion:{type:r.Quaternion},Size:{type:r.Size,format:function(e){return"Size - w:"+et.Trunc(e.width)+", h:"+et.Trunc(e.height)}},Texture:{type:r.Texture,format:function(e){return e.name}},RenderTargetTexture:{type:r.RenderTargetTexture},DynamicTexture:{type:r.DynamicTexture},BaseTexture:{type:r.BaseTexture},CubeTexture:{type:r.CubeTexture},HDRCubeTexture:{type:r.HDRCubeTexture},Sound:{type:r.Sound},ArcRotateCamera:{type:r.ArcRotateCamera,slider:{alpha:{min:0,max:2*Math.PI,step:.01},beta:{min:-Math.PI,max:Math.PI,step:.01},fov:{min:0,max:180,step:1}}},FreeCamera:{type:r.FreeCamera,slider:{fov:{min:0,max:180,step:1}}},Scene:{type:r.Scene},TransformNode:{type:r.TransformNode,format:function(e){return e.name}},AbstractMesh:{type:r.AbstractMesh,format:function(e){return e.name}},Mesh:{type:r.Mesh,format:function(e){return e.name},slider:{visibility:{min:0,max:1,step:.1}}},StandardMaterial:{type:r.StandardMaterial,format:function(e){return e.name},slider:{alpha:{min:0,max:1,step:.01}}},PBRMaterial:{type:r.PBRMaterial,slider:{alpha:{min:0,max:1,step:.01}}},PhysicsImpostor:{type:r.PhysicsImpostor},ImageProcessingConfiguration:{type:r.ImageProcessingConfiguration},ColorCurves:{type:r.ColorCurves}},v=function(){function e(){}return e.format=function(e,t){return e[t]},e}(),m=function(){function e(e,t,n){void 0===t&&(t=null),void 0===n&&(n=0),this._children=[],this._elements=[],this._property=e,this._level=n,this._parent=t,this._div=et.CreateDiv("row"),this._div.style.marginLeft=this._level+"px",et.CreateDiv("prop-name",this._div).textContent=""+this.name,this._valueDiv=et.CreateDiv("prop-value",this._div),"boolean"==typeof this.value||this._isSliderType()||(this._valueDiv.textContent=this._displayValueContent()||"-"),this._createElements();for(var r=0,i=this._elements;r<i.length;r++){var o=i[r];this._valueDiv.appendChild(o.toHtml())}this._updateValue(),"boolean"==typeof this.value?this._checkboxInput():this._isSliderType()?this._rangeInput():this._isSimple()?(this._initInput(),this._valueDiv.addEventListener("click",this._displayInputHandler),this._input.addEventListener("focusout",this._focusOutInputHandler),this._input.addEventListener("keydown",this._validateInputHandler),this._input.addEventListener("keydown",this._escapeInputHandler)):(this._valueDiv.classList.add("clickable"),this._valueDiv.addEventListener("click",this._addDetails.bind(this))),a.getInstance().add(this)}return e.prototype._initInput=function(){this._input=document.createElement("input"),this._input.setAttribute("type","text"),this._displayInputHandler=this._displayInput.bind(this),this._validateInputHandler=this._validateInput.bind(this),this._escapeInputHandler=this._escapeInput.bind(this),this._focusOutInputHandler=this.update.bind(this),this._onMouseDownHandler=this._onMouseDown.bind(this),this._onMouseDragHandler=this._onMouseDrag.bind(this),this._onMouseUpHandler=this._onMouseUp.bind(this)},e.prototype._validateInput=function(e){this._input.removeEventListener("focusout",this._focusOutInputHandler),13==e.keyCode?this.validateInput(this._input.value):9==e.keyCode?(e.preventDefault(),this.validateInput(this._input.value)):27==e.keyCode&&this.update()},e.prototype.validateInput=function(e,t){void 0===t&&(t=!0),this.updateObject(),"number"==typeof this._property.value?this._property.value=parseFloat(e):this._property.value=e,t&&(this.update(),a.getInstance().pause=!1)},e.prototype._escapeInput=function(e){this._input.removeEventListener("focusout",this._focusOutInputHandler),27==e.keyCode&&this.update()},e.prototype._removeInputWithoutValidating=function(){et.CleanDiv(this._valueDiv),"boolean"==typeof this.value||this._isSliderType()||(this._valueDiv.textContent="-");for(var e=0,t=this._elements;e<t.length;e++){var n=t[e];this._valueDiv.appendChild(n.toHtml())}"boolean"==typeof this.value||this._isSliderType()||this._valueDiv.addEventListener("click",this._displayInputHandler)},e.prototype._displayInput=function(e){this._valueDiv.removeEventListener("click",this._displayInputHandler);var t=this._valueDiv.textContent;this._valueDiv.textContent="",this._input.value=t||"",this._valueDiv.appendChild(this._input),this._input.focus(),"boolean"==typeof this.value||this._isSliderType()?"number"==typeof this.value&&this._input.addEventListener("mousedown",this._onMouseDownHandler):this._input.addEventListener("focusout",this._focusOutInputHandler),a.getInstance().pause=!0},e.prototype.updateObject=function(){return this._parent&&(this._property.obj=this._parent.updateObject()),this._property.value},Object.defineProperty(e.prototype,"name",{get:function(){return this._property.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return v.format(this._property.obj,this._property.name)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._property.type},enumerable:!0,configurable:!0}),e.prototype._createElements=function(){"Color3"!=this.type&&"Color4"!=this.type||et.IsBrowserIE()||this._elements.push(new l(this.value,this)),"Texture"==this.type&&this._elements.push(new _(this.value)),"HDRCubeTexture"==this.type&&this._elements.push(new h(this.value)),"CubeTexture"==this.type&&this._elements.push(new u(this.value))},e.prototype._displayValueContent=function(){var e=this.value;return"number"==typeof e?et.Trunc(e):"string"==typeof e||"boolean"==typeof e?e:b.format(e)},e.prototype.dispose=function(){a.getInstance().remove(this);for(var e=0,t=this._children;e<t.length;e++){var n=t[e];a.getInstance().remove(n)}for(var r=0,i=this._elements;r<i.length;r++){i[r].dispose()}this._elements=[]},e.prototype._updateValue=function(){if(this.updateObject(),"boolean"==typeof this.value)this._checkboxInput();else if(this._isSliderType())this._rangeInput();else if(this._valueDiv.childNodes[0].nodeValue=this._displayValueContent(),"Color3"==this._property.type&&5==this._children.length&&1==this._children[1].value||"Color4"==this._property.type&&6==this._children.length&&1==this._children[1].value){if(void 0!=this._children[0]&&"hex"==this._children[0].name){var e=this._children[0].value,t=parseInt(e.slice(1,3),16)*(1/255),n=Math.round(100*t)/100;this.value.r=n;var r=parseInt(e.slice(3,5),16)*(1/255),i=Math.round(100*r)/100;this.value.g=i;var o=parseInt(e.slice(5,7),16)*(1/255),a=Math.round(100*o)/100;if(this.value.b=a,"a"==this._children[2].name){var s=parseInt(e.slice(7,9),16)*(1/255),p=Math.round(100*s)/100;this.value.a=p}}}else if(("Color3"==this._property.type||"Color4"==this._property.type)&&void 0!=this._property.value.hex&&null!=this._property.value.hex){var l=[],c=(255*this._property.value.r|0).toString(16);l.push(c),"0"==c&&l.push("0");var u=(255*this._property.value.g|0).toString(16);l.push(u),"0"==u&&l.push("0");var d=(255*this._property.value.b|0).toString(16);if(l.push(d),"0"==d&&l.push("0"),void 0!=this._property.value.a){var h=(255*this._property.value.a|0).toString(16);l.push(h),"0"==h&&l.push("0")}l.unshift("#");e=l.join("");this._property.value.hex=e,l.length=0}for(var f=0,_=this._elements;f<_.length;f++){_[f].update(this.value)}},e.prototype.update=function(){this._removeInputWithoutValidating(),this._updateValue()},e.prototype._isSimple=function(){return null==this.value||"type_not_defined"===this.type||-1!=e._SIMPLE_TYPE.indexOf(this.type)},e.prototype.toHtml=function(){return this._div},e.prototype.closeDetails=function(){if(this._div.classList.contains("unfolded")&&(this._div.classList.remove("unfolded"),this._div.parentNode))for(var e=0,t=this._children;e<t.length;e++){var n=t[e];this._div.parentNode.removeChild(n.toHtml())}},e.prototype._addDetails=function(){if(this._div.classList.contains("unfolded")){if(this._div.classList.remove("unfolded"),this._div.parentNode)for(var t=0,n=this._children;t<n.length;t++){var r=n[t];this._div.parentNode.removeChild(r.toHtml())}}else{if(this._div.classList.toggle("unfolded"),0==this._children.length){var i=this.value,a=et.GetAllLinesPropertiesAsString(i);0==(a.indexOf("r")&&a.indexOf("g")&&a.indexOf("b"))?a.sort():a.sort().reverse();for(var s=0,p=a;s<p.length;s++){var l=p[s];r=new e(new o(l,this._property.value,this._property.obj),this,this._level+e._MARGIN_LEFT);this._children.push(r)}if(0==(a.indexOf("r")&&a.indexOf("g")&&a.indexOf("b")&&a.indexOf("a"))){var c=[],u=new o("hexEnable",this._property.value,this._property.obj);u.value=!1;var d=new e(u,this,this._level+e._MARGIN_LEFT);this._children.unshift(d);for(var h=0,f=a;h<f.length;h++){l=f[h];var _=(255*new o(l,this._property.value,this._property.obj).value|0).toString(16);c.push(_),"0"==_&&c.push("0")}c.push("#"),c.reverse();var b=c.join(""),v=new o("hex",this._property.value,this._property.obj);v.value=b;var m=new e(v,this,this._level+e._MARGIN_LEFT);this._children.unshift(m)}}if(this._div.parentNode)for(var g=0,y=this._children;g<y.length;g++){r=y[g];this._div.parentNode.insertBefore(r.toHtml(),this._div.nextSibling)}}},e.prototype._onMouseDrag=function(e){var t=this._prevY-e.clientY;this._input.value=(this._preValue+t).toString()},e.prototype._onMouseUp=function(e){window.removeEventListener("mousemove",this._onMouseDragHandler),window.removeEventListener("mouseup",this._onMouseUpHandler),this._prevY=e.clientY},e.prototype._onMouseDown=function(e){this._prevY=e.clientY,this._preValue=this.value,window.addEventListener("mousemove",this._onMouseDragHandler),window.addEventListener("mouseup",this._onMouseUpHandler)},e.prototype._checkboxInput=function(){var e=this;this._valueDiv.childElementCount<1&&(this._input=et.CreateInput("checkbox-element",this._valueDiv),this._input.type="checkbox",this._input.checked=this.value,this._input.addEventListener("change",function(){a.getInstance().pause=!0,e.validateInput(!e.value)}))},e.prototype._rangeInput=function(){this._valueDiv.childElementCount<1&&(this._input=et.CreateInput("slider-element",this._valueDiv),this._input.type="range",this._input.style.display="inline-block",this._input.min=this._getSliderProperty().min,this._input.max=this._getSliderProperty().max,this._input.step=this._getSliderProperty().step,this._input.value=this.value,this._validateInputHandler=this._rangeHandler.bind(this),this._input.addEventListener("input",this._validateInputHandler),this._input.addEventListener("change",function(){a.getInstance().pause=!1}),this._textValue=et.CreateDiv("value-text",this._valueDiv),this._textValue.innerText=et.Trunc(this.value).toString(),this._textValue.style.paddingLeft="10px",this._textValue.style.display="inline-block")},e.prototype._rangeHandler=function(){a.getInstance().pause=!0,this._textValue.innerText=this._input.value,this.validateInput(this._input.value,!1)},e.prototype._isSliderType=function(){return this._property&&b.hasOwnProperty(this._property.obj.constructor.name)&&b[this._property.obj.constructor.name].hasOwnProperty("slider")&&b[this._property.obj.constructor.name].slider.hasOwnProperty(this.name)},e.prototype._getSliderProperty=function(){return b[this._property.obj.constructor.name].slider[this.name]},e._SIMPLE_TYPE=["number","string","boolean"],e._MARGIN_LEFT=15,e}(),g=(n(7),!1);function y(e){if(g=!!e){var t={ValueAndUnit:{type:e.ValueAndUnit,properties:["_value","unit"],format:function(e){return e}},Control:{type:e.Control,properties:["_alpha","_fontFamily","_color","_scaleX","_scaleY","_rotation","_currentMeasure","_width","_height","_left","_top","_linkedMesh","isHitTestVisible","isPointerBlocker"],format:function(e){return e.name}},Button:{type:e.Button,properties:new Array,format:function(e){return e.name}},ColorPicker:{type:e.ColorPicker,properties:["_value"],format:function(e){return e.name}},Checkbox:{type:e.Checkbox,properties:["_isChecked","_background"],format:function(e){return e.name}},Ellipse:{type:e.Ellipse,properties:["_thickness"],format:function(e){return e.name}},Image:{type:e.Image,properties:["_imageWidth","_imageHeight","_loaded","_source"],format:function(e){return e.name}},Line:{type:e.Line,properties:["_lineWidth","_background","_x1","_y1","_x2","_y2"],format:function(e){return e.name}},RadioButton:{type:e.RadioButton,properties:["_isChecked","_background"],format:function(e){return e.name}},Rectangle:{type:e.Rectangle,properties:["_thickness","_cornerRadius"],format:function(e){return e.name}},Slider:{type:e.Slider,properties:["_minimum","_maximum","_value","_background","_borderColor"],format:function(e){return e.name}},StackPanel:{type:e.StackPanel,properties:["_isVertical"],format:function(e){return e.name}},TextBlock:{type:e.TextBlock,properties:["_text","_textWrapping"],format:function(e){return e.name}},Container:{type:e.Container,properties:["_background"],format:function(e){return e.name}}};for(var n in t)b[n]=t[n]}}var w=function(){return function(e,t,n){void 0===n&&(n=null);var r=this;this._elem=e,n||(n=this._elem.parentElement),this._infoDiv=et.CreateDiv("tooltip",n),this._elem.addEventListener("mouseover",function(){r._infoDiv.textContent=t,r._infoDiv.style.display="block"}),this._elem.addEventListener("mouseout",function(){r._infoDiv.style.display="none"})}}(),x=function(){function e(e,t,n,r,i){var o=this;this._inspector=r,this._elem=Ze.DOCUMENT.createElement("i"),this._elem.className="tool "+e+" "+t,n.appendChild(this._elem),this._elem.addEventListener("click",function(e){o.action()}),new w(this._elem,i)}return e.prototype.toHtml=function(){return this._elem},e.prototype.getPixelWidth=function(){var e=Ze.WINDOW.getComputedStyle(this._elem);if(!e.marginLeft||!e.marginRight)return 0;var t=parseFloat(e.marginLeft.substr(0,e.marginLeft.length-2))||0,n=parseFloat(e.marginRight.substr(0,e.marginRight.length-2))||0;return(this._elem.clientWidth||0)+t+n},e.prototype._updateIcon=function(e){this._elem.className="tool fa "+e},e}(),C=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(e){function t(t,n){return e.call(this,"fa","fa-sync",t,n,"Refresh the current tab")||this}return C(t,e),t.prototype.action=function(){this._inspector.refresh()},t}(x),P=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(t,n){var r=e.call(this,"fa","fa-tags",t,n,"Display mesh names on the canvas")||this;return r._isDisplayed=!1,r._advancedTexture=null,r._labelInitialized=!1,r._scene=null,r._scene=n.scene,r}return P(t,e),t.prototype.dispose=function(){this._advancedTexture&&this._advancedTexture.dispose()},t.prototype._checkGUILoaded=function(){return g},t.prototype._initializeLabels=function(){var e=this;if(this._checkGUILoaded()){if(this._labelInitialized||!this._scene)return!1;this._advancedTexture=Ze.GUIObject.AdvancedDynamicTexture.CreateFullscreenUI("UI");for(var t=0,n=this._scene.meshes;t<n.length;t++){var r=n[t];this._createLabel(r,Ze.GUIObject)}return this._scene.onNewMeshAddedObservable.add(function(t){e._createLabel(t,Ze.GUIObject)}),this._scene.onMeshRemovedObservable.add(function(t){e._removeLabel(t)}),this._labelInitialized=!0,!0}},t.prototype._createLabel=function(e,t){var n=e.name;if(!et.IsSystemName(n)&&e&&this._advancedTexture){var r=new t.Rectangle;r.width=4+10*n.length+"px",r.height="22px",r.background="rgba(0,0,0,0.6)",r.color="black",this._advancedTexture.addControl(r);var i=new t.TextBlock;i.text=n,i.fontSize=12,r.addControl(i),r.linkWithMesh(e)}},t.prototype._removeLabel=function(e){if(this._advancedTexture)for(var t=0,n=this._advancedTexture._rootContainer.children;t<n.length;t++){var r=n[t];if(r._linkedMesh===e){this._advancedTexture.removeControl(r);break}}},t.prototype.action=function(){this._checkGUILoaded()&&(this._isDisplayed=!this._isDisplayed,this._isDisplayed?(this._initializeLabels(),this._advancedTexture&&(this._advancedTexture._rootContainer.isVisible=!0)):this._advancedTexture&&(this._advancedTexture._rootContainer.isVisible=!1))},t}(x),O=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e){function t(t,n){var r=e.call(this,"fa","fa-mouse-pointer",t,n,"Select a mesh in the scene")||this;return r._isActive=!1,r._pickHandler=r._pickMesh.bind(r),r}return O(t,e),t.prototype.action=function(){this._isActive?this._deactivate():(this.toHtml().classList.add("active"),this._inspector.scene.getEngine().getRenderingCanvas().addEventListener("click",this._pickHandler),this._isActive=!0)},t.prototype._deactivate=function(){this.toHtml().classList.remove("active"),this._inspector.scene.getEngine().getRenderingCanvas().removeEventListener("click",this._pickHandler),this._isActive=!1},t.prototype._pickMesh=function(e){var t=this._updatePointerPosition(e),n=this._inspector.scene.pick(t.x,t.y,function(e){return!0});n&&n.pickedMesh&&this._inspector.displayObjectDetails(n.pickedMesh),this._deactivate()},t.prototype._updatePointerPosition=function(e){var t=this._inspector.scene.getEngine().getRenderingCanvasClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},t}(x),S=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(e){function t(t,n){return e.call(this,"fas","fa-external-link-alt",t,n,"Open the inspector in a popup")||this}return S(t,e),t.prototype.action=function(){this._inspector.openPopup()},t}(x),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(e){function t(t,n){return e.call(this,"fa","fa-expand",t,n,"Open the scene in fullscreen, press Esc to exit")||this}return j(t,e),t.prototype.action=function(){!function(e){(e.requestFullscreen||e.webkitRequestFullScreen).call(e)}(document.body)},t}(x),A=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(e){function t(t,n){var r=e.call(this,"fa","fa-pause",t,n,"Pause the automatic update of properties")||this;return r._isPause=!1,r}return A(t,e),t.prototype.action=function(){this._isPause?(a.getInstance().pause=!1,this._updateIcon("fa-pause")):(a.getInstance().pause=!0,this._updateIcon("fa-play")),this._isPause=!this._isPause},t}(x),M=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(e){function t(t,n){return e.call(this,"fa","fa-times",t,n,"Close the inspector panel")||this}return M(t,e),t.prototype.action=function(){this._inspector.dispose()},t}(x),F=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(e){function t(t){var n=e.call(this)||this;return n._tools=[],n._inspector=t,n._build(),n._addTools(),n}return F(t,e),t.prototype.update=function(){},t.prototype._build=function(){this._div.className="toolbar"},t.prototype._addTools=function(){this._tools.push(new T(this._div,this._inspector)),this._tools.push(new E(this._div,this._inspector)),this._tools.push(new L(this._div,this._inspector)),this._inspector.popupMode||et.IsBrowserEdge()||this._tools.push(new D(this._div,this._inspector)),this._tools.push(new I(this._div,this._inspector)),this._tools.push(new k(this._div,this._inspector)),this._tools.push(new R(this._div,this._inspector))},t.prototype.getPixelWidth=function(){for(var e=0,t=0,n=this._tools;t<n.length;t++){e+=n[t].getPixelWidth()}return e},t}(s),B=function(){function e(){this._on=!1,this._elem=Ze.DOCUMENT.createElement("i"),this._elem.className="treeTool fa",this._addEvents()}return e.prototype.toHtml=function(){return this._elem},e.prototype._addEvents=function(){var e=this;this._elem.addEventListener("click",function(t){e.action(),t.stopPropagation()})},e.prototype.action=function(){this._on=!this._on},e}(),V=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z=function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-cube"),n._on=n._obj.isBoxVisible(),n._check(),n}return V(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._check()},t.prototype._check=function(){this._on?this._elem.classList.add("active"):this._elem.classList.remove("active"),this._obj.setBoxVisible(this._on)},t}(B),U=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),G=function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-eye"),n._on=n._obj.isVisible(),n._check(!0),n}return U(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._check()},t.prototype._check=function(e){this._on?(this._elem.classList.add("fa-eye"),this._elem.classList.add("active"),this._elem.classList.remove("fa-eye-slash")):(this._elem.classList.remove("fa-eye"),this._elem.classList.remove("active"),this._elem.classList.add("fa-eye-slash")),e||this._obj.setVisible(this._on)},t}(B),H=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W=function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-wrench"),n}return H(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._on?this._elem.classList.add("active"):this._elem.classList.remove("active"),this._obj.debug(this._on)},t}(B),Y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),q=function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-info-circle"),new w(n._elem,n._obj.getInfo(),n._elem),n}return Y(t,e),t.prototype.action=function(){e.prototype.action.call(this)},t}(B),X=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),J=function(e){function t(t){return e.call(this,t)||this}return X(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return et.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return et.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new G(this)),e.push(new W(this)),this._obj instanceof r.AbstractMesh&&this._obj.getTotalVertices()>0&&e.push(new z(this)),e.push(new q(this)),e},t.prototype.setVisible=function(e){this._obj.setEnabled(e),this._obj.isVisible=e},t.prototype.isVisible=function(){return this._obj.isEnabled()&&(void 0===this._obj.isVisible||this._obj.isVisible)},t.prototype.isBoxVisible=function(){return this._obj.showBoundingBox},t.prototype.setBoxVisible=function(e){return this._obj.showBoundingBox=e},t.prototype.debug=function(e){(this._axesViewer||this._drawAxis(),!e&&this._axesViewer)&&(this._obj.getScene().onBeforeRenderObservable.remove(this.onBeforeRenderObserver),this._axesViewer.dispose(),this._axesViewer=null)},t.prototype.getInfo=function(){return this._obj instanceof r.AbstractMesh?this._obj.getTotalVertices()+" vertices":"0 vertices"},t.prototype._drawAxis=function(){var e=this;this._obj.computeWorldMatrix();var t=new r.Vector3(1,0,0),n=new r.Vector3(0,1,0),i=new r.Vector3(0,0,1);this._axesViewer=new r.Debug.AxesViewer(this._obj.getScene());var o=this._obj;this.onBeforeRenderObserver=o.getScene().onBeforeRenderObservable.add(function(){var a=o.getWorldMatrix(),s=new r.Vector3(1,1,1);o instanceof r.AbstractMesh&&(s=o.getBoundingInfo().boundingBox.extendSizeWorld),e._axesViewer.scaleLines=2*Math.max(s.x,s.y,s.z),e._axesViewer.update(e._obj.position,r.Vector3.TransformNormal(t,a),r.Vector3.TransformNormal(n,a),r.Vector3.TransformNormal(i,a))})},t}(i),K=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(e){function t(t,n){var r=e.call(this)||this;return r.children=[],r._tab=t,r._adapter=n,r._tools=r._adapter.getTools(),r._build(),r}return K(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._adapter.id()},enumerable:!0,configurable:!0}),t.prototype.add=function(e){this.children.push(e),this.update()},Object.defineProperty(t.prototype,"adapter",{get:function(){return this._adapter},enumerable:!0,configurable:!0}),t.prototype.compareTo=function(e){var t=this.id,n=e.id;return t.localeCompare(n,[],{numeric:!0})},t.prototype.correspondsTo=function(e){return this._adapter.correspondsTo(e)},t.prototype.fold=function(){if(this.children.length>0){for(var e=0,t=this.children;e<t.length;e++){t[e].toHtml().style.display="none"}this._div.classList.add("folded"),this._div.classList.remove("unfolded")}},t.prototype.unfold=function(){if(this.children.length>0){for(var e=0,t=this.children;e<t.length;e++){t[e].toHtml().style.display="block"}this._div.classList.add("unfolded"),this._div.classList.remove("folded")}},t.prototype._build=function(){var e=this._adapter.id();if(this._div.className="xline"==e||"yline"==e||"zline"==e?"line_invisible":"line",this.adapter instanceof J){var t=this.adapter.object;t instanceof r.TransformNode&&!(t instanceof r.AbstractMesh)&&(this._div.className+=" transformNode")}for(var n=0,i=this._tools;n<i.length;n++){var o=i[n];this._div.appendChild(o.toHtml())}var a=Ze.DOCUMENT.createElement("span");a.textContent=this._adapter.id(),this._div.appendChild(a);var s=Ze.DOCUMENT.createElement("span");s.className="property-type","type_not_defined"!==this._adapter.type()&&(s.textContent=" - "+this._adapter.type()),this._div.appendChild(s),this._lineContent=et.CreateDiv("line-content",this._div),this._addEvent()},t.prototype.getDetails=function(){return this._adapter.getProperties()},t.prototype.update=function(){et.CleanDiv(this._lineContent);for(var e=0,t=this.children;e<t.length;e++){var n=t[e].toHtml();this._lineContent.appendChild(n)}this.children.length>0&&(this._div.classList.contains("folded")||this._div.classList.contains("unfolded")||this._div.classList.add("folded")),this.fold()},t.prototype._addEvent=function(){var e=this;this._div.addEventListener("click",function(t){e._tab.select(e),e._isFolded()?e.unfold():e.fold(),t.stopPropagation()})},t.prototype._isFolded=function(){return!this._div.classList.contains("unfolded")},t.prototype.active=function(e){this._div.classList.remove("active");for(var t=0,n=this.children;t<n.length;t++){n[t].active(!1)}e&&this._div.classList.add("active")},t.prototype.getDiv=function(){return this._div},t}(s),Q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Z=function(e){function t(t){var n=e.call(this)||this;n._propTab=t,n._div.classList.add("searchbar");var r=Ze.DOCUMENT.createElement("i");return r.className="fa fa-search",n._div.appendChild(r),n._inputElement=Ze.DOCUMENT.createElement("input"),n._inputElement.placeholder="Filter by name...",n._div.appendChild(n._inputElement),n._inputElement.addEventListener("keyup",function(e){var t=n._inputElement.value;n._propTab.filter(t)}),n}return Q(t,e),t.prototype.reset=function(){this._inputElement.value=""},t.prototype.update=function(){},t}(s),ee=function(e){function t(t){var n=e.call(this)||this;n._detailTab=t,n._div.classList.add("searchbar");var r=Ze.DOCUMENT.createElement("i");return r.className="fa fa-search",n._div.appendChild(r),n._inputElement=Ze.DOCUMENT.createElement("input"),n._inputElement.placeholder="Filter by name...",n._div.appendChild(n._inputElement),n._inputElement.addEventListener("keyup",function(e){var t=n._inputElement.value;n._detailTab.searchByName(t)}),n}return Q(t,e),t.prototype.reset=function(){this._inputElement.value=""},t.prototype.update=function(){},t}(s),te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ne=function(e){function t(t){var n=e.call(this)||this;return n._detailRows=[],n._sortDirection={},n._build(),t&&(n._detailRows=t,n.update()),n}return te(t,e),Object.defineProperty(t.prototype,"details",{set:function(e){this.clean(),this._addSearchBarDetails(),this._details=et.CreateDiv("details",this._div),this._detailRows=e,this.update()},enumerable:!0,configurable:!0}),t.prototype._build=function(){this._div.className="insp-details",this._div.id="insp-details",this._createHeaderRow(),this._div.appendChild(this._headerRow)},t.prototype.update=function(e){this._sortDetails("name",1),e?(this.cleanRow(),this._addSearchDetails(e)):this._addDetails()},t.prototype._addSearchBarDetails=function(){var e=et.CreateDiv("searchbar-details",this._div);this._searchDetails=new ee(this),e.appendChild(this._searchDetails.toHtml()),this._div.appendChild(e)},t.prototype.searchByName=function(e){for(var t=[],n=0,r=this._detailRows;n<r.length;n++){var i=r[n];i.name.indexOf(e)>=0&&t.push(i)}this.update(t)},t.prototype._addDetails=function(){for(var e=0,t=this._detailRows;e<t.length;e++){var n=t[e];this._details.appendChild(n.toHtml())}},t.prototype._addSearchDetails=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this._details.appendChild(r.toHtml())}},t.prototype._sortDetails=function(e,t){for(var n=Ze.DOCUMENT.querySelectorAll(".sort-direction"),r=0;r<n.length;r++)n[r].classList.remove("fa-chevron-up"),n[r].classList.remove("fa-chevron-down");t||!this._sortDirection[e]?this._sortDirection[e]=t||1:this._sortDirection[e]*=-1;var i=this._sortDirection[e],o=this._headerRow.querySelector("#sort-direction-"+e);o&&(1==i?(o.classList.remove("fa-chevron-down"),o.classList.add("fa-chevron-up")):(o.classList.remove("fa-chevron-up"),o.classList.add("fa-chevron-down")));var a=function(e){return"string"==typeof e||e instanceof String};this._detailRows.forEach(function(e){e.closeDetails()}),this._detailRows.sort(function(t,n){var r=String(t[e]),o=String(n[e]);return a(r)||(r=t[e].toString()),a(o)||(o=n[e].toString()),r.localeCompare(o,[],{numeric:!0})*i})},t.prototype.clean=function(){for(var e=0,t=this._detailRows;e<t.length;e++){t[e].dispose()}et.CleanDiv(this._div),this._div.appendChild(this._headerRow)},t.prototype.cleanRow=function(){for(var e=0,t=this._detailRows;e<t.length;e++){t[e].dispose()}et.CleanDiv(this._details)},t.prototype.dispose=function(){for(var e=0,t=this._detailRows;e<t.length;e++){t[e].dispose()}},t.prototype._createHeaderRow=function(){var e=this;this._headerRow=et.CreateDiv("header-row");var t=function(t,n){var r=et.CreateDiv(n+" header-col"),i=Ze.DOCUMENT.createElement("span");i.textContent=t.charAt(0).toUpperCase()+t.slice(1);var o=Ze.DOCUMENT.createElement("i");return o.className="sort-direction fa",o.id="sort-direction-"+t,r.appendChild(i),r.appendChild(o),r.addEventListener("click",function(n){e._sortDetails(t),e._addDetails()}),r};this._headerRow.appendChild(t("name","prop-name")),this._headerRow.appendChild(t("value","prop-value"))},t}(s),re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ie=function(e){function t(t,n){var r=e.call(this)||this;return r._isActive=!1,r._tabbar=t,r.name=n,r._build(),r}return re(t,e),t.prototype.isActive=function(){return this._isActive},t.prototype._build=function(){var e=this;this._div.className="tab",this._div.textContent=this.name,this._div.addEventListener("click",function(t){e._tabbar.switchTab(e)})},t.prototype.active=function(e){e?this._div.classList.add("active"):this._div.classList.remove("active"),this._isActive=e},t.prototype.update=function(){},t.prototype.getPanel=function(){return this._panel},t.prototype.filter=function(e){},t.prototype.select=function(e){},t.prototype.getPixelWidth=function(){var e=Ze.WINDOW.getComputedStyle(this._div);if(!e.marginLeft||!e.marginRight)return 0;var t=parseFloat(e.marginLeft.substr(0,e.marginLeft.length-2))||0,n=parseFloat(e.marginRight.substr(0,e.marginRight.length-2))||0;return(this._div.clientWidth||0)+t+n},t}(s),oe=n(1),ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i._treeItems=[],i._inspector=r,i._panel=et.CreateDiv("tab-panel"),i._panel.classList.add("searchable"),i._searchBar=new Z(i),i._panel.appendChild(i._searchBar.toHtml()),i._treePanel=et.CreateDiv("insp-tree",i._panel),i._detailsPanel=new ne,i._panel.appendChild(i._detailsPanel.toHtml()),oe([i._treePanel,i._detailsPanel.toHtml()],{blockDrag:i._inspector.popupMode,direction:"vertical"}),i.update(),i}return ae(t,e),t.prototype.dispose=function(){this._detailsPanel.dispose()},t.prototype.update=function(e){var t;e?t=e:(this._treeItems=this._getTree(),t=this._treeItems),et.CleanDiv(this._treePanel),this._detailsPanel.clean(),t.sort(function(e,t){return e.compareTo(t)});for(var n=0,r=t;n<r.length;n++){var i=r[n];this._treePanel.appendChild(i.toHtml())}},t.prototype.displayDetails=function(e){this.activateNode(e),this._detailsPanel.details=e.getDetails()},t.prototype.select=function(e){this.activateNode(e),this.displayDetails(e)},t.prototype.activateNode=function(e){if(this._treeItems)for(var t=0,n=this._treeItems;t<n.length;t++){n[t].active(!1)}e.active(!0)},t.prototype.getItemFor=function(e){for(var t=e,n=function(e,r){if(r.correspondsTo(e))return r;if(!(r.children.length>0))return null;for(var i=0,o=r.children;i<o.length;i++){var a=o[i],s=n(t,a);if(s)return s}return null},r=0,i=this._treeItems;r<i.length;r++){var o=i[r],a=n(t,o);if(a)return a}return null},t.prototype.filter=function(e){for(var t=[],n=0,r=this._treeItems;n<r.length;n++){var i=r[n];-1!=i.id.toLowerCase().indexOf(e.toLowerCase())&&t.push(i);for(var o=0,a=i.children;o<a.length;o++){-1!=a[o].id.toLowerCase().indexOf(e.toLowerCase())&&t.push(i)}}this.update(t)},t}(ie),pe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),le=function(e){function t(t,n){return e.call(this,t,"Camera",n)||this}return pe(t,e),t.prototype._getTree=function(){for(var e=[],t=0,n=this._inspector.scene.cameras;t<n.length;t++){var r=n[t];e.push(new $(this,new it(r)))}return e},t}(se),ce=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(e){function t(t,n){var i=e.call(this,t,"Console")||this;i._inspector=n,i._panel=et.CreateDiv("tab-panel");var o=et.CreateDiv("console-panel"),a=et.CreateDiv("console-panel");i._panel.appendChild(o),i._panel.appendChild(a),oe([o,a],{blockDrag:i._inspector.popupMode,sizes:[50,50],direction:"vertical"});var s=et.CreateDiv("console-panel-title",o);return s.textContent="Console logs",(s=et.CreateDiv("console-panel-title",a)).textContent="js logs",i._consolePanelContent=et.CreateDiv("console-panel-content",o),i._bjsPanelContent=et.CreateDiv("console-panel-content",a),i._bjsPanelContent.innerHTML=r.Tools.LogCache,r.Tools.OnNewCacheEntry=function(e){i._bjsPanelContent.innerHTML+=e,i._bjsPanelContent.scrollTop=i._bjsPanelContent.scrollHeight},i}return ce(t,e),t.prototype.dispose=function(){console.log=this._oldConsoleLog,console.warn=this._oldConsoleWarn,console.error=this._oldConsoleError},t.prototype.active=function(t){e.prototype.active.call(this,t),t&&(this._oldConsoleLog=console.log,this._oldConsoleWarn=console.warn,this._oldConsoleError=console.error,console.log=this._addConsoleLog.bind(this),console.warn=this._addConsoleWarn.bind(this),console.error=this._addConsoleError.bind(this))},t.prototype._message=function(e,t,n){et.CreateDiv("caller",this._consolePanelContent).textContent=n.replace(" "," "),et.CreateDiv(e,this._consolePanelContent).textContent=t.replace(" "," "),this._consolePanelContent.scrollTop=this._consolePanelContent.scrollHeight},t.prototype._addConsoleLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this._addConsoleLog.caller,r=null==n?"Window":"Function "+n.name+": ",i=0;i<e.length;i++)this._message("log",e[i],r),et.IsBrowserEdge()||this._oldConsoleLog(e[i])},t.prototype._addConsoleWarn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this._addConsoleLog.caller,r=null==n?"Window":n.name,i=0;i<e.length;i++)this._message("warn",e[i],r),et.IsBrowserEdge()||this._oldConsoleWarn(e[i])},t.prototype._addConsoleError=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this._addConsoleLog.caller,r=null==n?"Window":n.name,i=0;i<e.length;i++)this._message("error",e[i],r),et.IsBrowserEdge()||this._oldConsoleError(e[i])},t}(ie),de=n(2),he=n(4),fe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(e){function t(t,n){var i=e.call(this,t,"GLTF")||this;return i._detailsPanel=null,i._inspector=n,i._panel=et.CreateDiv("tab-panel"),i._actions=et.CreateDiv("gltf-actions",i._panel),i._actions.addEventListener("click",function(e){i._closeDetailsPanel()}),r.SceneLoader&&de.GLTFFileLoader&&de.GLTF2.GLTFLoader&&i._addImport(),he.GLTF2Export&&i._addExport(),i}return fe(t,e),Object.defineProperty(t,"IsSupported",{get:function(){return!!(r.SceneLoader&&de.GLTFFileLoader&&de.GLTF2.GLTFLoader)||!!he.GLTF2Export},enumerable:!0,configurable:!0}),t._Initialize=function(){r.SceneLoader.OnPluginActivatedObservable.add(function(e){"gltf"===e.name&&(t._ApplyLoaderDefaults(e),e.onValidatedObservable.add(function(e){t._ValidationResults=e,t._OnValidationResultsUpdated&&t._OnValidationResultsUpdated(e)}))})},t.prototype.dispose=function(){this._detailsPanel&&this._detailsPanel.dispose()},t.prototype._addImport=function(){var e=this;et.CreateDiv("gltf-title",this._actions).textContent="Import";var n=et.CreateDiv("gltf-actions",this._actions);t._GetLoaderDefaultsAsync().then(function(r){var i=et.CreateDiv("gltf-action",n);i.innerText="Loader",i.addEventListener("click",function(t){e._showLoaderDefaults(r),t.stopPropagation()}),et.CreateDiv("gltf-title",n).textContent="Extensions";var o=function(t){var i=r.extensions[t],o=et.CreateDiv("gltf-action",n);o.addEventListener("click",function(t){e._showLoaderExtensionDefaults(i)&&t.stopPropagation()});var a=et.CreateElement("span","gltf-checkbox",o);i.enabled&&a.classList.add("action","active"),a.addEventListener("click",function(){a.classList.toggle("active"),i.enabled=a.classList.contains("active")}),et.CreateElement("span",null,o).textContent=t};for(var a in r.extensions)o(a);var s=null,p=null;t._OnValidationResultsUpdated=function(e){s||(s=et.CreateDiv("gltf-title",n)),p||(p=et.CreateDiv("gltf-action",n)).addEventListener("click",function(e){t._ShowValidationResults(),e.stopPropagation()}),s.textContent="null"===e.uri?"Validation":"Validation - "+BABYLON.Tools.GetFilename(e.uri),t._FormatValidationResultsShort(p,e)},t._ValidationResults&&t._OnValidationResultsUpdated(t._ValidationResults)})},t._FormatValidationResultsShort=function(e,t){e.innerHTML="";var n="",r=function(e,t){e&&(n&&(n+=", "),n+=1===e?e+" "+t:e+" "+t+"s")},i=t.issues;r(i.numErrors,"error"),r(i.numWarnings,"warning"),r(i.numInfos,"info"),r(i.numHints,"hint");var o=et.CreateDiv("gltf-action",e),a=et.CreateElement("span","gltf-icon",o,i.numErrors?"The asset contains errors.":"The asset is valid.");a.textContent=i.numErrors?"":"",a.style.color=i.numErrors?"red":"green",et.CreateElement("span","gltf-icon",o).textContent=n||"No issues"},t._ShowValidationResults=function(){if(t._ValidationResults){var e=window.open("","_blank");e&&(e.document.title="glTF Validation Results",e.document.body.innerText=JSON.stringify(t._ValidationResults,null,2),e.document.body.style.whiteSpace="pre",e.document.body.style.fontFamily="monospace",e.document.body.style.fontSize="14px",e.focus())}},t._ApplyLoaderDefaults=function(e){var n=t._LoaderDefaults;if(n){for(var r in n)"extensions"!==r&&(e[r]=n[r]);e.onExtensionLoadedObservable.add(function(e){var t=n.extensions[e.name];for(var r in t)e[r]=t[r]})}},t._GetPublic=function(e){var t={};for(var n in e)if("name"!==n&&"_"!==n[0]){var r=e[n],i=typeof r;"object"!==i&&"function"!==i&&"undefined"!==i&&(t[n]=r)}return t},t._GetLoaderDefaultsAsync=function(){if(t._LoaderDefaults)return Promise.resolve(t._LoaderDefaults);var e=new r.NullEngine,n=new r.Scene(e),i=new de.GLTFFileLoader;t._LoaderDefaults=t._GetPublic(i),t._LoaderDefaults.extensions={},i.onExtensionLoadedObservable.add(function(e){t._LoaderDefaults.extensions[e.name]=t._GetPublic(e)});return i.importMeshAsync([],n,'{ "asset": { "version": "2.0" } }',"").then(function(){return e.dispose(),t._LoaderDefaults})},t.prototype._openDetailsPanel=function(){return this._detailsPanel||(this._detailsPanel=new ne,this._panel.appendChild(this._detailsPanel.toHtml()),this._split=oe([this._actions,this._detailsPanel.toHtml()],{blockDrag:this._inspector.popupMode,sizes:[50,50],direction:"vertical"})),this._detailsPanel.clean(),this._detailsPanel},t.prototype._closeDetailsPanel=function(){this._detailsPanel&&(this._detailsPanel.toHtml().remove(),this._detailsPanel.dispose(),this._detailsPanel=null),this._split&&(this._split.destroy(),delete this._split)},t.prototype._showLoaderDefaults=function(e){var t=this._openDetailsPanel(),n=new Array;for(var r in e)"extensions"!==r&&n.push(new m(new o(r,e,this._inspector.scene)));t.details=n},t.prototype._showLoaderExtensionDefaults=function(e){if(1===Object.keys(e).length)return!1;var t=this._openDetailsPanel(),n=new Array;for(var r in e)"enabled"!==r&&n.push(new m(new o(r,e,this._inspector.scene)));return t.details=n,!0},t.prototype._addExport=function(){var e=this;et.CreateDiv("gltf-title",this._actions).textContent="Export";var n=et.CreateDiv("gltf-actions",this._actions),r=et.CreateInput("gltf-input",n);r.placeholder="File name...";var i=et.CreateElement("button","gltf-button",n);i.innerText="Export GLB",i.addEventListener("click",function(){he.GLTF2Export.GLBAsync(e._inspector.scene,r.value||"scene",{shouldExportTransformNode:function(e){return!t._IsSkyBox(e)}}).then(function(e){e.downloadFiles()})})},t._IsSkyBox=function(e){if(e instanceof r.Mesh&&e.material){var t=e.material.reflectionTexture;if(t&&t.coordinatesMode===r.Texture.SKYBOX_MODE)return!0}return!1},t._LoaderDefaults=null,t._ValidationResults=null,t._OnValidationResultsUpdated=null,t}(ie);_e._Initialize();var be=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(e){function t(t){return e.call(this,t)||this}return be(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return et.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return et.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new G(this)),e},t.prototype.setVisible=function(e){this._obj.isVisible=e},t.prototype.isVisible=function(){return this._obj.isVisible},t}(i),me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ge=function(e){function t(t,n){return e.call(this,t,"GUI",n)||this}return me(t,e),t.prototype._getTree=function(){var e=this,t=[];if(!Ze.GUIObject)return t;for(var n=function(t){var r=t.children;if(r&&r.length>0){for(var i=new $(e,new ve(t)),o=0,a=r;o<a.length;o++){var s=a[o],p=n(s);i.add(p)}return i.update(),i}return new $(e,new ve(t))},r=0,i=this._inspector.scene.textures;r<i.length;r++){var o=i[r];if(o instanceof Ze.GUIObject.AdvancedDynamicTexture){var a=n(o._rootContainer);t.push(a)}}return t},t}(se),ye=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),we=function(e){function t(t){return e.call(this,t)||this}return ye(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return et.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return et.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new G(this)),e},t.prototype.setVisible=function(e){this._obj.setEnabled(e)},t.prototype.isVisible=function(){return this._obj.isEnabled()},t}(i),xe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ce=function(e){function t(t,n){return e.call(this,t,"Light",n)||this}return xe(t,e),t.prototype._getTree=function(){for(var e=[],t=0,n=this._inspector.scene.lights;t<n.length;t++){var r=n[t];e.push(new $(this,new we(r)))}return e},t}(se),Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pe=function(e){function t(t){return e.call(this,t)||this}return Te(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return et.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return et.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){return[]},t}(i),Ee=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oe=function(e){function t(t,n){return e.call(this,t,"Material",n)||this}return Ee(t,e),t.prototype._getTree=function(){for(var e=[],t=0,n=this._inspector.scene.materials;t<n.length;t++){var r=n[t];e.push(new $(this,new Pe(r)))}return e},t}(se),Le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Se=function(e){function t(t,n){return e.call(this,t,"Mesh",n)||this}return Le(t,e),t.prototype._getTree=function(){for(var e=this,t=new Array,n=new Array,i=function(o){var a=o.getDescendants(!0),s=new $(e,new J(o));if(a.length>0){for(var p=0,l=a;p<l.length;p++){var c=l[p];if(c instanceof r.TransformNode&&!et.IsSystemName(c.name)){var u=i(c);s.add(u)}}s.update()}if(null!=o.parent&&-1!=n.indexOf(o))for(var d=0,h=!0;d<t.length&&h;)o.name===t[d].id&&(t.splice(d,1),h=!1),d++;return n.push(o),s},o=this._inspector.scene,a=[],s=0,p=o.meshes;s<p.length;s++){var l=p[s];-1!=a.indexOf(l)||et.IsSystemName(l.name)||l.parent||a.push(l)}for(var c=0,u=o.transformNodes;c<u.length;c++){var d=u[c];-1!=a.indexOf(d)||et.IsSystemName(d.name)||d.parent||a.push(d)}for(var h=0,f=a;h<f.length;h++){l=f[h];if(-1==n.indexOf(l)&&!et.IsSystemName(l.name)){var _=i(l);t.push(_)}}return t},t}(se),De=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),je=function(e){function t(t,n){var r=e.call(this,t)||this;return r._isVisible=!1,r._viewer=n,r}return De(t,e),t.prototype.id=function(){var e="",t=this._obj;return t&&t.object&&(e=t.object.name||""),e},t.prototype.type=function(){return et.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return et.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new G(this)),e},t.prototype.setVisible=function(e){this._isVisible=e,e?this._viewer.showImpostor(this._obj):this._viewer.hideImpostor(this._obj)},t.prototype.isVisible=function(){return this._isVisible},t}(i),Ie=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ae=function(e){function t(t,n){return e.call(this,t,"Physics",n)||this}return Ie(t,e),t.prototype._getTree=function(){var e=new Array,t=this._inspector.scene;if(!t.isPhysicsEnabled())return e;this.viewer||(this.viewer=new r.Debug.PhysicsViewer(t));for(var n=0,i=t.meshes;n<i.length;n++){var o=i[n];o.physicsImpostor&&e.push(new $(this,new je(o.physicsImpostor,this.viewer)))}return e},t}(se),ke=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(e){function t(t,n){var i=e.call(this,t,"Scene")||this;i._skeletonViewers=[],i._inspector=n,i._panel=et.CreateDiv("tab-panel"),i._actions=et.CreateDiv("scene-actions",i._panel,""),i._detailsPanel=new ne,i._panel.appendChild(i._detailsPanel.toHtml());for(var a=[],s=0,p=et.GetAllLinesPropertiesAsString(i._inspector.scene,["interFramePerfCounter","lastFramePerfCounter","evaluateActiveMeshesDurationPerfCounter","renderDurationPerfCounter","particlesDurationPerfCounter","spriteDuractionPerfCounter"]);s<p.length;s++){var l=p[s],c=new m(new o(l,i._inspector.scene));a.push(c)}i._detailsPanel.details=a,oe([i._actions,i._detailsPanel.toHtml()],{blockDrag:i._inspector.popupMode,sizes:[50,50],direction:"vertical"});var u=et.CreateDiv("actions-title",i._actions,"Choose the way of rendering the scene.");u.textContent="Rendering mode";var d=et.CreateDiv("action-radio",i._actions,"Force scene rendering to points cloud : scene.forcePointsCloud");d.textContent="Point";var h=et.CreateDiv("action-radio",i._actions,"Force scene rendering to wireframe : scene.forceWireframe");h.textContent="Wireframe";var f=et.CreateDiv("action-radio",i._actions,"Force scene rendering to solid.");f.textContent="Solid",i._inspector.scene.forcePointsCloud?d.classList.add("active"):i._inspector.scene.forceWireframe?h.classList.add("active"):f.classList.add("active"),i._generateRadioAction([d,h,f]),d.addEventListener("click",function(){i._inspector.scene.forcePointsCloud=!0,i._inspector.scene.forceWireframe=!1}),h.addEventListener("click",function(){i._inspector.scene.forcePointsCloud=!1,i._inspector.scene.forceWireframe=!0}),f.addEventListener("click",function(){i._inspector.scene.forcePointsCloud=!1,i._inspector.scene.forceWireframe=!1}),(u=et.CreateDiv("actions-title",i._actions,"Choose which textures channels to display or not on materials. (Check to display)")).textContent="Textures channels",i._generateActionLine("Diffuse Texture",r.StandardMaterial.DiffuseTextureEnabled,function(e){r.StandardMaterial.DiffuseTextureEnabled=e},"StandardMaterial.DiffuseTextureEnabled"),i._generateActionLine("Ambient Texture",r.StandardMaterial.AmbientTextureEnabled,function(e){r.StandardMaterial.AmbientTextureEnabled=e},"StandardMaterial.AmbientTextureEnabled"),i._generateActionLine("Specular Texture",r.StandardMaterial.SpecularTextureEnabled,function(e){r.StandardMaterial.SpecularTextureEnabled=e},"StandardMaterial.SpecularTextureEnabled"),i._generateActionLine("Emissive Texture",r.StandardMaterial.EmissiveTextureEnabled,function(e){r.StandardMaterial.EmissiveTextureEnabled=e},"StandardMaterial.EmissiveTextureEnabled"),i._generateActionLine("Bump Texture",r.StandardMaterial.BumpTextureEnabled,function(e){r.StandardMaterial.BumpTextureEnabled=e},"StandardMaterial.BumpTextureEnabled"),i._generateActionLine("Opacity Texture",r.StandardMaterial.OpacityTextureEnabled,function(e){r.StandardMaterial.OpacityTextureEnabled=e},"StandardMaterial.OpacityTextureEnabled"),i._generateActionLine("Reflection Texture",r.StandardMaterial.ReflectionTextureEnabled,function(e){r.StandardMaterial.ReflectionTextureEnabled=e},"StandardMaterial.ReflectionTextureEnabled"),i._generateActionLine("Refraction Texture",r.StandardMaterial.RefractionTextureEnabled,function(e){r.StandardMaterial.RefractionTextureEnabled=e},"StandardMaterial.RefractionTextureEnabled"),i._generateActionLine("ColorGrading",r.StandardMaterial.ColorGradingTextureEnabled,function(e){r.StandardMaterial.ColorGradingTextureEnabled=e},"StandardMaterial.ColorGradingTextureEnabled"),i._generateActionLine("Lightmap Texture",r.StandardMaterial.LightmapTextureEnabled,function(e){r.StandardMaterial.LightmapTextureEnabled=e},"StandardMaterial.LightmapTextureEnabled"),i._generateActionLine("Fresnel",r.StandardMaterial.FresnelEnabled,function(e){r.StandardMaterial.FresnelEnabled=e},"StandardMaterial.FresnelEnabled"),(u=et.CreateDiv("actions-title",i._actions,"Choose which options to enable / disable on the scene. (Uncheck to disable).")).textContent="Options",i._generateActionLine("Animations",i._inspector.scene.animationsEnabled,function(e){i._inspector.scene.animationsEnabled=e},"scene.animationsEnabled"),i._generateActionLine("Collisions",i._inspector.scene.collisionsEnabled,function(e){i._inspector.scene.collisionsEnabled=e},"scene.collisionsEnabled"),i._generateActionLine("Fog",i._inspector.scene.fogEnabled,function(e){i._inspector.scene.fogEnabled=e},"scene.fogEnabled(boolean)"),i._generateActionLine("Lens flares",i._inspector.scene.lensFlaresEnabled,function(e){i._inspector.scene.lensFlaresEnabled=e},"scene.lensFlaresEnabled"),i._generateActionLine("Lights",i._inspector.scene.lightsEnabled,function(e){i._inspector.scene.lightsEnabled=e},"scene.lightsEnabled"),i._generateActionLine("Particles",i._inspector.scene.particlesEnabled,function(e){i._inspector.scene.particlesEnabled=e},"scene.particlesEnabled"),i._generateActionLine("Post-processes",i._inspector.scene.postProcessesEnabled,function(e){i._inspector.scene.postProcessesEnabled=e},"scene.postProcessesEnabled"),i._generateActionLine("Probes",i._inspector.scene.probesEnabled,function(e){i._inspector.scene.probesEnabled=e},"scene.probesEnabled"),i._generateActionLine("Procedural textures",i._inspector.scene.proceduralTexturesEnabled,function(e){i._inspector.scene.proceduralTexturesEnabled=e},"scene.proceduralTexturesEnabled"),i._generateActionLine("Render targets",i._inspector.scene.renderTargetsEnabled,function(e){i._inspector.scene.renderTargetsEnabled=e},"scene.renderTargetsEnabled"),i._generateActionLine("Shadows",i._inspector.scene.shadowsEnabled,function(e){i._inspector.scene.shadowsEnabled=e},"scene.shadowsEnabled"),i._generateActionLine("Skeletons",i._inspector.scene.skeletonsEnabled,function(e){i._inspector.scene.skeletonsEnabled=e},"scene.skeletonsEnabled"),i._generateActionLine("Sprites",i._inspector.scene.spritesEnabled,function(e){i._inspector.scene.spritesEnabled=e},"scene.spritesEnabled"),i._generateActionLine("Textures",i._inspector.scene.texturesEnabled,function(e){i._inspector.scene.texturesEnabled=e},"scene.texturesEnabled"),(u=et.CreateDiv("actions-title",i._actions,"Choose which audio rendering should be used.")).textContent="Audio";var _=et.CreateDiv("action-radio",i._actions,"Use Headphones mode.");_.textContent="Headphones";var b=et.CreateDiv("action-radio",i._actions,"Use Normal speakers mode.");return b.textContent="Normal speakers",i._generateActionLine("Disable audio",!i._inspector.scene.audioEnabled,function(e){i._inspector.scene.audioEnabled=!e},"Disable audio on the scene."),i._generateRadioAction([_,b]),i._inspector.scene.headphone?_.classList.add("active"):b.classList.add("active"),_.addEventListener("click",function(){i._inspector.scene.headphone=!0}),b.addEventListener("click",function(){i._inspector.scene.headphone=!1}),(u=et.CreateDiv("actions-title",i._actions,"Viewer")).textContent="Viewer",i._generateActionLine("Skeletons",!1,function(e){if(e)for(var t=0;t<i._inspector.scene.meshes.length;t++){var n=i._inspector.scene.meshes[t];if(n.skeleton){for(var o=!1,a=0;a<i._skeletonViewers.length;a++)if(i._skeletonViewers[a].skeleton===n.skeleton){o=!0;break}if(o)continue;var s=new r.Debug.SkeletonViewer(n.skeleton,n,i._inspector.scene);s.isEnabled=!0,i._skeletonViewers.push(s)}}else{for(t=0;t<i._skeletonViewers.length;t++)i._skeletonViewers[t].dispose();i._skeletonViewers=[]}},"Enable to see Skeletons on the scene : Debug.SkeletonViewer"),i}return ke(t,e),t.prototype.dispose=function(){this._detailsPanel.dispose()},t.prototype._generateActionLine=function(e,t,n,r){var i=et.CreateDiv("scene-actions",this._actions,r);i.textContent=e,i.classList.add("action"),t&&i.classList.add("active"),i.addEventListener("click",function(e){i.classList.toggle("active");var t=i.classList.contains("active");n(t)})},t.prototype._generateRadioAction=function(e){for(var t=function(t,n){for(var r=0,i=e;r<i.length;r++){i[r].classList.remove("active")}t.classList.add("active")},n=0,r=e;n<r.length;n++){var i=r[n];i.addEventListener("click",t.bind(this,i))}},t}(ie),Re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fe=function(e){function t(t){var n=e.call(this)||this;return n.playSound=t,n._elem.classList.add("fa-play"),n}return Re(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._playSound()},t.prototype._playSound=function(){var e=this;this._elem.classList.contains("fa-play")?(this._elem.classList.remove("fa-play"),this._elem.classList.add("fa-pause")):(this._elem.classList.remove("fa-pause"),this._elem.classList.add("fa-play")),this.playSound.setPlaying(function(){e._elem.classList.remove("fa-pause"),e._elem.classList.add("fa-play")})},t}(B),Ne=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Be=function(e){function t(t){return e.call(this,t)||this}return Ne(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return et.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return et.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new Fe(this)),e},t.prototype.setPlaying=function(e){this._obj.isPlaying?this._obj.pause():this._obj.play(),this._obj.onEndedObservable.addOnce(function(){e()})},t}(i),Ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ze=function(e){function t(t,n){return e.call(this,t,"Audio",n)||this}return Ve(t,e),t.prototype._getTree=function(){var e=this,t=new Array,n=this._inspector.scene;if(n.soundTracks)for(var r=0,i=n.soundTracks;r<i.length;r++){i[r].soundCollection.forEach(function(n){t.push(new $(e,new Be(n)))})}return t},t}(se),Ue=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ge=function(e){function t(t,n){var i=e.call(this,t,"Stats")||this;i._updatableProperties=[],i._inspector=n,i._scene=i._inspector.scene,i._engine=i._scene.getEngine(),i._glInfo=i._engine.getGlInfo(),i._connectToInstrumentation(),i._panel=et.CreateDiv("tab-panel"),i._panel.classList.add("stats-panel");var o=et.CreateDiv("stat-title1",i._panel),a=et.CreateElement("span","stats-fps");i._updatableProperties.push({elem:a,updateFct:function(){return r.Tools.Format(i._inspector.scene.getEngine().getFps(),0)+" fps"}});var s=et.CreateElement("span");s.textContent="js v"+r.Engine.Version+" - ",o.appendChild(s),o.appendChild(a),i._updateLoopHandler=i._update.bind(i),i._refreshRateCounter=0,i.refreshRate=4,(o=et.CreateDiv("stat-title2",i._panel)).textContent="Count",i._createStatLabel("Total meshes",i._panel);var p=et.CreateDiv("stat-value",i._panel);i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.meshes.length.toString()}}),i._createStatLabel("Draw calls",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._sceneInstrumentation.drawCallsCounter.current.toString()}}),i._createStatLabel("Texture collisions",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._sceneInstrumentation.textureCollisionsCounter.current.toString()}}),i._createStatLabel("Total lights",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.lights.length.toString()}}),i._createStatLabel("Total vertices",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getTotalVertices().toString()}}),i._createStatLabel("Total materials",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.materials.length.toString()}}),i._createStatLabel("Total textures",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.textures.length.toString()}}),i._createStatLabel("Active meshes",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getActiveMeshes().length.toString()}}),i._createStatLabel("Active indices",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getActiveIndices().toString()}}),i._createStatLabel("Active bones",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getActiveBones().toString()}}),i._createStatLabel("Active particles",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._scene.getActiveParticles().toString()}}),(o=et.CreateDiv("stat-title2",i._panel)).textContent="Duration",i._createStatLabel("Properties refresh rate (per second)",i._panel);p=et.CreateDiv("stat-value",i._panel);i._inputElement=Ze.DOCUMENT.createElement("input"),i._inputElement.value=i.refreshRate,p.appendChild(i._inputElement),i._inputElement.addEventListener("keyup",function(e){i.refreshRate=i._inputElement.value}),i._createStatLabel("Meshes selection",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.activeMeshesEvaluationTimeCounter.current)}}),i._createStatLabel("Render targets",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.renderTargetsRenderTimeCounter.current)}}),i._createStatLabel("Particles",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.particlesRenderTimeCounter.current)}}),i._createStatLabel("Sprites",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.spritesRenderTimeCounter.current)}}),i._createStatLabel("Animations",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.animationsTimeCounter.current)}}),i._createStatLabel("Physics",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.physicsTimeCounter.current)}}),i._createStatLabel("Render",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.renderTimeCounter.current)}}),i._createStatLabel("Frame",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.frameTimeCounter.current)}}),i._createStatLabel("Inter-frame",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(i._sceneInstrumentation.interFrameTimeCounter.current)}}),i._createStatLabel("GPU Frame time",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(1e-6*i._engineInstrumentation.gpuFrameTimeCounter.current)}}),i._createStatLabel("GPU Frame time (average)",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(1e-6*i._engineInstrumentation.gpuFrameTimeCounter.average)}}),i._createStatLabel("Potential FPS",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return r.Tools.Format(1e3/i._sceneInstrumentation.frameTimeCounter.current,0)}}),i._createStatLabel("Resolution",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getRenderWidth()+"x"+i._engine.getRenderHeight()}}),(o=et.CreateDiv("stat-title2",i._panel)).textContent="Extensions",i._createStatLabel("Std derivatives",i._panel);p=et.CreateDiv("stat-value",i._panel);i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().standardDerivatives?"Yes":"No"}}),i._createStatLabel("Compressed textures",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().s3tc?"Yes":"No"}}),i._createStatLabel("Hardware instances",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().instancedArrays?"Yes":"No"}}),i._createStatLabel("Texture float",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().textureFloat?"Yes":"No"}}),i._createStatLabel("32bits indices",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().uintIndices?"Yes":"No"}}),i._createStatLabel("Fragment depth",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().fragmentDepthSupported?"Yes":"No"}}),i._createStatLabel("High precision shaders",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().highPrecisionShaderSupported?"Yes":"No"}}),i._createStatLabel("Draw buffers",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().drawBuffersExtension?"Yes":"No"}}),i._createStatLabel("Vertex array object",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().vertexArrayObject?"Yes":"No"}}),i._createStatLabel("Timer query",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().timerQuery?"Yes":"No"}}),(o=et.CreateDiv("stat-title2",i._panel)).textContent="Caps.",i._createStatLabel("Stencil",i._panel);p=et.CreateDiv("stat-value",i._panel);i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.isStencilEnable?"Enabled":"Disabled"}}),i._createStatLabel("Max textures units",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().maxTexturesImageUnits.toString()}}),i._createStatLabel("Max textures size",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().maxTextureSize.toString()}}),i._createStatLabel("Max anisotropy",i._panel),p=et.CreateDiv("stat-value",i._panel),i._updatableProperties.push({elem:p,updateFct:function(){return i._engine.getCaps().maxAnisotropy.toString()}}),(o=et.CreateDiv("stat-title2",i._panel)).textContent="Info";p=et.CreateDiv("stat-infos",i._panel);return i._updatableProperties.push({elem:p,updateFct:function(){return"WebGL v"+i._engine.webGLVersion+" - "+i._glInfo.version+" - "+i._glInfo.renderer}}),i}return Ue(t,e),t.prototype._connectToInstrumentation=function(){this._sceneInstrumentation||(this._sceneInstrumentation=new r.SceneInstrumentation(this._scene),this._sceneInstrumentation.captureActiveMeshesEvaluationTime=!0,this._sceneInstrumentation.captureRenderTargetsRenderTime=!0,this._sceneInstrumentation.captureFrameTime=!0,this._sceneInstrumentation.captureRenderTime=!0,this._sceneInstrumentation.captureInterFrameTime=!0,this._sceneInstrumentation.captureParticlesRenderTime=!0,this._sceneInstrumentation.captureSpritesRenderTime=!0,this._sceneInstrumentation.capturePhysicsTime=!0,this._sceneInstrumentation.captureAnimationsTime=!0,this._engineInstrumentation=new r.EngineInstrumentation(this._engine),this._engineInstrumentation.captureGPUFrameTime=!0)},t.prototype._createStatLabel=function(e,t){var n=et.CreateDiv("stat-label",t);return n.textContent=e,n},t.prototype._update=function(){if(this._refreshRateCounter>1)this._refreshRateCounter--;else{for(var e=0,t=this._updatableProperties;e<t.length;e++){var n=t[e];n.elem.textContent=n.updateFct()}this._inspector.scene.getEngine().getFps()/this.refreshRate==1/0?this._refreshRateCounter=1:this._refreshRateCounter=this._inspector.scene.getEngine().getFps()/this.refreshRate}},t.prototype.dispose=function(){this._scene.unregisterAfterRender(this._updateLoopHandler),this._sceneInstrumentation.dispose(),this._sceneInstrumentation=null,this._engineInstrumentation.dispose(),this._engineInstrumentation=null},t.prototype.active=function(t){e.prototype.active.call(this,t),t&&(this._connectToInstrumentation(),this._scene.registerAfterRender(this._updateLoopHandler))},t}(ie),He=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),We=function(e){function t(t){return e.call(this,t)||this}return He(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return et.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return[]},t.prototype.getTools=function(){return new Array},t}(i),Ye=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qe=function(e){function t(t,n){var r=e.call(this,t,"Textures")||this;return r._treeItems=[],r._inspector=n,r._panel=et.CreateDiv("tab-panel"),r._treePanel=et.CreateDiv("insp-tree",r._panel),r._imagePanel=et.CreateDiv("insp-details",r._panel),oe([r._treePanel,r._imagePanel],{blockDrag:r._inspector.popupMode,direction:"vertical"}),r.update(),r}return Ye(t,e),t.prototype.dispose=function(){t.DDSPreview.dispose()},t.prototype.update=function(e){var t;e?t=e:(this._treeItems=this._getTree(),t=this._treeItems),et.CleanDiv(this._treePanel),et.CleanDiv(this._imagePanel),t.sort(function(e,t){return e.compareTo(t)});for(var n=0,r=t;n<r.length;n++){var i=r[n];this._treePanel.appendChild(i.toHtml())}},t.prototype._getTree=function(){for(var e=[],t=0,n=this._inspector.scene.textures;t<n.length;t++){var r=n[t];e.push(new $(this,new We(r)))}return e},t.prototype.displayDetails=function(e){this.activateNode(e),et.CleanDiv(this._imagePanel);var n=e.adapter.object,i=e.adapter.object.name.split(".").pop();if("png"==i||"jpg"==i||"gif"==i||"svg"==i)(s=et.CreateElement("img","texture-image",this._imagePanel)).style.width=this._imagePanel.style.width,s.style.height="auto",s.src=n.name;else if("dds"==i)if(null!=t.DDSPreview&&null!=t.DDSPreview.canvas)this._imagePanel.appendChild(t.DDSPreview.canvas),t.DDSPreview.insertPreview(e.adapter);else{var o=et.CreateElement("canvas","",this._imagePanel);o.style.outline="none",o.style.webkitTapHighlightColor="rgba(255,255,255,0)",o.id="babylonjs-inspector-textures-preview",t.DDSPreview=new Xe(e.adapter)}else{var a=[],s=et.CreateElement("img","texture-image",this._imagePanel);a.push(s);for(var p=0;p<5;p++)a.push(et.CreateElement("img","texture-image",this._imagePanel));if(n instanceof r.RenderTargetTexture){var l=this._inspector.scene,c=l.getEngine(),u=n.getSize(),d=n.clone();d.activeCamera=n.activeCamera,d.onBeforeRender=n.onBeforeRender,d.onAfterRender=n.onAfterRender,d.onBeforeRenderObservable=n.onBeforeRenderObservable,d.onAfterRenderObservable.add(function(e){r.Tools.DumpFramebuffer(u.width,u.height,c,function(t){return a[e].src=t})}),l.incrementRenderId(),l.resetCachedMaterial(),d.render(),d.dispose()}else if(n instanceof r.CubeTexture){var h=n.readPixels();(g=document.createElement("canvas")).id="MyCanvas",s.parentElement&&s.parentElement.appendChild(g);var f=g.getContext("2d"),_=n.getSize(),b=h.buffer.slice(0,_.height*_.width*4),v=new Uint8ClampedArray(b);new ImageData(6*_.width,_.height).data.set(v),(y=f.createImageData(6*_.width,_.height)).data.set(v),f.putImageData(y,0,0)}else if(n._canvas){var m=n._canvas.toDataURL("image/png");s.src=m}else if(n.url){var g;h=n.readPixels();(g=document.createElement("canvas")).id="MyCanvas",s.parentElement&&s.parentElement.appendChild(g);var y;f=g.getContext("2d"),_=n.getSize();(y=f.createImageData(_.width,_.height)).data.set(h),f.putImageData(y,0,0)}}},t.prototype.select=function(e){this.activateNode(e),this.displayDetails(e)},t.prototype.activateNode=function(e){if(this._treeItems)for(var t=0,n=this._treeItems;t<n.length;t++){n[t].active(!1)}e.active(!0)},t}(ie),Xe=function(){function e(e){this.canvas=document.getElementById("babylonjs-inspector-textures-preview"),this._engine=new BABYLON.Engine(this.canvas,!0),this._run(),this.insertPreview(e)}return e.prototype._run=function(){var e=this;this._scene=new BABYLON.Scene(this._engine),this._scene.clearColor=new BABYLON.Color4(.1412,.1412,.1412,1),new BABYLON.HemisphericLight("light",new BABYLON.Vector3(0,1,0),this._scene).intensity=1,this._camera=new BABYLON.ArcRotateCamera("Camera",0,1.57,5,r.Vector3.Zero(),this._scene),this._scene.activeCamera=this._camera,this._camera.attachControl(this.canvas),window.addEventListener("resize",function(){e._engine.resize()}),this._scene.executeWhenReady(function(){e._engine.runRenderLoop(function(){e._scene.render()})})},e.prototype.insertPreview=function(e){if(this._tex&&this._tex.dispose(),this._mat&&this._mat.dispose(),this._mesh&&this._mesh.dispose(),this._mat=new BABYLON.StandardMaterial("customMat",this._scene),"Texture"==e.type()){var t=BABYLON.Mesh.CreatePlane("previewPlane",3,this._scene);t.rotate(new BABYLON.Vector3(1,0,0),3.14),t.rotate(new BABYLON.Vector3(0,1,0),-1.57),this._mesh=t,this._tex=new BABYLON.Texture(e.object.name,this._scene),this._tex.invertZ=!0,this._tex.uScale=-1,this._mat.diffuseTexture=this._tex,this._mat.emissiveTexture=this._tex,this._mat.specularTexture=this._tex,this._mat.disableLighting=!0,t.material=this._mat}else if("BaseTexture"==e.type()){var n=BABYLON.Mesh.CreateBox("previewBox",3,this._scene);n.rotate(new BABYLON.Vector3(0,1,0),-.5),this._mesh=n,this._cubeTex=new BABYLON.CubeTexture(e.object.name,this._scene),this._mat.reflectionTexture=this._cubeTex,this._mat.reflectionTexture.coordinatesMode=BABYLON.Texture.SKYBOX_MODE,this._mat.disableLighting=!0,n.material=this._mat}this._engine.resize()},e.prototype.dispose=function(){this._engine.dispose(),this.canvas=null},e}(),Je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke=function(e){function t(t,n){var i=e.call(this,t,"Tools")||this;i._videoRecorder=null,i._inspector=n,i._scene=i._inspector.scene,i._panel=et.CreateDiv("tab-panel"),i._panel.classList.add("tools-panel");var o=et.CreateDiv("tool-title1",i._panel),a=et.CreateElement("span");a.textContent="js v"+r.Engine.Version+" - Tools",o.appendChild(a),(o=et.CreateDiv("tool-title2",i._panel)).textContent="Environment Texture (.dds, .env)";var s=Ze.DOCUMENT.createElement("div");s.className="tool-label-error",s.style.display="none";var p=et.CreateDiv(null,i._panel);(l=Ze.DOCUMENT.createElement("input")).className="tool-input",l.type="file",l.accept=".dds, .env",l.onchange=function(e){var t=e.target.files,n=null;if(t&&t.length&&(n=t[0]),!n)return s.style.display="block",void(s.textContent="Please, select a file first.");var o=n.name.toLowerCase().indexOf(".dds")>0,a=n.name.toLowerCase().indexOf(".env")>0;if(!o&&!a)return s.style.display="block",void(s.textContent="Please, select a dds or env file.");r.Tools.ReadFile(n,function(e){var t=new Blob([e],{type:"octet/stream"}),n=URL.createObjectURL(t);o?(i._scene.environmentTexture=r.CubeTexture.CreateFromPrefilteredData(n,i._scene,".dds"),s.style.display="none"):i._scene.environmentTexture=new r.CubeTexture(n,i._scene,void 0,void 0,void 0,function(){s.style.display="none"},function(e){e&&(s.style.display="block",s.textContent=e)},void 0,void 0,".env")},void 0,!0)},p.appendChild(l),i._scene.getEngine().premultipliedAlpha||(p=et.CreateDiv(null,i._panel),(l=Ze.DOCUMENT.createElement("input")).value="Compress current texture to .env",l.className="tool-input",l.type="button",l.onclick=function(){if(!i._scene.environmentTexture)return s.style.display="block",void(s.textContent="You must load an environment texture first.");i._scene.activeCamera?r.EnvironmentTextureTools.CreateEnvTextureAsync(i._scene.environmentTexture).then(function(e){var t=new Blob([e],{type:"octet/stream"});r.Tools.Download(t,"environment.env"),s.style.display="none"}).catch(function(e){s.style.display="block",s.textContent=e}):(s.style.display="block",s.textContent="An active camera is required.")},p.appendChild(l)),i._panel.appendChild(s),(o=et.CreateDiv("tool-title2",i._panel)).textContent="Capture";var l;p=et.CreateDiv(null,i._panel);if((l=Ze.DOCUMENT.createElement("input")).value="Take Screenshot",l.type="button",l.className="tool-input",l.onclick=function(){i._scene.activeCamera&&r.Tools.CreateScreenshot(i._scene.getEngine(),i._scene.activeCamera,{precision:.5})},p.appendChild(l),r.VideoRecorder&&r.VideoRecorder.IsSupported(i._scene.getEngine())){var c=Ze.DOCUMENT.createElement("input");c.value="Start Recording Video",c.type="button",c.className="tool-input",c.onclick=function(){i._videoRecorder||(i._videoRecorder=new r.VideoRecorder(i._scene.getEngine())),i._videoRecorder.isRecording?i._videoRecorder.stopRecording():(c.value="Stop Recording Video",i._videoRecorder.startRecording().then(function(){c.value="Start Recording Video"}))},p.appendChild(c)}return i}return Je(t,e),t.prototype.dispose=function(){},t}(ie),$e=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qe=function(e){function t(t,n){var i=e.call(this)||this;i._tabs=[],i._invisibleTabs=[],i._visibleTabs=[],i._inspector=t,i._tabs.push(new Me(i,i._inspector)),i._tabs.push(new ue(i,i._inspector)),i._tabs.push(new Ge(i,i._inspector)),i._meshTab=new Se(i,i._inspector),i._tabs.push(new qe(i,i._inspector)),i._tabs.push(i._meshTab),i._tabs.push(new Ce(i,i._inspector)),i._tabs.push(new Oe(i,i._inspector)),_e.IsSupported&&i._tabs.push(new _e(i,i._inspector)),Ze.GUIObject&&i._tabs.push(new ge(i,i._inspector)),i._tabs.push(new Ae(i,i._inspector)),i._tabs.push(new le(i,i._inspector)),r.Engine.audioEngine&&i._tabs.push(new ze(i,i._inspector)),i._tabs.push(new Ke(i,i._inspector)),i._toolBar=new N(i._inspector),i._build(),"string"==typeof n?n=i.getTabIndex(n):(!n||n<0||n>=i._tabs.length)&&(n=0),i._tabs[n].active(!0);for(var o=0,a=i._tabs;o<a.length;o++){var s=a[o];i._visibleTabs.push(s)}return i}return $e(t,e),t.prototype.update=function(){},t.prototype._build=function(){var e=this;this._div.className="tabbar",this._div.appendChild(this._toolBar.toHtml());for(var t=0,n=this._tabs;t<n.length;t++){var r=n[t];this._div.appendChild(r.toHtml())}this._moreTabsIcon=et.CreateElement("i","fa fa-angle-double-right more-tabs"),this._moreTabsPanel=et.CreateDiv("more-tabs-panel"),this._moreTabsIcon.addEventListener("click",function(){if("flex"==e._moreTabsPanel.style.display)e._moreTabsPanel.style.display="none";else{var t=e._div.parentNode;t.contains(e._moreTabsPanel)||t.appendChild(e._moreTabsPanel),et.CleanDiv(e._moreTabsPanel);for(var n=0,r=e._invisibleTabs;n<r.length;n++){var i=r[n];e._addInvisibleTabToPanel(i)}e._moreTabsPanel.style.display="flex"}})},t.prototype._addInvisibleTabToPanel=function(e){var t=this,n=et.CreateDiv("invisible-tab",this._moreTabsPanel);n.textContent=e.name,n.addEventListener("click",function(){t._moreTabsPanel.style.display="none",t.switchTab(e)})},t.prototype.switchTab=function(e){var t=this.getActiveTab();t&&t.dispose();for(var n=0,r=this._tabs;n<r.length;n++){r[n].active(!1)}e.active(!0),this._inspector.refresh()},t.prototype.switchMeshTab=function(e){if(this.switchTab(this._meshTab),e){var t=this._meshTab.getItemFor(e);t&&this._meshTab.select(t)}},t.prototype.getActiveTab=function(){for(var e=0,t=this._tabs;e<t.length;e++){var n=t[e];if(n.isActive())return n}return null},t.prototype.getActiveTabIndex=function(){for(var e=0;e<this._tabs.length;e++)if(this._tabs[e].isActive())return e;return 0},t.prototype.getTabIndex=function(e){for(var t=0;t<this._tabs.length;t++)if(this._tabs[t].name===e)return t;return 0},Object.defineProperty(t.prototype,"inspector",{get:function(){return this._inspector},enumerable:!0,configurable:!0}),t.prototype.getPixelWidth=function(){for(var e=0,t=0,n=this._visibleTabs;t<n.length;t++){e+=n[t].getPixelWidth()}return e+=this._toolBar.getPixelWidth(),this._div.contains(this._moreTabsIcon)&&(e+=30),e},t.prototype.updateWidth=function(){if(this._div.parentElement){for(var e=this._div.parentElement.clientWidth,t=this.getPixelWidth();this._visibleTabs.length>0&&t>e;){var n=this._visibleTabs.pop();if(!n)break;this._invisibleTabs.push(n),this._div.removeChild(n.toHtml()),t=this.getPixelWidth()+75}if(this._invisibleTabs.length>0&&t+75<e){var r=this._invisibleTabs.pop();r&&(this._div.appendChild(r.toHtml()),this._visibleTabs.push(r)),this._div.contains(this._moreTabsIcon)&&this._div.removeChild(this._moreTabsIcon)}this._invisibleTabs.length>0&&!this._div.contains(this._moreTabsIcon)&&this._div.appendChild(this._moreTabsIcon)}},t}(s),Ze=function(){function e(t,i,o,a,s){void 0===o&&(o=0),void 0===a&&(a=null);var p=this;if(this._popupMode=!1,this.onGUILoaded=new r.Observable,Promise.resolve().then(n.t.bind(null,12,7)).then(function(t){!t||void 0!==t&&-1!==Object.keys(t).indexOf("default")?r.Tools.LoadScript("https://preview.babylonjs.com/gui/babylon.gui.min.js",function(){e.GUIObject=BABYLON.GUI,p.onGUILoaded.notifyObservers(e.GUIObject),y(e.GUIObject)},function(){console.warn('Error : loading "babylon.gui.min.js". Please add script https://preview.babylonjs.com/gui/babylon.min.gui.js to the HTML file.')}):(e.GUIObject=t,p.onGUILoaded.notifyObservers(e.GUIObject),y(e.GUIObject))}),this._initialTab=o,this._parentElement=a,this._scene=t,e.DOCUMENT=window.document,e.WINDOW=window,i)this.openPopup(!0);else{var l=this._scene.getEngine().getRenderingCanvas(),c=l.parentElement,u=e.WINDOW.getComputedStyle(l);if(this._canvasStyle={width:et.Css(l,"width"),height:et.Css(l,"height"),position:u.position,top:u.top,bottom:u.bottom,left:u.left,right:u.right,padding:u.padding,paddingBottom:u.paddingBottom,paddingLeft:u.paddingLeft,paddingTop:u.paddingTop,paddingRight:u.paddingRight,margin:u.margin,marginBottom:u.marginBottom,marginLeft:u.marginLeft,marginTop:u.marginTop,marginRight:u.marginRight},this._parentElement){this._c2diwrapper=et.CreateDiv("insp-wrapper",this._parentElement),this._c2diwrapper.style.width="100%",this._c2diwrapper.style.height="100%",this._c2diwrapper.style.paddingLeft="5px",(g=et.CreateDiv("insp-right-panel",this._c2diwrapper)).style.width="100%",g.style.height="100%",this._buildInspector(g)}else{for(var d in this._c2diwrapper=et.CreateDiv("insp-wrapper"),this._canvasStyle)this._c2diwrapper.style[d]=this._canvasStyle[d];if(!u.width||!u.height||!u.left)return;var h=parseFloat(u.width.substr(0,u.width.length-2))||0,f=parseFloat(u.height.substr(0,u.height.length-2))||0;if("absolute"===u.position||"relative"===u.position){var _=parseFloat(u.left.substr(0,u.left.length-2))||0;h+_>=e.WINDOW.innerWidth&&(this._c2diwrapper.style.maxWidth=h-_+"px")}var b=this._getRelativeParent(l),v=h/b.clientWidth*100,m=f/b.clientHeight*100;this._c2diwrapper.style.width=v+"%",this._c2diwrapper.style.height=m+"%",l.style.position="static",l.style.width="100%",l.style.height="100%",l.style.paddingBottom="0",l.style.paddingLeft="0",l.style.paddingTop="0",l.style.paddingRight="0",l.style.margin="0",l.style.marginBottom="0",l.style.marginLeft="0",l.style.marginTop="0",l.style.marginRight="0",c&&c.replaceChild(this._c2diwrapper,l),this._c2diwrapper.appendChild(l);var g=et.CreateDiv("insp-right-panel",this._c2diwrapper);this._parentElement||oe([l,g],{direction:"horizontal",sizes:[75,25],onDrag:function(){et.SEND_EVENT("resize"),p._tabbar&&p._tabbar.updateWidth()}}),this._buildInspector(g)}et.SEND_EVENT("resize"),this._tabbar.updateWidth()}if(this.refresh(),s)for(var w=s.backgroundColor||"#242424",x=s.backgroundColorLighter||"#2c2c2c",C=s.backgroundColorLighter2||"#383838",T=s.backgroundColorLighter3||"#454545",P=s.color||"#ccc",E=s.colorTop||"#f29766",O=s.colorBot||"#5db0d7",L=e.DOCUMENT.querySelectorAll("style"),S=0;S<L.length;S++){-1!=L[S].innerHTML.indexOf("insp-wrapper")&&(L[S].innerHTML=L[S].innerHTML.replace(/#242424/g,w).replace(/#2c2c2c/g,x).replace(/#383838/g,C).replace(/#454545/g,T).replace(/#ccc/g,P).replace(/#f29766/g,E).replace(/#5db0d7/g,O))}}return e.prototype._getRelativeParent=function(t,n){if(!t.parentElement)return t;var r=e.WINDOW.getComputedStyle(t);return n?"relative"===r.position||"absolute"===r.position?t:this._getRelativeParent(t.parentElement,!0):"static"==r.position?t.parentElement:this._getRelativeParent(t.parentElement,!0)},e.prototype._buildInspector=function(e){this._tabbar=new Qe(this,this._initialTab),this._topPanel=et.CreateDiv("top-panel",e),this._topPanel.appendChild(this._tabbar.toHtml()),this._tabbar.updateWidth(),this._tabPanel=et.CreateDiv("tab-panel-content",this._topPanel)},Object.defineProperty(e.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"popupMode",{get:function(){return this._popupMode},enumerable:!0,configurable:!0}),e.prototype.filterItem=function(e){var t=this._tabbar.getActiveTab();t&&t.filter(e)},e.prototype.displayObjectDetails=function(e){this._tabbar.switchMeshTab(e)},e.prototype.refresh=function(){et.CleanDiv(this._tabPanel);var e=this._tabbar.getActiveTab();e&&(e.update(),this._tabPanel.appendChild(e.getPanel()),et.SEND_EVENT("resize"))},e.prototype.dispose=function(){if(!this._popupMode){var e=this._tabbar.getActiveTab();e&&e.dispose();var t=this._scene.getEngine().getRenderingCanvas();for(var n in this._canvasStyle)t.style[n]=this._canvasStyle[n];if(t.parentElement){var r=t.parentElement.parentElement;r&&(r.insertBefore(t,this._c2diwrapper),et.CleanDiv(this._c2diwrapper),this._c2diwrapper.remove(),et.SEND_EVENT("resize"))}}a.getInstance().dispose()},e.prototype.openPopup=function(t){var n=this,r=window.open("","js INSPECTOR","toolbar=no,resizable=yes,menubar=no,width=750,height=1000");if(r){r.document.title="js INSPECTOR";for(var i=e.DOCUMENT.querySelectorAll("style"),o=0;o<i.length;o++)r.document.body.appendChild(i[o].cloneNode(!0));for(var a=document.querySelectorAll("link"),s=0;s<a.length;s++){var p=r.document.createElement("link");p.rel="stylesheet",p.href=a[s].href,r.document.head&&r.document.head.appendChild(p)}t||this.dispose(),this._popupMode=!0,e.DOCUMENT=r.document,e.WINDOW=r,this._c2diwrapper=et.CreateDiv("insp-wrapper",r.document.body);var l=et.CreateDiv("insp-right-panel",this._c2diwrapper);l.classList.add("popupmode"),this._buildInspector(l),this.refresh(),r.addEventListener("resize",function(){n._tabbar&&n._tabbar.updateWidth()})}else alert("Please update your browser to open the js inspector in an external view.")},e.prototype.getActiveTabIndex=function(){return this._tabbar.getActiveTabIndex()},e}(),et=function(){function e(){}return e.GET_TYPE=function(e){if("boolean"==typeof e)return"boolean";if(null!=e&&void 0!=e){var t=r.Tools.GetClassName(e);return t&&"object"!==t||(t=e.constructor.name)||(t=this._GetFnName(e.constructor)),this._CheckIfTypeExists(t)?t:this._GetTypeFor(e)}return"type_not_defined"},e._CheckIfTypeExists=function(e){return!!b[e]},e.IsBrowserEdge=function(){return/Edge/.test(navigator.userAgent)},e.IsBrowserIE=function(){return/Trident.*rv\:11\./.test(navigator.userAgent)},e._GetTypeFor=function(e){for(var t in b){var n=b[t];if(n.type&&e instanceof n.type)return t}return"type_not_defined"},e._GetFnName=function(e){var t="function"==typeof e,n=t&&(e.name&&["",e.name]||e.toString().match(/function ([^\(]+)/));return t?n&&n[1]||"anonymous":"not a function"},e.SEND_EVENT=function(e){var t;Ze.DOCUMENT.createEvent?(t=Ze.DOCUMENT.createEvent("HTMLEvents")).initEvent(e,!0,!0):t=new Event(e),window.dispatchEvent(t)},e.Trunc=function(e){return"number"!=typeof e?0:Math.round(e)!==e?e.toFixed(2):e},e.CreateDiv=function(t,n,r){return void 0===t&&(t=null),e.CreateElement("div",t,n,r)},e.CreateInput=function(t,n,r){return e.CreateElement("input",t,n,r)},e.CreateElement=function(e,t,n,r){void 0===t&&(t=null);var i=Ze.DOCUMENT.createElement(e);return t&&(i.className=t),r&&""!=r&&(i.title=r),n&&n.appendChild(i),i},e.CleanDiv=function(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)},e.Css=function(t,n){var r=t.cloneNode(!0),i=e.CreateDiv("",Ze.DOCUMENT.body,"");i.style.display="none",i.appendChild(r);var o=Ze.WINDOW.getComputedStyle(r)[n];return i.parentNode&&i.parentNode.removeChild(i),o},e.LoadScript=function(){r.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js",function(t){e.CreateElement("script","",Ze.DOCUMENT.body,"").textContent=t,r.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/languages/glsl.min.js",function(t){e.CreateElement("script","",Ze.DOCUMENT.body,"").textContent=t,r.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/styles/zenburn.min.css",function(t){e.CreateElement("style","",Ze.DOCUMENT.body,"").textContent=t})},void 0,void 0,void 0,function(){console.log('Error : LoadFile "glsl.min.js"')})},void 0,void 0,void 0,function(){console.log('Error : LoadFile "highlight.min.js"')})},e.IsSystemName=function(e){return null!=e&&(0===e.indexOf("###")&&e.lastIndexOf("###")===e.length-3)},e.GetAllLinesProperties=function(t){for(var n=[],r=0,i=e.GetAllLinesPropertiesAsString(t);r<i.length;r++){var a=i[r],s=new o(a,t);n.push(new m(s))}return n},e.GetAllLinesPropertiesAsString=function(e,t){void 0===t&&(t=[]);var n=[];for(var r in e)-1===t.indexOf(r)&&"_"!==r.substring(0,1)&&"function"!=typeof e[r]&&n.push(r);return n},e.Capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e}(),tt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nt=function(e){function t(t){var n=e.call(this)||this;return n.cameraPOV=t,n._elem.id=n.cameraPOV.id(),n._elem.id==n.cameraPOV.getCurrentActiveCamera()?n._elem.classList.add("fa-check-circle"):n._elem.classList.add("fa-circle"),n}return tt(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._gotoPOV()},t.prototype._gotoPOV=function(){for(var e=Ze.DOCUMENT.querySelectorAll(".fa-check-circle"),t=0;t<e.length;t++)e[t].classList.remove("fa-check-circle"),e[t].classList.add("fa-circle");this.cameraPOV.setPOV(),this._elem.id==this.cameraPOV.getCurrentActiveCamera()&&(this._elem.classList.remove("fa-circle"),this._elem.classList.add("fa-check-circle"))},t}(B),rt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(e){function t(t){return e.call(this,t)||this}return rt(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return et.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return et.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new nt(this)),e},t.prototype.setPOV=function(){this._obj.getScene().switchActiveCamera(this._obj)},t.prototype.getCurrentActiveCamera=function(){var e=this._obj.getScene().activeCamera;return null!=e?e.name:"0"},t}(i),ot=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),at=function(e){function t(t){var n=e.call(this)||this;return n._div.className="color-element",n._div.style.backgroundColor=n._toRgba(t),n}return ot(t,e),t.prototype.update=function(e){e&&(this._div.style.backgroundColor=this._toRgba(e))},t.prototype._toRgba=function(e){if(e){var t=255*e.r|0,n=255*e.g|0,i=255*e.b|0,o=1;return e instanceof r.Color4&&(o=e.a),"rgba("+t+", "+n+", "+i+", "+o+")"}return""},t}(s);n.d(t,"Adapter",function(){return i}),n.d(t,"CameraAdapter",function(){return it}),n.d(t,"GUIAdapter",function(){return ve}),n.d(t,"LightAdapter",function(){return we}),n.d(t,"MaterialAdapter",function(){return Pe}),n.d(t,"MeshAdapter",function(){return J}),n.d(t,"PhysicsImpostorAdapter",function(){return je}),n.d(t,"SoundAdapter",function(){return Be}),n.d(t,"TextureAdapter",function(){return We}),n.d(t,"DetailPanel",function(){return ne}),n.d(t,"Property",function(){return o}),n.d(t,"PropertyFormatter",function(){return v}),n.d(t,"PropertyLine",function(){return m}),n.d(t,"BasicElement",function(){return s}),n.d(t,"ColorElement",function(){return at}),n.d(t,"ColorPickerElement",function(){return l}),n.d(t,"CubeTextureElement",function(){return u}),n.d(t,"HDRCubeTextureElement",function(){return h}),n.d(t,"SearchBar",function(){return Z}),n.d(t,"SearchBarDetails",function(){return ee}),n.d(t,"TextureElement",function(){return _}),n.d(t,"Tooltip",function(){return w}),n.d(t,"Helpers",function(){return et}),n.d(t,"Scheduler",function(){return a}),n.d(t,"CameraTab",function(){return le}),n.d(t,"ConsoleTab",function(){return ue}),n.d(t,"GLTFTab",function(){return _e}),n.d(t,"GUITab",function(){return ge}),n.d(t,"LightTab",function(){return Ce}),n.d(t,"MaterialTab",function(){return Oe}),n.d(t,"MeshTab",function(){return Se}),n.d(t,"PhysicsTab",function(){return Ae}),n.d(t,"PropertyTab",function(){return se}),n.d(t,"SceneTab",function(){return Me}),n.d(t,"SoundTab",function(){return ze}),n.d(t,"StatsTab",function(){return Ge}),n.d(t,"Tab",function(){return ie}),n.d(t,"TabBar",function(){return Qe}),n.d(t,"TextureTab",function(){return qe}),n.d(t,"ToolsTab",function(){return Ke}),n.d(t,"AbstractTool",function(){return x}),n.d(t,"DisposeTool",function(){return R}),n.d(t,"FullscreenTool",function(){return I}),n.d(t,"LabelTool",function(){return E}),n.d(t,"PauseScheduleTool",function(){return k}),n.d(t,"PickTool",function(){return L}),n.d(t,"PopupTool",function(){return D}),n.d(t,"RefreshTool",function(){return T}),n.d(t,"Toolbar",function(){return N}),n.d(t,"TreeItem",function(){return $}),n.d(t,"AbstractTreeTool",function(){return B}),n.d(t,"BoundingBox",function(){return z}),n.d(t,"CameraPOV",function(){return nt}),n.d(t,"Checkbox",function(){return G}),n.d(t,"DebugArea",function(){return W}),n.d(t,"Info",function(){return q}),n.d(t,"SoundInteractions",function(){return Fe}),n.d(t,"Inspector",function(){return Ze}),n.d(t,"PROPERTIES",function(){return b}),n.d(t,"guiLoaded",function(){return g}),n.d(t,"loadGUIProperties",function(){return y})},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),function(e){var r=n(3);n.d(t,"Inspector",function(){return r.Inspector}),n.d(t,"PROPERTIES",function(){return r.PROPERTIES}),n.d(t,"guiLoaded",function(){return r.guiLoaded}),n.d(t,"loadGUIProperties",function(){return r.loadGUIProperties}),n.d(t,"Adapter",function(){return r.Adapter}),n.d(t,"CameraAdapter",function(){return r.CameraAdapter}),n.d(t,"GUIAdapter",function(){return r.GUIAdapter}),n.d(t,"LightAdapter",function(){return r.LightAdapter}),n.d(t,"MaterialAdapter",function(){return r.MaterialAdapter}),n.d(t,"MeshAdapter",function(){return r.MeshAdapter}),n.d(t,"PhysicsImpostorAdapter",function(){return r.PhysicsImpostorAdapter}),n.d(t,"SoundAdapter",function(){return r.SoundAdapter}),n.d(t,"TextureAdapter",function(){return r.TextureAdapter}),n.d(t,"DetailPanel",function(){return r.DetailPanel}),n.d(t,"Property",function(){return r.Property}),n.d(t,"PropertyFormatter",function(){return r.PropertyFormatter}),n.d(t,"PropertyLine",function(){return r.PropertyLine}),n.d(t,"BasicElement",function(){return r.BasicElement}),n.d(t,"ColorElement",function(){return r.ColorElement}),n.d(t,"ColorPickerElement",function(){return r.ColorPickerElement}),n.d(t,"CubeTextureElement",function(){return r.CubeTextureElement}),n.d(t,"HDRCubeTextureElement",function(){return r.HDRCubeTextureElement}),n.d(t,"SearchBar",function(){return r.SearchBar}),n.d(t,"SearchBarDetails",function(){return r.SearchBarDetails}),n.d(t,"TextureElement",function(){return r.TextureElement}),n.d(t,"Tooltip",function(){return r.Tooltip}),n.d(t,"Helpers",function(){return r.Helpers}),n.d(t,"Scheduler",function(){return r.Scheduler}),n.d(t,"CameraTab",function(){return r.CameraTab}),n.d(t,"ConsoleTab",function(){return r.ConsoleTab}),n.d(t,"GLTFTab",function(){return r.GLTFTab}),n.d(t,"GUITab",function(){return r.GUITab}),n.d(t,"LightTab",function(){return r.LightTab}),n.d(t,"MaterialTab",function(){return r.MaterialTab}),n.d(t,"MeshTab",function(){return r.MeshTab}),n.d(t,"PhysicsTab",function(){return r.PhysicsTab}),n.d(t,"PropertyTab",function(){return r.PropertyTab}),n.d(t,"SceneTab",function(){return r.SceneTab}),n.d(t,"SoundTab",function(){return r.SoundTab}),n.d(t,"StatsTab",function(){return r.StatsTab}),n.d(t,"Tab",function(){return r.Tab}),n.d(t,"TabBar",function(){return r.TabBar}),n.d(t,"TextureTab",function(){return r.TextureTab}),n.d(t,"ToolsTab",function(){return r.ToolsTab}),n.d(t,"AbstractTool",function(){return r.AbstractTool}),n.d(t,"DisposeTool",function(){return r.DisposeTool}),n.d(t,"FullscreenTool",function(){return r.FullscreenTool}),n.d(t,"LabelTool",function(){return r.LabelTool}),n.d(t,"PauseScheduleTool",function(){return r.PauseScheduleTool}),n.d(t,"PickTool",function(){return r.PickTool}),n.d(t,"PopupTool",function(){return r.PopupTool}),n.d(t,"RefreshTool",function(){return r.RefreshTool}),n.d(t,"Toolbar",function(){return r.Toolbar}),n.d(t,"TreeItem",function(){return r.TreeItem}),n.d(t,"AbstractTreeTool",function(){return r.AbstractTreeTool}),n.d(t,"BoundingBox",function(){return r.BoundingBox}),n.d(t,"CameraPOV",function(){return r.CameraPOV}),n.d(t,"Checkbox",function(){return r.Checkbox}),n.d(t,"DebugArea",function(){return r.DebugArea}),n.d(t,"Info",function(){return r.Info}),n.d(t,"SoundInteractions",function(){return r.SoundInteractions});var i=void 0!==e?e:"undefined"!=typeof window?window:void 0;void 0!==i&&(i.INSPECTOR=r)}.call(this,n(6))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(8);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(10)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(t=e.exports=n(9)(!1)).push([e.i,"@import url(https://use.fontawesome.com/releases/v5.0.13/css/all.css);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Inconsolata);",""]),t.push([e.i,'.insp-wrapper {\n user-select: none;\n display: flex;\n font-size: 0.9em;\n font-family: "Inconsolata", sans-serif;\n background-color: #242424;\n /**\r\n * A tool contained in the tree panel (available for each item of the tree)\r\n */\n /**\r\n * The toolbar contains : \r\n * - a refresh tool - refresh the whole panel\r\n * - a popup tool - Open the inspector in a new panel\r\n * ...\r\n */\n /*\r\n* 1. Set to 0 height and width, and remove border for a slider without a thumb\r\n*/ }\n .insp-wrapper .gutter {\n background-color: #2c2c2c; }\n .insp-wrapper .gutter.gutter-vertical:not(.blocked) {\n cursor: ns-resize; }\n .insp-wrapper .gutter.gutter-horizontal:not(.blocked) {\n cursor: ew-resize; }\n .insp-wrapper .insp-right-panel {\n width: 750px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n flex-shrink: 0; }\n .insp-wrapper .insp-right-panel.popupmode {\n width: 100% !important; }\n .insp-wrapper .insp-right-panel .top-panel {\n width: 100%;\n height: 100%;\n position: relative;\n background-color: #242424;\n color: #ccc;\n font-size: 1em; }\n .insp-wrapper .insp-right-panel .top-panel .tab-panel-content {\n width: 100%;\n height: calc(100% - 50px); }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel {\n position: absolute;\n z-index: 10;\n top: 50px;\n right: 0;\n width: 100px;\n display: none;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: 1px solid #454545;\n background-color: #242424; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab {\n height: 25px;\n width: 100%;\n line-height: 25px;\n text-align: center;\n background-color: #2c2c2c;\n cursor: pointer; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab:hover {\n background-color: #383838; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab:active {\n background-color: #454545; }\n .insp-wrapper .tooltip {\n position: absolute;\n top: 50px;\n right: 0;\n color: #f29766;\n display: none;\n z-index: 4;\n font-family: "Inconsolata", sans-serif;\n padding: 2px;\n background-color: #242424;\n border: 1px solid #454545; }\n .insp-wrapper .treeTool {\n margin: 3px 8px 3px 3px;\n cursor: pointer;\n position: relative; }\n .insp-wrapper .treeTool:hover {\n color: #5db0d7; }\n .insp-wrapper .treeTool.active {\n color: #5db0d7; }\n .insp-wrapper .tab-panel {\n height: 100%; }\n .insp-wrapper .tab-panel.searchable {\n height: calc(100% - 30px - 10px); }\n .insp-wrapper .tab-panel .texture-image {\n max-height: 400px; }\n .insp-wrapper .tab-panel .scene-actions {\n overflow-y: auto;\n padding-left: 5px; }\n .insp-wrapper .tab-panel .scene-actions .actions-title {\n font-size: 1.1em;\n padding-bottom: 10px;\n border-bottom: 1px solid #5db0d7;\n margin: 10px 0 10px 0; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action, .insp-wrapper .tab-panel .scene-actions .action-radio, .insp-wrapper .tab-panel .scene-actions .action {\n height: 20px;\n line-height: 20px;\n width: 100%;\n cursor: pointer; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action:hover, .insp-wrapper .tab-panel .scene-actions .action-radio:hover, .insp-wrapper .tab-panel .scene-actions .action:hover {\n background-color: #2c2c2c; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action:active, .insp-wrapper .tab-panel .scene-actions .action-radio:active, .insp-wrapper .tab-panel .scene-actions .action:active {\n background-color: #383838; }\n .insp-wrapper .tab-panel .scene-actions .action-radio:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F111";\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action-radio.active:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F192";\n color: #5db0d7;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F0C8";\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action.active:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F14A";\n color: #5db0d7;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .shader-tree-panel {\n height: 30px; }\n .insp-wrapper .tab-panel .shader-tree-panel select {\n height: 30px;\n background-color: transparent;\n color: #ccc;\n height: 30px;\n width: 100%;\n max-width: 300px;\n padding-left: 15px;\n border: 1px solid #2c2c2c;\n outline: 1px solid #454545; }\n .insp-wrapper .tab-panel .shader-tree-panel select option {\n padding: 5px;\n color: gray; }\n .insp-wrapper .tab-panel .shader-panel {\n min-height: 100px;\n user-select: text;\n box-sizing: border-box;\n padding: 0 15px; }\n .insp-wrapper .tab-panel .shader-panel pre {\n margin: 0;\n white-space: pre-wrap; }\n .insp-wrapper .tab-panel .shader-panel pre code {\n background-color: #242424 !important;\n padding: 0;\n margin: 0; }\n .insp-wrapper .tab-panel .shader-panel .shader-panel-title {\n height: 25px;\n border-bottom: 1px solid #383838;\n text-transform: uppercase;\n line-height: 25px;\n margin-bottom: 10px; }\n .insp-wrapper .tab-panel .console-panel {\n min-height: 100px;\n user-select: text;\n box-sizing: border-box;\n padding: 0 15px; }\n .insp-wrapper .tab-panel .console-panel .console-panel-title {\n height: 25px;\n border-bottom: 1px solid #383838;\n text-transform: uppercase;\n line-height: 25px;\n margin-bottom: 10px; }\n .insp-wrapper .tab-panel .console-panel .console-panel-content {\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 30px); }\n .insp-wrapper .tab-panel .console-panel .defaut-line, .insp-wrapper .tab-panel .console-panel .log, .insp-wrapper .tab-panel .console-panel .warn, .insp-wrapper .tab-panel .console-panel .error, .insp-wrapper .tab-panel .console-panel .object {\n word-wrap: break-word;\n padding: 3px 0 3px 5px; }\n .insp-wrapper .tab-panel .console-panel .caller {\n padding: 3px 0 3px 0;\n color: #349ccd; }\n .insp-wrapper .tab-panel .console-panel .log {\n color: white; }\n .insp-wrapper .tab-panel .console-panel .warn {\n color: orange; }\n .insp-wrapper .tab-panel .console-panel .error {\n color: orangered; }\n .insp-wrapper .tab-panel .console-panel .object {\n color: #5db0d7; }\n .insp-wrapper .tab-panel.stats-panel {\n overflow-y: auto; }\n .insp-wrapper .tab-panel .stats-fps {\n font-weight: 600;\n color: #f29766; }\n .insp-wrapper .tab-panel .stat-title1 {\n font-size: 1.1em;\n padding: 10px; }\n .insp-wrapper .tab-panel .stat-title2 {\n margin: 10px 0 10px 0;\n font-size: 1.05em;\n border-bottom: 1px solid #5db0d7;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-label {\n display: inline-block;\n width: 80%;\n padding: 2px;\n background-color: #2c2c2c;\n border-bottom: 1px solid #242424;\n border-top: 1px solid #242424;\n height: 30px;\n line-height: 30px;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-value {\n display: inline-block;\n width: 20%;\n padding: 2px;\n background-color: #2c2c2c;\n border-top: 1px solid #242424;\n border-bottom: 1px solid #242424;\n height: 30px;\n line-height: 30px;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-infos {\n width: 100%;\n padding: 4px; }\n .insp-wrapper .tab-panel .gltf-actions {\n overflow-y: auto;\n padding-left: 5px; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-title {\n font-size: 1.1em;\n padding-bottom: 10px;\n border-bottom: 1px solid #5db0d7;\n margin: 10px 0 10px 0; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-action, .insp-wrapper .tab-panel .gltf-actions .gltf-checkbox {\n height: 20px;\n line-height: 20px;\n width: 100%;\n cursor: pointer;\n white-space: nowrap; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-action:hover, .insp-wrapper .tab-panel .gltf-actions .gltf-checkbox:hover {\n background-color: #2c2c2c; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-icon {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-checkbox:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F0C8";\n margin-right: 10px; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-checkbox.active:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F14A";\n color: #5db0d7;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-input {\n background-color: #2c2c2c;\n border: none;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #b3b3b3;\n padding: 5px;\n margin: 0px 6px 0px 0; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-input:hover {\n background-color: #383838; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-button {\n background-color: #2c2c2c;\n border: none;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #ccc;\n padding: 5px 10px;\n margin: 0px 6px 0px 0; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-button:hover {\n background-color: #383838; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-button:active {\n background-color: #454545; }\n .insp-wrapper .tab-panel.tools-panel {\n overflow-y: auto; }\n .insp-wrapper .tab-panel .tool-title1 {\n font-size: 1.1em;\n padding: 10px; }\n .insp-wrapper .tab-panel .tool-title2 {\n margin: 10px 0 10px 0;\n font-size: 1.05em;\n border-bottom: 1px solid #5db0d7;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .tool-label, .insp-wrapper .tab-panel .tool-label-line, .insp-wrapper .tab-panel .tool-label-error {\n background-color: #2c2c2c;\n border: none;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #b3b3b3;\n padding: 5px;\n margin: 0px 6px 0px 0; }\n .insp-wrapper .tab-panel .tool-label-line {\n width: 100%; }\n .insp-wrapper .tab-panel .tool-label-error {\n color: #fa371d;\n width: 100%;\n background-color: none; }\n .insp-wrapper .tab-panel .tool-value {\n display: inline-block;\n width: 25%;\n padding: 2px;\n background-color: #2c2c2c;\n border-top: 1px solid #242424;\n border-bottom: 1px solid #242424;\n height: 30px;\n line-height: 30px;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .tool-infos {\n width: 100%;\n padding: 4px; }\n .insp-wrapper .tab-panel .tool-input {\n background-color: #2c2c2c;\n border: none;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #ccc;\n padding: 5px 10px;\n margin: 0px 6px 0px 0;\n width: 100%;\n border-top: 1px solid #242424;\n border-bottom: 1px solid #242424;\n text-align: left; }\n .insp-wrapper .tab-panel .tool-input:hover {\n background-color: #383838;\n cursor: pointer; }\n .insp-wrapper .tab-panel .tool-input:active {\n background-color: #454545; }\n .insp-wrapper .property-type {\n color: #5db0d7; }\n .insp-wrapper .property-name, .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name {\n color: #f29766; }\n .insp-wrapper .insp-tree {\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(50% - 50px - 30px); }\n .insp-wrapper .insp-tree .line {\n padding: 3px;\n cursor: pointer; }\n .insp-wrapper .insp-tree .line:hover {\n background-color: #2c2c2c; }\n .insp-wrapper .insp-tree .line.active {\n background-color: #454545; }\n .insp-wrapper .insp-tree .line.active .line-content {\n background-color: #242424; }\n .insp-wrapper .insp-tree .line.unfolded:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F107";\n font-weight: 900; }\n .insp-wrapper .insp-tree .line.folded:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F105";\n font-weight: 900; }\n .insp-wrapper .insp-tree .line.unfolded.transformNode > span:first-of-type {\n color: #f29766; }\n .insp-wrapper .insp-tree .line.folded.transformNode > span:first-of-type {\n color: #f29766; }\n .insp-wrapper .insp-tree .line .line-content {\n padding-left: 15px; }\n .insp-wrapper .insp-tree .line .line-content:hover {\n background-color: #242424; }\n .insp-wrapper .insp-tree .line .line-content .line:hover:first-child {\n background-color: #383838; }\n .insp-wrapper .insp-tree .line_invisible {\n display: none; }\n .insp-wrapper .insp-details {\n background-color: #242424;\n overflow-y: auto;\n overflow-x: auto;\n color: #ccc;\n font-family: "Inconsolata", sans-serif; }\n .insp-wrapper .insp-details .details {\n padding-left: 5px; }\n .insp-wrapper .insp-details .base-row, .insp-wrapper .insp-details .row, .insp-wrapper .insp-details .header-row {\n display: flex;\n width: 100%; }\n .insp-wrapper .insp-details .base-row .base-property, .insp-wrapper .insp-details .row .base-property, .insp-wrapper .insp-details .header-row .base-property, .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name, .insp-wrapper .insp-details .base-row .prop-value, .insp-wrapper .insp-details .row .prop-value, .insp-wrapper .insp-details .header-row .prop-value {\n padding: 2px 0 2px 0;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden; }\n .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name {\n width: 35%; }\n .insp-wrapper .insp-details .base-row .prop-value, .insp-wrapper .insp-details .row .prop-value, .insp-wrapper .insp-details .header-row .prop-value {\n width: 59%;\n padding-left: 5px; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable, .insp-wrapper .insp-details .row .prop-value.clickable, .insp-wrapper .insp-details .header-row .prop-value.clickable {\n cursor: pointer; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable:hover, .insp-wrapper .insp-details .row .prop-value.clickable:hover, .insp-wrapper .insp-details .header-row .prop-value.clickable:hover {\n background-color: #383838; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable:after, .insp-wrapper .insp-details .row .prop-value.clickable:after, .insp-wrapper .insp-details .header-row .prop-value.clickable:after {\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\A0 \\A0 \\A0 \\F105";\n font-weight: 900; }\n .insp-wrapper .insp-details .row:nth-child(even) {\n background-color: #2c2c2c; }\n .insp-wrapper .insp-details .row.unfolded .prop-value.clickable:after {\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\A0 \\A0 \\A0 \\F107";\n font-weight: 900; }\n .insp-wrapper .insp-details .header-row {\n background-color: #2c2c2c;\n color: #ccc;\n width: 100%;\n max-width: 100%; }\n .insp-wrapper .insp-details .header-row > * {\n color: #ccc !important;\n padding: 5px 0 5px 5px !important;\n cursor: pointer; }\n .insp-wrapper .insp-details .header-row > *:hover {\n background-color: #383838; }\n .insp-wrapper .insp-details .header-row .header-col {\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .insp-wrapper .insp-details .header-row .header-col .sort-direction {\n margin-right: 5px; }\n .insp-wrapper .insp-details .element-viewer, .insp-wrapper .insp-details .color-element, .insp-wrapper .insp-details .texture-element {\n position: relative;\n width: 10px;\n height: 10px;\n display: inline-block;\n margin-left: 5px; }\n .insp-wrapper .insp-details .color-element {\n width: 20px;\n height: 15px; }\n .insp-wrapper .insp-details .texture-element {\n color: #f29766;\n margin-left: 10px; }\n .insp-wrapper .insp-details .texture-element .texture-viewer {\n color: #ccc;\n position: absolute;\n z-index: 10;\n bottom: 0;\n right: 0;\n display: block;\n width: 150px;\n height: 150px;\n border: 1px solid #454545;\n background-color: #242424;\n transform: translateX(100%) translateY(100%);\n display: none;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center; }\n .insp-wrapper .insp-details .texture-element .texture-viewer .texture-viewer-img {\n margin: 10px 0 10px 0;\n max-width: 110px;\n max-height: 110px; }\n .insp-wrapper .tabbar {\n height: 50px;\n display: flex;\n align-items: center;\n border-bottom: 1px solid #383838;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n box-sizing: border-box; }\n .insp-wrapper .tabbar .tab {\n height: calc(50px - 2px);\n width: auto;\n padding: 0 10px 0 10px;\n color: #ccc;\n line-height: 50px;\n text-align: center;\n cursor: pointer;\n margin: 0 5px 0 5px;\n box-sizing: border-box; }\n .insp-wrapper .tabbar .tab:hover {\n border-bottom: 1px solid #f29766;\n background-color: #2c2c2c; }\n .insp-wrapper .tabbar .tab:active {\n background-color: #383838; }\n .insp-wrapper .tabbar .tab.active {\n border-bottom: 1px solid #f29766; }\n .insp-wrapper .tabbar .more-tabs {\n width: 50px;\n height: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n border-right: 1px solid #383838; }\n .insp-wrapper .tabbar .more-tabs:hover {\n background-color: #383838; }\n .insp-wrapper .tabbar .more-tabs:active {\n color: #f29766;\n background-color: #454545; }\n .insp-wrapper .tabbar .more-tabs.active {\n color: #f29766; }\n .insp-wrapper .toolbar {\n display: flex; }\n .insp-wrapper .toolbar .tool {\n width: 50px;\n height: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n border-right: 1px solid #383838; }\n .insp-wrapper .toolbar .tool:hover {\n background-color: #383838; }\n .insp-wrapper .toolbar .tool:active {\n color: #f29766;\n background-color: #454545; }\n .insp-wrapper .toolbar .tool.active {\n color: #f29766; }\n .insp-wrapper .searchbar {\n border: 1px solid #2c2c2c;\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n color: #b3b3b3; }\n .insp-wrapper .searchbar input {\n background-color: #242424;\n border: none;\n width: 100%;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #b3b3b3;\n padding: 3px 0 3px 10px;\n margin: 6px 0 6px 0; }\n .insp-wrapper input[type="range"] {\n margin: auto;\n -webkit-appearance: none;\n position: relative;\n overflow: hidden;\n height: 15px;\n width: 50%;\n cursor: pointer;\n border-radius: 0;\n /* iOS */ }\n .insp-wrapper ::-webkit-slider-runnable-track {\n background: #ddd; }\n .insp-wrapper ::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 20px;\n /* 1 */\n height: 15px;\n /* 1 */\n background: #fff;\n box-shadow: -100vw 0 0 100vw dodgerblue;\n border: 0px solid #999;\n /* 1 */ }\n .insp-wrapper ::-moz-range-track {\n height: 15px;\n background: #ddd; }\n .insp-wrapper ::-moz-range-thumb {\n background: #fff;\n height: 15px;\n width: 20px;\n border: 0px solid #999;\n border-radius: 0 !important;\n box-shadow: -100vw 0 0 100vw dodgerblue;\n box-sizing: border-box; }\n .insp-wrapper ::-ms-fill-lower {\n background: dodgerblue; }\n .insp-wrapper ::-ms-thumb {\n background: #fff;\n border: 0px solid #999;\n height: 15px;\n width: 20px;\n box-sizing: border-box; }\n .insp-wrapper ::-ms-ticks-after {\n display: none; }\n .insp-wrapper ::-ms-ticks-before {\n display: none; }\n .insp-wrapper ::-ms-track {\n background: #ddd;\n color: transparent;\n height: 15px;\n border: none; }\n .insp-wrapper ::-ms-tooltip {\n display: none; }\n',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),o=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(o).concat([i]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r={},i=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),o=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),a=null,s=0,p=[],l=n(11);function c(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=r[i.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](i.parts[a]);for(;a<i.parts.length;a++)o.parts.push(b(i.parts[a],t))}else{var s=[];for(a=0;a<i.parts.length;a++)s.push(b(i.parts[a],t));r[i.id]={id:i.id,refs:1,parts:s}}}}function u(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function d(e,t){var n=o(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=p[p.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),p.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=o(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,i)}}function h(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=p.indexOf(e);t>=0&&p.splice(t,1)}function f(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),_(t,e.attrs),d(e,t),t}function _(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function b(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var p=s++;n=a||(a=f(t)),r=m.bind(null,n,p,!1),i=m.bind(null,n,p,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",_(t,e.attrs),d(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=l(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){h(n),n.href&&URL.revokeObjectURL(n.href)}):(n=f(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){h(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=u(e,t);return c(n,t),function(e){for(var i=[],o=0;o<n.length;o++){var a=n[o];(s=r[a.id]).refs--,i.push(s)}e&&c(u(e,t),t);for(o=0;o<i.length;o++){var s;if(0===(s=i[o]).refs){for(var p=0;p<s.parts.length;p++)s.parts[p]();delete r[s.id]}}}};var v=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function m(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=v(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(e,t){e.exports=r}])});
  2. //# sourceMappingURL=babylon.inspector.bundle.js.map