webgl-3d-viewer
Version:
A WebGL ThreeJS STL viewer implementation written in ES6
2 lines • 107 kB
JavaScript
!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var o=n(1)["default"],r=n(13);n(14),n(18),window.ModelViewer=n(20),window.introJs=r.introJs,$(function(){localStorage&&"true"!==localStorage.getItem("disableTooltip")&&setTimeout(function(){$(".close-button").attr("data-intro","Click here to modify viewer settings");var t={tooltipPosition:"bottom-left",showBullets:!1,showStepNumbers:!1,disableInteraction:!0},e=(0,r.introJs)(),n=o(t);for(var i in n)i&&(e=e.setOption(n[i],t[n[i]]));e.start(),localStorage.setItem("disableTooltip",!0)},1500)})},function(t,e,n){t.exports={"default":n(2),__esModule:!0}},function(t,e,n){n(3),t.exports=n(9).Object.keys},function(t,e,n){var o=n(4);n(6)("keys",function(t){return function(e){return t(o(e))}})},function(t,e,n){var o=n(5);t.exports=function(t){return Object(o(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var o=n(7),r=n(9),i=n(12);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],a={};a[t]=e(n),o(o.S+o.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var o=n(8),r=n(9),i=n(10),a="prototype",s=function(t,e,n){var u,l,c,f=t&s.F,h=t&s.G,p=t&s.S,d=t&s.P,g=t&s.B,m=t&s.W,v=h?r:r[e]||(r[e]={}),b=h?o:p?o[e]:(o[e]||{})[a];h&&(n=e);for(u in n)l=!f&&b&&u in b,l&&u in v||(c=l?b[u]:n[u],v[u]=h&&"function"!=typeof b[u]?n[u]:g&&l?i(c,o):m&&b[u]==c?function(t){var e=function(e){return this instanceof t?new t(e):t(e)};return e[a]=t[a],e}(c):d&&"function"==typeof c?i(Function.call,c):c,d&&((v[a]||(v[a]={}))[u]=c))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(t,e,n){var o=n(11);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,r){return t.call(e,n,o,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){!function(t,n){n(e)}(this,function(t){function e(t){this._targetElement=t,this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",doneLabel:"Done",tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1}}function n(t){var e=[],n=this;if(this._options.steps)for(var s=0,u=this._options.steps.length;u>s;s++){var l=o(this._options.steps[s]);if(l.step=e.length+1,"string"==typeof l.element&&(l.element=document.querySelector(l.element)),"undefined"==typeof l.element||null==l.element){var c=document.querySelector(".introjsFloatingElement");null==c&&(c=document.createElement("div"),c.className="introjsFloatingElement",document.body.appendChild(c)),l.element=c,l.position="floating"}null!=l.element&&e.push(l)}else{if(u=t.querySelectorAll("*[data-intro]"),1>u.length)return!1;for(s=0,l=u.length;l>s;s++){var c=u[s],h=parseInt(c.getAttribute("data-step"),10);h>0&&(e[h-1]={element:c,intro:c.getAttribute("data-intro"),step:parseInt(c.getAttribute("data-step"),10),tooltipClass:c.getAttribute("data-tooltipClass"),highlightClass:c.getAttribute("data-highlightClass"),position:c.getAttribute("data-position")||this._options.tooltipPosition})}for(s=h=0,l=u.length;l>s;s++)if(c=u[s],null==c.getAttribute("data-step")){for(;"undefined"!=typeof e[h];)h++;e[h]={element:c,intro:c.getAttribute("data-intro"),step:h+1,tooltipClass:c.getAttribute("data-tooltipClass"),highlightClass:c.getAttribute("data-highlightClass"),position:c.getAttribute("data-position")||this._options.tooltipPosition}}}for(s=[],u=0;u<e.length;u++)e[u]&&s.push(e[u]);return e=s,e.sort(function(t,e){return t.step-e.step}),n._introItems=e,v.call(n,t)&&(r.call(n),t.querySelector(".introjs-skipbutton"),t.querySelector(".introjs-nextbutton"),n._onKeyDown=function(e){if(27===e.keyCode&&1==n._options.exitOnEsc)void 0!=n._introExitCallback&&n._introExitCallback.call(n),a.call(n,t);else if(37===e.keyCode)i.call(n);else if(39===e.keyCode)r.call(n);else if(13===e.keyCode){var o=e.target||e.srcElement;o&&0<o.className.indexOf("introjs-prevbutton")?i.call(n):o&&0<o.className.indexOf("introjs-skipbutton")?(n._introItems.length-1==n._currentStep&&"function"==typeof n._introCompleteCallback&&n._introCompleteCallback.call(n),void 0!=n._introExitCallback&&n._introExitCallback.call(n),a.call(n,t)):r.call(n),e.preventDefault?e.preventDefault():e.returnValue=!1}},n._onResize=function(t){f.call(n,document.querySelector(".introjs-helperLayer")),f.call(n,document.querySelector(".introjs-tooltipReferenceLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",n._onKeyDown,!0),window.addEventListener("resize",n._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",n._onKeyDown),document.attachEvent("onresize",n._onResize))),!1}function o(t){if(null==t||"object"!=typeof t||"undefined"!=typeof t.nodeType)return t;var e,n={};for(e in t)n[e]="undefined"!=typeof jQuery&&t[e]instanceof jQuery?t[e]:o(t[e]);return n}function r(){if(this._direction="forward","undefined"==typeof this._currentStep?this._currentStep=0:++this._currentStep,this._introItems.length<=this._currentStep)"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),a.call(this,this._targetElement);else{var t=this._introItems[this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,t.element),p.call(this,t)}}function i(){if(this._direction="backward",0===this._currentStep)return!1;var t=this._introItems[--this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,t.element),p.call(this,t)}function a(t){var e=t.querySelector(".introjs-overlay");if(null!=e){e.style.opacity=0,setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},500);var n=t.querySelector(".introjs-helperLayer");if(n&&n.parentNode.removeChild(n),(n=t.querySelector(".introjs-tooltipReferenceLayer"))&&n.parentNode.removeChild(n),(t=t.querySelector(".introjs-disableInteraction"))&&t.parentNode.removeChild(t),(t=document.querySelector(".introjsFloatingElement"))&&t.parentNode.removeChild(t),(t=document.querySelector(".introjs-showElement"))&&(t.className=t.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,"")),(t=document.querySelectorAll(".introjs-fixParent"))&&0<t.length)for(n=t.length-1;n>=0;n--)t[n].className=t[n].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown),this._currentStep=void 0}}function s(t,e,n,o){var r,i,a="";if(e.style.top=null,e.style.right=null,e.style.bottom=null,e.style.left=null,e.style.marginLeft=null,e.style.marginTop=null,n.style.display="inherit","undefined"!=typeof o&&null!=o&&(o.style.top=null,o.style.left=null),this._introItems[this._currentStep]){if(a=this._introItems[this._currentStep],a="string"==typeof a.tooltipClass?a.tooltipClass:this._options.tooltipClass,e.className=("introjs-tooltip "+a).replace(/^\s+|\s+$/g,""),i=this._introItems[this._currentStep].position,("auto"==i||"auto"==this._options.tooltipPosition)&&"floating"!=i){a=i,r=this._options.positionPrecedence.slice(),i=g();var s=b(e).height+10,f=b(e).width+20,h=b(t),p="floating";h.left+f>i.width||0>h.left+h.width/2-f?(c(r,"bottom"),c(r,"top")):(h.height+h.top+s>i.height&&c(r,"bottom"),0>h.top-s&&c(r,"top")),h.width+h.left+f>i.width&&c(r,"right"),0>h.left-f&&c(r,"left"),0<r.length&&(p=r[0]),a&&"auto"!=a&&-1<r.indexOf(a)&&(p=a),i=p}switch(a=b(t),t=b(e),r=g(),i){case"top":n.className="introjs-arrow bottom",u(a,15,t,r,e),e.style.bottom=a.height+20+"px";break;case"right":e.style.left=a.width+20+"px",a.top+t.height>r.height?(n.className="introjs-arrow left-bottom",e.style.top="-"+(t.height-a.height-20)+"px"):n.className="introjs-arrow left";break;case"left":1==this._options.showStepNumbers&&(e.style.top="15px"),a.top+t.height>r.height?(e.style.top="-"+(t.height-a.height-20)+"px",n.className="introjs-arrow right-bottom"):n.className="introjs-arrow right",e.style.right=a.width+20+"px";break;case"floating":n.style.display="none",e.style.left="50%",e.style.top="50%",e.style.marginLeft="-"+t.width/2+"px",e.style.marginTop="-"+t.height/2+"px","undefined"!=typeof o&&null!=o&&(o.style.left="-"+(t.width/2+18)+"px",o.style.top="-"+(t.height/2+18)+"px");break;case"bottom-right-aligned":n.className="introjs-arrow top-right",l(a,0,t,e),e.style.top=a.height+20+"px";break;case"bottom-middle-aligned":n.className="introjs-arrow top-middle",n=a.width/2-t.width/2,l(a,n,t,e)&&(e.style.right=null,u(a,n,t,r,e)),e.style.top=a.height+20+"px";break;default:n.className="introjs-arrow top",u(a,0,t,r,e),e.style.top=a.height+20+"px"}}}function u(t,e,n,o,r){return t.left+e+n.width>o.width?(r.style.left=o.width-n.width-t.left+"px",!1):(r.style.left=e+"px",!0)}function l(t,e,n,o){return 0>t.left+t.width-e-n.width?(o.style.left=-t.left+"px",!1):(o.style.right=e+"px",!0)}function c(t,e){-1<t.indexOf(e)&&t.splice(t.indexOf(e),1)}function f(t){if(t&&this._introItems[this._currentStep]){var e=this._introItems[this._currentStep],n=b(e.element),o=10;"floating"==e.position&&(o=0),t.setAttribute("style","width: "+(n.width+o)+"px; height:"+(n.height+o)+"px; top:"+(n.top-5)+"px;left: "+(n.left-5)+"px;")}}function h(){var t=document.querySelector(".introjs-disableInteraction");null===t&&(t=document.createElement("div"),t.className="introjs-disableInteraction",this._targetElement.appendChild(t)),f.call(this,t)}function p(t){"undefined"!=typeof this._introChangeCallback&&this._introChangeCallback.call(this,t.element);var e=this,n=document.querySelector(".introjs-helperLayer"),o=document.querySelector(".introjs-tooltipReferenceLayer"),u="introjs-helperLayer";if(b(t.element),"string"==typeof t.highlightClass&&(u+=" "+t.highlightClass),"string"==typeof this._options.highlightClass&&(u+=" "+this._options.highlightClass),null!=n){var l=o.querySelector(".introjs-helperNumberLayer"),c=o.querySelector(".introjs-tooltiptext"),p=o.querySelector(".introjs-arrow"),v=o.querySelector(".introjs-tooltip"),w=o.querySelector(".introjs-skipbutton"),x=o.querySelector(".introjs-prevbutton"),_=o.querySelector(".introjs-nextbutton");if(n.className=u,v.style.opacity=0,v.style.display="none",null!=l){var E=this._introItems[0<=t.step-2?t.step-2:0];(null!=E&&"forward"==this._direction&&"floating"==E.position||"backward"==this._direction&&"floating"==t.position)&&(l.style.opacity=0)}if(f.call(e,n),f.call(e,o),(E=document.querySelectorAll(".introjs-fixParent"))&&0<E.length)for(u=E.length-1;u>=0;u--)E[u].className=E[u].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");E=document.querySelector(".introjs-showElement"),E.className=E.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""),e._lastShowElementTimer&&clearTimeout(e._lastShowElementTimer),e._lastShowElementTimer=setTimeout(function(){null!=l&&(l.innerHTML=t.step),c.innerHTML=t.intro,v.style.display="block",s.call(e,t.element,v,p,l),o.querySelector(".introjs-bullets li > a.active").className="",o.querySelector('.introjs-bullets li > a[data-stepnumber="'+t.step+'"]').className="active",o.querySelector(".introjs-progress .introjs-progressbar").setAttribute("style","width:"+y.call(e)+"%;"),v.style.opacity=1,l&&(l.style.opacity=1),-1===_.tabIndex?w.focus():_.focus()},350)}else{var k=document.createElement("div"),x=document.createElement("div"),n=document.createElement("div"),j=document.createElement("div"),C=document.createElement("div"),M=document.createElement("div"),O=document.createElement("div"),L=document.createElement("div");k.className=u,x.className="introjs-tooltipReferenceLayer",f.call(e,k),f.call(e,x),this._targetElement.appendChild(k),this._targetElement.appendChild(x),n.className="introjs-arrow",C.className="introjs-tooltiptext",C.innerHTML=t.intro,M.className="introjs-bullets",!1===this._options.showBullets&&(M.style.display="none");for(var k=document.createElement("ul"),u=0,R=this._introItems.length;R>u;u++){var T=document.createElement("li"),S=document.createElement("a");S.onclick=function(){e.goToStep(this.getAttribute("data-stepnumber"))},u===t.step-1&&(S.className="active"),S.href="javascript:void(0);",S.innerHTML=" ",S.setAttribute("data-stepnumber",this._introItems[u].step),T.appendChild(S),k.appendChild(T)}M.appendChild(k),O.className="introjs-progress",!1===this._options.showProgress&&(O.style.display="none"),u=document.createElement("div"),u.className="introjs-progressbar",u.setAttribute("style","width:"+y.call(this)+"%;"),O.appendChild(u),L.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(L.style.display="none"),j.className="introjs-tooltip",j.appendChild(C),j.appendChild(M),j.appendChild(O),1==this._options.showStepNumbers&&(E=document.createElement("span"),E.className="introjs-helperNumberLayer",E.innerHTML=t.step,x.appendChild(E)),j.appendChild(n),x.appendChild(j),_=document.createElement("a"),_.onclick=function(){e._introItems.length-1!=e._currentStep&&r.call(e)},_.href="javascript:void(0);",_.innerHTML=this._options.nextLabel,x=document.createElement("a"),x.onclick=function(){0!=e._currentStep&&i.call(e)},x.href="javascript:void(0);",x.innerHTML=this._options.prevLabel,w=document.createElement("a"),w.className="introjs-button introjs-skipbutton",w.href="javascript:void(0);",w.innerHTML=this._options.skipLabel,w.onclick=function(){e._introItems.length-1==e._currentStep&&"function"==typeof e._introCompleteCallback&&e._introCompleteCallback.call(e),e._introItems.length-1!=e._currentStep&&"function"==typeof e._introExitCallback&&e._introExitCallback.call(e),a.call(e,e._targetElement)},L.appendChild(w),1<this._introItems.length&&(L.appendChild(x),L.appendChild(_)),j.appendChild(L),s.call(e,t.element,j,n,E)}for(!0===this._options.disableInteraction&&h.call(e),x.removeAttribute("tabIndex"),_.removeAttribute("tabIndex"),0==this._currentStep&&1<this._introItems.length?(x.className="introjs-button introjs-prevbutton introjs-disabled",x.tabIndex="-1",_.className="introjs-button introjs-nextbutton",w.innerHTML=this._options.skipLabel):this._introItems.length-1==this._currentStep||1==this._introItems.length?(w.innerHTML=this._options.doneLabel,x.className="introjs-button introjs-prevbutton",_.className="introjs-button introjs-nextbutton introjs-disabled",_.tabIndex="-1"):(x.className="introjs-button introjs-prevbutton",_.className="introjs-button introjs-nextbutton",w.innerHTML=this._options.skipLabel),_.focus(),t.element.className+=" introjs-showElement",E=d(t.element,"position"),"absolute"!==E&&"relative"!==E&&(t.element.className+=" introjs-relativePosition"),E=t.element.parentNode;null!=E&&"body"!==E.tagName.toLowerCase();)n=d(E,"z-index"),j=parseFloat(d(E,"opacity")),L=d(E,"transform")||d(E,"-webkit-transform")||d(E,"-moz-transform")||d(E,"-ms-transform")||d(E,"-o-transform"),(/[0-9]+/.test(n)||1>j||"none"!==L&&void 0!==L)&&(E.className+=" introjs-fixParent"),E=E.parentNode;m(t.element)||!0!==this._options.scrollToElement||(j=t.element.getBoundingClientRect(),E=g().height,n=j.bottom-(j.bottom-j.top),j=j.bottom-E,0>n||t.element.clientHeight>E?window.scrollBy(0,n-30):window.scrollBy(0,j+100)),"undefined"!=typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,t.element)}function d(t,e){var n="";return t.currentStyle?n=t.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(t,null).getPropertyValue(e)),n&&n.toLowerCase?n.toLowerCase():n}function g(){if(void 0!=window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight}}function m(t){return t=t.getBoundingClientRect(),0<=t.top&&0<=t.left&&t.bottom+80<=window.innerHeight&&t.right<=window.innerWidth}function v(t){var e=document.createElement("div"),n="",o=this;if(e.className="introjs-overlay","body"===t.tagName.toLowerCase())n+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",e.setAttribute("style",n);else{var r=b(t);r&&(n+="width: "+r.width+"px; height:"+r.height+"px; top:"+r.top+"px;left: "+r.left+"px;",e.setAttribute("style",n))}return t.appendChild(e),e.onclick=function(){1==o._options.exitOnOverlayClick&&(void 0!=o._introExitCallback&&o._introExitCallback.call(o),a.call(o,t))},setTimeout(function(){n+="opacity: "+o._options.overlayOpacity.toString()+";",e.setAttribute("style",n)},10),!0}function b(t){var e={};e.width=t.offsetWidth,e.height=t.offsetHeight;for(var n=0,o=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)n+=t.offsetLeft,o+=t.offsetTop,t=t.offsetParent;return e.top=o,e.left=n,e}function y(){return 100*(parseInt(this._currentStep+1,10)/this._introItems.length)}var w=function(t){if("object"==typeof t)return new e(t);if("string"==typeof t){if(t=document.querySelector(t))return new e(t);throw Error("There is no element with given selector.")}return new e(document.body)};return w.version="1.1.1",w.fn=e.prototype={clone:function(){return new e(this)},setOption:function(t,e){return this._options[t]=e,this},setOptions:function(t){var e,n=this._options,o={};for(e in n)o[e]=n[e];for(e in t)o[e]=t[e];return this._options=o,this},start:function(){return n.call(this,this._targetElement),this},goToStep:function(t){return this._currentStep=t-2,"undefined"!=typeof this._introItems&&r.call(this),this},nextStep:function(){return r.call(this),this},previousStep:function(){return i.call(this),this},exit:function(){return a.call(this,this._targetElement),this},refresh:function(){return f.call(this,document.querySelector(".introjs-helperLayer")),f.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),this},onbeforechange:function(t){if("function"!=typeof t)throw Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},onchange:function(t){if("function"!=typeof t)throw Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},onafterchange:function(t){if("function"!=typeof t)throw Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},oncomplete:function(t){if("function"!=typeof t)throw Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},onexit:function(t){if("function"!=typeof t)throw Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this}},t.introJs=w})},function(t,e,n){var o=n(15);"string"==typeof o&&(o=[[t.id,o,""]]);n(17)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(16)(),e.push([t.id,".introjs-overlay{position:absolute;z-index:999999;background-color:#000;opacity:0;background:-moz-radial-gradient(center,ellipse cover,rgba(0,0,0,0.4) 0,rgba(0,0,0,0.9) 100%);background:-webkit-gradient(radial,center center,0px,center center,100%,color-stop(0%,rgba(0,0,0,0.4)),color-stop(100%,rgba(0,0,0,0.9)));background:-webkit-radial-gradient(center,ellipse cover,rgba(0,0,0,0.4) 0,rgba(0,0,0,0.9) 100%);background:radial-gradient(center,ellipse cover,rgba(0,0,0,0.4) 0,rgba(0,0,0,0.9) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#66000000',endColorstr='#e6000000',GradientType=1);-ms-filter:\"alpha(opacity=50)\";filter:alpha(opacity=50);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-fixParent{z-index:auto!important;opacity:1.0!important;position:absolute!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;transform:none!important}.introjs-showElement,tr.introjs-showElement>td,tr.introjs-showElement>th{z-index:9999999!important}.introjs-disableInteraction{z-index:99999999!important;position:absolute}.introjs-relativePosition,tr.introjs-showElement>td,tr.introjs-showElement>th{position:relative}.introjs-helperLayer{position:absolute;z-index:9999998;background-color:#FFF;background-color:rgba(255,255,255,.9);border:1px solid #777;border:1px solid rgba(0,0,0,.5);-webkit-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 2px 15px rgba(0,0,0,.4);box-shadow:0 2px 15px rgba(0,0,0,.4);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-tooltipReferenceLayer{position:absolute;visibility:hidden;z-index:10000000;background-color:transparent;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-helperLayer *,.introjs-helperLayer *:before,.introjs-helperLayer *:after{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;-o-box-sizing:content-box;box-sizing:content-box}.introjs-helperNumberLayer{position:absolute;visibility:visible;top:-16px;left:-16px;z-index:9999999999!important;padding:2px;font-family:Arial,verdana,tahoma;font-size:13px;font-weight:bold;color:white;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.3);background:#ff3019;background:-webkit-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ff3019),color-stop(100%,#cf0404));background:-moz-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-webkit-gradient(linear,left top, left bottom,color-stop(0, #ff3019),to(#cf0404));background:linear-gradient(to bottom,#ff3019 0,#cf0404 100%);width:20px;height:20px;line-height:20px;border:3px solid white;-webkit-border-radius:50%;border-radius:50%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3019',endColorstr='#cf0404',GradientType=0);filter:progid:DXImageTransform.Microsoft.Shadow(direction=135,strength=2,color=ff0000);-webkit-box-shadow:0 2px 5px rgba(0,0,0,.4);box-shadow:0 2px 5px rgba(0,0,0,.4)}.introjs-arrow{border:5px solid white;content:'';position:absolute}.introjs-arrow.top{top:-10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent}.introjs-arrow.top-right{top:-10px;right:10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent}.introjs-arrow.top-middle{top:-10px;left:50%;margin-left:-5px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:white;border-left-color:transparent}.introjs-arrow.right{right:-10px;top:10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:white}.introjs-arrow.right-bottom{bottom:10px;right:-10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:white}.introjs-arrow.bottom{bottom:-10px;border-top-color:white;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.introjs-arrow.left{left:-10px;top:10px;border-top-color:transparent;border-right-color:white;border-bottom-color:transparent;border-left-color:transparent}.introjs-arrow.left-bottom{left:-10px;bottom:10px;border-top-color:transparent;border-right-color:white;border-bottom-color:transparent;border-left-color:transparent}.introjs-tooltip{position:absolute;visibility:visible;padding:10px;background-color:white;min-width:200px;max-width:300px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.4);box-shadow:0 1px 10px rgba(0,0,0,.4);-webkit-transition:opacity .1s ease-out;-moz-transition:opacity .1s ease-out;transition:opacity .1s ease-out}.introjs-tooltipbuttons{text-align:right;white-space:nowrap}.introjs-button{position:relative;overflow:visible;display:inline-block;padding:.3em .8em;border:1px solid #d4d4d4;margin:0;text-decoration:none;text-shadow:1px 1px 0 #fff;font:11px/normal sans-serif;color:#333;white-space:nowrap;cursor:pointer;outline:0;background-color:#ececec;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f4f4f4),to(#ececec));background-image:-moz-linear-gradient(#f4f4f4,#ececec);background-image:-webkit-gradient(linear,left top, left bottom,from(#f4f4f4),to(#ececec));background-image:-webkit-linear-gradient(#f4f4f4,#ececec);background-image:linear-gradient(#f4f4f4,#ececec);-webkit-background-clip:padding;-moz-background-clip:padding;-o-background-clip:padding-box;-webkit-border-radius:.2em;border-radius:.2em;zoom:1;*display:inline;margin-top:10px}.introjs-button:hover{border-color:#bcbcbc;text-decoration:none;-webkit-box-shadow:0 1px 1px #e3e3e3;box-shadow:0 1px 1px #e3e3e3}.introjs-button:focus,.introjs-button:active{background-image:-webkit-gradient(linear,0 0,0 100%,from(#ececec),to(#f4f4f4));background-image:-moz-linear-gradient(#ececec,#f4f4f4);background-image:-webkit-gradient(linear,left top, left bottom,from(#ececec),to(#f4f4f4));background-image:-webkit-linear-gradient(#ececec,#f4f4f4);background-image:linear-gradient(#ececec,#f4f4f4)}.introjs-button::-moz-focus-inner{padding:0;border:0}.introjs-skipbutton{margin-right:5px;color:#7a7a7a}.introjs-prevbutton{-webkit-border-radius:.2em 0 0 .2em;border-radius:.2em 0 0 .2em;border-right:0}.introjs-nextbutton{-webkit-border-radius:0 .2em .2em 0;border-radius:0 .2em .2em 0}.introjs-disabled,.introjs-disabled:hover,.introjs-disabled:focus{color:#9a9a9a;border-color:#d4d4d4;-webkit-box-shadow:none;box-shadow:none;cursor:default;background-color:#f4f4f4;background-image:none;text-decoration:none}.introjs-bullets{text-align:center}.introjs-bullets ul{clear:both;margin:15px auto 0;padding:0;display:inline-block}.introjs-bullets ul li{list-style:none;float:left;margin:0 2px}.introjs-bullets ul li a{display:block;width:6px;height:6px;background:#ccc;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;text-decoration:none}.introjs-bullets ul li a:hover{background:#999}.introjs-bullets ul li a.active{background:#999}.introjs-progress{overflow:hidden;height:10px;margin:10px 0 5px 0;-webkit-border-radius:4px;border-radius:4px;background-color:#ecf0f1}.introjs-progressbar{float:left;width:0;height:100%;font-size:10px;line-height:10px;text-align:center;background-color:#08c}.introjsFloatingElement{position:absolute;height:0;width:0;left:50%;top:50%}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<e.length;r++){var a=e[r];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(t,e,n){function o(t,e){for(var n=0;n<t.length;n++){var o=t[n],r=p[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(l(o.parts[i],e))}else{for(var a=[],i=0;i<o.parts.length;i++)a.push(l(o.parts[i],e));p[o.id]={id:o.id,refs:1,parts:a}}}}function r(t){for(var e=[],n={},o=0;o<t.length;o++){var r=t[o],i=r[0],a=r[1],s=r[2],u=r[3],l={css:a,media:s,sourceMap:u};n[i]?n[i].parts.push(l):e.push(n[i]={id:i,parts:[l]})}return e}function i(t,e){var n=m(),o=y[y.length-1];if("top"===t.insertAt)o?o.nextSibling?n.insertBefore(e,o.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),y.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function a(t){t.parentNode.removeChild(t);var e=y.indexOf(t);e>=0&&y.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function u(t){var e=document.createElement("link");return e.rel="stylesheet",i(t,e),e}function l(t,e){var n,o,r;if(e.singleton){var i=b++;n=v||(v=s(e)),o=c.bind(null,n,i,!1),r=c.bind(null,n,i,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(e),o=h.bind(null,n),r=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),o=f.bind(null,n),r=function(){a(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}function c(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=w(e,r);else{var i=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function f(t,e){var n=e.css,o=e.media;e.sourceMap;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function h(t,e){var n=e.css,o=(e.media,e.sourceMap);o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}var p={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},g=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=d(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,b=0,y=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=g()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=r(t);return o(n,e),function(t){for(var i=[],a=0;a<n.length;a++){var s=n[a],u=p[s.id];u.refs--,i.push(u)}if(t){var l=r(t);o(l,e)}for(var a=0;a<i.length;a++){var u=i[a];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete p[u.id]}}}};var w=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){var o=n(19);"string"==typeof o&&(o=[[t.id,o,""]]);n(17)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(16)(),e.push([t.id,'/*!\n * "Fork me on GitHub" CSS ribbon v0.1.22 | MIT License\n * Homepage: https://github.com/piscis/github-fork-ribbon-css-bem#readme\n * Author: Alexander Pirsig <self@pirsig.me>\n */\n.gfr__link,.gfr__link:hover,.gfr__link:visited{color:#fff;text-decoration:none;text-shadow:0 -1px rgba(0,0,0,.5);text-align:center;width:200px;line-height:20px;display:inline-block;padding:2px 0;border-width:1px 0;border-style:dotted;border-color:#fff;border-color:hsla(0,0%,100%,.7)}.gfr__wrapper{width:150px;height:150px;position:absolute;overflow:hidden;top:0;z-index:9999;pointer-events:none}.gfr__wrapper--absolute{position:absolute!important}.gfr__wrapper--fixed{position:fixed!important}.gfr__wrapper--left{left:0}.gfr__wrapper--left .gfr__ribbon{top:42px;left:-43px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);transform:rotate(-45deg)}.gfr__wrapper--right{right:0}.gfr__wrapper--right .gfr__ribbon{top:42px;right:-43px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg)}.gfr__wrapper--left-bottom{position:fixed;top:inherit;bottom:0;left:0}.gfr__wrapper--left-bottom .gfr__ribbon{top:80px;left:-43px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg)}.gfr__wrapper--right-bottom{position:fixed;top:inherit;bottom:0;right:0}.gfr__wrapper--right-bottom .gfr__ribbon{top:80px;right:-43px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);transform:rotate(-45deg)}.gfr__ribbon{position:absolute;padding:2px 0;background-image:-webkit-gradient(linear,left top,left bottom,from(transparent),to(rgba(0,0,0,.15)));background-image:-webkit-linear-gradient(top,transparent,rgba(0,0,0,.15));background-image:-webkit-gradient(linear,left top, left bottom,from(transparent),to(rgba(0,0,0,.15)));background-image:-moz-linear-gradient(top,transparent,rgba(0,0,0,.15));background-image:linear-gradient(to bottom,transparent,rgba(0,0,0,.15));-webkit-box-shadow:0 2px 3px 0 rgba(0,0,0,.5);box-shadow:0 2px 3px 0 rgba(0,0,0,.5);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;font-size:13px;z-index:9999;pointer-events:auto}.gfr__ribbon,.gfr__ribbon--red{background-color:#a00}.gfr__ribbon--green{background-color:#090}.gfr__ribbon--black{background-color:#333}.gfr__ribbon--orange{background-color:#f80}.gfr__ribbon--pink{background-color:#f3c}.gfr__ribbon--gray{background-color:#6d6d6d}.gfr__ribbon--white-black{background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,0)),to(hsla(0,0%,100%,.15)));background-image:-webkit-linear-gradient(top,hsla(0,0%,100%,0),hsla(0,0%,100%,.15));background-image:-webkit-gradient(linear,left top, left bottom,from(hsla(0,0%,100%,0)),to(hsla(0,0%,100%,.15)));background-image:-moz-linear-gradient(top,hsla(0,0%,100%,0),hsla(0,0%,100%,.15));background-image:linear-gradient(to bottom,hsla(0,0%,100%,0),hsla(0,0%,100%,.15));-webkit-box-shadow:0 2px 3px 0 hsla(0,0%,100%,.3);box-shadow:0 2px 3px 0 hsla(0,0%,100%,.3)}.gfr__ribbon--white-black .gfr__link,.gfr__ribbon--white-black .gfr__link:hover,.gfr__ribbon--white-black .gfr__link:visited{color:#333;border-color:#333;border-color:rgba(0,0,0,.7)}',""]);
},function(t,e,n){"use strict";var o=n(21)["default"];Object.defineProperty(e,"__esModule",{value:!0});var r=n(22),i=o(r);e["default"]=i["default"],t.exports=e["default"]},function(t,e){"use strict";e["default"]=function(t){return t&&t.__esModule?t:{"default":t}},e.__esModule=!0},function(t,e,n){"use strict";var o=n(23)["default"],r=n(27)["default"],i=n(21)["default"];Object.defineProperty(e,"__esModule",{value:!0});var a=n(28),s=i(a),u=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];r(this,t),this._domNode=e,this._config=n,this._viewer=null}return o(t,[{key:"zoomIn",value:function(){var t=arguments.length<=0||void 0===arguments[0]?2:arguments[0];this.viewer.controls.zoomIn(t)}},{key:"zoomOut",value:function(t){this.viewer.controls.zoomOut(t)}},{key:"togglePlane",value:function(){var t=this.viewer;return t.enablePlane(!t.config.plane)}},{key:"toggleModelWireframe",value:function(){var t=this.viewer;return t.enableModelWireframe(!t.config.wireframe)}},{key:"toggleAxis",value:function(){var t=this.viewer;return t.enableAxis(!t.config.axis)}},{key:"toggleSphere",value:function(){var t=this.viewer;return t.enableSphere(!t.config.sphere)}},{key:"toggleBoundingBox",value:function(){var t=this.viewer;return t.enableBoundingBox(!t.config.boundingBox)}},{key:"toggleAutoRotate",value:function(){var t=this.viewer;return t.enableAutoRotate(!t.config.autoRotate)}},{key:"toggleMaterial",value:function(){var t=this.viewer;return t.enableMaterial(!t.config.material)}},{key:"setModelColorByHexcode",value:function(t){return this.viewer.setModelColorByHexcode(t)}},{key:"load",value:function(t,e){return this.viewer.load(t,e)}},{key:"parse",value:function(t,e){return this.viewer.parse(t,e)}},{key:"reload",value:function(t){var e=this.viewer.loaderPath,n=this.viewer.loaderContent,o=this.viewer.config;this.viewer.destroy(),this._config=o,this._viewer=void 0,n?this.viewer.parse(n,t):e&&this.viewer.load(e,t)}},{key:"destroy",value:function(){return this._viewer&&this._viewer.destroy(),this._viewer=void 0,this._domNode=null,this._config=null,null}},{key:"viewer",get:function(){return this._viewer||(this._viewer=new s["default"](this._domNode,this._config)),this._viewer}},{key:"zoom",get:function(){return this.viewer.zoom},set:function(t){this.viewer.zoom=t}}]),t}();e["default"]=u,t.exports=e["default"]},function(t,e,n){"use strict";var o=n(24)["default"];e["default"]=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),o(t,r.key,r)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),e.__esModule=!0},function(t,e,n){t.exports={"default":n(25),__esModule:!0}},function(t,e,n){var o=n(26);t.exports=function(t,e,n){return o.setDesc(t,e,n)}},function(t,e){var n=Object;t.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(t,e){"use strict";e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},e.__esModule=!0},function(t,e,n){"use strict";var o=n(23)["default"],r=n(27)["default"],i=n(21)["default"];Object.defineProperty(e,"__esModule",{value:!0});var a=n(29),s=i(a),u=n(83),l=i(u),c=n(94),f=i(c),h=n(96),p=i(h),d=n(99),g=i(d),m=n(113),v=i(m),b=n(126),y=i(b),w=n(138),x=i(w),_=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];r(this,t),this.container=t._setupContainer(e),this.scene=null,this.camera=null,this.loader=null,this.model=null,this.controls=null,this.plane=null,this.axisHelper=null,this.sphere=null,this.boundingBox=null,this.modelWireframe=null,this.stats=null,this.group=null,this.config={},this.progressBar=null,this.loaderPath=null,this.loaderContent=null,this.defaultConfig={wireframe:!1,plane:!1,boundingBox:!1,sphere:!1,axis:!1,stats:null,autoRotate:!1,zoom:!1,dragDrop:!1,material:!0,startupAnimation:!1,fudge:1,progressBar:{}},this.config=(0,l["default"])(this.config,this.defaultConfig,n),this.config.stats&&(this.stats=this.config.stats),this.progressBar=new g["default"](this.container,this.config.progressBar),this.progressBar.show(),this.loaded=!1,this._resizeListener=null}return o(t,[{key:"load",value:function(t,e){var n=this;if(this.loaderPath===t)return!1;this._unload(),this._setupListener(),this.progressBar||(this.progressBar=new g["default"](this.container));var o=e||function(){},r=new v["default"],i=function(e){n.loaderPath=t,n._initializeGeometry(e,o),e.registry===!0&&n.progressBar.hide()},a=function(t){if(t){var e=Math.round(100*t.loaded/t.total);0>e?e=0:e>100&&(e=100),n.progressBar&&(n.progressBar.progress=e),100===e&&setTimeout(function(){n.progressBar&&n.progressBar.hide()},500)}},s=function(){n.progressBar&&n.progressBar.hide()};this.progressBar&&this.progressBar.show(),this.loader=r.load(t,i,a,s)}},{key:"parse",value:function(t,e){this.loaded&&(this._unload(),this._setupListener()),this.loaderContent=t;var n=e||function(){},o=new v["default"],r=o.parse(t);this.progressBar&&this.progressBar.hide(),this._initializeGeometry(r,n)}},{key:"enablePlane",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],e=this.config.plane;return e!==t&&(this.plane&&(this.group.remove(this.plane),this.plane=null),t===!0&&this._setupPlane(),this.config.plane=t),this.config.plane}},{key:"enableModelWireframe",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],e=this.config.wireframe;return t!==e&&(this.modelWireframe&&(this.group.remove(this.modelWireframe),this.modelWireframe=null),t===!0&&this._setupModelWireframe()),this.config.wireframe}},{key:"enableAxis",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],e=this.config.axis;return t!==e&&(this.axisHelper&&(this.group.remove(this.axisHelper),this.axisHelper=null),t===!0&&this._setupAxisHelper(),this.config.state=t),this.config.axis}},{key:"enableSphere",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],e=this.config.sphere;return t!==e&&(this.sphere&&(this.group.remove(this.sphere),this.sphere=null),t===!0&&this._setupSphereGrid(),this.config.sphere=t),this.config.sphere}},{key:"enableBoundingBox",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],e=this.config.boundingBox;return e!==t&&(this.boundingBox&&(this.group.remove(this.boundingBox),this.boundingBox=null),t===!0&&this._setupBoundingBox(),this.config.boundingBox=t),this.config.boundingBox}},{key:"enableAutoRotate",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],e=this.config.autoRotate;return this.model&&e!==t&&(this.controls.autoRotate=t,this.config.autoRotate=t),this.config.autoRotate}},{key:"enableMaterial",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];return this.model&&t!==this.config.material&&(t?this.group.add(this.model):this.group.remove(this.model),this.config.material=t),this.config.material}},{key:"setStats",value:function(t){this.stats=t}},{key:"setModelColor",value:function(t){this.model&&t&&(this.model.material.color=t)}},{key:"setModelColorByHexcode",value:function(t){if(t){var e=t.replace("#","0x"),n=new THREE.Color(parseInt(e,16));this.setModelColor(n)}}},{key:"render",value:function(){this.group&&this.renderer.render(this.scene,this.camera)}},{key:"animate",value:function(t){var e=this;this.stats&&this.stats.begin(),this.animationId=requestAnimationFrame(function(t){e.animate(t)}),this.controls&&this.controls.update(t),this.render(),this.stats&&this.stats.end()}},{key:"destroy",value:function(){this._unload(),this.container.remove()}},{key:"_setupCamera",value:function(){var t=this.container.clientHeight,e=this.container.clientWidth,n=new THREE.PerspectiveCamera(45,e/t,1,4e3);if(this.model){var o=this.model.geometry;o.computeBoundingSphere();var r=this.model.geometry.boundingSphere.radius,i=3*r;n.position.set(0,0,i*this.config.fudge)}this.camera=n}},{key:"_setupScene",value:function(){var t=new THREE.Scene,e=new THREE.Group;this.scene=t,this.group=e,this.scene.add(this.group)}},{key:"_setupControls",value:function(){if(this._setupCamera(),this.model){this.controls&&(this.controls.destroy(),this.controls=null);var t=this.config;this.model.geometry.registry===!0&&(t=(0,l["default"])({},this.config,this.model.geometry.controlsConfig),t.startupAnimation=!1),this.controls=new y["default"](this.container,this.camera,this.group,t)}}},{key:"_setupRenderer",value:function(){var t=this.container.clientHeight,e=this.container.clientWidth,n=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),o=window.devicePixelRatio||1;n.setClearColor(0,0),n.setPixelRatio(o),n.setSize(e,t),n.gammaInput=!0,n.gammaOutput=!0,n.shadowMap.enabled=!0,n.shadowMap.cullFace=THREE.CullFaceBack,this.container.appendChild(n.domElement),this.renderer=n}},{key:"_setupLights",value:function(){this.scene.add(new THREE.AmbientLight(13421772));var t=new THREE.SpotLight(13421772);t.angle=1.7,t.position.set(100,500,100);var e=new THREE.Object3D;e.position.set(0,0,0),t.target=e,this.scene.add(t)}},{key:"_setupAxisHelper",value:function(){if(this.model){this.axisHelper&&this.group.remove(this.axisHelper);var t=this.model.geometry;t.computeBoundingBox(),t.computeBoundingSphere();var e=(0,s["default"])(this.model.geometry.boundingBox.max);e=10*Math.ceil(~~(1.5*e)/10);var n=new THREE.AxisHelper(e);n.position.x=0,n.position.y=0,n.position.z=0,this.axisHelper=n,this.group.add(this.axisHelper),this.config.axis=!0}}},{key:"_setupPlane",value:function(){if(this.model){this.plane&&this.group.remove(this.plane);var t=this.model.geometry;t.computeBoundingBox(),t.computeBoundingSphere();var e=(0,s["default"])(this.model.geometry.boundingBox.max);e=10*Math.ceil(~~(1.1*e)/10);var n=new THREE.GridHelper(e,10),o=(new THREE.Box3).setFromObject(n);o.center(n.position),n.position.multiplyScalar(-1),n.position.y=-1*t.boundingSphere.center.y,this.plane=n,this.group.add(this.plane),this.config.plane=!0}}},{key:"_setupSphereGrid",value:function(){if(this.model){this.sphere&&this.group.remove(this.sphere);var t=this.model.geometry;t.computeBoundingBox(),t.computeBoundingSphere();var e=this.model.geometry.boundingBox.max,n=e.x,o=e.y,r=e.z,i=Math.sqrt(Math.pow(n,2)+Math.pow(o,2)+Math.pow(r,2)),a=10*Math.ceil(~~(.6*i)/10),s=new THREE.SphereGeometry(a,10,10),u=new THREE.MeshBasicMaterial({color:5071709,wireframe:!0}),l=new THREE.Mesh(s,u),c=(new THREE.Box3).setFromObject(l);c.center(l.position),l.position.multiplyScalar(-1),s.computeBoundingBox(),s.computeBoundingSphere(),l.position.x=s.boundingSphere.center.x,l.position.y=s.boundingSphere.center.y,l.position.z=s.boundingSphere.center.z,this.sphere=l,this.group.add(this.sphere),this.config.sphere=!0}}},{key:"_setupBoundingBox",value:function(){if(this.model){this.boundingBox&&this.group.remove(this.boundingBox);var t=new THREE.WireframeGeometry(this.model.geometry),e=new THREE.LineSegments(t);e.material.depthTest=!1,e.material.opacity=.25,e.material.transparent=!0;var n=(new THREE.Box3).setFromObject(e);n.center(e.position),e.position.multiplyScalar(-1),this.boundingBox=new THREE.BoxHelper(e),this.group.add(this.boundingBox),this.config.boundingBox=!0}}},{key:"_unload",value:function(){var t=this;if(cancelAnimationFrame(this.animationId),null!==this.scene){var e=(0,f["default"])(this.group.children,1);(0,p["default"])(e,function(e){t.group.remove(e)});var n=(0,f["default"])(this.scene.children,1);(0,p["default"])(n,function(e){t.scene.remove(e)})}if(this.scene=null,this.group=null,this.camera=null,this.loader=null,this.plane=null,this.axisHelper=null,this.renderer=null,this.sphere=null,this.animationId=null,this.boundingBox=null,this.modelWireframe=null,this.loaderPath=null,this.loaderContent=null,this.model&&(this.model.geometry.controlsConfig=this.controls.controlsConfig,this.model=null),this.progressBar&&(this.progressBar.destroy(),this.progressBar=null),this.controls&&(this.controls.destroy(),this.controls=null),this.ddControls&&(this.ddControls.destroy(),this.ddControls=null),null!==this.container)for(var o=this.container;o.lastChild;)o.removeChild(o.lastChild);for(this.loaded=!1,this.loaderPath=null,window.removeEventListener("resize",this._resizeListener,!1),this._resizeListener=null;this.container.firstChild;)this.container.removeChild(this.container.firstChild)}},{key:"_setupModelWireframe",value:function(){if(this.model){this.modelWireframe&&this.group.remove(this.modelWireframe);var t=new THREE.MeshPhongMaterial({color:16777215,specular:1118481,shininess:20,wireframe:!0}),e=this.model.clone();e.material=t,this.modelWireframe=e,this.group.add(e),this.config.wireframe=!0}}},{key:"_setupListener",value:function(){var t=this;this._resizeListener=function(e){t._onWindowResize(e)},window.addEventListener("resize",this._resizeListener,!1),this.config.dragDrop===!0&&(this.ddControls=new x["default"](this.container,function(e){t.parse(e)}))}},{key:"_restoreConfig",value:function(){var t=this.config,e=t.wireframe,n=t.plane,o=t.boundingBox,r=t.sphere,i=t.axis;e&&this._setupModelWireframe(),n&&this._setupPlane(),o&&this._setupBoundingBox(),r&&this._setupSphereGrid(),i&&this._setupAxisHelper()}},{key:"_initializeGeometry",value:function(t,e){var n=this,o=e||function(){};this._setupScene(),this._setupRenderer(),this._setupLights();var r=t;r.computeBoundingSphere(),r.computeBoundingBox(),t.registry===!1&&r.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));var i=new THREE.MeshPhongMaterial({color:11776947,specular:1118481,shininess:20}),a=new THREE.Mesh(t,i);a.castShadow=!0,a.receiveShadow=!0,a.material=i;var s=(new THREE.Box3).setFromObject(a);s.center(a.position),a.position.multiplyScalar(-1),this.model=a,this.config.material&&this.group.add(this.model),this.scene.updateMatrixWorld(),this._setupControls(),this._restoreConfig(),requestAnimationFrame(function(t){n.animate(t),n.loaded=!0,o()})}},{key:"_onWindowResize",value:function(){if(this.container){var t=this.container.clientHeight,e=this.container.clientWidth;this.camera&&(this.camera.aspect=e/t,this.camera.updateProjectionMatrix()),this.renderer&&this.renderer.setSize(e,t)}}},{key:"zoom",set:function(t){this.controls.zoom=t,this.config.zoom=t},get:function(){return this.config.zoom}}],[{key:"_setupContainer",value:function(t){var e=document.createElement("div");return e.style.height="100%",e.style.width="100%",e.style.position="absolute",e.style.left=0,e.style.right=0,e.style.bottom=0,e.style.top=0,t.appendChild(e),e}}]),t}();e["default"]=_,t.exports=e["default"]},function(t,e,n){var o=n(30),r=n(82),i=Number.NEGATIVE_INFINITY,a=o(r,i);t.exports=a},function(t,e,n){function o(t,e){return function(n,o,c){if(c&&u(n,o,c)&&(o=void 0),o=i(o,c,3),1==o.length){n=s(n)?n:l(n);var f=r(n,o,t,e);if(!n.length||f!==e)return f}return a(n,o,t,e)}}var r=n(31),i=n(32),a=n(72),s=n(53),u=n(78),l=n(79);t.exports=o},function(t,e){function n(t,e,n,o){for(var r=-1,i=t.length,a=o,s=a;++r<i;){var u=t[r],l=+e(u);n(l,a)&&(a=l,s=u)}return s}t.exports=n},function(t,e,n){function o(t,e,n){var o=typeof t;return"function"==o?void 0===e?t:a(t,e,n):null==t?s:"object"==o?r(t):void 0===e?u(t):i(t,e)}var r=n(33),i=n(61),a=n(68),s=n(69),u=n(70);t.exports=o},function(t,e,n){function o(t){var e=i(t);if(1==e.length&&e[0][2]){var n=e[0][0],o=e[0][1];return function(t){return null==t?!1:t[n]===o&&(void 0!==o||n in a(t))}}return function(t){return r(t,e)}}var r=n(34),i=n(58),a=n(57);t.exports=o},function(t,e,n){function o(t,e,n){var o=e.length,a=o,s=!n;if(null==t)return!a;for(t=i(t);o--;){var u=e[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){u=e[o];var l=u[0],c=t[l],f=u[1];if(s&&u[2]){if(void 0===c&&!(l in t))return!1}else{var h=n?n(c,f,l):void 0;if(!(void 0===h?r(f,c,n,!0):h))return!1}}return!0}var r=n(35),i=n(57);t.exports=o},function(t,e,n){function o(t,e,n,s,