awv3
Version:
AWV client CAD framework
2 lines • 285 kB
JavaScript
!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}var o,a=n(52),s=i(a),u=n(81),c=i(u),l=n(27),h=i(l),f=n(119),d=i(f),p=n(82),v=i(p),m=n(35),y=i(m),g=n(53),_=i(g),b=n(84),w=i(b),k=n(83),x=i(k),A=n(120),S=i(A),E=n(79),M=i(E),C=n(116),O=i(C),P=n(118),B=i(P),j=n(115),T=i(j),D=n(50),R=i(D),L=n(49),z=r(L),F=n(80),I=i(F),N=n(26),U=i(N),H=n(25),Z=r(H),q=n(11),V=r(q);window.AWV=(o={version:a.version,Canvas:s["default"],Interaction:c["default"],Parser:h["default"],View:d["default"],Object3:y["default"],Perspective:w["default"],Orbit:M["default"]},o.Parser=h["default"],o.MeshPhongMaterial=x["default"],o.Presentation=S["default"],o.SignalR=O["default"],o.SocketIO=B["default"],o.Rest=T["default"],o.Tween=R["default"],o.core={Canvas:s["default"],Interaction:c["default"],Parser:h["default"],View:d["default"],Renderer:v["default"],Events:U["default"],Dom:I["default"],error:Z,helpers:V},o.three={Object3:y["default"],Raycaster:_["default"],Perspective:w["default"]},o.materials={MeshPhongMaterial:x["default"]},o.misc={Presentation:S["default"]},o.controls={Orbit:M["default"]},o.communication={SignalR:O["default"],SocketIO:B["default"],Rest:T["default"]},o.animation={Tween:R["default"],easing:z},o)},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(67)("wks"),i=n(46),o=n(4).Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.store=r},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,n){var r=n(4),i=n(2),o=n(16),a=n(17),s="prototype",u=function(t,e,n){var c,l,h,f=t&u.F,d=t&u.G,p=t&u.S,v=t&u.P,m=t&u.B,y=t&u.W,g=d?i:i[e]||(i[e]={}),_=g[s],b=d?r:p?r[e]:(r[e]||{})[s];d&&(n=e);for(c in n)l=!f&&b&&void 0!==b[c],l&&c in g||(h=l?b[c]:n[c],g[c]=d&&"function"!=typeof b[c]?n[c]:m&&l?o(h,r):y&&b[c]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[s]=t[s],e}(h):v&&"function"==typeof h?o(Function.call,h):h,v&&((g.virtual||(g.virtual={}))[c]=h,t&u.R&&_&&!_[c]&&a(_,c,h)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(14),i=n(91),o=n(69),a=Object.defineProperty;e.f=n(10)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=THREE},function(t,e,n){t.exports={"default":n(134),__esModule:!0}},function(t,e,n){t.exports={"default":n(143),__esModule:!0}},function(t,e,n){t.exports=!n(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,n="x"==t?e:3&e|8;return n.toString(16)})}function o(t){for(var e=window.location.search.substring(1),n=e.split("&"),r=0;r<n.length;r++){var i=n[r].split("=");if(i[0]==t)return i[1]}}function a(t){return("string"==typeof t||t instanceof String)&&(t=document.querySelector(t)),t}function s(t,e,n,r){var i,o,a,s=["-moz-","-webkit-","-o-","-ms-","-khtml-"];t.style[e]="",a=t.style[e];try{if(t.style[e]=n,t.style[e]!==a)return}catch(u){}for(i=0;i<s.length;++i){o=s[i]+n;try{if(t.style[e]=o,t.style[e]!==a)return}catch(c){}}t.style[e]=r}e.__esModule=!0,e.Timestamp=e.Performance=void 0;var u=n(123),c=r(u),l=n(1),h=r(l);e.guid=i,e.url=o,e.queryDom=a,e.setPrefixedValue=s;e.Performance=function(){function t(){(0,h["default"])(this,t),this.stamp=void 0,this.total=void 0}return t.prototype.begin=function(){return this.stamp=performance.now(),this},t.prototype.end=function(){return this.stamp=performance.now()-this.stamp,(!this.total||this.stamp>this.total)&&(this.total=this.stamp),this},t.prototype.printCurrent=function(){return console.log(this.stamp),this},t.prototype.printTotal=function(){return console.log(this.total),this},t.prototype.clear=function(){return this.total=void 0,this},t}(),e.Timestamp=function(){function t(t,e){return t=t.toString(),String(e+t).slice(-e.length)}var e=performance.now(),n=Date.now();return{get:function(){var r=performance.now()-e,i=n+r,o=(0,c["default"])(i/6e4)%60,a=(0,c["default"])(i/1e3)%60,s=(0,c["default"])(1e3*i)%1e6,u=t(o,"00")+":"+t(a,"00")+"."+t(s,"000000");return u}}}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(126),o=r(i),a=n(124),s=r(a),u=n(28),c=r(u);e["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":(0,c["default"])(e)));t.prototype=(0,s["default"])(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o["default"]?(0,o["default"])(t,e):t.__proto__=e)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(28),o=r(i);e["default"]=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":(0,o["default"])(e))&&"function"!=typeof e?t:e}},function(t,e,n){var r=n(18);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var t=arguments,n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return t;var r="color: "+this.color;t=[t[0],r,"color: inherit"].concat(Array.prototype.slice.call(t,1));var i=0,o=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,r),t}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}}function s(){var t;try{t=e.storage.debug}catch(n){}return t}function u(){try{return window.localStorage}catch(t){}}e=t.exports=n(185),e.log=o,e.formatArgs=i,e.save=a,e.load=s,e.useColors=r,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(s())},function(t,e,n){var r=n(56);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(6),i=n(31);t.exports=n(10)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(61),i=n(40);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(86),o=r(i);e["default"]=o["default"]||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){var r=n(99),i=n(60);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){(function(t){function r(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}function i(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var i=t.data,o=new Uint8Array(i),a=new Uint8Array(1+i.byteLength);a[0]=y[t.type];for(var s=0;s<o.length;s++)a[s+1]=o[s];return r(a.buffer)}function o(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var i=new FileReader;return i.onload=function(){t.data=i.result,e.encodePacket(t,n,!0,r)},i.readAsArrayBuffer(t.data)}function a(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(m)return o(t,n,r);var i=new Uint8Array(1);i[0]=y[t.type];var a=new b([i.buffer,t.data]);return r(a)}function s(t,e,n){for(var r=new Array(t.length),i=f(t.length,n),o=function(t,n,i){e(n,function(e,n){r[t]=n,i(e,r)})},a=0;a<t.length;a++)o(a,t[a],i)}var u=n(192),c=n(193),l=n(114),h=n(131),f=n(113),d=n(213),p=navigator.userAgent.match(/Android/i),v=/PhantomJS/i.test(navigator.userAgent),m=p||v;e.protocol=3;var y=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},g=u(y),_={type:"error",data:"parser error"},b=n(132);e.encodePacket=function(e,n,o,s){"function"==typeof n&&(s=n,n=!1),"function"==typeof o&&(s=o,o=null);var u=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&u instanceof ArrayBuffer)return i(e,n,s);if(b&&u instanceof t.Blob)return a(e,n,s);if(u&&u.base64)return r(e,s);var c=y[e.type];return void 0!==e.data&&(c+=o?d.encode(String(e.data)):String(e.data)),s(""+c)},e.encodeBase64Packet=function(n,r){var i="b"+e.packets[n.type];if(b&&n.data instanceof t.Blob){var o=new FileReader;return o.onload=function(){var t=o.result.split(",")[1];r(i+t)},o.readAsDataURL(n.data)}var a;try{a=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(s){for(var u=new Uint8Array(n.data),c=new Array(u.length),l=0;l<u.length;l++)c[l]=u[l];a=String.fromCharCode.apply(null,c)}return i+=t.btoa(a),r(i)},e.decodePacket=function(t,n,r){if("string"==typeof t||void 0===t){if("b"==t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r)try{t=d.decode(t)}catch(i){return _}var o=t.charAt(0);return Number(o)==o&&g[o]?t.length>1?{type:g[o],data:t.substring(1)}:{type:g[o]}:_}var a=new Uint8Array(t),o=a[0],s=l(t,1);return b&&"blob"===n&&(s=new b([s])),{type:g[o],data:s}},e.decodeBase64Packet=function(e,n){var r=g[e.charAt(0)];if(!t.ArrayBuffer)return{type:r,data:{base64:!0,data:e.substr(1)}};var i=h.decode(e.substr(1));return"blob"===n&&b&&(i=new b([i])),{type:r,data:i}},e.encodePayload=function(t,n,r){function i(t){return t.length+":"+t}function o(t,r){e.encodePacket(t,!!a&&n,!0,function(t){r(null,i(t))})}"function"==typeof n&&(r=n,n=null);var a=c(t);return n&&a?b&&!m?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r):t.length?void s(t,o,function(t,e){return r(e.join(""))}):r("0:")},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);"function"==typeof n&&(r=n,n=null);var i;if(""==t)return r(_,0,1);for(var o,a,s="",u=0,c=t.length;u<c;u++){var l=t.charAt(u);if(":"!=l)s+=l;else{if(""==s||s!=(o=Number(s)))return r(_,0,1);if(a=t.substr(u+1,o),s!=a.length)return r(_,0,1);if(a.length){if(i=e.decodePacket(a,n,!0),_.type==i.type&&_.data==i.data)return r(_,0,1);var h=r(i,u+o,c);if(!1===h)return}u+=o,s=""}}return""!=s?r(_,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){return n(null,t)})}return t.length?void s(t,r,function(t,e){var r=e.reduce(function(t,e){var n;return n="string"==typeof e?e.length:e.byteLength,t+n.toString().length+n+2},0),i=new Uint8Array(r),o=0;return e.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),a=0;a<t.length;a++)r[a]=t.charCodeAt(a);n=r.buffer}e?i[o++]=0:i[o++]=1;for(var s=n.byteLength.toString(),a=0;a<s.length;a++)i[o++]=parseInt(s[a]);i[o++]=255;for(var r=new Uint8Array(n),a=0;a<r.length;a++)i[o++]=r[a]}),n(i.buffer)}):n(new ArrayBuffer(0))},e.encodePayloadAsBlob=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);t=r.buffer,e[0]=0}for(var o=t instanceof ArrayBuffer?t.byteLength:t.size,a=o.toString(),s=new Uint8Array(a.length+1),i=0;i<a.length;i++)s[i]=parseInt(a[i]);if(s[a.length]=255,b){var u=new b([e.buffer,s.buffer,t]);n(null,u)}})}s(t,r,function(t,e){return n(new b(e))})},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var i=t,o=[],a=!1;i.byteLength>0;){for(var s=new Uint8Array(i),u=0===s[0],c="",h=1;255!=s[h];h++){if(c.length>310){a=!0;break}c+=s[h]}if(a)return r(_,0,1);i=l(i,2+c.length),c=parseInt(c);var f=l(i,0,c);if(u)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(d){var p=new Uint8Array(f);f="";for(var h=0;h<p.length;h++)f+=String.fromCharCode(p[h])}o.push(f),i=l(i,c)}var v=o.length;o.forEach(function(t,i){r(e.decodePacket(t,n,!0),i,v)})}}).call(e,function(){return this}())},function(t,e){"use strict";function n(t){console.error(t)}e.__esModule=!0,e.log=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(9),o=r(i),a=n(28),s=r(a),u=n(8),c=r(u),l=n(1),h=r(l),f=function(){function t(){(0,h["default"])(this,t),this._callbacks=void 0,this._inspectors=void 0}return t.prototype.once=function(t,e){this.on(t,e,!0)},t.prototype.on=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1],n=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];if(this._callbacks||(this._callbacks={}),Array.isArray(t)||"string"==typeof t&&"function"==typeof e)for(var r=Array.isArray(t)?t:[t],i=r,o=Array.isArray(i),a=0,i=o?i:(0,c["default"])(i);;){var u;if(o){if(a>=i.length)break;u=i[a++]}else{if(a=i.next(),a.done)break;u=a.value}var l=u,h=this._callbacks[l];if(h||(h=this._callbacks[l]=[]),h.indexOf(e)<0&&(e.remove=n,h.push(e),this._inspectors))for(var f=this._inspectors,d=Array.isArray(f),p=0,f=d?f:(0,c["default"])(f);;){var v;if(d){if(p>=f.length)break;v=f[p++]}else{if(p=f.next(),p.done)break;v=p.value}var m=v;m({action:"Add",type:l,callback:e})}}else if("object"===("undefined"==typeof t?"undefined":(0,s["default"])(t))&&void 0===e)for(var y in t){var g=t[y];"function"==typeof g&&this.on(y,g,n)}return this},t.prototype.inspect=function(t){this._inspectors||(this._inspectors=[]),this._inspectors.push(t)},t.prototype.removeListener=function(t,e){this._callbacks||(this._callbacks={}),t=Array.isArray(t)?t:[t];for(var n=t,r=Array.isArray(n),i=0,n=r?n:(0,c["default"])(n);;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if(i=n.next(),i.done)break;o=i.value}var a=o,s=this._callbacks[a];if(s)if(e){var u=s.indexOf(e);if(u>-1&&s.splice(u,1),this._inspectors)for(var l=this._inspectors,h=Array.isArray(l),f=0,l=h?l:(0,c["default"])(l);;){var d;if(h){if(f>=l.length)break;d=l[f++]}else{if(f=l.next(),f.done)break;d=f.value}var p=d;p({action:"Remove",type:a,callback:e})}}else if(delete this._callbacks[a],this._inspectors)for(var v=this._inspectors,m=Array.isArray(v),y=0,v=m?v:(0,c["default"])(v);;){var g;if(m){if(y>=v.length)break;g=v[y++]}else{if(y=v.next(),y.done)break;g=y.value}var _=g;_({action:"Remove",type:a,callback:void 0})}}return this},t.prototype.removeListeners=function(){this._callbacks=void 0},t.prototype.removeInspectors=function(){this._inspectors=void 0},t.prototype.emit=function(t){for(var e=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=o["default"].resolve();this._callbacks||(this._callbacks={});var s=this._callbacks[t];if(s)for(var u=function(){if(h){if(f>=l.length)return"break";d=l[f++]}else{if(f=l.next(),f.done)return"break";d=f.value}var n=d;a=a.then(function(i){return n.remove&&e.removeListener(t,n),n.call.apply(n,[e].concat(r))})},l=s,h=Array.isArray(l),f=0,l=h?l:(0,c["default"])(l);;){var d,p=u();if("break"===p)break}return a},t.prototype.bubble=function(t){for(var e=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=o["default"].resolve();this._callbacks||(this._callbacks={});var s=this._callbacks[t];if(s)for(var u=function(){if(h){if(f>=l.length)return"break";d=l[f++]}else{if(f=l.next(),f.done)return"break";d=f.value}var t=d;a=a.then(function(n){return t.call.apply(t,[e].concat(r))})},l=s,h=Array.isArray(l),f=0,l=h?l:(0,c["default"])(l);;){var d,p=u();if("break"===p)break}else if(this.parent){var v;(v=this.parent).bubble.apply(v,[t].concat(r))}return a},t.prototype.findListener=function(t){this._callbacks||(this._callbacks={});var e=this._callbacks[t];return e?this:this.parent?this.parent.find(t):void 0},t.prototype.hasListener=function(t){var e=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1];this._callbacks||(this._callbacks={});var n=this._callbacks[t];return!(!n||e&&e!==n)},t.mixin=function(e){var n=arguments.length<=1||void 0===arguments[1]?null:arguments[1];e.hasListener=t.prototype.hasListener,e.on=t.prototype.on,e.once=t.prototype.once,e.inspect=t.prototype.inspect,e.removeListener=t.prototype.removeListener,e.removeListeners=t.prototype.removeListeners,e.removeInspectors=t.prototype.removeInspectors,e.emit=t.prototype.emit,e.bubble=t.prototype.bubble,e.findListener=t.prototype.findListener,n&&e.on.bind(e)(n)},t}();e["default"]=f},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1],n=arguments.length<=2||void 0===arguments[2]?void 0:arguments[2],r=arguments.length<=3||void 0===arguments[3]?"":arguments[3];return"object"!==("undefined"==typeof t?"undefined":(0,p["default"])(t))&&(t={callback:t||function(t){return null}}),t.callback=t.callback||function(t){return null},t.groupInto=t.groupInto||void 0,t.compressMaterials=t.compressMaterials||!1,t.lazy=t.lazy||!1,t.colorMap={},{session:"",id:(0,C.guid)(),resolve:e,reject:n,promises:[],command:r||"",options:t,array:[],map:{},models:[],results:[],errors:[],bytes:0,bytesUncompressed:0,socketTime:null,time:0}}function a(){var t=arguments.length<=0||void 0===arguments[0]?M.log("Context undefined"):arguments[0];if(Array.isArray(t)){if(1===t.length)return a(t[0]);var e=o();return e.array=t,a(e)}if(delete t.resolve,delete t.reject,delete t.promises,delete t.mapitem,t.array.length>0&&0===t.models.length)for(var n=t.array,r=Array.isArray(n),i=0,n=r?n:(0,f["default"])(n);;){var s;if(r){if(i>=n.length)break;s=n[i++]}else{if(i=n.next(),i.done)break;s=i.value}var u=s;u.mapitem&&(t.map[u.mapitem]=u),a(u).models.forEach(function(e){return t.models.push(e)})}return t.firstModel=void 0,t.models.length>0&&(t.firstModel=t.models[0]),t.firstResult=void 0,t.results.length>0&&(t.firstResult=t.results[0].result),t}function s(t,e){var n=e.models,r=e.options,i=t.attributes,o=new j["default"];if(o.name=i.name,o.visible=1===i.visible,o.userData={id:i.id,meta:i.meta},i.color=new S["default"].Color(i.color[0]/255,i.color[1]/255,i.color[2]/255),i.min&&i.max&&(i.box=new S["default"].Box3(new(Function.prototype.bind.apply(S["default"].Vector3,[null].concat((0,l["default"])(i.min)))),new(Function.prototype.bind.apply(S["default"].Vector3,[null].concat((0,l["default"])(i.max))))),i.sphere=i.box.getBoundingSphere(),r.groupInto||(o.bounds=o.bounds||{box:new S["default"].Box3,sphere:new S["default"].Sphere},o.bounds.box=i.box,o.bounds.sphere=i.sphere)),void 0!==i.meshes&&i.meshes.length>0)for(var a=i.meshes,s=Array.isArray(a),u=0,a=s?a:(0,f["default"])(a);;){var c;if(s){if(u>=a.length)break;c=a[u++]}else{if(u=a.next(),u.done)break;c=u.value}var h=c;h.color&&(h.color=new S["default"].Color(h.color[0]/255,h.color[1]/255,h.color[2]/255));var d=new S["default"].BufferGeometry;d.addAttribute("position",new S["default"].BufferAttribute(h.vertices,3)),d.setIndex(new S["default"].BufferAttribute(h.indices,1)),h.normals?d.addAttribute("normal",new S["default"].BufferAttribute(h.normals,3)):d.computeVertexNormals(),!!h.uvs&&d.addAttribute("uv",new S["default"].BufferAttribute(h.uvs,2)),i.box?(d.boundingBox=i.box,d.boundingSphere=i.sphere):(d.computeBoundingBox(),d.computeBoundingSphere());var p=h.color||i.color,v=h.opacity||i.opacity,m=void 0,y=void 0;r.groupInto&&r.compressMaterials&&(y="#"+p.getHexString()+"_"+v.toFixed(2),m=r.colorMap[y]),m||(m=new D["default"]({color:p,opacity:v,specular:p,emissive:new S["default"].Color(0),shininess:100}),y&&(r.colorMap[y]=m));var g=new S["default"].Mesh(d,m);g.visible=o.visible,g.renderOrder=100,g.userData={id:0,parentId:i.id,meta:h.meta},o.add(g),r.callback({type:R.Factory.Mesh,model:o,data:g,meta:h.meta})}if(void 0!==i.lines&&i.lines.length>0){var _=new S["default"].BufferGeometry;_.addAttribute("position",new S["default"].BufferAttribute(i.lines,3)),i.box?(_.boundingBox=i.box,_.boundingSphere=i.sphere):(_.computeBoundingBox(),_.computeBoundingSphere());var b=new S["default"].Color(0),w=i.opacity,k=void 0,x=void 0;r.groupInto&&r.compressMaterials&&(x="#"+b.getHexString()+"_"+w.toFixed(2),k=r.colorMap[x]),k||(k=new S["default"].LineBasicMaterial({color:b,opacity:w,transparent:!0,fog:!1}),x&&(r.colorMap[x]=k));var A=new S["default"].LineSegments(_,k);A.visible=o.visible,A.renderOrder=0,A.userData={id:0,parentId:i.id,meta:i.meta},o.add(A),r.callback({type:R.Factory.Line,model:o,data:A,meta:i.meta})}if(i.cones)for(var E=i.cones,M=Array.isArray(E),C=0,E=M?E:(0,f["default"])(E);;){var O;if(M){if(C>=E.length)break;O=E[C++]}else{if(C=E.next(),C.done)break;O=C.value}var P=O;r.callback({type:R.Factory.Cone,model:o,data:P,meta:P.meta})}if(i.vertices)for(var B=i.vertices,T=Array.isArray(B),L=0,B=T?B:(0,f["default"])(B);;){var z;if(T){if(L>=B.length)break;z=B[L++]}else{if(L=B.next(),L.done)break;z=L.value}var F=z;r.callback({type:R.Factory.Vertex,model:o,data:F,meta:F.meta})}if(i.coordinateSystems)for(var I=i.coordinateSystems,N=Array.isArray(I),U=0,I=N?I:(0,f["default"])(I);;){var H;if(N){if(U>=I.length)break;H=I[U++]}else{if(U=I.next(),U.done)break;H=U.value}var Z=H;r.callback({type:R.Factory.Csys,model:o,data:Z,meta:Z.meta})}if(i.text)for(var q=i.text,V=Array.isArray(q),X=0,q=V?q:(0,f["default"])(q);;){var W;if(V){if(X>=q.length)break;W=q[X++]}else{if(X=q.next(),X.done)break;W=X.value}var Y=W;r.callback({type:R.Factory.Text,model:o,data:Y,meta:Y.meta})}r.groupInto&&r.groupInto.add(o),n.push(o),r.callback({type:R.Factory.Model,model:o,data:i,meta:i.meta})}function u(t,e){var n=e.models,r=e.options,i=t.attributes;switch(i.action){case"Add":var o=i.type;if("Part"==o){if(i.removes)for(var a=i.removes,u=Array.isArray(a),c=0,a=u?a:(0,f["default"])(a);;){var h;if(u){if(c>=a.length)break;h=a[c++]}else{if(c=a.next(),c.done)break;h=c.value}var d=h;r.callback({type:R.Factory.Remove,data:d})}if(i.transforms)for(var p=i.transforms,v=Array.isArray(p),m=0,p=v?p:(0,f["default"])(p);;){var y;if(v){if(m>=p.length)break;y=p[m++]}else{if(m=p.next(),m.done)break;y=m.value}var _=y;r.callback({type:R.Factory.Transform,data:_})}i.min&&i.max&&(i.box=new S["default"].Box3(new(Function.prototype.bind.apply(S["default"].Vector3,[null].concat((0,l["default"])(i.min)))),new(Function.prototype.bind.apply(S["default"].Vector3,[null].concat((0,l["default"])(i.max))))),i.sphere=i.box.getBoundingSphere(),r.groupInto&&r.groupInto.updateBounds(i.box)),r.callback({type:R.Factory.Part,data:i,meta:i.meta});break}"Model"==o&&(r.groupInto&&r.lazy?e.promises.push(new g["default"](function(n){return requestIdleCallback(function(r){return n(s(t,e))})})):s(t,e))}return n}e.__esModule=!0,e.handleResult=void 0;var c=n(129),l=i(c),h=n(8),f=i(h),d=n(28),p=i(d),v=n(38),m=i(v),y=n(9),g=i(y),_=n(37),b=i(_),w=n(1),k=i(w),x=e.handleResult=function(){var t=(0,b["default"])(m["default"].mark(function e(){var t,n=this,r=arguments.length<=0||void 0===arguments[0]?M.log("Context undefined"):arguments[0],i=arguments.length<=1||void 0===arguments[1]?M.log("Object undefined"):arguments[1];return m["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=new g["default"](function(){var t=(0,b["default"])(m["default"].mark(function e(t){var o,s,c,l,h,d,p,v,y,_,b,w,k,A;return m["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("Buffer"===i.type&&i.data&&(i=Uint8Array.from(i.data)),i instanceof Uint8Array&&(i={command:"Blob",type:"Binary",data:i}),("string"==typeof i||i instanceof String)&&(o=i.length,i=JSON.parse(i),r.bytes+=o,"Blob"!==i.command&&(r.bytesUncompressed+=o)),!Array.isArray(i)){e.next=8;break}return e.next=6,g["default"].all(i.map(function(t){return x(r,t)}));case 6:e.next=65;break;case 8:if("Endpoint"!==i.command){e.next=12;break}r.results.push({command:"Result",from:"ip",result:i}),e.next=65;break;case 12:if("Assembly"!==i.command){e.next=35;break}s=new j["default"],s.userData.id=i.id,r.options.groupInto.add(s),r.options.groupInto=s,c=i.parts,l=Array.isArray(c),h=0,c=l?c:(0,f["default"])(c);case 18:if(!l){e.next=24;break}if(!(h>=c.length)){e.next=21;break}return e.abrupt("break",33);case 21:d=c[h++],e.next=28;break;case 24:if(h=c.next(),!h.done){e.next=27;break}return e.abrupt("break",33);case 27:d=h.value;case 28:return p=d,e.next=31,x(r,p);case 31:e.next=18;break;case 33:e.next=65;break;case 35:if("Link"!==i.command){e.next=46;break}if(!i.url&&!i.key){e.next=43;break}return v=i.url||r.hub.baseUrl+"/link/"+i.key,e.next=40,fetch(v).then(function(t){return t.json()});case 40:return y=e.sent,e.next=43,x(r,y);case 43:r.options.callback({context:r,type:R.Factory.Link,model:r.options.groupInto,data:i}),e.next=65;break;case 46:if("Blob"!==i.command&&("Geometry"!==i.command||i.attributes.optimized)){e.next=55;break}return _=P["default"].getFreeCore(),e.next=50,_.post(i,function(t){return u(t,r)});case 50:b=e.sent,r.bytesUncompressed+=b.size,r.time+=b.time,e.next=65;break;case 55:if(!r.resolve||"Result"!==i.command||"EndFrame"!==i.from||i.transactionID!==r.id){e.next=64;break}return w=r.resolve,e.next=59,g["default"].all(r.promises);case 59:k=e.sent,r=a(r),w(r),e.next=65;break;case 64:if("Result"===i.command&&"BeginFrame"!==i.from&&"EndFrame"!==i.from){try{A=JSON.parse(i.result),i.result=A}catch(n){}r.results.push(i)}else"ErrorMessage"===i.command&&(r.errors.push(i.attributes),console.warn("ClassCAD > State: "+i.attributes.errorState+", Code: "+i.attributes.errorCode+", Message: "+i.attributes.errorMessage));case 65:t(r);case 66:case"end":return e.stop()}},e,n)}));return function(e){return t.apply(this,arguments)}}()),r.promises.push(t),e.next=4,t;case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}},e,this)}));return function(e,n){return t.apply(this,arguments)}}();e.createContext=o,e.mergeContext=a,e.parseGeometry=u;var A=n(7),S=i(A);n(199),n(207);var E=n(25),M=r(E),C=n(11),O=n(122),P=i(O),B=n(35),j=i(B),T=n(83),D=i(T),R=function(){function t(){(0,k["default"])(this,t)}return t.prototype.stream=function(){function e(t,e){return n.apply(this,arguments)}var n=(0,b["default"])(m["default"].mark(function r(){var e,n,i,s=this,u=arguments.length<=0||void 0===arguments[0]?M.log("Url undefined"):arguments[0],c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return m["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e=Array.isArray(u)?u:[u],r.next=3,g["default"].all(e.map(function(){var t=(0,b["default"])(m["default"].mark(function e(t){var n,r;return m["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=o(c),e.next=3,fetch(t).then(function(t){return t.json()});case 3:return r=e.sent,e.next=6,x(n,r);case 6:return e.next=8,g["default"].all(n.promises);case 8:return n.mapitem=t,e.abrupt("return",n);case 10:case"end":return e.stop()}},e,s)}));return function(e){return t.apply(this,arguments)}}()));case 3:if(n=r.sent,i=a(n),!i.options.groupInto){r.next=8;break}return r.next=8,i.options.groupInto.emit(j["default"].Lifecycle.Loaded);case 8:return i.options.callback({type:t.Factory.Finished,context:i}),r.abrupt("return",i);case 10:case"end":return r.stop()}},r,this)}));return e}(),t.prototype.parse=function(){function e(t,e){return n.apply(this,arguments)}var n=(0,b["default"])(m["default"].mark(function r(){var e,n,i,s=this,u=arguments.length<=0||void 0===arguments[0]?M.log("Blob undefined"):arguments[0],c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return m["default"].wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e=Array.isArray(u)?u:[u],r.next=3,g["default"].all(e.map(function(){var t=(0,b["default"])(m["default"].mark(function e(t){var n;return m["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=o(c),e.next=3,x(n,t);case 3:return e.next=5,g["default"].all(n.promises);case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}},e,s)}));return function(e){return t.apply(this,arguments)}}()));case 3:if(n=r.sent,i=a(n),!i.options.groupInto){r.next=8;break}return r.next=8,i.options.groupInto.emit(j["default"].Lifecycle.Loaded);case 8:return i.options.callback({type:t.Factory.Finished,context:i}),r.abrupt("return",i);case 10:case"end":return r.stop()}},r,this)}));return e}(),t}();e["default"]=R,R.Factory={Blob:"Blob",Link:"Link",Assembly:"Assembly",Part:"Part",Model:"Model",Mesh:"Mesh",Line:"Line",Cone:"Cone",Vertex:"Vertex",Csys:"Csys",Text:"Text",Transform:"Transform",Remove:"Remove",Started:"Started",Finished:"Finished"}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(128),o=r(i),a=n(127),s=r(a),u="function"==typeof s["default"]&&"symbol"==typeof o["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof s["default"]&&t.constructor===s["default"]?"symbol":typeof t};e["default"]="function"==typeof s["default"]&&"symbol"===u(o["default"])?function(t){return"undefined"==typeof t?"undefined":u(t)}:function(t){return t&&"function"==typeof s["default"]&&t.constructor===s["default"]?"symbol":"undefined"==typeof t?"undefined":u(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(6).f,i=n(20),o=n(3)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(40);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";var r=n(168)(!0);n(62)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return e.parent===t&&t instanceof M["default"].Scene||t.view?e.traverse(function(e){e.scene=t instanceof M["default"].Scene?t:t.scene,e.view=t.view,e.canvas=t.canvas,e.emit(M["default"].Object3D.Events.Lifecycle.ViewFound,e.view)}):e.traverse(function(t){t.scene=void 0,t.view=void 0,t.canvas=void 0}),e}function o(t,e){t.material&&e(t);for(var n=t.children,r=Array.isArray(n),i=0,n=r?n:(0,s["default"])(n);;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var u=a;u.updateParentMaterials&&o(u,e)}}e.__esModule=!0;var a=n(8),s=r(a),u=n(54),c=r(u),l=n(38),h=r(l),f=n(37),d=r(f),p=n(9),v=r(p),m=n(36),y=r(m),g=n(22),_=r(g),b=n(1),w=r(b),k=n(13),x=r(k),A=n(12),S=r(A),E=n(7),M=r(E),C=n(50),O=r(C),P=n(26),B=r(P),j=n(53),T=r(j),D=function(t){
function e(){var n=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1];(0,w["default"])(this,e);var i=(0,x["default"])(this,t.call(this));return r&&i.setValues(r),n&&i.add(n),i}return(0,S["default"])(e,t),e}(M["default"].Object3D);e["default"]=D,M["default"].Object3D.Events={Lifecycle:{Loaded:"Loaded",Added:"Added",ViewFound:"ViewFound",ChildAdded:"ChildAdded",Removed:"Removed",ChildRemoved:"ChildRemoved",Destroyed:"Destroyed",Rendered:"Rendered"},Interaction:{Clicked:"Clicked",Picked:"Picked",Dropped:"Dropped",Dragged:"Dragged",Hovered:"Hovered",Unhovered:"Unhovered"}},M["default"].Object3D.prototype.canvas=void 0,M["default"].Object3D.prototype.view=void 0,M["default"].Object3D.prototype.bounds=void 0,M["default"].Object3D.prototype.materials=void 0,M["default"].Object3D.prototype.updateParentMaterials=!0,M["default"].Object3D.prototype.keep=!1,M["default"].Object3D.prototype.tweens=!0,M["default"].Object3D.prototype.interaction=void 0,B["default"].mixin(M["default"].Object3D.prototype),M["default"].Object3D.prototype.createInteraction=function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(this.interaction)return this;this.interaction=(0,_["default"])({first:!0,priority:0,enabled:!0,recursive:!1,approach:T["default"].Approach.Default,types:["Mesh"]},e);var n=this;return this.viewFound().then(function(t){t.interaction.targets.indexOf(n)==-1&&!function(){t.interaction.targets.push(n);var e=0;t.scene.traverse(function(t){return t.depthIndex=e++}),t.interaction.targets.sort(function(t,e){return t.depthIndex-e.depthIndex})}()}),this.inspect(function(e){return t.interaction._active=!!(0,y["default"])(t._callbacks).find(function(t){return t in M["default"].Object3D.Events.Interaction})}),this},M["default"].Object3D.prototype.removeInteraction=function(){this.view&&this.interaction&&(this.interaction=void 0,this.view.interaction.removeTarget(this),this.removeInspectors(),this.removeListener([D.Events.Interaction.Clicked,D.Events.Interaction.Picked,D.Events.Interaction.Dropped,D.Events.Interaction.Dragged,D.Events.Interaction.Hovered,D.Events.Interaction.Unhovered]))},M["default"].Object3D.prototype.viewFound=function(){var t=this;return this.view?v["default"].resolve(this.view):new v["default"](function(e){return t.once(M["default"].Object3D.Events.Lifecycle.ViewFound,e)})},M["default"].Object3D.prototype._destroyRecursive=function(t){if(this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose(),this.materials&&(this.materials.all.forEach(function(t){return t.dispose()}),this.materials.all=[],this.materials.meshes=[],this.materials.lines=[],this.bounds=void 0),this.userData={},t.async)return v["default"].all(this.children.map(function(e){return e.destroyAsync(t)}));for(var e=this.children.length-1;e>=0;e--)this.children[e].destroy(t)},M["default"].Object3D.prototype.destroyAsync=function(){var t=(0,d["default"])(h["default"].mark(function e(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return h["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(0,_["default"])({keep:!0,data:!0,interaction:!0,listeners:!0},t),!t.keep||!this.keep){e.next=3;break}return e.abrupt("return");case 3:return t.interaction&&this.removeInteraction(),e.next=6,this.emit(D.Events.Lifecycle.Destroyed);case 6:if(e.t0=this.parent,!e.t0){e.next=10;break}return e.next=10,this.parent.removeAsync(this);case 10:if(t.listeners&&this.removeListeners(),e.t1=t.data,!e.t1){e.next=15;break}return e.next=15,this._destroyRecursive((0,_["default"])({},t,{async:!0}));case 15:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}(),M["default"].Object3D.prototype.destroy=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];t=(0,_["default"])({keep:!0,data:!0,interaction:!0,listeners:!0},t),t.keep&&this.keep||(this.emit(D.Events.Lifecycle.Destroyed),this.parent&&this.parent.remove(this),t.interaction&&this.removeInteraction(),t.listeners&&this.removeListeners(),t.data&&this._destroyRecursive(t))},M["default"].Object3D.prototype.addAsync=function(){var t=(0,d["default"])(h["default"].mark(function e(t){var n=this,r=arguments;return h["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>1?(0,c["default"])(r):t,!Array.isArray(t)){e.next=3;break}return e.abrupt("return",v["default"].all(t.map(function(t){return n.addAsync(t)})));case 3:if(!(t!==this&&t instanceof M["default"].Object3D)){e.next=14;break}if(!t.parent){e.next=7;break}return e.next=7,t.parent.removeAsync(t);case 7:return t.parent=this,this.children.push(i(this,t)),e.next=11,this.emit(D.Events.Lifecycle.ChildAdded,{child:t});case 11:return e.next=13,t.emit(D.Events.Lifecycle.Added,{parent:this});case 13:!!this.view&&this.view.invalidate();case 14:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}(),M["default"].Object3D.prototype.add=function(t){var e=this;return t=arguments.length>1?(0,c["default"])(arguments):t,Array.isArray(t)?v["default"].all(t.map(function(t){return e.add(t)})):void(t!==this&&t instanceof M["default"].Object3D&&(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(i(this,t)),this.emit(D.Events.Lifecycle.ChildAdded,{child:t}),t.emit(D.Events.Lifecycle.Added,{parent:this}),!!this.view&&this.view.invalidate()))},M["default"].Object3D.prototype.removeAsync=function(){var t=(0,d["default"])(h["default"].mark(function e(t){var n,r=this,o=arguments;return h["default"].wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=o.length>1?(0,c["default"])(o):t,!Array.isArray(t)){e.next=3;break}return e.abrupt("return",v["default"].all(t.map(function(t){return r.removeAsync(t)})));case 3:if(!(t instanceof M["default"].Object3D)){e.next=14;break}if(n=this.children.indexOf(t),n===-1){e.next=14;break}return e.next=8,this.emit(D.Events.Lifecycle.ChildRemoved,{child:t});case 8:return e.next=10,t.emit(D.Events.Lifecycle.Removed,{parent:this});case 10:this.children.splice(n,1),t.parent=null,i(this,t),!!this.view&&this.view.invalidate();case 14:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}(),M["default"].Object3D.prototype.remove=function(t){var e=this;if(t=arguments.length>1?(0,c["default"])(arguments):t,Array.isArray(t))return v["default"].all(t.map(function(t){return e.remove(t)}));if(t instanceof M["default"].Object3D){var n=this.children.indexOf(t);n!==-1&&(this.emit(D.Events.Lifecycle.ChildRemoved,{child:t}),t.emit(D.Events.Lifecycle.Removed,{parent:this}),this.children.splice(n,1),t.parent=null,i(this,t),!!this.view&&this.view.invalidate())}},M["default"].Object3D.prototype.removeObjectTweens=function(){return O["default"].removeObjectTweens(this),this},M["default"].Object3D.prototype.updateMaterials=function(){var t=this,e={};return this.materials=this.materials||{updateParent:!0,all:[],meshes:[],lines:[]},this.materials.all=[],this.materials.meshes=[],this.materials.lines=[],o(this,function(t){return e[t.material.uuid]=t.material}),(0,y["default"])(e).forEach(function(n){var r=e[n];t.materials.all.push(r),r.type.indexOf("Mesh")>-1?t.materials.meshes.push(r):r.type.indexOf("Line")>-1&&t.materials.lines.push(r)}),this},M["default"].Object3D.prototype.compress=function(){var t=this;if(this.materials){for(var e=((0,y["default"])(this.materials.all),{}),n=function(){o=t.materials.all[r],a="#"+o.color.getHexString()+"_"+o.opacity.toFixed(2)+"_"+o.type;var n=e[a];n?t.traverse(function(t){t.material===o&&(t.material.dispose(),t.material=n)}):e[a]=o},r=0,i=this.materials.all.length;r<i;r++){var o,a;n()}return this.updateMaterials(),this}},M["default"].Object3D.prototype.animate=function(t){return this.tweens?new O["default"](this,t):new O["default"]({},{})},M["default"].Object3D.prototype.animateMaterials=function(t){return this.tweens?new O["default"](this,{materials:t}):new O["default"]({},{})},M["default"].Object3D.prototype.animateAllMaterials=function(t){return this.tweens?new O["default"](this,{materials:{all:[t]}}):new O["default"]({},{})},M["default"].Object3D.prototype.animateMeshes=function(t){return this.tweens?new O["default"](this,{materials:{meshes:[t]}}):new O["default"]({},{})},M["default"].Object3D.prototype.animateLines=function(t){return this.tweens?new O["default"](this,{materials:{lines:[t]}}):new O["default"]({},{})},M["default"].Object3D.prototype.fadeOut=function(t){return this.animate({materials:{meshes:[{opacity:0}],lines:[{opacity:0}]}}).start(t||0),this},M["default"].Object3D.prototype.fadeIn=function(t,e){return this.animate({materials:{meshes:[{opacity:e||1}],lines:[{opacity:e||1}]}}).start(t||0),this},M["default"].Object3D.prototype.setValues=function(t){return new O["default"](this,t).start(0)},M["default"].Object3D.prototype.root=function(){for(var t=this;t;){if(!t.parent||t.parent instanceof M["default"].Scene)return t;t=t.parent}},M["default"].Object3D.prototype.pwtl=function(t){return this.parent.worldToLocal(t.clone())},M["default"].Object3D.prototype.pltw=function(t){return this.parent.localToWorld(t.clone())},M["default"].Object3D.prototype.isChildOf=function(t){for(var e=this;e;){if(e==t)return!0;e=e.parent}return!1},M["default"].Object3D.prototype.isVisible=function(){return!(!this.visible||this instanceof M["default"].Mesh&&0==this.material.opacity)&&(null==this.parent||this.parent instanceof M["default"].Scene?this.visible:!!this.visible&&this.parent.isVisible())},M["default"].Object3D.prototype.find=function(t){if(t(this))return this;for(var e=this.children,n=Array.isArray(e),r=0,e=n?e:(0,s["default"])(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var o=i,a=o.find(t);if(a)return a}},M["default"].Object3D.prototype.getObjectByMatch=function(t){for(var e=0,n=this.children.length;e<n;e++){var r=this.children[e];if(r.name.indexOf(t)>-1)return r}},M["default"].Object3D.prototype.getObjectByUserId=function(t){if(this.userData&&this.userData.id===t)return this;for(var e=0,n=this.children.length;e<n;e++){var r=this.children[e],i=r.getObjectByUserId(t);if(void 0!==i)return i}},M["default"].Object3D.prototype.lastChild=function(){return this.children.length?this.children[this.children.length-1]:void 0},M["default"].Object3D.prototype.setPosition=function(t){return t=arguments.length>1?new(Function.prototype.bind.apply(M["default"].Vector3,[null].concat(Array.prototype.slice.call(arguments)))):t,this.position.copy(t),this},M["default"].Object3D.prototype.setRotation=function(t){return t=arguments.length>1?new(Function.prototype.bind.apply(M["default"].Euler,[null].concat(Array.prototype.slice.call(arguments)))):t,this.rotation.copy(t),this},M["default"].Object3D.prototype.setScale=function(t){return t=arguments.length>1?new(Function.prototype.bind.apply(M["default"].Vector3,[null].concat(Array.prototype.slice.call(arguments)))):t,this.scale.copy(t),this},M["default"].Object3D.prototype.setRenderOrder=function(t,e){return this.traverse(function(n){(n instanceof M["default"].Mesh||e&&n instanceof M["default"].Line)&&(n.renderOrder=t)}),this},M["default"].Object3D.prototype.updateBounds=function(){var t=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];return this.bounds=this.bounds||{box:new M["default"].Box3,sphere:new M["default"].Sphere},this.bounds.box=t?this.bounds.box.union(t):(new M["default"].Box3).setFromObject(this),this.bounds.sphere=this.bounds.box.getBoundingSphere(),this.view&&this.view.updateBounds(t?this.bounds.box:void 0),this},M["default"].Object3D.prototype.getCenter=function(t){return!t&&this.bounds||this.updateBounds(),this.bounds.sphere.center.clone()},M["default"].Object3D.prototype.getRadius=function(t){return!t&&this.bounds||this.updateBounds(),this.bounds.sphere.radius},M["default"].Object3D.prototype.centerGeometry=function(){var t=arguments.length<=0||void 0===arguments[0]?this.getCenter(!0):arguments[0],e=arguments[1];this.updateBounds(),this.position.copy(t);for(var n=this.children,r=Array.isArray(n),i=0,n=r?n:(0,s["default"])(n);;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if(i=n.next(),i.done)break;o=i.value}var a=o;a.traverse(function(n){e&&!e(n,t)||n.geometry&&(n.geometry instanceof M["default"].Geometry||n.geometry instanceof M["default"].BufferGeometry)&&(n.geometry.applyMatrix((new M["default"].Matrix4).makeTranslation(-t.x,-t.y,-t.z)),n.geometry.computeBoundingBox(),n.geometry.computeBoundingSphere())})}return this},M["default"].Object3D.prototype.centerChildGeometry=function(){for(var t=this.children,e=Array.isArray(t),n=0,t=e?t:(0,s["default"])(t);;){var r;if(e){if(n>=t.length)break;r=t[n++]}else{if(n=t.next(),n.done)break;r=n.value}var i=r;i.centerGeometry()}return this},M["default"].Object3D.prototype.addEventListener=function(t,e){return this.on(t,e)},M["default"].Object3D.prototype.hasEventListener=function(t,e){return this.hasListener(t,e)},M["default"].Object3D.prototype.removeEventListener=function(t,e){return this.removeListener(t,e)},M["default"].Object3D.prototype.dispatchEvent=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return this.emit.apply(this,[t].concat(n))}},function(t,e,n){t.exports={"default":n(141),__esModule:!0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(9),o=r(i);e["default"]=function(t){return function(){var e=t.apply(this,arguments);return new o["default"](function(t,n){function r(i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}return s.done?void t(u):o["default"].resolve(u).then(function(t){return r("next",t)},function(t){return r("throw",t)})}return r("next")})}}},function(t,e,n){t.exports=n(205)},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=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 r=n(16),i=n(94),o=n(92),a=n(14),s=n(45),u=n(72),c={},l={},e=t.exports=function(t,e,n,h,f){var d,p,v,m,y=f?function(){return t}:u(t),g=r(n,h,e?2:1),_=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(d=s(t.length);d>_;_++)if(m=e?g(a(p=t[_])[0],p[1]):g(t[_]),m===c||m===l)return m}else for(v=y.call(t);!(p=v.next()).done;)if(m=i(v,g,p.value,e),m===c||m===l)return m};e.BREAK=c,e.RETURN=l},function(t,e){t.exports=!0},function(t,e,n){var r=n(14),i=n(162),o=n(60),a=n(66)("IE_PROTO"),s=function(){},u="prototype",c=function(){var t,e=n(59)("iframe"),r=o.length,i="<",a=">";for(e.style.display="none",n(90).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),c=t.F;r--;)delete c[u][o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[u]=r(t),n=new s,s[u]=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(68),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){n(172);for(var r=n(4),i=n(17),o=n(30),a=n(3)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=r[c],h=l&&l.prototype;h&&!h[a]&&i(h,a,c),o[c]=o.Array}},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){"use strict";e.__esModule=!0;e.back={"in":function(t){var e=1.70158;return t*t*((e+1)*t-e)},out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},inOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)}},e.bounce={"in":function(t){return 1-outward(1-t)},out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},inOut:function(t){return t<.5?.5*inward(2*t):.5*outward(2*t-1)+.5}},e.circular={"in":function(t){return 1-Math.sqrt(1-t*t)},out:function(t){return Math.sqrt(1- --t*t)},inOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},e.cubic={"in":function(t){return t*t*t},out:function(t){return--t*t*t+1},inOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},e.elastic={"in":function(t){var e=void 0,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)))},out:function(t){var e=void 0,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/r)+1)},inOut:function(t){var e=void 0,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)):n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*.5+1)}},e.exponential={"in":function(t){return 0===t?0:Math.pow(1024,t-1)},out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},inOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)}},e.linear=function(t){return t},e.quadratic={"in":function(t){return t*t},out:function(t){return t*(2-t)},inOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},e.quartic={"in":function(t){return t*t*t*t},out:function(t){return 1- --t*t*t*t},inOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},e.quintic={"in":function(t){return t*t*t*t*t},out:function(t){return--t*t*t*t*t+1},inOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},e.sinusoidal={"in":function(t){return 1-Math.cos(t*Math.PI/2)},out:function(t){return Math.sin(t*Math.PI/2)},inOut:function(t){return.5*(1-Math.cos(Math.PI*t