@ndmspc/ndmvr 0.20230424.0 → 0.20230516.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ndmvr.es.js +1432 -1209
- package/dist/ndmvr.umd.js +59 -53
- package/package.json +1 -1
package/dist/ndmvr.umd.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var sa=Object.defineProperty;var aa=(
|
|
2
|
-
`+
|
|
1
|
+
var sa=Object.defineProperty;var aa=(se,x,me)=>x in se?sa(se,x,{enumerable:!0,configurable:!0,writable:!0,value:me}):se[x]=me;var ze=(se,x,me)=>(aa(se,typeof x!="symbol"?x+"":x,me),me),ur=(se,x,me)=>{if(!x.has(se))throw TypeError("Cannot "+me)};var o=(se,x,me)=>(ur(se,x,"read from private field"),me?me.call(se):x.get(se)),j=(se,x,me)=>{if(x.has(se))throw TypeError("Cannot add the same private member more than once");x instanceof WeakSet?x.add(se):x.set(se,me)},B=(se,x,me,Ct)=>(ur(se,x,"write to private field"),Ct?Ct.call(se,me):x.set(se,me),me);var Hi=(se,x,me)=>(ur(se,x,"access private method"),me);(function(se,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("aframe"),require("jsroot"),require("three")):typeof define=="function"&&define.amd?define(["exports","react","aframe","jsroot","three"],x):(se=typeof globalThis<"u"?globalThis:se||self,x(se["React Library Vite"]={},se.React,se.AFRAME$2,se.jsroot,se.THREE$1))})(this,function(se,x,me,Ct,bn){var yt,at,Le,Ai,qe,Pi,At,Ht,Pt,Ee,Ze,Te,ci,L,Je,W,le,ge,N,je,Ve,Qe,lt,bt,ui,ye,Ne,et,tt,vt,it,_t,It,re,xt,ct,Yt,Ge,_i,Oi,Di,Bt,Ft,jt,Nt,Lt,Vt,Ii,Ri,zi,$i,St,Xt,Ut,Mi,Wt;"use strict";function vn(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const wt=vn(bn);var di={exports:{}},Jt={};var dr;function xn(){if(dr)return Jt;dr=1;var i=x,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,n=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,f){var c,p={},C=null,y=null;f!==void 0&&(C=""+f),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(y=u.ref);for(c in u)r.call(u,c)&&!s.hasOwnProperty(c)&&(p[c]=u[c]);if(l&&l.defaultProps)for(c in u=l.defaultProps,u)p[c]===void 0&&(p[c]=u[c]);return{$$typeof:e,type:l,key:C,ref:y,props:p,_owner:n.current}}return Jt.Fragment=t,Jt.jsx=a,Jt.jsxs=a,Jt}var Qt={};var fr;function Sn(){return fr||(fr=1,process.env.NODE_ENV!=="production"&&function(){var i=x,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),T=Symbol.iterator,k="@@iterator";function d(h){if(h===null||typeof h!="object")return null;var _=T&&h[T]||h[k];return typeof _=="function"?_:null}var w=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(h){{for(var _=arguments.length,z=new Array(_>1?_-1:0),J=1;J<_;J++)z[J-1]=arguments[J];D("error",h,z)}}function D(h,_,z){{var J=w.ReactDebugCurrentFrame,be=J.getStackAddendum();be!==""&&(_+="%s",z=z.concat([be]));var Pe=z.map(function(pe){return String(pe)});Pe.unshift("Warning: "+_),Function.prototype.apply.call(console[h],console,Pe)}}var O=!1,g=!1,Z=!1,I=!1,P=!1,F;F=Symbol.for("react.module.reference");function ae(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===s||P||h===n||h===f||h===c||I||h===y||O||g||Z||typeof h=="object"&&h!==null&&(h.$$typeof===C||h.$$typeof===p||h.$$typeof===a||h.$$typeof===l||h.$$typeof===u||h.$$typeof===F||h.getModuleId!==void 0))}function G(h,_,z){var J=h.displayName;if(J)return J;var be=_.displayName||_.name||"";return be!==""?z+"("+be+")":z}function Y(h){return h.displayName||"Context"}function X(h){if(h==null)return null;if(typeof h.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case r:return"Fragment";case t:return"Portal";case s:return"Profiler";case n:return"StrictMode";case f:return"Suspense";case c:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case l:var _=h;return Y(_)+".Consumer";case a:var z=h;return Y(z._context)+".Provider";case u:return G(h,h.render,"ForwardRef");case p:var J=h.displayName||null;return J!==null?J:X(h.type)||"Memo";case C:{var be=h,Pe=be._payload,pe=be._init;try{return X(pe(Pe))}catch{return null}}}return null}var Q=Object.assign,U=0,V,he,fe,ke,Ae,Ye,M;function R(){}R.__reactDisabledLog=!0;function H(){{if(U===0){V=console.log,he=console.info,fe=console.warn,ke=console.error,Ae=console.group,Ye=console.groupCollapsed,M=console.groupEnd;var h={configurable:!0,enumerable:!0,value:R,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}U++}}function b(){{if(U--,U===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Q({},h,{value:V}),info:Q({},h,{value:he}),warn:Q({},h,{value:fe}),error:Q({},h,{value:ke}),group:Q({},h,{value:Ae}),groupCollapsed:Q({},h,{value:Ye}),groupEnd:Q({},h,{value:M})})}U<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var m=w.ReactCurrentDispatcher,K;function S(h,_,z){{if(K===void 0)try{throw Error()}catch(be){var J=be.stack.trim().match(/\n( *(at )?)/);K=J&&J[1]||""}return`
|
|
2
|
+
`+K+h}}var ce=!1,ee;{var ne=typeof WeakMap=="function"?WeakMap:Map;ee=new ne}function A(h,_){if(!h||ce)return"";{var z=ee.get(h);if(z!==void 0)return z}var J;ce=!0;var be=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Pe;Pe=m.current,m.current=null,H();try{if(_){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(ft){J=ft}Reflect.construct(h,[],pe)}else{try{pe.call()}catch(ft){J=ft}h.call(pe.prototype)}}else{try{throw Error()}catch(ft){J=ft}h()}}catch(ft){if(ft&&J&&typeof ft.stack=="string"){for(var de=ft.stack.split(`
|
|
3
3
|
`),Fe=J.stack.split(`
|
|
4
|
-
`),$e=
|
|
5
|
-
`+
|
|
4
|
+
`),$e=de.length-1,He=Fe.length-1;$e>=1&&He>=0&&de[$e]!==Fe[He];)He--;for(;$e>=1&&He>=0;$e--,He--)if(de[$e]!==Fe[He]){if($e!==1||He!==1)do if($e--,He--,He<0||de[$e]!==Fe[He]){var Ue=`
|
|
5
|
+
`+de[$e].replace(" at new "," at ");return h.displayName&&Ue.includes("<anonymous>")&&(Ue=Ue.replace("<anonymous>",h.displayName)),typeof h=="function"&&ee.set(h,Ue),Ue}while($e>=1&&He>=0);break}}}finally{ce=!1,m.current=Pe,b(),Error.prepareStackTrace=be}var qt=h?h.displayName||h.name:"",yn=qt?S(qt):"";return typeof h=="function"&&ee.set(h,yn),yn}function oe(h,_,z){return A(h,!1)}function $(h){var _=h.prototype;return!!(_&&_.isReactComponent)}function te(h,_,z){if(h==null)return"";if(typeof h=="function")return A(h,$(h));if(typeof h=="string")return S(h);switch(h){case f:return S("Suspense");case c:return S("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case u:return oe(h.render);case p:return te(h.type,_,z);case C:{var J=h,be=J._payload,Pe=J._init;try{return te(Pe(be),_,z)}catch{}}}return""}var _e=Object.prototype.hasOwnProperty,ue={},Me=w.ReactDebugCurrentFrame;function rt(h){if(h){var _=h._owner,z=te(h.type,h._source,_?_.type:null);Me.setExtraStackFrame(z)}else Me.setExtraStackFrame(null)}function Ie(h,_,z,J,be){{var Pe=Function.call.bind(_e);for(var pe in h)if(Pe(h,pe)){var de=void 0;try{if(typeof h[pe]!="function"){var Fe=Error((J||"React class")+": "+z+" type `"+pe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[pe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Fe.name="Invariant Violation",Fe}de=h[pe](_,pe,J,z,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($e){de=$e}de&&!(de instanceof Error)&&(rt(be),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",J||"React class",z,pe,typeof de),rt(null)),de instanceof Error&&!(de.message in ue)&&(ue[de.message]=!0,rt(be),E("Failed %s type: %s",z,de.message),rt(null))}}}var Zt=Array.isArray;function ut(h){return Zt(h)}function Xe(h){{var _=typeof Symbol=="function"&&Symbol.toStringTag,z=_&&h[Symbol.toStringTag]||h.constructor.name||"Object";return z}}function q(h){try{return De(h),!1}catch{return!0}}function De(h){return""+h}function Gt(h){if(q(h))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(h)),De(h)}var dt=w.ReactCurrentOwner,nt={key:!0,ref:!0,__self:!0,__source:!0},cn,un,sr;sr={};function Xs(h){if(_e.call(h,"ref")){var _=Object.getOwnPropertyDescriptor(h,"ref").get;if(_&&_.isReactWarning)return!1}return h.ref!==void 0}function Us(h){if(_e.call(h,"key")){var _=Object.getOwnPropertyDescriptor(h,"key").get;if(_&&_.isReactWarning)return!1}return h.key!==void 0}function Ws(h,_){if(typeof h.ref=="string"&&dt.current&&_&&dt.current.stateNode!==_){var z=X(dt.current.type);sr[z]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',X(dt.current.type),h.ref),sr[z]=!0)}}function Zs(h,_){{var z=function(){cn||(cn=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};z.isReactWarning=!0,Object.defineProperty(h,"key",{get:z,configurable:!0})}}function Gs(h,_){{var z=function(){un||(un=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};z.isReactWarning=!0,Object.defineProperty(h,"ref",{get:z,configurable:!0})}}var Ks=function(h,_,z,J,be,Pe,pe){var de={$$typeof:e,type:h,key:_,ref:z,props:pe,_owner:Pe};return de._store={},Object.defineProperty(de._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(de,"_self",{configurable:!1,enumerable:!1,writable:!1,value:J}),Object.defineProperty(de,"_source",{configurable:!1,enumerable:!1,writable:!1,value:be}),Object.freeze&&(Object.freeze(de.props),Object.freeze(de)),de};function qs(h,_,z,J,be){{var Pe,pe={},de=null,Fe=null;z!==void 0&&(Gt(z),de=""+z),Us(_)&&(Gt(_.key),de=""+_.key),Xs(_)&&(Fe=_.ref,Ws(_,be));for(Pe in _)_e.call(_,Pe)&&!nt.hasOwnProperty(Pe)&&(pe[Pe]=_[Pe]);if(h&&h.defaultProps){var $e=h.defaultProps;for(Pe in $e)pe[Pe]===void 0&&(pe[Pe]=$e[Pe])}if(de||Fe){var He=typeof h=="function"?h.displayName||h.name||"Unknown":h;de&&Zs(pe,He),Fe&&Gs(pe,He)}return Ks(h,de,Fe,be,J,dt.current,pe)}}var ar=w.ReactCurrentOwner,dn=w.ReactDebugCurrentFrame;function Kt(h){if(h){var _=h._owner,z=te(h.type,h._source,_?_.type:null);dn.setExtraStackFrame(z)}else dn.setExtraStackFrame(null)}var lr;lr=!1;function cr(h){return typeof h=="object"&&h!==null&&h.$$typeof===e}function fn(){{if(ar.current){var h=X(ar.current.type);if(h)return`
|
|
6
6
|
|
|
7
7
|
Check the render method of \``+h+"`."}return""}}function Js(h){{if(h!==void 0){var _=h.fileName.replace(/^.*[\\\/]/,""),z=h.lineNumber;return`
|
|
8
8
|
|
|
9
9
|
Check your code at `+_+":"+z+"."}return""}}var hn={};function Qs(h){{var _=fn();if(!_){var z=typeof h=="string"?h:h.displayName||h.name;z&&(_=`
|
|
10
10
|
|
|
11
|
-
Check the top-level render call using <`+z+">.")}return _}}function pn(h,_){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var z=Qs(_);if(hn[z])return;hn[z]=!0;var J="";h&&h._owner&&h._owner!==ar.current&&(J=" It was passed a child from "+X(h._owner.type)+"."),Kt(h),
|
|
11
|
+
Check the top-level render call using <`+z+">.")}return _}}function pn(h,_){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var z=Qs(_);if(hn[z])return;hn[z]=!0;var J="";h&&h._owner&&h._owner!==ar.current&&(J=" It was passed a child from "+X(h._owner.type)+"."),Kt(h),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',z,J),Kt(null)}}function mn(h,_){{if(typeof h!="object")return;if(ut(h))for(var z=0;z<h.length;z++){var J=h[z];cr(J)&&pn(J,_)}else if(cr(h))h._store&&(h._store.validated=!0);else if(h){var be=d(h);if(typeof be=="function"&&be!==h.entries)for(var Pe=be.call(h),pe;!(pe=Pe.next()).done;)cr(pe.value)&&pn(pe.value,_)}}}function ea(h){{var _=h.type;if(_==null||typeof _=="string")return;var z;if(typeof _=="function")z=_.propTypes;else if(typeof _=="object"&&(_.$$typeof===u||_.$$typeof===p))z=_.propTypes;else return;if(z){var J=X(_);Ie(z,h.props,"prop",J,h)}else if(_.PropTypes!==void 0&&!lr){lr=!0;var be=X(_);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",be||"Unknown")}typeof _.getDefaultProps=="function"&&!_.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ta(h){{for(var _=Object.keys(h.props),z=0;z<_.length;z++){var J=_[z];if(J!=="children"&&J!=="key"){Kt(h),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",J),Kt(null);break}}h.ref!==null&&(Kt(h),E("Invalid attribute `ref` supplied to `React.Fragment`."),Kt(null))}}function gn(h,_,z,J,be,Pe){{var pe=ae(h);if(!pe){var de="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(de+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Fe=Js(be);Fe?de+=Fe:de+=fn();var $e;h===null?$e="null":ut(h)?$e="array":h!==void 0&&h.$$typeof===e?($e="<"+(X(h.type)||"Unknown")+" />",de=" Did you accidentally export a JSX literal instead of a component?"):$e=typeof h,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$e,de)}var He=qs(h,_,z,be,Pe);if(He==null)return He;if(pe){var Ue=_.children;if(Ue!==void 0)if(J)if(ut(Ue)){for(var qt=0;qt<Ue.length;qt++)mn(Ue[qt],h);Object.freeze&&Object.freeze(Ue)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else mn(Ue,h)}return h===r?ta(He):ea(He),He}}function ia(h,_,z){return gn(h,_,z,!0)}function ra(h,_,z){return gn(h,_,z,!1)}var na=ra,oa=ia;Qt.Fragment=r,Qt.jsx=na,Qt.jsxs=oa}()),Qt}(function(i){process.env.NODE_ENV==="production"?i.exports=xn():i.exports=Sn()})(di);const hr=di.exports.Fragment,v=di.exports.jsx,ie=di.exports.jsxs;var Yi=function(i,e){return Yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])},Yi(i,e)};function Ot(i,e){Yi(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Bi(i){return typeof i=="function"}var pr=!1,We={Promise:void 0,set useDeprecatedSynchronousErrorHandling(i){if(i){var e=new Error;""+e.stack}pr=i},get useDeprecatedSynchronousErrorHandling(){return pr}};function ei(i){setTimeout(function(){throw i},0)}var fi={closed:!0,next:function(i){},error:function(i){if(We.useDeprecatedSynchronousErrorHandling)throw i;ei(i)},complete:function(){}},Cn=function(){return Array.isArray||function(i){return i&&typeof i.length=="number"}}();function wn(i){return i!==null&&typeof i=="object"}var En=function(){function i(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
12
12
|
`+e.map(function(t,r){return r+1+") "+t.toString()}).join(`
|
|
13
|
-
`):"",this.name="UnsubscriptionError",this.errors=e,this}return i.prototype=Object.create(Error.prototype),i}(),hi=Cn,ti=function(){function i(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return i.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this,r=t._parentOrParents,n=t._ctorUnsubscribe,s=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof i)r.remove(this);else if(r!==null)for(var l=0;l<r.length;++l){var u=r[l];u.remove(this)}if(Ii(s)){n&&(this._unsubscribe=void 0);try{s.call(this)}catch(p){e=p instanceof hi?mr(p.errors):[p]}}if(wn(a))for(var l=-1,f=a.length;++l<f;){var c=a[l];if(En(c))try{c.unsubscribe()}catch(S){e=e||[],S instanceof hi?e=e.concat(mr(S.errors)):e.push(S)}}if(e)throw new hi(e)}},i.prototype.add=function(e){var t=e;if(!e)return i.EMPTY;switch(typeof e){case"function":t=new i(e);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof i)){var r=t;t=new i,t._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var n=t._parentOrParents;if(n===null)t._parentOrParents=this;else if(n instanceof i){if(n===this)return t;t._parentOrParents=[n,this]}else if(n.indexOf(this)===-1)n.push(this);else return t;var s=this._subscriptions;return s===null?this._subscriptions=[t]:s.push(t),t},i.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);r!==-1&&t.splice(r,1)}},i.EMPTY=function(e){return e.closed=!0,e}(new i),i}();function mr(i){return i.reduce(function(e,t){return e.concat(t instanceof hi?t.errors:t)},[])}var pi=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),Dt=function(i){Ot(e,i);function e(t,r,n){var s=i.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=fi;break;case 1:if(!t){s.destination=fi;break}if(typeof t=="object"){t instanceof e?(s.syncErrorThrowable=t.syncErrorThrowable,s.destination=t,t.add(s)):(s.syncErrorThrowable=!0,s.destination=new gr(s,t));break}default:s.syncErrorThrowable=!0,s.destination=new gr(s,t,r,n);break}return s}return e.prototype[pi]=function(){return this},e.create=function(t,r,n){var s=new e(t,r,n);return s.syncErrorThrowable=!1,s},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(ti),gr=function(i){Ot(e,i);function e(t,r,n,s){var a=i.call(this)||this;a._parentSubscriber=t;var l,u=a;return Ii(r)?l=r:r&&(l=r.next,n=r.error,s=r.complete,r!==fi&&(u=Object.create(r),Ii(u.unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=l,a._error=n,a._complete=s,a}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var r=this._parentSubscriber;!Ue.useDeprecatedSynchronousErrorHandling||!r.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(r,this._next,t)&&this.unsubscribe()}},e.prototype.error=function(t){if(!this.isStopped){var r=this._parentSubscriber,n=Ue.useDeprecatedSynchronousErrorHandling;if(this._error)!n||!r.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(r,this._error,t),this.unsubscribe());else if(r.syncErrorThrowable)n?(r.syncErrorValue=t,r.syncErrorThrown=!0):ei(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;ei(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var r=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};!Ue.useDeprecatedSynchronousErrorHandling||!r.syncErrorThrowable?(this.__tryOrUnsub(n),this.unsubscribe()):(this.__tryOrSetError(r,n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,r){try{t.call(this._context,r)}catch(n){if(this.unsubscribe(),Ue.useDeprecatedSynchronousErrorHandling)throw n;ei(n)}},e.prototype.__tryOrSetError=function(t,r,n){if(!Ue.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{r.call(this._context,n)}catch(s){return Ue.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=s,t.syncErrorThrown=!0,!0):(ei(s),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Dt);function Tn(i){for(;i;){var e=i,t=e.closed,r=e.destination,n=e.isStopped;if(t||n)return!1;r&&r instanceof Dt?i=r:i=null}return!0}function kn(i,e,t){if(i){if(i instanceof Dt)return i;if(i[pi])return i[pi]()}return!i&&!e&&!t?new Dt(fi):new Dt(i,e,t)}var An=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Pn(i){return i}function _n(i){return i.length===0?Pn:i.length===1?i[0]:function(t){return i.reduce(function(r,n){return n(r)},t)}}var yr=function(){function i(e){this._isScalar=!1,e&&(this._subscribe=e)}return i.prototype.lift=function(e){var t=new i;return t.source=this,t.operator=e,t},i.prototype.subscribe=function(e,t,r){var n=this.operator,s=kn(e,t,r);if(n?s.add(n.call(s,this.source)):s.add(this.source||Ue.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),Ue.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},i.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Ue.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Tn(e)?e.error(t):console.warn(t)}},i.prototype.forEach=function(e,t){var r=this;return t=br(t),new t(function(n,s){var a;a=r.subscribe(function(l){try{e(l)}catch(u){s(u),a&&a.unsubscribe()}},s,n)})},i.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},i.prototype[An]=function(){return this},i.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:_n(e)(this)},i.prototype.toPromise=function(e){var t=this;return e=br(e),new e(function(r,n){var s;t.subscribe(function(a){return s=a},function(a){return n(a)},function(){return r(s)})})},i.create=function(e){return new i(e)},i}();function br(i){if(i||(i=Ue.Promise||Promise),!i)throw new Error("no Promise impl found");return i}var On=function(){function i(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return i.prototype=Object.create(Error.prototype),i}(),ii=On,Dn=function(i){Ot(e,i);function e(t,r){var n=i.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,r=t.observers;if(this.subject=null,!(!r||r.length===0||t.isStopped||t.closed)){var n=r.indexOf(this.subscriber);n!==-1&&r.splice(n,1)}}},e}(ti),Rn=function(i){Ot(e,i);function e(t){var r=i.call(this,t)||this;return r.destination=t,r}return e}(Dt),ht=function(i){Ot(e,i);function e(){var t=i.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype[pi]=function(){return new Rn(this)},e.prototype.lift=function(t){var r=new vr(this,this);return r.operator=t,r},e.prototype.next=function(t){if(this.closed)throw new ii;if(!this.isStopped)for(var r=this.observers,n=r.length,s=r.slice(),a=0;a<n;a++)s[a].next(t)},e.prototype.error=function(t){if(this.closed)throw new ii;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var r=this.observers,n=r.length,s=r.slice(),a=0;a<n;a++)s[a].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new ii;this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),s=0;s<r;s++)n[s].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new ii;return i.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new ii;return this.hasError?(t.error(this.thrownError),ti.EMPTY):this.isStopped?(t.complete(),ti.EMPTY):(this.observers.push(t),new Dn(this,t))},e.prototype.asObservable=function(){var t=new yr;return t.source=this,t},e.create=function(t,r){return new vr(t,r)},e}(yr),vr=function(i){Ot(e,i);function e(t,r){var n=i.call(this)||this;return n.destination=t,n.source=r,n}return e.prototype.next=function(t){var r=this.destination;r&&r.next&&r.next(t)},e.prototype.error=function(t){var r=this.destination;r&&r.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var r=this.source;return r?this.source.subscribe(t):ti.EMPTY},e}(ht);class zn{constructor(){j(this,yt,void 0);Y(this,yt,new ht)}setVisibilityOfBanners(e){o(this,yt).next({device:e})}shiftBanners(){o(this,yt).next("shift")}setUserState(){o(this,yt).next("show")}getCameraSubject(){return o(this,yt).asObservable()}}yt=new WeakMap;const Ct=new zn,Rt=x.createContext();class Bi{constructor(){j(this,at,void 0);Y(this,at,new ht)}changeHistogramSectionByOffset(e,t,r,n){o(this,at).next({name:t,axis:e,increment:r,defaultRange:n})}changeHistogramFunction(e,t){o(this,at).next({name:t,fFunction:e})}changeHistogramScale(e,t){o(this,at).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){o(this,at).next({name:t,minValue:e})}getChangedSection(){return o(this,at).asObservable()}}at=new WeakMap;const Ke=new Bi,_e=new Bi,Re=new Bi;var mi={exports:{}},ve={};var xr;function $n(){if(xr)return ve;xr=1;var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),T;T=Symbol.for("react.module.reference");function C(d){if(typeof d=="object"&&d!==null){var E=d.$$typeof;switch(E){case i:switch(d=d.type,d){case t:case n:case r:case f:case c:return d;default:switch(d=d&&d.$$typeof,d){case l:case a:case u:case S:case p:case s:return d;default:return E}}case e:return E}}}return ve.ContextConsumer=a,ve.ContextProvider=s,ve.Element=i,ve.ForwardRef=u,ve.Fragment=t,ve.Lazy=S,ve.Memo=p,ve.Portal=e,ve.Profiler=n,ve.StrictMode=r,ve.Suspense=f,ve.SuspenseList=c,ve.isAsyncMode=function(){return!1},ve.isConcurrentMode=function(){return!1},ve.isContextConsumer=function(d){return C(d)===a},ve.isContextProvider=function(d){return C(d)===s},ve.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===i},ve.isForwardRef=function(d){return C(d)===u},ve.isFragment=function(d){return C(d)===t},ve.isLazy=function(d){return C(d)===S},ve.isMemo=function(d){return C(d)===p},ve.isPortal=function(d){return C(d)===e},ve.isProfiler=function(d){return C(d)===n},ve.isStrictMode=function(d){return C(d)===r},ve.isSuspense=function(d){return C(d)===f},ve.isSuspenseList=function(d){return C(d)===c},ve.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===t||d===n||d===r||d===f||d===c||d===b||typeof d=="object"&&d!==null&&(d.$$typeof===S||d.$$typeof===p||d.$$typeof===s||d.$$typeof===a||d.$$typeof===u||d.$$typeof===T||d.getModuleId!==void 0)},ve.typeOf=C,ve}var xe={};var Sr;function Mn(){return Sr||(Sr=1,process.env.NODE_ENV!=="production"&&function(){var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),T=!1,C=!1,d=!1,E=!1,w=!1,D;D=Symbol.for("react.module.reference");function O($){return!!(typeof $=="string"||typeof $=="function"||$===t||$===n||w||$===r||$===f||$===c||E||$===b||T||C||d||typeof $=="object"&&$!==null&&($.$$typeof===S||$.$$typeof===p||$.$$typeof===s||$.$$typeof===a||$.$$typeof===u||$.$$typeof===D||$.getModuleId!==void 0))}function g($){if(typeof $=="object"&&$!==null){var te=$.$$typeof;switch(te){case i:var Oe=$.type;switch(Oe){case t:case n:case r:case f:case c:return Oe;default:var le=Oe&&Oe.$$typeof;switch(le){case l:case a:case u:case S:case p:case s:return le;default:return te}}case e:return te}}}var Z=a,I=s,P=i,F=u,ne=t,G=S,B=p,X=e,Q=n,W=r,V=f,he=c,ue=!1,ke=!1;function Ae($){return ue||(ue=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Be($){return ke||(ke=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function M($){return g($)===a}function R($){return g($)===s}function H($){return typeof $=="object"&&$!==null&&$.$$typeof===i}function y($){return g($)===u}function m($){return g($)===t}function ee($){return g($)===S}function A($){return g($)===p}function pe($){return g($)===e}function ie($){return g($)===n}function oe($){return g($)===r}function k($){return g($)===f}function de($){return g($)===c}xe.ContextConsumer=Z,xe.ContextProvider=I,xe.Element=P,xe.ForwardRef=F,xe.Fragment=ne,xe.Lazy=G,xe.Memo=B,xe.Portal=X,xe.Profiler=Q,xe.StrictMode=W,xe.Suspense=V,xe.SuspenseList=he,xe.isAsyncMode=Ae,xe.isConcurrentMode=Be,xe.isContextConsumer=M,xe.isContextProvider=R,xe.isElement=H,xe.isForwardRef=y,xe.isFragment=m,xe.isLazy=ee,xe.isMemo=A,xe.isPortal=pe,xe.isProfiler=ie,xe.isStrictMode=oe,xe.isSuspense=k,xe.isSuspenseList=de,xe.isValidElementType=O,xe.typeOf=g}()),xe}(function(i){process.env.NODE_ENV==="production"?i.exports=$n():i.exports=Mn()})(mi);function Hn(i){function e(M,R,H,y,m){for(var ee=0,A=0,pe=0,ie=0,oe,k,de=0,$=0,te,Oe=te=oe=0,le=0,Me=0,rt=0,Ie=0,Zt=H.length,ut=Zt-1,Xe,q="",De="",Gt="",dt="",nt;le<Zt;){if(k=H.charCodeAt(le),le===ut&&A+ie+pe+ee!==0&&(A!==0&&(k=A===47?10:47),ie=pe=ee=0,Zt++,ut++),A+ie+pe+ee===0){if(le===ut&&(0<Me&&(q=q.replace(S,"")),0<q.trim().length)){switch(k){case 32:case 9:case 59:case 13:case 10:break;default:q+=H.charAt(le)}k=59}switch(k){case 123:for(q=q.trim(),oe=q.charCodeAt(0),te=1,Ie=++le;le<Zt;){switch(k=H.charCodeAt(le)){case 123:te++;break;case 125:te--;break;case 47:switch(k=H.charCodeAt(le+1)){case 42:case 47:e:{for(Oe=le+1;Oe<ut;++Oe)switch(H.charCodeAt(Oe)){case 47:if(k===42&&H.charCodeAt(Oe-1)===42&&le+2!==Oe){le=Oe+1;break e}break;case 10:if(k===47){le=Oe+1;break e}}le=Oe}}break;case 91:k++;case 40:k++;case 34:case 39:for(;le++<ut&&H.charCodeAt(le)!==k;);}if(te===0)break;le++}switch(te=H.substring(Ie,le),oe===0&&(oe=(q=q.replace(p,"").trim()).charCodeAt(0)),oe){case 64:switch(0<Me&&(q=q.replace(S,"")),k=q.charCodeAt(1),k){case 100:case 109:case 115:case 45:Me=R;break;default:Me=V}if(te=e(R,Me,te,k,m+1),Ie=te.length,0<ue&&(Me=t(V,q,rt),nt=l(3,te,Me,R,X,B,Ie,k,m,y),q=Me.join(""),nt!==void 0&&(Ie=(te=nt.trim()).length)===0&&(k=0,te="")),0<Ie)switch(k){case 115:q=q.replace(Z,a);case 100:case 109:case 45:te=q+"{"+te+"}";break;case 107:q=q.replace(w,"$1 $2"),te=q+"{"+te+"}",te=W===1||W===2&&s("@"+te,3)?"@-webkit-"+te+"@"+te:"@"+te;break;default:te=q+te,y===112&&(te=(De+=te,""))}else te="";break;default:te=e(R,t(R,q,rt),te,y,m+1)}Gt+=te,te=rt=Me=Oe=oe=0,q="",k=H.charCodeAt(++le);break;case 125:case 59:if(q=(0<Me?q.replace(S,""):q).trim(),1<(Ie=q.length))switch(Oe===0&&(oe=q.charCodeAt(0),oe===45||96<oe&&123>oe)&&(Ie=(q=q.replace(" ",":")).length),0<ue&&(nt=l(1,q,R,M,X,B,De.length,y,m,y))!==void 0&&(Ie=(q=nt.trim()).length)===0&&(q="\0\0"),oe=q.charCodeAt(0),k=q.charCodeAt(1),oe){case 0:break;case 64:if(k===105||k===99){dt+=q+H.charAt(le);break}default:q.charCodeAt(Ie-1)!==58&&(De+=n(q,oe,k,q.charCodeAt(2)))}rt=Me=Oe=oe=0,q="",k=H.charCodeAt(++le)}}switch(k){case 13:case 10:A===47?A=0:1+oe===0&&y!==107&&0<q.length&&(Me=1,q+="\0"),0<ue*Ae&&l(0,q,R,M,X,B,De.length,y,m,y),B=1,X++;break;case 59:case 125:if(A+ie+pe+ee===0){B++;break}default:switch(B++,Xe=H.charAt(le),k){case 9:case 32:if(ie+ee+A===0)switch(de){case 44:case 58:case 9:case 32:Xe="";break;default:k!==32&&(Xe=" ")}break;case 0:Xe="\\0";break;case 12:Xe="\\f";break;case 11:Xe="\\v";break;case 38:ie+A+ee===0&&(Me=rt=1,Xe="\f"+Xe);break;case 108:if(ie+A+ee+Q===0&&0<Oe)switch(le-Oe){case 2:de===112&&H.charCodeAt(le-3)===58&&(Q=de);case 8:$===111&&(Q=$)}break;case 58:ie+A+ee===0&&(Oe=le);break;case 44:A+pe+ie+ee===0&&(Me=1,Xe+="\r");break;case 34:case 39:A===0&&(ie=ie===k?0:ie===0?k:ie);break;case 91:ie+A+pe===0&&ee++;break;case 93:ie+A+pe===0&&ee--;break;case 41:ie+A+ee===0&&pe--;break;case 40:if(ie+A+ee===0){if(oe===0)switch(2*de+3*$){case 533:break;default:oe=1}pe++}break;case 64:A+pe+ie+ee+Oe+te===0&&(te=1);break;case 42:case 47:if(!(0<ie+ee+pe))switch(A){case 0:switch(2*k+3*H.charCodeAt(le+1)){case 235:A=47;break;case 220:Ie=le,A=42}break;case 42:k===47&&de===42&&Ie+2!==le&&(H.charCodeAt(Ie+2)===33&&(De+=H.substring(Ie,le+1)),Xe="",A=0)}}A===0&&(q+=Xe)}$=de,de=k,le++}if(Ie=De.length,0<Ie){if(Me=R,0<ue&&(nt=l(2,De,Me,M,X,B,Ie,y,m,y),nt!==void 0&&(De=nt).length===0))return dt+De+Gt;if(De=Me.join(",")+"{"+De+"}",W*Q!==0){switch(W!==2||s(De,2)||(Q=0),Q){case 111:De=De.replace(O,":-moz-$1")+De;break;case 112:De=De.replace(D,"::-webkit-input-$1")+De.replace(D,"::-moz-$1")+De.replace(D,":-ms-input-$1")+De}Q=0}}return dt+De+Gt}function t(M,R,H){var y=R.trim().split(d);R=y;var m=y.length,ee=M.length;switch(ee){case 0:case 1:var A=0;for(M=ee===0?"":M[0]+" ";A<m;++A)R[A]=r(M,R[A],H).trim();break;default:var pe=A=0;for(R=[];A<m;++A)for(var ie=0;ie<ee;++ie)R[pe++]=r(M[ie]+" ",y[A],H).trim()}return R}function r(M,R,H){var y=R.charCodeAt(0);switch(33>y&&(y=(R=R.trim()).charCodeAt(0)),y){case 38:return R.replace(E,"$1"+M.trim());case 58:return M.trim()+R.replace(E,"$1"+M.trim());default:if(0<1*H&&0<R.indexOf("\f"))return R.replace(E,(M.charCodeAt(0)===58?"":"$1")+M.trim())}return M+R}function n(M,R,H,y){var m=M+";",ee=2*R+3*H+4*y;if(ee===944){M=m.indexOf(":",9)+1;var A=m.substring(M,m.length-1).trim();return A=m.substring(0,M).trim()+A+";",W===1||W===2&&s(A,1)?"-webkit-"+A+A:A}if(W===0||W===2&&!s(m,1))return m;switch(ee){case 1015:return m.charCodeAt(10)===97?"-webkit-"+m+m:m;case 951:return m.charCodeAt(3)===116?"-webkit-"+m+m:m;case 963:return m.charCodeAt(5)===110?"-webkit-"+m+m:m;case 1009:if(m.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+m+m;case 978:return"-webkit-"+m+"-moz-"+m+m;case 1019:case 983:return"-webkit-"+m+"-moz-"+m+"-ms-"+m+m;case 883:if(m.charCodeAt(8)===45)return"-webkit-"+m+m;if(0<m.indexOf("image-set(",11))return m.replace(G,"$1-webkit-$2")+m;break;case 932:if(m.charCodeAt(4)===45)switch(m.charCodeAt(5)){case 103:return"-webkit-box-"+m.replace("-grow","")+"-webkit-"+m+"-ms-"+m.replace("grow","positive")+m;case 115:return"-webkit-"+m+"-ms-"+m.replace("shrink","negative")+m;case 98:return"-webkit-"+m+"-ms-"+m.replace("basis","preferred-size")+m}return"-webkit-"+m+"-ms-"+m+m;case 964:return"-webkit-"+m+"-ms-flex-"+m+m;case 1023:if(m.charCodeAt(8)!==99)break;return A=m.substring(m.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+A+"-webkit-"+m+"-ms-flex-pack"+A+m;case 1005:return T.test(m)?m.replace(b,":-webkit-")+m.replace(b,":-moz-")+m:m;case 1e3:switch(A=m.substring(13).trim(),R=A.indexOf("-")+1,A.charCodeAt(0)+A.charCodeAt(R)){case 226:A=m.replace(g,"tb");break;case 232:A=m.replace(g,"tb-rl");break;case 220:A=m.replace(g,"lr");break;default:return m}return"-webkit-"+m+"-ms-"+A+m;case 1017:if(m.indexOf("sticky",9)===-1)break;case 975:switch(R=(m=M).length-10,A=(m.charCodeAt(R)===33?m.substring(0,R):m).substring(M.indexOf(":",7)+1).trim(),ee=A.charCodeAt(0)+(A.charCodeAt(7)|0)){case 203:if(111>A.charCodeAt(8))break;case 115:m=m.replace(A,"-webkit-"+A)+";"+m;break;case 207:case 102:m=m.replace(A,"-webkit-"+(102<ee?"inline-":"")+"box")+";"+m.replace(A,"-webkit-"+A)+";"+m.replace(A,"-ms-"+A+"box")+";"+m}return m+";";case 938:if(m.charCodeAt(5)===45)switch(m.charCodeAt(6)){case 105:return A=m.replace("-items",""),"-webkit-"+m+"-webkit-box-"+A+"-ms-flex-"+A+m;case 115:return"-webkit-"+m+"-ms-flex-item-"+m.replace(P,"")+m;default:return"-webkit-"+m+"-ms-flex-line-pack"+m.replace("align-content","").replace(P,"")+m}break;case 973:case 989:if(m.charCodeAt(3)!==45||m.charCodeAt(4)===122)break;case 931:case 953:if(ne.test(M)===!0)return(A=M.substring(M.indexOf(":")+1)).charCodeAt(0)===115?n(M.replace("stretch","fill-available"),R,H,y).replace(":fill-available",":stretch"):m.replace(A,"-webkit-"+A)+m.replace(A,"-moz-"+A.replace("fill-",""))+m;break;case 962:if(m="-webkit-"+m+(m.charCodeAt(5)===102?"-ms-"+m:"")+m,H+y===211&&m.charCodeAt(13)===105&&0<m.indexOf("transform",10))return m.substring(0,m.indexOf(";",27)+1).replace(C,"$1-webkit-$2")+m}return m}function s(M,R){var H=M.indexOf(R===1?":":"{"),y=M.substring(0,R!==3?H:10);return H=M.substring(H+1,M.length-1),ke(R!==2?y:y.replace(F,"$1"),H,R)}function a(M,R){var H=n(R,R.charCodeAt(0),R.charCodeAt(1),R.charCodeAt(2));return H!==R+";"?H.replace(I," or ($1)").substring(4):"("+R+")"}function l(M,R,H,y,m,ee,A,pe,ie,oe){for(var k=0,de=R,$;k<ue;++k)switch($=he[k].call(c,M,de,H,y,m,ee,A,pe,ie,oe)){case void 0:case!1:case!0:case null:break;default:de=$}if(de!==R)return de}function u(M){switch(M){case void 0:case null:ue=he.length=0;break;default:if(typeof M=="function")he[ue++]=M;else if(typeof M=="object")for(var R=0,H=M.length;R<H;++R)u(M[R]);else Ae=!!M|0}return u}function f(M){return M=M.prefix,M!==void 0&&(ke=null,M?typeof M!="function"?W=1:(W=2,ke=M):W=0),f}function c(M,R){var H=M;if(33>H.charCodeAt(0)&&(H=H.trim()),Be=H,H=[Be],0<ue){var y=l(-1,R,H,H,X,B,0,0,0,0);y!==void 0&&typeof y=="string"&&(R=y)}var m=e(V,H,R,0,0);return 0<ue&&(y=l(-2,m,H,H,X,B,m.length,0,0,0),y!==void 0&&(m=y)),Be="",Q=0,B=X=1,m}var p=/^\0+/g,S=/[\0\r\f]/g,b=/: */g,T=/zoo|gra/,C=/([,: ])(transform)/g,d=/,\r+?/g,E=/([\t\r\n ])*\f?&/g,w=/@(k\w+)\s*(\S*)\s*/,D=/::(place)/g,O=/:(read-only)/g,g=/[svh]\w+-[tblr]{2}/,Z=/\(\s*(.*)\s*\)/g,I=/([\s\S]*?);/g,P=/-self|flex-/g,F=/[^]*?(:[rp][el]a[\w-]+)[^]*/,ne=/stretch|:\s*\w+\-(?:conte|avail)/,G=/([^-])(image-set\()/,B=1,X=1,Q=0,W=1,V=[],he=[],ue=0,ke=null,Ae=0,Be="";return c.use=u,c.set=f,i!==void 0&&f(i),c}var In={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Bn(i){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=i(t)),e[t]}}var Yn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,wr=Bn(function(i){return Yn.test(i)||i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)<91}),Er={exports:{}},Se={};var Cr;function Fn(){if(Cr)return Se;Cr=1;var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,r=i?Symbol.for("react.fragment"):60107,n=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,a=i?Symbol.for("react.provider"):60109,l=i?Symbol.for("react.context"):60110,u=i?Symbol.for("react.async_mode"):60111,f=i?Symbol.for("react.concurrent_mode"):60111,c=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,S=i?Symbol.for("react.suspense_list"):60120,b=i?Symbol.for("react.memo"):60115,T=i?Symbol.for("react.lazy"):60116,C=i?Symbol.for("react.block"):60121,d=i?Symbol.for("react.fundamental"):60117,E=i?Symbol.for("react.responder"):60118,w=i?Symbol.for("react.scope"):60119;function D(g){if(typeof g=="object"&&g!==null){var Z=g.$$typeof;switch(Z){case e:switch(g=g.type,g){case u:case f:case r:case s:case n:case p:return g;default:switch(g=g&&g.$$typeof,g){case l:case c:case T:case b:case a:return g;default:return Z}}case t:return Z}}}function O(g){return D(g)===f}return Se.AsyncMode=u,Se.ConcurrentMode=f,Se.ContextConsumer=l,Se.ContextProvider=a,Se.Element=e,Se.ForwardRef=c,Se.Fragment=r,Se.Lazy=T,Se.Memo=b,Se.Portal=t,Se.Profiler=s,Se.StrictMode=n,Se.Suspense=p,Se.isAsyncMode=function(g){return O(g)||D(g)===u},Se.isConcurrentMode=O,Se.isContextConsumer=function(g){return D(g)===l},Se.isContextProvider=function(g){return D(g)===a},Se.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Se.isForwardRef=function(g){return D(g)===c},Se.isFragment=function(g){return D(g)===r},Se.isLazy=function(g){return D(g)===T},Se.isMemo=function(g){return D(g)===b},Se.isPortal=function(g){return D(g)===t},Se.isProfiler=function(g){return D(g)===s},Se.isStrictMode=function(g){return D(g)===n},Se.isSuspense=function(g){return D(g)===p},Se.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===f||g===s||g===n||g===p||g===S||typeof g=="object"&&g!==null&&(g.$$typeof===T||g.$$typeof===b||g.$$typeof===a||g.$$typeof===l||g.$$typeof===c||g.$$typeof===d||g.$$typeof===E||g.$$typeof===w||g.$$typeof===C)},Se.typeOf=D,Se}var we={};var Tr;function jn(){return Tr||(Tr=1,process.env.NODE_ENV!=="production"&&function(){var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,r=i?Symbol.for("react.fragment"):60107,n=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,a=i?Symbol.for("react.provider"):60109,l=i?Symbol.for("react.context"):60110,u=i?Symbol.for("react.async_mode"):60111,f=i?Symbol.for("react.concurrent_mode"):60111,c=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,S=i?Symbol.for("react.suspense_list"):60120,b=i?Symbol.for("react.memo"):60115,T=i?Symbol.for("react.lazy"):60116,C=i?Symbol.for("react.block"):60121,d=i?Symbol.for("react.fundamental"):60117,E=i?Symbol.for("react.responder"):60118,w=i?Symbol.for("react.scope"):60119;function D(k){return typeof k=="string"||typeof k=="function"||k===r||k===f||k===s||k===n||k===p||k===S||typeof k=="object"&&k!==null&&(k.$$typeof===T||k.$$typeof===b||k.$$typeof===a||k.$$typeof===l||k.$$typeof===c||k.$$typeof===d||k.$$typeof===E||k.$$typeof===w||k.$$typeof===C)}function O(k){if(typeof k=="object"&&k!==null){var de=k.$$typeof;switch(de){case e:var $=k.type;switch($){case u:case f:case r:case s:case n:case p:return $;default:var te=$&&$.$$typeof;switch(te){case l:case c:case T:case b:case a:return te;default:return de}}case t:return de}}}var g=u,Z=f,I=l,P=a,F=e,ne=c,G=r,B=T,X=b,Q=t,W=s,V=n,he=p,ue=!1;function ke(k){return ue||(ue=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Ae(k)||O(k)===u}function Ae(k){return O(k)===f}function Be(k){return O(k)===l}function M(k){return O(k)===a}function R(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function H(k){return O(k)===c}function y(k){return O(k)===r}function m(k){return O(k)===T}function ee(k){return O(k)===b}function A(k){return O(k)===t}function pe(k){return O(k)===s}function ie(k){return O(k)===n}function oe(k){return O(k)===p}we.AsyncMode=g,we.ConcurrentMode=Z,we.ContextConsumer=I,we.ContextProvider=P,we.Element=F,we.ForwardRef=ne,we.Fragment=G,we.Lazy=B,we.Memo=X,we.Portal=Q,we.Profiler=W,we.StrictMode=V,we.Suspense=he,we.isAsyncMode=ke,we.isConcurrentMode=Ae,we.isContextConsumer=Be,we.isContextProvider=M,we.isElement=R,we.isForwardRef=H,we.isFragment=y,we.isLazy=m,we.isMemo=ee,we.isPortal=A,we.isProfiler=pe,we.isStrictMode=ie,we.isSuspense=oe,we.isValidElementType=D,we.typeOf=O}()),we}(function(i){process.env.NODE_ENV==="production"?i.exports=Fn():i.exports=jn()})(Er);var Yi=Er.exports,Nn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ln={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vn={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},kr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fi={};Fi[Yi.ForwardRef]=Vn,Fi[Yi.Memo]=kr;function Ar(i){return Yi.isMemo(i)?kr:Fi[i.$$typeof]||Nn}var Xn=Object.defineProperty,Wn=Object.getOwnPropertyNames,Pr=Object.getOwnPropertySymbols,Un=Object.getOwnPropertyDescriptor,Zn=Object.getPrototypeOf,_r=Object.prototype;function Or(i,e,t){if(typeof e!="string"){if(_r){var r=Zn(e);r&&r!==_r&&Or(i,r,t)}var n=Wn(e);Pr&&(n=n.concat(Pr(e)));for(var s=Ar(i),a=Ar(e),l=0;l<n.length;++l){var u=n[l];if(!Ln[u]&&!(t&&t[u])&&!(a&&a[u])&&!(s&&s[u])){var f=Un(e,u);try{Xn(i,u,f)}catch{}}}}return i}var Gn=Or;function ot(){return(ot=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i}).apply(this,arguments)}var Dr=function(i,e){for(var t=[i[0]],r=0,n=e.length;r<n;r+=1)t.push(e[r],i[r+1]);return t},ji=function(i){return i!==null&&typeof i=="object"&&(i.toString?i.toString():Object.prototype.toString.call(i))==="[object Object]"&&!mi.exports.typeOf(i)},gi=Object.freeze([]),pt=Object.freeze({});function ri(i){return typeof i=="function"}function Ni(i){return process.env.NODE_ENV!=="production"&&typeof i=="string"&&i||i.displayName||i.name||"Component"}function Li(i){return i&&typeof i.styledComponentId=="string"}var zt=typeof process<"u"&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Vi=typeof window<"u"&&"HTMLElement"in window,Kn=Boolean(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),qn=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
13
|
+
`):"",this.name="UnsubscriptionError",this.errors=e,this}return i.prototype=Object.create(Error.prototype),i}(),hi=En,ti=function(){function i(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return i.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this,r=t._parentOrParents,n=t._ctorUnsubscribe,s=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof i)r.remove(this);else if(r!==null)for(var l=0;l<r.length;++l){var u=r[l];u.remove(this)}if(Bi(s)){n&&(this._unsubscribe=void 0);try{s.call(this)}catch(p){e=p instanceof hi?mr(p.errors):[p]}}if(Cn(a))for(var l=-1,f=a.length;++l<f;){var c=a[l];if(wn(c))try{c.unsubscribe()}catch(C){e=e||[],C instanceof hi?e=e.concat(mr(C.errors)):e.push(C)}}if(e)throw new hi(e)}},i.prototype.add=function(e){var t=e;if(!e)return i.EMPTY;switch(typeof e){case"function":t=new i(e);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof i)){var r=t;t=new i,t._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var n=t._parentOrParents;if(n===null)t._parentOrParents=this;else if(n instanceof i){if(n===this)return t;t._parentOrParents=[n,this]}else if(n.indexOf(this)===-1)n.push(this);else return t;var s=this._subscriptions;return s===null?this._subscriptions=[t]:s.push(t),t},i.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);r!==-1&&t.splice(r,1)}},i.EMPTY=function(e){return e.closed=!0,e}(new i),i}();function mr(i){return i.reduce(function(e,t){return e.concat(t instanceof hi?t.errors:t)},[])}var pi=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),Dt=function(i){Ot(e,i);function e(t,r,n){var s=i.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=fi;break;case 1:if(!t){s.destination=fi;break}if(typeof t=="object"){t instanceof e?(s.syncErrorThrowable=t.syncErrorThrowable,s.destination=t,t.add(s)):(s.syncErrorThrowable=!0,s.destination=new gr(s,t));break}default:s.syncErrorThrowable=!0,s.destination=new gr(s,t,r,n);break}return s}return e.prototype[pi]=function(){return this},e.create=function(t,r,n){var s=new e(t,r,n);return s.syncErrorThrowable=!1,s},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(ti),gr=function(i){Ot(e,i);function e(t,r,n,s){var a=i.call(this)||this;a._parentSubscriber=t;var l,u=a;return Bi(r)?l=r:r&&(l=r.next,n=r.error,s=r.complete,r!==fi&&(u=Object.create(r),Bi(u.unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=l,a._error=n,a._complete=s,a}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var r=this._parentSubscriber;!We.useDeprecatedSynchronousErrorHandling||!r.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(r,this._next,t)&&this.unsubscribe()}},e.prototype.error=function(t){if(!this.isStopped){var r=this._parentSubscriber,n=We.useDeprecatedSynchronousErrorHandling;if(this._error)!n||!r.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(r,this._error,t),this.unsubscribe());else if(r.syncErrorThrowable)n?(r.syncErrorValue=t,r.syncErrorThrown=!0):ei(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;ei(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var r=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};!We.useDeprecatedSynchronousErrorHandling||!r.syncErrorThrowable?(this.__tryOrUnsub(n),this.unsubscribe()):(this.__tryOrSetError(r,n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,r){try{t.call(this._context,r)}catch(n){if(this.unsubscribe(),We.useDeprecatedSynchronousErrorHandling)throw n;ei(n)}},e.prototype.__tryOrSetError=function(t,r,n){if(!We.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{r.call(this._context,n)}catch(s){return We.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=s,t.syncErrorThrown=!0,!0):(ei(s),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Dt);function Tn(i){for(;i;){var e=i,t=e.closed,r=e.destination,n=e.isStopped;if(t||n)return!1;r&&r instanceof Dt?i=r:i=null}return!0}function kn(i,e,t){if(i){if(i instanceof Dt)return i;if(i[pi])return i[pi]()}return!i&&!e&&!t?new Dt(fi):new Dt(i,e,t)}var An=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Pn(i){return i}function _n(i){return i.length===0?Pn:i.length===1?i[0]:function(t){return i.reduce(function(r,n){return n(r)},t)}}var yr=function(){function i(e){this._isScalar=!1,e&&(this._subscribe=e)}return i.prototype.lift=function(e){var t=new i;return t.source=this,t.operator=e,t},i.prototype.subscribe=function(e,t,r){var n=this.operator,s=kn(e,t,r);if(n?s.add(n.call(s,this.source)):s.add(this.source||We.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),We.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},i.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){We.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Tn(e)?e.error(t):console.warn(t)}},i.prototype.forEach=function(e,t){var r=this;return t=br(t),new t(function(n,s){var a;a=r.subscribe(function(l){try{e(l)}catch(u){s(u),a&&a.unsubscribe()}},s,n)})},i.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},i.prototype[An]=function(){return this},i.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:_n(e)(this)},i.prototype.toPromise=function(e){var t=this;return e=br(e),new e(function(r,n){var s;t.subscribe(function(a){return s=a},function(a){return n(a)},function(){return r(s)})})},i.create=function(e){return new i(e)},i}();function br(i){if(i||(i=We.Promise||Promise),!i)throw new Error("no Promise impl found");return i}var On=function(){function i(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return i.prototype=Object.create(Error.prototype),i}(),ii=On,Dn=function(i){Ot(e,i);function e(t,r){var n=i.call(this)||this;return n.subject=t,n.subscriber=r,n.closed=!1,n}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,r=t.observers;if(this.subject=null,!(!r||r.length===0||t.isStopped||t.closed)){var n=r.indexOf(this.subscriber);n!==-1&&r.splice(n,1)}}},e}(ti),Rn=function(i){Ot(e,i);function e(t){var r=i.call(this,t)||this;return r.destination=t,r}return e}(Dt),ht=function(i){Ot(e,i);function e(){var t=i.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype[pi]=function(){return new Rn(this)},e.prototype.lift=function(t){var r=new vr(this,this);return r.operator=t,r},e.prototype.next=function(t){if(this.closed)throw new ii;if(!this.isStopped)for(var r=this.observers,n=r.length,s=r.slice(),a=0;a<n;a++)s[a].next(t)},e.prototype.error=function(t){if(this.closed)throw new ii;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var r=this.observers,n=r.length,s=r.slice(),a=0;a<n;a++)s[a].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new ii;this.isStopped=!0;for(var t=this.observers,r=t.length,n=t.slice(),s=0;s<r;s++)n[s].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new ii;return i.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new ii;return this.hasError?(t.error(this.thrownError),ti.EMPTY):this.isStopped?(t.complete(),ti.EMPTY):(this.observers.push(t),new Dn(this,t))},e.prototype.asObservable=function(){var t=new yr;return t.source=this,t},e.create=function(t,r){return new vr(t,r)},e}(yr),vr=function(i){Ot(e,i);function e(t,r){var n=i.call(this)||this;return n.destination=t,n.source=r,n}return e.prototype.next=function(t){var r=this.destination;r&&r.next&&r.next(t)},e.prototype.error=function(t){var r=this.destination;r&&r.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var r=this.source;return r?this.source.subscribe(t):ti.EMPTY},e}(ht);class zn{constructor(){j(this,yt,void 0);B(this,yt,new ht)}setVisibilityOfBanners(e){o(this,yt).next({device:e})}shiftBanners(){o(this,yt).next("shift")}setUserState(){o(this,yt).next("show")}getCameraSubject(){return o(this,yt).asObservable()}}yt=new WeakMap;const Et=new zn,Rt=x.createContext();class Fi{constructor(){j(this,at,void 0);B(this,at,new ht)}changeHistogramSectionByOffset(e,t,r,n){o(this,at).next({name:t,axis:e,increment:r,defaultRange:n})}changeHistogramFunction(e,t){o(this,at).next({name:t,fFunction:e})}changeHistogramScale(e,t){o(this,at).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){o(this,at).next({name:t,minValue:e})}getChangedSection(){return o(this,at).asObservable()}}at=new WeakMap;const Ke=new Fi,Oe=new Fi,Re=new Fi;var mi={exports:{}},ve={};var xr;function $n(){if(xr)return ve;xr=1;var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),T;T=Symbol.for("react.module.reference");function k(d){if(typeof d=="object"&&d!==null){var w=d.$$typeof;switch(w){case i:switch(d=d.type,d){case t:case n:case r:case f:case c:return d;default:switch(d=d&&d.$$typeof,d){case l:case a:case u:case C:case p:case s:return d;default:return w}}case e:return w}}}return ve.ContextConsumer=a,ve.ContextProvider=s,ve.Element=i,ve.ForwardRef=u,ve.Fragment=t,ve.Lazy=C,ve.Memo=p,ve.Portal=e,ve.Profiler=n,ve.StrictMode=r,ve.Suspense=f,ve.SuspenseList=c,ve.isAsyncMode=function(){return!1},ve.isConcurrentMode=function(){return!1},ve.isContextConsumer=function(d){return k(d)===a},ve.isContextProvider=function(d){return k(d)===s},ve.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===i},ve.isForwardRef=function(d){return k(d)===u},ve.isFragment=function(d){return k(d)===t},ve.isLazy=function(d){return k(d)===C},ve.isMemo=function(d){return k(d)===p},ve.isPortal=function(d){return k(d)===e},ve.isProfiler=function(d){return k(d)===n},ve.isStrictMode=function(d){return k(d)===r},ve.isSuspense=function(d){return k(d)===f},ve.isSuspenseList=function(d){return k(d)===c},ve.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===t||d===n||d===r||d===f||d===c||d===y||typeof d=="object"&&d!==null&&(d.$$typeof===C||d.$$typeof===p||d.$$typeof===s||d.$$typeof===a||d.$$typeof===u||d.$$typeof===T||d.getModuleId!==void 0)},ve.typeOf=k,ve}var xe={};var Sr;function Mn(){return Sr||(Sr=1,process.env.NODE_ENV!=="production"&&function(){var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),T=!1,k=!1,d=!1,w=!1,E=!1,D;D=Symbol.for("react.module.reference");function O($){return!!(typeof $=="string"||typeof $=="function"||$===t||$===n||E||$===r||$===f||$===c||w||$===y||T||k||d||typeof $=="object"&&$!==null&&($.$$typeof===C||$.$$typeof===p||$.$$typeof===s||$.$$typeof===a||$.$$typeof===u||$.$$typeof===D||$.getModuleId!==void 0))}function g($){if(typeof $=="object"&&$!==null){var te=$.$$typeof;switch(te){case i:var _e=$.type;switch(_e){case t:case n:case r:case f:case c:return _e;default:var ue=_e&&_e.$$typeof;switch(ue){case l:case a:case u:case C:case p:case s:return ue;default:return te}}case e:return te}}}var Z=a,I=s,P=i,F=u,ae=t,G=C,Y=p,X=e,Q=n,U=r,V=f,he=c,fe=!1,ke=!1;function Ae($){return fe||(fe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ye($){return ke||(ke=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function M($){return g($)===a}function R($){return g($)===s}function H($){return typeof $=="object"&&$!==null&&$.$$typeof===i}function b($){return g($)===u}function m($){return g($)===t}function K($){return g($)===C}function S($){return g($)===p}function ce($){return g($)===e}function ee($){return g($)===n}function ne($){return g($)===r}function A($){return g($)===f}function oe($){return g($)===c}xe.ContextConsumer=Z,xe.ContextProvider=I,xe.Element=P,xe.ForwardRef=F,xe.Fragment=ae,xe.Lazy=G,xe.Memo=Y,xe.Portal=X,xe.Profiler=Q,xe.StrictMode=U,xe.Suspense=V,xe.SuspenseList=he,xe.isAsyncMode=Ae,xe.isConcurrentMode=Ye,xe.isContextConsumer=M,xe.isContextProvider=R,xe.isElement=H,xe.isForwardRef=b,xe.isFragment=m,xe.isLazy=K,xe.isMemo=S,xe.isPortal=ce,xe.isProfiler=ee,xe.isStrictMode=ne,xe.isSuspense=A,xe.isSuspenseList=oe,xe.isValidElementType=O,xe.typeOf=g}()),xe}(function(i){process.env.NODE_ENV==="production"?i.exports=$n():i.exports=Mn()})(mi);function Hn(i){function e(M,R,H,b,m){for(var K=0,S=0,ce=0,ee=0,ne,A,oe=0,$=0,te,_e=te=ne=0,ue=0,Me=0,rt=0,Ie=0,Zt=H.length,ut=Zt-1,Xe,q="",De="",Gt="",dt="",nt;ue<Zt;){if(A=H.charCodeAt(ue),ue===ut&&S+ee+ce+K!==0&&(S!==0&&(A=S===47?10:47),ee=ce=K=0,Zt++,ut++),S+ee+ce+K===0){if(ue===ut&&(0<Me&&(q=q.replace(C,"")),0<q.trim().length)){switch(A){case 32:case 9:case 59:case 13:case 10:break;default:q+=H.charAt(ue)}A=59}switch(A){case 123:for(q=q.trim(),ne=q.charCodeAt(0),te=1,Ie=++ue;ue<Zt;){switch(A=H.charCodeAt(ue)){case 123:te++;break;case 125:te--;break;case 47:switch(A=H.charCodeAt(ue+1)){case 42:case 47:e:{for(_e=ue+1;_e<ut;++_e)switch(H.charCodeAt(_e)){case 47:if(A===42&&H.charCodeAt(_e-1)===42&&ue+2!==_e){ue=_e+1;break e}break;case 10:if(A===47){ue=_e+1;break e}}ue=_e}}break;case 91:A++;case 40:A++;case 34:case 39:for(;ue++<ut&&H.charCodeAt(ue)!==A;);}if(te===0)break;ue++}switch(te=H.substring(Ie,ue),ne===0&&(ne=(q=q.replace(p,"").trim()).charCodeAt(0)),ne){case 64:switch(0<Me&&(q=q.replace(C,"")),A=q.charCodeAt(1),A){case 100:case 109:case 115:case 45:Me=R;break;default:Me=V}if(te=e(R,Me,te,A,m+1),Ie=te.length,0<fe&&(Me=t(V,q,rt),nt=l(3,te,Me,R,X,Y,Ie,A,m,b),q=Me.join(""),nt!==void 0&&(Ie=(te=nt.trim()).length)===0&&(A=0,te="")),0<Ie)switch(A){case 115:q=q.replace(Z,a);case 100:case 109:case 45:te=q+"{"+te+"}";break;case 107:q=q.replace(E,"$1 $2"),te=q+"{"+te+"}",te=U===1||U===2&&s("@"+te,3)?"@-webkit-"+te+"@"+te:"@"+te;break;default:te=q+te,b===112&&(te=(De+=te,""))}else te="";break;default:te=e(R,t(R,q,rt),te,b,m+1)}Gt+=te,te=rt=Me=_e=ne=0,q="",A=H.charCodeAt(++ue);break;case 125:case 59:if(q=(0<Me?q.replace(C,""):q).trim(),1<(Ie=q.length))switch(_e===0&&(ne=q.charCodeAt(0),ne===45||96<ne&&123>ne)&&(Ie=(q=q.replace(" ",":")).length),0<fe&&(nt=l(1,q,R,M,X,Y,De.length,b,m,b))!==void 0&&(Ie=(q=nt.trim()).length)===0&&(q="\0\0"),ne=q.charCodeAt(0),A=q.charCodeAt(1),ne){case 0:break;case 64:if(A===105||A===99){dt+=q+H.charAt(ue);break}default:q.charCodeAt(Ie-1)!==58&&(De+=n(q,ne,A,q.charCodeAt(2)))}rt=Me=_e=ne=0,q="",A=H.charCodeAt(++ue)}}switch(A){case 13:case 10:S===47?S=0:1+ne===0&&b!==107&&0<q.length&&(Me=1,q+="\0"),0<fe*Ae&&l(0,q,R,M,X,Y,De.length,b,m,b),Y=1,X++;break;case 59:case 125:if(S+ee+ce+K===0){Y++;break}default:switch(Y++,Xe=H.charAt(ue),A){case 9:case 32:if(ee+K+S===0)switch(oe){case 44:case 58:case 9:case 32:Xe="";break;default:A!==32&&(Xe=" ")}break;case 0:Xe="\\0";break;case 12:Xe="\\f";break;case 11:Xe="\\v";break;case 38:ee+S+K===0&&(Me=rt=1,Xe="\f"+Xe);break;case 108:if(ee+S+K+Q===0&&0<_e)switch(ue-_e){case 2:oe===112&&H.charCodeAt(ue-3)===58&&(Q=oe);case 8:$===111&&(Q=$)}break;case 58:ee+S+K===0&&(_e=ue);break;case 44:S+ce+ee+K===0&&(Me=1,Xe+="\r");break;case 34:case 39:S===0&&(ee=ee===A?0:ee===0?A:ee);break;case 91:ee+S+ce===0&&K++;break;case 93:ee+S+ce===0&&K--;break;case 41:ee+S+K===0&&ce--;break;case 40:if(ee+S+K===0){if(ne===0)switch(2*oe+3*$){case 533:break;default:ne=1}ce++}break;case 64:S+ce+ee+K+_e+te===0&&(te=1);break;case 42:case 47:if(!(0<ee+K+ce))switch(S){case 0:switch(2*A+3*H.charCodeAt(ue+1)){case 235:S=47;break;case 220:Ie=ue,S=42}break;case 42:A===47&&oe===42&&Ie+2!==ue&&(H.charCodeAt(Ie+2)===33&&(De+=H.substring(Ie,ue+1)),Xe="",S=0)}}S===0&&(q+=Xe)}$=oe,oe=A,ue++}if(Ie=De.length,0<Ie){if(Me=R,0<fe&&(nt=l(2,De,Me,M,X,Y,Ie,b,m,b),nt!==void 0&&(De=nt).length===0))return dt+De+Gt;if(De=Me.join(",")+"{"+De+"}",U*Q!==0){switch(U!==2||s(De,2)||(Q=0),Q){case 111:De=De.replace(O,":-moz-$1")+De;break;case 112:De=De.replace(D,"::-webkit-input-$1")+De.replace(D,"::-moz-$1")+De.replace(D,":-ms-input-$1")+De}Q=0}}return dt+De+Gt}function t(M,R,H){var b=R.trim().split(d);R=b;var m=b.length,K=M.length;switch(K){case 0:case 1:var S=0;for(M=K===0?"":M[0]+" ";S<m;++S)R[S]=r(M,R[S],H).trim();break;default:var ce=S=0;for(R=[];S<m;++S)for(var ee=0;ee<K;++ee)R[ce++]=r(M[ee]+" ",b[S],H).trim()}return R}function r(M,R,H){var b=R.charCodeAt(0);switch(33>b&&(b=(R=R.trim()).charCodeAt(0)),b){case 38:return R.replace(w,"$1"+M.trim());case 58:return M.trim()+R.replace(w,"$1"+M.trim());default:if(0<1*H&&0<R.indexOf("\f"))return R.replace(w,(M.charCodeAt(0)===58?"":"$1")+M.trim())}return M+R}function n(M,R,H,b){var m=M+";",K=2*R+3*H+4*b;if(K===944){M=m.indexOf(":",9)+1;var S=m.substring(M,m.length-1).trim();return S=m.substring(0,M).trim()+S+";",U===1||U===2&&s(S,1)?"-webkit-"+S+S:S}if(U===0||U===2&&!s(m,1))return m;switch(K){case 1015:return m.charCodeAt(10)===97?"-webkit-"+m+m:m;case 951:return m.charCodeAt(3)===116?"-webkit-"+m+m:m;case 963:return m.charCodeAt(5)===110?"-webkit-"+m+m:m;case 1009:if(m.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+m+m;case 978:return"-webkit-"+m+"-moz-"+m+m;case 1019:case 983:return"-webkit-"+m+"-moz-"+m+"-ms-"+m+m;case 883:if(m.charCodeAt(8)===45)return"-webkit-"+m+m;if(0<m.indexOf("image-set(",11))return m.replace(G,"$1-webkit-$2")+m;break;case 932:if(m.charCodeAt(4)===45)switch(m.charCodeAt(5)){case 103:return"-webkit-box-"+m.replace("-grow","")+"-webkit-"+m+"-ms-"+m.replace("grow","positive")+m;case 115:return"-webkit-"+m+"-ms-"+m.replace("shrink","negative")+m;case 98:return"-webkit-"+m+"-ms-"+m.replace("basis","preferred-size")+m}return"-webkit-"+m+"-ms-"+m+m;case 964:return"-webkit-"+m+"-ms-flex-"+m+m;case 1023:if(m.charCodeAt(8)!==99)break;return S=m.substring(m.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+S+"-webkit-"+m+"-ms-flex-pack"+S+m;case 1005:return T.test(m)?m.replace(y,":-webkit-")+m.replace(y,":-moz-")+m:m;case 1e3:switch(S=m.substring(13).trim(),R=S.indexOf("-")+1,S.charCodeAt(0)+S.charCodeAt(R)){case 226:S=m.replace(g,"tb");break;case 232:S=m.replace(g,"tb-rl");break;case 220:S=m.replace(g,"lr");break;default:return m}return"-webkit-"+m+"-ms-"+S+m;case 1017:if(m.indexOf("sticky",9)===-1)break;case 975:switch(R=(m=M).length-10,S=(m.charCodeAt(R)===33?m.substring(0,R):m).substring(M.indexOf(":",7)+1).trim(),K=S.charCodeAt(0)+(S.charCodeAt(7)|0)){case 203:if(111>S.charCodeAt(8))break;case 115:m=m.replace(S,"-webkit-"+S)+";"+m;break;case 207:case 102:m=m.replace(S,"-webkit-"+(102<K?"inline-":"")+"box")+";"+m.replace(S,"-webkit-"+S)+";"+m.replace(S,"-ms-"+S+"box")+";"+m}return m+";";case 938:if(m.charCodeAt(5)===45)switch(m.charCodeAt(6)){case 105:return S=m.replace("-items",""),"-webkit-"+m+"-webkit-box-"+S+"-ms-flex-"+S+m;case 115:return"-webkit-"+m+"-ms-flex-item-"+m.replace(P,"")+m;default:return"-webkit-"+m+"-ms-flex-line-pack"+m.replace("align-content","").replace(P,"")+m}break;case 973:case 989:if(m.charCodeAt(3)!==45||m.charCodeAt(4)===122)break;case 931:case 953:if(ae.test(M)===!0)return(S=M.substring(M.indexOf(":")+1)).charCodeAt(0)===115?n(M.replace("stretch","fill-available"),R,H,b).replace(":fill-available",":stretch"):m.replace(S,"-webkit-"+S)+m.replace(S,"-moz-"+S.replace("fill-",""))+m;break;case 962:if(m="-webkit-"+m+(m.charCodeAt(5)===102?"-ms-"+m:"")+m,H+b===211&&m.charCodeAt(13)===105&&0<m.indexOf("transform",10))return m.substring(0,m.indexOf(";",27)+1).replace(k,"$1-webkit-$2")+m}return m}function s(M,R){var H=M.indexOf(R===1?":":"{"),b=M.substring(0,R!==3?H:10);return H=M.substring(H+1,M.length-1),ke(R!==2?b:b.replace(F,"$1"),H,R)}function a(M,R){var H=n(R,R.charCodeAt(0),R.charCodeAt(1),R.charCodeAt(2));return H!==R+";"?H.replace(I," or ($1)").substring(4):"("+R+")"}function l(M,R,H,b,m,K,S,ce,ee,ne){for(var A=0,oe=R,$;A<fe;++A)switch($=he[A].call(c,M,oe,H,b,m,K,S,ce,ee,ne)){case void 0:case!1:case!0:case null:break;default:oe=$}if(oe!==R)return oe}function u(M){switch(M){case void 0:case null:fe=he.length=0;break;default:if(typeof M=="function")he[fe++]=M;else if(typeof M=="object")for(var R=0,H=M.length;R<H;++R)u(M[R]);else Ae=!!M|0}return u}function f(M){return M=M.prefix,M!==void 0&&(ke=null,M?typeof M!="function"?U=1:(U=2,ke=M):U=0),f}function c(M,R){var H=M;if(33>H.charCodeAt(0)&&(H=H.trim()),Ye=H,H=[Ye],0<fe){var b=l(-1,R,H,H,X,Y,0,0,0,0);b!==void 0&&typeof b=="string"&&(R=b)}var m=e(V,H,R,0,0);return 0<fe&&(b=l(-2,m,H,H,X,Y,m.length,0,0,0),b!==void 0&&(m=b)),Ye="",Q=0,Y=X=1,m}var p=/^\0+/g,C=/[\0\r\f]/g,y=/: */g,T=/zoo|gra/,k=/([,: ])(transform)/g,d=/,\r+?/g,w=/([\t\r\n ])*\f?&/g,E=/@(k\w+)\s*(\S*)\s*/,D=/::(place)/g,O=/:(read-only)/g,g=/[svh]\w+-[tblr]{2}/,Z=/\(\s*(.*)\s*\)/g,I=/([\s\S]*?);/g,P=/-self|flex-/g,F=/[^]*?(:[rp][el]a[\w-]+)[^]*/,ae=/stretch|:\s*\w+\-(?:conte|avail)/,G=/([^-])(image-set\()/,Y=1,X=1,Q=0,U=1,V=[],he=[],fe=0,ke=null,Ae=0,Ye="";return c.use=u,c.set=f,i!==void 0&&f(i),c}var In={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Yn(i){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=i(t)),e[t]}}var Bn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Cr=Yn(function(i){return Bn.test(i)||i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)<91}),wr={exports:{}},Se={};var Er;function Fn(){if(Er)return Se;Er=1;var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,r=i?Symbol.for("react.fragment"):60107,n=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,a=i?Symbol.for("react.provider"):60109,l=i?Symbol.for("react.context"):60110,u=i?Symbol.for("react.async_mode"):60111,f=i?Symbol.for("react.concurrent_mode"):60111,c=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,C=i?Symbol.for("react.suspense_list"):60120,y=i?Symbol.for("react.memo"):60115,T=i?Symbol.for("react.lazy"):60116,k=i?Symbol.for("react.block"):60121,d=i?Symbol.for("react.fundamental"):60117,w=i?Symbol.for("react.responder"):60118,E=i?Symbol.for("react.scope"):60119;function D(g){if(typeof g=="object"&&g!==null){var Z=g.$$typeof;switch(Z){case e:switch(g=g.type,g){case u:case f:case r:case s:case n:case p:return g;default:switch(g=g&&g.$$typeof,g){case l:case c:case T:case y:case a:return g;default:return Z}}case t:return Z}}}function O(g){return D(g)===f}return Se.AsyncMode=u,Se.ConcurrentMode=f,Se.ContextConsumer=l,Se.ContextProvider=a,Se.Element=e,Se.ForwardRef=c,Se.Fragment=r,Se.Lazy=T,Se.Memo=y,Se.Portal=t,Se.Profiler=s,Se.StrictMode=n,Se.Suspense=p,Se.isAsyncMode=function(g){return O(g)||D(g)===u},Se.isConcurrentMode=O,Se.isContextConsumer=function(g){return D(g)===l},Se.isContextProvider=function(g){return D(g)===a},Se.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Se.isForwardRef=function(g){return D(g)===c},Se.isFragment=function(g){return D(g)===r},Se.isLazy=function(g){return D(g)===T},Se.isMemo=function(g){return D(g)===y},Se.isPortal=function(g){return D(g)===t},Se.isProfiler=function(g){return D(g)===s},Se.isStrictMode=function(g){return D(g)===n},Se.isSuspense=function(g){return D(g)===p},Se.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===f||g===s||g===n||g===p||g===C||typeof g=="object"&&g!==null&&(g.$$typeof===T||g.$$typeof===y||g.$$typeof===a||g.$$typeof===l||g.$$typeof===c||g.$$typeof===d||g.$$typeof===w||g.$$typeof===E||g.$$typeof===k)},Se.typeOf=D,Se}var Ce={};var Tr;function jn(){return Tr||(Tr=1,process.env.NODE_ENV!=="production"&&function(){var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,r=i?Symbol.for("react.fragment"):60107,n=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,a=i?Symbol.for("react.provider"):60109,l=i?Symbol.for("react.context"):60110,u=i?Symbol.for("react.async_mode"):60111,f=i?Symbol.for("react.concurrent_mode"):60111,c=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,C=i?Symbol.for("react.suspense_list"):60120,y=i?Symbol.for("react.memo"):60115,T=i?Symbol.for("react.lazy"):60116,k=i?Symbol.for("react.block"):60121,d=i?Symbol.for("react.fundamental"):60117,w=i?Symbol.for("react.responder"):60118,E=i?Symbol.for("react.scope"):60119;function D(A){return typeof A=="string"||typeof A=="function"||A===r||A===f||A===s||A===n||A===p||A===C||typeof A=="object"&&A!==null&&(A.$$typeof===T||A.$$typeof===y||A.$$typeof===a||A.$$typeof===l||A.$$typeof===c||A.$$typeof===d||A.$$typeof===w||A.$$typeof===E||A.$$typeof===k)}function O(A){if(typeof A=="object"&&A!==null){var oe=A.$$typeof;switch(oe){case e:var $=A.type;switch($){case u:case f:case r:case s:case n:case p:return $;default:var te=$&&$.$$typeof;switch(te){case l:case c:case T:case y:case a:return te;default:return oe}}case t:return oe}}}var g=u,Z=f,I=l,P=a,F=e,ae=c,G=r,Y=T,X=y,Q=t,U=s,V=n,he=p,fe=!1;function ke(A){return fe||(fe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Ae(A)||O(A)===u}function Ae(A){return O(A)===f}function Ye(A){return O(A)===l}function M(A){return O(A)===a}function R(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function H(A){return O(A)===c}function b(A){return O(A)===r}function m(A){return O(A)===T}function K(A){return O(A)===y}function S(A){return O(A)===t}function ce(A){return O(A)===s}function ee(A){return O(A)===n}function ne(A){return O(A)===p}Ce.AsyncMode=g,Ce.ConcurrentMode=Z,Ce.ContextConsumer=I,Ce.ContextProvider=P,Ce.Element=F,Ce.ForwardRef=ae,Ce.Fragment=G,Ce.Lazy=Y,Ce.Memo=X,Ce.Portal=Q,Ce.Profiler=U,Ce.StrictMode=V,Ce.Suspense=he,Ce.isAsyncMode=ke,Ce.isConcurrentMode=Ae,Ce.isContextConsumer=Ye,Ce.isContextProvider=M,Ce.isElement=R,Ce.isForwardRef=H,Ce.isFragment=b,Ce.isLazy=m,Ce.isMemo=K,Ce.isPortal=S,Ce.isProfiler=ce,Ce.isStrictMode=ee,Ce.isSuspense=ne,Ce.isValidElementType=D,Ce.typeOf=O}()),Ce}(function(i){process.env.NODE_ENV==="production"?i.exports=Fn():i.exports=jn()})(wr);var ji=wr.exports,Nn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ln={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vn={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},kr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ni={};Ni[ji.ForwardRef]=Vn,Ni[ji.Memo]=kr;function Ar(i){return ji.isMemo(i)?kr:Ni[i.$$typeof]||Nn}var Xn=Object.defineProperty,Un=Object.getOwnPropertyNames,Pr=Object.getOwnPropertySymbols,Wn=Object.getOwnPropertyDescriptor,Zn=Object.getPrototypeOf,_r=Object.prototype;function Or(i,e,t){if(typeof e!="string"){if(_r){var r=Zn(e);r&&r!==_r&&Or(i,r,t)}var n=Un(e);Pr&&(n=n.concat(Pr(e)));for(var s=Ar(i),a=Ar(e),l=0;l<n.length;++l){var u=n[l];if(!Ln[u]&&!(t&&t[u])&&!(a&&a[u])&&!(s&&s[u])){var f=Wn(e,u);try{Xn(i,u,f)}catch{}}}}return i}var Gn=Or;function ot(){return(ot=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i}).apply(this,arguments)}var Dr=function(i,e){for(var t=[i[0]],r=0,n=e.length;r<n;r+=1)t.push(e[r],i[r+1]);return t},Li=function(i){return i!==null&&typeof i=="object"&&(i.toString?i.toString():Object.prototype.toString.call(i))==="[object Object]"&&!mi.exports.typeOf(i)},gi=Object.freeze([]),pt=Object.freeze({});function ri(i){return typeof i=="function"}function Vi(i){return process.env.NODE_ENV!=="production"&&typeof i=="string"&&i||i.displayName||i.name||"Component"}function Xi(i){return i&&typeof i.styledComponentId=="string"}var zt=typeof process<"u"&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Ui=typeof window<"u"&&"HTMLElement"in window,Kn=Boolean(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),qn=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
14
14
|
|
|
15
15
|
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
16
16
|
|
|
@@ -53,10 +53,10 @@ as for instance in your render method then you may be running into this limitati
|
|
|
53
53
|
Has styled-components' style tag been unmounted or altered by another script?
|
|
54
54
|
`}:{};function Jn(){for(var i=arguments.length<=0?void 0:arguments[0],e=[],t=1,r=arguments.length;t<r;t+=1)e.push(t<0||arguments.length<=t?void 0:arguments[t]);return e.forEach(function(n){i=i.replace(/%[a-z]/,n)}),i}function $t(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];throw process.env.NODE_ENV==="production"?new Error("An error occurred. See https://git.io/JUIaE#"+i+" for more information."+(t.length>0?" Args: "+t.join(", "):"")):new Error(Jn.apply(void 0,[qn[i]].concat(t)).trim())}var Qn=function(){function i(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=i.prototype;return e.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,s=n.length,a=s;t>=a;)(a<<=1)<0&&$t(16,""+t);this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var l=s;l<a;l++)this.groupSizes[l]=0}for(var u=this.indexOfGroup(t+1),f=0,c=r.length;f<c;f++)this.tag.insertRule(u,r[f])&&(this.groupSizes[t]++,u++)},e.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),s=n+r;this.groupSizes[t]=0;for(var a=n;a<s;a++)this.tag.deleteRule(n)}},e.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],s=this.indexOfGroup(t),a=s+n,l=s;l<a;l++)r+=this.tag.getRule(l)+`/*!sc*/
|
|
55
55
|
`;return r},i}(),yi=new Map,bi=new Map,ni=1,vi=function(i){if(yi.has(i))return yi.get(i);for(;bi.has(ni);)ni++;var e=ni++;return process.env.NODE_ENV!=="production"&&((0|e)<0||e>1<<30)&&$t(16,""+e),yi.set(i,e),bi.set(e,i),e},eo=function(i){return bi.get(i)},to=function(i,e){e>=ni&&(ni=e+1),yi.set(i,e),bi.set(e,i)},io="style["+zt+'][data-styled-version="5.3.6"]',ro=new RegExp("^"+zt+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),no=function(i,e,t){for(var r,n=t.split(","),s=0,a=n.length;s<a;s++)(r=n[s])&&i.registerName(e,r)},oo=function(i,e){for(var t=(e.textContent||"").split(`/*!sc*/
|
|
56
|
-
`),r=[],n=0,s=t.length;n<s;n++){var a=t[n].trim();if(a){var l=a.match(ro);if(l){var u=0|parseInt(l[1],10),f=l[2];u!==0&&(to(f,u),no(i,f,l[3]),i.getTag().insertRules(u,r)),r.length=0}else r.push(a)}}},so=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},Rr=function(i){var e=document.head,t=i||e,r=document.createElement("style"),n=function(l){for(var u=l.childNodes,f=u.length;f>=0;f--){var c=u[f];if(c&&c.nodeType===1&&c.hasAttribute(zt))return c}}(t),s=n!==void 0?n.nextSibling:null;r.setAttribute(zt,"active"),r.setAttribute("data-styled-version","5.3.6");var a=so();return a&&r.setAttribute("nonce",a),t.insertBefore(r,s),r},ao=function(){function i(t){var r=this.element=Rr(t);r.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var s=document.styleSheets,a=0,l=s.length;a<l;a++){var u=s[a];if(u.ownerNode===n)return u}$t(17)}(r),this.length=0}var e=i.prototype;return e.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.getRule=function(t){var r=this.sheet.cssRules[t];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},i}(),lo=function(){function i(t){var r=this.element=Rr(t);this.nodes=r.childNodes,this.length=0}var e=i.prototype;return e.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r),s=this.nodes[t];return this.element.insertBefore(n,s||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},i}(),co=function(){function i(t){this.rules=[],this.length=0}var e=i.prototype;return e.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.getRule=function(t){return t<this.length?this.rules[t]:""},i}(),zr=
|
|
57
|
-
`}}}return s}(this)},i}(),fo=/(a)(d)/gi,Mr=function(i){return String.fromCharCode(i+(i>25?39:97))};function
|
|
56
|
+
`),r=[],n=0,s=t.length;n<s;n++){var a=t[n].trim();if(a){var l=a.match(ro);if(l){var u=0|parseInt(l[1],10),f=l[2];u!==0&&(to(f,u),no(i,f,l[3]),i.getTag().insertRules(u,r)),r.length=0}else r.push(a)}}},so=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},Rr=function(i){var e=document.head,t=i||e,r=document.createElement("style"),n=function(l){for(var u=l.childNodes,f=u.length;f>=0;f--){var c=u[f];if(c&&c.nodeType===1&&c.hasAttribute(zt))return c}}(t),s=n!==void 0?n.nextSibling:null;r.setAttribute(zt,"active"),r.setAttribute("data-styled-version","5.3.6");var a=so();return a&&r.setAttribute("nonce",a),t.insertBefore(r,s),r},ao=function(){function i(t){var r=this.element=Rr(t);r.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var s=document.styleSheets,a=0,l=s.length;a<l;a++){var u=s[a];if(u.ownerNode===n)return u}$t(17)}(r),this.length=0}var e=i.prototype;return e.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.getRule=function(t){var r=this.sheet.cssRules[t];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},i}(),lo=function(){function i(t){var r=this.element=Rr(t);this.nodes=r.childNodes,this.length=0}var e=i.prototype;return e.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r),s=this.nodes[t];return this.element.insertBefore(n,s||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},i}(),co=function(){function i(t){this.rules=[],this.length=0}var e=i.prototype;return e.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.getRule=function(t){return t<this.length?this.rules[t]:""},i}(),zr=Ui,uo={isServer:!Ui,useCSSOMInjection:!Kn},$r=function(){function i(t,r,n){t===void 0&&(t=pt),r===void 0&&(r={}),this.options=ot({},uo,{},t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&Ui&&zr&&(zr=!1,function(s){for(var a=document.querySelectorAll(io),l=0,u=a.length;l<u;l++){var f=a[l];f&&f.getAttribute(zt)!=="active"&&(oo(s,f),f.parentNode&&f.parentNode.removeChild(f))}}(this))}i.registerId=function(t){return vi(t)};var e=i.prototype;return e.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new i(ot({},this.options,{},t),this.gs,r&&this.names||void 0)},e.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.getTag=function(){return this.tag||(this.tag=(n=(r=this.options).isServer,s=r.useCSSOMInjection,a=r.target,t=n?new co(a):s?new ao(a):new lo(a),new Qn(t)));var t,r,n,s,a},e.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.registerName=function(t,r){if(vi(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(vi(t),n)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(vi(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var r=t.getTag(),n=r.length,s="",a=0;a<n;a++){var l=eo(a);if(l!==void 0){var u=t.names.get(l),f=r.getGroup(a);if(u&&f&&u.size){var c=zt+".g"+a+'[id="'+l+'"]',p="";u!==void 0&&u.forEach(function(C){C.length>0&&(p+=C+",")}),s+=""+f+c+'{content:"'+p+`"}/*!sc*/
|
|
57
|
+
`}}}return s}(this)},i}(),fo=/(a)(d)/gi,Mr=function(i){return String.fromCharCode(i+(i>25?39:97))};function Wi(i){var e,t="";for(e=Math.abs(i);e>52;e=e/52|0)t=Mr(e%52)+t;return(Mr(e%52)+t).replace(fo,"$1-$2")}var Tt=function(i,e){for(var t=e.length;t;)i=33*i^e.charCodeAt(--t);return i},Hr=function(i){return Tt(5381,i)};function ho(i){for(var e=0;e<i.length;e+=1){var t=i[e];if(ri(t)&&!Xi(t))return!1}return!0}var po=Hr("5.3.6"),mo=function(){function i(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&ho(e),this.componentId=t,this.baseHash=Tt(po,t),this.baseStyle=r,$r.registerId(t)}return i.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))s.push(this.staticRulesId);else{var a=Mt(this.rules,e,t,r).join(""),l=Wi(Tt(this.baseHash,a)>>>0);if(!t.hasNameForId(n,l)){var u=r(a,"."+l,void 0,n);t.insertRules(n,l,u)}s.push(l),this.staticRulesId=l}else{for(var f=this.rules.length,c=Tt(this.baseHash,r.hash),p="",C=0;C<f;C++){var y=this.rules[C];if(typeof y=="string")p+=y,process.env.NODE_ENV!=="production"&&(c=Tt(c,y+C));else if(y){var T=Mt(y,e,t,r),k=Array.isArray(T)?T.join(""):T;c=Tt(c,k+C),p+=k}}if(p){var d=Wi(c>>>0);if(!t.hasNameForId(n,d)){var w=r(p,"."+d,void 0,n);t.insertRules(n,d,w)}s.push(d)}}return s.join(" ")},i}(),go=/^\s*\/\/.*$/gm,yo=[":","[",".","#"];function bo(i){var e,t,r,n,s=i===void 0?pt:i,a=s.options,l=a===void 0?pt:a,u=s.plugins,f=u===void 0?gi:u,c=new Hn(l),p=[],C=function(k){function d(w){if(w)try{k(w+"}")}catch{}}return function(w,E,D,O,g,Z,I,P,F,ae){switch(w){case 1:if(F===0&&E.charCodeAt(0)===64)return k(E+";"),"";break;case 2:if(P===0)return E+"/*|*/";break;case 3:switch(P){case 102:case 112:return k(D[0]+E),"";default:return E+(ae===0?"/*|*/":"")}case-2:E.split("/*|*/}").forEach(d)}}}(function(k){p.push(k)}),y=function(k,d,w){return d===0&&yo.indexOf(w[t.length])!==-1||w.match(n)?k:"."+e};function T(k,d,w,E){E===void 0&&(E="&");var D=k.replace(go,""),O=d&&w?w+" "+d+" { "+D+" }":D;return e=E,t=d,r=new RegExp("\\"+t+"\\b","g"),n=new RegExp("(\\"+t+"\\b){2,}"),c(w||!d?"":d,O)}return c.use([].concat(f,[function(k,d,w){k===2&&w.length&&w[0].lastIndexOf(t)>0&&(w[0]=w[0].replace(r,y))},C,function(k){if(k===-2){var d=p;return p=[],d}}])),T.hash=f.length?f.reduce(function(k,d){return d.name||$t(15),Tt(k,d.name)},5381).toString():"",T}var Ir=x.createContext();Ir.Consumer;var Yr=x.createContext(),vo=(Yr.Consumer,new $r),Zi=bo();function xo(){return x.useContext(Ir)||vo}function So(){return x.useContext(Yr)||Zi}var Co=function(){function i(e,t){var r=this;this.inject=function(n,s){s===void 0&&(s=Zi);var a=r.name+s.hash;n.hasNameForId(r.id,a)||n.insertRules(r.id,a,s(r.rules,a,"@keyframes"))},this.toString=function(){return $t(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return i.prototype.getName=function(e){return e===void 0&&(e=Zi),this.name+e.hash},i}(),wo=/([A-Z])/,Eo=/([A-Z])/g,To=/^ms-/,ko=function(i){return"-"+i.toLowerCase()};function Br(i){return wo.test(i)?i.replace(Eo,ko).replace(To,"-ms-"):i}var Fr=function(i){return i==null||i===!1||i===""};function Mt(i,e,t,r){if(Array.isArray(i)){for(var n,s=[],a=0,l=i.length;a<l;a+=1)(n=Mt(i[a],e,t,r))!==""&&(Array.isArray(n)?s.push.apply(s,n):s.push(n));return s}if(Fr(i))return"";if(Xi(i))return"."+i.styledComponentId;if(ri(i)){if(typeof(f=i)!="function"||f.prototype&&f.prototype.isReactComponent||!e)return i;var u=i(e);return process.env.NODE_ENV!=="production"&&mi.exports.isElement(u)&&console.warn(Vi(i)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),Mt(u,e,t,r)}var f;return i instanceof Co?t?(i.inject(t,r),i.getName(r)):i:Li(i)?function c(p,C){var y,T,k=[];for(var d in p)p.hasOwnProperty(d)&&!Fr(p[d])&&(Array.isArray(p[d])&&p[d].isCss||ri(p[d])?k.push(Br(d)+":",p[d],";"):Li(p[d])?k.push.apply(k,c(p[d],d)):k.push(Br(d)+": "+(y=d,(T=p[d])==null||typeof T=="boolean"||T===""?"":typeof T!="number"||T===0||y in In?String(T).trim():T+"px")+";"));return C?[C+" {"].concat(k,["}"]):k}(i):i.toString()}var jr=function(i){return Array.isArray(i)&&(i.isCss=!0),i};function Ao(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return ri(i)||Li(i)?jr(Mt(Dr(gi,[i].concat(t)))):t.length===0&&i.length===1&&typeof i[0]=="string"?i:jr(Mt(Dr(i,t)))}var Nr=/invalid hook call/i,xi=new Set,Po=function(i,e){if(process.env.NODE_ENV!=="production"){var t="The component "+i+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
|
|
58
58
|
You may see this warning because you've called styled inside another component.
|
|
59
|
-
To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var n=!0;console.error=function(s){if(Nr.test(s))n=!1,xi.delete(t);else{for(var a=arguments.length,l=new Array(a>1?a-1:0),u=1;u<a;u++)l[u-1]=arguments[u];r.apply(void 0,[s].concat(l))}},x.useRef(),n&&!xi.has(t)&&(console.warn(t),xi.add(t))}catch(s){Nr.test(s.message)&&xi.delete(t)}finally{console.error=r}}},_o=function(i,e,t){return t===void 0&&(t=pt),i.theme!==t.theme&&i.theme||e||t.theme},Oo=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Do=/(^-|-$)/g;function
|
|
59
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var n=!0;console.error=function(s){if(Nr.test(s))n=!1,xi.delete(t);else{for(var a=arguments.length,l=new Array(a>1?a-1:0),u=1;u<a;u++)l[u-1]=arguments[u];r.apply(void 0,[s].concat(l))}},x.useRef(),n&&!xi.has(t)&&(console.warn(t),xi.add(t))}catch(s){Nr.test(s.message)&&xi.delete(t)}finally{console.error=r}}},_o=function(i,e,t){return t===void 0&&(t=pt),i.theme!==t.theme&&i.theme||e||t.theme},Oo=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Do=/(^-|-$)/g;function Gi(i){return i.replace(Oo,"-").replace(Do,"")}var Ro=function(i){return Wi(Hr(i)>>>0)};function Si(i){return typeof i=="string"&&(process.env.NODE_ENV==="production"||i.charAt(0)===i.charAt(0).toLowerCase())}var Ki=function(i){return typeof i=="function"||typeof i=="object"&&i!==null&&!Array.isArray(i)},zo=function(i){return i!=="__proto__"&&i!=="constructor"&&i!=="prototype"};function $o(i,e,t){var r=i[t];Ki(e)&&Ki(r)?Lr(r,e):i[t]=e}function Lr(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];for(var n=0,s=t;n<s.length;n++){var a=s[n];if(Ki(a))for(var l in a)zo(l)&&$o(i,a[l],l)}return i}var Vr=x.createContext();Vr.Consumer;var qi={};function Xr(i,e,t){var r=Xi(i),n=!Si(i),s=e.attrs,a=s===void 0?gi:s,l=e.componentId,u=l===void 0?function(E,D){var O=typeof E!="string"?"sc":Gi(E);qi[O]=(qi[O]||0)+1;var g=O+"-"+Ro("5.3.6"+O+qi[O]);return D?D+"-"+g:g}(e.displayName,e.parentComponentId):l,f=e.displayName,c=f===void 0?function(E){return Si(E)?"styled."+E:"Styled("+Vi(E)+")"}(i):f,p=e.displayName&&e.componentId?Gi(e.displayName)+"-"+e.componentId:e.componentId||u,C=r&&i.attrs?Array.prototype.concat(i.attrs,a).filter(Boolean):a,y=e.shouldForwardProp;r&&i.shouldForwardProp&&(y=e.shouldForwardProp?function(E,D,O){return i.shouldForwardProp(E,D,O)&&e.shouldForwardProp(E,D,O)}:i.shouldForwardProp);var T,k=new mo(t,p,r?i.componentStyle:void 0),d=k.isStatic&&a.length===0,w=function(E,D){return function(O,g,Z,I){var P=O.attrs,F=O.componentStyle,ae=O.defaultProps,G=O.foldedComponentIds,Y=O.shouldForwardProp,X=O.styledComponentId,Q=O.target;process.env.NODE_ENV!=="production"&&x.useDebugValue(X);var U=function(b,m,K){b===void 0&&(b=pt);var S=ot({},m,{theme:b}),ce={};return K.forEach(function(ee){var ne,A,oe,$=ee;for(ne in ri($)&&($=$(S)),$)S[ne]=ce[ne]=ne==="className"?(A=ce[ne],oe=$[ne],A&&oe?A+" "+oe:A||oe):$[ne]}),[S,ce]}(_o(g,x.useContext(Vr),ae)||pt,g,P),V=U[0],he=U[1],fe=function(b,m,K,S){var ce=xo(),ee=So(),ne=m?b.generateAndInjectStyles(pt,ce,ee):b.generateAndInjectStyles(K,ce,ee);return process.env.NODE_ENV!=="production"&&x.useDebugValue(ne),process.env.NODE_ENV!=="production"&&!m&&S&&S(ne),ne}(F,I,V,process.env.NODE_ENV!=="production"?O.warnTooManyClasses:void 0),ke=Z,Ae=he.$as||g.$as||he.as||g.as||Q,Ye=Si(Ae),M=he!==g?ot({},g,{},he):g,R={};for(var H in M)H[0]!=="$"&&H!=="as"&&(H==="forwardedAs"?R.as=M[H]:(Y?Y(H,Cr,Ae):!Ye||Cr(H))&&(R[H]=M[H]));return g.style&&he.style!==g.style&&(R.style=ot({},g.style,{},he.style)),R.className=Array.prototype.concat(G,X,fe!==X?fe:null,g.className,he.className).filter(Boolean).join(" "),R.ref=ke,x.createElement(Ae,R)}(T,E,D,d)};return w.displayName=c,(T=x.forwardRef(w)).attrs=C,T.componentStyle=k,T.displayName=c,T.shouldForwardProp=y,T.foldedComponentIds=r?Array.prototype.concat(i.foldedComponentIds,i.styledComponentId):gi,T.styledComponentId=p,T.target=r?i.target:i,T.withComponent=function(E){var D=e.componentId,O=function(Z,I){if(Z==null)return{};var P,F,ae={},G=Object.keys(Z);for(F=0;F<G.length;F++)P=G[F],I.indexOf(P)>=0||(ae[P]=Z[P]);return ae}(e,["componentId"]),g=D&&D+"-"+(Si(E)?E:Gi(Vi(E)));return Xr(E,ot({},O,{attrs:C,componentId:g}),t)},Object.defineProperty(T,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(E){this._foldedDefaultProps=r?Lr({},i.defaultProps,E):E}}),process.env.NODE_ENV!=="production"&&(Po(c,p),T.warnTooManyClasses=function(E,D){var O={},g=!1;return function(Z){if(!g&&(O[Z]=!0,Object.keys(O).length>=200)){var I=D?' with the id of "'+D+'"':"";console.warn("Over 200 classes were generated for component "+E+I+`.
|
|
60
60
|
Consider using the attrs method, together with a style object for frequently changed styles.
|
|
61
61
|
Example:
|
|
62
62
|
const Component = styled.div.attrs(props => ({
|
|
@@ -65,11 +65,11 @@ Example:
|
|
|
65
65
|
},
|
|
66
66
|
}))\`width: 100%;\`
|
|
67
67
|
|
|
68
|
-
<Component />`),g=!0,O={}}}}(c,p)),T.toString=function(){return"."+T.styledComponentId},n&&Gn(T,i,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),T}var
|
|
68
|
+
<Component />`),g=!0,O={}}}}(c,p)),T.toString=function(){return"."+T.styledComponentId},n&&Gn(T,i,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),T}var Ji=function(i){return function e(t,r,n){if(n===void 0&&(n=pt),!mi.exports.isValidElementType(r))return $t(1,String(r));var s=function(){return t(r,n,Ao.apply(void 0,arguments))};return s.withConfig=function(a){return e(t,r,ot({},n,{},a))},s.attrs=function(a){return e(t,r,ot({},n,{attrs:Array.prototype.concat(n.attrs,a).filter(Boolean)}))},s}(Xr,i)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(i){Ji[i]=Ji(i)}),process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
69
69
|
Perhaps you're looking to import 'styled-components/native'?
|
|
70
70
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,window["__styled-components-init__"]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
71
71
|
|
|
72
|
-
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const mt=
|
|
72
|
+
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const mt=Ji,Mo=mt.div`
|
|
73
73
|
font-family: 'IBM Plex Mono', 'Roboto', sans-serif;
|
|
74
74
|
background-color: #fafafa;
|
|
75
75
|
color: #26272;
|
|
@@ -137,7 +137,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
137
137
|
font-size: 1.5em;
|
|
138
138
|
font-weight: 600;
|
|
139
139
|
}
|
|
140
|
-
`,
|
|
140
|
+
`,Yo=mt.div`
|
|
141
141
|
cursor: pointer;
|
|
142
142
|
transform: rotate(90deg);
|
|
143
143
|
color: gray;
|
|
@@ -148,7 +148,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
148
148
|
&:hover {
|
|
149
149
|
text-decoration: underline;
|
|
150
150
|
}
|
|
151
|
-
`,
|
|
151
|
+
`,Bo=mt.span`
|
|
152
152
|
font-family: 'Open Sans';
|
|
153
153
|
font-size: 15px;
|
|
154
154
|
font-weight: 700;
|
|
@@ -170,7 +170,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
170
170
|
overflow-x: hidden;
|
|
171
171
|
padding-bottom: 50px;
|
|
172
172
|
font-size: 0.8em;
|
|
173
|
-
`,
|
|
173
|
+
`,Ur=mt.div`
|
|
174
174
|
font-size: 3em;
|
|
175
175
|
color: #0f52ba;
|
|
176
176
|
font-weight: bold;
|
|
@@ -181,7 +181,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
181
181
|
-moz-user-select: none;
|
|
182
182
|
-ms-user-select: none;
|
|
183
183
|
user-select: none;
|
|
184
|
-
`,No=x.forwardRef(({activeToolLocal:i,tools:e,changeActiveToolLocalHandler:t},r)=>{x.useImperativeHandle(r,()=>({changeTabletDisplayHandler(a){s(a==="switch"?l=>l==="none"?"flex":"none":a)}}));const[n,s]=x.useState("none");return v(x.Fragment,{children:
|
|
184
|
+
`,No=x.forwardRef(({activeToolLocal:i,tools:e,changeActiveToolLocalHandler:t},r)=>{x.useImperativeHandle(r,()=>({changeTabletDisplayHandler(a){s(a==="switch"?l=>l==="none"?"flex":"none":a)}}));const[n,s]=x.useState("none");return v(x.Fragment,{children:ie(Mo,{display:n,id:"desktop--tablet--container",children:[ie(Ho,{children:[ie("h1",{children:["NDMVR",v("span",{children:v("i",{children:"tablet"})})]}),v("p",{children:"Tools"}),v(jo,{children:e.map((a,l)=>l===i?ie(Bo,{children:[v("span",{style:{fontWeight:700,color:"#0f52ba"},children:l<10?(l+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},l):ie(Fo,{onClick:()=>t(l),children:[v("span",{style:{fontWeight:700,color:"#0f52ba"},children:l<10?(l+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},l))})]}),ie("div",{style:{width:100+"%",overflow:"scroll"},children:[ie(Io,{id:"desktop--tablet--container--header",children:[v("h1",{children:e[i].name}),v(Yo,{id:"close--button",onClick:()=>s("none"),style:{cursor:"pointer",maxWidth:30+"px"},children:v("i",{children:"Hide"})})]}),v("div",{style:{display:"flex",flexDirection:"row",height:"83%",padding:"10px",alignItems:"center",justifyContent:"center"},children:e[i].fun})]})]})})}),Lo=window.AFRAME,we=new ht;let Qi,Wr;function Zr(){const i=x.useRef(),[e,t]=x.useState(0),[r,n]=x.useState(null),[s,a]=x.useState(null),[l,u]=x.useState(null),[f,c]=x.useState(null);Qi=e;const[p,C]=x.useState({xPos:0,yPos:0,zPos:0,absoluteContent:0}),[y,T]=x.useState(1),[k]=x.useState(Lo.utils.device.checkHeadsetConnected()?"oculus":"desktop"),d=x.useContext(Rt),{source:w,theme:E,range:D,scene:O}=d.stores,[g,Z]=x.useState([]),[I,P]=x.useState([]),[F,ae]=x.useState([]),[G,Y]=x.useState([]);x.useEffect(()=>{const b=w!=null&&w.getOptions().length?w==null?void 0:w.getOptions():[];Z(b)},[d]),x.useEffect(()=>{const b=E!=null&&E.getOptions().length?E==null?void 0:E.getOptions():[];P(b)},[d]),x.useEffect(()=>{const b=D!=null&&D.getOptions().length?D==null?void 0:D.getOptions():[];ae(b)},[d]),x.useEffect(()=>{const b=O!=null&&O.getOptions().length?O==null?void 0:O.getOptions():[];Y(b)},[d]),x.useEffect(()=>(Wr=we.subscribe(X),()=>Wr.unsubscribe()),[g,I,F,G]),x.useEffect(()=>{},[e]),x.useEffect(()=>{w&&r&&w.executeFunction(0,r)},[r]),x.useEffect(()=>{E&&s&&E.executeFunction(0,s)},[s]),x.useEffect(()=>{D&&l&&D.executeFunction(0,l)},[l]),x.useEffect(()=>{O&&f&&O.executeFunction(0,f)},[f]);const X=b=>{typeof b=="number"?b+1<=V.length&&(t(b),Qi=e):b.changeTabletState?i.current.changeTabletDisplayHandler("switch"):b.binData?p!==b.binData&&C(b.binData):b.tool?(b.tool==="next"&&t(m=>m===V.length-1?0:m+1),b.tool==="prev"&&t(m=>m===0?V.length-1:m-1)):b.source?(b.source==="next"&&n(m=>g.indexOf(m)===g.length-1?g[0]:g[g.indexOf(m)+1]),b.source==="prev"&&n(m=>g.indexOf(m)===0?g[g.length-1]:g[g.indexOf(m)-1])):b.scale?U(b.scale):b.theme?(b.theme==="next"&&a(m=>I.indexOf(m)===I.length-1?I[0]:I[I.indexOf(m)+1]),b.theme==="prev"&&a(m=>I.indexOf(m)===0?I[I.length-1]:I[I.indexOf(m)-1])):b.range?(b.range==="next"&&u(m=>F.indexOf(m)===F.length-1?F[0]:F[F.indexOf(m)+1]),b.range==="prev"&&u(m=>F.indexOf(m)===0?F[F.length-1]:F[F.indexOf(m)-1])):b.scene&&(b.scene==="next"&&c(m=>G.indexOf(m)===G.length-1?G[0]:G[G.indexOf(m)+1]),b.scene==="prev"&&c(m=>G.indexOf(m)===0?G[G.length-1]:G[G.indexOf(m)-1]))},Q=()=>{switch(e){case 0:return v(x.Fragment,{children:v("a-text",{value:`Selected bin:
|
|
185
185
|
|
|
186
186
|
Value: `+p.absoluteContent+`
|
|
187
187
|
X: `+p.xPos+`
|
|
@@ -191,10 +191,16 @@ Z: `+p.zPos,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 2:
|
|
|
191
191
|
For changing
|
|
192
192
|
the visual height of bins,
|
|
193
193
|
use grip + joystick on
|
|
194
|
-
the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return v("a-box",{id:"tablet",color:"white",depth:"0.001",height:"0.3",lenght:"0.01",width:"0.4",rotation:"-60 0 0",position:"0.28 0 0"});case 3:return
|
|
195
|
-
an interface for Oculus Tablet`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})}};function W(y){T(m=>{let ee,A=0;return y<0?(m-.01).toFixed(2)>=.01&&((m-.01).toFixed(2)>.7?A=-.1:(m-.01).toFixed(2)>.1?A=-.01:A=-.001):(m+.01).toFixed(2)>.7?A=.1:(m-.01).toFixed(2)>.1?A=.01:A=.001,ee=m+A,_e.changeHistogramScale(A,"TH2"),Ke.changeHistogramScale(A,"TH1"),ee})}const V=[{fun:he(),name:"Bin Info"},{fun:ue(),name:"Scale Z axis"},{fun:ke(),name:"Change Data"},{fun:Ae(),name:"Change Theme"},{fun:Be(),name:"Change Range"},{fun:M(),name:"Change Scene"},{fun:null,name:"Tool with a longer name"}];function he(){if(C==="desktop")return v(x.Fragment,{children:v("table",{style:{width:"100%"},children:se("tbody",{children:[se("tr",{style:{display:"flex",alignItems:"flex-end"},children:[se("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"value:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:p.absoluteContent})]}),se("tr",{style:{display:"flex",alignItems:"flex-end"},children:[se("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"x:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:p.xPos})]}),se("tr",{style:{display:"flex",alignItems:"flex-end"},children:[se("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"y:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:p.yPos})]}),se("tr",{style:{display:"flex",alignItems:"flex-end"},children:[se("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"z:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:p.zPos})]})]})})})}function ue(){let y=.01,m=2;return(b-.01).toFixed(2)>.1&&(y=.1,m=1),v(x.Fragment,{children:se("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[v(Wr,{onClick:()=>{(b+.01).toFixed(2)>.1&&(y=.1,m=1),T(b+y),_e.changeHistogramScale(y,"TH2"),Ke.changeHistogramScale(y,"TH1")},children:"+"}),v("h1",{style:{fontSize:"5em",fontWeight:"bold"},children:b.toFixed(m)}),v(Wr,{onClick:()=>{(b-.01).toFixed(2)>=.01&&(T(b-y),_e.changeHistogramScale(-y,"TH2"),Ke.changeHistogramScale(-y,"TH1"))},children:"-"})]})})}function ke(){return v("div",{style:{display:"flex",flexDirection:"column"},children:g.map(y=>y===r?v("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>n(y),children:y},y):v("a",{onClick:()=>n(y),children:y},y))})}function Ae(){return v("div",{style:{display:"flex",flexDirection:"column"},children:I.map(y=>y===s?v("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>a(y),children:y},y):v("a",{onClick:()=>a(y),children:y},y))})}function Be(){return v("div",{style:{display:"flex",flexDirection:"column",marginTop:"7.5rem"},children:F.map(y=>y===l?v("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>u(y),children:y},y):v("a",{onClick:()=>u(y),children:y},y))})}function M(){return v("div",{style:{display:"flex",flexDirection:"column",marginTop:"16.5rem"},children:G.map(y=>y===f?v("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>c(y),children:y},y):v("a",{onClick:()=>c(y),children:y},y))})}document.getElementById("desktop--tablet--container")&&R(document.getElementById("desktop--tablet--container"));function R(y){let m=0,ee=0,A=0,pe=0;document.getElementById(y.id+"--header")?document.getElementById(y.id+"--header").onmousedown=ie:y.onmousedown=ie;function ie(de){de.preventDefault(),A=de.clientX,pe=de.clientY,document.onmouseup=k,document.onmousemove=oe}function oe(de){de.preventDefault(),m=A-de.clientX,ee=pe-de.clientY,A=de.clientX,pe=de.clientY,y.style.top=y.offsetTop-ee+"px",y.style.left=y.offsetLeft-m+"px"}function k(){document.onmouseup=null,document.onmousemove=null}}const H=y=>{t(y)};return C==="desktop"?v(No,{tools:V,activeToolLocal:e,ref:i,changeActiveToolLocalHandler:H}):v(x.Fragment,{children:Q()})}const kt=()=>qi,Gr=window.AFRAME,Vo=()=>{let i;const{projPanelIds:t}=x.useContext(Rt).data,[r,n]=x.useState(0),[s,a]=x.useState(null),[l,u]=x.useState(Gr.utils.device.checkHeadsetConnected()?"oculus":"keyboard"),[f,c]=x.useState(!1),[p,S]=x.useState(!1),[b,T]=x.useState(!0),C=P=>{P.device?(l!==P.device&&u(P.device),c(!f)):P==="shift"?E():P==="show"&&S(!p)},d=P=>{P.changeTabletState&&T(!1)},E=()=>{let P=r+90;P>=360&&(P=0),n(P)},w=P=>t[P]?t[P]:`panel_${P}`,D=()=>se("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,material:"color: white",children:[se("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color:white;",children:[v("a-text",{color:"black",width:50,value:l==="keyboard"?"Press C to show help panels":"Press Button X to show help panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:50,value:l==="keyboard"?"Press V to switch to histogram view":"Press Button Y to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:50,value:l==="keyboard"?"Press X to shift panels":"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),v("a-box",{id:w(1),scale:"80 50 2",animation__position:"property: position; from: 0 0 -60; to: 0 -1 -42; delay: 0; dur: 800; easing: linear;",material:"transparent:true"}),v("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 -60; to: 0 0 -42.5; delay: 0; dur: 800; easing: linear;",material:"color: white;"}),v("a-box",{id:w(2),scale:"80 50 2",animation__position:"property: position; from: 60 0 0; to: 42 -1 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent:true"}),v("a-box",{scale:"80 52 2",animation__position:"property: position; from: 60 0 0; to: 42.5 0 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"}),v("a-box",{id:w(3),scale:"80 50 2",animation__position:"property: position; from: 0 0 60; to: 0 -1 42; delay: 400; dur: 800; easing: linear;",material:"transparent:true"}),v("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 60; to: 0 0 42.5; delay: 400; dur: 800; easing: linear;",material:"color: white;"}),v("a-box",{id:w(4),scale:"80 50 2",animation__position:"property: position; from: -60 0 0; to: -42 -1 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent:true"}),v("a-box",{scale:"80 52 2",animation__position:"property: position; from: -60 0 0; to: -42.5 0 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"})]}),O=()=>l==="keyboard"?se("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,material:"color: white",children:[se("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[v("a-text",{color:"black",width:"50",value:p?"Press C to show help panels":"Press C to show projection panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:"50",value:"Press V to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:"50",value:"Press X to shift panels",position:"-20 -2.8 1"})]}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 60; to: -30 0 30; delay: 0; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 -60; to: -30 0 -30; delay: 200; dur: 800; easing: linear;",rotation:"0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard1.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 -60; to: 30 0 -30; delay: 400; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard2.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 60; to: 30 0 30; delay: 600; dur: 800; easing: linear;",rotation:" 0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard3.png"})]}):se("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,children:[se("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[v("a-text",{color:"black",width:"50",value:p?"Press Button X to show help panels":"Press Button X to show projection panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:"50",value:"Press Button Y to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:"50",value:"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 60; to: -32 0 32; delay: 0; dur: 800; easing: linear;",rotation:"-10 -45 0",src:"./assets/ndmvr/oculusControls/oculus.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 -60; to: -32 0 -32; delay: 200; dur: 800; easing: linear;",rotation:"10 45 0",src:"./assets/ndmvr/oculusControls/oculus2.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 -60; to: 32 0 -32; delay: 400; dur: 800; easing: linear;",rotation:"10 -45 0",src:"./assets/ndmvr/oculusControls/oculus1.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 60; to: 32 0 32; delay: 600; dur: 800; easing: linear;",rotation:"-10 45 0",src:"./assets/ndmvr/oculusControls/oculus3.png"})]}),g=()=>{const P=document.getElementById(w(0));P&&P.setAttribute("material","opacity",0)},Z=()=>{const P=document.getElementById(w(0));P&&P.setAttribute("material","opacity",1)};x.useEffect(()=>(i=Ee.subscribe(d),()=>i.unsubscribe()),[]),x.useEffect(()=>(i=Ct.getCameraSubject().subscribe(C),()=>i.unsubscribe()),[f,p,r]),x.useEffect(()=>{const P=document.getElementById("camera");f?(a({x:P.object3D.position.x,y:P.object3D.position.y,z:P.object3D.position.z}),P.object3D.position.y=P.object3D.position.y+30,g()):(P.object3D.position.y=1.6,s!==null&&(P.object3D.position.x=s.x,P.object3D.position.z=s.z,P.object3D.position.y=s.y),Z())},[f,l]);const I=()=>se(x.Fragment,{children:[v("a-entity",{"laser-controls":"hand: right",raycaster:`objects: .clickable;
|
|
194
|
+
the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return v("a-box",{id:"tablet",color:"white",depth:"0.001",height:"0.3",lenght:"0.01",width:"0.4",rotation:"-60 0 0",position:"0.28 0 0"});case 3:return ie("a-entity",{rotation:"-60 0 0",children:[v("a-text",{value:`Change source:
|
|
195
|
+
|
|
196
|
+
`,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),g.map(S=>v("a-text",{value:S,color:S===r?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*g.indexOf(S)+" 0","wrap-count":S===r?"360":"450"},S))]});case 4:return ie("a-entity",{rotation:"-60 0 0",children:[v("a-text",{value:`Change theme:
|
|
197
|
+
|
|
198
|
+
`,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),I.map(S=>v("a-text",{value:S,color:S===s?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*I.indexOf(S)+" 0","wrap-count":S===s?"360":"450"},S))]});case 5:return ie("a-entity",{rotation:"-60 0 0",children:[v("a-text",{value:`Change range:
|
|
199
|
+
|
|
200
|
+
`,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),F.map(S=>v("a-text",{value:S,color:S===l?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*F.indexOf(S)+" 0","wrap-count":S===l?"360":"450"},S))]});case 6:const b=15,m=Math.ceil(G.length/b),K=[];for(let S=0;S<m;S++){const ce=S*b,ee=ce+b,ne=G.slice(ce,ee),A=v("a-entity",{position:`${S*.3} 0 0`,children:ne.map(oe=>v("a-text",{value:oe,color:oe===f?"white":"#A6ACAF",rotation:"0 0 0",position:`0.1 ${-.025*ne.indexOf(oe)} 0`,"wrap-count":oe===f?"360":"450"},oe))},`column-${S}`);K.push(A)}return ie("a-entity",{rotation:"-60 0 0",children:[v("a-text",{value:"Change scene:",rotation:"0 0 0",position:"0.1 +0.035 0","wrap-count":"450"}),K]});default:return v("a-text",{value:`This tool does not have
|
|
201
|
+
an interface for Oculus Tablet`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})}};function U(b){T(m=>{let K,S=0;return b<0?(m-.01).toFixed(2)>=.01&&((m-.01).toFixed(2)>.7?S=-.1:(m-.01).toFixed(2)>.1?S=-.01:S=-.001):(m+.01).toFixed(2)>.7?S=.1:(m-.01).toFixed(2)>.1?S=.01:S=.001,K=m+S,Oe.changeHistogramScale(S,"TH2"),Ke.changeHistogramScale(S,"TH1"),K})}const V=[{fun:he(),name:"Bin Info"},{fun:fe(),name:"Scale Z axis"},{fun:ke(),name:"Change Data"},{fun:Ae(),name:"Change Theme"},{fun:Ye(),name:"Change Range"},{fun:M(),name:"Change Scene"},{fun:null,name:"Tool with a longer name"}];function he(){if(k==="desktop")return v(x.Fragment,{children:v("table",{style:{width:"100%"},children:ie("tbody",{children:[ie("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ie("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"value:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:p.absoluteContent})]}),ie("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ie("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"x:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:p.xPos})]}),ie("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ie("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"y:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:p.yPos})]}),ie("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ie("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[v("i",{children:"z:"})," "]}),v("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:p.zPos})]})]})})})}function fe(){let b=.01,m=2;return(y-.01).toFixed(2)>.1&&(b=.1,m=1),v(x.Fragment,{children:ie("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[v(Ur,{onClick:()=>{(y+.01).toFixed(2)>.1&&(b=.1,m=1),T(y+b),Oe.changeHistogramScale(b,"TH2"),Ke.changeHistogramScale(b,"TH1")},children:"+"}),v("h1",{style:{fontSize:"5em",fontWeight:"bold"},children:y.toFixed(m)}),v(Ur,{onClick:()=>{(y-.01).toFixed(2)>=.01&&(T(y-b),Oe.changeHistogramScale(-b,"TH2"),Ke.changeHistogramScale(-b,"TH1"))},children:"-"})]})})}function ke(){return v("div",{style:{display:"flex",flexDirection:"column"},children:g.map(b=>b===r?v("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>n(b),children:b},b):v("a",{onClick:()=>n(b),children:b},b))})}function Ae(){return v("div",{style:{display:"flex",flexDirection:"column"},children:I.map(b=>b===s?v("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>a(b),children:b},b):v("a",{onClick:()=>a(b),children:b},b))})}function Ye(){return v("div",{style:{display:"flex",flexDirection:"column",marginTop:"7.5rem"},children:F.map(b=>b===l?v("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>u(b),children:b},b):v("a",{onClick:()=>u(b),children:b},b))})}function M(){return v("div",{style:{display:"flex",flexDirection:"column",marginTop:"16.5rem"},children:G.map(b=>b===f?v("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>c(b),children:b},b):v("a",{onClick:()=>c(b),children:b},b))})}document.getElementById("desktop--tablet--container")&&R(document.getElementById("desktop--tablet--container"));function R(b){let m=0,K=0,S=0,ce=0;document.getElementById(b.id+"--header")?document.getElementById(b.id+"--header").onmousedown=ee:b.onmousedown=ee;function ee(oe){oe.preventDefault(),S=oe.clientX,ce=oe.clientY,document.onmouseup=A,document.onmousemove=ne}function ne(oe){oe.preventDefault(),m=S-oe.clientX,K=ce-oe.clientY,S=oe.clientX,ce=oe.clientY,b.style.top=b.offsetTop-K+"px",b.style.left=b.offsetLeft-m+"px"}function A(){document.onmouseup=null,document.onmousemove=null}}const H=b=>{t(b)};return k==="desktop"?v(No,{tools:V,activeToolLocal:e,ref:i,changeActiveToolLocalHandler:H}):v(x.Fragment,{children:Q()})}const kt=()=>Qi,Gr=window.AFRAME,Vo=()=>{let i;const{projPanelIds:t}=x.useContext(Rt).data,[r,n]=x.useState(0),[s,a]=x.useState(null),[l,u]=x.useState(Gr.utils.device.checkHeadsetConnected()?"oculus":"keyboard"),[f,c]=x.useState(!1),[p,C]=x.useState(!1),[y,T]=x.useState(!0),k=P=>{P.device?(l!==P.device&&u(P.device),c(!f)):P==="shift"?w():P==="show"&&C(!p)},d=P=>{P.changeTabletState&&T(!1)},w=()=>{let P=r+90;P>=360&&(P=0),n(P)},E=P=>t[P]?t[P]:`panel_${P}`,D=()=>ie("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,material:"color: white",children:[ie("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color:white;",children:[v("a-text",{color:"black",width:50,value:l==="keyboard"?"Press C to show help panels":"Press Button X to show help panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:50,value:l==="keyboard"?"Press V to switch to histogram view":"Press Button Y to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:50,value:l==="keyboard"?"Press X to shift panels":"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),v("a-box",{id:E(1),scale:"80 50 2",animation__position:"property: position; from: 0 0 -60; to: 0 -1 -42; delay: 0; dur: 800; easing: linear;",material:"transparent:true"}),v("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 -60; to: 0 0 -42.5; delay: 0; dur: 800; easing: linear;",material:"color: white;"}),v("a-box",{id:E(2),scale:"80 50 2",animation__position:"property: position; from: 60 0 0; to: 42 -1 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent:true"}),v("a-box",{scale:"80 52 2",animation__position:"property: position; from: 60 0 0; to: 42.5 0 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"}),v("a-box",{id:E(3),scale:"80 50 2",animation__position:"property: position; from: 0 0 60; to: 0 -1 42; delay: 400; dur: 800; easing: linear;",material:"transparent:true"}),v("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 60; to: 0 0 42.5; delay: 400; dur: 800; easing: linear;",material:"color: white;"}),v("a-box",{id:E(4),scale:"80 50 2",animation__position:"property: position; from: -60 0 0; to: -42 -1 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent:true"}),v("a-box",{scale:"80 52 2",animation__position:"property: position; from: -60 0 0; to: -42.5 0 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"})]}),O=()=>l==="keyboard"?ie("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,material:"color: white",children:[ie("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[v("a-text",{color:"black",width:"50",value:p?"Press C to show help panels":"Press C to show projection panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:"50",value:"Press V to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:"50",value:"Press X to shift panels",position:"-20 -2.8 1"})]}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 60; to: -30 0 30; delay: 0; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 -60; to: -30 0 -30; delay: 200; dur: 800; easing: linear;",rotation:"0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard1.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 -60; to: 30 0 -30; delay: 400; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard2.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 60; to: 30 0 30; delay: 600; dur: 800; easing: linear;",rotation:" 0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard3.png"})]}):ie("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,children:[ie("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[v("a-text",{color:"black",width:"50",value:p?"Press Button X to show help panels":"Press Button X to show projection panels",position:"-20 2.8 1"}),v("a-text",{color:"black",width:"50",value:"Press Button Y to switch to histogram view",position:"-20 0 1"}),v("a-text",{color:"black",width:"50",value:"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 60; to: -32 0 32; delay: 0; dur: 800; easing: linear;",rotation:"-10 -45 0",src:"./assets/ndmvr/oculusControls/oculus.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 -60; to: -32 0 -32; delay: 200; dur: 800; easing: linear;",rotation:"10 45 0",src:"./assets/ndmvr/oculusControls/oculus2.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 -60; to: 32 0 -32; delay: 400; dur: 800; easing: linear;",rotation:"10 -45 0",src:"./assets/ndmvr/oculusControls/oculus1.png"}),v("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 60; to: 32 0 32; delay: 600; dur: 800; easing: linear;",rotation:"-10 45 0",src:"./assets/ndmvr/oculusControls/oculus3.png"})]}),g=()=>{const P=document.getElementById(E(0));P&&P.setAttribute("material","opacity",0)},Z=()=>{const P=document.getElementById(E(0));P&&P.setAttribute("material","opacity",1)};x.useEffect(()=>(i=we.subscribe(d),()=>i.unsubscribe()),[]),x.useEffect(()=>(i=Et.getCameraSubject().subscribe(k),()=>i.unsubscribe()),[f,p,r]),x.useEffect(()=>{const P=document.getElementById("camera");f?(a({x:P.object3D.position.x,y:P.object3D.position.y,z:P.object3D.position.z}),P.object3D.position.y=P.object3D.position.y+30,g()):(P.object3D.position.y=1.6,s!==null&&(P.object3D.position.x=s.x,P.object3D.position.z=s.z,P.object3D.position.y=s.y),Z())},[f,l]);const I=()=>ie(x.Fragment,{children:[v("a-entity",{"laser-controls":"hand: right",raycaster:`objects: .clickable;
|
|
196
202
|
lineOpacity: 0.5;
|
|
197
|
-
far: 20;`}),v("a-entity",{"oculus-touch-controls":"hand: left","left-controller-logging":!0,"oculus-thumbstick-movement-controller":"",children:v(Zr,{})}),v("a-entity",{"oculus-touch-controls":"hand: right","right-controller-logging":!0})]});return
|
|
203
|
+
far: 20;`}),v("a-entity",{"oculus-touch-controls":"hand: left","left-controller-logging":!0,"oculus-thumbstick-movement-controller":"",children:v(Zr,{})}),v("a-entity",{"oculus-touch-controls":"hand: right","right-controller-logging":!0})]});return ie("a-entity",{id:"cameraWrapper",rotation:"0 -225 0",position:"7 2 -7",children:[f&&!p&&O(),f&&p&&D(),ie("a-camera",{id:"camera","look-control":!0,"wasd-controls-enabled":"acceleration:=50",children:[y&&l==="keyboard"&&v("a-entity",{text:"value: Press T to open NDMVR Tablet;color:black;",position:"0.2 0.8 -1"}),!Gr.utils.device.checkHeadsetConnected()&&v("a-entity",{cursor:"fuse: false; fuseTimeout: 2000;",raycaster:"objects: .clickable; showLine: false; far: 100;",animation__click:"property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1.4 1.4 1.4; dur: 150",animation__mouseenter:"property: scale; startEvents: mouseenter; from: 1 1 1; to: 1.4 1.4 1.4; dur: 180",animation__mouseleave:"property: scale; startEvents: mouseleave; from: 1.4 1.4 1.4; to: 1 1 1; dur: 180",line:"color: orange; opacity: 0.5",far:"100",position:"0 0 -1",geometry:"primitive: ring; radiusInner: 0.02; radiusOuter: 0.03",material:"color: white; shader: flat"})]}),l==="oculus"&&I()]})};class er{constructor(){j(this,Le,void 0);j(this,Ai,void 0);j(this,qe,[]);j(this,Pi,e=>o(this,qe).filter(t=>t.id!==e.id));ze(this,"containThisBin",e=>o(this,qe).filter(r=>r.id===e.id).length!==0);ze(this,"storeBinToLocalStorage",e=>{this.containThisBin(e)||(o(this,qe).push(e),o(this,Le).setItem("selectedBins",JSON.stringify(o(this,qe))))});ze(this,"deleteBinFromLocalStorage",e=>{this.containThisBin(e)&&(B(this,qe,o(this,Pi).call(this,e)),o(this,Le).setItem("selectedBins",JSON.stringify(o(this,qe))))});ze(this,"getBinsFromLocalStorage",()=>{const e=JSON.parse(o(this,Le).getItem("selectedBins"));return e===null?[]:e});B(this,Le,window.localStorage),B(this,Ai,document.getElementById("cameraWrapper")),B(this,qe,this.getBinsFromLocalStorage())}storeCurrentBinToLocalStorage(e){o(this,Le).setItem("currentBin",JSON.stringify(e))}getCurrentBinFromLocalStorage(){const e=JSON.parse(o(this,Le).getItem("currentBin"));return e===void 0||e===""?null:e}loadProperty(e){return JSON.parse(o(this,Le).getItem(e))}storeProperty(e,t){o(this,Le).setItem(e,JSON.stringify(t))}initHistogramData(e){e._typename.includes("TH3")?this.storeTH3HistogramLimits(e):e._typename.includes("TH2")&&this.storeTH2HistogramLimits(e)}storeTH2Offsets(e,t,r){let n=this.loadProperty("TH2"),s;n===null?(n={},s={name:"TH2",xOffset:1,yOffset:1,range:8}):s={name:"TH2",xOffset:e,yOffset:t,range:r},n.section=s,this.storeProperty("TH2",n)}storeTH3Offsets(e,t,r,n){let s=this.loadProperty("TH3"),a;s===null?(s={},a={name:"TH3",xOffset:1,yOffset:1,zOffset:1,range:4}):a={name:"TH3",xOffset:e,yOffset:t,zOffset:r,range:n},s.section=a,this.storeProperty("TH3",s)}storeOffsets(e){e.name.includes("TH3")||e.name.includes("th3")?this.storeTH3Offsets(e.xOffset,e.yOffset,e.zOffset,e.range):(e.name.includes("TH2")||e.name.includes("th2"))&&this.storeTH2Offsets(e.xOffset,e.yOffset,e.range)}storeFilePath(e){o(this,Le).setItem("rootFile",e)}loadFilePath(){const e=o(this,Le).getItem("rootFile");return e??"defaultHistogram"}loadTH2Offsets(){const e=this.loadProperty("TH2");return e!==null?e.section:null}loadTH3Offsets(){const e=this.loadProperty("TH3");return e!==null?e.section:null}loadOffsets(e){if(e.includes("TH3")||e.includes("th3"))return this.loadTH3Offsets();if(e.includes("TH2")||e.includes("th2"))return this.loadTH2Offsets()}}Le=new WeakMap,Ai=new WeakMap,qe=new WeakMap,Pi=new WeakMap;const Kr=new er;class Xo{constructor(){j(this,At,void 0);B(this,At,new ht)}saveSelectedBinToLocalStorage(){o(this,At).next(!0)}deleteBinFromLocalStorage(){o(this,At).next(!1)}getKeyboardEvent(){return o(this,At).asObservable()}}At=new WeakMap;const Ci=new Xo;class Uo{constructor(){j(this,Ht,void 0);B(this,Ht,new ht)}showBinProjection(e){o(this,Ht).next(e)}getServiceEvent(){return o(this,Ht).asObservable()}}Ht=new WeakMap;const qr=new Uo;class Wo{constructor(){j(this,Pt,void 0);B(this,Pt,new ht)}sendDataOfTheSelectedBin(e){o(this,Pt).next(e)}emmitCommand(e){o(this,Pt).next({command:e})}getBinDistributor(){return o(this,Pt).asObservable()}}Pt=new WeakMap;const oi=new Wo;function tr(i,e,t){i.face.normal.x!==0?(e.setAttribute("material","color",e.userData.axisZ),oi.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Z",id:e.userData.histogramName})):i.face.normal.y!==0?(e.setAttribute("material","color",e.userData.axisY),oi.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Y",id:e.userData.histogramName})):(e.setAttribute("material","color",e.userData.axisX),oi.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"X",id:e.userData.histogramName})),e.setAttribute("material","opacity","0.75")}me.registerComponent("mouseevent",{init:function(){let i;const e=this.el;let t=0;e.addEventListener("mouseenter",function(n){const s=n.detail.intersection;i=Ci.getKeyboardEvent().subscribe(a=>{a?(this.userData.markedColor=this.userData.selectColor,this.setAttribute("material","opacity","0.70"),qr.showBinProjection(this.userData)):(Kr.deleteBinFromLocalStorage(this.userData),this.userData.markedColor=this.userData.color,this.setAttribute("material","opacity","0.50"))}),tr(s,this,"HOVER")}),e.addEventListener("mouseleave",function(){i.unsubscribe(),this.setAttribute("material","color",this.userData.markedColor),this.setAttribute("material","opacity","0.50"),t=0}),e.addEventListener("click",function(n){if(t=t+1,setTimeout(()=>{t=0},600),t===2){t=0,this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1");const a=n.detail.intersection;a&&tr(a,this,"DB_CLICK")}else if(t===1){this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1"),qr.showBinProjection(this.userData),we.next({binData:this.userData});const a=n.detail.intersection;a&&tr(a,this,"CLICK")}let s=document.getElementById("th2-banner");if(s===null&&(s=document.getElementById("th3-banner")),s!==null){const a=s.childNodes;if(this.userData.typeName==="TH3"&&a.length===5){const l=`[${this.userData.zTitle}] [${this.userData.zMin},${this.userData.zMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
198
204
|
`:`
|
|
199
205
|
`}`,u=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
200
206
|
`:`
|
|
@@ -206,11 +212,11 @@ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})
|
|
|
206
212
|
`:`
|
|
207
213
|
`}`,f=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
208
214
|
`:`
|
|
209
|
-
`}`;a[0].setAttribute("text",`value: ${l}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${u}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${f}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`)}}})},update:function(){const i=this.el;i.setAttribute("material","color",i.userData.markedColor),i.setAttribute("material","opacity","0.75")}}),ge.registerComponent("binth",{schema:{id:{type:"string"},histogramName:{type:"string"},typeName:{type:"string"},content:{default:0},absoluteContent:{default:0},binName:{default:""},xTitle:{type:"string"},yTitle:{type:"string"},zTitle:{type:"string"},xMin:{type:"number"},yMin:{type:"number"},zMin:{type:"number"},xMax:{type:"number"},yMax:{type:"number"},zMax:{type:"number"},xPos:{type:"number"},yPos:{type:"number"},zPos:{type:"number"},xCenter:{type:"number"},yCenter:{type:"number"},zCenter:{type:"number"},xWidth:{type:"number"},yWidth:{type:"number"},zWidth:{type:"number"},color:{type:"string"},axisX:{type:"string"},axisY:{type:"string"},axisZ:{type:"string"},selectColor:{type:"string"},markedColor:{type:"string"}},init:function(){const i=this.el;i.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}},update:function(){const i=this.el;i.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}}});class si{constructor(){j(this,Ce,void 0);ze(this,"verticalMoveCamera",(e,t)=>{o(this,Ce)===null&&Y(this,Ce,document.getElementById("cameraWrapper")),o(this,Ce)!==null&&(e?o(this,Ce).object3D.position.y+=t:o(this,Ce).object3D.position.y>0&&(o(this,Ce).object3D.position.y-=t))});ze(this,"horizontalMoveCamera",(e,t,r)=>{o(this,Ce)===null&&Y(this,Ce,document.getElementById("cameraWrapper")),o(this,Ce)!==null&&(t?o(this,Ce).object3D.position[e]+=r:o(this,Ce).object3D.position[e]-=r)});ze(this,"horizontalDiagonalMoveCamera",(e,t,r,n)=>{if(o(this,Ce)===null&&Y(this,Ce,document.getElementById("cameraWrapper")),o(this,Ce)!==null){const s=new THREE.Vector3;s[e]=Math.cos(Math.PI/4),s[t]=Math.sin(Math.PI/4),s.normalize(),r?o(this,Ce).object3D.position.addScaledVector(s,n):o(this,Ce).object3D.position.addScaledVector(s,-n)}});j(this,Ze,(e,t,r)=>{if(o(this,Ce)!==null&&e!==null){const n=e.object3D.position.x+1*e.object3D.position.x,s=e.object3D.position.z+1*e.object3D.position.z,a=t;o(this,Ce).setAttribute("animation",`property: position; to: ${n+1} ${a} ${s+1}; dur: 100;`),o(this,Ce).setAttribute("animation__1",`property: rotation; to: ${o(this,Ce).object3D.rotation.x} ${r} ${o(this,Ce).object3D.rotation.z}; dur: 100;`)}});ze(this,"setCameraPosition",e=>{if(o(this,Ce)!==null){let t=o(this,Ce).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const r=e.xOffset+e.xOffset,n=e.yOffset+e.yOffset;setTimeout(()=>{o(this,Ce).setAttribute("animation",`property: position; to: ${r-3} ${t} ${n-3}; dur: 40;`)},1800)}});ze(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&o(this,Ze).call(this,e,0,180)});ze(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&o(this,Ze).call(this,e,0,0)});ze(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&o(this,Ze).call(this,e,0,90)});ze(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&o(this,Ze).call(this,e,0,270)});ze(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&o(this,Ze).call(this,e,10,180)});ze(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&o(this,Ze).call(this,e,10,0)});ze(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&o(this,Ze).call(this,e,10,90)});ze(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&o(this,Ze).call(this,e,10,270)});Y(this,Ce,document.getElementById("cameraWrapper"))}}Ce=new WeakMap,Ze=new WeakMap;const st={};let er=new si,tr,gt,Ei=!1;Ee.next({changeTabletState:Ei});const ir=(i,e)=>{let t=.2;i.name==="scale"?t=.01:i.name==="rotation"&&(t=2),e.key==="ArrowDown"?i.xValue=i.xValue+t:e.key==="ArrowUp"?i.xValue=i.xValue-t:e.key==="="?i.yValue=i.yValue+t:e.key==="-"?i.yValue=i.yValue-t:e.key==="ArrowRight"?i.zValue=i.zValue+t:e.key==="ArrowLeft"&&(i.zValue=i.zValue-t),tr.setAttribute(i.name,`${i.xValue} ${i.yValue} ${i.zValue}`)},Zo=i=>{i.key==="k"||i.key==="K"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):i.key==="i"||i.key==="I"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):i.key==="u"||i.key==="U"?Re.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):i.key==="o"||i.key==="O"?Re.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):i.key==="l"||i.key==="L"?(Ke.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(i.key==="j"||i.key==="J")&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},Go=i=>{i.key==="k"||i.key==="K"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):i.key==="i"||i.key==="I"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):i.key==="u"||i.key==="U"?Re.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):i.key==="o"||i.key==="O"?Re.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):i.key==="l"||i.key==="L"?(_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!1)):(i.key==="j"||i.key==="J")&&(_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!1))},rr=i=>{st[i.key]=!0,(st.Z||st.z)&&ir(gt[0],i),(st.X||st.x)&&ir(gt[1],i),(st.C||st.c)&&ir(gt[2],i),st.Shift&&Go(i),Zo(i),i.key===" "&&er.verticalMoveCamera(!0,.3),i.shiftKey&&er.verticalMoveCamera(!1,.3),i.key==="1"&&Ee.next(0),i.key==="2"&&Ee.next(1),i.key==="3"&&Ee.next(2),i.key==="4"&&Ee.next(3),i.key==="5"&&Ee.next(4),i.key==="6"&&Ee.next(5),i.key==="7"&&Ee.next(6),i.key==="8"&&Ee.next(7),i.key==="9"&&Ee.next(8),i.key==="0"&&Ee.next(9),i.key==="Enter"&&oi.emmitCommand("REFRESH"),(i.key==="e"||i.key==="E")&&(Ei=!Ei,Ei?Ee.next({changeTabletState:"flex"}):Ee.next({changeTabletState:"none"})),(i.key==="t"||i.key==="T")&&_e.changeHistogramScale(.1,"TH2"),i.key==="r"||i.key,(i.key==="m"||i.key==="M")&&_e.changeHistogramFunction("feet","TH2"),(i.key==="n"||i.key==="N")&&_e.changeHistogramFunction("default","TH2"),(i.key==="c"||i.key==="C")&&Ct.setUserState(),(i.key==="v"||i.key==="V")&&Ct.setVisibilityOfBanners("keyboard"),(i.key==="x"||i.key==="X")&&Ct.shiftBanners()},nr=i=>{delete st[i.key]},Jr=(i,e)=>{tr=e,gt=[i.position,i.scale,i.rotation];for(let t=0;t<3;t++)tr.setAttribute(gt[t].name,`${gt[t].xValue} ${gt[t].yValue} ${gt[t].zValue}`)},Qr=()=>{er=new si};ge.registerComponent("histogram-control",{schema:{position:{name:"position",xValue:0,yValue:.1,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const i=this.el;Jr(this.schema,i),document.addEventListener("keydown",rr),document.addEventListener("keyup",nr)},update:function(){Qr()}}),ge.registerComponent("label-handler",{schema:{value:{type:"string"},delay:{type:"number"}},init:function(){const i=this.el;this.value=this.data.value,i.setAttribute("text","value",this.data.value)},update:function(){const i=this.el;this.value!==this.data.value&&(setTimeout(()=>{i.setAttribute("text","value",this.data.value)},this.data.delay),this.value=this.data.value)}});const Ye={def:{colorPalette:["#4b0066","#8300b3","#bb00ff","#cf4dff","#e499ff","#ffffcc","#ffff99","#ffff66","#ffff33","#fcba03"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4b0066",secondary:"#FF3700"},font:{primary:"black",secondary:"black"}},fire:{colorPalette:["#5b0000","#7b2100","#a23b00","#c84900","#df5900","#f18800","#f1a000","#ffae00","#ffcd19","#ffe159"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#5b0000",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},nebula:{colorPalette:["#13004b","#320065","#4e0085","#6100a5","#7000b8","#9800c6","#ab00c6","#b900d2","#d700da","#ff6efc"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#13004b",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},rainforest:{colorPalette:["#005b01","#007b23","#00a23d","#00c84c","#00df5c","#00f18b","#00ffb1","#19ffd0","#a6fffe","#56fffe"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#005b01",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},nature:{colorPalette:["#4a691a","#5e8425","#79a834","#91c640","#9ed64b","#a8dc59","#b0e166","#bfeb7c","#d7fba2","#deffad"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4a691a",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},water:{colorPalette:["#00545a","#00717a","#0097a2","#00bac8","#00cede","#00dff0","#00edff","#45f2ff","#7ef6ff","#bdfaff"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#00545a",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},sunflower:{colorPalette:["#1e3600","#2e4d00","#507001","#91a004","#b4bb06","#d2d309","#eeed0f","#ffff28","#ffff85","#ffffc2"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#1e3600",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},blood:{colorPalette:["#470101","#6e0101","#800b0b","#940c0c","#a30000","#bd0909","#e01f1f","#d43b3b","#db5e5e","#f78888"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#470101",secondary:"#f6ff00"},font:{primary:"black",secondary:"black"}},magma:{colorPalette:["#dbff1d","#d5e814","#d5d007","#cc9b00","#b87600","#9c4a00","#812f00","#661900","#661420","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#2b0000",secondary:"#ae2000"},font:{primary:"black",secondary:"black"}},jupiter:{colorPalette:["#00340f","#00344f","#006e3a","#00976a","#26efd0","#9c4a00","#9c4a00","#812f00","#661900","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#00340f",secondary:"#e3ff5b"},font:{primary:"black",secondary:"black"}},magic:{colorPalette:["#342000","#6e5e00","#888500","#919700","#8dbe00","#caef26","#cf6e85","#b300b8","#6b0090","#3b0066"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#342000",secondary:"#c85bff"},font:{primary:"black",secondary:"black"}}};class en{constructor(e){Ye[e]?(this.xAxis=Ye[e].axis.x,this.yAxis=Ye[e].axis.y,this.zAxis=Ye[e].axis.z,this.palette=Ye[e].colorPalette,this.primaryAccent=Ye[e].accent.primary,this.secondaryAccent=Ye[e].accent.secondary,this.primaryFont=Ye[e].font.primary,this.secondaryFont=Ye[e].font.secondary):(this.xAxis=Ye.def.axis.x,this.yAxis=Ye.def.axis.y,this.zAxis=Ye.def.axis.z,this.palette=Ye.def.colorPalette,this.primaryAccent=Ye.def.accent.primary,this.secondaryAccent=Ye.def.accent.secondary,this.primaryFont=Ye.def.font.primary,this.secondaryFont=Ye.def.font.secondary)}getAxisColor(e){return e==="x"||e==="X"?this.xAxis:e==="y"||e==="Y"?this.yAxis:e==="z"||e==="Z"?this.zAxis:null}getPrimaryAccentColor(){return this.primaryAccent}getSecondaryAccentColor(){return this.secondaryAccent}getPrimaryFontColor(){return this.primaryFont}getSecondaryFontColor(){return this.secondaryFont}getBinColor(e){let r=this.palette[0];if(e>=1)return this.palette[9];const n=.12;let s=n;for(let a=0;a<=9;a++){if(e<=s){r=this.palette[a];break}s+=n}return r}}class Ko{constructor(e,t,r,n,s,a,l,u){j(this,Vt);j(this,Te,"");j(this,ci,[]);j(this,L,null);j(this,Je,"");j(this,U,null);j(this,ae,1);j(this,fe,1);j(this,N,1);j(this,je,0);j(this,Ve,0);j(this,Qe,0);j(this,lt,1);j(this,bt,1);j(this,ui,1);j(this,ye,8);j(this,Ne,{xInitial:0,yInitial:0,zInitial:0});j(this,et,void 0);j(this,tt,void 0);j(this,vt,1);j(this,it,1);j(this,_t,0);j(this,It,2);j(this,K,{xOffset:0,yOffset:0,zOffset:0});j(this,xt,[]);ze(this,"getXOffset",()=>o(this,ae));ze(this,"getYOffset",()=>o(this,fe));ze(this,"getZOffset",()=>o(this,N));ze(this,"getContentScale",()=>o(this,it));ze(this,"getRange",()=>o(this,ye));j(this,ct,(e,t)=>{let r=e>t-o(this,ye)?t-o(this,ye):e;return r<1&&(r=1),r});j(this,Bt,e=>o(this,ci).filter(r=>r.id===e).length!==0);j(this,Ge,(e,t,r,n,s,a,l,u,f,c,p,S)=>({key:e+o(this,Te),geometry:{primitive:"plane",width:u,height:f},text:{color:S,width:4,height:"auto"},labelHandler:{value:c,delay:500},rotation:{x:s,y:a,z:l},material:{color:p},animation:{fromX:t+o(this,K).xOffset,fromY:r+o(this,K).zOffset,fromZ:n+o(this,K).yOffset,toX:t,toY:r,toZ:n}}));j(this,Ai,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,n,s,a,l,u,f,c,p,S,b;const T="";let C,d=0;const E=o(this,ae)+o(this,ye)>o(this,je)?o(this,je):o(this,ae)+o(this,ye),w=o(this,fe)+o(this,ye)>o(this,Ve)?o(this,Ve):o(this,fe)+o(this,ye),D=o(this,N)+o(this,ye)>o(this,Qe)?o(this,Qe):o(this,N)+o(this,ye),O=o(this,L).fXaxis.fTitle,g=o(this,L).fYaxis.fTitle,Z=o(this,L).fZaxis.fTitle,I=o(this,L).fXaxis.fLabels?o(this,L).fXaxis.fLabels.arr:[],P=o(this,L).fYaxis.fLabels?o(this,L).fYaxis.fLabels.arr:[],F=o(this,L).fZaxis.fLabels?o(this,L).fZaxis.fLabels.arr:[],ne=[];for(let X=o(this,N);X<=D;X++)for(let Q=o(this,fe);Q<=w;Q++)for(let W=o(this,ae);W<=E;W++){t=o(this,L).fXaxis.GetBinCenter(W),r=o(this,L).fXaxis.GetBinLowEdge(W),n=t+(t-r),s=n-r,a=o(this,L).fYaxis.GetBinCenter(Q),l=o(this,L).fYaxis.GetBinLowEdge(Q),u=a+(a-l),f=u-l,c=o(this,L).fZaxis.GetBinCenter(X),p=o(this,L).fZaxis.GetBinLowEdge(X),S=c+(c-p),b=S-p;const V=o(this,Yt).call(this,o(this,L).getBinContent(W,Q,X));if(V<=o(this,_t))continue;C=o(this,tt)?o(this,Wt).call(this,o(this,tt).call(this,{histogram:o(this,L),histogramId:o(this,Te),x:W,y:Q,z:X})):V;let he=C;C<.15&&(he=.15);let ue=o(this,et)?o(this,et).call(this,{histogram:o(this,L),histogramId:o(this,Te),x:W,y:Q,z:X,content:C}):null;ue=ue||o(this,U).getBinColor(C);const ke=o(this,Te)+r+"th3"+n+"th3"+p+"th3"+S+"th3"+l+"th3"+u;let Ae;o(this,Bt).call(this,ke)?Ae=o(this,U).getSecondaryAccentColor():Ae=ue;const Be=`id: ${ke};
|
|
215
|
+
`}`;a[0].setAttribute("text",`value: ${l}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${u}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${f}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`)}}})},update:function(){const i=this.el;i.setAttribute("material","color",i.userData.markedColor),i.setAttribute("material","opacity","0.75")}}),me.registerComponent("binth",{schema:{id:{type:"string"},histogramName:{type:"string"},typeName:{type:"string"},content:{default:0},absoluteContent:{default:0},binName:{default:""},xTitle:{type:"string"},yTitle:{type:"string"},zTitle:{type:"string"},xMin:{type:"number"},yMin:{type:"number"},zMin:{type:"number"},xMax:{type:"number"},yMax:{type:"number"},zMax:{type:"number"},xPos:{type:"number"},yPos:{type:"number"},zPos:{type:"number"},xCenter:{type:"number"},yCenter:{type:"number"},zCenter:{type:"number"},xWidth:{type:"number"},yWidth:{type:"number"},zWidth:{type:"number"},color:{type:"string"},axisX:{type:"string"},axisY:{type:"string"},axisZ:{type:"string"},selectColor:{type:"string"},markedColor:{type:"string"}},init:function(){const i=this.el;i.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}},update:function(){const i=this.el;i.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}}});class si{constructor(){j(this,Ee,void 0);ze(this,"verticalMoveCamera",(e,t)=>{if(o(this,Ee)===null&&B(this,Ee,document.getElementById("cameraWrapper")),o(this,Ee)!==null){const r=new THREE.Vector3,n=o(this,Ee).object3D.position.clone();e?(r.copy(n).add(new THREE.Vector3(0,+t,0)),o(this,Ee).object3D.position.lerp(r,.5)):o(this,Ee).object3D.position.y>3&&(r.copy(n).add(new THREE.Vector3(0,-t,0)),o(this,Ee).object3D.position.lerp(r,.5))}});ze(this,"horizontalMoveCamera",(e,t,r)=>{o(this,Ee)===null&&B(this,Ee,document.getElementById("cameraWrapper")),o(this,Ee)!==null&&(t?o(this,Ee).object3D.position[e]+=r:o(this,Ee).object3D.position[e]-=r)});ze(this,"horizontalDiagonalMoveCamera",(e,t,r,n)=>{if(o(this,Ee)===null&&B(this,Ee,document.getElementById("cameraWrapper")),o(this,Ee)!==null){const s=new THREE.Vector3;s[e]=Math.cos(Math.PI/4),s[t]=Math.sin(Math.PI/4),s.normalize(),r?o(this,Ee).object3D.position.addScaledVector(s,n):o(this,Ee).object3D.position.addScaledVector(s,-n)}});j(this,Ze,(e,t,r)=>{if(o(this,Ee)!==null&&e!==null){const n=e.object3D.position.x+1*e.object3D.position.x,s=e.object3D.position.z+1*e.object3D.position.z,a=t;o(this,Ee).setAttribute("animation",`property: position; to: ${n+1} ${a} ${s+1}; dur: 100;`),o(this,Ee).setAttribute("animation__1",`property: rotation; to: ${o(this,Ee).object3D.rotation.x} ${r} ${o(this,Ee).object3D.rotation.z}; dur: 100;`)}});ze(this,"setCameraPosition",e=>{if(o(this,Ee)!==null){let t=o(this,Ee).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const r=e.xOffset+e.xOffset,n=e.yOffset+e.yOffset;setTimeout(()=>{o(this,Ee).setAttribute("animation",`property: position; to: ${r-3} ${t} ${n-3}; dur: 40;`)},1800)}});ze(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&o(this,Ze).call(this,e,0,180)});ze(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&o(this,Ze).call(this,e,0,0)});ze(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&o(this,Ze).call(this,e,0,90)});ze(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&o(this,Ze).call(this,e,0,270)});ze(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&o(this,Ze).call(this,e,10,180)});ze(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&o(this,Ze).call(this,e,10,0)});ze(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&o(this,Ze).call(this,e,10,90)});ze(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&o(this,Ze).call(this,e,10,270)});B(this,Ee,document.getElementById("cameraWrapper"))}}Ee=new WeakMap,Ze=new WeakMap;const st={};let ir=new si,rr,gt,wi=!1;we.next({changeTabletState:wi});const nr=(i,e)=>{let t=.2;i.name==="scale"?t=.01:i.name==="rotation"&&(t=2),e.key==="ArrowDown"?i.xValue=i.xValue+t:e.key==="ArrowUp"?i.xValue=i.xValue-t:e.key==="="?i.yValue=i.yValue+t:e.key==="-"?i.yValue=i.yValue-t:e.key==="ArrowRight"?i.zValue=i.zValue+t:e.key==="ArrowLeft"&&(i.zValue=i.zValue-t),rr.setAttribute(i.name,`${i.xValue} ${i.yValue} ${i.zValue}`)},Zo=i=>{i.key==="k"||i.key==="K"?(Oe.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):i.key==="i"||i.key==="I"?(Oe.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):i.key==="u"||i.key==="U"?Re.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):i.key==="o"||i.key==="O"?Re.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):i.key==="j"||i.key==="j"?(Ke.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),Oe.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(i.key==="l"||i.key==="L")&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),Oe.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},Go=i=>{i.key==="k"||i.key==="K"?(Oe.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):i.key==="i"||i.key==="I"?(Oe.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):i.key==="u"||i.key==="U"?Re.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):i.key==="o"||i.key==="O"?Re.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):i.key==="l"||i.key==="L"?(Oe.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)):(i.key==="j"||i.key==="J")&&(Oe.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",fal,!1))},Ei=i=>{st[i.key]=!0,(st.Z||st.z)&&nr(gt[0],i),(st.X||st.x)&&nr(gt[1],i),(st.C||st.c)&&nr(gt[2],i),st.Shift&&Go(i),Zo(i),(i.key==="e"||i.key==="E")&&ir.verticalMoveCamera(!0,.3),(i.key==="q"||i.key==="Q")&&ir.verticalMoveCamera(!1,.3),i.key==="1"&&we.next(0),i.key==="2"&&we.next(1),i.key==="3"&&we.next(2),i.key==="4"&&we.next(3),i.key==="5"&&we.next(4),i.key==="6"&&we.next(5),i.key==="7"&&we.next(6),i.key==="8"&&we.next(7),i.key==="9"&&we.next(8),i.key==="0"&&we.next(9),i.key==="Enter"&&oi.emmitCommand("REFRESH"),(i.key==="t"||i.key==="T")&&(wi=!wi,wi?we.next({changeTabletState:"flex"}):we.next({changeTabletState:"none"})),i.key==="r"||i.key,(i.key==="m"||i.key==="M")&&Oe.changeHistogramFunction("feet","TH2"),(i.key==="n"||i.key==="N")&&Oe.changeHistogramFunction("default","TH2"),(i.key==="c"||i.key==="C")&&Et.setUserState(),(i.key==="v"||i.key==="V")&&Et.setVisibilityOfBanners("keyboard"),(i.key==="x"||i.key==="X")&&Et.shiftBanners()},Ti=i=>{delete st[i.key]},Jr=(i,e)=>{rr=e,gt=[i.position,i.scale,i.rotation];for(let t=0;t<3;t++)rr.setAttribute(gt[t].name,`${gt[t].xValue} ${gt[t].yValue} ${gt[t].zValue}`)},Qr=()=>{ir=new si};me.registerComponent("histogram-control",{schema:{position:{name:"position",xValue:0,yValue:.1,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const i=this.el;Jr(this.schema,i),document.querySelector("a-scene").addEventListener("mouseover",function(){document.addEventListener("keydown",Ei),document.addEventListener("keyup",Ti)}),document.querySelector("a-scene").addEventListener("mouseout",function(){document.removeEventListener("keydown",Ei),document.removeEventListener("keyup",Ti)})},update:function(){Qr()}}),me.registerComponent("label-handler",{schema:{value:{type:"string"},delay:{type:"number"}},init:function(){const i=this.el;this.value=this.data.value,i.setAttribute("text","value",this.data.value)},update:function(){const i=this.el;this.value!==this.data.value&&(setTimeout(()=>{i.setAttribute("text","value",this.data.value)},this.data.delay),this.value=this.data.value)}});const Be={def:{colorPalette:["#4b0066","#8300b3","#bb00ff","#cf4dff","#e499ff","#ffffcc","#ffff99","#ffff66","#ffff33","#fcba03"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4b0066",secondary:"#FF3700"},font:{primary:"black",secondary:"black"}},fire:{colorPalette:["#5b0000","#7b2100","#a23b00","#c84900","#df5900","#f18800","#f1a000","#ffae00","#ffcd19","#ffe159"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#5b0000",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},nebula:{colorPalette:["#13004b","#320065","#4e0085","#6100a5","#7000b8","#9800c6","#ab00c6","#b900d2","#d700da","#ff6efc"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#13004b",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},rainforest:{colorPalette:["#005b01","#007b23","#00a23d","#00c84c","#00df5c","#00f18b","#00ffb1","#19ffd0","#a6fffe","#56fffe"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#005b01",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},nature:{colorPalette:["#4a691a","#5e8425","#79a834","#91c640","#9ed64b","#a8dc59","#b0e166","#bfeb7c","#d7fba2","#deffad"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4a691a",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},water:{colorPalette:["#00545a","#00717a","#0097a2","#00bac8","#00cede","#00dff0","#00edff","#45f2ff","#7ef6ff","#bdfaff"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#00545a",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},sunflower:{colorPalette:["#1e3600","#2e4d00","#507001","#91a004","#b4bb06","#d2d309","#eeed0f","#ffff28","#ffff85","#ffffc2"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#1e3600",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},blood:{colorPalette:["#470101","#6e0101","#800b0b","#940c0c","#a30000","#bd0909","#e01f1f","#d43b3b","#db5e5e","#f78888"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#470101",secondary:"#f6ff00"},font:{primary:"black",secondary:"black"}},magma:{colorPalette:["#dbff1d","#d5e814","#d5d007","#cc9b00","#b87600","#9c4a00","#812f00","#661900","#661420","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#2b0000",secondary:"#ae2000"},font:{primary:"black",secondary:"black"}},jupiter:{colorPalette:["#00340f","#00344f","#006e3a","#00976a","#26efd0","#9c4a00","#9c4a00","#812f00","#661900","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#00340f",secondary:"#e3ff5b"},font:{primary:"black",secondary:"black"}},magic:{colorPalette:["#342000","#6e5e00","#888500","#919700","#8dbe00","#caef26","#cf6e85","#b300b8","#6b0090","#3b0066"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#342000",secondary:"#c85bff"},font:{primary:"black",secondary:"black"}}};class en{constructor(e){Be[e]?(this.xAxis=Be[e].axis.x,this.yAxis=Be[e].axis.y,this.zAxis=Be[e].axis.z,this.palette=Be[e].colorPalette,this.primaryAccent=Be[e].accent.primary,this.secondaryAccent=Be[e].accent.secondary,this.primaryFont=Be[e].font.primary,this.secondaryFont=Be[e].font.secondary):(this.xAxis=Be.def.axis.x,this.yAxis=Be.def.axis.y,this.zAxis=Be.def.axis.z,this.palette=Be.def.colorPalette,this.primaryAccent=Be.def.accent.primary,this.secondaryAccent=Be.def.accent.secondary,this.primaryFont=Be.def.font.primary,this.secondaryFont=Be.def.font.secondary)}getAxisColor(e){return e==="x"||e==="X"?this.xAxis:e==="y"||e==="Y"?this.yAxis:e==="z"||e==="Z"?this.zAxis:null}getPrimaryAccentColor(){return this.primaryAccent}getSecondaryAccentColor(){return this.secondaryAccent}getPrimaryFontColor(){return this.primaryFont}getSecondaryFontColor(){return this.secondaryFont}getBinColor(e){let r=this.palette[0];if(e>=1)return this.palette[9];const n=.12;let s=n;for(let a=0;a<=9;a++){if(e<=s){r=this.palette[a];break}s+=n}return r}}class Ko{constructor(e,t,r,n,s,a,l,u){j(this,Vt);j(this,Te,"");j(this,ci,[]);j(this,L,null);j(this,Je,"");j(this,W,null);j(this,le,1);j(this,ge,1);j(this,N,1);j(this,je,0);j(this,Ve,0);j(this,Qe,0);j(this,lt,1);j(this,bt,1);j(this,ui,1);j(this,ye,8);j(this,Ne,{xInitial:0,yInitial:0,zInitial:0});j(this,et,void 0);j(this,tt,void 0);j(this,vt,1);j(this,it,1);j(this,_t,0);j(this,It,2);j(this,re,{xOffset:0,yOffset:0,zOffset:0});j(this,xt,[]);ze(this,"getXOffset",()=>o(this,le));ze(this,"getYOffset",()=>o(this,ge));ze(this,"getZOffset",()=>o(this,N));ze(this,"getContentScale",()=>o(this,it));ze(this,"getRange",()=>o(this,ye));j(this,ct,(e,t)=>{let r=e>t-o(this,ye)?t-o(this,ye):e;return r<1&&(r=1),r});j(this,Yt,e=>o(this,ci).filter(r=>r.id===e).length!==0);j(this,Ge,(e,t,r,n,s,a,l,u,f,c,p,C,y)=>({key:e+o(this,Te),axis:t,geometry:{primitive:"plane",width:f,height:c},text:{color:y,width:4,height:"auto"},labelHandler:{value:p,delay:500},rotation:{x:a,y:l,z:u},material:{color:C},animation:{fromX:r-o(this,re).xOffset,fromY:n+o(this,re).zOffset,fromZ:s+o(this,re).yOffset,toX:r,toY:n,toZ:s}}));j(this,_i,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,n,s,a,l,u,f,c,p,C,y;const T="";let k,d=0;const w=o(this,le)+o(this,ye)>o(this,je)?o(this,je):o(this,le)+o(this,ye),E=o(this,ge)+o(this,ye)>o(this,Ve)?o(this,Ve):o(this,ge)+o(this,ye),D=o(this,N)+o(this,ye)>o(this,Qe)?o(this,Qe):o(this,N)+o(this,ye),O=o(this,L).fXaxis.fTitle,g=o(this,L).fYaxis.fTitle,Z=o(this,L).fZaxis.fTitle,I=o(this,L).fXaxis.fLabels?o(this,L).fXaxis.fLabels.arr:[],P=o(this,L).fYaxis.fLabels?o(this,L).fYaxis.fLabels.arr:[],F=o(this,L).fZaxis.fLabels?o(this,L).fZaxis.fLabels.arr:[],ae=[];for(let X=o(this,N);X<=D;X++)for(let Q=o(this,ge);Q<=E;Q++)for(let U=o(this,le);U<=w;U++){t=o(this,L).fXaxis.GetBinCenter(U),r=o(this,L).fXaxis.GetBinLowEdge(U),n=t+(t-r),s=n-r,a=o(this,L).fYaxis.GetBinCenter(Q),l=o(this,L).fYaxis.GetBinLowEdge(Q),u=a+(a-l),f=u-l,c=o(this,L).fZaxis.GetBinCenter(X),p=o(this,L).fZaxis.GetBinLowEdge(X),C=c+(c-p),y=C-p;const V=o(this,Bt).call(this,o(this,L).getBinContent(U,Q,X));if(V<=o(this,_t))continue;k=o(this,tt)?o(this,Ut).call(this,o(this,tt).call(this,{histogram:o(this,L),histogramId:o(this,Te),x:U,y:Q,z:X})):V;let he=k;k<.15&&(he=.15);let fe=o(this,et)?o(this,et).call(this,{histogram:o(this,L),histogramId:o(this,Te),x:U,y:Q,z:X,content:k}):null;fe=fe||o(this,W).getBinColor(k);const ke=o(this,Te)+r+"th3"+n+"th3"+p+"th3"+C+"th3"+l+"th3"+u;let Ae;o(this,Yt).call(this,ke)?Ae=o(this,W).getSecondaryAccentColor():Ae=fe;const Ye=`id: ${ke};
|
|
210
216
|
histogramName: ${o(this,Te)};
|
|
211
217
|
typeName: 'TH3';
|
|
212
|
-
content: ${
|
|
213
|
-
color: ${
|
|
218
|
+
content: ${k};
|
|
219
|
+
color: ${fe};
|
|
214
220
|
yTitle: ${g};
|
|
215
221
|
xTitle: ${O};
|
|
216
222
|
zTitle: ${Z};
|
|
@@ -221,8 +227,8 @@ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})
|
|
|
221
227
|
zMin: ${p};
|
|
222
228
|
xMax: ${n};
|
|
223
229
|
yMax: ${u};
|
|
224
|
-
zMax: ${
|
|
225
|
-
xPos: ${
|
|
230
|
+
zMax: ${C};
|
|
231
|
+
xPos: ${U};
|
|
226
232
|
yPos: ${Q};
|
|
227
233
|
zPos: ${X};
|
|
228
234
|
xCenter: ${t};
|
|
@@ -230,21 +236,21 @@ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})
|
|
|
230
236
|
zCenter: ${c};
|
|
231
237
|
xWidth: ${s};
|
|
232
238
|
yWidth: ${f};
|
|
233
|
-
zWidth: ${
|
|
239
|
+
zWidth: ${y};
|
|
234
240
|
markedColor: ${Ae};
|
|
235
|
-
selectColor: ${o(this,
|
|
236
|
-
axisX: ${o(this,
|
|
237
|
-
axisY: ${o(this,
|
|
238
|
-
axisZ: ${o(this,
|
|
241
|
+
selectColor: ${o(this,W).getSecondaryAccentColor()};
|
|
242
|
+
axisX: ${o(this,W).getAxisColor("x")};
|
|
243
|
+
axisY: ${o(this,W).getAxisColor("y")};
|
|
244
|
+
axisZ: ${o(this,W).getAxisColor("z")}`,M=he*.8,R=-(U-1),H=X-1,b=Q-1;e.bins[d]={id:ke,color:fe,binData:Ye,content:V,animation:{fromWidth:o(this,St).call(this,ke),fromHeight:o(this,St).call(this,ke),fromDepth:o(this,St).call(this,ke),toWidth:M,toHeight:M,toDepth:M},animation2:{fromX:R,fromY:H,fromZ:b,toX:R,toY:H,toZ:b},animation3:{fromColor:o(this,Xt).call(this,ke),toColor:Ae}},ae[d]={key:ke,scale:M,color:Ae},d++}B(this,xt,ae);const G=[],Y=[];return d=o(this,Nt).call(this,e,G,Y,E,w,P,g,0),d=o(this,Lt).call(this,e,G,Y,w,E,I,O,d),d=o(this,jt).call(this,e,G,Y,w,E,D,F,Z,d),Hi(this,Vt,Ii).call(this,e,G,Y,w,E,d),e.labels=[...G,...Y],e});j(this,Oi,()=>{const e={type:"TH2",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,n,s,a,l,u,f,c,p;const C="";let y=0;console.log(o(this,L).fXaxis);const T=o(this,le)+o(this,ye)>o(this,L).fXaxis.fNbins?o(this,L).fXaxis.fNbins:o(this,le)+o(this,ye),k=o(this,ge)+o(this,ye)>o(this,L).fYaxis.fNbins?o(this,L).fYaxis.fNbins:o(this,ge)+o(this,ye),d=o(this,L).fXaxis.fTitle!==""?o(this,L).fXaxis.fTitle:"x",w=o(this,L).fYaxis.fTitle!==""?o(this,L).fYaxis.fTitle:"y",E=o(this,L).fXaxis.fLabels?o(this,L).fXaxis.fLabels.arr:[],D=o(this,L).fYaxis.fLabels?o(this,L).fYaxis.fLabels.arr:[],O=[];for(let I=o(this,ge);I<=k;I++)for(let P=o(this,le);P<=T;P++){r=o(this,L).fXaxis.GetBinCenter(P),n=o(this,L).fXaxis.GetBinLowEdge(P),s=r+(r-n),a=s-n,l=o(this,L).fYaxis.GetBinCenter(I),u=o(this,L).fYaxis.GetBinLowEdge(I),f=l+(l-u),c=f-u;const F=o(this,Bt).call(this,o(this,L).getBinContent(P,I));if(F<=o(this,_t))continue;p=o(this,tt)?o(this,Ut).call(this,o(this,tt).call(this,{histogram:o(this,L),histogramId:o(this,Te),x:P,y:I})):F,t=p*o(this,ye)*o(this,it)/16;let ae=o(this,et)?o(this,et).call(this,{histogram:o(this,L),histogramId:o(this,Te),x:P,y:I,content:p}):null;ae=ae||o(this,W).getBinColor(p);const G=o(this,Te)+n+"th2"+s+"th2"+u+"th2"+f;let Y;o(this,Yt).call(this,G)?Y=o(this,W).getSecondaryAccentColor():Y=ae,console.log(y,P,n,s,r);const X=`id: ${G};
|
|
239
245
|
histogramName: ${o(this,Te)};
|
|
240
246
|
typeName: 'TH2';
|
|
241
247
|
content: ${p};
|
|
242
|
-
color: ${
|
|
243
|
-
yTitle: ${
|
|
248
|
+
color: ${ae};
|
|
249
|
+
yTitle: ${w};
|
|
244
250
|
xTitle: ${d};
|
|
245
251
|
zTitle: 'none';
|
|
246
252
|
absoluteContent: ${F};
|
|
247
|
-
binName: ${
|
|
253
|
+
binName: ${C};
|
|
248
254
|
xMin: ${n};
|
|
249
255
|
yMin: ${u};
|
|
250
256
|
zMin: ${0};
|
|
@@ -260,55 +266,55 @@ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})
|
|
|
260
266
|
xWidth: ${a};
|
|
261
267
|
yWidth: ${c};
|
|
262
268
|
zWidth: ${0};
|
|
263
|
-
markedColor: ${
|
|
264
|
-
selectColor: ${o(this,
|
|
265
|
-
axisX: ${o(this,
|
|
266
|
-
axisY: ${o(this,
|
|
267
|
-
axisZ: ${o(this,
|
|
269
|
+
markedColor: ${Y};
|
|
270
|
+
selectColor: ${o(this,W).getSecondaryAccentColor()};
|
|
271
|
+
axisX: ${o(this,W).getAxisColor("x")};
|
|
272
|
+
axisY: ${o(this,W).getAxisColor("y")};
|
|
273
|
+
axisZ: ${o(this,W).getAxisColor("z")}`,Q=a/o(this,lt)/o(this,It),U=c/o(this,bt)/o(this,It),V=-(P-1),he=I-1;e.bins[y]={id:G,color:ae,binData:X,content:F,animation:{fromWidth:Q,fromHeight:o(this,St).call(this,G),fromDepth:U,toWidth:Q,toHeight:p*o(this,ye)*o(this,it)/8,toDepth:U},animation2:{fromX:V,fromY:t,fromZ:he,toX:V,toY:t,toZ:he},animation3:{fromColor:o(this,Xt).call(this,G),toColor:Y}},O[y]={key:G,scale:p,color:Y},y++}B(this,xt,O);const g=[],Z=[];return y=o(this,Nt).call(this,e,g,Z,k,T,D,w,0),y=o(this,Lt).call(this,e,g,Z,T,k,E,d,y),y=o(this,jt).call(this,e,g,Z,T,k,void 0,void 0,void 0,y),Hi(this,Vt,Ii).call(this,e,g,Z,T,k,y),e.labels=[...g,...Z],e});j(this,Di,()=>{const e={type:"TH1",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,n,s,a,l;const u="";let f=0;const c=o(this,le)+o(this,ye)>o(this,L).fXaxis.fNbins?o(this,L).fXaxis.fNbins:o(this,le)+o(this,ye),p=1,C=o(this,L).fXaxis.fTitle!==""?o(this,L).fXaxis.fTitle:"x",y=o(this,L).fXaxis.fLabels?o(this,L).fXaxis.fLabels.arr:[],T=[];for(let w=o(this,le);w<=c;w++){r=o(this,L).fXaxis.GetBinCenter(w),n=o(this,L).fXaxis.GetBinLowEdge(w),s=r+(r-n),a=s-n;const E=o(this,Bt).call(this,o(this,L).getBinContent(w));if(E<=o(this,_t))continue;l=o(this,tt)?o(this,Ut).call(this,o(this,tt).call(this,{histogram:o(this,L),histogramId:o(this,Te),x:w})):E,t=l*o(this,ye)*o(this,it)/16;let D=o(this,et)?o(this,et).call(this,{histogram:o(this,L),histogramId:o(this,Te),x:w,content:l}):null;D=D||o(this,W).getBinColor(l);const O=o(this,Te)+n+"th1"+s;let g;o(this,Yt).call(this,O)?g=o(this,W).getSecondaryAccentColor():g=D,console.log(w,n,s,r);const Z=`id: ${O};
|
|
268
274
|
histogramName: ${o(this,Te)};
|
|
269
275
|
typeName: 'TH1';
|
|
270
276
|
content: ${l};
|
|
271
|
-
xTitle: ${
|
|
277
|
+
xTitle: ${C};
|
|
272
278
|
zTitle: 'none';
|
|
273
|
-
absoluteContent: ${
|
|
279
|
+
absoluteContent: ${E};
|
|
274
280
|
binName: ${u};
|
|
275
281
|
xMin: ${n};
|
|
276
282
|
zMin: ${0};
|
|
277
283
|
xMax: ${s};
|
|
278
284
|
zMax: ${0};
|
|
279
|
-
xPos: ${
|
|
285
|
+
xPos: ${w};
|
|
280
286
|
zPos: ${0};
|
|
281
287
|
xCenter: ${r};
|
|
282
288
|
yCenter: ${0};
|
|
283
289
|
xWidth: ${a};
|
|
284
290
|
zWidth: ${0};
|
|
285
291
|
markedColor: ${g};
|
|
286
|
-
selectColor: ${o(this,
|
|
287
|
-
axisX: ${o(this,
|
|
288
|
-
axisY: ${o(this,
|
|
289
|
-
axisZ: ${o(this,U).getAxisColor("z")}`,I=a/o(this,lt)/o(this,It),P=E-1,F=0;e.bins[f]={id:O,color:D,binData:Z,content:w,animation:{fromWidth:I,fromHeight:o(this,St).call(this,O),fromDepth:I,toWidth:I,toHeight:l*o(this,ye)*o(this,it)/8,toDepth:I},animation2:{fromX:P+o(this,K).xOffset,fromY:t,fromZ:F,toX:P,toY:t,toZ:F},animation3:{fromColor:o(this,Xt).call(this,O),toColor:g}},T[f]={key:O,scale:l,color:g},f++}Y(this,xt,T);const C=[],d=[];return f=o(this,Nt).call(this,e,C,d,p,c,void 0,void 0,0),f=o(this,Lt).call(this,e,C,d,c,p,b,S,f),f=o(this,jt).call(this,e,C,d,c,p,void 0,void 0,void 0,f),$i(this,Vt,Mi).call(this,e,C,d,c,p,f),e.labels=[...C,...d],e});j(this,Yt,e=>e<=0?0:(o(this,vt)>1&&(e=Math.round((e/o(this,vt)+Number.EPSILON)*100)/100),e));j(this,Ft,(e,t,r,n,s)=>{if(Y(this,K,{xOffset:0,yOffset:0,zOffset:0}),r){if(s?(t[n]+=1,o(this,K)[n]=-1):(t[n]+=t.range,o(this,K)[n]=-t.range),e[n]<=t.range)return t[n]=1,o(this,K)[n]=0,t;if(t[n]>e[n]-t.range)return t[n]=e[n]-t.range,o(this,K)[n]=0,t}else if(s?(t[n]-=1,o(this,K)[n]=1):(t[n]-=t.range,o(this,K)[n]=t.range),t[n]<1)return t[n]=1,o(this,K)[n]=0,t;return t});j(this,jt,(e,t,r,n,s,a,l,u,f)=>(t[f]=o(this,Ge).call(this,9e4+f,n+.5,o(this,N)-1,s+.5,270,360,0,2,2,`${l?l[o(this,N)-1]?l[o(this,N)-1].fString:Math.round((o(this,Ne).zInitial+o(this,N)-1+Number.EPSILON)*100)/100:"0"}`,o(this,U).getAxisColor("y"),o(this,U).getSecondaryFontColor()),r[f]=o(this,Ge).call(this,91e3+f,n+.5,o(this,N)-1,o(this,fe)-2.5,270,90,0,2,2,`${l?l[o(this,N)-1]?l[o(this,N)-1].fString:Math.round((o(this,Ne).zInitial+o(this,N)-1+Number.EPSILON)*100)/100:"0"}`,o(this,U).getAxisColor("y"),o(this,U).getSecondaryFontColor()),f++,t[f]=o(this,Ge).call(this,92e3+f,o(this,ae)-2.5,o(this,N)-1,s+.5,270,270,0,2,2,`${l?l[o(this,N)-1]?l[o(this,N)-1].fString:Math.round((o(this,Ne).zInitial+o(this,N)-1+Number.EPSILON)*100)/100:"0"}`,o(this,U).getAxisColor("y"),o(this,U).getSecondaryFontColor()),r[f]=o(this,Ge).call(this,93e3+f,o(this,ae)-2.5,o(this,N)-1,o(this,fe)-2.5,270,180,0,2,2,`${l?l[o(this,N)-1]?l[o(this,N)-1].fString:Math.round((o(this,Ne).zInitial+o(this,N)-1+Number.EPSILON)*100)/100:"0"}`,o(this,U).getAxisColor("y"),o(this,U).getSecondaryFontColor()),f++,u&&(e.axisLabels[4]={id:"upLabel1",key:95004+o(this,Te),text:{value:u,color:o(this,U).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:o(this,ae)-1.5+o(this,K).xOffset,fromY:a-1+o(this,K).zOffset,fromZ:o(this,fe)-2+o(this,K).yOffset,toX:o(this,ae)-1.5,toY:a-1,toZ:o(this,fe)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+o(this,Te),text:{value:u,color:o(this,U).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:n-.5+o(this,K).xOffset,fromY:a-1+o(this,K).zOffset,fromZ:s+o(this,K).yOffset,toX:n-.5,toY:a-1,toZ:s}},e.axisLabels[6]={id:"upLabel3",key:105006+o(this,Te),text:{value:u,color:o(this,U).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:o(this,ae)-2+o(this,K).xOffset,fromY:a-1+o(this,K).zOffset,fromZ:s-.5+o(this,K).yOffset,toX:o(this,ae)-2,toY:a-1,toZ:s-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+o(this,Te),text:{value:u,color:o(this,U).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:n-.5+o(this,K).xOffset,fromY:a-1+o(this,K).zOffset,fromZ:o(this,fe)-1.5+o(this,K).yOffset,toX:n-.5,toY:a-1,toZ:o(this,fe)-1.5}}),f));j(this,Nt,(e,t,r,n,s,a,l,u)=>{for(let f=o(this,fe);f<=n;f++)t[u]=o(this,Ge).call(this,1500+u,o(this,ae)-2.5,o(this,N)?o(this,N)-1:0,f-1,270,180,0,2,1,`${a?a[f-1]?a[f-1].fString:Math.round((o(this,Ne).yInitial+(f-1)*o(this,bt)+Number.EPSILON)*100)/100:""}`,o(this,U).getAxisColor("z"),o(this,U).getSecondaryFontColor()),r[u]=o(this,Ge).call(this,3e3+u,s+.5,o(this,N)?o(this,N)-1:0,f-1,270,360,0,2,1,`${a?a[f-1]?a[f-1].fString:Math.round((o(this,Ne).yInitial+(f-1)*o(this,bt)+Number.EPSILON)*100)/100:""}`,o(this,U).getAxisColor("z"),o(this,U).getSecondaryFontColor()),u++;return e.axisLabels[0]={id:"leftLabel",key:4500+o(this,Te),text:{value:l||"",color:o(this,U).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:o(this,ae)-4+o(this,K).xOffset,fromY:(o(this,N)?o(this,N)-1:0)+o(this,K).zOffset,fromZ:o(this,fe)+.5+o(this,K).yOffset,toX:o(this,ae)-4,toY:o(this,N)?o(this,N)-1:0,toZ:o(this,fe)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+o(this,Te),text:{value:l||"",color:o(this,U).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:s+2+o(this,K).xOffset,fromY:(o(this,N)?o(this,N)-1:0)+o(this,K).zOffset,fromZ:n-2.5+o(this,K).yOffset,toX:s+2,toY:o(this,N)?o(this,N)-1:0,toZ:n-2.5}},u});j(this,Lt,(e,t,r,n,s,a,l,u)=>{for(let f=o(this,ae);f<=n;f++)t[u]=o(this,Ge).call(this,7500+u,f-1,o(this,N)?o(this,N)-1:0,o(this,fe)-2.5,270,270,0,2,1,`${a[f-1]?a[f-1].fString:Math.round((o(this,Ne).xInitial+(f-1)*o(this,lt)+Number.EPSILON)*100)/100}`,o(this,U).getAxisColor("x"),o(this,U).getSecondaryFontColor()),r[u]=o(this,Ge).call(this,9e3+u,f-1,o(this,N)?o(this,N)-1:0,s+.5,270,90,0,2,1,`${a[f-1]?a[f-1].fString:Math.round((o(this,Ne).xInitial+(f-1)*o(this,lt)+Number.EPSILON)*100)/100}`,o(this,U).getAxisColor("x"),o(this,U).getSecondaryFontColor()),u++;return e.axisLabels[2]={id:"downLabel",key:10502+o(this,Te),text:{value:l,color:o(this,U).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:o(this,ae)+o(this,K).xOffset,fromY:(o(this,N)?o(this,N)-1:0)+o(this,K).zOffset,fromZ:o(this,fe)-4+o(this,K).yOffset,toX:o(this,ae),toY:o(this,N)?o(this,N)-1:0,toZ:o(this,fe)-4}},e.axisLabels[3]={id:"upLabel",key:12003+o(this,Te),text:{value:l,color:o(this,U).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:n-2.5+o(this,K).xOffset,fromY:(o(this,N)?o(this,N)-1:0)+o(this,K).zOffset,fromZ:s+2+o(this,K).yOffset,toX:n-2.5,toY:o(this,N)?o(this,N)-1:0,toZ:s+2}},u});j(this,Oi,(e,t,r)=>{const n={xOffset:o(this,je),yOffset:o(this,Ve),zOffset:o(this,Qe)},s={name:"TH3",xOffset:o(this,ae),yOffset:o(this,fe),zOffset:o(this,N),range:o(this,ye)},a=o(this,Ft).call(this,n,s,t,e,r);return Y(this,ae,a.xOffset),Y(this,fe,a.yOffset),Y(this,N,a.zOffset),a});j(this,Di,(e,t,r)=>{const n={xOffset:o(this,je),yOffset:o(this,Ve)},s={name:"TH2",xOffset:o(this,ae),yOffset:o(this,fe),range:o(this,ye)},a=o(this,Ft).call(this,n,s,t,e,r);return Y(this,ae,a.xOffset),Y(this,fe,a.yOffset),a});j(this,Ri,(e,t,r)=>{const n={xOffset:o(this,je)},s={name:"TH1",xOffset:o(this,ae),range:o(this,ye)},a=o(this,Ft).call(this,n,s,t,e,r);return Y(this,ae,a.xOffset),a});j(this,St,e=>{const t=o(this,xt).filter(r=>r.key===e);return t[0]&&t[0].scale?t[0].scale:0});j(this,Xt,e=>{const t=o(this,xt).filter(r=>r.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});j(this,Wt,e=>e>o(this,vt)?o(this,vt):e<0?0:e);this.initializeFactory(e,t,r,n,s,a,l,u)}initializeFactory(e,t,r,n,s,a,l,u){this.setUniqueName(e),this.setTheme(s),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(r),this.setRange(n),this.setSelectedBin(a),this.setViewFunction(l),this.setProgressFunction(u)}setUniqueName(e){Y(this,Te,e)}updateContentScale(e){o(this,it)+e>=0&&Y(this,it,o(this,it)+e)}updateMinDisplayedContent(e){e>=0&&Y(this,_t,e)}setHistogramContentMaximum(e){Y(this,vt,e>0?e:1)}setSelectedBin(e){Y(this,ci,e||[])}setViewFunction(e){Y(this,et,e)}setProgressFunction(e){Y(this,tt,e)}setSection(e){e&&(e.xOffset&&Y(this,ae,o(this,ct).call(this,e==null?void 0:e.xOffset,o(this,je))),e.yOffset&&!histogram._typename.includes("TH1")&&Y(this,fe,o(this,ct).call(this,e==null?void 0:e.yOffset,o(this,Ve))),e.zOffset&&histogram._typename.includes("TH3")&&Y(this,N,o(this,ct).call(this,e==null?void 0:e.zOffset,o(this,Qe))))}setHistogram(e){var t,r,n,s,a,l,u,f,c,p,S,b,T,C,d,E;Y(this,L,e),Y(this,Je,e==null?void 0:e._typename),Y(this,ae,1),Y(this,fe,1),Y(this,N,1),Y(this,je,0),Y(this,Ve,0),Y(this,Qe,0),Y(this,lt,1),Y(this,bt,1),Y(this,ui,1),Y(this,je,(t=e==null?void 0:e.fXaxis)==null?void 0:t.fNbins),Y(this,lt,(((r=e==null?void 0:e.fXaxis)==null?void 0:r.fXmax)-((n=e==null?void 0:e.fXaxis)==null?void 0:n.fXmin))/((s=e==null?void 0:e.fXaxis)==null?void 0:s.fNbins)),o(this,Ne).xInitial=(a=e==null?void 0:e.fXaxis)==null?void 0:a.fXmin,Y(this,ae,o(this,ct).call(this,o(this,ae),o(this,je))),(l=e==null?void 0:e._typename)!=null&&l.includes("TH1")||(Y(this,Ve,(u=e==null?void 0:e.fYaxis)==null?void 0:u.fNbins),Y(this,bt,(((f=e==null?void 0:e.fYaxis)==null?void 0:f.fXmax)-((c=e==null?void 0:e.fYaxis)==null?void 0:c.fXmin))/((p=e==null?void 0:e.fYaxis)==null?void 0:p.fNbins)),o(this,Ne).yInitial=(S=e==null?void 0:e.fYaxis)==null?void 0:S.fXmin,Y(this,fe,o(this,ct).call(this,o(this,fe),o(this,Ve)))),(b=e==null?void 0:e._typename)!=null&&b.includes("TH3")&&(Y(this,Qe,(T=e==null?void 0:e.fZaxis)==null?void 0:T.fNbins),Y(this,ui,((C=e==null?void 0:e.fZaxis)==null?void 0:C.fXmax)/((d=e==null?void 0:e.fZaxis)==null?void 0:d.fNbins)),o(this,Ne).zInitial=(E=e==null?void 0:e.fZaxis)==null?void 0:E.fXmin,Y(this,N,o(this,ct).call(this,o(this,N),o(this,Qe)))),this.setHistogramContentMaximum(e==null?void 0:e.fMaximum)}setRange(e){e&&(e<4&&Y(this,ye,4),Y(this,ye,e))}setTheme(e){Y(this,U,new en(e))}getElements(){let e={};return o(this,Je).includes("TH2")?e=o(this,Pi).call(this):o(this,Je).includes("TH3")?e=o(this,Ai).call(this):o(this,Je).includes("TH1")&&(e=o(this,_i).call(this)),e}updateSection(e,t,r){if(o(this,Je).includes("TH3"))return o(this,Oi).call(this,e,t,r);if(o(this,Je).includes("TH2"))return o(this,Di).call(this,e,t,r);if(o(this,Je).includes("TH1"))return o(this,Ri).call(this,e,t,r)}}Te=new WeakMap,ci=new WeakMap,L=new WeakMap,Je=new WeakMap,U=new WeakMap,ae=new WeakMap,fe=new WeakMap,N=new WeakMap,je=new WeakMap,Ve=new WeakMap,Qe=new WeakMap,lt=new WeakMap,bt=new WeakMap,ui=new WeakMap,ye=new WeakMap,Ne=new WeakMap,et=new WeakMap,tt=new WeakMap,vt=new WeakMap,it=new WeakMap,_t=new WeakMap,It=new WeakMap,K=new WeakMap,xt=new WeakMap,ct=new WeakMap,Bt=new WeakMap,Ge=new WeakMap,Ai=new WeakMap,Pi=new WeakMap,_i=new WeakMap,Yt=new WeakMap,Ft=new WeakMap,jt=new WeakMap,Nt=new WeakMap,Lt=new WeakMap,Vt=new WeakSet,Mi=function(e,t,r,n,s,a,l,u){u++,e.titles[0]={key:195e3+o(this,Te),text:{value:o(this,L).fTitle,color:o(this,U).getPrimaryFontColor()},rotation:{x:0,y:123,z:0},position:{x:o(this,ae)-90,y:16.5,z:o(this,fe)+90},innerText:{value:"Press V to show projections or controls",color:o(this,U).getPrimaryFontColor()}},u++;const f=o(this,ye)>o(this,je)?o(this,je)+1:o(this,ye),c=o(this,ye)>o(this,Ve)?o(this,Ve)+1:o(this,ye);e.ground={key:22500+u+o(this,Te),scale:{width:f+8,height:.2,depth:c+8},animation:{fromX:o(this,ae)+f*.5-1+o(this,K).xOffset,fromY:-.5,fromZ:o(this,fe)+c*.5-.5+o(this,K).yOffset,toX:o(this,ae)+f*.5-1,toY:-.5,toZ:o(this,fe)+c*.5-.5}},u++,e.banners[1]={key:24e4+u+o(this,Te),geometry:{width:.1,height:15,depth:22},position:{x:n+8,y:(o(this,N)?o(this,N)+7:7)+o(this,K).zOffset,z:o(this,fe)+o(this,ye)/2+2.5},material:{color:"#ffffff",transparent:!0}}},Oi=new WeakMap,Di=new WeakMap,Ri=new WeakMap,St=new WeakMap,Xt=new WeakMap,Wt=new WeakMap;const qo=()=>{let i;const{selectedView:e,onViewChange:t,onProgress:r,section:n,range:s,theme:a,selectedBins:l}=x.useContext(Rt).states,{id:u,histogram:f,projPanelIds:c}=x.useContext(Rt).data,[p]=x.useState(new Ko(u,f,n||null,s,a||"def",l,t,r)),[S,b]=x.useState(p.getElements()),[T]=x.useState(1),C=d=>{f._typename.includes(d.name)&&(d.axis?(p.updateSection(d.axis,d.increment,d.defaultRange),b(p.getElements())):d.scale?(p.updateContentScale(d.scale),b(p.getElements())):d.minValue&&(p.updateMinDisplayedContent(d.minValue),b(p.getElements())))};return x.useEffect(()=>{p.setUniqueName(u),b(p.getElements())},[u]),x.useEffect(()=>{p.setHistogram(f),b(p.getElements())},[f]),x.useEffect(()=>{p.setSection(n),b(p.getElements())},[n]),x.useEffect(()=>{p.setRange(s),b(p.getElements())},[s]),x.useEffect(()=>{p.setTheme(a),b(p.getElements())},[a]),x.useEffect(()=>{p.setSelectedBin(l),b(p.getElements())},[l]),x.useEffect(()=>{p.setViewFunction(t),b(p.getElements())},[t]),x.useEffect(()=>{p.setViewFunction(t),b(p.getElements())},[e]),x.useEffect(()=>{p.setProgressFunction(r),b(p.getElements())},[r]),x.useEffect(()=>{if(f._typename.includes("TH2")?i=_e.getChangedSection().subscribe(C):f._typename.includes("TH3")?i=Re.getChangedSection().subscribe(C):f._typename.includes("TH1")&&(i=Ke.getChangedSection().subscribe(C)),i)return()=>i.unsubscribe()},[S]),S!=null&&S.bins?se("a-entity",{"histogram-control":!0,children:[S.bins.map(d=>v("a-box",{id:d.id,class:"clickable",material:`color: ${d.color}; transparent: true`,binth:d.binData,mouseevent:!0,geometry:`width:${d.animation.toWidth}; height:${d.animation.toHeight}; depth:${d.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${d.animation2.fromX} ${d.animation2.fromY} ${d.animation2.fromZ}; to: ${d.animation2.toX} ${d.animation2.toY} ${d.animation2.toZ}; dur: 800;`,animation__3:`property: material.color; from: ${d.animation3.fromColor}; to: ${d.animation3.toColor}; dur: 200;`,children:v("a-text",{value:d.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${d.color}; opacity: 0.50; transparent: true`,rotation:"270 180 0","wrap-count":"50",position:`0 ${.001+(T===1?-1:1)*d.animation.toHeight/2} 0`})},d.id)),S.labels.map(d=>v("a-entity",{geometry:`primitive: ${d.geometry.primitive}; width:${d.geometry.width}; height:${d.geometry.height};`,text:`color: ${d.text.color}; width: ${d.text.width}; height: ${d.text.height}; align:center;`,"label-handler":`value: ${d.labelHandler.value}; delay:${d.labelHandler.delay}`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,material:`color: ${d.material.color}; transparent: true`,animation:"property: text.width; from: 0; to: 4; dur: 1000;",animation__1:"property: material.opacity; from: 0; to: 0.8; dur: 1500;",animation__2:`property: position; from: ${d.animation.fromX} ${d.animation.fromY} ${d.animation.fromZ}; to: ${d.animation.toX} ${d.animation.toY} ${d.animation.toZ}; dur: 1005;`},d.key)),S.titles.map(d=>se("a-entity",{text:`value: ${d.text.value}; color: ${d.text.color}; width: 230; height:auto; align:center;`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,position:`${d.position.x} ${d.position.y} ${d.position.z}`,material:"transparent: true",children:[v("a-text",{value:d.innerText.value,position:"0 10 0",width:"150",height:"auto",align:"center",color:d.innerText.color}),v("a-entity",{geometry:"primitive: plane; width:170; height:30;",position:"0 0 -1",material:"opacity: 0.9; color: white; transparent: true"})]},d.key)),S.axisLabels.map(d=>v("a-entity",{id:d.id,text:`value: ${d.text.value}; color: ${d.text.color}; width: 10; height:auto; align:center;`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,animation:`property: position; from: ${d.animation.fromX} ${d.animation.fromY} ${d.animation.fromZ}; to: ${d.animation.toX} ${d.animation.toY} ${d.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},d.key)),S.ground&&v("a-box",{width:S.ground.scale.width,material:"color: #fafafa",height:S.ground.scale.height,depth:S.ground.scale.depth,animation:`property: position; from: ${S.ground.animation.fromX} ${S.ground.animation.fromY} ${S.ground.animation.fromZ};
|
|
292
|
+
selectColor: ${o(this,W).getSecondaryAccentColor()};
|
|
293
|
+
axisX: ${o(this,W).getAxisColor("x")};
|
|
294
|
+
axisY: ${o(this,W).getAxisColor("y")};
|
|
295
|
+
axisZ: ${o(this,W).getAxisColor("z")}`,I=a/o(this,lt)/o(this,It),P=-(w-1),F=0;e.bins[f]={id:O,color:D,binData:Z,content:E,animation:{fromWidth:I,fromHeight:o(this,St).call(this,O),fromDepth:I,toWidth:I,toHeight:l*o(this,ye)*o(this,it)/8,toDepth:I},animation2:{fromX:P+o(this,re).xOffset,fromY:t,fromZ:F,toX:P,toY:t,toZ:F},animation3:{fromColor:o(this,Xt).call(this,O),toColor:g}},T[f]={key:O,scale:l,color:g},f++}B(this,xt,T);const k=[],d=[];return f=o(this,Nt).call(this,e,k,d,p,c,void 0,void 0,0),f=o(this,Lt).call(this,e,k,d,c,p,y,C,f),f=o(this,jt).call(this,e,k,d,c,p,void 0,void 0,void 0,f),Hi(this,Vt,Ii).call(this,e,k,d,c,p,f),e.labels=[...k,...d],e});j(this,Bt,e=>e<=0?0:(o(this,vt)>1&&(e=Math.round((e/o(this,vt)+Number.EPSILON)*100)/100),e));j(this,Ft,(e,t,r,n,s)=>{if(B(this,re,{xOffset:0,yOffset:0,zOffset:0}),r){if(s?(t[n]+=1,o(this,re)[n]=-1):(t[n]+=t.range,o(this,re)[n]=-t.range),e[n]<=t.range)return t[n]=1,o(this,re)[n]=0,t;if(t[n]>e[n]-t.range)return t[n]=e[n]-t.range,o(this,re)[n]=0,t}else if(s?(t[n]-=1,o(this,re)[n]=1):(t[n]-=t.range,o(this,re)[n]=t.range),t[n]<1)return t[n]=1,o(this,re)[n]=0,t;return t});j(this,jt,(e,t,r,n,s,a,l,u,f)=>(t[f]=o(this,Ge).call(this,9e4+f,"z",-(n+.5),o(this,N)-1,s+.5,270,360,0,2,2,`${l?l[o(this,N)-1]?l[o(this,N)-1].fString:Math.round((o(this,Ne).zInitial+o(this,N)-1+Number.EPSILON)*100)/100:"0"}`,o(this,W).getAxisColor("y"),o(this,W).getSecondaryFontColor()),r[f]=o(this,Ge).call(this,91e3+f,"z",-(n+.5),o(this,N)-1,o(this,ge)-2.5,270,180,0,2,2,`${l?l[o(this,N)-1]?l[o(this,N)-1].fString:Math.round((o(this,Ne).zInitial+o(this,N)-1+Number.EPSILON)*100)/100:"0"}`,o(this,W).getAxisColor("y"),o(this,W).getSecondaryFontColor()),f++,t[f]=o(this,Ge).call(this,92e3+f,"z",-(o(this,le)-2.5),o(this,N)-1,s+.5,270,180,0,2,2,`${l?l[o(this,N)-1]?l[o(this,N)-1].fString:Math.round((o(this,Ne).zInitial+o(this,N)-1+Number.EPSILON)*100)/100:"0"}`,o(this,W).getAxisColor("y"),o(this,W).getSecondaryFontColor()),r[f]=o(this,Ge).call(this,93e3+f,"z",-(o(this,le)-2.5),o(this,N)-1,o(this,ge)-2.5,270,180,0,2,2,`${l?l[o(this,N)-1]?l[o(this,N)-1].fString:Math.round((o(this,Ne).zInitial+o(this,N)-1+Number.EPSILON)*100)/100:"0"}`,o(this,W).getAxisColor("y"),o(this,W).getSecondaryFontColor()),f++,u&&(e.axisLabels[4]={id:"upLabel1",key:95004+o(this,Te),text:{value:u,color:o(this,W).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:o(this,le)-1.5+o(this,re).xOffset,fromY:a-1+o(this,re).zOffset,fromZ:o(this,ge)-2+o(this,re).yOffset,toX:o(this,le)-1.5,toY:a-1,toZ:o(this,ge)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+o(this,Te),text:{value:u,color:o(this,W).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:n-.5+o(this,re).xOffset,fromY:a-1+o(this,re).zOffset,fromZ:s+o(this,re).yOffset,toX:n-.5,toY:a-1,toZ:s}},e.axisLabels[6]={id:"upLabel3",key:105006+o(this,Te),text:{value:u,color:o(this,W).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:o(this,le)-2+o(this,re).xOffset,fromY:a-1+o(this,re).zOffset,fromZ:s-.5+o(this,re).yOffset,toX:o(this,le)-2,toY:a-1,toZ:s-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+o(this,Te),text:{value:u,color:o(this,W).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:n-.5+o(this,re).xOffset,fromY:a-1+o(this,re).zOffset,fromZ:o(this,ge)-1.5+o(this,re).yOffset,toX:n-.5,toY:a-1,toZ:o(this,ge)-1.5}}),f));j(this,Nt,(e,t,r,n,s,a,l,u)=>{for(let f=o(this,ge);f<=n;f++)t[u]=o(this,Ge).call(this,1500+u,"y",-(o(this,le)-2.5),o(this,N)?o(this,N)-1:0,f-1,270,180,0,2,1,`${a?a[f-1]?a[f-1].fString:Math.round((o(this,Ne).yInitial+(f-1)*o(this,bt)+Number.EPSILON)*100)/100:""}`,o(this,W).getAxisColor("z"),o(this,W).getSecondaryFontColor()),r[u]=o(this,Ge).call(this,3e3+u,"y",-(s+.5),o(this,N)?o(this,N)-1:0,f-1,270,360,0,2,1,`${a?a[f-1]?a[f-1].fString:Math.round((o(this,Ne).yInitial+(f-1)*o(this,bt)+Number.EPSILON)*100)/100:""}`,o(this,W).getAxisColor("z"),o(this,W).getSecondaryFontColor()),u++;return e.axisLabels[0]={id:"leftLabel",key:4500+o(this,Te),text:{value:l||"",color:o(this,W).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:-(o(this,le)-4+o(this,re).xOffset),fromY:(o(this,N)?o(this,N)-1:0)+o(this,re).zOffset,fromZ:o(this,ge)+.5+o(this,re).yOffset,toX:-(o(this,le)-4),toY:o(this,N)?o(this,N)-1:0,toZ:o(this,ge)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+o(this,Te),text:{value:l||"",color:o(this,W).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:-(s+2+o(this,re).xOffset),fromY:(o(this,N)?o(this,N)-1:0)+o(this,re).zOffset,fromZ:n-2.5+o(this,re).yOffset,toX:-(s+2),toY:o(this,N)?o(this,N)-1:0,toZ:n-2.5}},u});j(this,Lt,(e,t,r,n,s,a,l,u)=>{for(let f=o(this,le);f<=n;f++)t[u]=o(this,Ge).call(this,7500+u,"x",-(f-1),o(this,N)?o(this,N)-1:0,o(this,ge)-2.5,270,180,0,1,2,`${a[f-1]?a[f-1].fString:Math.round((o(this,Ne).xInitial+(f-1)*o(this,lt)+Number.EPSILON)*100)/100}`,o(this,W).getAxisColor("x"),o(this,W).getSecondaryFontColor()),r[u]=o(this,Ge).call(this,9e3+u,"x",-(f-1),o(this,N)?o(this,N)-1:0,s+.5,270,180,0,1,2,`${a[f-1]?a[f-1].fString:Math.round((o(this,Ne).xInitial+(f-1)*o(this,lt)+Number.EPSILON)*100)/100}`,o(this,W).getAxisColor("x"),o(this,W).getSecondaryFontColor()),u++;return e.axisLabels[2]={id:"downLabel",key:10502+o(this,Te),text:{value:l,color:o(this,W).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:-(o(this,le)+o(this,re).xOffset),fromY:(o(this,N)?o(this,N)-1:0)+o(this,re).zOffset,fromZ:o(this,ge)-4+o(this,re).yOffset,toX:-o(this,le),toY:o(this,N)?o(this,N)-1:0,toZ:o(this,ge)-4}},e.axisLabels[3]={id:"upLabel",key:12003+o(this,Te),text:{value:l,color:o(this,W).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:-(n-2.5-o(this,re).xOffset),fromY:(o(this,N)?o(this,N)-1:0)+o(this,re).zOffset,fromZ:s+2+o(this,re).yOffset,toX:-(n-2.5),toY:o(this,N)?o(this,N)-1:0,toZ:s+2}},u});j(this,Ri,(e,t,r)=>{const n={xOffset:o(this,je),yOffset:o(this,Ve),zOffset:o(this,Qe)},s={name:"TH3",xOffset:o(this,le),yOffset:o(this,ge),zOffset:o(this,N),range:o(this,ye)},a=o(this,Ft).call(this,n,s,t,e,r);return B(this,le,a.xOffset),B(this,ge,a.yOffset),B(this,N,a.zOffset),a});j(this,zi,(e,t,r)=>{const n={xOffset:o(this,je),yOffset:o(this,Ve)},s={name:"TH2",xOffset:o(this,le),yOffset:o(this,ge),range:o(this,ye)},a=o(this,Ft).call(this,n,s,t,e,r);return B(this,le,a.xOffset),B(this,ge,a.yOffset),a});j(this,$i,(e,t,r)=>{const n={xOffset:o(this,je)},s={name:"TH1",xOffset:o(this,le),range:o(this,ye)},a=o(this,Ft).call(this,n,s,t,e,r);return B(this,le,a.xOffset),a});j(this,St,e=>{const t=o(this,xt).filter(r=>r.key===e);return t[0]&&t[0].scale?t[0].scale:0});j(this,Xt,e=>{const t=o(this,xt).filter(r=>r.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});j(this,Ut,e=>e>o(this,vt)?o(this,vt):e<0?0:e);this.initializeFactory(e,t,r,n,s,a,l,u)}initializeFactory(e,t,r,n,s,a,l,u){this.setUniqueName(e),this.setTheme(s),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(r),this.setRange(n),this.setSelectedBin(a),this.setViewFunction(l),this.setProgressFunction(u)}setUniqueName(e){B(this,Te,e)}updateContentScale(e){o(this,it)+e>=0&&B(this,it,o(this,it)+e)}updateMinDisplayedContent(e){e>=0&&B(this,_t,e)}setHistogramContentMaximum(e){B(this,vt,e>0?e:1)}setSelectedBin(e){B(this,ci,e||[])}setViewFunction(e){B(this,et,e)}setProgressFunction(e){B(this,tt,e)}setSection(e){e&&(e.xOffset&&B(this,le,o(this,ct).call(this,e==null?void 0:e.xOffset,o(this,je))),e.yOffset&&!histogram._typename.includes("TH1")&&B(this,ge,o(this,ct).call(this,e==null?void 0:e.yOffset,o(this,Ve))),e.zOffset&&histogram._typename.includes("TH3")&&B(this,N,o(this,ct).call(this,e==null?void 0:e.zOffset,o(this,Qe))))}setHistogram(e){var t,r,n,s,a,l,u,f,c,p,C,y,T,k,d,w;B(this,L,e),B(this,Je,e==null?void 0:e._typename),B(this,le,1),B(this,ge,1),B(this,N,1),B(this,je,0),B(this,Ve,0),B(this,Qe,0),B(this,lt,1),B(this,bt,1),B(this,ui,1),B(this,je,(t=e==null?void 0:e.fXaxis)==null?void 0:t.fNbins),B(this,lt,(((r=e==null?void 0:e.fXaxis)==null?void 0:r.fXmax)-((n=e==null?void 0:e.fXaxis)==null?void 0:n.fXmin))/((s=e==null?void 0:e.fXaxis)==null?void 0:s.fNbins)),o(this,Ne).xInitial=(a=e==null?void 0:e.fXaxis)==null?void 0:a.fXmin,B(this,le,o(this,ct).call(this,o(this,le),o(this,je))),(l=e==null?void 0:e._typename)!=null&&l.includes("TH1")||(B(this,Ve,(u=e==null?void 0:e.fYaxis)==null?void 0:u.fNbins),B(this,bt,(((f=e==null?void 0:e.fYaxis)==null?void 0:f.fXmax)-((c=e==null?void 0:e.fYaxis)==null?void 0:c.fXmin))/((p=e==null?void 0:e.fYaxis)==null?void 0:p.fNbins)),o(this,Ne).yInitial=(C=e==null?void 0:e.fYaxis)==null?void 0:C.fXmin,B(this,ge,o(this,ct).call(this,o(this,ge),o(this,Ve)))),(y=e==null?void 0:e._typename)!=null&&y.includes("TH3")&&(B(this,Qe,(T=e==null?void 0:e.fZaxis)==null?void 0:T.fNbins),B(this,ui,((k=e==null?void 0:e.fZaxis)==null?void 0:k.fXmax)/((d=e==null?void 0:e.fZaxis)==null?void 0:d.fNbins)),o(this,Ne).zInitial=(w=e==null?void 0:e.fZaxis)==null?void 0:w.fXmin,B(this,N,o(this,ct).call(this,o(this,N),o(this,Qe)))),this.setHistogramContentMaximum(e==null?void 0:e.fMaximum)}setRange(e){e&&(e<4&&B(this,ye,4),B(this,ye,e))}setTheme(e){B(this,W,new en(e))}getElements(){let e={};return o(this,Je).includes("TH2")?e=o(this,Oi).call(this):o(this,Je).includes("TH3")?e=o(this,_i).call(this):o(this,Je).includes("TH1")&&(e=o(this,Di).call(this)),e}updateSection(e,t,r){if(o(this,Je).includes("TH3"))return o(this,Ri).call(this,e,t,r);if(o(this,Je).includes("TH2"))return o(this,zi).call(this,e,t,r);if(o(this,Je).includes("TH1"))return o(this,$i).call(this,e,t,r)}}Te=new WeakMap,ci=new WeakMap,L=new WeakMap,Je=new WeakMap,W=new WeakMap,le=new WeakMap,ge=new WeakMap,N=new WeakMap,je=new WeakMap,Ve=new WeakMap,Qe=new WeakMap,lt=new WeakMap,bt=new WeakMap,ui=new WeakMap,ye=new WeakMap,Ne=new WeakMap,et=new WeakMap,tt=new WeakMap,vt=new WeakMap,it=new WeakMap,_t=new WeakMap,It=new WeakMap,re=new WeakMap,xt=new WeakMap,ct=new WeakMap,Yt=new WeakMap,Ge=new WeakMap,_i=new WeakMap,Oi=new WeakMap,Di=new WeakMap,Bt=new WeakMap,Ft=new WeakMap,jt=new WeakMap,Nt=new WeakMap,Lt=new WeakMap,Vt=new WeakSet,Ii=function(e,t,r,n,s,a,l,u){u++;const f=135,c=-(n+5.5),p=(o(this,N)?o(this,N)+7:7)+o(this,re).zOffset,C=o(this,ge)+o(this,ye)/2+10;e.titles[0]={key:195e3+o(this,Te),text:{value:o(this,L).fTitle,color:o(this,W).getPrimaryFontColor()},rotation:{x:0,y:f,z:0},position:{x:c,y:p+9,z:C},innerText:{value:"Press V to show projections or controls",color:o(this,W).getPrimaryFontColor()}},u++;const y=o(this,ye)>o(this,je)?o(this,je)+1:o(this,ye),T=o(this,ye)>o(this,Ve)?o(this,Ve)+1:o(this,ye);e.ground={key:22500+u+o(this,Te),scale:{width:y+8,height:.2,depth:T+8},animation:{fromX:o(this,le)+y*.5-1+o(this,re).xOffset,fromY:-.5,fromZ:o(this,ge)+T*.5-.5+o(this,re).yOffset,toX:o(this,le)+y*.5-1,toY:-.5,toZ:o(this,ge)+T*.5-.5}},u++,e.banners[1]={key:24e4+u+o(this,Te),geometry:{width:.1,height:15,depth:22},position:{x:c,y:p,z:C},rotation:{x:0,y:-f,z:0},material:{color:"#ffffff",transparent:!0}}},Ri=new WeakMap,zi=new WeakMap,$i=new WeakMap,St=new WeakMap,Xt=new WeakMap,Ut=new WeakMap;const qo=()=>{let i;const{selectedView:e,onViewChange:t,onProgress:r,section:n,range:s,theme:a,selectedBins:l}=x.useContext(Rt).states,{id:u,histogram:f,projPanelIds:c}=x.useContext(Rt).data,[p]=x.useState(new Ko(u,f,n||null,s,a||"def",l,t,r)),[C,y]=x.useState(p.getElements()),[T]=x.useState(1),k=d=>{f._typename.includes(d.name)&&(d.axis?(p.updateSection(d.axis,d.increment,d.defaultRange),y(p.getElements())):d.scale?(p.updateContentScale(d.scale),y(p.getElements())):d.minValue&&(p.updateMinDisplayedContent(d.minValue),y(p.getElements())))};return x.useEffect(()=>{p.setUniqueName(u),y(p.getElements())},[u]),x.useEffect(()=>{p.setHistogram(f),y(p.getElements())},[f]),x.useEffect(()=>{p.setSection(n),y(p.getElements())},[n]),x.useEffect(()=>{p.setRange(s),y(p.getElements())},[s]),x.useEffect(()=>{p.setTheme(a),y(p.getElements())},[a]),x.useEffect(()=>{p.setSelectedBin(l),y(p.getElements())},[l]),x.useEffect(()=>{p.setViewFunction(t),y(p.getElements())},[t]),x.useEffect(()=>{p.setViewFunction(t),y(p.getElements())},[e]),x.useEffect(()=>{p.setProgressFunction(r),y(p.getElements())},[r]),x.useEffect(()=>{if(f._typename.includes("TH2")?i=Oe.getChangedSection().subscribe(k):f._typename.includes("TH3")?i=Re.getChangedSection().subscribe(k):f._typename.includes("TH1")&&(i=Ke.getChangedSection().subscribe(k)),i)return()=>i.unsubscribe()},[C]),C!=null&&C.bins?ie("a-entity",{"histogram-control":!0,children:[C.bins.map(d=>v("a-box",{id:d.id,class:"clickable",material:`color: ${d.color}; transparent: true`,binth:d.binData,mouseevent:!0,geometry:`width:${d.animation.toWidth}; height:${d.animation.toHeight}; depth:${d.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${d.animation2.fromX} ${d.animation2.fromY} ${d.animation2.fromZ}; to: ${d.animation2.toX} ${d.animation2.toY} ${d.animation2.toZ}; dur: 800;`,animation__3:`property: material.color; from: ${d.animation3.fromColor}; to: ${d.animation3.toColor}; dur: 200;`,children:v("a-text",{value:d.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${d.color}; opacity: 0.50; transparent: true`,rotation:"270 180 0",animation:"property: text.opacity; from: -2; to: 2; dur: 1500;",animation__1:"property: material.opacity; from: -0.4; to: 0.8; dur: 1500;","wrap-count":"50",position:`0 ${.001+(T===1?-1:1)*d.animation.toHeight/2} 0`})},d.id)),C.labels.map(d=>v("a-entity",{geometry:`primitive: ${d.geometry.primitive}; width:${d.geometry.width}; height:${d.geometry.height};`,text:`color: ${d.text.color}; width: ${d.text.width}; height: ${d.text.height}; align:center; xOffset:${d.axis==="x"?-(d.text.width/12):0};baseline:top;`,"label-handler":`value: ${d.labelHandler.value}; delay:${d.labelHandler.delay};`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,material:`color: ${d.material.color}; transparent: true`,animation:"property: text.width; from: 0; to: 4; dur: 1000;",animation__1:"property: material.opacity; from: 0; to: 0.8; dur: 1500;",animation__2:`property: position; from: ${d.animation.fromX} ${d.animation.fromY} ${d.animation.fromZ}; to: ${d.animation.toX} ${d.animation.toY} ${d.animation.toZ}; dur: 1005;`},d.key)),C.titles.map(d=>ie("a-entity",{rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,position:`${d.position.x} ${d.position.y} ${d.position.z}`,material:"transparent: true",children:[v("a-text",{value:d.text.value,position:"0 0.5 0",width:"20",height:"auto",align:"center",color:d.text.color}),v("a-text",{value:d.innerText.value,position:"0 -0.5 0",width:"15",height:"auto",align:"center",color:d.innerText.color}),v("a-entity",{text:`value: ${d.innerText.value}; color: ${d.innerText.color}; width: 15; height:auto; align:center;`,position:"0 -0.5 0",material:"transparent: true"}),v("a-entity",{geometry:"primitive: plane; width:15; height:2;",position:"0 0 -0.1",material:"opacity: 0.9; color: white; transparent: true"})]},d.key)),C.axisLabels.map(d=>v("a-entity",{id:d.id,text:`value: ${d.text.value}; color: ${d.text.color}; width: 10; height:auto; align:center;`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,animation:`property: position; from: ${d.animation.fromX} ${d.animation.fromY} ${d.animation.fromZ}; to: ${d.animation.toX} ${d.animation.toY} ${d.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},d.key)),C.ground&&v("a-box",{width:C.ground.scale.width,material:"color: #fafafa",height:C.ground.scale.height,depth:C.ground.scale.depth,animation:`property: position; from: ${C.ground.animation.fromX} ${C.ground.animation.fromY} ${C.ground.animation.fromZ};
|
|
290
296
|
to:
|
|
291
|
-
${S.ground.animation.toX} ${S.ground.animation.toY} ${S.ground.animation.toZ}; dur: 1000;`},S.ground.key),S.banners.map(d=>v("a-box",{id:c[0]?c[0]:"panel_0",geometry:`width:${d.geometry.width}; height:${d.geometry.height}; depth:${d.geometry.depth};`,position:`${d.position.x} ${d.position.y} ${d.position.z}`,material:`color: ${d.material.color}, transparent: ${d.material.transparent}`},c[0]?c[0]:"panel_0"))]}):v("a-box",{animation__1:"property: rotation; to: 0 180 360; dur: 10000; easing: linear; loop: true",animation__2:"property: scale; from: 1 1 1; to: 10 10 10; dur: 15000; timeout: 15000; loop: true; easing: linear; dir: alternate",animation__color:"property: material.color; from: #003682; to: #7d0002; dur: 80000: easing: linear: loop: true; dir: alternate",position:"0 1.5 -2"})};(function(i){function e(r){if(t[r])return t[r].exports;var n=t[r]={exports:{},id:r,loaded:!1};return i[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var t={};return e.m=i,e.c=t,e.p="",e(0)})([function(i,e){if(typeof ge>"u")throw new Error("Component attempted to register before AFRAME was available.");ge.registerComponent("environment",{schema:{active:{default:!1},preset:{default:"default",oneOf:["none","labs","default","contact","egypt","checkerboard","forest","goaland","yavapai","goldmine","arches","threetowers","poison","tron","japan","dream","volcano","starry","osiris","moon","snow"]},seed:{type:"int",default:1,min:0,max:1e3},skyType:{default:"color",oneOf:["none","color","gradient","atmosphere"]},skyColor:{type:"color"},horizonColor:{type:"color"},lighting:{default:"distant",oneOf:["none","distant","point"]},shadow:{default:!1},shadowSize:{default:10},lightPosition:{type:"vec3",default:{x:0,y:1,z:-.2}},fog:{type:"float",default:0,min:0,max:1},flatShading:{default:!1},playArea:{type:"float",default:1,min:.5,max:10},ground:{default:"hills",oneOf:["none","flat","hills","canyon","spikes","noise"]},groundYScale:{type:"float",default:3,min:0,max:50},groundTexture:{default:"none",oneOf:["none","checkerboard","squares","walkernoise"]},groundColor:{type:"color",default:"#553e35"},groundColor2:{type:"color",default:"#694439"},dressing:{default:"none",oneOf:["none","cubes","pyramids","cylinders","hexagons","stones","trees","mushrooms","towers","apparatus","arches","torii"]},dressingAmount:{type:"int",default:10,min:0,max:1e3},dressingColor:{type:"color",default:"#795449"},dressingScale:{type:"float",default:5,min:0,max:100},dressingVariance:{type:"vec3",default:{x:1,y:1,z:1}},dressingUniformScale:{default:!0},dressingOnPlayArea:{type:"float",default:0,min:0,max:1},grid:{default:"none",oneOf:["none","1x1","2x2","crosses","dots","xlines","ylines"]},gridColor:{type:"color",default:"#ccc"}},multiple:!1,presets:{none:{},default:{active:!0,seed:1,skyType:"atmosphere",skyColor:"#88c",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:-.11,y:1,z:.33},fog:.78,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"checkerboard",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:1,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#ccc",shadow:!1},labs:{active:!0,seed:1,skyType:"gradient",skyColor:"#88c",horizonColor:"#ddd",lighting:"point",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3,groundTexture:"checkerboard",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!1},contact:{active:!0,seed:14,skyType:"gradient",skyColor:"#478d54",horizonColor:"#b696cb",lighting:"distant",lightPosition:{x:0,y:2.01,z:-1},fog:.8,flatShading:!1,playArea:1.3,ground:"spikes",groundYScale:2.91,groundTexture:"none",groundColor:"#2e455f",groundColor2:"#694439",dressing:"none",dressingAmount:10,dressingColor:"#657067",dressingScale:20,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#478d54",shadow:!1},egypt:{active:!0,seed:60,skyType:"gradient",skyColor:"#1b7660",horizonColor:"#e4b676",lighting:"distant",lightPosition:{x:0,y:1.65,z:-1},fog:.75,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:5,groundTexture:"walkernoise",groundColor:"#664735",groundColor2:"#6c4b39",dressing:"pyramids",dressingAmount:5,dressingColor:"#7c5c45",dressingScale:5,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"spots",gridColor:"#e4b676",shadow:!1},checkerboard:{active:!0,seed:5,skyType:"gradient",skyColor:"#0d0d0d",horizonColor:"#404040",lighting:"distant",lightPosition:{x:0,y:1,z:-.2},fog:.81,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:4.81,groundTexture:"checkerboard",groundColor:"#615C32",groundColor2:"#11111",dressing:"cubes",dressingAmount:22,dressingColor:"#9f9f9f",dressingScale:1.51,dressingVariance:{x:5,y:20,z:5},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!1},forest:{active:!0,seed:8,skyType:"gradient",skyColor:"#24b59f",horizonColor:"#eff9b7",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.8,flatShading:!1,playArea:1,ground:"noise",groundYScale:4.18,groundTexture:"squares",groundColor:"#937a24",groundColor2:"#987d2e",dressing:"trees",dressingAmount:500,dressingColor:"#888b1d",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!1},winter:{active:!0,seed:8,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.8,flatShading:!1,playArea:1,ground:"noise",groundYScale:4.18,groundTexture:"none",groundColor:"#f0f0f0",groundColor2:"#987d2e",dressing:"trees",dressingAmount:500,dressingColor:"#fcfcfc",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!0},bow:{active:!0,seed:4,skyType:"gradient",skyColor:"#24b59f",horizonColor:"#eff9b7",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.8,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:4.18,groundTexture:"squares",groundColor:"#937a24",groundColor2:"#987d2e",dressing:"trees",dressingAmount:38,dressingColor:"#888b1d",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!1},goaland:{active:!0,seed:17,skyType:"gradient",skyColor:"#14645f",horizonColor:"#a3dab8",lighting:"point",lightPosition:{x:.1,y:4,z:.56},fog:.73,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:.81,groundTexture:"none",groundColor:"#752944",groundColor2:"#db4453",dressing:"none",dressingAmount:2,dressingColor:"#a9313d",dressingScale:5,dressingVariance:{x:5,y:10,z:5},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#239893",shadow:!1},yavapai:{active:!0,seed:11,skyType:"gradient",skyColor:"#239849",horizonColor:"#cfe0af",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.8,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:9.76,groundTexture:"walkernoise",groundColor:"#C66344",groundColor2:"#c96b4b",dressing:"stones",dressingAmount:5,dressingColor:"#C66344",dressingScale:.06,dressingVariance:{x:.2,y:.1,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#239893",shadow:!1},goldmine:{active:!0,seed:53,skyType:"gradient",skyColor:"#1e1c1a",horizonColor:"#8c7964",lighting:"point",lightPosition:{x:-.09,y:3,z:.33},fog:.43,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:50,groundTexture:"none",groundColor:"#353535",groundColor2:"#454545",dressing:"none",dressingAmount:300,dressingColor:"#fe921b",dressingScale:.5,dressingVariance:{x:2,y:8,z:2},dressingUniformScale:!0,dressingOnPlayArea:.03,grid:"none",gridColor:"#ccc",shadow:!1},threetowers:{active:!0,seed:5,skyType:"gradient",skyColor:"#23a06b",horizonColor:"#f5e170",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.8,flatShading:!1,playArea:1.8,ground:"spikes",groundYScale:3,groundTexture:"walkernoise",groundColor:"#273a49",groundColor2:"#2b464f",dressing:"towers",dressingAmount:8,dressingColor:"#5f6d94",dressingScale:80,dressingVariance:{x:10,y:100,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#239893",shadow:!1},poison:{active:!0,seed:92,skyType:"gradient",skyColor:"#1ea84a",horizonColor:"#177132",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.8,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:3.6,groundTexture:"none",groundColor:"#000000",groundColor2:"#912235",dressing:"hexagons",dressingAmount:20,dressingColor:"#c7415b",dressingScale:20,dressingVariance:{x:20,y:200,z:20},dressingUniformScale:!1,dressingOnPlayArea:0,grid:"crosses",gridColor:"#1ea84a",shadow:!1},arches:{active:!0,seed:89,skyType:"atmosphere",skyColor:"#8cbdc8",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:-.11,y:.45,z:.33},fog:.67,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:10,groundTexture:"walkernoise",groundColor:"#a87d6f",groundColor2:"#795449",dressing:"arches",dressingAmount:7,dressingColor:"#795449",dressingScale:20,dressingVariance:{x:20,y:40,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#ccc",shadow:!1},tron:{active:!0,seed:14,skyType:"gradient",skyColor:"#091b39",horizonColor:"#284a9e",lighting:"distant",lightPosition:{x:-.72,y:.62,z:.4},fog:.8,flatShading:!1,playArea:1.3,ground:"spikes",groundYScale:3.1,groundTexture:"none",groundColor:"#061123",groundColor2:"#694439",dressing:"none",dressingAmount:5,dressingColor:"#fb000e",dressingScale:15,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#fb000e",shadow:!1},japan:{active:!0,seed:14,skyType:"gradient",skyColor:"#7e5db5",horizonColor:"#b4adda",lighting:"distant",lightPosition:{x:1.33,y:1,z:.24},fog:.9,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:5,groundTexture:"walkernoise",groundColor:"#7e5db5",groundColor2:"#cabdf5",dressing:"torii",dressingAmount:6,dressingColor:"#bc5e7c",dressingScale:15,dressingVariance:{x:0,y:0,z:15},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"spots",gridColor:"#e4b676",shadow:!1},dream:{active:!0,seed:5,skyType:"gradient",skyColor:"#87faf4",horizonColor:"#b34093",lighting:"distant",lightPosition:{x:-.72,y:.53,z:.97},fog:.8,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:20,groundTexture:"checkerboard",groundColor:"#b34093",groundColor2:"#c050a2",dressing:"mushrooms",dressingAmount:2,dressingColor:"#3cf7ed",dressingScale:.2,dressingVariance:{x:.2,y:.2,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#239893",shadow:!1},volcano:{active:!0,seed:5,skyType:"gradient",skyColor:"#4a070f",horizonColor:"#f62300",lighting:"point",lightPosition:{x:.5,y:2.25,z:0},fog:.87,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:7.6,groundTexture:"walkernoise",groundColor:"#fb0803",groundColor2:"#510000",dressing:"arches",dressingAmount:20,dressingColor:"#fe921b",dressingScale:.1,dressingVariance:{x:10,y:100,z:10},dressingUniformScale:!1,dressingOnPlayArea:0,grid:"none",gridColor:"#fa0e00",shadow:!1},starry:{active:!0,seed:1,skyType:"atmosphere",skyColor:"AEA09F",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:0,y:1,z:.06},fog:.7,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"none",groundColor:"#553e35",groundColor2:"#694439",dressing:"none",dressingAmount:100,dressingColor:"#795449",dressingScale:5,dressingVariance:{x:1,y:1,z:1},dressingUniformScale:!0,grid:"1x1",dressingOnPlayArea:0,gridColor:"#39d2f2",shadow:!1},osiris:{active:!0,seed:46,skyType:"atmosphere",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:0,y:.2,z:.46},fog:0,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"none",groundColor:"#9e7b47",groundColor2:"#9e7b47",dressing:"pyramids",dressingAmount:3,dressingColor:"#9e7b47",dressingScale:5,dressingVariance:{x:30,y:30,z:30},dressingUniformScale:!0,grid:"dots",dressingOnPlayArea:0,gridColor:"#daa452",shadow:!1},moon:{active:!0,seed:11,skyType:"gradient",skyColor:"skyblue",horizonColor:"#fcfcfc",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.8,flatShading:!0,playArea:1.3,ground:"canyon",groundYScale:9.76,groundTexture:"walkernoise",groundColor:"#D1D1D1",groundColor2:"#987d2e",dressing:"stones",dressingAmount:100,dressingColor:"#494949",dressingScale:.06,dressingVariance:{x:.2,y:.1,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#c5a543",shadow:!1},snow:{active:!0,seed:4,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.4,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3.18,groundTexture:"none",groundColor:"#f0f0f0",groundColor2:"#987d2e",dressing:"trees",dressingAmount:2,dressingColor:"#fcfcfc",dressingScale:1.3,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#39d2f2",shadow:!0}},init:function(){this.environmentData={},this.STAGE_SIZE=200,this.assets={arches:[{type:"mesh",vertices:[409,268,4,351,228,36,336,236,-57,-152,391,69,-135,358,88,-119,330,43,-20,358,-35,-153,357,-47,37,413,-26,-20,411,-14,-302,148,154,-339,121,-126,-389,200,-88,-477,193,-76,-314,346,-19,-314,306,-30,-250,296,-73,-267,237,-82,-212,303,-68,-245,200,-67,-223,304,108,-329,299,107,-289,350,76,-320,342,69,119,373,-39,38,370,8,113,367,52,492,202,-31,462,83,-104,447,71,-80,426,112,25,482,189,-7,222,372,6,121,402,41,87,382,67,221,346,55,559,93,-13,528,47,39,505,21,-111,528,54,-101,616,31,-53,442,256,-15,300,338,19,257,308,-79,408,256,-74,312,352,-26,384,297,-31,437,257,-47,-29,415,53,-232,377,59,-139,335,77,-132,344,2,-18,377,-37,-171,387,-28,-254,384,18,-651,-27,27,-435,-28,179,-345,149,165,-272,-28,23,-215,146,-2,-279,-29,-59,-211,145,-55,-337,-28,-128,-413,247,0,-293,363,24,-214,254,-36,-164,290,33,-284,150,94,-218,362,105,75,369,29,518,147,-63,447,190,-70,445,56,-105,391,185,-60,431,49,-33,459,83,26,470,162,42,130,390,53,167,341,-30,125,394,-45,239,368,-17,91,414,10,450,18,2,449,-27,-9,436,-28,-58,496,-27,-110,582,-28,-140,647,-27,-56,325,325,-45,-307,297,-56,-647,-28,-45,-188,310,-54,-264,197,113,-367,175,139,8,387,82,426,45,-55,114,359,-28,500,27,44,461,-29,13,-512,-27,-151,-152,376,-38,-490,-28,148,12,370,-28,442,160,42,465,194,32,381,183,-33,649,-27,-34,444,16,29,616,-28,25,417,267,-66,-132,352,-34,-322,-27,130,-271,86,-115,-635,-28,-121,-291,203,-99,176,405,-10,561,52,-93,371,305,9,311,237,-22,377,200,-81,-129,406,46,-154,371,99,-82,361,71,-21,354,26,-91,363,-27,-165,413,-12,-414,215,110,-238,127,26,-408,-28,-128,-674,-28,-94,-446,232,-39,-311,226,-90,-255,210,-61,-235,192,-11,-217,218,58,-269,299,124,-386,276,78,-399,281,42,15,373,58,16,393,75,549,107,-46,481,188,-68,409,120,-41,541,81,12,230,368,41,194,350,-50,224,361,-50,604,-28,-10,602,-27,35,486,56,-121,502,69,-120,457,-27,-110,226,317,-40,-584,-28,-124,439,-26,-30,467,-26,39,547,-27,-146,21,368,14,466,229,-29,578,-27,44,609,-27,-96,291,356,-15,290,306,34,255,321,28,231,311,-5,-251,386,50,-183,307,87,-152,307,24,-264,373,-12,-392,-27,190,-333,-28,84,-281,-27,54,-270,-28,-23,-308,-28,-101,-687,-27,-59,39,418,39,413,163,25,404,206,-90,54,400,-31,121,352,8,-454,41,148,-426,9,182,-564,115,3,-427,27,-107,-548,118,-32,-556,122,-53,-517,91,-101,-475,54,140,-461,52,-134,-558,119,-71,-434,286,59,-687,-31,52,-595,146,22,-670,-28,164,-537,166,122,-575,-28,217,-566,159,65,-470,152,136,-712,-29,102,-639,-29,211,-532,-30,181,-442,-30,-100],faces:[76,104,162,1,176,103,103,76,1,2,119,73,73,105,2,2,118,152,45,161,46,46,109,45,3,120,49,49,68,3,3,121,139,139,48,3,4,122,94,94,121,4,6,123,124,9,175,81,10,169,111,10,67,92,88,43,146,11,131,114,11,128,183,13,130,15,90,184,174,90,182,184,130,184,63,14,130,63,15,130,14,16,131,12,15,168,53,18,91,17,131,16,17,65,133,132,65,132,91,67,134,166,166,92,67,20,135,92,20,166,4,4,121,20,22,135,68,25,102,96,25,157,102,69,138,157,69,157,25,39,150,71,71,141,39,28,150,149,149,72,28,142,176,105,36,140,27,27,143,36,32,115,81,32,144,161,161,80,32,77,35,144,34,26,77,78,179,96,145,152,78,178,79,145,80,146,79,147,140,36,143,108,36,143,37,148,74,95,154,154,83,74,72,149,151,151,95,72,38,150,156,40,147,106,70,140,40,40,116,70,42,162,0,35,163,162,43,145,146,46,117,41,47,158,27,48,139,175,122,138,94,157,138,123,52,178,102,52,102,6,52,124,7,7,100,52,53,125,8,57,93,181,56,169,181,59,127,58,60,173,61,62,128,11,11,112,62,65,91,167,65,167,66,126,93,21,22,68,49,72,95,29,142,29,74,74,82,142,75,107,97,75,97,103,76,97,37,104,143,31,78,152,164,78,164,179,79,178,8,97,155,159,107,98,155,83,98,82,154,95,84,39,116,86,86,156,39,87,160,116,24,145,96,162,104,0,105,118,2,43,177,119,44,177,43,91,51,167,44,88,109,46,161,117,3,68,121,3,48,120,4,166,50,50,122,4,5,123,122,123,138,122,110,124,51,170,10,111,110,91,7,7,124,110,8,125,9,9,81,8,186,12,188,92,135,10,11,114,112,64,63,137,13,15,89,89,53,100,64,168,14,14,168,15,89,100,16,16,12,89,100,18,16,17,91,132,112,19,61,18,7,91,19,17,132,133,127,59,133,59,61,136,21,22,134,127,133,20,92,166,121,135,20,158,31,27,21,135,22,23,137,136,24,102,178,178,145,24,25,179,69,26,94,138,27,140,70,27,70,141,150,177,71,28,177,150,29,142,73,73,119,29,142,82,30,30,176,142,107,75,82,31,143,27,33,81,175,31,41,104,115,79,8,32,33,144,80,115,32,33,175,139,35,162,42,77,139,34,163,26,179,163,179,164,78,96,145,177,29,119,108,143,148,148,37,159,97,159,37,74,83,82,38,149,150,156,150,39,40,106,87,87,116,40,140,147,40,161,144,42,42,117,161,41,0,104,41,117,0,0,117,42,164,118,163,1,163,118,118,176,1,118,105,176,152,118,164,43,152,145,43,119,2,71,109,141,47,41,158,44,71,177,45,109,88,45,88,146,46,47,109,141,47,27,167,50,166,49,120,165,139,121,94,5,122,50,123,51,124,157,6,102,157,123,6,100,8,178,5,167,51,6,124,52,100,178,52,53,168,125,125,165,120,54,125,168,9,48,175,120,9,125,93,10,135,181,101,56,57,169,10,59,172,61,67,170,171,67,171,127,58,127,171,129,186,113,60,61,172,61,173,112,62,112,173,174,189,129,165,64,23,64,137,23,165,22,49,64,54,168,17,114,131,17,112,114,66,133,65,19,132,133,19,133,61,134,133,66,166,134,66,166,66,167,93,135,21,68,135,121,23,136,22,94,34,139,25,96,179,26,138,69,69,179,26,30,103,176,116,141,70,39,141,116,73,142,105,143,76,37,26,35,77,103,97,76,77,144,33,33,139,77,38,151,149,80,161,45,80,45,146,81,115,8,107,155,97,82,98,107,95,151,84,38,156,85,86,116,160,96,102,24,72,29,28,29,95,74,75,30,82,108,147,36,88,44,43,91,110,51,170,67,10,11,183,131,64,14,63,89,15,53,100,7,18,112,17,19,127,134,67,136,126,21,158,41,31,33,32,81,115,80,79,177,28,29,43,2,152,71,44,109,47,46,41,141,109,47,167,5,50,123,5,51,100,53,8,125,54,165,9,120,48,93,57,10,59,58,172,174,185,189,165,54,64,165,23,22,94,26,34,30,75,103,143,104,76,26,163,35,38,85,151,192,182,191,183,128,201,12,13,89,181,169,57,186,153,113,188,183,99,184,182,63,185,13,189,180,181,93,186,99,153,189,186,129,185,184,130,186,13,12,187,93,126,193,199,194,194,196,193,200,187,195,187,197,195,187,126,197,197,190,194,190,136,137,190,196,194,63,182,192,63,192,196,192,198,196,191,182,55,193,196,198,194,199,197,195,197,199,136,197,126,190,137,63,190,63,196,197,136,190,192,191,198,201,99,183,90,55,182,181,180,101,185,130,13,186,188,99,186,189,13,187,180,93,200,101,187,183,188,131,184,185,174,180,187,101,16,18,17,12,131,188,35,42,144,163,1,162,76,162,1,79,146,145]}],stones:[{type:"mesh",vertices:[-376,189,42,230,223,-310,353,162,-62,414,-23,-67,256,90,-475,24,85,-526,-418,-16,57,-432,66,-40,-199,151,-376,-155,49,467,-91,289,201,293,197,91,81,-17,-480,42,108,431,-359,-17,-250,383,-19,-243,194,-15,270,-272,180,293,-86,212,262,234,54,297,395,97,-302,-123,-21,-444,-416,-19,-123,-323,-18,267,-100,-16,429,-300,96,-361,163,-19,409,118,201,-431,-241,-18,391,-130,274,-309,306,-19,-399,-221,96,404],faces:[31,18,17,0,17,18,3,20,2,18,11,10,29,27,8,27,29,1,0,18,10,10,29,0,16,19,26,11,2,1,20,30,4,20,3,15,30,12,4,4,12,5,5,27,4,4,27,20,21,25,5,7,8,25,22,7,14,7,25,14,23,28,31,0,7,17,24,26,9,31,28,9,8,27,5,2,20,1,13,19,18,10,11,1,19,13,26,3,11,19,19,16,3,11,3,2,11,18,19,20,15,30,29,10,1,25,21,14,8,5,25,5,12,21,6,7,22,7,6,23,8,0,29,8,7,0,23,31,7,13,31,9,18,31,13,9,28,24,26,13,9,27,1,20,7,31,17]},{type:"mesh",vertices:[-217,34,-153,198,90,20,212,85,169,-131,93,171,197,113,30,173,121,164,315,29,-16,219,24,189,282,50,-102,232,38,-181,-195,-9,-166,-156,30,-207,-51,-9,-231,-180,91,-173,-19,73,-204,-280,23,96,-242,100,107,3,158,-82,109,88,221,275,-10,-40,236,-10,-135,-178,49,184,-1,-10,-243,265,-11,109,-12,-9,237,-36,46,251,-233,86,-81,93,77,-171,-163,133,69,18,16,263,296,44,93,131,-12,-226,-89,-10,-201,-273,-10,-51,-240,-9,110,190,-12,192,-253,-11,-92,42,43,-258,-115,-11,238,168,99,-88,-285,-10,24,71,124,-158,298,-10,10,116,150,-24,-282,44,39],faces:[44,16,26,13,26,16,0,26,13,27,14,41,4,5,1,7,30,2,28,5,43,41,39,27,17,43,41,43,4,39,13,28,17,17,41,13,28,43,17,24,29,38,29,35,7,18,25,29,5,18,2,18,5,3,30,42,6,30,35,23,19,20,8,8,20,9,9,39,8,1,30,8,31,37,9,11,14,37,14,27,37,32,11,12,11,37,12,11,0,13,33,40,44,44,26,33,33,0,36,34,38,15,44,40,15,21,3,16,27,39,9,2,30,1,21,25,3,16,3,28,28,3,5,4,43,5,41,43,39,13,16,28,25,21,38,38,29,25,7,18,29,29,24,35,18,7,2,18,3,25,30,23,42,30,7,35,8,30,6,6,19,8,6,42,19,8,39,1,37,31,22,27,9,37,9,20,31,10,11,32,11,10,0,12,37,22,14,13,41,14,11,13,33,26,0,36,0,10,21,44,15,16,44,21,15,40,34,38,21,15,4,1,39,5,2,1]},{type:"mesh",vertices:[-101,102,57,99,35,102,40,72,80,59,14,-168,-186,22,45,-176,25,-30,66,-7,146,153,-7,53,-110,47,-96,-90,-8,-146,150,-7,-12,-200,-7,8,-173,-7,-55,55,46,-60,125,-7,110,136,30,-10,-149,58,68,-15,82,-71,98,-7,-86,-34,-6,-194,-33,-7,171,-36,65,137,38,-8,-192,-103,-9,147,-12,62,-152],faces:[2,17,0,17,8,0,17,24,8,19,24,22,5,11,4,2,13,17,17,13,24,21,23,20,1,2,21,7,15,1,7,10,15,5,9,12,15,18,13,0,5,16,0,8,5,1,15,2,10,18,15,3,13,18,24,3,22,11,23,4,4,16,5,16,4,23,24,13,3,15,13,2,6,1,21,6,21,20,6,14,1,2,0,21,1,14,7,3,18,22,8,24,19,8,19,9,12,11,5,5,8,9,16,23,21,16,21,0]},{type:"mesh",vertices:[86,55,-18,58,38,73,97,-12,79,135,7,10,-93,-11,-72,-133,5,33,13,68,-32,94,-11,-57,-90,52,53,-24,-11,-106,-13,-10,104,-75,49,-69,-12,18,114,49,-12,-96,-46,-11,-85,-119,-11,-26,48,5,-111,-58,-11,105,-117,-12,52,-5,35,-93,123,-11,7],faces:[5,8,11,2,3,1,8,1,6,11,8,6,6,19,11,10,12,17,20,7,3,3,7,16,16,0,3,16,9,19,14,4,9,15,18,5,5,11,15,18,17,5,19,0,16,1,3,0,0,6,1,19,6,0,12,8,17,2,1,12,12,10,2,1,8,12,3,2,20,16,13,9,16,7,13,19,4,11,15,11,4,17,8,5,9,4,19]}],torii:[{type:"mesh",mirror:!0,flatShading:!0,vertices:[692,966,-52,661,834,-52,692,966,52,661,834,52,0,894,-52,0,776,-52,0,894,52,0,776,52,518,935,52,345,913,52,170,899,52,162,779,52,328,790,52,494,808,52,170,899,-52,345,913,-52,518,935,-52,494,808,-52,328,790,-52,162,779,-52,0,618,16,0,697,16,0,618,-16,0,697,-16,586,618,16,586,697,16,586,618,-16,586,697,-16,331,-29,-75,331,766,-52,369,-29,-65,357,766,-45,396,-29,-37,377,766,-26,406,-29,0,384,766,0,396,-29,37,377,766,26,369,-29,65,357,766,45,331,-29,75,331,766,52,294,-29,65,305,766,45,267,-29,37,286,766,26,257,-29,0,279,766,0,267,-29,-37,286,766,-26,294,-29,-65,305,766,-45,0,777,85,0,681,33,333,762,-75,333,806,-75,371,762,-65,371,806,-65,398,762,-37,398,806,-37,408,762,0,408,806,0,398,762,37,398,806,37,371,762,65,371,806,65,333,762,75,333,806,75,296,762,65,296,806,65,268,762,37,268,806,37,258,762,0,258,806,0,268,762,-37,268,806,-37,296,762,-65,296,806,-65,0,681,-33,0,777,-85,52,681,33,52,777,85,52,681,-33,52,777,-85],faces:[4,10,14,1,13,17,11,6,7,0,3,1,16,1,17,4,19,5,14,18,19,15,17,18,3,8,13,13,9,12,12,10,11,19,7,5,19,12,11,18,13,12,16,2,0,15,8,16,14,9,15,23,26,22,27,24,26,25,20,24,26,20,22,23,25,27,29,30,28,31,32,30,33,34,32,35,36,34,37,38,36,39,40,38,41,42,40,43,44,42,45,46,44,47,48,46,49,50,48,51,28,50,55,56,54,57,58,56,59,60,58,61,62,60,63,64,62,79,81,83,65,66,64,82,53,78,67,68,66,81,53,80,69,70,68,83,80,82,71,72,70,79,82,78,73,74,72,75,63,59,75,76,74,77,54,76,60,68,76,4,6,10,1,3,13,11,10,6,0,2,3,16,0,1,4,14,19,14,15,18,15,16,17,3,2,8,13,8,9,12,9,10,19,11,7,19,18,12,18,17,13,16,8,2,15,9,8,14,10,9,23,27,26,27,25,24,25,21,20,26,24,20,23,21,25,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,29,28,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,79,52,81,65,67,66,82,80,53,67,69,68,81,52,53,69,71,70,83,81,80,71,73,72,79,83,82,73,75,74,59,57,55,55,77,75,75,73,71,71,69,75,67,65,63,63,61,59,59,55,75,75,69,67,67,63,75,75,77,76,77,55,54,76,54,56,56,58,76,60,62,68,64,66,68,68,70,72,72,74,68,76,58,60,62,64,68,68,74,76]}],hexagons:[{type:"extrude",vertices:[-.198,-.302,.197,-.3,.372,0,.199,.298,-.202,.298,-.368,0]}],towers:[{type:"extrude",vertices:[-.054,-.178,-.007,-.182,.069,-.027,.189,.079,.178,.124,-.007,.097,-.145,.182,-.178,.144,-.079,-.021]},{type:"lathe",segments:4,vertices:[.004,.02,.012,.092,.042,.166,.067,.55,.101,.594,.105,.838,.193,.934,.18,.994]},{type:"lathe",segments:5,vertices:[.069,.216,.067,.562,.126,.562,.128,.774,.191,.774,.193,.986]}],trees:[{type:"lathe",noise:.015,segments:6,vertices:[1e-6,.826,.054,.832,.105,.854,.136,.9,.136,.958,.118,.994]},{type:"lathe",noise:.015,segments:14,vertices:[1e-6,.01,.069,.022,.13,.068,.178,.18,.189,.32,.191,.59,.193,.75,.138,.79,.018,.808,.018,.996]},{type:"lathe",noise:.015,segments:14,vertices:[1e-6,.436,.126,.46,.201,.57,.219,.72,.154,.846,.028,.884,.034,.996]}],apparatus:[{type:"lathe",segments:10,vertices:[1e-6,.23,.042,.23,.069,.36,.038,.362,.038,.372,.06,.372,.073,.572,.024,.572,.024,.67,.069,.67,.075,.722,.097,.724,.105,.852,.083,.902,.065,.902,.065,.924,.128,.924,.146,.996]},{type:"lathe",segments:16,vertices:[1e-6,.232,.229,.182,.486,.07,.356,.182,.213,.242,.154,.242,.144,.262,.178,.262,.126,.314,.04,.328,.038,.374,.058,.374,.071,.408,.026,.406,.03,.42,.091,.418,.034,.496,.01,.498,.03,.506,.014,.998]}],mushrooms:[{type:"lathe",noise:.02,segments:14,vertices:[1e-6,.006,.13,.018,.341,.084,.437,.144,.492,.234,.484,.246,.276,.232,.107,.284,.046,.346,.062,.852,.097,.956,.166,.998]},{type:"lathe",noise:.02,segments:10,vertices:[1e-6,.562,.091,.572,.172,.61,.223,.666,.256,.74,.258,.806,.246,.824,.062,.826,.065,.948,.097,.998]},{type:"lathe",noise:.02,segments:10,vertices:[1e-6,.768,.099,.772,.219,.802,.306,.844,.352,.886,.352,.908,.118,.904,.107,.93,.115,.966,.14,.996]}]};for(var r in this.assets)for(var n=0;n<this.assets[r].length;n++){var s=this.assets[r][n];if(s.type=="mesh")for(var a=0,l=s.vertices.length;a<l;a++)s.vertices[a]/=1e3}this.userFog=this.el.sceneEl.getAttribute("fog"),this.sky=document.createElement("a-sky"),this.sky.setAttribute("radius",this.STAGE_SIZE),this.sky.setAttribute("theta-length",110),this.sky.classList.add("environment"),this.stars=null,this.groundMaterial=null,this.ground=document.createElement("a-entity"),this.ground.setAttribute("rotation","-90 0 0"),this.ground.classList.add("environmentGround"),this.ground.classList.add("environment"),this.groundCanvas=null,this.groundTexture=null,this.groundMaterial=null,this.groundGeometry=null,this.dressing=document.createElement("a-entity"),this.dressing.classList.add("environmentDressing"),this.dressing.classList.add("environment"),this.gridCanvas=null,this.gridTexture=null,this.hemilight=document.createElement("a-entity"),this.hemilight.classList.add("environment"),this.hemilight.setAttribute("position","0 50 0"),this.hemilight.setAttribute("light",{type:"hemisphere",color:"#CEE4F0",intensity:.4}),this.sunlight=document.createElement("a-entity"),this.sunlight.classList.add("environment"),this.sunlight.setAttribute("position",this.data.lightPosition),this.sunlight.setAttribute("light",{intensity:.6}),this.el.appendChild(this.hemilight),this.el.appendChild(this.sunlight),this.el.appendChild(this.ground),this.el.appendChild(this.dressing),this.el.appendChild(this.sky)},getFogColor:function(r,n){var s;if(r=="color"||r=="none")s=new THREE.Color(this.environmentData.skyColor);else if(r=="gradient")s=new THREE.Color(this.environmentData.horizonColor);else if(r=="atmosphere"){var a=[1,.5,.22,.1,.05,0],l=["#C0CDCF","#81ADC5","#525e62","#2a2d2d","#141616","#000"];if(n<=0)return"#000";n=Math.min(1,n);for(var u=0;u<a.length;u++)if(n>a[u]){var f=new THREE.Color(l[u-1]),c=new THREE.Color(l[u]),p=(n-a[u])/(a[u-1]-a[u]);c.lerp(f,p),s=c;break}}return s.multiplyScalar(.9),s.lerp(new THREE.Color(this.data.groundColor),.3),"#"+s.getHexString()},update:function(r){var n;this.data.preset?(n=ge.utils.clone(this.environmentData),this.environmentData={},Object.assign(this.environmentData,this.data),Object.assign(this.environmentData,this.presets[this.data.preset]),Object.assign(this.environmentData,this.el.components.environment.attrValue),console.log(this.environmentData)):(n=r,this.environmentData=this.data);var s=this.environmentData.skyType,a=new THREE.Vector3(this.environmentData.lightPosition.x,this.environmentData.lightPosition.y,this.environmentData.lightPosition.z);if(a.normalize(),this.sunlight){if(this.sunlight.setAttribute("position",this.environmentData.lightPosition),s!="atmosphere"){var l=new THREE.Color(this.environmentData.skyColor);l.r=(l.r+1)/2,l.g=(l.g+1)/2,l.b=(l.b+1)/2,this.hemilight.setAttribute("light",{color:"#"+l.getHexString()}),this.sunlight.setAttribute("light",{intensity:.6}),this.hemilight.setAttribute("light",{intensity:.6})}else this.sunlight.setAttribute("light",{intensity:.1+.5*a.y}),this.hemilight.setAttribute("light",{intensity:.1+.5*a.y});this.sunlight.setAttribute("light",{castShadow:this.environmentData.shadow,shadowCameraLeft:-this.environmentData.shadowSize,shadowCameraBottom:-this.environmentData.shadowSize,shadowCameraRight:this.environmentData.shadowSize,shadowCameraTop:this.environmentData.shadowSize})}if(s!==n.skyType||this.environmentData.skyColor!=n.skyColor||this.environmentData.horizonColor!=n.horizonColor){var u={};u.shader={none:"flat",color:"flat",gradient:"gradientshader",atmosphere:"skyshader"}[s],this.stars&&this.stars.setAttribute("visible",s=="atmosphere"),s=="color"?(u.color=this.environmentData.skyColor,u.fog=!1):s=="gradient"&&(u.topColor=this.environmentData.skyColor,u.bottomColor=this.environmentData.horizonColor),this.sky.setAttribute("material",u)}s=="atmosphere"&&(this.sky.setAttribute("material",{sunPosition:a}),this.setStars(2e3*(1-Math.max(0,8*(a.y+.08))))),this.environmentData.fog>0?this.el.sceneEl.setAttribute("fog",{color:this.getFogColor(s,a.y),far:(1.01-this.environmentData.fog)*this.STAGE_SIZE*2}):this.el.sceneEl.removeAttribute("fog"),this.sunlight.setAttribute("light",{type:this.environmentData.lighting=="point"?"point":"directional"}),this.sunlight.setAttribute("visible",this.environmentData.lighting!=="none"),this.hemilight.setAttribute("visible",this.environmentData.lighting!=="none");var f=!this.groundGeometry||this.environmentData.seed!=n.seed||this.environmentData.ground!=n.ground||this.environmentData.playArea!=n.playArea||this.environmentData.flatShading!=n.flatShading;(f||this.environmentData.groundColor!=n.groundColor||this.environmentData.groundColor2!=n.groundColor2||this.environmentData.groundYScale!=n.groundYScale||this.environmentData.groundTexture!=n.groundTexture||this.environmentData.gridColor!=n.gridColor||this.environmentData.grid!=n.grid)&&(this.updateGround(f),this.hemilight&&this.hemilight.setAttribute("light",{groundColor:this.environmentData.groundColor})),this.environmentData.seed==n.seed&&this.environmentData.dressingOnPlayArea==n.dressingOnPlayArea&&this.environmentData.dressing==n.dressing&&this.environmentData.flatShading==n.flatShading&&this.environmentData.dressingAmount==n.dressingAmount&&this.environmentData.dressingScale==n.dressingScale&&this.environmentData.dressingColor==n.dressingColor&&this.environmentData.dressingVariance.x==n.dressingVariance.x&&this.environmentData.dressingVariance.y==n.dressingVariance.y&&this.environmentData.dressingVariance.z==n.dressingVariance.z&&this.environmentData.dressingUniformScale==n.dressingUniformScale||this.updateDressing(),this.sky.setAttribute("visible",s!=="none"),this.el.setAttribute("visible",this.environmentData.active),this.environmentData.active||(this.userFog?this.el.sceneEl.setAttribute("fog",this.userFog):this.el.sceneEl.removeAttribute("fog")),this.dumpParametersDiff()},logPreset:function(){var r="{";for(var n in this.schema)if(n!="preset"){r+=n+": ";var s=this.schema[n].type;r+=s=="vec3"?"{ x: "+this.environmentData[n].x+", y: "+this.environmentData[n].y+", z: "+this.environmentData[n].z+"}":s=="string"||s=="color"?'"'+this.environmentData[n]+'"':this.environmentData[n],r+=", "}r+="}",console.log(r)},dumpParametersDiff:function(){function r(p){return Math.floor(1e3*p)/1e3}var n=[],s=this.data.preset!="none"&&this.presets[this.data.preset];s&&n.push("preset: "+this.data.preset);for(var a in this.schema)if(!(a=="preset"||s&&s[a]===void 0)){var l=s?s[a]:this.schema[a].default,u=this.environmentData[a],f=this.schema[a].type;if(f=="vec3"){var c=l;typeof l=="string"&&(l=l.split(" "),c={x:l[0],y:l[1],z:l[2]}),r(c.x)==r(u.x)&&r(c.y)==r(u.y)&&r(c.z)==r(u.z)||n.push(a+": "+r(u.x)+" "+r(u.y)+" "+r(u.z))}else l!=u&&(this.schema[a].type=="number"&&(u=r(u)),n.push(a+": "+u))}console.log("%c"+n.join("; "),"color: #f48;font-weight:bold")},random:function(r){return parseFloat("0."+Math.sin(9999*this.environmentData.seed*r).toString().substr(7))},updateGround:function(r){var n=64;if(r){var s=this.environmentData.ground!="none";if(this.ground.setAttribute("visible",s),!s)return;this.groundGeometry||(this.groundGeometry=new THREE.PlaneGeometry(this.STAGE_SIZE+2,this.STAGE_SIZE+2,n-1,n-1));for(var a=new t(this.environmentData.seed),l=this.groundGeometry.attributes.position.array,u=l.length,f=10,c=f/n,p=0,S=0,b=2;b<u;b+=3)if(this.environmentData.ground!="flat"){var T;switch(this.environmentData.ground){case"hills":T=Math.max(0,a.noise(p,S,0));break;case"canyon":T=.2+.8*a.noise(p,S,0),T=Math.min(1,10*Math.pow(T,2));break;case"spikes":T=this.random(b)<.02?this.random(b+1):0;break;case"noise":T=this.random(b)<.35?this.random(b+1):0}T+=.1*this.random(b+2);var C=2*p/f-1,d=2*S/f-1,E=this.environmentData.playArea;C=Math.max(0,Math.min(1,(Math.abs(C)-(E-.9))*(1/E))),d=Math.max(0,Math.min(1,(Math.abs(d)-(E-.9))*(1/E))),T*=C>d?C:d,T<.01&&(T=0),l[b]=T,p+=c,p>=10&&(p=0,S+=c)}else l[b]=0;this.groundGeometry.computeVertexNormals(),this.groundGeometry.attributes.position.needsUpdate=!0,this.groundGeometry.attributes.normal.needsUpdate=!0}this.ground.setAttribute("scale",{z:this.environmentData.groundYScale});var w=2048,D=20,O=this.STAGE_SIZE/D;this.groundCanvas&&this.groundCanvas.width==w||(this.gridCanvas=document.createElement("canvas"),this.gridCanvas.width=w,this.gridCanvas.height=w,this.gridTexture=new THREE.Texture(this.gridCanvas),this.gridTexture.wrapS=THREE.RepeatWrapping,this.gridTexture.wrapT=THREE.RepeatWrapping,this.gridTexture.repeat.set(O,O),this.groundCanvas=document.createElement("canvas"),this.groundCanvas.width=w,this.groundCanvas.height=w,this.groundTexture=new THREE.Texture(this.groundCanvas),this.groundTexture.wrapS=THREE.RepeatWrapping,this.groundTexture.wrapT=THREE.RepeatWrapping,this.groundTexture.repeat.set(O,O),this.groundMaterialProps={map:this.groundTexture,emissive:new THREE.Color(16777215),emissiveMap:this.gridTexture},new THREE.Material().hasOwnProperty("shading")?this.groundMaterialProps.shading=this.environmentData.flatShading?THREE.FlatShading:THREE.SmoothShading:this.groundMaterialProps.flatShading=this.environmentData.flatShading,this.groundMaterial=new THREE.MeshLambertMaterial(this.groundMaterialProps));var g=this.groundCanvas.getContext("2d"),Z=this.gridCanvas.getContext("2d");if(this.drawTexture(g,w,D),Z.fillStyle="#000000",Z.fillRect(0,0,w,w),this.drawGrid(Z,w,D),this.groundTexture.needsUpdate=!0,this.gridTexture.needsUpdate=!0,r){var I=new THREE.Mesh(this.groundGeometry,this.groundMaterial);this.ground.setObject3D("mesh",I)}else this.ground.getObject3D("mesh").material=this.groundMaterial;this.ground.setAttribute("shadow",{cast:!1,receive:this.environmentData.shadow})},drawGrid:function(r,n,s){if(this.environmentData.grid!="none"){var a,l,u,f=Math.floor(s/2),c=n/(s/2);switch(r.fillStyle=this.environmentData.gridColor,this.environmentData.grid){case"1x1":case"2x2":for(this.environmentData.grid=="1x1"&&(f*=2,c=n/s),a=0;a<f;a++)u=Math.floor(a*c),r.fillRect(0,u,n,1),r.fillRect(u,0,1,n);break;case"crosses":var p=Math.floor(c/20);for(a=0;a<f+1;a++)for(u=Math.floor(a*c),l=0;l<f+1;l++){var S=Math.floor(-p+l*c);r.fillRect(S,u,2*p,1),r.fillRect(u,S,1,2*p)}break;case"dots":for(a=0;a<f+1;a++)for(l=0;l<f+1;l++)r.beginPath(),r.arc(Math.floor(l*c),Math.floor(a*c),4,0,2*Math.PI),r.fill();break;case"xlines":for(a=0;a<f;a++)r.fillRect(Math.floor(a*c),0,1,n);break;case"ylines":for(a=0;a<f;a++)r.fillRect(0,Math.floor(a*c),n,1)}}},drawTexture:function(r,n,s){r.fillStyle=this.environmentData.groundColor,r.fillRect(0,0,n,n);var a,l,u,f,c,p,S;if(this.environmentData.groundTexture!="none")switch(this.environmentData.groundTexture){case"checkerboard":r.fillStyle=this.environmentData.groundColor2;var b=Math.floor(s/2),T=n/(s/2);for(a=0;a<b+1;a+=2)for(var C=0;C<b+1;C++)r.fillRect(Math.floor((a+C%2)*T),Math.floor(C*T),Math.floor(T),Math.floor(T));break;case"squares":var d=16,E=n/d;for(u=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2),a=0;a<d*d;a++)l=this.random(a+3)>.5?u.clone():f.clone(),l.addScalar(.1*this.random(a+3)-.05),r.fillStyle="#"+l.getHexString(),r.fillRect(a%d*E,Math.floor(a/d)*E,E,E);break;case"noise":p=r.getImageData(0,0,n,n),c=p.data,u=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2);var w=new THREE.Color(f.r-u.r,f.g-u.g,f.b-u.b),D=new t;for(a=0,C=0,S=c.length;a<S;a+=4,C++){var O=D.noise(C%n/n*3,C/n/n*3,0);c[a+0]=Math.floor(255*(u.r+w.r*O)),c[a+1]=Math.floor(255*(u.g+w.g*O)),c[a+2]=Math.floor(255*(u.b+w.b*O))}r.putImageData(p,0,0);break;case"walkernoise":var g=Math.floor(n/2),Z=document.createElement("canvas");Z.width=g,Z.height=g;var I=Z.getContext("2d");I.fillStyle=this.environmentData.groundColor,I.fillRect(0,0,g,g),p=I.getImageData(0,0,g,g),c=p.data,u=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2);var P=[],F=1e3;for(a=0;a<F;a++)l=u.clone().lerp(f,Math.random()),P.push({x:Math.random()*g,y:Math.random()*g,r:Math.floor(255*l.r),g:Math.floor(255*l.g),b:Math.floor(255*l.b)});for(var ne=5e3,G=0;G<ne;G++)for(a=0;a<F;a++){var B=P[a],X=4*Math.floor(B.y*g+B.x);c[X+0]=B.r,c[X+1]=B.g,c[X+2]=B.b,B.x+=Math.floor(3*Math.random())-1,B.y+=Math.floor(3*Math.random())-1,B.x>=g&&(B.x=B.x-g),B.y>=g&&(B.y=B.y-g),B.x<0&&(B.x=g+B.x),B.y<0&&(B.y=g+B.y)}I.putImageData(p,0,0),r.drawImage(Z,0,0,n,n)}},getAssetGeometry:function(r){function n(E,w){for(var D=(new THREE.Vector3,E.attributes.position.array),O=D.length,g=0;g<O;g+=3)D[g]=(f.random(g)-.5)*w,D[g+1]=(f.random(g+O)-.5)*w,D[g+2]=(f.random(g+2*O)-.5)*w;E.attributes.position.needsUpdate=!0}if(!r)return null;for(var s,a,l,u=[],f=this,c=0;c<r.length;c++)if(r[c].type=="lathe"){var p=-99999,S=[];for(l=r[c].vertices,s=0;s<l.length;s+=2)S.push(new THREE.Vector2(l[s],l[s+1])),l[s+1]>p&&(p=l[s+1]);a=new THREE.LatheGeometry(S,r[c].segments||8),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI,0,0))),a.applyMatrix4(new THREE.Matrix4().makeTranslation(0,p,0)),a=a.toNonIndexed(),u.push(a)}else if(r[c].type=="extrude"){var b=new THREE.Shape;for(l=r[c].vertices,s=0;s<l.length;s+=2)s==0?b.moveTo(l[s],l[s+1]):b.lineTo(l[s],l[s+1]);a=new THREE.ExtrudeGeometry(b,{amount:1,bevelEnabled:!1}),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI/2,0,0))),r[c].noise&&n(a,r[c].noise),u.push(a)}else if(r[c].type=="mesh"){a=new THREE.BufferGeometry,l=r[c].vertices;var T=r[c].faces,C=new Float32Array(l);if(a.setIndex(T),a.setAttribute("position",new THREE.BufferAttribute(C,3)),r[c].mirror){var d=a.clone();d.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(0,Math.PI,0))),a=THREE.BufferGeometryUtils.mergeBufferGeometries([a,d])}r[c].noise&&n(a,r[c].noise),a=a.toNonIndexed(),a.computeVertexNormals(),u.push(a)}return u},updateDressing:function(){var r=new THREE.Object3D,n=[];if(this.dressing.setAttribute("visible",this.environmentData.dressing!="none"),this.environmentData.dressing!="none"){var s;switch(this.environmentData.dressing){case"cubes":s=[new THREE.BoxGeometry(1,1,1)],s[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"pyramids":s=[new THREE.ConeGeometry(1,1,4,1,!0)],s[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"cylinders":s=[new THREE.CylinderGeometry(.5,.5,1,8,1,!0)],s[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;default:if(s=this.getAssetGeometry(this.assets[this.environmentData.dressing]),!s)return}for(var a=0,l=88343;a<this.environmentData.dressingAmount;a++,l++){var u,f=(s[Math.floor(this.random(33+a)*s.length)].clone,s[Math.floor(this.random(33+a)*s.length)].clone()),c=this.environmentData.dressingScale,p=new THREE.Vector3(this.environmentData.dressingVariance.x,this.environmentData.dressingVariance.y,this.environmentData.dressingVariance.z),S=this.random(l)<this.environmentData.dressingOnPlayArea;u=S?15*this.random(l+1):10+Math.max(p.x,p.z)+10*this.random(l+1)+this.random(l+2)*this.STAGE_SIZE/3;var b=this.random(l+3)*Math.PI*2,T=new THREE.Matrix4,C=this.random(l+4),d=this.environmentData.dressingUniformScale;T.compose(new THREE.Vector3(Math.cos(b)*u,0,Math.sin(b)*u),new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,1,0),(this.random(l+5)-.5)*p.length()*Math.PI*2),new THREE.Vector3(c+(d?C:this.random(l+6))*p.x,c+(d?C:this.random(l+7))*p.y,c+(d?C:this.random(l+8))*p.z)),f.applyMatrix4(T),n.push(f)}var E=THREE.BufferGeometryUtils.mergeBufferGeometries(n);E.attributes.position.needsUpdate=!0;var w=new THREE.MeshLambertMaterial({color:new THREE.Color(this.environmentData.dressingColor)}),D=new THREE.Mesh(E,w);r.add(D),this.dressing.setObject3D("mesh",r)}},createStars:function(){for(var r=2e3,n=new THREE.BufferGeometry,s=new Float32Array(3*r),a=this.STAGE_SIZE-1,l=new THREE.Vector3,u=0;u<s.length;u+=3)l.set(this.random(u+23)-.5,this.random(u+24),this.random(u+25)-.5),l.normalize(),l.multiplyScalar(a),s[u]=l.x,s[u+1]=l.y,s[u+2]=l.z;n.setAttribute("position",new THREE.BufferAttribute(s,3)),n.setDrawRange(0,0);var f=new THREE.PointsMaterial({size:.01,color:13421772,fog:!1});this.stars.setObject3D("mesh",new THREE.Points(n,f))},setStars:function(r){this.stars||(this.stars=document.createElement("a-entity"),this.stars.id="stars",this.createStars(),this.el.appendChild(this.stars)),r=Math.floor(Math.min(2e3,Math.max(0,r))),this.stars.getObject3D("mesh").geometry.setDrawRange(0,r)}}),ge.registerShader("skyshader",{schema:{luminance:{type:"number",default:1,min:0,max:2,is:"uniform"},turbidity:{type:"number",default:2,min:0,max:20,is:"uniform"},reileigh:{type:"number",default:1,min:0,max:4,is:"uniform"},mieCoefficient:{type:"number",default:.005,min:0,max:.1,is:"uniform"},mieDirectionalG:{type:"number",default:.8,min:0,max:1,is:"uniform"},sunPosition:{type:"vec3",default:{x:0,y:0,z:-1},is:"uniform"},color:{type:"color",default:"#fff"}},vertexShader:["varying vec3 vWorldPosition;","void main() {","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vWorldPosition = worldPosition.xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join(`
|
|
297
|
+
${C.ground.animation.toX} ${C.ground.animation.toY} ${C.ground.animation.toZ}; dur: 1000;`},C.ground.key),C.banners.map(d=>v("a-box",{id:c[0]?c[0]:"panel_0",geometry:`width:${d.geometry.width}; height:${d.geometry.height}; depth:${d.geometry.depth};`,position:`${d.position.x} ${d.position.y} ${d.position.z}`,rotation:`${d.rotation.x} ${d.rotation.y} ${d.rotation.z}`,material:`color: ${d.material.color}, transparent: ${d.material.transparent}`},c[0]?c[0]:"panel_0"))]}):v("a-box",{animation__1:"property: rotation; to: 0 180 360; dur: 10000; easing: linear; loop: true",animation__2:"property: scale; from: 1 1 1; to: 10 10 10; dur: 15000; timeout: 15000; loop: true; easing: linear; dir: alternate",animation__color:"property: material.color; from: #003682; to: #7d0002; dur: 80000: easing: linear: loop: true; dir: alternate",position:"0 1.5 -2"})};(function(i){function e(r){if(t[r])return t[r].exports;var n=t[r]={exports:{},id:r,loaded:!1};return i[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var t={};return e.m=i,e.c=t,e.p="",e(0)})([function(i,e){if(typeof me>"u")throw new Error("Component attempted to register before AFRAME was available.");me.registerComponent("environment",{schema:{active:{default:!1},preset:{default:"default",oneOf:["none","ndmvr","govorun","labs","labs2","default","contact","egypt","checkerboard","forest","goaland","yavapai","goldmine","arches","threetowers","poison","tron","japan","dream","volcano","starry","osiris","moon","snow","bow","winter"]},seed:{type:"int",default:1,min:0,max:1e3},skyType:{default:"color",oneOf:["none","color","gradient","atmosphere"]},background:{type:"string"},skyColor:{type:"color"},horizonColor:{type:"color"},lighting:{default:"distant",oneOf:["none","distant","point"]},shadow:{default:!1},shadowSize:{default:10},lightPosition:{type:"vec3",default:{x:0,y:1,z:-.2}},fog:{type:"float",default:0,min:0,max:1},flatShading:{default:!1},playArea:{type:"float",default:1,min:.5,max:10},ground:{default:"hills",oneOf:["none","flat","hills","canyon","spikes","noise"]},groundYScale:{type:"float",default:3,min:0,max:50},groundTexture:{default:"none",oneOf:["none","checkerboard","squares","walkernoise"]},groundColor:{type:"color",default:"#553e35"},groundColor2:{type:"color",default:"#694439"},dressing:{default:"none",oneOf:["none","cubes","pyramids","cylinders","hexagons","stones","trees","mushrooms","towers","apparatus","arches","torii"]},dressingAmount:{type:"int",default:10,min:0,max:1e3},dressingColor:{type:"color",default:"#795449"},dressingScale:{type:"float",default:5,min:0,max:100},dressingVariance:{type:"vec3",default:{x:1,y:1,z:1}},dressingUniformScale:{default:!0},dressingOnPlayArea:{type:"float",default:0,min:0,max:1},grid:{default:"none",oneOf:["none","1x1","2x2","crosses","dots","xlines","ylines"]},gridColor:{type:"color",default:"#ccc"}},multiple:!1,presets:{none:{},default:{active:!0,seed:1,skyType:"atmosphere",skyColor:"#88c",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"checkerboard",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:1,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#ccc",shadow:!1},labs:{active:!0,seed:1,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"point",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3,groundTexture:"none",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!0},labs2:{active:!0,seed:1,skyType:"gradient",skyColor:"#88c",horizonColor:"#ddd",lighting:"point",lightPosition:{x:-.11,y:1,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3,groundTexture:"checkerboard",groundColor:"#454545",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!1},ndmvr:{active:!0,seed:1,skyType:"atmosphere",skyColor:"skyblue",horizonColor:"silver",lighting:"point",lightPosition:{x:-.11,y:3,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"none",groundColor:"#aaa",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:1},govorun:{active:!0,seed:1,background:"./assets/ndmvr/backgrounds/govorun.jpg",lighting:"point",lightPosition:{x:-.11,y:1,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"none",groundColor:"#797268",groundColor2:"#5d5d5d",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:!1},cern:{active:!0,seed:1,background:"./assets/ndmvr/backgrounds/background1.jpg",lighting:"point",lightPosition:{x:-.11,y:1,z:.5},fog:.1,flatShading:!1,playArea:1.3,ground:"flat",groundYScale:3,groundTexture:"checkerboard",groundColor:"none",groundColor2:"none",dressing:"none",dressingAmount:10,dressingColor:"#795449",dressingScale:.5,dressingVariance:{x:0,y:0,z:0},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#478d54",shadow:!1},contact:{active:!0,seed:14,skyType:"gradient",skyColor:"#478d54",horizonColor:"#b696cb",lighting:"distant",lightPosition:{x:0,y:2.01,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"spikes",groundYScale:2.91,groundTexture:"none",groundColor:"#2e455f",groundColor2:"#694439",dressing:"none",dressingAmount:10,dressingColor:"#657067",dressingScale:20,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#478d54",shadow:!1},egypt:{active:!0,seed:60,skyType:"gradient",skyColor:"#1b7660",horizonColor:"#e4b676",lighting:"distant",lightPosition:{x:0,y:1.65,z:.3},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:5,groundTexture:"walkernoise",groundColor:"#664735",groundColor2:"#6c4b39",dressing:"pyramids",dressingAmount:5,dressingColor:"#7c5c45",dressingScale:5,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"spots",gridColor:"#e4b676",shadow:!1},checkerboard:{active:!0,seed:5,skyType:"gradient",skyColor:"#0d0d0d",horizonColor:"#404040",lighting:"distant",lightPosition:{x:0,y:1,z:.2},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:4.81,groundTexture:"checkerboard",groundColor:"#615C32",groundColor2:"#11111",dressing:"cubes",dressingAmount:22,dressingColor:"#9f9f9f",dressingScale:1.51,dressingVariance:{x:5,y:20,z:5},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#ccc",shadow:!1},forest:{active:!0,seed:8,skyType:"gradient",skyColor:"#24b59f",horizonColor:"#eff9b7",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1,ground:"noise",groundYScale:4.18,groundTexture:"squares",groundColor:"#937a24",groundColor2:"#987d2e",dressing:"trees",dressingAmount:500,dressingColor:"#888b1d",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!1},winter:{active:!0,seed:8,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1,ground:"noise",groundYScale:4.18,groundTexture:"none",groundColor:"#f0f0f0",groundColor2:"#987d2e",dressing:"trees",dressingAmount:500,dressingColor:"#fcfcfc",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!0},bow:{active:!0,seed:4,skyType:"gradient",skyColor:"#24b59f",horizonColor:"#eff9b7",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:4.18,groundTexture:"squares",groundColor:"#937a24",groundColor2:"#987d2e",dressing:"trees",dressingAmount:38,dressingColor:"#888b1d",dressingScale:1,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#c5a543",shadow:!1},goaland:{active:!0,seed:17,skyType:"gradient",skyColor:"#14645f",horizonColor:"#a3dab8",lighting:"point",lightPosition:{x:.1,y:4,z:.56},fog:.1,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:.81,groundTexture:"none",groundColor:"#752944",groundColor2:"#db4453",dressing:"none",dressingAmount:2,dressingColor:"#a9313d",dressingScale:5,dressingVariance:{x:5,y:10,z:5},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"dots",gridColor:"#239893",shadow:!1},yavapai:{active:!0,seed:11,skyType:"gradient",skyColor:"#239849",horizonColor:"#cfe0af",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:9.76,groundTexture:"walkernoise",groundColor:"#C66344",groundColor2:"#c96b4b",dressing:"stones",dressingAmount:5,dressingColor:"#C66344",dressingScale:.06,dressingVariance:{x:.2,y:.1,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#239893",shadow:!1},goldmine:{active:!0,seed:53,skyType:"gradient",skyColor:"#1e1c1a",horizonColor:"#8c7964",lighting:"point",lightPosition:{x:-.09,y:3,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:50,groundTexture:"none",groundColor:"#353535",groundColor2:"#454545",dressing:"none",dressingAmount:300,dressingColor:"#fe921b",dressingScale:.5,dressingVariance:{x:2,y:8,z:2},dressingUniformScale:!0,dressingOnPlayArea:.03,grid:"none",gridColor:"#ccc",shadow:!1},threetowers:{active:!0,seed:5,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.8,ground:"spikes",groundYScale:3,groundTexture:"walkernoise",groundColor:"#273a49",groundColor2:"#2b464f",dressing:"towers",dressingAmount:8,dressingColor:"#5f6d94",dressingScale:80,dressingVariance:{x:10,y:100,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#239893",shadow:!1},poison:{active:!0,seed:92,skyType:"gradient",skyColor:"#1ea84a",horizonColor:"#177132",lighting:"distant",lightPosition:{x:.5,y:1,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:3.6,groundTexture:"none",groundColor:"#000000",groundColor2:"#912235",dressing:"hexagons",dressingAmount:20,dressingColor:"#c7415b",dressingScale:20,dressingVariance:{x:20,y:200,z:20},dressingUniformScale:!1,dressingOnPlayArea:0,grid:"crosses",gridColor:"#1ea84a",shadow:!1},arches:{active:!0,seed:89,skyType:"atmosphere",skyColor:"#8cbdc8",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:-.11,y:.45,z:.33},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:10,groundTexture:"walkernoise",groundColor:"#a87d6f",groundColor2:"#795449",dressing:"arches",dressingAmount:7,dressingColor:"#795449",dressingScale:20,dressingVariance:{x:20,y:40,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"none",gridColor:"#ccc",shadow:!1},tron:{active:!0,seed:14,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:.12,y:.62,z:.1},fog:.1,flatShading:!1,playArea:1.3,ground:"spikes",groundYScale:3.1,groundTexture:"none",groundColor:"#061123",groundColor2:"#694439",dressing:"none",dressingAmount:5,dressingColor:"#fb000e",dressingScale:15,dressingVariance:{x:20,y:20,z:20},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#fb000e",shadow:!0},japan:{active:!0,seed:14,skyType:"gradient",skyColor:"#7e5db5",horizonColor:"#b4adda",lighting:"distant",lightPosition:{x:1.33,y:1,z:.24},fog:.9,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:5,groundTexture:"walkernoise",groundColor:"#7e5db5",groundColor2:"#cabdf5",dressing:"torii",dressingAmount:6,dressingColor:"#bc5e7c",dressingScale:15,dressingVariance:{x:0,y:0,z:15},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"spots",gridColor:"#e4b676",shadow:!1},dream:{active:!0,seed:5,skyType:"gradient",skyColor:"#87faf4",horizonColor:"#b34093",lighting:"distant",lightPosition:{x:-.72,y:.53,z:.97},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:20,groundTexture:"checkerboard",groundColor:"#b34093",groundColor2:"#c050a2",dressing:"mushrooms",dressingAmount:2,dressingColor:"#3cf7ed",dressingScale:.2,dressingVariance:{x:.2,y:.2,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#239893",shadow:!1},volcano:{active:!0,seed:5,skyType:"gradient",skyColor:"#4a070f",horizonColor:"#f62300",lighting:"point",lightPosition:{x:.5,y:2.25,z:0},fog:.1,flatShading:!1,playArea:1.3,ground:"canyon",groundYScale:7.6,groundTexture:"walkernoise",groundColor:"#fb0803",groundColor2:"#510000",dressing:"arches",dressingAmount:20,dressingColor:"#fe921b",dressingScale:.1,dressingVariance:{x:10,y:100,z:10},dressingUniformScale:!1,dressingOnPlayArea:0,grid:"none",gridColor:"#fa0e00",shadow:!1},starry:{active:!0,seed:1,skyType:"atmosphere",skyColor:"AEA09F",horizonColor:"#ddd",lighting:"distant",lightPosition:{x:0,y:1,z:.06},fog:.1,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"none",groundColor:"#553e35",groundColor2:"#694439",dressing:"none",dressingAmount:100,dressingColor:"#795449",dressingScale:5,dressingVariance:{x:1,y:1,z:1},dressingUniformScale:!0,grid:"1x1",dressingOnPlayArea:0,gridColor:"#39d2f2",shadow:!1},osiris:{active:!0,seed:46,skyType:"atmosphere",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:0,y:.2,z:.46},fog:0,flatShading:!1,playArea:1.3,ground:"hills",groundYScale:3,groundTexture:"none",groundColor:"#9e7b47",groundColor2:"#9e7b47",dressing:"pyramids",dressingAmount:3,dressingColor:"#9e7b47",dressingScale:5,dressingVariance:{x:30,y:30,z:30},dressingUniformScale:!0,grid:"dots",dressingOnPlayArea:0,gridColor:"#daa452",shadow:!1},moon:{active:!0,seed:11,skyType:"gradient",skyColor:"skyblue",horizonColor:"#fcfcfc",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.1,flatShading:!0,playArea:1.3,ground:"canyon",groundYScale:9.76,groundTexture:"walkernoise",groundColor:"#D1D1D1",groundColor2:"#987d2e",dressing:"stones",dressingAmount:100,dressingColor:"#494949",dressingScale:.06,dressingVariance:{x:.2,y:.1,z:.2},dressingUniformScale:!0,dressingOnPlayArea:1,grid:"none",gridColor:"#c5a543",shadow:!1},snow:{active:!0,seed:4,skyType:"gradient",skyColor:"skyblue",horizonColor:"silver",lighting:"distant",lightPosition:{x:-1.2,y:.88,z:-.55},fog:.4,flatShading:!1,playArea:1.3,ground:"noise",groundYScale:3.18,groundTexture:"none",groundColor:"#f0f0f0",groundColor2:"#987d2e",dressing:"trees",dressingAmount:2,dressingColor:"#fcfcfc",dressingScale:1.3,dressingVariance:{x:10,y:10,z:10},dressingUniformScale:!0,dressingOnPlayArea:0,grid:"1x1",gridColor:"#39d2f2",shadow:!0}},init:function(){this.environmentData={},this.STAGE_SIZE=200,this.assets={arches:[{type:"mesh",vertices:[409,268,4,351,228,36,336,236,-57,-152,391,69,-135,358,88,-119,330,43,-20,358,-35,-153,357,-47,37,413,-26,-20,411,-14,-302,148,154,-339,121,-126,-389,200,-88,-477,193,-76,-314,346,-19,-314,306,-30,-250,296,-73,-267,237,-82,-212,303,-68,-245,200,-67,-223,304,108,-329,299,107,-289,350,76,-320,342,69,119,373,-39,38,370,8,113,367,52,492,202,-31,462,83,-104,447,71,-80,426,112,25,482,189,-7,222,372,6,121,402,41,87,382,67,221,346,55,559,93,-13,528,47,39,505,21,-111,528,54,-101,616,31,-53,442,256,-15,300,338,19,257,308,-79,408,256,-74,312,352,-26,384,297,-31,437,257,-47,-29,415,53,-232,377,59,-139,335,77,-132,344,2,-18,377,-37,-171,387,-28,-254,384,18,-651,-27,27,-435,-28,179,-345,149,165,-272,-28,23,-215,146,-2,-279,-29,-59,-211,145,-55,-337,-28,-128,-413,247,0,-293,363,24,-214,254,-36,-164,290,33,-284,150,94,-218,362,105,75,369,29,518,147,-63,447,190,-70,445,56,-105,391,185,-60,431,49,-33,459,83,26,470,162,42,130,390,53,167,341,-30,125,394,-45,239,368,-17,91,414,10,450,18,2,449,-27,-9,436,-28,-58,496,-27,-110,582,-28,-140,647,-27,-56,325,325,-45,-307,297,-56,-647,-28,-45,-188,310,-54,-264,197,113,-367,175,139,8,387,82,426,45,-55,114,359,-28,500,27,44,461,-29,13,-512,-27,-151,-152,376,-38,-490,-28,148,12,370,-28,442,160,42,465,194,32,381,183,-33,649,-27,-34,444,16,29,616,-28,25,417,267,-66,-132,352,-34,-322,-27,130,-271,86,-115,-635,-28,-121,-291,203,-99,176,405,-10,561,52,-93,371,305,9,311,237,-22,377,200,-81,-129,406,46,-154,371,99,-82,361,71,-21,354,26,-91,363,-27,-165,413,-12,-414,215,110,-238,127,26,-408,-28,-128,-674,-28,-94,-446,232,-39,-311,226,-90,-255,210,-61,-235,192,-11,-217,218,58,-269,299,124,-386,276,78,-399,281,42,15,373,58,16,393,75,549,107,-46,481,188,-68,409,120,-41,541,81,12,230,368,41,194,350,-50,224,361,-50,604,-28,-10,602,-27,35,486,56,-121,502,69,-120,457,-27,-110,226,317,-40,-584,-28,-124,439,-26,-30,467,-26,39,547,-27,-146,21,368,14,466,229,-29,578,-27,44,609,-27,-96,291,356,-15,290,306,34,255,321,28,231,311,-5,-251,386,50,-183,307,87,-152,307,24,-264,373,-12,-392,-27,190,-333,-28,84,-281,-27,54,-270,-28,-23,-308,-28,-101,-687,-27,-59,39,418,39,413,163,25,404,206,-90,54,400,-31,121,352,8,-454,41,148,-426,9,182,-564,115,3,-427,27,-107,-548,118,-32,-556,122,-53,-517,91,-101,-475,54,140,-461,52,-134,-558,119,-71,-434,286,59,-687,-31,52,-595,146,22,-670,-28,164,-537,166,122,-575,-28,217,-566,159,65,-470,152,136,-712,-29,102,-639,-29,211,-532,-30,181,-442,-30,-100],faces:[76,104,162,1,176,103,103,76,1,2,119,73,73,105,2,2,118,152,45,161,46,46,109,45,3,120,49,49,68,3,3,121,139,139,48,3,4,122,94,94,121,4,6,123,124,9,175,81,10,169,111,10,67,92,88,43,146,11,131,114,11,128,183,13,130,15,90,184,174,90,182,184,130,184,63,14,130,63,15,130,14,16,131,12,15,168,53,18,91,17,131,16,17,65,133,132,65,132,91,67,134,166,166,92,67,20,135,92,20,166,4,4,121,20,22,135,68,25,102,96,25,157,102,69,138,157,69,157,25,39,150,71,71,141,39,28,150,149,149,72,28,142,176,105,36,140,27,27,143,36,32,115,81,32,144,161,161,80,32,77,35,144,34,26,77,78,179,96,145,152,78,178,79,145,80,146,79,147,140,36,143,108,36,143,37,148,74,95,154,154,83,74,72,149,151,151,95,72,38,150,156,40,147,106,70,140,40,40,116,70,42,162,0,35,163,162,43,145,146,46,117,41,47,158,27,48,139,175,122,138,94,157,138,123,52,178,102,52,102,6,52,124,7,7,100,52,53,125,8,57,93,181,56,169,181,59,127,58,60,173,61,62,128,11,11,112,62,65,91,167,65,167,66,126,93,21,22,68,49,72,95,29,142,29,74,74,82,142,75,107,97,75,97,103,76,97,37,104,143,31,78,152,164,78,164,179,79,178,8,97,155,159,107,98,155,83,98,82,154,95,84,39,116,86,86,156,39,87,160,116,24,145,96,162,104,0,105,118,2,43,177,119,44,177,43,91,51,167,44,88,109,46,161,117,3,68,121,3,48,120,4,166,50,50,122,4,5,123,122,123,138,122,110,124,51,170,10,111,110,91,7,7,124,110,8,125,9,9,81,8,186,12,188,92,135,10,11,114,112,64,63,137,13,15,89,89,53,100,64,168,14,14,168,15,89,100,16,16,12,89,100,18,16,17,91,132,112,19,61,18,7,91,19,17,132,133,127,59,133,59,61,136,21,22,134,127,133,20,92,166,121,135,20,158,31,27,21,135,22,23,137,136,24,102,178,178,145,24,25,179,69,26,94,138,27,140,70,27,70,141,150,177,71,28,177,150,29,142,73,73,119,29,142,82,30,30,176,142,107,75,82,31,143,27,33,81,175,31,41,104,115,79,8,32,33,144,80,115,32,33,175,139,35,162,42,77,139,34,163,26,179,163,179,164,78,96,145,177,29,119,108,143,148,148,37,159,97,159,37,74,83,82,38,149,150,156,150,39,40,106,87,87,116,40,140,147,40,161,144,42,42,117,161,41,0,104,41,117,0,0,117,42,164,118,163,1,163,118,118,176,1,118,105,176,152,118,164,43,152,145,43,119,2,71,109,141,47,41,158,44,71,177,45,109,88,45,88,146,46,47,109,141,47,27,167,50,166,49,120,165,139,121,94,5,122,50,123,51,124,157,6,102,157,123,6,100,8,178,5,167,51,6,124,52,100,178,52,53,168,125,125,165,120,54,125,168,9,48,175,120,9,125,93,10,135,181,101,56,57,169,10,59,172,61,67,170,171,67,171,127,58,127,171,129,186,113,60,61,172,61,173,112,62,112,173,174,189,129,165,64,23,64,137,23,165,22,49,64,54,168,17,114,131,17,112,114,66,133,65,19,132,133,19,133,61,134,133,66,166,134,66,166,66,167,93,135,21,68,135,121,23,136,22,94,34,139,25,96,179,26,138,69,69,179,26,30,103,176,116,141,70,39,141,116,73,142,105,143,76,37,26,35,77,103,97,76,77,144,33,33,139,77,38,151,149,80,161,45,80,45,146,81,115,8,107,155,97,82,98,107,95,151,84,38,156,85,86,116,160,96,102,24,72,29,28,29,95,74,75,30,82,108,147,36,88,44,43,91,110,51,170,67,10,11,183,131,64,14,63,89,15,53,100,7,18,112,17,19,127,134,67,136,126,21,158,41,31,33,32,81,115,80,79,177,28,29,43,2,152,71,44,109,47,46,41,141,109,47,167,5,50,123,5,51,100,53,8,125,54,165,9,120,48,93,57,10,59,58,172,174,185,189,165,54,64,165,23,22,94,26,34,30,75,103,143,104,76,26,163,35,38,85,151,192,182,191,183,128,201,12,13,89,181,169,57,186,153,113,188,183,99,184,182,63,185,13,189,180,181,93,186,99,153,189,186,129,185,184,130,186,13,12,187,93,126,193,199,194,194,196,193,200,187,195,187,197,195,187,126,197,197,190,194,190,136,137,190,196,194,63,182,192,63,192,196,192,198,196,191,182,55,193,196,198,194,199,197,195,197,199,136,197,126,190,137,63,190,63,196,197,136,190,192,191,198,201,99,183,90,55,182,181,180,101,185,130,13,186,188,99,186,189,13,187,180,93,200,101,187,183,188,131,184,185,174,180,187,101,16,18,17,12,131,188,35,42,144,163,1,162,76,162,1,79,146,145]}],stones:[{type:"mesh",vertices:[-376,189,42,230,223,-310,353,162,-62,414,-23,-67,256,90,-475,24,85,-526,-418,-16,57,-432,66,-40,-199,151,-376,-155,49,467,-91,289,201,293,197,91,81,-17,-480,42,108,431,-359,-17,-250,383,-19,-243,194,-15,270,-272,180,293,-86,212,262,234,54,297,395,97,-302,-123,-21,-444,-416,-19,-123,-323,-18,267,-100,-16,429,-300,96,-361,163,-19,409,118,201,-431,-241,-18,391,-130,274,-309,306,-19,-399,-221,96,404],faces:[31,18,17,0,17,18,3,20,2,18,11,10,29,27,8,27,29,1,0,18,10,10,29,0,16,19,26,11,2,1,20,30,4,20,3,15,30,12,4,4,12,5,5,27,4,4,27,20,21,25,5,7,8,25,22,7,14,7,25,14,23,28,31,0,7,17,24,26,9,31,28,9,8,27,5,2,20,1,13,19,18,10,11,1,19,13,26,3,11,19,19,16,3,11,3,2,11,18,19,20,15,30,29,10,1,25,21,14,8,5,25,5,12,21,6,7,22,7,6,23,8,0,29,8,7,0,23,31,7,13,31,9,18,31,13,9,28,24,26,13,9,27,1,20,7,31,17]},{type:"mesh",vertices:[-217,34,-153,198,90,20,212,85,169,-131,93,171,197,113,30,173,121,164,315,29,-16,219,24,189,282,50,-102,232,38,-181,-195,-9,-166,-156,30,-207,-51,-9,-231,-180,91,-173,-19,73,-204,-280,23,96,-242,100,107,3,158,-82,109,88,221,275,-10,-40,236,-10,-135,-178,49,184,-1,-10,-243,265,-11,109,-12,-9,237,-36,46,251,-233,86,-81,93,77,-171,-163,133,69,18,16,263,296,44,93,131,-12,-226,-89,-10,-201,-273,-10,-51,-240,-9,110,190,-12,192,-253,-11,-92,42,43,-258,-115,-11,238,168,99,-88,-285,-10,24,71,124,-158,298,-10,10,116,150,-24,-282,44,39],faces:[44,16,26,13,26,16,0,26,13,27,14,41,4,5,1,7,30,2,28,5,43,41,39,27,17,43,41,43,4,39,13,28,17,17,41,13,28,43,17,24,29,38,29,35,7,18,25,29,5,18,2,18,5,3,30,42,6,30,35,23,19,20,8,8,20,9,9,39,8,1,30,8,31,37,9,11,14,37,14,27,37,32,11,12,11,37,12,11,0,13,33,40,44,44,26,33,33,0,36,34,38,15,44,40,15,21,3,16,27,39,9,2,30,1,21,25,3,16,3,28,28,3,5,4,43,5,41,43,39,13,16,28,25,21,38,38,29,25,7,18,29,29,24,35,18,7,2,18,3,25,30,23,42,30,7,35,8,30,6,6,19,8,6,42,19,8,39,1,37,31,22,27,9,37,9,20,31,10,11,32,11,10,0,12,37,22,14,13,41,14,11,13,33,26,0,36,0,10,21,44,15,16,44,21,15,40,34,38,21,15,4,1,39,5,2,1]},{type:"mesh",vertices:[-101,102,57,99,35,102,40,72,80,59,14,-168,-186,22,45,-176,25,-30,66,-7,146,153,-7,53,-110,47,-96,-90,-8,-146,150,-7,-12,-200,-7,8,-173,-7,-55,55,46,-60,125,-7,110,136,30,-10,-149,58,68,-15,82,-71,98,-7,-86,-34,-6,-194,-33,-7,171,-36,65,137,38,-8,-192,-103,-9,147,-12,62,-152],faces:[2,17,0,17,8,0,17,24,8,19,24,22,5,11,4,2,13,17,17,13,24,21,23,20,1,2,21,7,15,1,7,10,15,5,9,12,15,18,13,0,5,16,0,8,5,1,15,2,10,18,15,3,13,18,24,3,22,11,23,4,4,16,5,16,4,23,24,13,3,15,13,2,6,1,21,6,21,20,6,14,1,2,0,21,1,14,7,3,18,22,8,24,19,8,19,9,12,11,5,5,8,9,16,23,21,16,21,0]},{type:"mesh",vertices:[86,55,-18,58,38,73,97,-12,79,135,7,10,-93,-11,-72,-133,5,33,13,68,-32,94,-11,-57,-90,52,53,-24,-11,-106,-13,-10,104,-75,49,-69,-12,18,114,49,-12,-96,-46,-11,-85,-119,-11,-26,48,5,-111,-58,-11,105,-117,-12,52,-5,35,-93,123,-11,7],faces:[5,8,11,2,3,1,8,1,6,11,8,6,6,19,11,10,12,17,20,7,3,3,7,16,16,0,3,16,9,19,14,4,9,15,18,5,5,11,15,18,17,5,19,0,16,1,3,0,0,6,1,19,6,0,12,8,17,2,1,12,12,10,2,1,8,12,3,2,20,16,13,9,16,7,13,19,4,11,15,11,4,17,8,5,9,4,19]}],torii:[{type:"mesh",mirror:!0,flatShading:!0,vertices:[692,966,-52,661,834,-52,692,966,52,661,834,52,0,894,-52,0,776,-52,0,894,52,0,776,52,518,935,52,345,913,52,170,899,52,162,779,52,328,790,52,494,808,52,170,899,-52,345,913,-52,518,935,-52,494,808,-52,328,790,-52,162,779,-52,0,618,16,0,697,16,0,618,-16,0,697,-16,586,618,16,586,697,16,586,618,-16,586,697,-16,331,-29,-75,331,766,-52,369,-29,-65,357,766,-45,396,-29,-37,377,766,-26,406,-29,0,384,766,0,396,-29,37,377,766,26,369,-29,65,357,766,45,331,-29,75,331,766,52,294,-29,65,305,766,45,267,-29,37,286,766,26,257,-29,0,279,766,0,267,-29,-37,286,766,-26,294,-29,-65,305,766,-45,0,777,85,0,681,33,333,762,-75,333,806,-75,371,762,-65,371,806,-65,398,762,-37,398,806,-37,408,762,0,408,806,0,398,762,37,398,806,37,371,762,65,371,806,65,333,762,75,333,806,75,296,762,65,296,806,65,268,762,37,268,806,37,258,762,0,258,806,0,268,762,-37,268,806,-37,296,762,-65,296,806,-65,0,681,-33,0,777,-85,52,681,33,52,777,85,52,681,-33,52,777,-85],faces:[4,10,14,1,13,17,11,6,7,0,3,1,16,1,17,4,19,5,14,18,19,15,17,18,3,8,13,13,9,12,12,10,11,19,7,5,19,12,11,18,13,12,16,2,0,15,8,16,14,9,15,23,26,22,27,24,26,25,20,24,26,20,22,23,25,27,29,30,28,31,32,30,33,34,32,35,36,34,37,38,36,39,40,38,41,42,40,43,44,42,45,46,44,47,48,46,49,50,48,51,28,50,55,56,54,57,58,56,59,60,58,61,62,60,63,64,62,79,81,83,65,66,64,82,53,78,67,68,66,81,53,80,69,70,68,83,80,82,71,72,70,79,82,78,73,74,72,75,63,59,75,76,74,77,54,76,60,68,76,4,6,10,1,3,13,11,10,6,0,2,3,16,0,1,4,14,19,14,15,18,15,16,17,3,2,8,13,8,9,12,9,10,19,11,7,19,18,12,18,17,13,16,8,2,15,9,8,14,10,9,23,27,26,27,25,24,25,21,20,26,24,20,23,21,25,29,31,30,31,33,32,33,35,34,35,37,36,37,39,38,39,41,40,41,43,42,43,45,44,45,47,46,47,49,48,49,51,50,51,29,28,55,57,56,57,59,58,59,61,60,61,63,62,63,65,64,79,52,81,65,67,66,82,80,53,67,69,68,81,52,53,69,71,70,83,81,80,71,73,72,79,83,82,73,75,74,59,57,55,55,77,75,75,73,71,71,69,75,67,65,63,63,61,59,59,55,75,75,69,67,67,63,75,75,77,76,77,55,54,76,54,56,56,58,76,60,62,68,64,66,68,68,70,72,72,74,68,76,58,60,62,64,68,68,74,76]}],hexagons:[{type:"extrude",vertices:[-.198,-.302,.197,-.3,.372,0,.199,.298,-.202,.298,-.368,0]}],towers:[{type:"extrude",vertices:[-.054,-.178,-.007,-.182,.069,-.027,.189,.079,.178,.124,-.007,.097,-.145,.182,-.178,.144,-.079,-.021]},{type:"lathe",segments:4,vertices:[.004,.02,.012,.092,.042,.166,.067,.55,.101,.594,.105,.838,.193,.934,.18,.994]},{type:"lathe",segments:5,vertices:[.069,.216,.067,.562,.126,.562,.128,.774,.191,.774,.193,.986]}],trees:[{type:"lathe",noise:.015,segments:6,vertices:[1e-6,.826,.054,.832,.105,.854,.136,.9,.136,.958,.118,.994]},{type:"lathe",noise:.015,segments:14,vertices:[1e-6,.01,.069,.022,.13,.068,.178,.18,.189,.32,.191,.59,.193,.75,.138,.79,.018,.808,.018,.996]},{type:"lathe",noise:.015,segments:14,vertices:[1e-6,.436,.126,.46,.201,.57,.219,.72,.154,.846,.028,.884,.034,.996]}],apparatus:[{type:"lathe",segments:10,vertices:[1e-6,.23,.042,.23,.069,.36,.038,.362,.038,.372,.06,.372,.073,.572,.024,.572,.024,.67,.069,.67,.075,.722,.097,.724,.105,.852,.083,.902,.065,.902,.065,.924,.128,.924,.146,.996]},{type:"lathe",segments:16,vertices:[1e-6,.232,.229,.182,.486,.07,.356,.182,.213,.242,.154,.242,.144,.262,.178,.262,.126,.314,.04,.328,.038,.374,.058,.374,.071,.408,.026,.406,.03,.42,.091,.418,.034,.496,.01,.498,.03,.506,.014,.998]}],mushrooms:[{type:"lathe",noise:.02,segments:14,vertices:[1e-6,.006,.13,.018,.341,.084,.437,.144,.492,.234,.484,.246,.276,.232,.107,.284,.046,.346,.062,.852,.097,.956,.166,.998]},{type:"lathe",noise:.02,segments:10,vertices:[1e-6,.562,.091,.572,.172,.61,.223,.666,.256,.74,.258,.806,.246,.824,.062,.826,.065,.948,.097,.998]},{type:"lathe",noise:.02,segments:10,vertices:[1e-6,.768,.099,.772,.219,.802,.306,.844,.352,.886,.352,.908,.118,.904,.107,.93,.115,.966,.14,.996]}]};for(var r in this.assets)for(var n=0;n<this.assets[r].length;n++){var s=this.assets[r][n];if(s.type=="mesh")for(var a=0,l=s.vertices.length;a<l;a++)s.vertices[a]/=1e3}this.userFog=this.el.sceneEl.getAttribute("fog"),this.sky=document.createElement("a-sky"),this.sky.setAttribute("radius",this.STAGE_SIZE),this.sky.setAttribute("theta-length",110),this.sky.classList.add("environment"),this.stars=null,this.groundMaterial=null,this.ground=document.createElement("a-entity"),this.ground.setAttribute("rotation","-90 0 0"),this.ground.classList.add("environmentGround"),this.ground.classList.add("environment"),this.groundCanvas=null,this.groundTexture=null,this.groundMaterial=null,this.groundGeometry=null,this.dressing=document.createElement("a-entity"),this.dressing.classList.add("environmentDressing"),this.dressing.classList.add("environment"),this.gridCanvas=null,this.gridTexture=null,this.hemilight=document.createElement("a-entity"),this.hemilight.classList.add("environment"),this.hemilight.setAttribute("position","0 50 0"),this.hemilight.setAttribute("light",{type:"hemisphere",color:"#CEE4F0",intensity:.4}),this.sunlight=document.createElement("a-entity"),this.sunlight.classList.add("environment"),this.sunlight.setAttribute("position",this.data.lightPosition),this.sunlight.setAttribute("light",{intensity:.6}),this.el.appendChild(this.hemilight),this.el.appendChild(this.sunlight),this.el.appendChild(this.ground),this.el.appendChild(this.dressing),this.el.appendChild(this.sky)},getFogColor:function(r,n){var s;if(r=="color"||r=="none")s=new THREE.Color(this.environmentData.skyColor);else if(r=="gradient")s=new THREE.Color(this.environmentData.horizonColor);else if(r=="atmosphere"){var a=[1,.5,.22,.1,.05,0],l=["#C0CDCF","#81ADC5","#525e62","#2a2d2d","#141616","#000"];if(n<=0)return"#000";n=Math.min(1,n);for(var u=0;u<a.length;u++)if(n>a[u]){var f=new THREE.Color(l[u-1]),c=new THREE.Color(l[u]),p=(n-a[u])/(a[u-1]-a[u]);c.lerp(f,p),s=c;break}}return s.multiplyScalar(.9),s.lerp(new THREE.Color(this.data.groundColor),.3),"#"+s.getHexString()},update:function(r){var n;this.data.preset?(n=me.utils.clone(this.environmentData),this.environmentData={},Object.assign(this.environmentData,this.data),Object.assign(this.environmentData,this.presets[this.data.preset]),Object.assign(this.environmentData,this.el.components.environment.attrValue),console.log(this.environmentData)):(n=r,this.environmentData=this.data);var s=this.environmentData.background;s!=null&&this.sky.setAttribute("src",s);var a=this.environmentData.skyType,l=new THREE.Vector3(this.environmentData.lightPosition.x,this.environmentData.lightPosition.y,this.environmentData.lightPosition.z);if(l.normalize(),this.sunlight){if(this.sunlight.setAttribute("position",this.environmentData.lightPosition),a!="atmosphere"){var u=new THREE.Color(this.environmentData.skyColor);u.r=(u.r+1)/2,u.g=(u.g+1)/2,u.b=(u.b+1)/2,this.hemilight.setAttribute("light",{color:"#"+u.getHexString()}),this.sunlight.setAttribute("light",{intensity:.6}),this.hemilight.setAttribute("light",{intensity:.6})}else this.sunlight.setAttribute("light",{intensity:.1+.5*l.y}),this.hemilight.setAttribute("light",{intensity:.1+.5*l.y});this.sunlight.setAttribute("light",{castShadow:this.environmentData.shadow,shadowCameraLeft:-this.environmentData.shadowSize,shadowCameraBottom:-this.environmentData.shadowSize,shadowCameraRight:this.environmentData.shadowSize,shadowCameraTop:this.environmentData.shadowSize})}if(a!==n.skyType||this.environmentData.skyColor!=n.skyColor||this.environmentData.horizonColor!=n.horizonColor){var f={};f.shader={none:"flat",color:"flat",gradient:"gradientshader",atmosphere:"skyshader"}[a],this.stars&&this.stars.setAttribute("visible",a=="atmosphere"),a=="color"?(f.color=this.environmentData.skyColor,f.fog=!1):a=="gradient"&&(f.topColor=this.environmentData.skyColor,f.bottomColor=this.environmentData.horizonColor),this.sky.setAttribute("material",f)}a=="atmosphere"&&(this.sky.setAttribute("material",{sunPosition:l}),this.setStars(2e3*(1-Math.max(0,8*(l.y+.08))))),this.environmentData.fog>0?this.el.sceneEl.setAttribute("fog",{color:this.getFogColor(a,l.y),far:(1.01-this.environmentData.fog)*this.STAGE_SIZE*2}):this.el.sceneEl.removeAttribute("fog"),this.sunlight.setAttribute("light",{type:this.environmentData.lighting=="point"?"point":"directional"}),this.sunlight.setAttribute("visible",this.environmentData.lighting!=="none"),this.hemilight.setAttribute("visible",this.environmentData.lighting!=="none");var c=!this.groundGeometry||this.environmentData.seed!=n.seed||this.environmentData.ground!=n.ground||this.environmentData.playArea!=n.playArea||this.environmentData.flatShading!=n.flatShading;(c||this.environmentData.groundColor!=n.groundColor||this.environmentData.groundColor2!=n.groundColor2||this.environmentData.groundYScale!=n.groundYScale||this.environmentData.groundTexture!=n.groundTexture||this.environmentData.gridColor!=n.gridColor||this.environmentData.grid!=n.grid)&&(this.updateGround(c),this.hemilight&&this.hemilight.setAttribute("light",{groundColor:this.environmentData.groundColor})),this.environmentData.seed==n.seed&&this.environmentData.dressingOnPlayArea==n.dressingOnPlayArea&&this.environmentData.dressing==n.dressing&&this.environmentData.flatShading==n.flatShading&&this.environmentData.dressingAmount==n.dressingAmount&&this.environmentData.dressingScale==n.dressingScale&&this.environmentData.dressingColor==n.dressingColor&&this.environmentData.dressingVariance.x==n.dressingVariance.x&&this.environmentData.dressingVariance.y==n.dressingVariance.y&&this.environmentData.dressingVariance.z==n.dressingVariance.z&&this.environmentData.dressingUniformScale==n.dressingUniformScale||this.updateDressing(),this.sky.setAttribute("visible",a!=="none"),this.el.setAttribute("visible",this.environmentData.active),this.environmentData.active||(this.userFog?this.el.sceneEl.setAttribute("fog",this.userFog):this.el.sceneEl.removeAttribute("fog")),this.dumpParametersDiff()},logPreset:function(){var r="{";for(var n in this.schema)if(n!="preset"){r+=n+": ";var s=this.schema[n].type;r+=s=="vec3"?"{ x: "+this.environmentData[n].x+", y: "+this.environmentData[n].y+", z: "+this.environmentData[n].z+"}":s=="string"||s=="color"?'"'+this.environmentData[n]+'"':this.environmentData[n],r+=", "}r+="}",console.log(r)},dumpParametersDiff:function(){function r(p){return Math.floor(1e3*p)/1e3}var n=[],s=this.data.preset!="none"&&this.presets[this.data.preset];s&&n.push("preset: "+this.data.preset);for(var a in this.schema)if(!(a=="preset"||s&&s[a]===void 0)){var l=s?s[a]:this.schema[a].default,u=this.environmentData[a],f=this.schema[a].type;if(f=="vec3"){var c=l;typeof l=="string"&&(l=l.split(" "),c={x:l[0],y:l[1],z:l[2]}),r(c.x)==r(u.x)&&r(c.y)==r(u.y)&&r(c.z)==r(u.z)||n.push(a+": "+r(u.x)+" "+r(u.y)+" "+r(u.z))}else l!=u&&(this.schema[a].type=="number"&&(u=r(u)),n.push(a+": "+u))}console.log("%c"+n.join("; "),"color: #f48;font-weight:bold")},random:function(r){return parseFloat("0."+Math.sin(9999*this.environmentData.seed*r).toString().substr(7))},updateGround:function(r){var n=64;if(r){var s=this.environmentData.ground!="none";if(this.ground.setAttribute("visible",s),!s)return;this.groundGeometry||(this.groundGeometry=new THREE.PlaneGeometry(this.STAGE_SIZE+2,this.STAGE_SIZE+2,n-1,n-1));for(var a=new t(this.environmentData.seed),l=this.groundGeometry.attributes.position.array,u=l.length,f=10,c=f/n,p=0,C=0,y=2;y<u;y+=3)if(this.environmentData.ground!="flat"){var T;switch(this.environmentData.ground){case"hills":T=Math.max(0,a.noise(p,C,0));break;case"canyon":T=.2+.8*a.noise(p,C,0),T=Math.min(1,10*Math.pow(T,2));break;case"spikes":T=this.random(y)<.02?this.random(y+1):0;break;case"noise":T=this.random(y)<.35?this.random(y+1):0}T+=.1*this.random(y+2);var k=2*p/f-1,d=2*C/f-1,w=this.environmentData.playArea;k=Math.max(0,Math.min(1,(Math.abs(k)-(w-.9))*(1/w))),d=Math.max(0,Math.min(1,(Math.abs(d)-(w-.9))*(1/w))),T*=k>d?k:d,T<.01&&(T=0),l[y]=T,p+=c,p>=10&&(p=0,C+=c)}else l[y]=0;this.groundGeometry.computeVertexNormals(),this.groundGeometry.attributes.position.needsUpdate=!0,this.groundGeometry.attributes.normal.needsUpdate=!0}this.ground.setAttribute("scale",{z:this.environmentData.groundYScale});var E=2048,D=20,O=this.STAGE_SIZE/D;this.groundCanvas&&this.groundCanvas.width==E||(this.gridCanvas=document.createElement("canvas"),this.gridCanvas.width=E,this.gridCanvas.height=E,this.gridTexture=new THREE.Texture(this.gridCanvas),this.gridTexture.wrapS=THREE.RepeatWrapping,this.gridTexture.wrapT=THREE.RepeatWrapping,this.gridTexture.repeat.set(O,O),this.groundCanvas=document.createElement("canvas"),this.groundCanvas.width=E,this.groundCanvas.height=E,this.groundTexture=new THREE.Texture(this.groundCanvas),this.groundTexture.wrapS=THREE.RepeatWrapping,this.groundTexture.wrapT=THREE.RepeatWrapping,this.groundTexture.repeat.set(O,O),this.groundMaterialProps={map:this.groundTexture,emissive:new THREE.Color(16777215),emissiveMap:this.gridTexture},new THREE.Material().hasOwnProperty("shading")?this.groundMaterialProps.shading=this.environmentData.flatShading?THREE.FlatShading:THREE.SmoothShading:this.groundMaterialProps.flatShading=this.environmentData.flatShading,this.groundMaterial=new THREE.MeshLambertMaterial(this.groundMaterialProps));var g=this.groundCanvas.getContext("2d"),Z=this.gridCanvas.getContext("2d");if(this.drawTexture(g,E,D),Z.fillStyle="#000000",Z.fillRect(0,0,E,E),this.drawGrid(Z,E,D),this.groundTexture.needsUpdate=!0,this.gridTexture.needsUpdate=!0,r){var I=new THREE.Mesh(this.groundGeometry,this.groundMaterial);this.ground.setObject3D("mesh",I)}else this.ground.getObject3D("mesh").material=this.groundMaterial;this.ground.setAttribute("shadow",{cast:!1,receive:this.environmentData.shadow})},drawGrid:function(r,n,s){if(this.environmentData.grid!="none"){var a,l,u,f=Math.floor(s/2),c=n/(s/2);switch(r.fillStyle=this.environmentData.gridColor,this.environmentData.grid){case"1x1":case"2x2":for(this.environmentData.grid=="1x1"&&(f*=2,c=n/s),a=0;a<f;a++)u=Math.floor(a*c),r.fillRect(0,u,n,1),r.fillRect(u,0,1,n);break;case"crosses":var p=Math.floor(c/20);for(a=0;a<f+1;a++)for(u=Math.floor(a*c),l=0;l<f+1;l++){var C=Math.floor(-p+l*c);r.fillRect(C,u,2*p,1),r.fillRect(u,C,1,2*p)}break;case"dots":for(a=0;a<f+1;a++)for(l=0;l<f+1;l++)r.beginPath(),r.arc(Math.floor(l*c),Math.floor(a*c),4,0,2*Math.PI),r.fill();break;case"xlines":for(a=0;a<f;a++)r.fillRect(Math.floor(a*c),0,1,n);break;case"ylines":for(a=0;a<f;a++)r.fillRect(0,Math.floor(a*c),n,1)}}},drawTexture:function(r,n,s){r.fillStyle=this.environmentData.groundColor,r.fillRect(0,0,n,n);var a,l,u,f,c,p,C;if(this.environmentData.groundTexture!="none")switch(this.environmentData.groundTexture){case"checkerboard":r.fillStyle=this.environmentData.groundColor2;var y=Math.floor(s/2),T=n/(s/2);for(a=0;a<y+1;a+=2)for(var k=0;k<y+1;k++)r.fillRect(Math.floor((a+k%2)*T),Math.floor(k*T),Math.floor(T),Math.floor(T));break;case"squares":var d=16,w=n/d;for(u=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2),a=0;a<d*d;a++)l=this.random(a+3)>.5?u.clone():f.clone(),l.addScalar(.1*this.random(a+3)-.05),r.fillStyle="#"+l.getHexString(),r.fillRect(a%d*w,Math.floor(a/d)*w,w,w);break;case"noise":p=r.getImageData(0,0,n,n),c=p.data,u=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2);var E=new THREE.Color(f.r-u.r,f.g-u.g,f.b-u.b),D=new t;for(a=0,k=0,C=c.length;a<C;a+=4,k++){var O=D.noise(k%n/n*3,k/n/n*3,0);c[a+0]=Math.floor(255*(u.r+E.r*O)),c[a+1]=Math.floor(255*(u.g+E.g*O)),c[a+2]=Math.floor(255*(u.b+E.b*O))}r.putImageData(p,0,0);break;case"walkernoise":var g=Math.floor(n/2),Z=document.createElement("canvas");Z.width=g,Z.height=g;var I=Z.getContext("2d");I.fillStyle=this.environmentData.groundColor,I.fillRect(0,0,g,g),p=I.getImageData(0,0,g,g),c=p.data,u=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2);var P=[],F=1e3;for(a=0;a<F;a++)l=u.clone().lerp(f,Math.random()),P.push({x:Math.random()*g,y:Math.random()*g,r:Math.floor(255*l.r),g:Math.floor(255*l.g),b:Math.floor(255*l.b)});for(var ae=5e3,G=0;G<ae;G++)for(a=0;a<F;a++){var Y=P[a],X=4*Math.floor(Y.y*g+Y.x);c[X+0]=Y.r,c[X+1]=Y.g,c[X+2]=Y.b,Y.x+=Math.floor(3*Math.random())-1,Y.y+=Math.floor(3*Math.random())-1,Y.x>=g&&(Y.x=Y.x-g),Y.y>=g&&(Y.y=Y.y-g),Y.x<0&&(Y.x=g+Y.x),Y.y<0&&(Y.y=g+Y.y)}I.putImageData(p,0,0),r.drawImage(Z,0,0,n,n)}},getAssetGeometry:function(r){function n(w,E){for(var D=(new THREE.Vector3,w.attributes.position.array),O=D.length,g=0;g<O;g+=3)D[g]=(f.random(g)-.5)*E,D[g+1]=(f.random(g+O)-.5)*E,D[g+2]=(f.random(g+2*O)-.5)*E;w.attributes.position.needsUpdate=!0}if(!r)return null;for(var s,a,l,u=[],f=this,c=0;c<r.length;c++)if(r[c].type=="lathe"){var p=-99999,C=[];for(l=r[c].vertices,s=0;s<l.length;s+=2)C.push(new THREE.Vector2(l[s],l[s+1])),l[s+1]>p&&(p=l[s+1]);a=new THREE.LatheGeometry(C,r[c].segments||8),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI,0,0))),a.applyMatrix4(new THREE.Matrix4().makeTranslation(0,p,0)),a=a.toNonIndexed(),u.push(a)}else if(r[c].type=="extrude"){var y=new THREE.Shape;for(l=r[c].vertices,s=0;s<l.length;s+=2)s==0?y.moveTo(l[s],l[s+1]):y.lineTo(l[s],l[s+1]);a=new THREE.ExtrudeGeometry(y,{amount:1,bevelEnabled:!1}),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI/2,0,0))),r[c].noise&&n(a,r[c].noise),u.push(a)}else if(r[c].type=="mesh"){a=new THREE.BufferGeometry,l=r[c].vertices;var T=r[c].faces,k=new Float32Array(l);if(a.setIndex(T),a.setAttribute("position",new THREE.BufferAttribute(k,3)),r[c].mirror){var d=a.clone();d.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(0,Math.PI,0))),a=THREE.BufferGeometryUtils.mergeBufferGeometries([a,d])}r[c].noise&&n(a,r[c].noise),a=a.toNonIndexed(),a.computeVertexNormals(),u.push(a)}return u},updateDressing:function(){var r=new THREE.Object3D,n=[];if(this.dressing.setAttribute("visible",this.environmentData.dressing!="none"),this.environmentData.dressing!="none"){var s;switch(this.environmentData.dressing){case"cubes":s=[new THREE.BoxGeometry(1,1,1)],s[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"pyramids":s=[new THREE.ConeGeometry(1,1,4,1,!0)],s[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"cylinders":s=[new THREE.CylinderGeometry(.5,.5,1,8,1,!0)],s[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;default:if(s=this.getAssetGeometry(this.assets[this.environmentData.dressing]),!s)return}for(var a=0,l=88343;a<this.environmentData.dressingAmount;a++,l++){var u,f=(s[Math.floor(this.random(33+a)*s.length)].clone,s[Math.floor(this.random(33+a)*s.length)].clone()),c=this.environmentData.dressingScale,p=new THREE.Vector3(this.environmentData.dressingVariance.x,this.environmentData.dressingVariance.y,this.environmentData.dressingVariance.z),C=this.random(l)<this.environmentData.dressingOnPlayArea;u=C?15*this.random(l+1):10+Math.max(p.x,p.z)+10*this.random(l+1)+this.random(l+2)*this.STAGE_SIZE/3;var y=this.random(l+3)*Math.PI*2,T=new THREE.Matrix4,k=this.random(l+4),d=this.environmentData.dressingUniformScale;T.compose(new THREE.Vector3(Math.cos(y)*u,0,Math.sin(y)*u),new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,1,0),(this.random(l+5)-.5)*p.length()*Math.PI*2),new THREE.Vector3(c+(d?k:this.random(l+6))*p.x,c+(d?k:this.random(l+7))*p.y,c+(d?k:this.random(l+8))*p.z)),f.applyMatrix4(T),n.push(f)}var w=THREE.BufferGeometryUtils.mergeBufferGeometries(n);w.attributes.position.needsUpdate=!0;var E=new THREE.MeshLambertMaterial({color:new THREE.Color(this.environmentData.dressingColor)}),D=new THREE.Mesh(w,E);r.add(D),this.dressing.setObject3D("mesh",r)}},createStars:function(){for(var r=2e3,n=new THREE.BufferGeometry,s=new Float32Array(3*r),a=this.STAGE_SIZE-1,l=new THREE.Vector3,u=0;u<s.length;u+=3)l.set(this.random(u+23)-.5,this.random(u+24),this.random(u+25)-.5),l.normalize(),l.multiplyScalar(a),s[u]=l.x,s[u+1]=l.y,s[u+2]=l.z;n.setAttribute("position",new THREE.BufferAttribute(s,3)),n.setDrawRange(0,0);var f=new THREE.PointsMaterial({size:.01,color:13421772,fog:!1});this.stars.setObject3D("mesh",new THREE.Points(n,f))},setStars:function(r){this.stars||(this.stars=document.createElement("a-entity"),this.stars.id="stars",this.createStars(),this.el.appendChild(this.stars)),r=Math.floor(Math.min(2e3,Math.max(0,r))),this.stars.getObject3D("mesh").geometry.setDrawRange(0,r)}}),me.registerShader("skyshader",{schema:{luminance:{type:"number",default:1,min:0,max:2,is:"uniform"},turbidity:{type:"number",default:2,min:0,max:20,is:"uniform"},reileigh:{type:"number",default:1,min:0,max:4,is:"uniform"},mieCoefficient:{type:"number",default:.005,min:0,max:.1,is:"uniform"},mieDirectionalG:{type:"number",default:.8,min:0,max:1,is:"uniform"},sunPosition:{type:"vec3",default:{x:0,y:0,z:-1},is:"uniform"},color:{type:"color",default:"#fff"}},vertexShader:["varying vec3 vWorldPosition;","void main() {","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vWorldPosition = worldPosition.xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join(`
|
|
292
298
|
`),fragmentShader:["uniform sampler2D skySampler;","uniform vec3 sunPosition;","varying vec3 vWorldPosition;","vec3 cameraPos = vec3(0., 0., 0.);","uniform float luminance;","uniform float turbidity;","uniform float reileigh;","uniform float mieCoefficient;","uniform float mieDirectionalG;","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003;","const float N = 2.545E25;","const float pn = 0.035;","const vec3 lambda = vec3(680E-9, 550E-9, 450E-9);","const vec3 K = vec3(0.686, 0.678, 0.666);","const float v = 4.0;","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const vec3 up = vec3(0.0, 1.0, 0.0);","const float EE = 1000.0;","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","const float cutoffAngle = pi/1.95;","const float steepness = 1.5;","vec3 totalRayleigh(vec3 lambda)","{","return (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn));","}","vec3 simplifiedRayleigh()","{","return 0.0005 / vec3(94, 40, 18);","}","float rayleighPhase(float cosTheta)","{ ","return (3.0 / (16.0*pi)) * (1.0 + pow(cosTheta, 2.0));","}","vec3 totalMie(vec3 lambda, vec3 K, float T)","{","float c = (0.2 * T ) * 10E-18;","return 0.434 * c * pi * pow((2.0 * pi) / lambda, vec3(v - 2.0)) * K;","}","float hgPhase(float cosTheta, float g)","{","return (1.0 / (4.0*pi)) * ((1.0 - pow(g, 2.0)) / pow(1.0 - 2.0*g*cosTheta + pow(g, 2.0), 1.5));","}","float sunIntensity(float zenithAngleCos)","{","return EE * max(0.0, 1.0 - exp(-((cutoffAngle - acos(zenithAngleCos))/steepness)));","}","// Filmic ToneMapping http://filmicgames.com/archives/75","float A = 0.15;","float B = 0.50;","float C = 0.10;","float D = 0.20;","float E = 0.02;","float F = 0.30;","float W = 1000.0;","vec3 Uncharted2Tonemap(vec3 x)","{","return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;","}","void main() ","{","float sunfade = 1.0-clamp(1.0-exp((sunPosition.y/450000.0)),0.0,1.0);","float reileighCoefficient = reileigh - (1.0* (1.0-sunfade));","vec3 sunDirection = normalize(sunPosition);","float sunE = sunIntensity(dot(sunDirection, up));","vec3 betaR = simplifiedRayleigh() * reileighCoefficient;","vec3 betaM = totalMie(lambda, K, turbidity) * mieCoefficient;","float zenithAngle = acos(max(0.0, dot(up, normalize(vWorldPosition - cameraPos))));","float sR = rayleighZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","float sM = mieZenithLength / (cos(zenithAngle) + 0.15 * pow(93.885 - ((zenithAngle * 180.0) / pi), -1.253));","vec3 Fex = exp(-(betaR * sR + betaM * sM));","float cosTheta = dot(normalize(vWorldPosition - cameraPos), sunDirection);","float rPhase = rayleighPhase(cosTheta*0.5+0.5);","vec3 betaRTheta = betaR * rPhase;","float mPhase = hgPhase(cosTheta, mieDirectionalG);","vec3 betaMTheta = betaM * mPhase;","vec3 Lin = pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * (1.0 - Fex),vec3(1.5));","Lin *= mix(vec3(1.0),pow(sunE * ((betaRTheta + betaMTheta) / (betaR + betaM)) * Fex,vec3(1.0/2.0)),clamp(pow(1.0-dot(up, sunDirection),5.0),0.0,1.0));","vec3 direction = normalize(vWorldPosition - cameraPos);","float theta = acos(direction.y); // elevation --> y-axis, [-pi/2, pi/2]","float phi = atan(direction.z, direction.x); // azimuth --> x-axis [-pi/2, pi/2]","vec2 uv = vec2(phi, theta) / vec2(2.0*pi, pi) + vec2(0.5, 0.0);","vec3 L0 = vec3(0.1) * Fex;","float sundisk = smoothstep(sunAngularDiameterCos,sunAngularDiameterCos+0.00002,cosTheta);","L0 += (sunE * 19000.0 * Fex)*sundisk;","vec3 whiteScale = 1.0/Uncharted2Tonemap(vec3(W));","vec3 texColor = (Lin+L0); ","texColor *= 0.04 ;","texColor += vec3(0.0,0.001,0.0025)*0.3;","float g_fMaxLuminance = 1.0;","float fLumScaled = 0.1 / luminance; ","float fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (g_fMaxLuminance * g_fMaxLuminance)))) / (1.0 + fLumScaled); ","float ExposureBias = fLumCompressed;","vec3 curr = Uncharted2Tonemap((log2(2.0/pow(luminance,4.0)))*texColor);","vec3 color = curr*whiteScale;","vec3 retColor = pow(color,vec3(1.0/(1.2+(1.2*sunfade))));","gl_FragColor.rgb = retColor;","gl_FragColor.a = 1.0;","}"].join(`
|
|
293
|
-
`)}),
|
|
299
|
+
`)}),me.registerShader("gradientshader",{schema:{topColor:{type:"color",default:"1 0 0",is:"uniform"},bottomColor:{type:"color",default:"0 0 1",is:"uniform"}},vertexShader:["varying vec3 vWorldPosition;","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0 );","}"].join(`
|
|
294
300
|
`),fragmentShader:["uniform vec3 bottomColor;","uniform vec3 topColor;","uniform float offset;","varying vec3 vWorldPosition;","void main() {"," float h = normalize( vWorldPosition ).y;"," gl_FragColor = vec4( mix( bottomColor, topColor, max( pow( max(h, 0.0 ), 0.8 ), 0.0 ) ), 1.0 );","}"].join(`
|
|
295
|
-
`)});var t=function(r){var n;this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.p=[];var s;for(s=0;s<256;s++)n=parseFloat("0."+Math.sin(9999*r*s).toString().substr(7)),this.p[s]=Math.floor(256*n);for(this.perm=[],s=0;s<512;s++)this.perm[s]=this.p[255&s]};t.prototype.dot=function(r,n,s,a){return r[0]*n+r[1]*s+r[2]*a},t.prototype.mix=function(r,n,s){return(1-s)*r+s*n},t.prototype.fade=function(r){return r*r*r*(r*(6*r-15)+10)},t.prototype.noise=function(r,n,s){var a=Math.floor(r),l=Math.floor(n),u=Math.floor(s);r-=a,n-=l,s-=u,a&=255,l&=255,u&=255;var f=this.perm[a+this.perm[l+this.perm[u]]]%12,c=this.perm[a+this.perm[l+this.perm[u+1]]]%12,p=this.perm[a+this.perm[l+1+this.perm[u]]]%12,S=this.perm[a+this.perm[l+1+this.perm[u+1]]]%12,b=this.perm[a+1+this.perm[l+this.perm[u]]]%12,T=this.perm[a+1+this.perm[l+this.perm[u+1]]]%12,C=this.perm[a+1+this.perm[l+1+this.perm[u]]]%12,d=this.perm[a+1+this.perm[l+1+this.perm[u+1]]]%12,E=this.dot(this.grad3[f],r,n,s),w=this.dot(this.grad3[b],r-1,n,s),D=this.dot(this.grad3[p],r,n-1,s),O=this.dot(this.grad3[C],r-1,n-1,s),g=this.dot(this.grad3[c],r,n,s-1),Z=this.dot(this.grad3[T],r-1,n,s-1),I=this.dot(this.grad3[S],r,n-1,s-1),P=this.dot(this.grad3[d],r-1,n-1,s-1),F=this.fade(r),ne=this.fade(n),G=this.fade(s),B=this.mix(E,w,F),X=this.mix(g,Z,F),Q=this.mix(D,O,F),W=this.mix(I,P,F),V=this.mix(B,Q,ne),he=this.mix(X,W,ne),ue=this.mix(V,he,G);return ue}}]);function Jo(i){const e=(i==null?void 0:i.scene)||"labs";return v(x.Fragment,{children:v("a-entity",{environment:`preset: ${e}; groundTexture: none; horizonColor: silver; skyColor: skyblue; shadow: true`})})}var Qo=Object.defineProperty,es=(i,e,t)=>e in i?Qo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ci=(i,e,t)=>(es(i,typeof e!="symbol"?e+"":e,t),t);const ai=x.createContext(null),li=(i="",e="zmq2ws")=>{const[t,r]=x.useState({}),n=x.useContext(ai)[e];return x.useLayoutEffect(()=>{if(n===null)return;const s=n.subscribeIn(r,i);return()=>s.unsubscribe()},[n]),t};class ts{constructor(){Ci(this,"state"),Ci(this,"distributors",new Map),Ci(this,"handlerFunc",new Map),Ci(this,"subscriptions",new Map)}addDistributor(e){this.distributors.set(e.getId(),e)}addHandlerFunc(e,t=null,r=null,n=null){this.handlerFunc.set(e,{callbackInputFunc:t,callbackOutputFunc:r,callbackCustomFunc:n})}getDistributorById(e){return this.distributors.get(e)}addSubscription(e){this.subscriptions.get(e)&&(this.clearSubscription(e),console.log("unsubscribe"));const t=this.createSubscription(e);this.subscriptions.set(e,t)}createExternalSubscription(e,t=null,r=null,n=null){return this.distributors.get(e).getObservableInstance().subscribe(s=>{s.flag==="IN"?t&&t(s.data):s.flag==="OUT"?r&&r(s.data):n&&n(s.data)})}createSubscription(e){const t=this.handlerFunc.get(e);return this.distributors.get(e).getObservableInstance().subscribe(r=>{r.flag==="IN"?t!=null&&t.callbackInputFunc&&t.callbackInputFunc(r.data):r.flag==="OUT"?t!=null&&t.callbackOutputFunc&&t.callbackOutputFunc(r.data):t!=null&&t.callbackCustomFunc&&t.callbackCustomFunc(r.data)})}addAllSubscriptions(){this.distributors.forEach((e,t)=>{this.addSubscription(t)})}clearSubscription(e){var t;(t=this.subscriptions.get(e))==null||t.unsubscribe()}clearAllSubscriptions(){this.distributors.forEach((e,t)=>this.clearSubscription(t))}}new ts;const is=({position:i,rotation:e,id:t,color:r,masterId:n})=>(x.useEffect(()=>{const a=document.getElementById(t),l=new Et.Quaternion().fromArray(e),u=new Et.Euler().setFromQuaternion(l,"YXZ"),f={x:Et.MathUtils.radToDeg(u.x),y:Et.MathUtils.radToDeg(u.y),z:-Et.MathUtils.radToDeg(u.z)};a.setAttribute("rotation",f)},[e]),se("a-entity",{position:i,id:t,children:[v("a-sphere",{radius:"0.5",color:"#F8DF87",children:n===t?(()=>se("a-entity",{position:"0 0.25 0",children:[v("a-cone",{color:"gold","radius-bottom":"0.5","radius-top":"0.1",height:"0.8",position:"0 0.4 0"}),v("a-sphere",{color:r,radius:"0.05",position:"0 0.4 -0.3"}),v("a-sphere",{color:r,radius:"0.05",position:"0 0.6 -0.2"})]}))():v(hr,{})}),v("a-entity",{position:"0.2 0.15 -0.45",children:v("a-sphere",{radius:"0.1",color:"#FFFFFF",children:v("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),v("a-entity",{position:"-0.2 0.15 -0.45",children:v("a-sphere",{radius:"0.1",color:"#FFFFFF",children:v("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),v("a-cylinder",{height:"0.05",radius:"0.05",color:"#FF6B6B",position:"0 -0.25 -0.4",rotation:"0 90 90"}),v("a-sphere",{radius:"0.1",color:"#FF6B6B",position:"0 -0.1 -0.5"}),v("a-cylinder",{height:"0.8",radius:"0.3",color:r,position:"0 -0.6 0"}),se("a-entity",{position:"-0.4 -0.4 0",children:[v("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),v("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),se("a-entity",{position:"0.4 -0.4 0",children:[v("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),v("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),se("a-entity",{position:"-0.15 -1 0",children:[v("a-cylinder",{height:"0.8",radius:"0.2",color:r,position:"0 -0.4 0"}),v("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]}),se("a-entity",{position:"0.15 -1 0",children:[v("a-cylinder",{height:"0.8",radius:"0.2",color:r,position:"0 -0.4 0"}),v("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]})]})),rs=109,ns=({wssb:i="shared"})=>{const e=x.useContext(ai)[i],{histogram:t}=x.useContext(Rt).data,r=n=>{switch(n.keyCode){case rs:e.send({type:"assign_master",payload:{}}),e.send({type:"histogram",payload:JSON.stringify(wt.toJSON(t))})}};return x.useEffect(()=>(window.addEventListener("keypress",r),()=>{window.removeEventListener("keypress",r)}),[]),v(hr,{})},os=105,ss=106,as=107,ls=108,cs=117,us=111,tn=new Map([[os,"X_UP"],[as,"X_DOWN"],[ls,"Y_UP"],[ss,"Y_DOWN"],[cs,"Z_UP"],[us,"Z_DOWN"]]),rn=i=>{switch(i){case"X_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"I"}));break;case"X_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"K"}));break;case"Y_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"L"}));break;case"Y_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"J"}));break;case"Z_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"U"}));break;case"Z_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"O"}));break}},ds=({wssb:i="shared"})=>{const e=x.useContext(ai)[i],t=li("axisScalingLatest",i),r=li("axisScaling",i),n=s=>{if(!tn.has(s.keyCode))return;let a=tn.get(s.keyCode);e.send({type:"axis_scaling_latest",payload:{axis:a}})};return x.useEffect(()=>{r.payload!==void 0&&Object.keys(r.payload.axisMap).forEach(s=>{for(let a=0;a<r.payload.axisMap[s];a++)rn(s)})},[r.payload]),x.useEffect(()=>{t.payload!==void 0&&rn(t.payload.latestAxis)},[t.payload]),x.useEffect(()=>(window.addEventListener("keypress",n),()=>{window.removeEventListener("keypress",n)}),[]),v("div",{})},fs=({wssb:i="shared"})=>{const[e,t]=x.useState(0),r=x.useContext(ai)[i];return x.useEffect(()=>{const n=document.getElementById("camera"),s=new Et.Vector3,a=new Et.Quaternion;n.object3D.getWorldPosition(s);const l=setInterval(()=>{n.object3D.getWorldPosition(s),n.object3D.getWorldQuaternion(a),r.send({type:"move",payload:{position:s.toArray(),rotation:a.toArray()}}),t(u=>u+1)},100);return()=>clearInterval(l)},[e]),se("a-entity",{children:[v(ns,{}),v(ds,{})]})},hs=({wssb:i="shared"})=>{x.useContext(ai)[i];const e=li("move",i),t=li("ws",i),r=li("master",i),[n,s]=x.useState([]),[a,l]=x.useState(null),[u,f]=x.useState("");return x.useEffect(()=>{e.payload!==void 0&&(e.payload.clients.length>0?s(e.payload.clients):s([]))},[e.payload]),x.useEffect(()=>{t.payload!==void 0&&f(t.payload.id)},[t.payload]),x.useEffect(()=>{r.payload!==void 0&&l(r.payload.master)},[r.payload]),se("a-entity",{children:[v(fs,{}),n.filter(c=>c.id!==u).map((c,p)=>{const S=c.position,b=c.rotation,T=S.join(" ");return v(is,{id:c.id,position:T,rotation:b,masterId:a,color:c.color},p+c.id)})]})},ps=({data:i,states:e=null,stores:t=null,selectedBins:r=[],onClick:n=S=>{console.log("click isn't defined!")},onDbClick:s=S=>{console.log("DbClick isn't be defined!")},onHover:a=S=>{console.log("Hover isn't be defined!")},onView:l=null,onProgress:u=null,onExeCommand:f=S=>{console.log("exeCommand isn't be defined!")},minHeight:c="calc(90vh)",useShared:p=!1})=>{let S;return x.useEffect(()=>{if(S=oi.getBinDistributor().subscribe(b=>{var T,C,d;if((b==null?void 0:b.id)===i.id){const E={intersectionAxis:b.intersect,obj:i.histogram,id:i.id,binId:b.data.id};switch((T=b.data)!=null&&T.zPos?(E.binz=b.data.zPos,E.biny=b.data.yPos,E.binx=b.data.xPos,E.bin=i.histogram.getBin(b.data.xPos,b.data.yPos,b.data.zPos),E.con=i.histogram.getBinContent(b.data.xPos,b.data.yPos,b.data.zPos)):(C=b.data)!=null&&C.yPos?(E.biny=b.data.yPos,E.binx=b.data.xPos,E.bin=i.histogram.getBin(b.data.xPos,b.data.yPos),E.con=i.histogram.getBinContent(b.data.xPos,b.data.yPos)):(d=b.data)!=null&&d.xPos&&(E.binx=b.data.xPos,E.bin=i.histogram.getBin(b.data.xPos),E.con=i.histogram.getBinContent(b.data.xPos)),b.event){case"CLICK":n(E);break;case"HOVER":a(E);break;case"DB_CLICK":s(E);break}}else f(b.command)}),S)return()=>S.unsubscribe()},[i,e,n,s,a,f]),v(x.Fragment,{children:se(Rt.Provider,{value:{data:{id:i.id,histogram:i.histogram,projectionNames:i==null?void 0:i.projectionsNames,projPanelIds:i==null?void 0:i.projPanelIds},stores:{source:t==null?void 0:t.sourceStore,theme:t==null?void 0:t.themeStore,range:t==null?void 0:t.rangeStore,views:t==null?void 0:t.viewStore,scene:t==null?void 0:t.sceneStore},states:{theme:e==null?void 0:e.theme,range:e==null?void 0:e.range,scene:e==null?void 0:e.scene,section:e==null?void 0:e.section,onViewChange:l,onProgress:u,selectedBins:r,selectedView:e==null?void 0:e.selectedView}},children:[se("a-scene",{embedded:!0,style:{zIndex:"1",width:"100%",minHeight:c},children:[v(Jo,{scene:e==null?void 0:e.scene}),p&&v(hs,{}),v(Vo,{}),v(qo,{})]}),!window.AFRAME.utils.device.checkHeadsetConnected()&&v(Zr,{})]})})};class ms{constructor(e){ze(this,"model",null);this.model=e}updateElement(e,t,r,n){if(this.model[r].elements[e])r==="titles"?this.createTitle(this.model[r].elements[e],this.model[r].attributes[e]):this.createElement(this.model[r].elements[e],this.model[r].attributes[e],n);else{let s;r==="titles"?s=this.createTitle(void 0,this.model[r].attributes[e]):s=this.createElement(void 0,this.model[r].attributes[e],n),this.model[r].elements[e]=s,t.appendChild(s)}}deleteUnnecessaryElements(e,t){const r=e;if(t.length===1){for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),e++;this.model[t[0]].elements.length=r,this.model[t[0]].attributes.length=r}else{for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),this.model[t[1]].elements[e].remove(),e++;this.model[t[0]].elements.length=r,this.model[t[0]].attributes.length=r,this.model[t[1]].elements.length=r,this.model[t[1]].attributes.length=r}}createElement(e,t,r){let n=e;if(n==null){const s=this.checkEntityType(r);n=document.createElement(s)}for(const s in t)n.setAttribute(s,t[s]);return n}createBannerElement(e,t,r){let n=e;return n==null&&(n=document.createElement("a-entity"),this.createBannerLines(t,r).map(a=>n.append(a))),n.setAttribute("position",r.position),n.setAttribute("id",r.id),n}createBannerLines(e,t){const r=[];for(let s=e-1;s>-1;s--){t.line.position.y=2*s;const a=document.createElement("a-entity");a.setAttribute("rotation",t.line.rotation),a.setAttribute("position",t.line.position),a.setAttribute("text",t.line.text),r.push(a)}const n=document.createElement("a-entity");return n.setAttribute("geometry",t.background.geometry),n.setAttribute("position",t.background.position),n.setAttribute("material",t.background.material),r.push(n),r}createTitle(e,t){let r=e;if(r==null){r=document.createElement("a-entity");const n=this.createElement(void 0,t.background);r.appendChild(n)}return delete t.background,this.createElement(r,t)}checkEntityType(e){return e==="a-box"||e==="a-sphere"||e==="a-text"||e==="a-circle"||e==="a-text"?e:"a-entity"}}class gs{bannerTemplate(e,t,r){const n={x:e.positionX,y:e.positionY,z:e.positionZ},s=e.id,a=this.bannerBackgroundTemplate(r),l=this.lineTemplate(t);return{position:n,id:s,background:a,line:l}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.scaleX,y:e.scaleY,z:e.scaleZ},n={color:e.color,opacity:.75},s=e.class,a=e.data,l=e.id;return{position:t,scale:r,material:n,id:l,class:s,binth2:a,mouseevent:""}}labelTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ},n={primitive:"plane",width:4,height:1},s={value:e.value,color:e.color,width:10,height:"auto",align:"center"},a={opacity:0},l=e.id;return{position:t,rotation:r,geometry:n,text:s,material:a,id:l}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ},n={primitive:"plane",width:e.width,height:e.height},s={value:e.value,color:"black",width:4,height:"auto",align:"center"},a={color:e.color,opacity:.8};return{position:t,rotation:r,geometry:n,text:s,material:a}}titleTemplate(e,t){const r={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},s={opacity:0},a={value:e.title,color:e.color,width:230,height:"auto",align:"center"},l=this.titleTextTemplate(t);return{position:r,rotation:n,material:s,text:a,background:l}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},r={x:e.positionX,y:e.positionY,z:e.positionZ},n={color:e.color,opacity:.6};return{position:r,geometry:t,material:n}}lineTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ};return{position:t,rotation:r,text:{value:"",width:14,height:"auto",align:"center"}}}bannerBackgroundTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={primitive:"box",width:e.width,height:e.height,depth:e.depth},n={color:e.color};return{position:t,geometry:r,material:n}}}let nn=[];function ys(i){return nn.filter(t=>t.id===i).length!==0}function or(i,e,t,r,n,s,a){nn=Kr.getBinsFromLocalStorage();const l=new gs,u=new ms(e),f=new en(a),c={},p=i;let S,b,T,C,d,E,w,D,O,g;const Z="";let I,P=0;const F=r+s>t.fXaxis.fXmax?t.fXaxis.fXmax:r+s,ne=n+s>t.fYaxis.fXmax?t.fYaxis.fXmax:n+s,G=t.fXaxis.fTitle,B=t.fYaxis.fTitle,X=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],Q=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let V=n;V<=ne;V++)for(let he=r;he<=F;he++)if(b=t.fXaxis.GetBinCenter(he),T=t.fXaxis.GetBinLowEdge(he),C=b+(b-T),d=C-T,E=t.fYaxis.GetBinCenter(V),w=t.fYaxis.GetBinLowEdge(V),D=E+(E-w),O=D-w,I=t.getBinContent(he,V),g=bs(I,t.fMaximum),S=g/2,g>0){const ue=f.getBinColor(g),ke=T+"th2"+C+"th2"+w+"th2"+D;let Ae;ys(ke)?Ae=f.getSecondaryAccentColor():Ae=ue;const Be=`id: ${ke};
|
|
301
|
+
`)});var t=function(r){var n;this.grad3=[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]],this.p=[];var s;for(s=0;s<256;s++)n=parseFloat("0."+Math.sin(9999*r*s).toString().substr(7)),this.p[s]=Math.floor(256*n);for(this.perm=[],s=0;s<512;s++)this.perm[s]=this.p[255&s]};t.prototype.dot=function(r,n,s,a){return r[0]*n+r[1]*s+r[2]*a},t.prototype.mix=function(r,n,s){return(1-s)*r+s*n},t.prototype.fade=function(r){return r*r*r*(r*(6*r-15)+10)},t.prototype.noise=function(r,n,s){var a=Math.floor(r),l=Math.floor(n),u=Math.floor(s);r-=a,n-=l,s-=u,a&=255,l&=255,u&=255;var f=this.perm[a+this.perm[l+this.perm[u]]]%12,c=this.perm[a+this.perm[l+this.perm[u+1]]]%12,p=this.perm[a+this.perm[l+1+this.perm[u]]]%12,C=this.perm[a+this.perm[l+1+this.perm[u+1]]]%12,y=this.perm[a+1+this.perm[l+this.perm[u]]]%12,T=this.perm[a+1+this.perm[l+this.perm[u+1]]]%12,k=this.perm[a+1+this.perm[l+1+this.perm[u]]]%12,d=this.perm[a+1+this.perm[l+1+this.perm[u+1]]]%12,w=this.dot(this.grad3[f],r,n,s),E=this.dot(this.grad3[y],r-1,n,s),D=this.dot(this.grad3[p],r,n-1,s),O=this.dot(this.grad3[k],r-1,n-1,s),g=this.dot(this.grad3[c],r,n,s-1),Z=this.dot(this.grad3[T],r-1,n,s-1),I=this.dot(this.grad3[C],r,n-1,s-1),P=this.dot(this.grad3[d],r-1,n-1,s-1),F=this.fade(r),ae=this.fade(n),G=this.fade(s),Y=this.mix(w,E,F),X=this.mix(g,Z,F),Q=this.mix(D,O,F),U=this.mix(I,P,F),V=this.mix(Y,Q,ae),he=this.mix(X,U,ae),fe=this.mix(V,he,G);return fe}}]);function Jo(i){const e=(i==null?void 0:i.scene)||"labs";return v(x.Fragment,{children:v("a-entity",{environment:`preset: ${e};`})})}var Qo=Object.defineProperty,es=(i,e,t)=>e in i?Qo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ki=(i,e,t)=>(es(i,typeof e!="symbol"?e+"":e,t),t);const ai=x.createContext(null),li=(i="",e="zmq2ws")=>{const[t,r]=x.useState({}),n=x.useContext(ai)[e];return x.useLayoutEffect(()=>{if(n===null)return;const s=n.subscribeIn(r,i);return()=>s.unsubscribe()},[n]),t};class ts{constructor(){ki(this,"state"),ki(this,"distributors",new Map),ki(this,"handlerFunc",new Map),ki(this,"subscriptions",new Map)}addDistributor(e){this.distributors.set(e.getId(),e)}addHandlerFunc(e,t=null,r=null,n=null){this.handlerFunc.set(e,{callbackInputFunc:t,callbackOutputFunc:r,callbackCustomFunc:n})}getDistributorById(e){return this.distributors.get(e)}addSubscription(e){this.subscriptions.get(e)&&(this.clearSubscription(e),console.log("unsubscribe"));const t=this.createSubscription(e);this.subscriptions.set(e,t)}createExternalSubscription(e,t=null,r=null,n=null){return this.distributors.get(e).getObservableInstance().subscribe(s=>{s.flag==="IN"?t&&t(s.data):s.flag==="OUT"?r&&r(s.data):n&&n(s.data)})}createSubscription(e){const t=this.handlerFunc.get(e);return this.distributors.get(e).getObservableInstance().subscribe(r=>{r.flag==="IN"?t!=null&&t.callbackInputFunc&&t.callbackInputFunc(r.data):r.flag==="OUT"?t!=null&&t.callbackOutputFunc&&t.callbackOutputFunc(r.data):t!=null&&t.callbackCustomFunc&&t.callbackCustomFunc(r.data)})}addAllSubscriptions(){this.distributors.forEach((e,t)=>{this.addSubscription(t)})}clearSubscription(e){var t;(t=this.subscriptions.get(e))==null||t.unsubscribe()}clearAllSubscriptions(){this.distributors.forEach((e,t)=>this.clearSubscription(t))}}new ts;const is=({position:i,rotation:e,id:t,color:r,masterId:n})=>(x.useEffect(()=>{const a=document.getElementById(t),l=new wt.Quaternion().fromArray(e),u=new wt.Euler().setFromQuaternion(l,"YXZ"),f={x:wt.MathUtils.radToDeg(u.x),y:wt.MathUtils.radToDeg(u.y),z:-wt.MathUtils.radToDeg(u.z)};a.setAttribute("rotation",f)},[e]),ie("a-entity",{position:i,id:t,children:[v("a-sphere",{radius:"0.5",color:"#F8DF87",children:n===t?(()=>ie("a-entity",{position:"0 0.25 0",children:[v("a-cone",{color:"gold","radius-bottom":"0.5","radius-top":"0.1",height:"0.8",position:"0 0.4 0"}),v("a-sphere",{color:r,radius:"0.05",position:"0 0.4 -0.3"}),v("a-sphere",{color:r,radius:"0.05",position:"0 0.6 -0.2"})]}))():v(hr,{})}),v("a-entity",{position:"0.2 0.15 -0.45",children:v("a-sphere",{radius:"0.1",color:"#FFFFFF",children:v("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),v("a-entity",{position:"-0.2 0.15 -0.45",children:v("a-sphere",{radius:"0.1",color:"#FFFFFF",children:v("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),v("a-cylinder",{height:"0.05",radius:"0.05",color:"#FF6B6B",position:"0 -0.25 -0.4",rotation:"0 90 90"}),v("a-sphere",{radius:"0.1",color:"#FF6B6B",position:"0 -0.1 -0.5"}),v("a-cylinder",{height:"0.8",radius:"0.3",color:r,position:"0 -0.6 0"}),ie("a-entity",{position:"-0.4 -0.4 0",children:[v("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),v("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),ie("a-entity",{position:"0.4 -0.4 0",children:[v("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),v("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),ie("a-entity",{position:"-0.15 -1 0",children:[v("a-cylinder",{height:"0.8",radius:"0.2",color:r,position:"0 -0.4 0"}),v("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]}),ie("a-entity",{position:"0.15 -1 0",children:[v("a-cylinder",{height:"0.8",radius:"0.2",color:r,position:"0 -0.4 0"}),v("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]})]})),rs=109,ns=({wssb:i="shared"})=>{const e=x.useContext(ai)[i],{histogram:t}=x.useContext(Rt).data,r=n=>{switch(n.keyCode){case rs:e.send({type:"assign_master",payload:{}}),e.send({type:"histogram",payload:JSON.stringify(Ct.toJSON(t))})}};return x.useEffect(()=>(window.addEventListener("keypress",r),()=>{window.removeEventListener("keypress",r)}),[]),v(hr,{})},os=105,ss=106,as=107,ls=108,cs=117,us=111,tn=new Map([[os,"X_UP"],[as,"X_DOWN"],[ls,"Y_UP"],[ss,"Y_DOWN"],[cs,"Z_UP"],[us,"Z_DOWN"]]),rn=i=>{switch(i){case"X_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"I"}));break;case"X_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"K"}));break;case"Y_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"L"}));break;case"Y_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"J"}));break;case"Z_UP":document.dispatchEvent(new KeyboardEvent("keydown",{key:"U"}));break;case"Z_DOWN":document.dispatchEvent(new KeyboardEvent("keydown",{key:"O"}));break}},ds=({wssb:i="shared"})=>{const e=x.useContext(ai)[i],t=li("axisScalingLatest",i),r=li("axisScaling",i),n=s=>{if(!tn.has(s.keyCode))return;let a=tn.get(s.keyCode);e.send({type:"axis_scaling_latest",payload:{axis:a}})};return x.useEffect(()=>{r.payload!==void 0&&Object.keys(r.payload.axisMap).forEach(s=>{for(let a=0;a<r.payload.axisMap[s];a++)rn(s)})},[r.payload]),x.useEffect(()=>{t.payload!==void 0&&rn(t.payload.latestAxis)},[t.payload]),x.useEffect(()=>(window.addEventListener("keypress",n),()=>{window.removeEventListener("keypress",n)}),[]),v("div",{})},fs=({wssb:i="shared"})=>{const[e,t]=x.useState(0),r=x.useContext(ai)[i];return x.useEffect(()=>{const n=document.getElementById("camera"),s=new wt.Vector3,a=new wt.Quaternion;n.object3D.getWorldPosition(s);const l=setInterval(()=>{n.object3D.getWorldPosition(s),n.object3D.getWorldQuaternion(a),r.send({type:"move",payload:{position:s.toArray(),rotation:a.toArray()}}),t(u=>u+1)},100);return()=>clearInterval(l)},[e]),ie("a-entity",{children:[v(ns,{}),v(ds,{})]})},hs=({wssb:i="shared"})=>{x.useContext(ai)[i];const e=li("move",i),t=li("ws",i),r=li("master",i),[n,s]=x.useState([]),[a,l]=x.useState(null),[u,f]=x.useState("");return x.useEffect(()=>{e.payload!==void 0&&(e.payload.clients.length>0?s(e.payload.clients):s([]))},[e.payload]),x.useEffect(()=>{t.payload!==void 0&&f(t.payload.id)},[t.payload]),x.useEffect(()=>{r.payload!==void 0&&l(r.payload.master)},[r.payload]),ie("a-entity",{children:[v(fs,{}),n.filter(c=>c.id!==u).map((c,p)=>{const C=c.position,y=c.rotation,T=C.join(" ");return v(is,{id:c.id,position:T,rotation:y,masterId:a,color:c.color},p+c.id)})]})},ps=({data:i,states:e=null,stores:t=null,selectedBins:r=[],onClick:n=C=>{console.log("click isn't defined!")},onDbClick:s=C=>{console.log("DbClick isn't be defined!")},onHover:a=C=>{console.log("Hover isn't be defined!")},onView:l=null,onProgress:u=null,onExeCommand:f=C=>{console.log("exeCommand isn't be defined!")},minHeight:c="calc(90vh)",useShared:p=!1})=>{let C;return x.useEffect(()=>{if(C=oi.getBinDistributor().subscribe(y=>{var T,k,d;if((y==null?void 0:y.id)===i.id){const w={intersectionAxis:y.intersect,obj:i.histogram,id:i.id,binId:y.data.id};switch((T=y.data)!=null&&T.zPos?(w.binz=y.data.zPos,w.biny=y.data.yPos,w.binx=y.data.xPos,w.bin=i.histogram.getBin(y.data.xPos,y.data.yPos,y.data.zPos),w.con=i.histogram.getBinContent(y.data.xPos,y.data.yPos,y.data.zPos)):(k=y.data)!=null&&k.yPos?(w.biny=y.data.yPos,w.binx=y.data.xPos,w.bin=i.histogram.getBin(y.data.xPos,y.data.yPos),w.con=i.histogram.getBinContent(y.data.xPos,y.data.yPos)):(d=y.data)!=null&&d.xPos&&(w.binx=y.data.xPos,w.bin=i.histogram.getBin(y.data.xPos),w.con=i.histogram.getBinContent(y.data.xPos)),y.event){case"CLICK":n(w);break;case"HOVER":a(w);break;case"DB_CLICK":s(w);break}}else f(y.command)}),C)return()=>C.unsubscribe()},[i,e,n,s,a,f]),v(x.Fragment,{children:ie(Rt.Provider,{value:{data:{id:i.id,histogram:i.histogram,projectionNames:i==null?void 0:i.projectionsNames,projPanelIds:i==null?void 0:i.projPanelIds},stores:{source:t==null?void 0:t.sourceStore,theme:t==null?void 0:t.themeStore,range:t==null?void 0:t.rangeStore,views:t==null?void 0:t.viewStore,scene:t==null?void 0:t.sceneStore},states:{theme:e==null?void 0:e.theme,range:e==null?void 0:e.range,scene:e==null?void 0:e.scene,section:e==null?void 0:e.section,onViewChange:l,onProgress:u,selectedBins:r,selectedView:e==null?void 0:e.selectedView}},children:[ie("a-scene",{embedded:!0,style:{zIndex:"1",width:"100%",minHeight:c},children:[v(Jo,{scene:e==null?void 0:e.scene}),p&&v(hs,{}),v(Vo,{}),v(qo,{})]}),!window.AFRAME.utils.device.checkHeadsetConnected()&&v(Zr,{})]})})};class ms{constructor(e){ze(this,"model",null);this.model=e}updateElement(e,t,r,n){if(this.model[r].elements[e])r==="titles"?this.createTitle(this.model[r].elements[e],this.model[r].attributes[e]):this.createElement(this.model[r].elements[e],this.model[r].attributes[e],n);else{let s;r==="titles"?s=this.createTitle(void 0,this.model[r].attributes[e]):s=this.createElement(void 0,this.model[r].attributes[e],n),this.model[r].elements[e]=s,t.appendChild(s)}}deleteUnnecessaryElements(e,t){const r=e;if(t.length===1){for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),e++;this.model[t[0]].elements.length=r,this.model[t[0]].attributes.length=r}else{for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),this.model[t[1]].elements[e].remove(),e++;this.model[t[0]].elements.length=r,this.model[t[0]].attributes.length=r,this.model[t[1]].elements.length=r,this.model[t[1]].attributes.length=r}}createElement(e,t,r){let n=e;if(n==null){const s=this.checkEntityType(r);n=document.createElement(s)}for(const s in t)n.setAttribute(s,t[s]);return n}createBannerElement(e,t,r){let n=e;return n==null&&(n=document.createElement("a-entity"),this.createBannerLines(t,r).map(a=>n.append(a))),n.setAttribute("position",r.position),n.setAttribute("id",r.id),n}createBannerLines(e,t){const r=[];for(let s=e-1;s>-1;s--){t.line.position.y=2*s;const a=document.createElement("a-entity");a.setAttribute("rotation",t.line.rotation),a.setAttribute("position",t.line.position),a.setAttribute("text",t.line.text),r.push(a)}const n=document.createElement("a-entity");return n.setAttribute("geometry",t.background.geometry),n.setAttribute("position",t.background.position),n.setAttribute("material",t.background.material),r.push(n),r}createTitle(e,t){let r=e;if(r==null){r=document.createElement("a-entity");const n=this.createElement(void 0,t.background);r.appendChild(n)}return delete t.background,this.createElement(r,t)}checkEntityType(e){return e==="a-box"||e==="a-sphere"||e==="a-text"||e==="a-circle"||e==="a-text"?e:"a-entity"}}class gs{bannerTemplate(e,t,r){const n={x:e.positionX,y:e.positionY,z:e.positionZ},s=e.id,a=this.bannerBackgroundTemplate(r),l=this.lineTemplate(t);return{position:n,id:s,background:a,line:l}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.scaleX,y:e.scaleY,z:e.scaleZ},n={color:e.color,opacity:.75},s=e.class,a=e.data,l=e.id;return{position:t,scale:r,material:n,id:l,class:s,binth2:a,mouseevent:""}}labelTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ},n={primitive:"plane",width:4,height:1},s={value:e.value,color:e.color,width:10,height:"auto",align:"center"},a={opacity:0},l=e.id;return{position:t,rotation:r,geometry:n,text:s,material:a,id:l}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ},n={primitive:"plane",width:e.width,height:e.height},s={value:e.value,color:"black",width:4,height:"auto",align:"center"},a={color:e.color,opacity:.8};return{position:t,rotation:r,geometry:n,text:s,material:a}}titleTemplate(e,t){const r={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},s={opacity:0},a={value:e.title,color:e.color,width:230,height:"auto",align:"center"},l=this.titleTextTemplate(t);return{position:r,rotation:n,material:s,text:a,background:l}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},r={x:e.positionX,y:e.positionY,z:e.positionZ},n={color:e.color,opacity:.6};return{position:r,geometry:t,material:n}}lineTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ};return{position:t,rotation:r,text:{value:"",width:14,height:"auto",align:"center"}}}bannerBackgroundTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={primitive:"box",width:e.width,height:e.height,depth:e.depth},n={color:e.color};return{position:t,geometry:r,material:n}}}let nn=[];function ys(i){return nn.filter(t=>t.id===i).length!==0}function or(i,e,t,r,n,s,a){nn=Kr.getBinsFromLocalStorage();const l=new gs,u=new ms(e),f=new en(a),c={},p=i;let C,y,T,k,d,w,E,D,O,g;const Z="";let I,P=0;const F=r+s>t.fXaxis.fXmax?t.fXaxis.fXmax:r+s,ae=n+s>t.fYaxis.fXmax?t.fYaxis.fXmax:n+s,G=t.fXaxis.fTitle,Y=t.fYaxis.fTitle,X=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],Q=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let V=n;V<=ae;V++)for(let he=r;he<=F;he++)if(y=t.fXaxis.GetBinCenter(he),T=t.fXaxis.GetBinLowEdge(he),k=y+(y-T),d=k-T,w=t.fYaxis.GetBinCenter(V),E=t.fYaxis.GetBinLowEdge(V),D=w+(w-E),O=D-E,I=t.getBinContent(he,V),g=bs(I,t.fMaximum),C=g/2,g>0){const fe=f.getBinColor(g),ke=T+"th2"+k+"th2"+E+"th2"+D;let Ae;ys(ke)?Ae=f.getSecondaryAccentColor():Ae=fe;const Ye=`id: ${ke};
|
|
296
302
|
content: ${g};
|
|
297
|
-
color: ${
|
|
298
|
-
yTitle: ${
|
|
303
|
+
color: ${fe};
|
|
304
|
+
yTitle: ${Y};
|
|
299
305
|
xTitle: ${G};
|
|
300
306
|
absoluteContent: ${I};
|
|
301
307
|
binName: ${Z};
|
|
302
308
|
xMin: ${T};
|
|
303
|
-
yMin: ${
|
|
304
|
-
xMax: ${
|
|
309
|
+
yMin: ${E};
|
|
310
|
+
xMax: ${k};
|
|
305
311
|
yMax: ${D};
|
|
306
|
-
xCenter: ${
|
|
307
|
-
yCenter: ${
|
|
312
|
+
xCenter: ${y};
|
|
313
|
+
yCenter: ${w};
|
|
308
314
|
xWidth: ${d};
|
|
309
315
|
yWidth: ${O};
|
|
310
316
|
markedColor: ${Ae};
|
|
311
317
|
selectColor: ${f.getSecondaryAccentColor()};
|
|
312
318
|
axisX: ${f.getAxisColor("x")};
|
|
313
319
|
axisY: ${f.getAxisColor("y")};
|
|
314
|
-
axisZ: ${f.getAxisColor("z")}`;c.id=ke,c.positionX=T,c.positionY=S,c.positionZ=w,c.scaleX=d/2,c.scaleY=g,c.scaleZ=O/2,c.color=Ae,c.class="clickable",c.data=Be,e.bins.attributes[P]=l.binTemplate(c),u.updateElement(P,p,"bins","a-box"),P++}u.deleteUnnecessaryElements(P,["bins"]),c.id=1500+P,c.positionX=F+.5,c.positionY=0,c.positionZ=ne+.5,c.rotationX=270,c.rotationY=360,c.rotationZ=0,c.width=2,c.height=2,c.value="0",c.color=f.getAxisColor("y"),e.normalXAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,p,"normalXAxis","a-entity"),c.positionZ=n-2.5,c.rotationX=270,c.rotationY=180,e.reversedYAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,p,"reversedYAxis","a-entity"),c.positionX=r-2.5,c.positionZ=ne+.5,e.normalYAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,p,"normalYAxis","a-entity"),c.positionZ=n-2.5,c.rotationY=180,e.reversedXAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,p,"reversedXAxis","a-entity"),P=1;for(let V=n;V<=ne;V++)c.id=1500+P,c.positionX=r-2.5,c.positionY=0,c.positionZ=V-1,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=2,c.height=1,c.value=`${Q[V-1]?Q[V-1].fString:V-1}`,c.color=f.getAxisColor("z"),e.normalYAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,p,"normalYAxis","a-entity"),c.id=4500+P,c.positionX=F+.5,c.rotationY=360,c.value=`${Q[V-1]?Q[V-1].fString:V-1}`,e.reversedYAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,p,"reversedYAxis","a-entity"),P++;u.deleteUnnecessaryElements(P,["normalYAxis","reversedYAxis"]),P=1;for(let V=r;V<=F;V++)c.id=1500+P,c.positionX=V-1,c.positionY=0,c.positionZ=n-2.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=2,c.height=1,c.value=`${X[V-1]?X[V-1].fString:V-1}`,c.color=f.getAxisColor("x"),e.normalXAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,p,"normalXAxis","a-entity"),c.id=4500+P,c.positionZ=ne+.5,c.rotationX=270,c.rotationY=90,c.value=`${X[V-1]?X[V-1].fString:V-1}`,e.reversedXAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,p,"reversedXAxis","a-entity"),P++;u.deleteUnnecessaryElements(P,["normalXAxis","reversedXAxis"]),c.positionX=r,c.positionY=0,c.positionZ=n-4,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=4,c.height=1,c.value=G,c.id="downLabel",e.labels.attributes[0]=l.labelTemplate(c),u.updateElement(0,p,"labels","a-entity"),c.positionX=F-2.5,c.positionZ=ne+2,c.rotationY=0,c.id="upLabel",e.labels.attributes[1]=l.labelTemplate(c),u.updateElement(1,p,"labels","a-entity"),c.positionX=r-4,c.positionY=0,c.positionZ=n+.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=4,c.height=1,c.value=B,c.color=f.getAxisColor("z"),c.id="leftLabel",e.labels.attributes[2]=l.labelTemplate(c),u.updateElement(2,p,"labels","a-entity"),c.positionX=F+2,c.positionZ=ne-2.5,c.rotationX=270,c.rotationY=90,c.id="rightLabel",e.labels.attributes[3]=l.labelTemplate(c),u.updateElement(3,p,"labels","a-entity"),c.positionX=r-90,c.positionY=-6.5,c.positionZ=n+90,c.rotationX=0,c.rotationY=123,c.rotationZ=0,c.title=t.fTitle,c.color=f.getPrimaryFontColor();const W={};W.positionX=0,W.positionY=0,W.positionZ=-1,W.width=170,W.height=30,W.color="white",e.titles.attributes[0]=l.titleTemplate(c,W),u.updateElement(0,p,"titles","a-entity"),c.positionX=r+120,c.positionZ=n-70,c.rotationY=330,c.title=t.fName,e.titles.attributes[1]=l.titleTemplate(c,W),u.updateElement(1,p,"titles","a-entity")}const bs=(i,e)=>i<=0?0:(e>1&&(i=Math.round((i/e+Number.EPSILON)*100)/100),i);class vs{constructor(e){j(this,zi,void 0);Y(this,zi,e)}createTH2DemoHistogram(e,t,r,n){const s=wt.createHistogram("TH2I",e,t);let a=r;for(let l=1;l<=20;l++)for(let u=1;u<=20;u++){const f=s.getBin(u,l);let c=0;c=a,s.setBinContent(f,c),a+=n}return s.fXaxis.fTitle="x Axis",s.fYaxis.fTitle="y Axis",s.fName="You don't have a valid file path",s.fTitle="This is a TH2 histogram demo",s.fMaximum=a,s}createTH3DemoHistogram(e,t,r,n,s){const a=wt.createHistogram("TH3I",e,t,r);let l=n;for(let u=1;u<=20;u++)for(let f=1;f<=20;f++)for(let c=1;c<=20;c++){const p=a.getBin(c,f,u);let S=0;S=l,a.setBinContent(p,S),l+=s}return a.fXaxis.fTitle="x Axis",a.fYaxis.fTitle="y Axis",a.fZaxis.fTitle="z Axis",a.fName="You don't have a valid file path",a.fTitle="This is a TH3 histogram demo",a.fMaximum=l,a}}zi=new WeakMap;const xs=ge.registerComponent("th2-histogram",{schema:{section:{type:"string"},filename:{type:"string"},theme:{type:"string",default:"def"},position:{name:"position",xValue:0,yValue:.1,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const i=this.el;Jr(this.schema,i),document.addEventListener("keydown",rr),document.addEventListener("keyup",nr),this.demoHistogramService=new vs,this.localStorageService=new Ji,this.cameraService=new si,this.render=!1,this.histogram=null,this.model={bins:{elements:[],attributes:[]},labels:{elements:[],attributes:[]},titles:{elements:[],attributes:[]},banners:{elements:[],attributes:[]},normalXAxis:{elements:[],attributes:[]},reversedXAxis:{elements:[],attributes:[]},normalYAxis:{elements:[],attributes:[]},reversedYAxis:{elements:[],attributes:[]}},this.section=null;const e=r=>{console.log(r),this.section.xOffset=r.xOffset,this.section.yOffset=r.yOffset,this.range=r.range,this.cameraService.setCameraPosition(r),or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0},t=r=>{this.localStorageService.storeTH2Offsets(r.xOffset,r.yOffset,r.range),e(r)};this.subscription=_e.getChangedSection().subscribe(t)},update:function(){Qr(),this.section=JSON.parse(this.data.section),wt.openFile(this.data.filename).then(i=>i.readObject("hUsersVsProjects")).then(i=>{this.localStorageService.initHistogramData(i),this.histogram=i,or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0}).then(()=>console.log("drawing completed")).catch(i=>{this.histogram=this.demoHistogramService.createTH2DemoHistogram(20,20,0,.1),this.localStorageService.initHistogramData(this.histogram),or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0,console.log(i)})},tick:function(){this.render&&(this.render=!1)},remove:function(){this.subscription.unsubscribe(),document.removeEventListener("keydown",rr),document.removeEventListener("keyup",nr)}}),Ss=ge.registerComponent("banner-control",{schema:{position:{name:"position",xValue:-1.28,yValue:.3,zValue:-1},scale:{name:"scale",xValue:.5,yValue:.7,zValue:.1},rotation:{name:"rotation",xValue:0,yValue:20,zValue:0}},init:function(){}});new si;const ws=i=>{i.detail.y>.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),i.detail.y<-.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),i.detail.x<-.95&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),i.detail.x>.95&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},Es=i=>{i.detail.y>.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),i.detail.y<-.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),i.detail.x<-.95&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),i.detail.x>.95&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},Cs=i=>{i.detail.y>0&&Ee.next({scale:-.1}),i.detail.y<0&&Ee.next({scale:.1})},Ts=i=>{i.detail.y>0?Ee.next({source:"next"}):i.detail.y<0&&Ee.next({source:"prev"})},ks=i=>{i.detail.y>0?Ee.next({theme:"next"}):i.detail.y<0&&Ee.next({theme:"prev"})},As=i=>{i.detail.y>0?Ee.next({range:"next"}):i.detail.y<0&&Ee.next({range:"prev"})},Ps=i=>{i.detail.y>0?Ee.next({scene:"next"}):i.detail.y<0&&Ee.next({scene:"prev"})},on=i=>{i==="Y"?Ee.next({tool:"next"}):Ee.next({tool:"prev"})},sn=i=>{Re.changeHistogramSectionByOffset("zOffset","TH3",!0,i)},an=i=>{Re.changeHistogramSectionByOffset("zOffset","TH3",!1,i)},ln=()=>{new si},_s=i=>{ws(i)},Os=i=>{Es(i)},Ds=()=>{wi.saveSelectedBinToLocalStorage(),kt()===0&&Ee.next({binData:wi})},Rs=()=>{wi.deleteBinFromLocalStorage()},zs=()=>{_e.changeHistogramFunction("feet","TH2")},$s=()=>{_e.changeHistogramFunction("default","TH2")},Ms=()=>{Ct.setVisibilityOfBanners("oculus")},Hs=()=>{Ct.setUserState()},Is=()=>{Ct.shiftBanners()},Bs=i=>{i.forEach(e=>{})},Ys=ge.registerComponent("left-controller-logging",{init:function(){let i=!1,e=!0,t=!1;const r=this.el;r.addEventListener("gripdown",()=>{i=!0}),r.addEventListener("gripup",()=>{i=!1}),r.addEventListener("thumbstickdown",()=>{}),r.addEventListener("thumbstickmoved",n=>{if(i&&kt()===2)Cs(n);else if(i&&kt()===3){if(e){e=!1,Ts(n);const s=setTimeout(()=>{e=!0},200);return()=>clearTimeout(s)}}else if(i&&kt()===4){if(e){e=!1,ks(n);const s=setTimeout(()=>{e=!0},200);return()=>clearTimeout(s)}}else if(i&&kt()===5){if(e){e=!1,As(n);const s=setTimeout(()=>{e=!0},200);return()=>clearTimeout(s)}}else if(i&&kt()===6&&e){e=!1,Ps(n);const s=setTimeout(()=>{e=!0},200);return()=>clearTimeout(s)}}),r.addEventListener("ybuttondown",()=>{i?t||(t=!0,on("Y")):Ms()}),r.addEventListener("xbuttondown",()=>{i?t||(t=!0,on("X")):Hs()}),r.addEventListener("ybuttonup",()=>{t=!1}),r.addEventListener("xbuttonup",()=>{t=!1})},update:function(){ln()}}),Fs=ge.registerComponent("right-controller-logging",{init:function(){let i=!1;const e=this.el;e.addEventListener("gripdown",()=>{i=!0}),e.addEventListener("gripup",()=>{i=!1}),e.addEventListener("thumbstickmoved",t=>{i?_s(t):Os(t)}),e.addEventListener("bbuttondown",()=>{sn(!i)}),e.addEventListener("abuttondown",()=>{an(!i)}),e.addEventListener("thumbstickdown",()=>{i?zs():$s()}),e.addEventListener("triggerdown",()=>{i?(Ds(),Bs()):(Rs(),Is())})},update:function(){ln()}});class js{constructor(){j(this,Ut,void 0);Y(this,Ut,new ht)}sendSourceSubject(e){o(this,Ut).next(e)}getSourceSettingSubject(){return o(this,Ut).asObservable()}}Ut=new WeakMap;const Ns=new js,Ls=ge.registerComponent("oculus-thumbstick-movement-controller",{schema:{acceleration:{type:"number",default:-40},fly:{type:"boolean",default:!1},horizontalAxis:{type:"string",enum:["x","y","z"],default:"x"},verticalAxis:{type:"string",enum:["x","y","z"],default:"z"},enabled:{type:"boolean",default:!0},adEnabled:{type:"boolean",default:!0},adInverted:{type:"boolean",default:!1},wsEnabled:{type:"boolean",default:!0},wsInverted:{type:"boolean",default:!1}},required:["acceleration","fly","horizontalAxis","verticalAxis","enabled","adEnabled","adInverted","wsEnabled","wsInverted"],init:function(){this.velocity=new THREE.Vector3(0,0,0),this.tsData=new THREE.Vector2(0,0),this.moveEasing=1.1,this.thumbstickMoved=this.thumbstickMoved.bind(this);const i=this.el;let e=!1;i.addEventListener("gripdown",()=>{e=!0}),i.addEventListener("gripup",()=>{e=!1}),i.addEventListener("thumbstickmoved",t=>{e&&kt()>1?this.tsData.set(0,0):this.thumbstickMoved(t)})},update:function(){this.sceneElement=document.getElementById("cameraWrapper")},tick:function(i,e){var t=this.data,r=this.velocity;!r[t.horizontalAxis]&&!r[t.verticalAxis]&&!this.tsData.length()||(e=e/1e3,this.updateVelocity(e),!(!r[t.horizontalAxis]&&!r[t.verticalAxis])&&this.sceneElement.object3D.position.add(this.getMovementVector(e)))},updateVelocity:function(i){var e,t,r,n=this.data,s=this.velocity,a,l;const u=1e-5;if(t=n.horizontalAxis,r=n.verticalAxis,i>.2){s[t]=0,s[r]=0;return}var f=Math.pow(1/this.moveEasing,i*60);s[t]!==0&&(s[t]=s[t]*f),s[r]!==0&&(s[r]=s[r]*f),Math.abs(s[t])<u&&(s[t]=0),Math.abs(s[r])<u&&(s[r]=0),n.enabled&&(e=n.acceleration,n.adEnabled&&this.tsData.x&&(l=n.adInverted?-1:1,s[t]+=l*e*this.tsData.x*i),n.wsEnabled&&(a=n.wsInverted?-1:1,s[r]+=a*e*this.tsData.y*i))},getMovementVector:function(){var i=new THREE.Vector3(0,0,0),e=new THREE.Euler(0,0,0,"YXZ");return function(t){var r=this.el.sceneEl.camera.el.object3D.rotation,n=this.velocity,s;return i.copy(n),i.multiplyScalar(t),r&&(s=this.data.fly?r.x:0,e.set(s,r.y,0),i.applyEuler(e)),i}}(),thumbstickMoved:function(i){this.tsData.set(i.detail.x,i.detail.y)},remove:function(){this.el.removeEventListener("thumbstickmoved",this.thumbstickMoved)}}),Vs=new Ji;re.Banner=Ss,re.HistogramTH2=xs,re.LeftController=Ys,re.NdmVrScene=ps,re.RightController=Fs,re.ThumbsticController=Ls,re.ndmVrStorage=Vs,re.sourceSettingSubject=Ns,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
320
|
+
axisZ: ${f.getAxisColor("z")}`;c.id=ke,c.positionX=T,c.positionY=C,c.positionZ=E,c.scaleX=d/2,c.scaleY=g,c.scaleZ=O/2,c.color=Ae,c.class="clickable",c.data=Ye,e.bins.attributes[P]=l.binTemplate(c),u.updateElement(P,p,"bins","a-box"),P++}u.deleteUnnecessaryElements(P,["bins"]),c.id=1500+P,c.positionX=F+.5,c.positionY=0,c.positionZ=ae+.5,c.rotationX=270,c.rotationY=360,c.rotationZ=0,c.width=2,c.height=2,c.value="0",c.color=f.getAxisColor("y"),e.normalXAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,p,"normalXAxis","a-entity"),c.positionZ=n-2.5,c.rotationX=270,c.rotationY=180,e.reversedYAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,p,"reversedYAxis","a-entity"),c.positionX=r-2.5,c.positionZ=ae+.5,e.normalYAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,p,"normalYAxis","a-entity"),c.positionZ=n-2.5,c.rotationY=180,e.reversedXAxis.attributes[0]=l.axisTemplate(c),u.updateElement(0,p,"reversedXAxis","a-entity"),P=1;for(let V=n;V<=ae;V++)c.id=1500+P,c.positionX=r-2.5,c.positionY=0,c.positionZ=V-1,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=2,c.height=1,c.value=`${Q[V-1]?Q[V-1].fString:V-1}`,c.color=f.getAxisColor("z"),e.normalYAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,p,"normalYAxis","a-entity"),c.id=4500+P,c.positionX=F+.5,c.rotationY=360,c.value=`${Q[V-1]?Q[V-1].fString:V-1}`,e.reversedYAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,p,"reversedYAxis","a-entity"),P++;u.deleteUnnecessaryElements(P,["normalYAxis","reversedYAxis"]),P=1;for(let V=r;V<=F;V++)c.id=1500+P,c.positionX=V-1,c.positionY=0,c.positionZ=n-2.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=2,c.height=1,c.value=`${X[V-1]?X[V-1].fString:V-1}`,c.color=f.getAxisColor("x"),e.normalXAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,p,"normalXAxis","a-entity"),c.id=4500+P,c.positionZ=ae+.5,c.rotationX=270,c.rotationY=90,c.value=`${X[V-1]?X[V-1].fString:V-1}`,e.reversedXAxis.attributes[P]=l.axisTemplate(c),u.updateElement(P,p,"reversedXAxis","a-entity"),P++;u.deleteUnnecessaryElements(P,["normalXAxis","reversedXAxis"]),c.positionX=r,c.positionY=0,c.positionZ=n-4,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=4,c.height=1,c.value=G,c.id="downLabel",e.labels.attributes[0]=l.labelTemplate(c),u.updateElement(0,p,"labels","a-entity"),c.positionX=F-2.5,c.positionZ=ae+2,c.rotationY=0,c.id="upLabel",e.labels.attributes[1]=l.labelTemplate(c),u.updateElement(1,p,"labels","a-entity"),c.positionX=r-4,c.positionY=0,c.positionZ=n+.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=4,c.height=1,c.value=Y,c.color=f.getAxisColor("z"),c.id="leftLabel",e.labels.attributes[2]=l.labelTemplate(c),u.updateElement(2,p,"labels","a-entity"),c.positionX=F+2,c.positionZ=ae-2.5,c.rotationX=270,c.rotationY=90,c.id="rightLabel",e.labels.attributes[3]=l.labelTemplate(c),u.updateElement(3,p,"labels","a-entity"),c.positionX=r-90,c.positionY=-6.5,c.positionZ=n+90,c.rotationX=0,c.rotationY=123,c.rotationZ=0,c.title=t.fTitle,c.color=f.getPrimaryFontColor();const U={};U.positionX=0,U.positionY=0,U.positionZ=-1,U.width=170,U.height=30,U.color="white",e.titles.attributes[0]=l.titleTemplate(c,U),u.updateElement(0,p,"titles","a-entity"),c.positionX=r+120,c.positionZ=n-70,c.rotationY=330,c.title=t.fName,e.titles.attributes[1]=l.titleTemplate(c,U),u.updateElement(1,p,"titles","a-entity")}const bs=(i,e)=>i<=0?0:(e>1&&(i=Math.round((i/e+Number.EPSILON)*100)/100),i);class vs{constructor(e){j(this,Mi,void 0);B(this,Mi,e)}createTH2DemoHistogram(e,t,r,n){const s=Ct.createHistogram("TH2I",e,t);let a=r;for(let l=1;l<=20;l++)for(let u=1;u<=20;u++){const f=s.getBin(u,l);let c=0;c=a,s.setBinContent(f,c),a+=n}return s.fXaxis.fTitle="x Axis",s.fYaxis.fTitle="y Axis",s.fName="You don't have a valid file path",s.fTitle="This is a TH2 histogram demo",s.fMaximum=a,s}createTH3DemoHistogram(e,t,r,n,s){const a=Ct.createHistogram("TH3I",e,t,r);let l=n;for(let u=1;u<=20;u++)for(let f=1;f<=20;f++)for(let c=1;c<=20;c++){const p=a.getBin(c,f,u);let C=0;C=l,a.setBinContent(p,C),l+=s}return a.fXaxis.fTitle="x Axis",a.fYaxis.fTitle="y Axis",a.fZaxis.fTitle="z Axis",a.fName="You don't have a valid file path",a.fTitle="This is a TH3 histogram demo",a.fMaximum=l,a}}Mi=new WeakMap;const xs=me.registerComponent("th2-histogram",{schema:{section:{type:"string"},filename:{type:"string"},theme:{type:"string",default:"def"},position:{name:"position",xValue:0,yValue:.1,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const i=this.el;Jr(this.schema,i),document.addEventListener("keydown",Ei),document.addEventListener("keyup",Ti),this.demoHistogramService=new vs,this.localStorageService=new er,this.cameraService=new si,this.render=!1,this.histogram=null,this.model={bins:{elements:[],attributes:[]},labels:{elements:[],attributes:[]},titles:{elements:[],attributes:[]},banners:{elements:[],attributes:[]},normalXAxis:{elements:[],attributes:[]},reversedXAxis:{elements:[],attributes:[]},normalYAxis:{elements:[],attributes:[]},reversedYAxis:{elements:[],attributes:[]}},this.section=null;const e=r=>{console.log(r),this.section.xOffset=r.xOffset,this.section.yOffset=r.yOffset,this.range=r.range,this.cameraService.setCameraPosition(r),or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0},t=r=>{this.localStorageService.storeTH2Offsets(r.xOffset,r.yOffset,r.range),e(r)};this.subscription=Oe.getChangedSection().subscribe(t)},update:function(){Qr(),this.section=JSON.parse(this.data.section),Ct.openFile(this.data.filename).then(i=>i.readObject("hUsersVsProjects")).then(i=>{this.localStorageService.initHistogramData(i),this.histogram=i,or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0}).then(()=>console.log("drawing completed")).catch(i=>{this.histogram=this.demoHistogramService.createTH2DemoHistogram(20,20,0,.1),this.localStorageService.initHistogramData(this.histogram),or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0,console.log(i)})},tick:function(){this.render&&(this.render=!1)},remove:function(){this.subscription.unsubscribe(),document.removeEventListener("keydown",Ei),document.removeEventListener("keyup",Ti)}}),Ss=me.registerComponent("banner-control",{schema:{position:{name:"position",xValue:-1.28,yValue:.3,zValue:-1},scale:{name:"scale",xValue:.5,yValue:.7,zValue:.1},rotation:{name:"rotation",xValue:0,yValue:20,zValue:0}},init:function(){}});new si;const Cs=i=>{i.detail.y>.95&&(Oe.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),i.detail.y<-.95&&(Oe.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),i.detail.x<-.95&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),Oe.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),i.detail.x>.95&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),Oe.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},ws=i=>{i.detail.y>.95&&(Oe.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),i.detail.y<-.95&&(Oe.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),i.detail.x<-.95&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),Oe.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),i.detail.x>.95&&(Ke.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),Oe.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},Es=i=>{i.detail.y>.1&&we.next({scale:-.1}),i.detail.y<-.1&&we.next({scale:.1})},Ts=i=>{i.detail.y>.1?we.next({source:"next"}):i.detail.y<-.1&&we.next({source:"prev"})},ks=i=>{i.detail.y>.1?we.next({theme:"next"}):i.detail.y<-.1&&we.next({theme:"prev"})},As=i=>{i.detail.y>.1?we.next({range:"next"}):i.detail.y<-.1&&we.next({range:"prev"})},Ps=i=>{i.detail.y>.1?we.next({scene:"next"}):i.detail.y<-.1&&we.next({scene:"prev"})},on=i=>{i==="Y"?we.next({tool:"next"}):we.next({tool:"prev"})},sn=i=>{Re.changeHistogramSectionByOffset("zOffset","TH3",!0,i)},an=i=>{Re.changeHistogramSectionByOffset("zOffset","TH3",!1,i)},ln=()=>{new si},_s=i=>{Cs(i)},Os=i=>{ws(i)},Ds=()=>{Ci.saveSelectedBinToLocalStorage(),kt()===0&&we.next({binData:Ci})},Rs=()=>{Ci.deleteBinFromLocalStorage()},zs=()=>{Oe.changeHistogramFunction("feet","TH2")},$s=()=>{Oe.changeHistogramFunction("default","TH2")},Ms=()=>{Et.setVisibilityOfBanners("oculus")},Hs=()=>{Et.setUserState()},Is=()=>{Et.shiftBanners()},Ys=i=>{i.forEach(e=>{})},Bs=me.registerComponent("left-controller-logging",{init:function(){let i=!1,e=!0,t=!1;const r=this.el;r.addEventListener("gripdown",()=>{i=!0}),r.addEventListener("gripup",()=>{i=!1}),r.addEventListener("thumbstickdown",()=>{}),r.addEventListener("thumbstickmoved",n=>{if(i&&kt()===2)Es(n);else if(i&&kt()===3){if(e){e=!1,Ts(n);const s=setTimeout(()=>{e=!0},450);return()=>clearTimeout(s)}}else if(i&&kt()===4){if(e){e=!1,ks(n);const s=setTimeout(()=>{e=!0},450);return()=>clearTimeout(s)}}else if(i&&kt()===5){if(e){e=!1,As(n);const s=setTimeout(()=>{e=!0},450);return()=>clearTimeout(s)}}else if(i&&kt()===6&&e){e=!1,Ps(n);const s=setTimeout(()=>{e=!0},600);return()=>clearTimeout(s)}}),r.addEventListener("ybuttondown",()=>{i?t||(t=!0,on("Y")):Ms()}),r.addEventListener("xbuttondown",()=>{i?t||(t=!0,on("X")):Hs()}),r.addEventListener("ybuttonup",()=>{t=!1}),r.addEventListener("xbuttonup",()=>{t=!1})},update:function(){ln()}}),Fs=me.registerComponent("right-controller-logging",{init:function(){let i=!1;const e=this.el;e.addEventListener("gripdown",()=>{i=!0}),e.addEventListener("gripup",()=>{i=!1}),e.addEventListener("thumbstickmoved",t=>{i?_s(t):Os(t)}),e.addEventListener("bbuttondown",()=>{sn(!i)}),e.addEventListener("abuttondown",()=>{an(!i)}),e.addEventListener("thumbstickdown",()=>{i?zs():$s()}),e.addEventListener("triggerdown",()=>{i?(Ds(),Ys()):(Rs(),Is())})},update:function(){ln()}});class js{constructor(){j(this,Wt,void 0);B(this,Wt,new ht)}sendSourceSubject(e){o(this,Wt).next(e)}getSourceSettingSubject(){return o(this,Wt).asObservable()}}Wt=new WeakMap;const Ns=new js,Ls=me.registerComponent("oculus-thumbstick-movement-controller",{schema:{acceleration:{type:"number",default:40},fly:{type:"boolean",default:!1},horizontalAxis:{type:"string",enum:["x","y","z"],default:"x"},verticalAxis:{type:"string",enum:["x","y","z"],default:"z"},enabled:{type:"boolean",default:!0},adEnabled:{type:"boolean",default:!0},adInverted:{type:"boolean",default:!1},wsEnabled:{type:"boolean",default:!0},wsInverted:{type:"boolean",default:!1}},required:["acceleration","fly","horizontalAxis","verticalAxis","enabled","adEnabled","adInverted","wsEnabled","wsInverted"],init:function(){this.velocity=new THREE.Vector3(0,0,0),this.tsData=new THREE.Vector2(0,0),this.moveEasing=1.1,this.thumbstickMoved=this.thumbstickMoved.bind(this);const i=this.el;let e=!1,t=!1;i.addEventListener("gripdown",()=>{e=!0}),i.addEventListener("gripup",()=>{e=!1});let r=0;const n=500;i.addEventListener("triggerdown",()=>{const s=performance.now();if(s-r<=n){let l=function(){let f=this.sceneElement.getAttribute("position"),c={x:f.x,y:f.y-1,z:f.z};this.sceneElement.setAttribute("position",c),c.y<=a&&clearInterval(u)},a=2,u=setInterval(l.bind(this),20)}else t=!0;r=s}),i.addEventListener("triggerup",()=>{r=performance.now(),t=!1}),i.addEventListener("thumbstickmoved",s=>{e&&kt()>1?this.tsData.set(0,0):(t?this.data.fly=!0:this.data.fly=!1,this.thumbstickMoved(s))})},update:function(){this.sceneElement=document.getElementById("cameraWrapper")},tick:function(i,e){var t=this.data,r=this.velocity;!r[t.horizontalAxis]&&!r[t.verticalAxis]&&!this.tsData.length()||(e=e/1e3,this.updateVelocity(e),!(!r[t.horizontalAxis]&&!r[t.verticalAxis])&&this.sceneElement.object3D.position.add(this.getMovementVector(e)))},updateVelocity:function(i){var e,t,r,n=this.data,s=this.velocity,a,l;const u=1e-5;if(t=n.horizontalAxis,r=n.verticalAxis,i>.2){s[t]=0,s[r]=0;return}var f=Math.pow(1/this.moveEasing,i*60);s[t]!==0&&(s[t]=s[t]*f),s[r]!==0&&(s[r]=s[r]*f),Math.abs(s[t])<u&&(s[t]=0),Math.abs(s[r])<u&&(s[r]=0),n.enabled&&(e=n.acceleration,n.adEnabled&&this.tsData.x&&(l=n.adInverted?-1:1,s[t]+=l*e*this.tsData.x*i),n.wsEnabled&&(a=n.wsInverted?-1:1,s[r]+=a*e*this.tsData.y*i))},getMovementVector:function(){var i=new THREE.Vector3(0,0,0),e=new THREE.Euler(0,0,0,"YXZ"),t=4;return function(r){var n=this.el.sceneEl.camera.el.object3D.rotation,s=this.velocity,a;return i.copy(s),i.multiplyScalar(r),n&&(a=this.data.fly?n.x:0,e.set(a,n.y-t,0),i.applyEuler(e)),i}}(),thumbstickMoved:function(i){this.tsData.set(i.detail.x,i.detail.y)},remove:function(){this.el.removeEventListener("thumbstickmoved",this.thumbstickMoved)}}),Vs=new er;se.Banner=Ss,se.HistogramTH2=xs,se.LeftController=Bs,se.NdmVrScene=ps,se.RightController=Fs,se.ThumbsticController=Ls,se.ndmVrStorage=Vs,se.sourceSettingSubject=Ns,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|