@ndmspc/ndmvr 0.20240220.0 → 0.20240313.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.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(de,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("aframe"),require("jsroot"),require("three")):typeof define=="function"&&define.amd?define(["exports","react","aframe","jsroot","three"],v):(de=typeof globalThis<"u"?globalThis:de||self,v(de["React Library Vite"]={},de.React,de.AFRAME,de.jsroot,de.THREE$1))})(this,function(de,v,be,At,Xi){"use strict";var $a=Object.defineProperty;var za=(de,v,be)=>v in de?$a(de,v,{enumerable:!0,configurable:!0,writable:!0,value:be}):de[v]=be;var Re=(de,v,be)=>(za(de,typeof v!="symbol"?v+"":v,be),be),Yn=(de,v,be)=>{if(!v.has(de))throw TypeError("Cannot "+be)};var s=(de,v,be)=>(Yn(de,v,"read from private field"),be?be.call(de):v.get(de)),Z=(de,v,be)=>{if(v.has(de))throw TypeError("Cannot add the same private member more than once");v instanceof WeakSet?v.add(de):v.set(de,be)},U=(de,v,be,At)=>(Yn(de,v,"write to private field"),At?At.call(de,be):v.set(de,be),be);var Kr=(de,v,be)=>(Yn(de,v,"access private method"),be);var Ue,Nr,it,Fr,$t,Ut,zt,dt,Pe,et,wt,Oe,gr,te,ot,oe,ge,ve,J,Xe,Ze,st,ft,Ct,yr,je,We,at,lt,Et,ht,Ht,Zt,Mt,ue,Tt,pt,Gt,tt,Lr,Vr,Xr,Kt,qt,Jt,Qt,er,tr,qr,Wr,Ur,Zr,kt,rr,nr,Gr,ir;function Wi(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Pt=Wi(Xi);function Ui(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Jr={exports:{}},or={};/**
1
+ (function(ae,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("aframe"),require("jsroot"),require("three"),require("@patternfly/react-core"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react","aframe","jsroot","three","@patternfly/react-core","react-router-dom"],x):(ae=typeof globalThis<"u"?globalThis:ae||self,x(ae["React Library Vite"]={},ae.React,ae.AFRAME$1,ae.jsroot,ae.THREE$1,ae.reactCore,ae.reactRouterDom))})(this,function(ae,x,ve,It,io,Fe,oo){"use strict";var xl=Object.defineProperty;var bl=(ae,x,ve)=>x in ae?xl(ae,x,{enumerable:!0,configurable:!0,writable:!0,value:ve}):ae[x]=ve;var Ie=(ae,x,ve)=>(bl(ae,typeof x!="symbol"?x+"":x,ve),ve),Zr=(ae,x,ve)=>{if(!x.has(ae))throw TypeError("Cannot "+ve)};var a=(ae,x,ve)=>(Zr(ae,x,"read from private field"),ve?ve.call(ae):x.get(ae)),q=(ae,x,ve)=>{if(x.has(ae))throw TypeError("Cannot add the same private member more than once");x instanceof WeakSet?x.add(ae):x.set(ae,ve)},G=(ae,x,ve,It)=>(Zr(ae,x,"write to private field"),It?It.call(ae,ve):x.set(ae,ve),ve);var tr=(ae,x,ve)=>(Zr(ae,x,"access private method"),ve);var Ge,Xn,lt,Un,Yt,en,Lt,yt,be,tt,it,_t,Pe,bn,te,ct,oe,ge,xe,Q,Xe,qe,ut,vt,Pt,Sn,Oe,Ue,dt,ht,Ot,xt,Vt,tn,Wt,de,Dt,bt,nn,ot,Zn,Gn,qn,rn,on,sn,an,ln,cn,nr,Kn,Jn,Qn,zt,un,dn,er,hn;function so(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Mt=so(io);function ao(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var rr={exports:{}},fn={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -6,17 +6,17 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Nn;function Zi(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&function(){var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A=Symbol.iterator,S="@@iterator";function y(l){if(l===null||typeof l!="object")return null;var p=A&&l[A]||l[S];return typeof p=="function"?p:null}var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(l){{for(var p=arguments.length,x=new Array(p>1?p-1:0),z=1;z<p;z++)x[z-1]=arguments[z];$("error",l,x)}}function $(l,p,x){{var z=_.ReactDebugCurrentFrame,W=z.getStackAddendum();W!==""&&(p+="%s",x=x.concat([W]));var Q=x.map(function(V){return String(V)});Q.unshift("Warning: "+p),Function.prototype.apply.call(console[l],console,Q)}}var D=!1,b=!1,G=!1,O=!1,I=!1,X;X=Symbol.for("react.module.reference");function T(l){return!!(typeof l=="string"||typeof l=="function"||l===n||l===o||I||l===i||l===h||l===u||O||l===P||D||b||G||typeof l=="object"&&l!==null&&(l.$$typeof===E||l.$$typeof===g||l.$$typeof===a||l.$$typeof===c||l.$$typeof===d||l.$$typeof===X||l.getModuleId!==void 0))}function ee(l,p,x){var z=l.displayName;if(z)return z;var W=p.displayName||p.name||"";return W!==""?x+"("+W+")":x}function F(l){return l.displayName||"Context"}function N(l){if(l==null)return null;if(typeof l.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case n:return"Fragment";case t:return"Portal";case o:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case u:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case c:var p=l;return F(p)+".Consumer";case a:var x=l;return F(x._context)+".Provider";case d:return ee(l,l.render,"ForwardRef");case g:var z=l.displayName||null;return z!==null?z:N(l.type)||"Memo";case E:{var W=l,Q=W._payload,V=W._init;try{return N(V(Q))}catch{return null}}}return null}var L=Object.assign,K=0,q,ye,me,Se,Ae,Ie,R;function H(){}H.__reactDisabledLog=!0;function Y(){{if(K===0){q=console.log,ye=console.info,me=console.warn,Se=console.error,Ae=console.group,Ie=console.groupCollapsed,R=console.groupEnd;var l={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}K++}}function w(){{if(K--,K===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},l,{value:q}),info:L({},l,{value:ye}),warn:L({},l,{value:me}),error:L({},l,{value:Se}),group:L({},l,{value:Ae}),groupCollapsed:L({},l,{value:Ie}),groupEnd:L({},l,{value:R})})}K<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var m=_.ReactCurrentDispatcher,re;function k(l,p,x){{if(re===void 0)try{throw Error()}catch(W){var z=W.stack.trim().match(/\n( *(at )?)/);re=z&&z[1]||""}return`
10
- `+re+l}}var fe=!1,ne;{var ae=typeof WeakMap=="function"?WeakMap:Map;ne=new ae}function j(l,p){if(!l||fe)return"";{var x=ne.get(l);if(x!==void 0)return x}var z;fe=!0;var W=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Q;Q=m.current,m.current=null,Y();try{if(p){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(Ye){z=Ye}Reflect.construct(l,[],V)}else{try{V.call()}catch(Ye){z=Ye}l.call(V.prototype)}}else{try{throw Error()}catch(Ye){z=Ye}l()}}catch(Ye){if(Ye&&z&&typeof Ye.stack=="string"){for(var B=Ye.stack.split(`
11
- `),Ce=z.stack.split(`
12
- `),ce=B.length-1,he=Ce.length-1;ce>=1&&he>=0&&B[ce]!==Ce[he];)he--;for(;ce>=1&&he>=0;ce--,he--)if(B[ce]!==Ce[he]){if(ce!==1||he!==1)do if(ce--,he--,he<0||B[ce]!==Ce[he]){var ze=`
13
- `+B[ce].replace(" at new "," at ");return l.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",l.displayName)),typeof l=="function"&&ne.set(l,ze),ze}while(ce>=1&&he>=0);break}}}finally{fe=!1,m.current=Q,w(),Error.prepareStackTrace=W}var qe=l?l.displayName||l.name:"",kr=qe?k(qe):"";return typeof l=="function"&&ne.set(l,kr),kr}function le(l,p,x){return j(l,!1)}function M(l){var p=l.prototype;return!!(p&&p.isReactComponent)}function ie(l,p,x){if(l==null)return"";if(typeof l=="function")return j(l,M(l));if(typeof l=="string")return k(l);switch(l){case h:return k("Suspense");case u:return k("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case d:return le(l.render);case g:return ie(l.type,p,x);case E:{var z=l,W=z._payload,Q=z._init;try{return ie(Q(W),p,x)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,pe={},Me=_.ReactDebugCurrentFrame;function Fe(l){if(l){var p=l._owner,x=ie(l.type,l._source,p?p.type:null);Me.setExtraStackFrame(x)}else Me.setExtraStackFrame(null)}function Be(l,p,x,z,W){{var Q=Function.call.bind(we);for(var V in l)if(Q(l,V)){var B=void 0;try{if(typeof l[V]!="function"){var Ce=Error((z||"React class")+": "+x+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ce.name="Invariant Violation",Ce}B=l[V](p,V,z,x,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ce){B=ce}B&&!(B instanceof Error)&&(Fe(W),C("%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).",z||"React class",x,V,typeof B),Fe(null)),B instanceof Error&&!(B.message in pe)&&(pe[B.message]=!0,Fe(W),C("Failed %s type: %s",x,B.message),Fe(null))}}}var _t=Array.isArray;function Ge(l){return _t(l)}function Le(l){{var p=typeof Symbol=="function"&&Symbol.toStringTag,x=p&&l[Symbol.toStringTag]||l.constructor.name||"Object";return x}}function se(l){try{return De(l),!1}catch{return!0}}function De(l){return""+l}function mt(l){if(se(l))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Le(l)),De(l)}var Ve=_.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},br,vr,Rt;Rt={};function Tn(l){if(we.call(l,"ref")){var p=Object.getOwnPropertyDescriptor(l,"ref").get;if(p&&p.isReactWarning)return!1}return l.ref!==void 0}function kn(l){if(we.call(l,"key")){var p=Object.getOwnPropertyDescriptor(l,"key").get;if(p&&p.isReactWarning)return!1}return l.key!==void 0}function _n(l,p){if(typeof l.ref=="string"&&Ve.current&&p&&Ve.current.stateNode!==p){var x=N(Ve.current.type);Rt[x]||(C('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',N(Ve.current.type),l.ref),Rt[x]=!0)}}function An(l,p){{var x=function(){br||(br=!0,C("%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)",p))};x.isReactWarning=!0,Object.defineProperty(l,"key",{get:x,configurable:!0})}}function Pn(l,p){{var x=function(){vr||(vr=!0,C("%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)",p))};x.isReactWarning=!0,Object.defineProperty(l,"ref",{get:x,configurable:!0})}}var On=function(l,p,x,z,W,Q,V){var B={$$typeof:e,type:l,key:p,ref:x,props:V,_owner:Q};return B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(B,"_self",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.defineProperty(B,"_source",{configurable:!1,enumerable:!1,writable:!1,value:W}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B};function jn(l,p,x,z,W){{var Q,V={},B=null,Ce=null;x!==void 0&&(mt(x),B=""+x),kn(p)&&(mt(p.key),B=""+p.key),Tn(p)&&(Ce=p.ref,_n(p,W));for(Q in p)we.call(p,Q)&&!Je.hasOwnProperty(Q)&&(V[Q]=p[Q]);if(l&&l.defaultProps){var ce=l.defaultProps;for(Q in ce)V[Q]===void 0&&(V[Q]=ce[Q])}if(B||Ce){var he=typeof l=="function"?l.displayName||l.name||"Unknown":l;B&&An(V,he),Ce&&Pn(V,he)}return On(l,B,Ce,W,z,Ve.current,V)}}var It=_.ReactCurrentOwner,xr=_.ReactDebugCurrentFrame;function Ke(l){if(l){var p=l._owner,x=ie(l.type,l._source,p?p.type:null);xr.setExtraStackFrame(x)}else xr.setExtraStackFrame(null)}var Bt;Bt=!1;function Yt(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function Sr(){{if(It.current){var l=N(It.current.type);if(l)return`
9
+ */var Gr;function lo(){return Gr||(Gr=1,process.env.NODE_ENV!=="production"&&function(){var n=x,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),j=Symbol.iterator,b="@@iterator";function m(l){if(l===null||typeof l!="object")return null;var g=j&&l[j]||l[b];return typeof g=="function"?g:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(l){{for(var g=arguments.length,E=new Array(g>1?g-1:0),$=1;$<g;$++)E[$-1]=arguments[$];z("error",l,E)}}function z(l,g,E){{var $=k.ReactDebugCurrentFrame,Z=$.getStackAddendum();Z!==""&&(g+="%s",E=E.concat([Z]));var ee=E.map(function(X){return String(X)});ee.unshift("Warning: "+g),Function.prototype.apply.call(console[l],console,ee)}}var O=!1,v=!1,U=!1,P=!1,I=!1,Y;Y=Symbol.for("react.module.reference");function A(l){return!!(typeof l=="string"||typeof l=="function"||l===r||l===o||I||l===i||l===f||l===u||P||l===C||O||v||U||typeof l=="object"&&l!==null&&(l.$$typeof===S||l.$$typeof===p||l.$$typeof===s||l.$$typeof===c||l.$$typeof===d||l.$$typeof===Y||l.getModuleId!==void 0))}function V(l,g,E){var $=l.displayName;if($)return $;var Z=g.displayName||g.name||"";return Z!==""?E+"("+Z+")":E}function L(l){return l.displayName||"Context"}function B(l){if(l==null)return null;if(typeof l.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case r:return"Fragment";case t:return"Portal";case o:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case u:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case c:var g=l;return L(g)+".Consumer";case s:var E=l;return L(E._context)+".Provider";case d:return V(l,l.render,"ForwardRef");case p:var $=l.displayName||null;return $!==null?$:B(l.type)||"Memo";case S:{var Z=l,ee=Z._payload,X=Z._init;try{return B(X(ee))}catch{return null}}}return null}var W=Object.assign,K=0,J,ye,me,we,_e,Re,R;function M(){}M.__reactDisabledLog=!0;function F(){{if(K===0){J=console.log,ye=console.info,me=console.warn,we=console.error,_e=console.group,Re=console.groupCollapsed,R=console.groupEnd;var l={configurable:!0,enumerable:!0,value:M,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}K++}}function T(){{if(K--,K===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},l,{value:J}),info:W({},l,{value:ye}),warn:W({},l,{value:me}),error:W({},l,{value:we}),group:W({},l,{value:_e}),groupCollapsed:W({},l,{value:Re}),groupEnd:W({},l,{value:R})})}K<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=k.ReactCurrentDispatcher,ne;function _(l,g,E){{if(ne===void 0)try{throw Error()}catch(Z){var $=Z.stack.trim().match(/\n( *(at )?)/);ne=$&&$[1]||""}return`
10
+ `+ne+l}}var he=!1,re;{var le=typeof WeakMap=="function"?WeakMap:Map;re=new le}function D(l,g){if(!l||he)return"";{var E=re.get(l);if(E!==void 0)return E}var $;he=!0;var Z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ee;ee=y.current,y.current=null,F();try{if(g){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(Be){$=Be}Reflect.construct(l,[],X)}else{try{X.call()}catch(Be){$=Be}l.call(X.prototype)}}else{try{throw Error()}catch(Be){$=Be}l()}}catch(Be){if(Be&&$&&typeof Be.stack=="string"){for(var N=Be.stack.split(`
11
+ `),Ce=$.stack.split(`
12
+ `),ue=N.length-1,fe=Ce.length-1;ue>=1&&fe>=0&&N[ue]!==Ce[fe];)fe--;for(;ue>=1&&fe>=0;ue--,fe--)if(N[ue]!==Ce[fe]){if(ue!==1||fe!==1)do if(ue--,fe--,fe<0||N[ue]!==Ce[fe]){var $e=`
13
+ `+N[ue].replace(" at new "," at ");return l.displayName&&$e.includes("<anonymous>")&&($e=$e.replace("<anonymous>",l.displayName)),typeof l=="function"&&re.set(l,$e),$e}while(ue>=1&&fe>=0);break}}}finally{he=!1,y.current=ee,T(),Error.prepareStackTrace=Z}var Qe=l?l.displayName||l.name:"",Pn=Qe?_(Qe):"";return typeof l=="function"&&re.set(l,Pn),Pn}function ce(l,g,E){return D(l,!1)}function H(l){var g=l.prototype;return!!(g&&g.isReactComponent)}function ie(l,g,E){if(l==null)return"";if(typeof l=="function")return D(l,H(l));if(typeof l=="string")return _(l);switch(l){case f:return _("Suspense");case u:return _("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case d:return ce(l.render);case p:return ie(l.type,g,E);case S:{var $=l,Z=$._payload,ee=$._init;try{return ie(ee(Z),g,E)}catch{}}}return""}var Ee=Object.prototype.hasOwnProperty,pe={},He=k.ReactDebugCurrentFrame;function Le(l){if(l){var g=l._owner,E=ie(l.type,l._source,g?g.type:null);He.setExtraStackFrame(E)}else He.setExtraStackFrame(null)}function Ne(l,g,E,$,Z){{var ee=Function.call.bind(Ee);for(var X in l)if(ee(l,X)){var N=void 0;try{if(typeof l[X]!="function"){var Ce=Error(($||"React class")+": "+E+" type `"+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[X]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ce.name="Invariant Violation",Ce}N=l[X](g,X,$,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ue){N=ue}N&&!(N instanceof Error)&&(Le(Z),w("%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).",$||"React class",E,X,typeof N),Le(null)),N instanceof Error&&!(N.message in pe)&&(pe[N.message]=!0,Le(Z),w("Failed %s type: %s",E,N.message),Le(null))}}}var $t=Array.isArray;function Ke(l){return $t(l)}function Ve(l){{var g=typeof Symbol=="function"&&Symbol.toStringTag,E=g&&l[Symbol.toStringTag]||l.constructor.name||"Object";return E}}function se(l){try{return De(l),!1}catch{return!0}}function De(l){return""+l}function St(l){if(se(l))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(l)),De(l)}var We=k.ReactCurrentOwner,nt={key:!0,ref:!0,__self:!0,__source:!0},wn,En,Xt;Xt={};function zr(l){if(Ee.call(l,"ref")){var g=Object.getOwnPropertyDescriptor(l,"ref").get;if(g&&g.isReactWarning)return!1}return l.ref!==void 0}function $r(l){if(Ee.call(l,"key")){var g=Object.getOwnPropertyDescriptor(l,"key").get;if(g&&g.isReactWarning)return!1}return l.key!==void 0}function Ir(l,g){if(typeof l.ref=="string"&&We.current&&g&&We.current.stateNode!==g){var E=B(We.current.type);Xt[E]||(w('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',B(We.current.type),l.ref),Xt[E]=!0)}}function Mr(l,g){{var E=function(){wn||(wn=!0,w("%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)",g))};E.isReactWarning=!0,Object.defineProperty(l,"key",{get:E,configurable:!0})}}function Hr(l,g){{var E=function(){En||(En=!0,w("%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)",g))};E.isReactWarning=!0,Object.defineProperty(l,"ref",{get:E,configurable:!0})}}var Rr=function(l,g,E,$,Z,ee,X){var N={$$typeof:e,type:l,key:g,ref:E,props:X,_owner:ee};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function Nr(l,g,E,$,Z){{var ee,X={},N=null,Ce=null;E!==void 0&&(St(E),N=""+E),$r(g)&&(St(g.key),N=""+g.key),zr(g)&&(Ce=g.ref,Ir(g,Z));for(ee in g)Ee.call(g,ee)&&!nt.hasOwnProperty(ee)&&(X[ee]=g[ee]);if(l&&l.defaultProps){var ue=l.defaultProps;for(ee in ue)X[ee]===void 0&&(X[ee]=ue[ee])}if(N||Ce){var fe=typeof l=="function"?l.displayName||l.name||"Unknown":l;N&&Mr(X,fe),Ce&&Hr(X,fe)}return Rr(l,N,Ce,Z,$,We.current,X)}}var Ut=k.ReactCurrentOwner,Cn=k.ReactDebugCurrentFrame;function Je(l){if(l){var g=l._owner,E=ie(l.type,l._source,g?g.type:null);Cn.setExtraStackFrame(E)}else Cn.setExtraStackFrame(null)}var Zt;Zt=!1;function Gt(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function Tn(){{if(Ut.current){var l=B(Ut.current.type);if(l)return`
14
14
 
15
- Check the render method of \``+l+"`."}return""}}function Dn(l){{if(l!==void 0){var p=l.fileName.replace(/^.*[\\\/]/,""),x=l.lineNumber;return`
15
+ Check the render method of \``+l+"`."}return""}}function Fr(l){{if(l!==void 0){var g=l.fileName.replace(/^.*[\\\/]/,""),E=l.lineNumber;return`
16
16
 
17
- Check your code at `+p+":"+x+"."}return""}}var wr={};function $n(l){{var p=Sr();if(!p){var x=typeof l=="string"?l:l.displayName||l.name;x&&(p=`
17
+ Check your code at `+g+":"+E+"."}return""}}var kn={};function Br(l){{var g=Tn();if(!g){var E=typeof l=="string"?l:l.displayName||l.name;E&&(g=`
18
18
 
19
- Check the top-level render call using <`+x+">.")}return p}}function Cr(l,p){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var x=$n(p);if(wr[x])return;wr[x]=!0;var z="";l&&l._owner&&l._owner!==It.current&&(z=" It was passed a child from "+N(l._owner.type)+"."),Ke(l),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',x,z),Ke(null)}}function Er(l,p){{if(typeof l!="object")return;if(Ge(l))for(var x=0;x<l.length;x++){var z=l[x];Yt(z)&&Cr(z,p)}else if(Yt(l))l._store&&(l._store.validated=!0);else if(l){var W=y(l);if(typeof W=="function"&&W!==l.entries)for(var Q=W.call(l),V;!(V=Q.next()).done;)Yt(V.value)&&Cr(V.value,p)}}}function zn(l){{var p=l.type;if(p==null||typeof p=="string")return;var x;if(typeof p=="function")x=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===d||p.$$typeof===g))x=p.propTypes;else return;if(x){var z=N(p);Be(x,l.props,"prop",z,l)}else if(p.PropTypes!==void 0&&!Bt){Bt=!0;var W=N(p);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",W||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Hn(l){{for(var p=Object.keys(l.props),x=0;x<p.length;x++){var z=p[x];if(z!=="children"&&z!=="key"){Ke(l),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",z),Ke(null);break}}l.ref!==null&&(Ke(l),C("Invalid attribute `ref` supplied to `React.Fragment`."),Ke(null))}}function Tr(l,p,x,z,W,Q){{var V=T(l);if(!V){var B="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(B+=" 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 Ce=Dn(W);Ce?B+=Ce:B+=Sr();var ce;l===null?ce="null":Ge(l)?ce="array":l!==void 0&&l.$$typeof===e?(ce="<"+(N(l.type)||"Unknown")+" />",B=" Did you accidentally export a JSX literal instead of a component?"):ce=typeof l,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ce,B)}var he=jn(l,p,x,W,Q);if(he==null)return he;if(V){var ze=p.children;if(ze!==void 0)if(z)if(Ge(ze)){for(var qe=0;qe<ze.length;qe++)Er(ze[qe],l);Object.freeze&&Object.freeze(ze)}else C("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 Er(ze,l)}return l===n?Hn(he):zn(he),he}}function Mn(l,p,x){return Tr(l,p,x,!0)}function Rn(l,p,x){return Tr(l,p,x,!1)}var In=Rn,Bn=Mn;or.Fragment=n,or.jsx=In,or.jsxs=Bn}()),or}var sr={};/**
19
+ Check the top-level render call using <`+E+">.")}return g}}function An(l,g){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var E=Br(g);if(kn[E])return;kn[E]=!0;var $="";l&&l._owner&&l._owner!==Ut.current&&($=" It was passed a child from "+B(l._owner.type)+"."),Je(l),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,$),Je(null)}}function jn(l,g){{if(typeof l!="object")return;if(Ke(l))for(var E=0;E<l.length;E++){var $=l[E];Gt($)&&An($,g)}else if(Gt(l))l._store&&(l._store.validated=!0);else if(l){var Z=m(l);if(typeof Z=="function"&&Z!==l.entries)for(var ee=Z.call(l),X;!(X=ee.next()).done;)Gt(X.value)&&An(X.value,g)}}}function Yr(l){{var g=l.type;if(g==null||typeof g=="string")return;var E;if(typeof g=="function")E=g.propTypes;else if(typeof g=="object"&&(g.$$typeof===d||g.$$typeof===p))E=g.propTypes;else return;if(E){var $=B(g);Ne(E,l.props,"prop",$,l)}else if(g.PropTypes!==void 0&&!Zt){Zt=!0;var Z=B(g);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Z||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Lr(l){{for(var g=Object.keys(l.props),E=0;E<g.length;E++){var $=g[E];if($!=="children"&&$!=="key"){Je(l),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Je(null);break}}l.ref!==null&&(Je(l),w("Invalid attribute `ref` supplied to `React.Fragment`."),Je(null))}}function _n(l,g,E,$,Z,ee){{var X=A(l);if(!X){var N="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(N+=" 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 Ce=Fr(Z);Ce?N+=Ce:N+=Tn();var ue;l===null?ue="null":Ke(l)?ue="array":l!==void 0&&l.$$typeof===e?(ue="<"+(B(l.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof l,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,N)}var fe=Nr(l,g,E,Z,ee);if(fe==null)return fe;if(X){var $e=g.children;if($e!==void 0)if($)if(Ke($e)){for(var Qe=0;Qe<$e.length;Qe++)jn($e[Qe],l);Object.freeze&&Object.freeze($e)}else w("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 jn($e,l)}return l===r?Lr(fe):Yr(fe),fe}}function Vr(l,g,E){return _n(l,g,E,!0)}function Wr(l,g,E){return _n(l,g,E,!1)}var Xr=Wr,Ur=Vr;fn.Fragment=r,fn.jsx=Xr,fn.jsxs=Ur}()),fn}var pn={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -24,7 +24,7 @@ Check the top-level render call using <`+x+">.")}return p}}function Cr(l,p){{if(
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var Fn;function Gi(){if(Fn)return sr;Fn=1;var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(c,d,h){var u,g={},E=null,P=null;h!==void 0&&(E=""+h),d.key!==void 0&&(E=""+d.key),d.ref!==void 0&&(P=d.ref);for(u in d)n.call(d,u)&&!o.hasOwnProperty(u)&&(g[u]=d[u]);if(c&&c.defaultProps)for(u in d=c.defaultProps,d)g[u]===void 0&&(g[u]=d[u]);return{$$typeof:e,type:c,key:E,ref:P,props:g,_owner:i.current}}return sr.Fragment=t,sr.jsx=a,sr.jsxs=a,sr}process.env.NODE_ENV==="production"?Jr.exports=Gi():Jr.exports=Zi();var f=Jr.exports;class Qr{constructor(){Z(this,Ue,void 0);Z(this,Nr,void 0);Z(this,it,[]);Z(this,Fr,e=>s(this,it).filter(t=>t.id!==e.id));Re(this,"containThisBin",e=>s(this,it).filter(n=>n.id===e.id).length!==0);Re(this,"storeBinToLocalStorage",e=>{this.containThisBin(e)||(s(this,it).push(e),s(this,Ue).setItem("selectedBins",JSON.stringify(s(this,it))))});Re(this,"deleteBinFromLocalStorage",e=>{this.containThisBin(e)&&(U(this,it,s(this,Fr).call(this,e)),s(this,Ue).setItem("selectedBins",JSON.stringify(s(this,it))))});Re(this,"getBinsFromLocalStorage",()=>{const e=JSON.parse(s(this,Ue).getItem("selectedBins"));return e===null?[]:e});U(this,Ue,window.localStorage),U(this,Nr,document.getElementById("cameraRig")),U(this,it,this.getBinsFromLocalStorage())}storeCurrentBinToLocalStorage(e){s(this,Ue).setItem("currentBin",JSON.stringify(e))}getCurrentBinFromLocalStorage(){const e=JSON.parse(s(this,Ue).getItem("currentBin"));return e===void 0||e===""?null:e}loadProperty(e){return JSON.parse(s(this,Ue).getItem(e))}storeProperty(e,t){s(this,Ue).setItem(e,JSON.stringify(t))}initHistogramData(e){e._typename.includes("TH3")?this.storeTH3HistogramLimits(e):e._typename.includes("TH2")&&this.storeTH2HistogramLimits(e)}storeTH2Offsets(e,t,n){let i=this.loadProperty("TH2"),o;i===null?(i={},o={name:"TH2",xOffset:1,yOffset:1,range:8}):o={name:"TH2",xOffset:e,yOffset:t,range:n},i.section=o,this.storeProperty("TH2",i)}storeTH3Offsets(e,t,n,i){let o=this.loadProperty("TH3"),a;o===null?(o={},a={name:"TH3",xOffset:1,yOffset:1,zOffset:1,range:4}):a={name:"TH3",xOffset:e,yOffset:t,zOffset:n,range:i},o.section=a,this.storeProperty("TH3",o)}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){s(this,Ue).setItem("rootFile",e)}loadFilePath(){const e=s(this,Ue).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()}}Ue=new WeakMap,Nr=new WeakMap,it=new WeakMap,Fr=new WeakMap;const Ln=new Qr;/*! *****************************************************************************
27
+ */var qr;function co(){if(qr)return pn;qr=1;var n=x,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(c,d,f){var u,p={},S=null,C=null;f!==void 0&&(S=""+f),d.key!==void 0&&(S=""+d.key),d.ref!==void 0&&(C=d.ref);for(u in d)r.call(d,u)&&!o.hasOwnProperty(u)&&(p[u]=d[u]);if(c&&c.defaultProps)for(u in d=c.defaultProps,d)p[u]===void 0&&(p[u]=d[u]);return{$$typeof:e,type:c,key:S,ref:C,props:p,_owner:i.current}}return pn.Fragment=t,pn.jsx=s,pn.jsxs=s,pn}process.env.NODE_ENV==="production"?rr.exports=co():rr.exports=lo();var h=rr.exports;class ir{constructor(){q(this,Ge,void 0);q(this,Xn,void 0);q(this,lt,[]);q(this,Un,e=>a(this,lt).filter(t=>t.id!==e.id));Ie(this,"containThisBin",e=>a(this,lt).filter(r=>r.id===e.id).length!==0);Ie(this,"storeBinToLocalStorage",e=>{this.containThisBin(e)||(a(this,lt).push(e),a(this,Ge).setItem("selectedBins",JSON.stringify(a(this,lt))))});Ie(this,"deleteBinFromLocalStorage",e=>{this.containThisBin(e)&&(G(this,lt,a(this,Un).call(this,e)),a(this,Ge).setItem("selectedBins",JSON.stringify(a(this,lt))))});Ie(this,"getBinsFromLocalStorage",()=>{const e=JSON.parse(a(this,Ge).getItem("selectedBins"));return e===null?[]:e});G(this,Ge,window.localStorage),G(this,Xn,document.getElementById("cameraRig")),G(this,lt,this.getBinsFromLocalStorage())}storeCurrentBinToLocalStorage(e){a(this,Ge).setItem("currentBin",JSON.stringify(e))}getCurrentBinFromLocalStorage(){const e=JSON.parse(a(this,Ge).getItem("currentBin"));return e===void 0||e===""?null:e}loadProperty(e){return JSON.parse(a(this,Ge).getItem(e))}storeProperty(e,t){a(this,Ge).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 i=this.loadProperty("TH2"),o;i===null?(i={},o={name:"TH2",xOffset:1,yOffset:1,range:8}):o={name:"TH2",xOffset:e,yOffset:t,range:r},i.section=o,this.storeProperty("TH2",i)}storeTH3Offsets(e,t,r,i){let o=this.loadProperty("TH3"),s;o===null?(o={},s={name:"TH3",xOffset:1,yOffset:1,zOffset:1,range:4}):s={name:"TH3",xOffset:e,yOffset:t,zOffset:r,range:i},o.section=s,this.storeProperty("TH3",o)}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){a(this,Ge).setItem("rootFile",e)}loadFilePath(){const e=a(this,Ge).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()}}Ge=new WeakMap,Xn=new WeakMap,lt=new WeakMap,Un=new WeakMap;const Kr=new ir;/*! *****************************************************************************
28
28
  Copyright (c) Microsoft Corporation.
29
29
 
30
30
  Permission to use, copy, modify, and/or distribute this software for any
@@ -37,9 +37,9 @@ Check the top-level render call using <`+x+">.")}return p}}function Cr(l,p){{if(
37
37
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
38
38
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39
39
  PERFORMANCE OF THIS SOFTWARE.
40
- ***************************************************************************** */var en=function(r,e){return en=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])},en(r,e)};function Nt(r,e){en(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function tn(r){return typeof r=="function"}var Vn=!1,rt={Promise:void 0,set useDeprecatedSynchronousErrorHandling(r){if(r){var e=new Error;""+e.stack}Vn=r},get useDeprecatedSynchronousErrorHandling(){return Vn}};function ar(r){setTimeout(function(){throw r},0)}var _r={closed:!0,next:function(r){},error:function(r){if(rt.useDeprecatedSynchronousErrorHandling)throw r;ar(r)},complete:function(){}},Ki=function(){return Array.isArray||function(r){return r&&typeof r.length=="number"}}();function qi(r){return r!==null&&typeof r=="object"}var Ji=function(){function r(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
41
- `+e.map(function(t,n){return n+1+") "+t.toString()}).join(`
42
- `):"",this.name="UnsubscriptionError",this.errors=e,this}return r.prototype=Object.create(Error.prototype),r}(),Ar=Ji,lr=function(){function r(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return r.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this,n=t._parentOrParents,i=t._ctorUnsubscribe,o=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof r)n.remove(this);else if(n!==null)for(var c=0;c<n.length;++c){var d=n[c];d.remove(this)}if(tn(o)){i&&(this._unsubscribe=void 0);try{o.call(this)}catch(g){e=g instanceof Ar?Xn(g.errors):[g]}}if(Ki(a))for(var c=-1,h=a.length;++c<h;){var u=a[c];if(qi(u))try{u.unsubscribe()}catch(E){e=e||[],E instanceof Ar?e=e.concat(Xn(E.errors)):e.push(E)}}if(e)throw new Ar(e)}},r.prototype.add=function(e){var t=e;if(!e)return r.EMPTY;switch(typeof e){case"function":t=new r(e);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof r)){var n=t;t=new r,t._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=t._parentOrParents;if(i===null)t._parentOrParents=this;else if(i instanceof r){if(i===this)return t;t._parentOrParents=[i,this]}else if(i.indexOf(this)===-1)i.push(this);else return t;var o=this._subscriptions;return o===null?this._subscriptions=[t]:o.push(t),t},r.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}},r.EMPTY=function(e){return e.closed=!0,e}(new r),r}();function Xn(r){return r.reduce(function(e,t){return e.concat(t instanceof Ar?t.errors:t)},[])}var Pr=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),Ft=function(r){Nt(e,r);function e(t,n,i){var o=r.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=_r;break;case 1:if(!t){o.destination=_r;break}if(typeof t=="object"){t instanceof e?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new Wn(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new Wn(o,t,n,i);break}return o}return e.prototype[Pr]=function(){return this},e.create=function(t,n,i){var o=new e(t,n,i);return o.syncErrorThrowable=!1,o},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,r.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}(lr),Wn=function(r){Nt(e,r);function e(t,n,i,o){var a=r.call(this)||this;a._parentSubscriber=t;var c,d=a;return tn(n)?c=n:n&&(c=n.next,i=n.error,o=n.complete,n!==_r&&(d=Object.create(n),tn(d.unsubscribe)&&a.add(d.unsubscribe.bind(d)),d.unsubscribe=a.unsubscribe.bind(a))),a._context=d,a._next=c,a._error=i,a._complete=o,a}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var n=this._parentSubscriber;!rt.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(n,this._next,t)&&this.unsubscribe()}},e.prototype.error=function(t){if(!this.isStopped){var n=this._parentSubscriber,i=rt.useDeprecatedSynchronousErrorHandling;if(this._error)!i||!n.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(n,this._error,t),this.unsubscribe());else if(n.syncErrorThrowable)i?(n.syncErrorValue=t,n.syncErrorThrown=!0):ar(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;ar(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var i=function(){return t._complete.call(t._context)};!rt.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?(this.__tryOrUnsub(i),this.unsubscribe()):(this.__tryOrSetError(n,i),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,n){try{t.call(this._context,n)}catch(i){if(this.unsubscribe(),rt.useDeprecatedSynchronousErrorHandling)throw i;ar(i)}},e.prototype.__tryOrSetError=function(t,n,i){if(!rt.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,i)}catch(o){return rt.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=o,t.syncErrorThrown=!0,!0):(ar(o),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Ft);function Qi(r){for(;r;){var e=r,t=e.closed,n=e.destination,i=e.isStopped;if(t||i)return!1;n&&n instanceof Ft?r=n:r=null}return!0}function eo(r,e,t){if(r){if(r instanceof Ft)return r;if(r[Pr])return r[Pr]()}return!r&&!e&&!t?new Ft(_r):new Ft(r,e,t)}var to=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ro(r){return r}function no(r){return r.length===0?ro:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}var Un=function(){function r(e){this._isScalar=!1,e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this.operator,o=eo(e,t,n);if(i?o.add(i.call(o,this.source)):o.add(this.source||rt.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),rt.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){rt.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Qi(e)?e.error(t):console.warn(t)}},r.prototype.forEach=function(e,t){var n=this;return t=Zn(t),new t(function(i,o){var a;a=n.subscribe(function(c){try{e(c)}catch(d){o(d),a&&a.unsubscribe()}},o,i)})},r.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},r.prototype[to]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:no(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=Zn(e),new e(function(n,i){var o;t.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},r.create=function(e){return new r(e)},r}();function Zn(r){if(r||(r=Promise),!r)throw new Error("no Promise impl found");return r}var io=function(){function r(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return r.prototype=Object.create(Error.prototype),r}(),cr=io,oo=function(r){Nt(e,r);function e(t,n){var i=r.call(this)||this;return i.subject=t,i.subscriber=n,i.closed=!1,i}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,n=t.observers;if(this.subject=null,!(!n||n.length===0||t.isStopped||t.closed)){var i=n.indexOf(this.subscriber);i!==-1&&n.splice(i,1)}}},e}(lr),so=function(r){Nt(e,r);function e(t){var n=r.call(this,t)||this;return n.destination=t,n}return e}(Ft),gt=function(r){Nt(e,r);function e(){var t=r.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype[Pr]=function(){return new so(this)},e.prototype.lift=function(t){var n=new Gn(this,this);return n.operator=t,n},e.prototype.next=function(t){if(this.closed)throw new cr;if(!this.isStopped)for(var n=this.observers,i=n.length,o=n.slice(),a=0;a<i;a++)o[a].next(t)},e.prototype.error=function(t){if(this.closed)throw new cr;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var n=this.observers,i=n.length,o=n.slice(),a=0;a<i;a++)o[a].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new cr;this.isStopped=!0;for(var t=this.observers,n=t.length,i=t.slice(),o=0;o<n;o++)i[o].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 cr;return r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new cr;return this.hasError?(t.error(this.thrownError),lr.EMPTY):this.isStopped?(t.complete(),lr.EMPTY):(this.observers.push(t),new oo(this,t))},e.prototype.asObservable=function(){var t=new Un;return t.source=this,t},e.create=function(t,n){return new Gn(t,n)},e}(Un),Gn=function(r){Nt(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n=this.destination;n&&n.next&&n.next(t)},e.prototype.error=function(t){var n=this.destination;n&&n.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 n=this.source;return n?this.source.subscribe(t):lr.EMPTY},e}(gt);class ao{constructor(){Z(this,$t,void 0);U(this,$t,new gt)}saveSelectedBinToLocalStorage(){s(this,$t).next(!0)}deleteBinFromLocalStorage(){s(this,$t).next(!1)}getKeyboardEvent(){return s(this,$t).asObservable()}}$t=new WeakMap;const Or=new ao;class lo{constructor(){Z(this,Ut,void 0);U(this,Ut,new gt)}showBinProjection(e){s(this,Ut).next(e)}getServiceEvent(){return s(this,Ut).asObservable()}}Ut=new WeakMap;const Kn=new lo;class co{constructor(){Z(this,zt,void 0);U(this,zt,new gt)}sendDataOfTheSelectedBin(e){s(this,zt).next(e)}emmitCommand(e){s(this,zt).next({command:e})}getBinDistributor(){return s(this,zt).asObservable()}}zt=new WeakMap;const ur=new co,yt=v.createContext();be.registerComponent("interaction",{init:function(){const r=this.el;r.addEventListener("click",e=>{r.setAttribute("material","color","orange")}),r.addEventListener("mouseenter",e=>{r.object3D.position.z+=.002}),r.addEventListener("mouseleave",e=>{r.object3D.position.z-=.002})}});class rn{constructor(){Z(this,dt,void 0);U(this,dt,new gt)}changeHistogramSectionByOffset(e,t,n,i){s(this,dt).next({name:t,axis:e,increment:n,defaultRange:i})}changeHistogramFunction(e,t){s(this,dt).next({name:t,fFunction:e})}changeHistogramScale(e,t){s(this,dt).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){s(this,dt).next({name:t,minValue:e})}getChangedSection(){return s(this,dt).asObservable()}}dt=new WeakMap;const nt=new rn,$e=new rn,He=new rn;var nn={exports:{}},Ee={};/**
40
+ ***************************************************************************** */var or=function(n,e){return or=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])},or(n,e)};function Ze(n,e){or(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function sr(n){return typeof n=="function"}var Jr=!1,st={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){var e=new Error;""+e.stack}Jr=n},get useDeprecatedSynchronousErrorHandling(){return Jr}};function mn(n){setTimeout(function(){throw n},0)}var On={closed:!0,next:function(n){},error:function(n){if(st.useDeprecatedSynchronousErrorHandling)throw n;mn(n)},complete:function(){}},uo=function(){return Array.isArray||function(n){return n&&typeof n.length=="number"}}();function ho(n){return n!==null&&typeof n=="object"}var fo=function(){function n(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
41
+ `+e.map(function(t,r){return r+1+") "+t.toString()}).join(`
42
+ `):"",this.name="UnsubscriptionError",this.errors=e,this}return n.prototype=Object.create(Error.prototype),n}(),Dn=fo,wt=function(){function n(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return n.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this,r=t._parentOrParents,i=t._ctorUnsubscribe,o=t._unsubscribe,s=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof n)r.remove(this);else if(r!==null)for(var c=0;c<r.length;++c){var d=r[c];d.remove(this)}if(sr(o)){i&&(this._unsubscribe=void 0);try{o.call(this)}catch(p){e=p instanceof Dn?Qr(p.errors):[p]}}if(uo(s))for(var c=-1,f=s.length;++c<f;){var u=s[c];if(ho(u))try{u.unsubscribe()}catch(S){e=e||[],S instanceof Dn?e=e.concat(Qr(S.errors)):e.push(S)}}if(e)throw new Dn(e)}},n.prototype.add=function(e){var t=e;if(!e)return n.EMPTY;switch(typeof e){case"function":t=new n(e);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof n)){var r=t;t=new n,t._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=t._parentOrParents;if(i===null)t._parentOrParents=this;else if(i instanceof n){if(i===this)return t;t._parentOrParents=[i,this]}else if(i.indexOf(this)===-1)i.push(this);else return t;var o=this._subscriptions;return o===null?this._subscriptions=[t]:o.push(t),t},n.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);r!==-1&&t.splice(r,1)}},n.EMPTY=function(e){return e.closed=!0,e}(new n),n}();function Qr(n){return n.reduce(function(e,t){return e.concat(t instanceof Dn?t.errors:t)},[])}var zn=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),Ht=function(n){Ze(e,n);function e(t,r,i){var o=n.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=On;break;case 1:if(!t){o.destination=On;break}if(typeof t=="object"){t instanceof e?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(o)):(o.syncErrorThrowable=!0,o.destination=new ei(o,t));break}default:o.syncErrorThrowable=!0,o.destination=new ei(o,t,r,i);break}return o}return e.prototype[zn]=function(){return this},e.create=function(t,r,i){var o=new e(t,r,i);return o.syncErrorThrowable=!1,o},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,n.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}(wt),ei=function(n){Ze(e,n);function e(t,r,i,o){var s=n.call(this)||this;s._parentSubscriber=t;var c,d=s;return sr(r)?c=r:r&&(c=r.next,i=r.error,o=r.complete,r!==On&&(d=Object.create(r),sr(d.unsubscribe)&&s.add(d.unsubscribe.bind(d)),d.unsubscribe=s.unsubscribe.bind(s))),s._context=d,s._next=c,s._error=i,s._complete=o,s}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var r=this._parentSubscriber;!st.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,i=st.useDeprecatedSynchronousErrorHandling;if(this._error)!i||!r.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(r,this._error,t),this.unsubscribe());else if(r.syncErrorThrowable)i?(r.syncErrorValue=t,r.syncErrorThrown=!0):mn(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;mn(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var r=this._parentSubscriber;if(this._complete){var i=function(){return t._complete.call(t._context)};!st.useDeprecatedSynchronousErrorHandling||!r.syncErrorThrowable?(this.__tryOrUnsub(i),this.unsubscribe()):(this.__tryOrSetError(r,i),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,r){try{t.call(this._context,r)}catch(i){if(this.unsubscribe(),st.useDeprecatedSynchronousErrorHandling)throw i;mn(i)}},e.prototype.__tryOrSetError=function(t,r,i){if(!st.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{r.call(this._context,i)}catch(o){return st.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=o,t.syncErrorThrown=!0,!0):(mn(o),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(Ht);function po(n){for(;n;){var e=n,t=e.closed,r=e.destination,i=e.isStopped;if(t||i)return!1;r&&r instanceof Ht?n=r:n=null}return!0}function mo(n,e,t){if(n){if(n instanceof Ht)return n;if(n[zn])return n[zn]()}return!n&&!e&&!t?new Ht(On):new Ht(n,e,t)}var go=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function yo(n){return n}function vo(n){return n.length===0?yo:n.length===1?n[0]:function(t){return n.reduce(function(r,i){return i(r)},t)}}var Et=function(){function n(e){this._isScalar=!1,e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,r){var i=this.operator,o=mo(e,t,r);if(i?o.add(i.call(o,this.source)):o.add(this.source||st.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),st.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){st.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),po(e)?e.error(t):console.warn(t)}},n.prototype.forEach=function(e,t){var r=this;return t=ti(t),new t(function(i,o){var s;s=r.subscribe(function(c){try{e(c)}catch(d){o(d),s&&s.unsubscribe()}},o,i)})},n.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},n.prototype[go]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:vo(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=ti(e),new e(function(r,i){var o;t.subscribe(function(s){return o=s},function(s){return i(s)},function(){return r(o)})})},n.create=function(e){return new n(e)},n}();function ti(n){if(n||(n=Promise),!n)throw new Error("no Promise impl found");return n}var xo=function(){function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n}(),qt=xo,ni=function(n){Ze(e,n);function e(t,r){var i=n.call(this)||this;return i.subject=t,i.subscriber=r,i.closed=!1,i}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 i=r.indexOf(this.subscriber);i!==-1&&r.splice(i,1)}}},e}(wt),bo=function(n){Ze(e,n);function e(t){var r=n.call(this,t)||this;return r.destination=t,r}return e}(Ht),ft=function(n){Ze(e,n);function e(){var t=n.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype[zn]=function(){return new bo(this)},e.prototype.lift=function(t){var r=new ri(this,this);return r.operator=t,r},e.prototype.next=function(t){if(this.closed)throw new qt;if(!this.isStopped)for(var r=this.observers,i=r.length,o=r.slice(),s=0;s<i;s++)o[s].next(t)},e.prototype.error=function(t){if(this.closed)throw new qt;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var r=this.observers,i=r.length,o=r.slice(),s=0;s<i;s++)o[s].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new qt;this.isStopped=!0;for(var t=this.observers,r=t.length,i=t.slice(),o=0;o<r;o++)i[o].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 qt;return n.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new qt;return this.hasError?(t.error(this.thrownError),wt.EMPTY):this.isStopped?(t.complete(),wt.EMPTY):(this.observers.push(t),new ni(this,t))},e.prototype.asObservable=function(){var t=new Et;return t.source=this,t},e.create=function(t,r){return new ri(t,r)},e}(Et),ri=function(n){Ze(e,n);function e(t,r){var i=n.call(this)||this;return i.destination=t,i.source=r,i}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):wt.EMPTY},e}(ft),So=function(n){Ze(e,n);function e(t,r){return n.call(this)||this}return e.prototype.schedule=function(t,r){return this},e}(wt),wo=function(n){Ze(e,n);function e(t,r){var i=n.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(t,r){if(r===void 0&&(r=0),this.closed)return this;this.state=t;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,r)),this.pending=!0,this.delay=r,this.id=this.id||this.requestAsyncId(o,this.id,r),this},e.prototype.requestAsyncId=function(t,r,i){return i===void 0&&(i=0),setInterval(t.flush.bind(t,this),i)},e.prototype.recycleAsyncId=function(t,r,i){if(i===void 0&&(i=0),i!==null&&this.delay===i&&this.pending===!1)return r;clearInterval(r)},e.prototype.execute=function(t,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,r){var i=!1,o=void 0;try{this.work(t)}catch(s){i=!0,o=!!s&&s||new Error(s)}if(i)return this.unsubscribe(),o},e.prototype._unsubscribe=function(){var t=this.id,r=this.scheduler,i=r.actions,o=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,o!==-1&&i.splice(o,1),t!=null&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null},e}(So),Eo=function(n){Ze(e,n);function e(t,r){var i=n.call(this,t,r)||this;return i.scheduler=t,i.work=r,i}return e.prototype.schedule=function(t,r){return r===void 0&&(r=0),r>0?n.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},e.prototype.execute=function(t,r){return r>0||this.closed?n.prototype.execute.call(this,t,r):this._execute(t,r)},e.prototype.requestAsyncId=function(t,r,i){return i===void 0&&(i=0),i!==null&&i>0||i===null&&this.delay>0?n.prototype.requestAsyncId.call(this,t,r,i):t.flush(this)},e}(wo),ii=function(){function n(e,t){t===void 0&&(t=n.now),this.SchedulerAction=e,this.now=t}return n.prototype.schedule=function(e,t,r){return t===void 0&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},n.now=function(){return Date.now()},n}(),Co=function(n){Ze(e,n);function e(t,r){r===void 0&&(r=ii.now);var i=n.call(this,t,function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return e.prototype.schedule=function(t,r,i){return r===void 0&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(t,r,i):n.prototype.schedule.call(this,t,r,i)},e.prototype.flush=function(t){var r=this.actions;if(this.active){r.push(t);return}var i;this.active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=r.shift());if(this.active=!1,i){for(;t=r.shift();)t.unsubscribe();throw i}},e}(ii),To=function(n){Ze(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e}(Co),ko=new To(Eo),Ao=ko,jo=new Et(function(n){return n.complete()});function _o(n){return n?Po(n):jo}function Po(n){return new Et(function(e){return n.schedule(function(){return e.complete()})})}function Oo(n){return n&&typeof n.schedule=="function"}var Do=function(n){return function(e){for(var t=0,r=n.length;t<r&&!e.closed;t++)e.next(n[t]);e.complete()}};function oi(n,e){return new Et(function(t){var r=new wt,i=0;return r.add(e.schedule(function(){if(i===n.length){t.complete();return}t.next(n[i++]),t.closed||r.add(this.schedule())})),r})}function zo(n,e){return e?oi(n,e):new Et(Do(n))}function $o(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=n[n.length-1];return Oo(t)?(n.pop(),oi(n,t)):zo(n)}function Io(n,e){return e?new Et(function(t){return e.schedule(Mo,0,{error:n,subscriber:t})}):new Et(function(t){return t.error(n)})}function Mo(n){var e=n.error,t=n.subscriber;t.error(e)}var ar=function(){function n(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue=e==="N"}return n.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},n.prototype.do=function(e,t,r){var i=this.kind;switch(i){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return r&&r()}},n.prototype.accept=function(e,t,r){return e&&typeof e.next=="function"?this.observe(e):this.do(e,t,r)},n.prototype.toObservable=function(){var e=this.kind;switch(e){case"N":return $o(this.value);case"E":return Io(this.error);case"C":return _o()}throw new Error("unexpected notification kind value")},n.createNext=function(e){return typeof e<"u"?new n("N",e):n.undefinedValueNotification},n.createError=function(e){return new n("E",void 0,e)},n.createComplete=function(){return n.completeNotification},n.completeNotification=new n("C"),n.undefinedValueNotification=new n("N",void 0),n}(),Ho=function(n){Ze(e,n);function e(t,r,i){i===void 0&&(i=0);var o=n.call(this,t)||this;return o.scheduler=r,o.delay=i,o}return e.dispatch=function(t){var r=t.notification,i=t.destination;r.observe(i),this.unsubscribe()},e.prototype.scheduleMessage=function(t){var r=this.destination;r.add(this.scheduler.schedule(e.dispatch,this.delay,new Ro(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(ar.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(ar.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(ar.createComplete()),this.unsubscribe()},e}(Ht),Ro=function(){function n(e,t){this.notification=e,this.destination=t}return n}(),si=function(n){Ze(e,n);function e(t,r,i){t===void 0&&(t=Number.POSITIVE_INFINITY),r===void 0&&(r=Number.POSITIVE_INFINITY);var o=n.call(this)||this;return o.scheduler=i,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return e.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var r=this._events;r.push(t),r.length>this._bufferSize&&r.shift()}n.prototype.next.call(this,t)},e.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new No(this._getNow(),t)),this._trimBufferThenGetEvents()),n.prototype.next.call(this,t)},e.prototype._subscribe=function(t){var r=this._infiniteTimeWindow,i=r?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,s=i.length,c;if(this.closed)throw new qt;if(this.isStopped||this.hasError?c=wt.EMPTY:(this.observers.push(t),c=new ni(this,t)),o&&t.add(t=new Ho(t,o)),r)for(var d=0;d<s&&!t.closed;d++)t.next(i[d]);else for(var d=0;d<s&&!t.closed;d++)t.next(i[d].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),c},e.prototype._getNow=function(){return(this.scheduler||Ao).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),r=this._bufferSize,i=this._windowTime,o=this._events,s=o.length,c=0;c<s&&!(t-o[c].time<i);)c++;return s>r&&(c=Math.max(c,s-r)),c>0&&o.splice(0,c),o},e}(ft),No=function(){function n(e,t){this.time=e,this.value=t}return n}();class Fo{constructor(){q(this,Yt,void 0);G(this,Yt,new ft)}saveSelectedBinToLocalStorage(){a(this,Yt).next(!0)}deleteBinFromLocalStorage(){a(this,Yt).next(!1)}getKeyboardEvent(){return a(this,Yt).asObservable()}}Yt=new WeakMap;const $n=new Fo;class Bo{constructor(){q(this,en,void 0);G(this,en,new ft)}showBinProjection(e){a(this,en).next(e)}getServiceEvent(){return a(this,en).asObservable()}}en=new WeakMap;const ai=new Bo;class Yo{constructor(){q(this,Lt,void 0);G(this,Lt,new ft)}sendDataOfTheSelectedBin(e){a(this,Lt).next(e)}emmitCommand(e){a(this,Lt).next({command:e})}getBinDistributor(){return a(this,Lt).asObservable()}}Lt=new WeakMap;const gn=new Yo,Ct=x.createContext();ve.registerComponent("interaction",{init:function(){const n=this.el;n.addEventListener("click",e=>{n.setAttribute("material","color","orange")}),n.addEventListener("mouseenter",e=>{n.object3D.position.z+=.002}),n.addEventListener("mouseleave",e=>{n.object3D.position.z-=.002})}});class lr{constructor(){q(this,yt,void 0);G(this,yt,new ft)}changeHistogramSectionByOffset(e,t,r,i){a(this,yt).next({name:t,axis:e,increment:r,defaultRange:i})}changeHistogramFunction(e,t){a(this,yt).next({name:t,fFunction:e})}changeHistogramScale(e,t){a(this,yt).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){a(this,yt).next({name:t,minValue:e})}getChangedSection(){return a(this,yt).asObservable()}}yt=new WeakMap;const at=new lr,ze=new lr,Me=new lr;var cr={exports:{}},Te={};/**
43
43
  * @license React
44
44
  * react-is.development.js
45
45
  *
@@ -47,7 +47,7 @@ Check the top-level render call using <`+x+">.")}return p}}function Cr(l,p){{if(
47
47
  *
48
48
  * This source code is licensed under the MIT license found in the
49
49
  * LICENSE file in the root directory of this source tree.
50
- */var qn;function uo(){return qn||(qn=1,process.env.NODE_ENV!=="production"&&function(){var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A=!1,S=!1,y=!1,_=!1,C=!1,$;$=Symbol.for("react.module.reference");function D(M){return!!(typeof M=="string"||typeof M=="function"||M===t||M===i||C||M===n||M===h||M===u||_||M===P||A||S||y||typeof M=="object"&&M!==null&&(M.$$typeof===E||M.$$typeof===g||M.$$typeof===o||M.$$typeof===a||M.$$typeof===d||M.$$typeof===$||M.getModuleId!==void 0))}function b(M){if(typeof M=="object"&&M!==null){var ie=M.$$typeof;switch(ie){case r:var we=M.type;switch(we){case t:case i:case n:case h:case u:return we;default:var pe=we&&we.$$typeof;switch(pe){case c:case a:case d:case E:case g:case o:return pe;default:return ie}}case e:return ie}}}var G=a,O=o,I=r,X=d,T=t,ee=E,F=g,N=e,L=i,K=n,q=h,ye=u,me=!1,Se=!1;function Ae(M){return me||(me=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ie(M){return Se||(Se=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function R(M){return b(M)===a}function H(M){return b(M)===o}function Y(M){return typeof M=="object"&&M!==null&&M.$$typeof===r}function w(M){return b(M)===d}function m(M){return b(M)===t}function re(M){return b(M)===E}function k(M){return b(M)===g}function fe(M){return b(M)===e}function ne(M){return b(M)===i}function ae(M){return b(M)===n}function j(M){return b(M)===h}function le(M){return b(M)===u}Ee.ContextConsumer=G,Ee.ContextProvider=O,Ee.Element=I,Ee.ForwardRef=X,Ee.Fragment=T,Ee.Lazy=ee,Ee.Memo=F,Ee.Portal=N,Ee.Profiler=L,Ee.StrictMode=K,Ee.Suspense=q,Ee.SuspenseList=ye,Ee.isAsyncMode=Ae,Ee.isConcurrentMode=Ie,Ee.isContextConsumer=R,Ee.isContextProvider=H,Ee.isElement=Y,Ee.isForwardRef=w,Ee.isFragment=m,Ee.isLazy=re,Ee.isMemo=k,Ee.isPortal=fe,Ee.isProfiler=ne,Ee.isStrictMode=ae,Ee.isSuspense=j,Ee.isSuspenseList=le,Ee.isValidElementType=D,Ee.typeOf=b}()),Ee}var Te={};/**
50
+ */var li;function Lo(){return li||(li=1,process.env.NODE_ENV!=="production"&&function(){var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),j=!1,b=!1,m=!1,k=!1,w=!1,z;z=Symbol.for("react.module.reference");function O(H){return!!(typeof H=="string"||typeof H=="function"||H===t||H===i||w||H===r||H===f||H===u||k||H===C||j||b||m||typeof H=="object"&&H!==null&&(H.$$typeof===S||H.$$typeof===p||H.$$typeof===o||H.$$typeof===s||H.$$typeof===d||H.$$typeof===z||H.getModuleId!==void 0))}function v(H){if(typeof H=="object"&&H!==null){var ie=H.$$typeof;switch(ie){case n:var Ee=H.type;switch(Ee){case t:case i:case r:case f:case u:return Ee;default:var pe=Ee&&Ee.$$typeof;switch(pe){case c:case s:case d:case S:case p:case o:return pe;default:return ie}}case e:return ie}}}var U=s,P=o,I=n,Y=d,A=t,V=S,L=p,B=e,W=i,K=r,J=f,ye=u,me=!1,we=!1;function _e(H){return me||(me=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Re(H){return we||(we=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function R(H){return v(H)===s}function M(H){return v(H)===o}function F(H){return typeof H=="object"&&H!==null&&H.$$typeof===n}function T(H){return v(H)===d}function y(H){return v(H)===t}function ne(H){return v(H)===S}function _(H){return v(H)===p}function he(H){return v(H)===e}function re(H){return v(H)===i}function le(H){return v(H)===r}function D(H){return v(H)===f}function ce(H){return v(H)===u}Te.ContextConsumer=U,Te.ContextProvider=P,Te.Element=I,Te.ForwardRef=Y,Te.Fragment=A,Te.Lazy=V,Te.Memo=L,Te.Portal=B,Te.Profiler=W,Te.StrictMode=K,Te.Suspense=J,Te.SuspenseList=ye,Te.isAsyncMode=_e,Te.isConcurrentMode=Re,Te.isContextConsumer=R,Te.isContextProvider=M,Te.isElement=F,Te.isForwardRef=T,Te.isFragment=y,Te.isLazy=ne,Te.isMemo=_,Te.isPortal=he,Te.isProfiler=re,Te.isStrictMode=le,Te.isSuspense=D,Te.isSuspenseList=ce,Te.isValidElementType=O,Te.typeOf=v}()),Te}var ke={};/**
51
51
  * @license React
52
52
  * react-is.production.min.js
53
53
  *
@@ -55,21 +55,21 @@ Check the top-level render call using <`+x+">.")}return p}}function Cr(l,p){{if(
55
55
  *
56
56
  * This source code is licensed under the MIT license found in the
57
57
  * LICENSE file in the root directory of this source tree.
58
- */var Jn;function fo(){if(Jn)return Te;Jn=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A;A=Symbol.for("react.module.reference");function S(y){if(typeof y=="object"&&y!==null){var _=y.$$typeof;switch(_){case r:switch(y=y.type,y){case t:case i:case n:case h:case u:return y;default:switch(y=y&&y.$$typeof,y){case c:case a:case d:case E:case g:case o:return y;default:return _}}case e:return _}}}return Te.ContextConsumer=a,Te.ContextProvider=o,Te.Element=r,Te.ForwardRef=d,Te.Fragment=t,Te.Lazy=E,Te.Memo=g,Te.Portal=e,Te.Profiler=i,Te.StrictMode=n,Te.Suspense=h,Te.SuspenseList=u,Te.isAsyncMode=function(){return!1},Te.isConcurrentMode=function(){return!1},Te.isContextConsumer=function(y){return S(y)===a},Te.isContextProvider=function(y){return S(y)===o},Te.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===r},Te.isForwardRef=function(y){return S(y)===d},Te.isFragment=function(y){return S(y)===t},Te.isLazy=function(y){return S(y)===E},Te.isMemo=function(y){return S(y)===g},Te.isPortal=function(y){return S(y)===e},Te.isProfiler=function(y){return S(y)===i},Te.isStrictMode=function(y){return S(y)===n},Te.isSuspense=function(y){return S(y)===h},Te.isSuspenseList=function(y){return S(y)===u},Te.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===t||y===i||y===n||y===h||y===u||y===P||typeof y=="object"&&y!==null&&(y.$$typeof===E||y.$$typeof===g||y.$$typeof===o||y.$$typeof===a||y.$$typeof===d||y.$$typeof===A||y.getModuleId!==void 0)},Te.typeOf=S,Te}process.env.NODE_ENV==="production"?nn.exports=fo():nn.exports=uo();var on=nn.exports;function ho(r){function e(R,H,Y,w,m){for(var re=0,k=0,fe=0,ne=0,ae,j,le=0,M=0,ie,we=ie=ae=0,pe=0,Me=0,Fe=0,Be=0,_t=Y.length,Ge=_t-1,Le,se="",De="",mt="",Ve="",Je;pe<_t;){if(j=Y.charCodeAt(pe),pe===Ge&&k+ne+fe+re!==0&&(k!==0&&(j=k===47?10:47),ne=fe=re=0,_t++,Ge++),k+ne+fe+re===0){if(pe===Ge&&(0<Me&&(se=se.replace(E,"")),0<se.trim().length)){switch(j){case 32:case 9:case 59:case 13:case 10:break;default:se+=Y.charAt(pe)}j=59}switch(j){case 123:for(se=se.trim(),ae=se.charCodeAt(0),ie=1,Be=++pe;pe<_t;){switch(j=Y.charCodeAt(pe)){case 123:ie++;break;case 125:ie--;break;case 47:switch(j=Y.charCodeAt(pe+1)){case 42:case 47:e:{for(we=pe+1;we<Ge;++we)switch(Y.charCodeAt(we)){case 47:if(j===42&&Y.charCodeAt(we-1)===42&&pe+2!==we){pe=we+1;break e}break;case 10:if(j===47){pe=we+1;break e}}pe=we}}break;case 91:j++;case 40:j++;case 34:case 39:for(;pe++<Ge&&Y.charCodeAt(pe)!==j;);}if(ie===0)break;pe++}switch(ie=Y.substring(Be,pe),ae===0&&(ae=(se=se.replace(g,"").trim()).charCodeAt(0)),ae){case 64:switch(0<Me&&(se=se.replace(E,"")),j=se.charCodeAt(1),j){case 100:case 109:case 115:case 45:Me=H;break;default:Me=q}if(ie=e(H,Me,ie,j,m+1),Be=ie.length,0<me&&(Me=t(q,se,Fe),Je=c(3,ie,Me,H,N,F,Be,j,m,w),se=Me.join(""),Je!==void 0&&(Be=(ie=Je.trim()).length)===0&&(j=0,ie="")),0<Be)switch(j){case 115:se=se.replace(G,a);case 100:case 109:case 45:ie=se+"{"+ie+"}";break;case 107:se=se.replace(C,"$1 $2"),ie=se+"{"+ie+"}",ie=K===1||K===2&&o("@"+ie,3)?"@-webkit-"+ie+"@"+ie:"@"+ie;break;default:ie=se+ie,w===112&&(ie=(De+=ie,""))}else ie="";break;default:ie=e(H,t(H,se,Fe),ie,w,m+1)}mt+=ie,ie=Fe=Me=we=ae=0,se="",j=Y.charCodeAt(++pe);break;case 125:case 59:if(se=(0<Me?se.replace(E,""):se).trim(),1<(Be=se.length))switch(we===0&&(ae=se.charCodeAt(0),ae===45||96<ae&&123>ae)&&(Be=(se=se.replace(" ",":")).length),0<me&&(Je=c(1,se,H,R,N,F,De.length,w,m,w))!==void 0&&(Be=(se=Je.trim()).length)===0&&(se="\0\0"),ae=se.charCodeAt(0),j=se.charCodeAt(1),ae){case 0:break;case 64:if(j===105||j===99){Ve+=se+Y.charAt(pe);break}default:se.charCodeAt(Be-1)!==58&&(De+=i(se,ae,j,se.charCodeAt(2)))}Fe=Me=we=ae=0,se="",j=Y.charCodeAt(++pe)}}switch(j){case 13:case 10:k===47?k=0:1+ae===0&&w!==107&&0<se.length&&(Me=1,se+="\0"),0<me*Ae&&c(0,se,H,R,N,F,De.length,w,m,w),F=1,N++;break;case 59:case 125:if(k+ne+fe+re===0){F++;break}default:switch(F++,Le=Y.charAt(pe),j){case 9:case 32:if(ne+re+k===0)switch(le){case 44:case 58:case 9:case 32:Le="";break;default:j!==32&&(Le=" ")}break;case 0:Le="\\0";break;case 12:Le="\\f";break;case 11:Le="\\v";break;case 38:ne+k+re===0&&(Me=Fe=1,Le="\f"+Le);break;case 108:if(ne+k+re+L===0&&0<we)switch(pe-we){case 2:le===112&&Y.charCodeAt(pe-3)===58&&(L=le);case 8:M===111&&(L=M)}break;case 58:ne+k+re===0&&(we=pe);break;case 44:k+fe+ne+re===0&&(Me=1,Le+="\r");break;case 34:case 39:k===0&&(ne=ne===j?0:ne===0?j:ne);break;case 91:ne+k+fe===0&&re++;break;case 93:ne+k+fe===0&&re--;break;case 41:ne+k+re===0&&fe--;break;case 40:if(ne+k+re===0){if(ae===0)switch(2*le+3*M){case 533:break;default:ae=1}fe++}break;case 64:k+fe+ne+re+we+ie===0&&(ie=1);break;case 42:case 47:if(!(0<ne+re+fe))switch(k){case 0:switch(2*j+3*Y.charCodeAt(pe+1)){case 235:k=47;break;case 220:Be=pe,k=42}break;case 42:j===47&&le===42&&Be+2!==pe&&(Y.charCodeAt(Be+2)===33&&(De+=Y.substring(Be,pe+1)),Le="",k=0)}}k===0&&(se+=Le)}M=le,le=j,pe++}if(Be=De.length,0<Be){if(Me=H,0<me&&(Je=c(2,De,Me,R,N,F,Be,w,m,w),Je!==void 0&&(De=Je).length===0))return Ve+De+mt;if(De=Me.join(",")+"{"+De+"}",K*L!==0){switch(K!==2||o(De,2)||(L=0),L){case 111:De=De.replace(D,":-moz-$1")+De;break;case 112:De=De.replace($,"::-webkit-input-$1")+De.replace($,"::-moz-$1")+De.replace($,":-ms-input-$1")+De}L=0}}return Ve+De+mt}function t(R,H,Y){var w=H.trim().split(y);H=w;var m=w.length,re=R.length;switch(re){case 0:case 1:var k=0;for(R=re===0?"":R[0]+" ";k<m;++k)H[k]=n(R,H[k],Y).trim();break;default:var fe=k=0;for(H=[];k<m;++k)for(var ne=0;ne<re;++ne)H[fe++]=n(R[ne]+" ",w[k],Y).trim()}return H}function n(R,H,Y){var w=H.charCodeAt(0);switch(33>w&&(w=(H=H.trim()).charCodeAt(0)),w){case 38:return H.replace(_,"$1"+R.trim());case 58:return R.trim()+H.replace(_,"$1"+R.trim());default:if(0<1*Y&&0<H.indexOf("\f"))return H.replace(_,(R.charCodeAt(0)===58?"":"$1")+R.trim())}return R+H}function i(R,H,Y,w){var m=R+";",re=2*H+3*Y+4*w;if(re===944){R=m.indexOf(":",9)+1;var k=m.substring(R,m.length-1).trim();return k=m.substring(0,R).trim()+k+";",K===1||K===2&&o(k,1)?"-webkit-"+k+k:k}if(K===0||K===2&&!o(m,1))return m;switch(re){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(ee,"$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 k=m.substring(m.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+k+"-webkit-"+m+"-ms-flex-pack"+k+m;case 1005:return A.test(m)?m.replace(P,":-webkit-")+m.replace(P,":-moz-")+m:m;case 1e3:switch(k=m.substring(13).trim(),H=k.indexOf("-")+1,k.charCodeAt(0)+k.charCodeAt(H)){case 226:k=m.replace(b,"tb");break;case 232:k=m.replace(b,"tb-rl");break;case 220:k=m.replace(b,"lr");break;default:return m}return"-webkit-"+m+"-ms-"+k+m;case 1017:if(m.indexOf("sticky",9)===-1)break;case 975:switch(H=(m=R).length-10,k=(m.charCodeAt(H)===33?m.substring(0,H):m).substring(R.indexOf(":",7)+1).trim(),re=k.charCodeAt(0)+(k.charCodeAt(7)|0)){case 203:if(111>k.charCodeAt(8))break;case 115:m=m.replace(k,"-webkit-"+k)+";"+m;break;case 207:case 102:m=m.replace(k,"-webkit-"+(102<re?"inline-":"")+"box")+";"+m.replace(k,"-webkit-"+k)+";"+m.replace(k,"-ms-"+k+"box")+";"+m}return m+";";case 938:if(m.charCodeAt(5)===45)switch(m.charCodeAt(6)){case 105:return k=m.replace("-items",""),"-webkit-"+m+"-webkit-box-"+k+"-ms-flex-"+k+m;case 115:return"-webkit-"+m+"-ms-flex-item-"+m.replace(I,"")+m;default:return"-webkit-"+m+"-ms-flex-line-pack"+m.replace("align-content","").replace(I,"")+m}break;case 973:case 989:if(m.charCodeAt(3)!==45||m.charCodeAt(4)===122)break;case 931:case 953:if(T.test(R)===!0)return(k=R.substring(R.indexOf(":")+1)).charCodeAt(0)===115?i(R.replace("stretch","fill-available"),H,Y,w).replace(":fill-available",":stretch"):m.replace(k,"-webkit-"+k)+m.replace(k,"-moz-"+k.replace("fill-",""))+m;break;case 962:if(m="-webkit-"+m+(m.charCodeAt(5)===102?"-ms-"+m:"")+m,Y+w===211&&m.charCodeAt(13)===105&&0<m.indexOf("transform",10))return m.substring(0,m.indexOf(";",27)+1).replace(S,"$1-webkit-$2")+m}return m}function o(R,H){var Y=R.indexOf(H===1?":":"{"),w=R.substring(0,H!==3?Y:10);return Y=R.substring(Y+1,R.length-1),Se(H!==2?w:w.replace(X,"$1"),Y,H)}function a(R,H){var Y=i(H,H.charCodeAt(0),H.charCodeAt(1),H.charCodeAt(2));return Y!==H+";"?Y.replace(O," or ($1)").substring(4):"("+H+")"}function c(R,H,Y,w,m,re,k,fe,ne,ae){for(var j=0,le=H,M;j<me;++j)switch(M=ye[j].call(u,R,le,Y,w,m,re,k,fe,ne,ae)){case void 0:case!1:case!0:case null:break;default:le=M}if(le!==H)return le}function d(R){switch(R){case void 0:case null:me=ye.length=0;break;default:if(typeof R=="function")ye[me++]=R;else if(typeof R=="object")for(var H=0,Y=R.length;H<Y;++H)d(R[H]);else Ae=!!R|0}return d}function h(R){return R=R.prefix,R!==void 0&&(Se=null,R?typeof R!="function"?K=1:(K=2,Se=R):K=0),h}function u(R,H){var Y=R;if(33>Y.charCodeAt(0)&&(Y=Y.trim()),Ie=Y,Y=[Ie],0<me){var w=c(-1,H,Y,Y,N,F,0,0,0,0);w!==void 0&&typeof w=="string"&&(H=w)}var m=e(q,Y,H,0,0);return 0<me&&(w=c(-2,m,Y,Y,N,F,m.length,0,0,0),w!==void 0&&(m=w)),Ie="",L=0,F=N=1,m}var g=/^\0+/g,E=/[\0\r\f]/g,P=/: */g,A=/zoo|gra/,S=/([,: ])(transform)/g,y=/,\r+?/g,_=/([\t\r\n ])*\f?&/g,C=/@(k\w+)\s*(\S*)\s*/,$=/::(place)/g,D=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,G=/\(\s*(.*)\s*\)/g,O=/([\s\S]*?);/g,I=/-self|flex-/g,X=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,ee=/([^-])(image-set\()/,F=1,N=1,L=0,K=1,q=[],ye=[],me=0,Se=null,Ae=0,Ie="";return u.use=d,u.set=h,r!==void 0&&h(r),u}var po={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 mo(r){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=r(t)),e[t]}}var go=/^((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)-.*))$/,Qn=mo(function(r){return go.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91}),sn={exports:{}},ke={};/** @license React v16.13.1
58
+ */var ci;function Vo(){if(ci)return ke;ci=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),j;j=Symbol.for("react.module.reference");function b(m){if(typeof m=="object"&&m!==null){var k=m.$$typeof;switch(k){case n:switch(m=m.type,m){case t:case i:case r:case f:case u:return m;default:switch(m=m&&m.$$typeof,m){case c:case s:case d:case S:case p:case o:return m;default:return k}}case e:return k}}}return ke.ContextConsumer=s,ke.ContextProvider=o,ke.Element=n,ke.ForwardRef=d,ke.Fragment=t,ke.Lazy=S,ke.Memo=p,ke.Portal=e,ke.Profiler=i,ke.StrictMode=r,ke.Suspense=f,ke.SuspenseList=u,ke.isAsyncMode=function(){return!1},ke.isConcurrentMode=function(){return!1},ke.isContextConsumer=function(m){return b(m)===s},ke.isContextProvider=function(m){return b(m)===o},ke.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===n},ke.isForwardRef=function(m){return b(m)===d},ke.isFragment=function(m){return b(m)===t},ke.isLazy=function(m){return b(m)===S},ke.isMemo=function(m){return b(m)===p},ke.isPortal=function(m){return b(m)===e},ke.isProfiler=function(m){return b(m)===i},ke.isStrictMode=function(m){return b(m)===r},ke.isSuspense=function(m){return b(m)===f},ke.isSuspenseList=function(m){return b(m)===u},ke.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===t||m===i||m===r||m===f||m===u||m===C||typeof m=="object"&&m!==null&&(m.$$typeof===S||m.$$typeof===p||m.$$typeof===o||m.$$typeof===s||m.$$typeof===d||m.$$typeof===j||m.getModuleId!==void 0)},ke.typeOf=b,ke}process.env.NODE_ENV==="production"?cr.exports=Vo():cr.exports=Lo();var ur=cr.exports;function Wo(n){function e(R,M,F,T,y){for(var ne=0,_=0,he=0,re=0,le,D,ce=0,H=0,ie,Ee=ie=le=0,pe=0,He=0,Le=0,Ne=0,$t=F.length,Ke=$t-1,Ve,se="",De="",St="",We="",nt;pe<$t;){if(D=F.charCodeAt(pe),pe===Ke&&_+re+he+ne!==0&&(_!==0&&(D=_===47?10:47),re=he=ne=0,$t++,Ke++),_+re+he+ne===0){if(pe===Ke&&(0<He&&(se=se.replace(S,"")),0<se.trim().length)){switch(D){case 32:case 9:case 59:case 13:case 10:break;default:se+=F.charAt(pe)}D=59}switch(D){case 123:for(se=se.trim(),le=se.charCodeAt(0),ie=1,Ne=++pe;pe<$t;){switch(D=F.charCodeAt(pe)){case 123:ie++;break;case 125:ie--;break;case 47:switch(D=F.charCodeAt(pe+1)){case 42:case 47:e:{for(Ee=pe+1;Ee<Ke;++Ee)switch(F.charCodeAt(Ee)){case 47:if(D===42&&F.charCodeAt(Ee-1)===42&&pe+2!==Ee){pe=Ee+1;break e}break;case 10:if(D===47){pe=Ee+1;break e}}pe=Ee}}break;case 91:D++;case 40:D++;case 34:case 39:for(;pe++<Ke&&F.charCodeAt(pe)!==D;);}if(ie===0)break;pe++}switch(ie=F.substring(Ne,pe),le===0&&(le=(se=se.replace(p,"").trim()).charCodeAt(0)),le){case 64:switch(0<He&&(se=se.replace(S,"")),D=se.charCodeAt(1),D){case 100:case 109:case 115:case 45:He=M;break;default:He=J}if(ie=e(M,He,ie,D,y+1),Ne=ie.length,0<me&&(He=t(J,se,Le),nt=c(3,ie,He,M,B,L,Ne,D,y,T),se=He.join(""),nt!==void 0&&(Ne=(ie=nt.trim()).length)===0&&(D=0,ie="")),0<Ne)switch(D){case 115:se=se.replace(U,s);case 100:case 109:case 45:ie=se+"{"+ie+"}";break;case 107:se=se.replace(w,"$1 $2"),ie=se+"{"+ie+"}",ie=K===1||K===2&&o("@"+ie,3)?"@-webkit-"+ie+"@"+ie:"@"+ie;break;default:ie=se+ie,T===112&&(ie=(De+=ie,""))}else ie="";break;default:ie=e(M,t(M,se,Le),ie,T,y+1)}St+=ie,ie=Le=He=Ee=le=0,se="",D=F.charCodeAt(++pe);break;case 125:case 59:if(se=(0<He?se.replace(S,""):se).trim(),1<(Ne=se.length))switch(Ee===0&&(le=se.charCodeAt(0),le===45||96<le&&123>le)&&(Ne=(se=se.replace(" ",":")).length),0<me&&(nt=c(1,se,M,R,B,L,De.length,T,y,T))!==void 0&&(Ne=(se=nt.trim()).length)===0&&(se="\0\0"),le=se.charCodeAt(0),D=se.charCodeAt(1),le){case 0:break;case 64:if(D===105||D===99){We+=se+F.charAt(pe);break}default:se.charCodeAt(Ne-1)!==58&&(De+=i(se,le,D,se.charCodeAt(2)))}Le=He=Ee=le=0,se="",D=F.charCodeAt(++pe)}}switch(D){case 13:case 10:_===47?_=0:1+le===0&&T!==107&&0<se.length&&(He=1,se+="\0"),0<me*_e&&c(0,se,M,R,B,L,De.length,T,y,T),L=1,B++;break;case 59:case 125:if(_+re+he+ne===0){L++;break}default:switch(L++,Ve=F.charAt(pe),D){case 9:case 32:if(re+ne+_===0)switch(ce){case 44:case 58:case 9:case 32:Ve="";break;default:D!==32&&(Ve=" ")}break;case 0:Ve="\\0";break;case 12:Ve="\\f";break;case 11:Ve="\\v";break;case 38:re+_+ne===0&&(He=Le=1,Ve="\f"+Ve);break;case 108:if(re+_+ne+W===0&&0<Ee)switch(pe-Ee){case 2:ce===112&&F.charCodeAt(pe-3)===58&&(W=ce);case 8:H===111&&(W=H)}break;case 58:re+_+ne===0&&(Ee=pe);break;case 44:_+he+re+ne===0&&(He=1,Ve+="\r");break;case 34:case 39:_===0&&(re=re===D?0:re===0?D:re);break;case 91:re+_+he===0&&ne++;break;case 93:re+_+he===0&&ne--;break;case 41:re+_+ne===0&&he--;break;case 40:if(re+_+ne===0){if(le===0)switch(2*ce+3*H){case 533:break;default:le=1}he++}break;case 64:_+he+re+ne+Ee+ie===0&&(ie=1);break;case 42:case 47:if(!(0<re+ne+he))switch(_){case 0:switch(2*D+3*F.charCodeAt(pe+1)){case 235:_=47;break;case 220:Ne=pe,_=42}break;case 42:D===47&&ce===42&&Ne+2!==pe&&(F.charCodeAt(Ne+2)===33&&(De+=F.substring(Ne,pe+1)),Ve="",_=0)}}_===0&&(se+=Ve)}H=ce,ce=D,pe++}if(Ne=De.length,0<Ne){if(He=M,0<me&&(nt=c(2,De,He,R,B,L,Ne,T,y,T),nt!==void 0&&(De=nt).length===0))return We+De+St;if(De=He.join(",")+"{"+De+"}",K*W!==0){switch(K!==2||o(De,2)||(W=0),W){case 111:De=De.replace(O,":-moz-$1")+De;break;case 112:De=De.replace(z,"::-webkit-input-$1")+De.replace(z,"::-moz-$1")+De.replace(z,":-ms-input-$1")+De}W=0}}return We+De+St}function t(R,M,F){var T=M.trim().split(m);M=T;var y=T.length,ne=R.length;switch(ne){case 0:case 1:var _=0;for(R=ne===0?"":R[0]+" ";_<y;++_)M[_]=r(R,M[_],F).trim();break;default:var he=_=0;for(M=[];_<y;++_)for(var re=0;re<ne;++re)M[he++]=r(R[re]+" ",T[_],F).trim()}return M}function r(R,M,F){var T=M.charCodeAt(0);switch(33>T&&(T=(M=M.trim()).charCodeAt(0)),T){case 38:return M.replace(k,"$1"+R.trim());case 58:return R.trim()+M.replace(k,"$1"+R.trim());default:if(0<1*F&&0<M.indexOf("\f"))return M.replace(k,(R.charCodeAt(0)===58?"":"$1")+R.trim())}return R+M}function i(R,M,F,T){var y=R+";",ne=2*M+3*F+4*T;if(ne===944){R=y.indexOf(":",9)+1;var _=y.substring(R,y.length-1).trim();return _=y.substring(0,R).trim()+_+";",K===1||K===2&&o(_,1)?"-webkit-"+_+_:_}if(K===0||K===2&&!o(y,1))return y;switch(ne){case 1015:return y.charCodeAt(10)===97?"-webkit-"+y+y:y;case 951:return y.charCodeAt(3)===116?"-webkit-"+y+y:y;case 963:return y.charCodeAt(5)===110?"-webkit-"+y+y:y;case 1009:if(y.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+y+y;case 978:return"-webkit-"+y+"-moz-"+y+y;case 1019:case 983:return"-webkit-"+y+"-moz-"+y+"-ms-"+y+y;case 883:if(y.charCodeAt(8)===45)return"-webkit-"+y+y;if(0<y.indexOf("image-set(",11))return y.replace(V,"$1-webkit-$2")+y;break;case 932:if(y.charCodeAt(4)===45)switch(y.charCodeAt(5)){case 103:return"-webkit-box-"+y.replace("-grow","")+"-webkit-"+y+"-ms-"+y.replace("grow","positive")+y;case 115:return"-webkit-"+y+"-ms-"+y.replace("shrink","negative")+y;case 98:return"-webkit-"+y+"-ms-"+y.replace("basis","preferred-size")+y}return"-webkit-"+y+"-ms-"+y+y;case 964:return"-webkit-"+y+"-ms-flex-"+y+y;case 1023:if(y.charCodeAt(8)!==99)break;return _=y.substring(y.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+_+"-webkit-"+y+"-ms-flex-pack"+_+y;case 1005:return j.test(y)?y.replace(C,":-webkit-")+y.replace(C,":-moz-")+y:y;case 1e3:switch(_=y.substring(13).trim(),M=_.indexOf("-")+1,_.charCodeAt(0)+_.charCodeAt(M)){case 226:_=y.replace(v,"tb");break;case 232:_=y.replace(v,"tb-rl");break;case 220:_=y.replace(v,"lr");break;default:return y}return"-webkit-"+y+"-ms-"+_+y;case 1017:if(y.indexOf("sticky",9)===-1)break;case 975:switch(M=(y=R).length-10,_=(y.charCodeAt(M)===33?y.substring(0,M):y).substring(R.indexOf(":",7)+1).trim(),ne=_.charCodeAt(0)+(_.charCodeAt(7)|0)){case 203:if(111>_.charCodeAt(8))break;case 115:y=y.replace(_,"-webkit-"+_)+";"+y;break;case 207:case 102:y=y.replace(_,"-webkit-"+(102<ne?"inline-":"")+"box")+";"+y.replace(_,"-webkit-"+_)+";"+y.replace(_,"-ms-"+_+"box")+";"+y}return y+";";case 938:if(y.charCodeAt(5)===45)switch(y.charCodeAt(6)){case 105:return _=y.replace("-items",""),"-webkit-"+y+"-webkit-box-"+_+"-ms-flex-"+_+y;case 115:return"-webkit-"+y+"-ms-flex-item-"+y.replace(I,"")+y;default:return"-webkit-"+y+"-ms-flex-line-pack"+y.replace("align-content","").replace(I,"")+y}break;case 973:case 989:if(y.charCodeAt(3)!==45||y.charCodeAt(4)===122)break;case 931:case 953:if(A.test(R)===!0)return(_=R.substring(R.indexOf(":")+1)).charCodeAt(0)===115?i(R.replace("stretch","fill-available"),M,F,T).replace(":fill-available",":stretch"):y.replace(_,"-webkit-"+_)+y.replace(_,"-moz-"+_.replace("fill-",""))+y;break;case 962:if(y="-webkit-"+y+(y.charCodeAt(5)===102?"-ms-"+y:"")+y,F+T===211&&y.charCodeAt(13)===105&&0<y.indexOf("transform",10))return y.substring(0,y.indexOf(";",27)+1).replace(b,"$1-webkit-$2")+y}return y}function o(R,M){var F=R.indexOf(M===1?":":"{"),T=R.substring(0,M!==3?F:10);return F=R.substring(F+1,R.length-1),we(M!==2?T:T.replace(Y,"$1"),F,M)}function s(R,M){var F=i(M,M.charCodeAt(0),M.charCodeAt(1),M.charCodeAt(2));return F!==M+";"?F.replace(P," or ($1)").substring(4):"("+M+")"}function c(R,M,F,T,y,ne,_,he,re,le){for(var D=0,ce=M,H;D<me;++D)switch(H=ye[D].call(u,R,ce,F,T,y,ne,_,he,re,le)){case void 0:case!1:case!0:case null:break;default:ce=H}if(ce!==M)return ce}function d(R){switch(R){case void 0:case null:me=ye.length=0;break;default:if(typeof R=="function")ye[me++]=R;else if(typeof R=="object")for(var M=0,F=R.length;M<F;++M)d(R[M]);else _e=!!R|0}return d}function f(R){return R=R.prefix,R!==void 0&&(we=null,R?typeof R!="function"?K=1:(K=2,we=R):K=0),f}function u(R,M){var F=R;if(33>F.charCodeAt(0)&&(F=F.trim()),Re=F,F=[Re],0<me){var T=c(-1,M,F,F,B,L,0,0,0,0);T!==void 0&&typeof T=="string"&&(M=T)}var y=e(J,F,M,0,0);return 0<me&&(T=c(-2,y,F,F,B,L,y.length,0,0,0),T!==void 0&&(y=T)),Re="",W=0,L=B=1,y}var p=/^\0+/g,S=/[\0\r\f]/g,C=/: */g,j=/zoo|gra/,b=/([,: ])(transform)/g,m=/,\r+?/g,k=/([\t\r\n ])*\f?&/g,w=/@(k\w+)\s*(\S*)\s*/,z=/::(place)/g,O=/:(read-only)/g,v=/[svh]\w+-[tblr]{2}/,U=/\(\s*(.*)\s*\)/g,P=/([\s\S]*?);/g,I=/-self|flex-/g,Y=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,V=/([^-])(image-set\()/,L=1,B=1,W=0,K=1,J=[],ye=[],me=0,we=null,_e=0,Re="";return u.use=d,u.set=f,n!==void 0&&f(n),u}var Xo={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 Uo(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var Zo=/^((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)-.*))$/,ui=Uo(function(n){return Zo.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),dr={exports:{}},Ae={};/** @license React v16.13.1
59
59
  * react-is.development.js
60
60
  *
61
61
  * Copyright (c) Facebook, Inc. and its affiliates.
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var ei;function yo(){return ei||(ei=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,u=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,E=r?Symbol.for("react.suspense_list"):60120,P=r?Symbol.for("react.memo"):60115,A=r?Symbol.for("react.lazy"):60116,S=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,C=r?Symbol.for("react.scope"):60119;function $(j){return typeof j=="string"||typeof j=="function"||j===n||j===h||j===o||j===i||j===g||j===E||typeof j=="object"&&j!==null&&(j.$$typeof===A||j.$$typeof===P||j.$$typeof===a||j.$$typeof===c||j.$$typeof===u||j.$$typeof===y||j.$$typeof===_||j.$$typeof===C||j.$$typeof===S)}function D(j){if(typeof j=="object"&&j!==null){var le=j.$$typeof;switch(le){case e:var M=j.type;switch(M){case d:case h:case n:case o:case i:case g:return M;default:var ie=M&&M.$$typeof;switch(ie){case c:case u:case A:case P:case a:return ie;default:return le}}case t:return le}}}var b=d,G=h,O=c,I=a,X=e,T=u,ee=n,F=A,N=P,L=t,K=o,q=i,ye=g,me=!1;function Se(j){return me||(me=!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(j)||D(j)===d}function Ae(j){return D(j)===h}function Ie(j){return D(j)===c}function R(j){return D(j)===a}function H(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function Y(j){return D(j)===u}function w(j){return D(j)===n}function m(j){return D(j)===A}function re(j){return D(j)===P}function k(j){return D(j)===t}function fe(j){return D(j)===o}function ne(j){return D(j)===i}function ae(j){return D(j)===g}ke.AsyncMode=b,ke.ConcurrentMode=G,ke.ContextConsumer=O,ke.ContextProvider=I,ke.Element=X,ke.ForwardRef=T,ke.Fragment=ee,ke.Lazy=F,ke.Memo=N,ke.Portal=L,ke.Profiler=K,ke.StrictMode=q,ke.Suspense=ye,ke.isAsyncMode=Se,ke.isConcurrentMode=Ae,ke.isContextConsumer=Ie,ke.isContextProvider=R,ke.isElement=H,ke.isForwardRef=Y,ke.isFragment=w,ke.isLazy=m,ke.isMemo=re,ke.isPortal=k,ke.isProfiler=fe,ke.isStrictMode=ne,ke.isSuspense=ae,ke.isValidElementType=$,ke.typeOf=D}()),ke}var _e={};/** @license React v16.13.1
65
+ */var di;function Go(){return di||(di=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,u=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,S=n?Symbol.for("react.suspense_list"):60120,C=n?Symbol.for("react.memo"):60115,j=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,k=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function z(D){return typeof D=="string"||typeof D=="function"||D===r||D===f||D===o||D===i||D===p||D===S||typeof D=="object"&&D!==null&&(D.$$typeof===j||D.$$typeof===C||D.$$typeof===s||D.$$typeof===c||D.$$typeof===u||D.$$typeof===m||D.$$typeof===k||D.$$typeof===w||D.$$typeof===b)}function O(D){if(typeof D=="object"&&D!==null){var ce=D.$$typeof;switch(ce){case e:var H=D.type;switch(H){case d:case f:case r:case o:case i:case p:return H;default:var ie=H&&H.$$typeof;switch(ie){case c:case u:case j:case C:case s:return ie;default:return ce}}case t:return ce}}}var v=d,U=f,P=c,I=s,Y=e,A=u,V=r,L=j,B=C,W=t,K=o,J=i,ye=p,me=!1;function we(D){return me||(me=!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.")),_e(D)||O(D)===d}function _e(D){return O(D)===f}function Re(D){return O(D)===c}function R(D){return O(D)===s}function M(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function F(D){return O(D)===u}function T(D){return O(D)===r}function y(D){return O(D)===j}function ne(D){return O(D)===C}function _(D){return O(D)===t}function he(D){return O(D)===o}function re(D){return O(D)===i}function le(D){return O(D)===p}Ae.AsyncMode=v,Ae.ConcurrentMode=U,Ae.ContextConsumer=P,Ae.ContextProvider=I,Ae.Element=Y,Ae.ForwardRef=A,Ae.Fragment=V,Ae.Lazy=L,Ae.Memo=B,Ae.Portal=W,Ae.Profiler=K,Ae.StrictMode=J,Ae.Suspense=ye,Ae.isAsyncMode=we,Ae.isConcurrentMode=_e,Ae.isContextConsumer=Re,Ae.isContextProvider=R,Ae.isElement=M,Ae.isForwardRef=F,Ae.isFragment=T,Ae.isLazy=y,Ae.isMemo=ne,Ae.isPortal=_,Ae.isProfiler=he,Ae.isStrictMode=re,Ae.isSuspense=le,Ae.isValidElementType=z,Ae.typeOf=O}()),Ae}var je={};/** @license React v16.13.1
66
66
  * react-is.production.min.js
67
67
  *
68
68
  * Copyright (c) Facebook, Inc. and its affiliates.
69
69
  *
70
70
  * This source code is licensed under the MIT license found in the
71
71
  * LICENSE file in the root directory of this source tree.
72
- */var ti;function bo(){if(ti)return _e;ti=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,a=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,u=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,E=r?Symbol.for("react.suspense_list"):60120,P=r?Symbol.for("react.memo"):60115,A=r?Symbol.for("react.lazy"):60116,S=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,C=r?Symbol.for("react.scope"):60119;function $(b){if(typeof b=="object"&&b!==null){var G=b.$$typeof;switch(G){case e:switch(b=b.type,b){case d:case h:case n:case o:case i:case g:return b;default:switch(b=b&&b.$$typeof,b){case c:case u:case A:case P:case a:return b;default:return G}}case t:return G}}}function D(b){return $(b)===h}return _e.AsyncMode=d,_e.ConcurrentMode=h,_e.ContextConsumer=c,_e.ContextProvider=a,_e.Element=e,_e.ForwardRef=u,_e.Fragment=n,_e.Lazy=A,_e.Memo=P,_e.Portal=t,_e.Profiler=o,_e.StrictMode=i,_e.Suspense=g,_e.isAsyncMode=function(b){return D(b)||$(b)===d},_e.isConcurrentMode=D,_e.isContextConsumer=function(b){return $(b)===c},_e.isContextProvider=function(b){return $(b)===a},_e.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},_e.isForwardRef=function(b){return $(b)===u},_e.isFragment=function(b){return $(b)===n},_e.isLazy=function(b){return $(b)===A},_e.isMemo=function(b){return $(b)===P},_e.isPortal=function(b){return $(b)===t},_e.isProfiler=function(b){return $(b)===o},_e.isStrictMode=function(b){return $(b)===i},_e.isSuspense=function(b){return $(b)===g},_e.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===h||b===o||b===i||b===g||b===E||typeof b=="object"&&b!==null&&(b.$$typeof===A||b.$$typeof===P||b.$$typeof===a||b.$$typeof===c||b.$$typeof===u||b.$$typeof===y||b.$$typeof===_||b.$$typeof===C||b.$$typeof===S)},_e.typeOf=$,_e}process.env.NODE_ENV==="production"?sn.exports=bo():sn.exports=yo();var vo=sn.exports,an=vo,xo={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},So={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},wo={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ri={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ln={};ln[an.ForwardRef]=wo,ln[an.Memo]=ri;function ni(r){return an.isMemo(r)?ri:ln[r.$$typeof]||xo}var Co=Object.defineProperty,Eo=Object.getOwnPropertyNames,ii=Object.getOwnPropertySymbols,To=Object.getOwnPropertyDescriptor,ko=Object.getPrototypeOf,oi=Object.prototype;function si(r,e,t){if(typeof e!="string"){if(oi){var n=ko(e);n&&n!==oi&&si(r,n,t)}var i=Eo(e);ii&&(i=i.concat(ii(e)));for(var o=ni(r),a=ni(e),c=0;c<i.length;++c){var d=i[c];if(!So[d]&&!(t&&t[d])&&!(a&&a[d])&&!(o&&o[d])){var h=To(e,d);try{Co(r,d,h)}catch{}}}}return r}var _o=si;const Ao=Ui(_o);function ct(){return(ct=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}).apply(this,arguments)}var ai=function(r,e){for(var t=[r[0]],n=0,i=e.length;n<i;n+=1)t.push(e[n],r[n+1]);return t},cn=function(r){return r!==null&&typeof r=="object"&&(r.toString?r.toString():Object.prototype.toString.call(r))==="[object Object]"&&!on.typeOf(r)},jr=Object.freeze([]),bt=Object.freeze({});function dr(r){return typeof r=="function"}function un(r){return process.env.NODE_ENV!=="production"&&typeof r=="string"&&r||r.displayName||r.name||"Component"}function dn(r){return r&&typeof r.styledComponentId=="string"}var Lt=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",fn=typeof window<"u"&&"HTMLElement"in window,Po=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(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: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")),Oo=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
72
+ */var hi;function qo(){if(hi)return je;hi=1;var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,u=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,S=n?Symbol.for("react.suspense_list"):60120,C=n?Symbol.for("react.memo"):60115,j=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,m=n?Symbol.for("react.fundamental"):60117,k=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function z(v){if(typeof v=="object"&&v!==null){var U=v.$$typeof;switch(U){case e:switch(v=v.type,v){case d:case f:case r:case o:case i:case p:return v;default:switch(v=v&&v.$$typeof,v){case c:case u:case j:case C:case s:return v;default:return U}}case t:return U}}}function O(v){return z(v)===f}return je.AsyncMode=d,je.ConcurrentMode=f,je.ContextConsumer=c,je.ContextProvider=s,je.Element=e,je.ForwardRef=u,je.Fragment=r,je.Lazy=j,je.Memo=C,je.Portal=t,je.Profiler=o,je.StrictMode=i,je.Suspense=p,je.isAsyncMode=function(v){return O(v)||z(v)===d},je.isConcurrentMode=O,je.isContextConsumer=function(v){return z(v)===c},je.isContextProvider=function(v){return z(v)===s},je.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},je.isForwardRef=function(v){return z(v)===u},je.isFragment=function(v){return z(v)===r},je.isLazy=function(v){return z(v)===j},je.isMemo=function(v){return z(v)===C},je.isPortal=function(v){return z(v)===t},je.isProfiler=function(v){return z(v)===o},je.isStrictMode=function(v){return z(v)===i},je.isSuspense=function(v){return z(v)===p},je.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===f||v===o||v===i||v===p||v===S||typeof v=="object"&&v!==null&&(v.$$typeof===j||v.$$typeof===C||v.$$typeof===s||v.$$typeof===c||v.$$typeof===u||v.$$typeof===m||v.$$typeof===k||v.$$typeof===w||v.$$typeof===b)},je.typeOf=z,je}process.env.NODE_ENV==="production"?dr.exports=qo():dr.exports=Go();var Ko=dr.exports,hr=Ko,Jo={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Qo={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},es={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},fi={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},fr={};fr[hr.ForwardRef]=es,fr[hr.Memo]=fi;function pi(n){return hr.isMemo(n)?fi:fr[n.$$typeof]||Jo}var ts=Object.defineProperty,ns=Object.getOwnPropertyNames,mi=Object.getOwnPropertySymbols,rs=Object.getOwnPropertyDescriptor,is=Object.getPrototypeOf,gi=Object.prototype;function yi(n,e,t){if(typeof e!="string"){if(gi){var r=is(e);r&&r!==gi&&yi(n,r,t)}var i=ns(e);mi&&(i=i.concat(mi(e)));for(var o=pi(n),s=pi(e),c=0;c<i.length;++c){var d=i[c];if(!Qo[d]&&!(t&&t[d])&&!(s&&s[d])&&!(o&&o[d])){var f=rs(e,d);try{ts(n,d,f)}catch{}}}}return n}var os=yi;const ss=ao(os);function pt(){return(pt=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n}).apply(this,arguments)}var vi=function(n,e){for(var t=[n[0]],r=0,i=e.length;r<i;r+=1)t.push(e[r],n[r+1]);return t},pr=function(n){return n!==null&&typeof n=="object"&&(n.toString?n.toString():Object.prototype.toString.call(n))==="[object Object]"&&!ur.typeOf(n)},In=Object.freeze([]),Tt=Object.freeze({});function yn(n){return typeof n=="function"}function mr(n){return process.env.NODE_ENV!=="production"&&typeof n=="string"&&n||n.displayName||n.name||"Component"}function gr(n){return n&&typeof n.styledComponentId=="string"}var Kt=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",yr=typeof window<"u"&&"HTMLElement"in window,as=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(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: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")),ls=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
73
73
 
74
74
  `,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.
75
75
 
@@ -110,12 +110,12 @@ as for instance in your render method then you may be running into this limitati
110
110
 
111
111
  `,17:`CSSStyleSheet could not be found on HTMLStyleElement.
112
112
  Has styled-components' style tag been unmounted or altered by another script?
113
- `}:{};function jo(){for(var r=arguments.length<=0?void 0:arguments[0],e=[],t=1,n=arguments.length;t<n;t+=1)e.push(t<0||arguments.length<=t?void 0:arguments[t]);return e.forEach(function(i){r=r.replace(/%[a-z]/,i)}),r}function Vt(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];throw process.env.NODE_ENV==="production"?new Error("An error occurred. See https://git.io/JUIaE#"+r+" for more information."+(t.length>0?" Args: "+t.join(", "):"")):new Error(jo.apply(void 0,[Oo[r]].concat(t)).trim())}var Do=function(){function r(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=r.prototype;return e.indexOfGroup=function(t){for(var n=0,i=0;i<t;i++)n+=this.groupSizes[i];return n},e.insertRules=function(t,n){if(t>=this.groupSizes.length){for(var i=this.groupSizes,o=i.length,a=o;t>=a;)(a<<=1)<0&&Vt(16,""+t);this.groupSizes=new Uint32Array(a),this.groupSizes.set(i),this.length=a;for(var c=o;c<a;c++)this.groupSizes[c]=0}for(var d=this.indexOfGroup(t+1),h=0,u=n.length;h<u;h++)this.tag.insertRule(d,n[h])&&(this.groupSizes[t]++,d++)},e.clearGroup=function(t){if(t<this.length){var n=this.groupSizes[t],i=this.indexOfGroup(t),o=i+n;this.groupSizes[t]=0;for(var a=i;a<o;a++)this.tag.deleteRule(i)}},e.getGroup=function(t){var n="";if(t>=this.length||this.groupSizes[t]===0)return n;for(var i=this.groupSizes[t],o=this.indexOfGroup(t),a=o+i,c=o;c<a;c++)n+=this.tag.getRule(c)+`/*!sc*/
114
- `;return n},r}(),Dr=new Map,$r=new Map,fr=1,zr=function(r){if(Dr.has(r))return Dr.get(r);for(;$r.has(fr);)fr++;var e=fr++;return process.env.NODE_ENV!=="production"&&((0|e)<0||e>1<<30)&&Vt(16,""+e),Dr.set(r,e),$r.set(e,r),e},$o=function(r){return $r.get(r)},zo=function(r,e){e>=fr&&(fr=e+1),Dr.set(r,e),$r.set(e,r)},Ho="style["+Lt+'][data-styled-version="5.3.11"]',Mo=new RegExp("^"+Lt+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Ro=function(r,e,t){for(var n,i=t.split(","),o=0,a=i.length;o<a;o++)(n=i[o])&&r.registerName(e,n)},Io=function(r,e){for(var t=(e.textContent||"").split(`/*!sc*/
115
- `),n=[],i=0,o=t.length;i<o;i++){var a=t[i].trim();if(a){var c=a.match(Mo);if(c){var d=0|parseInt(c[1],10),h=c[2];d!==0&&(zo(h,d),Ro(r,h,c[3]),r.getTag().insertRules(d,n)),n.length=0}else n.push(a)}}},Bo=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},li=function(r){var e=document.head,t=r||e,n=document.createElement("style"),i=function(c){for(var d=c.childNodes,h=d.length;h>=0;h--){var u=d[h];if(u&&u.nodeType===1&&u.hasAttribute(Lt))return u}}(t),o=i!==void 0?i.nextSibling:null;n.setAttribute(Lt,"active"),n.setAttribute("data-styled-version","5.3.11");var a=Bo();return a&&n.setAttribute("nonce",a),t.insertBefore(n,o),n},Yo=function(){function r(t){var n=this.element=li(t);n.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var o=document.styleSheets,a=0,c=o.length;a<c;a++){var d=o[a];if(d.ownerNode===i)return d}Vt(17)}(n),this.length=0}var e=r.prototype;return e.insertRule=function(t,n){try{return this.sheet.insertRule(n,t),this.length++,!0}catch{return!1}},e.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.getRule=function(t){var n=this.sheet.cssRules[t];return n!==void 0&&typeof n.cssText=="string"?n.cssText:""},r}(),No=function(){function r(t){var n=this.element=li(t);this.nodes=n.childNodes,this.length=0}var e=r.prototype;return e.insertRule=function(t,n){if(t<=this.length&&t>=0){var i=document.createTextNode(n),o=this.nodes[t];return this.element.insertBefore(i,o||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:""},r}(),Fo=function(){function r(t){this.rules=[],this.length=0}var e=r.prototype;return e.insertRule=function(t,n){return t<=this.length&&(this.rules.splice(t,0,n),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]:""},r}(),ci=fn,Lo={isServer:!fn,useCSSOMInjection:!Po},ui=function(){function r(t,n,i){t===void 0&&(t=bt),n===void 0&&(n={}),this.options=ct({},Lo,{},t),this.gs=n,this.names=new Map(i),this.server=!!t.isServer,!this.server&&fn&&ci&&(ci=!1,function(o){for(var a=document.querySelectorAll(Ho),c=0,d=a.length;c<d;c++){var h=a[c];h&&h.getAttribute(Lt)!=="active"&&(Io(o,h),h.parentNode&&h.parentNode.removeChild(h))}}(this))}r.registerId=function(t){return zr(t)};var e=r.prototype;return e.reconstructWithOptions=function(t,n){return n===void 0&&(n=!0),new r(ct({},this.options,{},t),this.gs,n&&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=(i=(n=this.options).isServer,o=n.useCSSOMInjection,a=n.target,t=i?new Fo(a):o?new Yo(a):new No(a),new Do(t)));var t,n,i,o,a},e.hasNameForId=function(t,n){return this.names.has(t)&&this.names.get(t).has(n)},e.registerName=function(t,n){if(zr(t),this.names.has(t))this.names.get(t).add(n);else{var i=new Set;i.add(n),this.names.set(t,i)}},e.insertRules=function(t,n,i){this.registerName(t,n),this.getTag().insertRules(zr(t),i)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(zr(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var n=t.getTag(),i=n.length,o="",a=0;a<i;a++){var c=$o(a);if(c!==void 0){var d=t.names.get(c),h=n.getGroup(a);if(d&&h&&d.size){var u=Lt+".g"+a+'[id="'+c+'"]',g="";d!==void 0&&d.forEach(function(E){E.length>0&&(g+=E+",")}),o+=""+h+u+'{content:"'+g+`"}/*!sc*/
116
- `}}}return o}(this)},r}(),Vo=/(a)(d)/gi,di=function(r){return String.fromCharCode(r+(r>25?39:97))};function hn(r){var e,t="";for(e=Math.abs(r);e>52;e=e/52|0)t=di(e%52)+t;return(di(e%52)+t).replace(Vo,"$1-$2")}var Ot=function(r,e){for(var t=e.length;t;)r=33*r^e.charCodeAt(--t);return r},fi=function(r){return Ot(5381,r)};function Xo(r){for(var e=0;e<r.length;e+=1){var t=r[e];if(dr(t)&&!dn(t))return!1}return!0}var Wo=fi("5.3.11"),Uo=function(){function r(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(n===void 0||n.isStatic)&&Xo(e),this.componentId=t,this.baseHash=Ot(Wo,t),this.baseStyle=n,ui.registerId(t)}return r.prototype.generateAndInjectStyles=function(e,t,n){var i=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(i,this.staticRulesId))o.push(this.staticRulesId);else{var a=Xt(this.rules,e,t,n).join(""),c=hn(Ot(this.baseHash,a)>>>0);if(!t.hasNameForId(i,c)){var d=n(a,"."+c,void 0,i);t.insertRules(i,c,d)}o.push(c),this.staticRulesId=c}else{for(var h=this.rules.length,u=Ot(this.baseHash,n.hash),g="",E=0;E<h;E++){var P=this.rules[E];if(typeof P=="string")g+=P,process.env.NODE_ENV!=="production"&&(u=Ot(u,P+E));else if(P){var A=Xt(P,e,t,n),S=Array.isArray(A)?A.join(""):A;u=Ot(u,S+E),g+=S}}if(g){var y=hn(u>>>0);if(!t.hasNameForId(i,y)){var _=n(g,"."+y,void 0,i);t.insertRules(i,y,_)}o.push(y)}}return o.join(" ")},r}(),Zo=/^\s*\/\/.*$/gm,Go=[":","[",".","#"];function Ko(r){var e,t,n,i,o=r===void 0?bt:r,a=o.options,c=a===void 0?bt:a,d=o.plugins,h=d===void 0?jr:d,u=new ho(c),g=[],E=function(S){function y(_){if(_)try{S(_+"}")}catch{}}return function(_,C,$,D,b,G,O,I,X,T){switch(_){case 1:if(X===0&&C.charCodeAt(0)===64)return S(C+";"),"";break;case 2:if(I===0)return C+"/*|*/";break;case 3:switch(I){case 102:case 112:return S($[0]+C),"";default:return C+(T===0?"/*|*/":"")}case-2:C.split("/*|*/}").forEach(y)}}}(function(S){g.push(S)}),P=function(S,y,_){return y===0&&Go.indexOf(_[t.length])!==-1||_.match(i)?S:"."+e};function A(S,y,_,C){C===void 0&&(C="&");var $=S.replace(Zo,""),D=y&&_?_+" "+y+" { "+$+" }":$;return e=C,t=y,n=new RegExp("\\"+t+"\\b","g"),i=new RegExp("(\\"+t+"\\b){2,}"),u(_||!y?"":y,D)}return u.use([].concat(h,[function(S,y,_){S===2&&_.length&&_[0].lastIndexOf(t)>0&&(_[0]=_[0].replace(n,P))},E,function(S){if(S===-2){var y=g;return g=[],y}}])),A.hash=h.length?h.reduce(function(S,y){return y.name||Vt(15),Ot(S,y.name)},5381).toString():"",A}var hi=v.createContext();hi.Consumer;var pi=v.createContext(),qo=(pi.Consumer,new ui),pn=Ko();function Jo(){return v.useContext(hi)||qo}function Qo(){return v.useContext(pi)||pn}var es=function(){function r(e,t){var n=this;this.inject=function(i,o){o===void 0&&(o=pn);var a=n.name+o.hash;i.hasNameForId(n.id,a)||i.insertRules(n.id,a,o(n.rules,a,"@keyframes"))},this.toString=function(){return Vt(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return r.prototype.getName=function(e){return e===void 0&&(e=pn),this.name+e.hash},r}(),ts=/([A-Z])/,rs=/([A-Z])/g,ns=/^ms-/,is=function(r){return"-"+r.toLowerCase()};function mi(r){return ts.test(r)?r.replace(rs,is).replace(ns,"-ms-"):r}var gi=function(r){return r==null||r===!1||r===""};function Xt(r,e,t,n){if(Array.isArray(r)){for(var i,o=[],a=0,c=r.length;a<c;a+=1)(i=Xt(r[a],e,t,n))!==""&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}if(gi(r))return"";if(dn(r))return"."+r.styledComponentId;if(dr(r)){if(typeof(h=r)!="function"||h.prototype&&h.prototype.isReactComponent||!e)return r;var d=r(e);return process.env.NODE_ENV!=="production"&&on.isElement(d)&&console.warn(un(r)+" 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."),Xt(d,e,t,n)}var h;return r instanceof es?t?(r.inject(t,n),r.getName(n)):r:cn(r)?function u(g,E){var P,A,S=[];for(var y in g)g.hasOwnProperty(y)&&!gi(g[y])&&(Array.isArray(g[y])&&g[y].isCss||dr(g[y])?S.push(mi(y)+":",g[y],";"):cn(g[y])?S.push.apply(S,u(g[y],y)):S.push(mi(y)+": "+(P=y,(A=g[y])==null||typeof A=="boolean"||A===""?"":typeof A!="number"||A===0||P in po||P.startsWith("--")?String(A).trim():A+"px")+";"));return E?[E+" {"].concat(S,["}"]):S}(r):r.toString()}var yi=function(r){return Array.isArray(r)&&(r.isCss=!0),r};function os(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return dr(r)||cn(r)?yi(Xt(ai(jr,[r].concat(t)))):t.length===0&&r.length===1&&typeof r[0]=="string"?r:yi(Xt(ai(r,t)))}var bi=/invalid hook call/i,Hr=new Set,ss=function(r,e){if(process.env.NODE_ENV!=="production"){var t="The component "+r+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
113
+ `}:{};function cs(){for(var n=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(i){n=n.replace(/%[a-z]/,i)}),n}function Jt(n){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#"+n+" for more information."+(t.length>0?" Args: "+t.join(", "):"")):new Error(cs.apply(void 0,[ls[n]].concat(t)).trim())}var us=function(){function n(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=n.prototype;return e.indexOfGroup=function(t){for(var r=0,i=0;i<t;i++)r+=this.groupSizes[i];return r},e.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var i=this.groupSizes,o=i.length,s=o;t>=s;)(s<<=1)<0&&Jt(16,""+t);this.groupSizes=new Uint32Array(s),this.groupSizes.set(i),this.length=s;for(var c=o;c<s;c++)this.groupSizes[c]=0}for(var d=this.indexOfGroup(t+1),f=0,u=r.length;f<u;f++)this.tag.insertRule(d,r[f])&&(this.groupSizes[t]++,d++)},e.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],i=this.indexOfGroup(t),o=i+r;this.groupSizes[t]=0;for(var s=i;s<o;s++)this.tag.deleteRule(i)}},e.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var i=this.groupSizes[t],o=this.indexOfGroup(t),s=o+i,c=o;c<s;c++)r+=this.tag.getRule(c)+`/*!sc*/
114
+ `;return r},n}(),Mn=new Map,Hn=new Map,vn=1,Rn=function(n){if(Mn.has(n))return Mn.get(n);for(;Hn.has(vn);)vn++;var e=vn++;return process.env.NODE_ENV!=="production"&&((0|e)<0||e>1<<30)&&Jt(16,""+e),Mn.set(n,e),Hn.set(e,n),e},ds=function(n){return Hn.get(n)},hs=function(n,e){e>=vn&&(vn=e+1),Mn.set(n,e),Hn.set(e,n)},fs="style["+Kt+'][data-styled-version="5.3.11"]',ps=new RegExp("^"+Kt+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),ms=function(n,e,t){for(var r,i=t.split(","),o=0,s=i.length;o<s;o++)(r=i[o])&&n.registerName(e,r)},gs=function(n,e){for(var t=(e.textContent||"").split(`/*!sc*/
115
+ `),r=[],i=0,o=t.length;i<o;i++){var s=t[i].trim();if(s){var c=s.match(ps);if(c){var d=0|parseInt(c[1],10),f=c[2];d!==0&&(hs(f,d),ms(n,f,c[3]),n.getTag().insertRules(d,r)),r.length=0}else r.push(s)}}},ys=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},xi=function(n){var e=document.head,t=n||e,r=document.createElement("style"),i=function(c){for(var d=c.childNodes,f=d.length;f>=0;f--){var u=d[f];if(u&&u.nodeType===1&&u.hasAttribute(Kt))return u}}(t),o=i!==void 0?i.nextSibling:null;r.setAttribute(Kt,"active"),r.setAttribute("data-styled-version","5.3.11");var s=ys();return s&&r.setAttribute("nonce",s),t.insertBefore(r,o),r},vs=function(){function n(t){var r=this.element=xi(t);r.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var o=document.styleSheets,s=0,c=o.length;s<c;s++){var d=o[s];if(d.ownerNode===i)return d}Jt(17)}(r),this.length=0}var e=n.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:""},n}(),xs=function(){function n(t){var r=this.element=xi(t);this.nodes=r.childNodes,this.length=0}var e=n.prototype;return e.insertRule=function(t,r){if(t<=this.length&&t>=0){var i=document.createTextNode(r),o=this.nodes[t];return this.element.insertBefore(i,o||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:""},n}(),bs=function(){function n(t){this.rules=[],this.length=0}var e=n.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]:""},n}(),bi=yr,Ss={isServer:!yr,useCSSOMInjection:!as},Si=function(){function n(t,r,i){t===void 0&&(t=Tt),r===void 0&&(r={}),this.options=pt({},Ss,{},t),this.gs=r,this.names=new Map(i),this.server=!!t.isServer,!this.server&&yr&&bi&&(bi=!1,function(o){for(var s=document.querySelectorAll(fs),c=0,d=s.length;c<d;c++){var f=s[c];f&&f.getAttribute(Kt)!=="active"&&(gs(o,f),f.parentNode&&f.parentNode.removeChild(f))}}(this))}n.registerId=function(t){return Rn(t)};var e=n.prototype;return e.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new n(pt({},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=(i=(r=this.options).isServer,o=r.useCSSOMInjection,s=r.target,t=i?new bs(s):o?new vs(s):new xs(s),new us(t)));var t,r,i,o,s},e.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.registerName=function(t,r){if(Rn(t),this.names.has(t))this.names.get(t).add(r);else{var i=new Set;i.add(r),this.names.set(t,i)}},e.insertRules=function(t,r,i){this.registerName(t,r),this.getTag().insertRules(Rn(t),i)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(Rn(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var r=t.getTag(),i=r.length,o="",s=0;s<i;s++){var c=ds(s);if(c!==void 0){var d=t.names.get(c),f=r.getGroup(s);if(d&&f&&d.size){var u=Kt+".g"+s+'[id="'+c+'"]',p="";d!==void 0&&d.forEach(function(S){S.length>0&&(p+=S+",")}),o+=""+f+u+'{content:"'+p+`"}/*!sc*/
116
+ `}}}return o}(this)},n}(),ws=/(a)(d)/gi,wi=function(n){return String.fromCharCode(n+(n>25?39:97))};function vr(n){var e,t="";for(e=Math.abs(n);e>52;e=e/52|0)t=wi(e%52)+t;return(wi(e%52)+t).replace(ws,"$1-$2")}var Rt=function(n,e){for(var t=e.length;t;)n=33*n^e.charCodeAt(--t);return n},Ei=function(n){return Rt(5381,n)};function Es(n){for(var e=0;e<n.length;e+=1){var t=n[e];if(yn(t)&&!gr(t))return!1}return!0}var Cs=Ei("5.3.11"),Ts=function(){function n(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&Es(e),this.componentId=t,this.baseHash=Rt(Cs,t),this.baseStyle=r,Si.registerId(t)}return n.prototype.generateAndInjectStyles=function(e,t,r){var i=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(i,this.staticRulesId))o.push(this.staticRulesId);else{var s=Qt(this.rules,e,t,r).join(""),c=vr(Rt(this.baseHash,s)>>>0);if(!t.hasNameForId(i,c)){var d=r(s,"."+c,void 0,i);t.insertRules(i,c,d)}o.push(c),this.staticRulesId=c}else{for(var f=this.rules.length,u=Rt(this.baseHash,r.hash),p="",S=0;S<f;S++){var C=this.rules[S];if(typeof C=="string")p+=C,process.env.NODE_ENV!=="production"&&(u=Rt(u,C+S));else if(C){var j=Qt(C,e,t,r),b=Array.isArray(j)?j.join(""):j;u=Rt(u,b+S),p+=b}}if(p){var m=vr(u>>>0);if(!t.hasNameForId(i,m)){var k=r(p,"."+m,void 0,i);t.insertRules(i,m,k)}o.push(m)}}return o.join(" ")},n}(),ks=/^\s*\/\/.*$/gm,As=[":","[",".","#"];function js(n){var e,t,r,i,o=n===void 0?Tt:n,s=o.options,c=s===void 0?Tt:s,d=o.plugins,f=d===void 0?In:d,u=new Wo(c),p=[],S=function(b){function m(k){if(k)try{b(k+"}")}catch{}}return function(k,w,z,O,v,U,P,I,Y,A){switch(k){case 1:if(Y===0&&w.charCodeAt(0)===64)return b(w+";"),"";break;case 2:if(I===0)return w+"/*|*/";break;case 3:switch(I){case 102:case 112:return b(z[0]+w),"";default:return w+(A===0?"/*|*/":"")}case-2:w.split("/*|*/}").forEach(m)}}}(function(b){p.push(b)}),C=function(b,m,k){return m===0&&As.indexOf(k[t.length])!==-1||k.match(i)?b:"."+e};function j(b,m,k,w){w===void 0&&(w="&");var z=b.replace(ks,""),O=m&&k?k+" "+m+" { "+z+" }":z;return e=w,t=m,r=new RegExp("\\"+t+"\\b","g"),i=new RegExp("(\\"+t+"\\b){2,}"),u(k||!m?"":m,O)}return u.use([].concat(f,[function(b,m,k){b===2&&k.length&&k[0].lastIndexOf(t)>0&&(k[0]=k[0].replace(r,C))},S,function(b){if(b===-2){var m=p;return p=[],m}}])),j.hash=f.length?f.reduce(function(b,m){return m.name||Jt(15),Rt(b,m.name)},5381).toString():"",j}var Ci=x.createContext();Ci.Consumer;var Ti=x.createContext(),_s=(Ti.Consumer,new Si),xr=js();function Ps(){return x.useContext(Ci)||_s}function Os(){return x.useContext(Ti)||xr}var Ds=function(){function n(e,t){var r=this;this.inject=function(i,o){o===void 0&&(o=xr);var s=r.name+o.hash;i.hasNameForId(r.id,s)||i.insertRules(r.id,s,o(r.rules,s,"@keyframes"))},this.toString=function(){return Jt(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return n.prototype.getName=function(e){return e===void 0&&(e=xr),this.name+e.hash},n}(),zs=/([A-Z])/,$s=/([A-Z])/g,Is=/^ms-/,Ms=function(n){return"-"+n.toLowerCase()};function ki(n){return zs.test(n)?n.replace($s,Ms).replace(Is,"-ms-"):n}var Ai=function(n){return n==null||n===!1||n===""};function Qt(n,e,t,r){if(Array.isArray(n)){for(var i,o=[],s=0,c=n.length;s<c;s+=1)(i=Qt(n[s],e,t,r))!==""&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}if(Ai(n))return"";if(gr(n))return"."+n.styledComponentId;if(yn(n)){if(typeof(f=n)!="function"||f.prototype&&f.prototype.isReactComponent||!e)return n;var d=n(e);return process.env.NODE_ENV!=="production"&&ur.isElement(d)&&console.warn(mr(n)+" 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."),Qt(d,e,t,r)}var f;return n instanceof Ds?t?(n.inject(t,r),n.getName(r)):n:pr(n)?function u(p,S){var C,j,b=[];for(var m in p)p.hasOwnProperty(m)&&!Ai(p[m])&&(Array.isArray(p[m])&&p[m].isCss||yn(p[m])?b.push(ki(m)+":",p[m],";"):pr(p[m])?b.push.apply(b,u(p[m],m)):b.push(ki(m)+": "+(C=m,(j=p[m])==null||typeof j=="boolean"||j===""?"":typeof j!="number"||j===0||C in Xo||C.startsWith("--")?String(j).trim():j+"px")+";"));return S?[S+" {"].concat(b,["}"]):b}(n):n.toString()}var ji=function(n){return Array.isArray(n)&&(n.isCss=!0),n};function Hs(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return yn(n)||pr(n)?ji(Qt(vi(In,[n].concat(t)))):t.length===0&&n.length===1&&typeof n[0]=="string"?n:ji(Qt(vi(n,t)))}var _i=/invalid hook call/i,Nn=new Set,Rs=function(n,e){if(process.env.NODE_ENV!=="production"){var t="The component "+n+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
117
117
  You may see this warning because you've called styled inside another component.
118
- To resolve this only create new StyledComponents outside of any render method and function component.`,n=console.error;try{var i=!0;console.error=function(o){if(bi.test(o))i=!1,Hr.delete(t);else{for(var a=arguments.length,c=new Array(a>1?a-1:0),d=1;d<a;d++)c[d-1]=arguments[d];n.apply(void 0,[o].concat(c))}},v.useRef(),i&&!Hr.has(t)&&(console.warn(t),Hr.add(t))}catch(o){bi.test(o.message)&&Hr.delete(t)}finally{console.error=n}}},as=function(r,e,t){return t===void 0&&(t=bt),r.theme!==t.theme&&r.theme||e||t.theme},ls=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,cs=/(^-|-$)/g;function mn(r){return r.replace(ls,"-").replace(cs,"")}var us=function(r){return hn(fi(r)>>>0)};function Mr(r){return typeof r=="string"&&(process.env.NODE_ENV==="production"||r.charAt(0)===r.charAt(0).toLowerCase())}var gn=function(r){return typeof r=="function"||typeof r=="object"&&r!==null&&!Array.isArray(r)},ds=function(r){return r!=="__proto__"&&r!=="constructor"&&r!=="prototype"};function fs(r,e,t){var n=r[t];gn(e)&&gn(n)?vi(n,e):r[t]=e}function vi(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i];if(gn(a))for(var c in a)ds(c)&&fs(r,a[c],c)}return r}var xi=v.createContext();xi.Consumer;var yn={};function Si(r,e,t){var n=dn(r),i=!Mr(r),o=e.attrs,a=o===void 0?jr:o,c=e.componentId,d=c===void 0?function(C,$){var D=typeof C!="string"?"sc":mn(C);yn[D]=(yn[D]||0)+1;var b=D+"-"+us("5.3.11"+D+yn[D]);return $?$+"-"+b:b}(e.displayName,e.parentComponentId):c,h=e.displayName,u=h===void 0?function(C){return Mr(C)?"styled."+C:"Styled("+un(C)+")"}(r):h,g=e.displayName&&e.componentId?mn(e.displayName)+"-"+e.componentId:e.componentId||d,E=n&&r.attrs?Array.prototype.concat(r.attrs,a).filter(Boolean):a,P=e.shouldForwardProp;n&&r.shouldForwardProp&&(P=e.shouldForwardProp?function(C,$,D){return r.shouldForwardProp(C,$,D)&&e.shouldForwardProp(C,$,D)}:r.shouldForwardProp);var A,S=new Uo(t,g,n?r.componentStyle:void 0),y=S.isStatic&&a.length===0,_=function(C,$){return function(D,b,G,O){var I=D.attrs,X=D.componentStyle,T=D.defaultProps,ee=D.foldedComponentIds,F=D.shouldForwardProp,N=D.styledComponentId,L=D.target,K=function(w,m,re){w===void 0&&(w=bt);var k=ct({},m,{theme:w}),fe={};return re.forEach(function(ne){var ae,j,le,M=ne;for(ae in dr(M)&&(M=M(k)),M)k[ae]=fe[ae]=ae==="className"?(j=fe[ae],le=M[ae],j&&le?j+" "+le:j||le):M[ae]}),[k,fe]}(as(b,v.useContext(xi),T)||bt,b,I),q=K[0],ye=K[1],me=function(w,m,re,k){var fe=Jo(),ne=Qo(),ae=m?w.generateAndInjectStyles(bt,fe,ne):w.generateAndInjectStyles(re,fe,ne);return process.env.NODE_ENV!=="production"&&!m&&k&&k(ae),ae}(X,O,q,process.env.NODE_ENV!=="production"?D.warnTooManyClasses:void 0),Se=G,Ae=ye.$as||b.$as||ye.as||b.as||L,Ie=Mr(Ae),R=ye!==b?ct({},b,{},ye):b,H={};for(var Y in R)Y[0]!=="$"&&Y!=="as"&&(Y==="forwardedAs"?H.as=R[Y]:(F?F(Y,Qn,Ae):!Ie||Qn(Y))&&(H[Y]=R[Y]));return b.style&&ye.style!==b.style&&(H.style=ct({},b.style,{},ye.style)),H.className=Array.prototype.concat(ee,N,me!==N?me:null,b.className,ye.className).filter(Boolean).join(" "),H.ref=Se,v.createElement(Ae,H)}(A,C,$,y)};return _.displayName=u,(A=v.forwardRef(_)).attrs=E,A.componentStyle=S,A.displayName=u,A.shouldForwardProp=P,A.foldedComponentIds=n?Array.prototype.concat(r.foldedComponentIds,r.styledComponentId):jr,A.styledComponentId=g,A.target=n?r.target:r,A.withComponent=function(C){var $=e.componentId,D=function(G,O){if(G==null)return{};var I,X,T={},ee=Object.keys(G);for(X=0;X<ee.length;X++)I=ee[X],O.indexOf(I)>=0||(T[I]=G[I]);return T}(e,["componentId"]),b=$&&$+"-"+(Mr(C)?C:mn(un(C)));return Si(C,ct({},D,{attrs:E,componentId:b}),t)},Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(C){this._foldedDefaultProps=n?vi({},r.defaultProps,C):C}}),process.env.NODE_ENV!=="production"&&(ss(u,g),A.warnTooManyClasses=function(C,$){var D={},b=!1;return function(G){if(!b&&(D[G]=!0,Object.keys(D).length>=200)){var O=$?' with the id of "'+$+'"':"";console.warn("Over 200 classes were generated for component "+C+O+`.
118
+ To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var i=!0;console.error=function(o){if(_i.test(o))i=!1,Nn.delete(t);else{for(var s=arguments.length,c=new Array(s>1?s-1:0),d=1;d<s;d++)c[d-1]=arguments[d];r.apply(void 0,[o].concat(c))}},x.useRef(),i&&!Nn.has(t)&&(console.warn(t),Nn.add(t))}catch(o){_i.test(o.message)&&Nn.delete(t)}finally{console.error=r}}},Ns=function(n,e,t){return t===void 0&&(t=Tt),n.theme!==t.theme&&n.theme||e||t.theme},Fs=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Bs=/(^-|-$)/g;function br(n){return n.replace(Fs,"-").replace(Bs,"")}var Ys=function(n){return vr(Ei(n)>>>0)};function Fn(n){return typeof n=="string"&&(process.env.NODE_ENV==="production"||n.charAt(0)===n.charAt(0).toLowerCase())}var Sr=function(n){return typeof n=="function"||typeof n=="object"&&n!==null&&!Array.isArray(n)},Ls=function(n){return n!=="__proto__"&&n!=="constructor"&&n!=="prototype"};function Vs(n,e,t){var r=n[t];Sr(e)&&Sr(r)?Pi(r,e):n[t]=e}function Pi(n){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 i=0,o=t;i<o.length;i++){var s=o[i];if(Sr(s))for(var c in s)Ls(c)&&Vs(n,s[c],c)}return n}var Oi=x.createContext();Oi.Consumer;var wr={};function Di(n,e,t){var r=gr(n),i=!Fn(n),o=e.attrs,s=o===void 0?In:o,c=e.componentId,d=c===void 0?function(w,z){var O=typeof w!="string"?"sc":br(w);wr[O]=(wr[O]||0)+1;var v=O+"-"+Ys("5.3.11"+O+wr[O]);return z?z+"-"+v:v}(e.displayName,e.parentComponentId):c,f=e.displayName,u=f===void 0?function(w){return Fn(w)?"styled."+w:"Styled("+mr(w)+")"}(n):f,p=e.displayName&&e.componentId?br(e.displayName)+"-"+e.componentId:e.componentId||d,S=r&&n.attrs?Array.prototype.concat(n.attrs,s).filter(Boolean):s,C=e.shouldForwardProp;r&&n.shouldForwardProp&&(C=e.shouldForwardProp?function(w,z,O){return n.shouldForwardProp(w,z,O)&&e.shouldForwardProp(w,z,O)}:n.shouldForwardProp);var j,b=new Ts(t,p,r?n.componentStyle:void 0),m=b.isStatic&&s.length===0,k=function(w,z){return function(O,v,U,P){var I=O.attrs,Y=O.componentStyle,A=O.defaultProps,V=O.foldedComponentIds,L=O.shouldForwardProp,B=O.styledComponentId,W=O.target,K=function(T,y,ne){T===void 0&&(T=Tt);var _=pt({},y,{theme:T}),he={};return ne.forEach(function(re){var le,D,ce,H=re;for(le in yn(H)&&(H=H(_)),H)_[le]=he[le]=le==="className"?(D=he[le],ce=H[le],D&&ce?D+" "+ce:D||ce):H[le]}),[_,he]}(Ns(v,x.useContext(Oi),A)||Tt,v,I),J=K[0],ye=K[1],me=function(T,y,ne,_){var he=Ps(),re=Os(),le=y?T.generateAndInjectStyles(Tt,he,re):T.generateAndInjectStyles(ne,he,re);return process.env.NODE_ENV!=="production"&&!y&&_&&_(le),le}(Y,P,J,process.env.NODE_ENV!=="production"?O.warnTooManyClasses:void 0),we=U,_e=ye.$as||v.$as||ye.as||v.as||W,Re=Fn(_e),R=ye!==v?pt({},v,{},ye):v,M={};for(var F in R)F[0]!=="$"&&F!=="as"&&(F==="forwardedAs"?M.as=R[F]:(L?L(F,ui,_e):!Re||ui(F))&&(M[F]=R[F]));return v.style&&ye.style!==v.style&&(M.style=pt({},v.style,{},ye.style)),M.className=Array.prototype.concat(V,B,me!==B?me:null,v.className,ye.className).filter(Boolean).join(" "),M.ref=we,x.createElement(_e,M)}(j,w,z,m)};return k.displayName=u,(j=x.forwardRef(k)).attrs=S,j.componentStyle=b,j.displayName=u,j.shouldForwardProp=C,j.foldedComponentIds=r?Array.prototype.concat(n.foldedComponentIds,n.styledComponentId):In,j.styledComponentId=p,j.target=r?n.target:n,j.withComponent=function(w){var z=e.componentId,O=function(U,P){if(U==null)return{};var I,Y,A={},V=Object.keys(U);for(Y=0;Y<V.length;Y++)I=V[Y],P.indexOf(I)>=0||(A[I]=U[I]);return A}(e,["componentId"]),v=z&&z+"-"+(Fn(w)?w:br(mr(w)));return Di(w,pt({},O,{attrs:S,componentId:v}),t)},Object.defineProperty(j,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(w){this._foldedDefaultProps=r?Pi({},n.defaultProps,w):w}}),process.env.NODE_ENV!=="production"&&(Rs(u,p),j.warnTooManyClasses=function(w,z){var O={},v=!1;return function(U){if(!v&&(O[U]=!0,Object.keys(O).length>=200)){var P=z?' with the id of "'+z+'"':"";console.warn("Over 200 classes were generated for component "+w+P+`.
119
119
  Consider using the attrs method, together with a style object for frequently changed styles.
120
120
  Example:
121
121
  const Component = styled.div.attrs(props => ({
@@ -124,11 +124,11 @@ Example:
124
124
  },
125
125
  }))\`width: 100%;\`
126
126
 
127
- <Component />`),b=!0,D={}}}}(u,g)),Object.defineProperty(A,"toString",{value:function(){return"."+A.styledComponentId}}),i&&Ao(A,r,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var bn=function(r){return function e(t,n,i){if(i===void 0&&(i=bt),!on.isValidElementType(n))return Vt(1,String(n));var o=function(){return t(n,i,os.apply(void 0,arguments))};return o.withConfig=function(a){return e(t,n,ct({},i,{},a))},o.attrs=function(a){return e(t,n,ct({},i,{attrs:Array.prototype.concat(i.attrs,a).filter(Boolean)}))},o}(Si,r)};["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(r){bn[r]=bn(r)}),process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
127
+ <Component />`),v=!0,O={}}}}(u,p)),Object.defineProperty(j,"toString",{value:function(){return"."+j.styledComponentId}}),i&&ss(j,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),j}var Er=function(n){return function e(t,r,i){if(i===void 0&&(i=Tt),!ur.isValidElementType(r))return Jt(1,String(r));var o=function(){return t(r,i,Hs.apply(void 0,arguments))};return o.withConfig=function(s){return e(t,r,pt({},i,{},s))},o.attrs=function(s){return e(t,r,pt({},i,{attrs:Array.prototype.concat(i.attrs,s).filter(Boolean)}))},o}(Di,n)};["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(n){Er[n]=Er(n)}),process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
128
128
  Perhaps you're looking to import 'styled-components/native'?
129
129
  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.
130
130
 
131
- See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const Qe=bn,hs=Qe.div`
131
+ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const rt=Er,Ws=rt.div`
132
132
  font-family: 'IBM Plex Mono', 'Roboto', sans-serif;
133
133
  background-color: #fafafa;
134
134
  color: #26272;
@@ -138,7 +138,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
138
138
  right: 1vw;
139
139
  bottom: 3vh;
140
140
  z-index: 10000;
141
- display: ${r=>r.display};
141
+ display: ${n=>n.display};
142
142
  border-radius: 10px;
143
143
  box-shadow: 5px 5px 23px 5px rgba(0, 0, 0, 0.25);
144
144
  border-top: 1px solid rgba(255, 255, 255, 0.1);
@@ -148,7 +148,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
148
148
  & h1 span {
149
149
  font-size: 0.5em;
150
150
  }
151
- `,ps=Qe.div`
151
+ `,Xs=rt.div`
152
152
  display: flex;
153
153
  height: 100%;
154
154
  width: 170px;
@@ -181,7 +181,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
181
181
  & span {
182
182
  cursor: pointer;
183
183
  }
184
- `,ms=Qe.div`
184
+ `,Us=rt.div`
185
185
  width: 100%;
186
186
  cursor: grab;
187
187
  background-color: #eee;
@@ -196,7 +196,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
196
196
  font-size: 1.5em;
197
197
  font-weight: 600;
198
198
  }
199
- `,gs=Qe.div`
199
+ `,Zs=rt.div`
200
200
  cursor: pointer;
201
201
  transform: rotate(90deg);
202
202
  color: gray;
@@ -207,14 +207,14 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
207
207
  &:hover {
208
208
  text-decoration: underline;
209
209
  }
210
- `,ys=Qe.span`
210
+ `,Gs=rt.span`
211
211
  font-family: 'Open Sans';
212
212
  font-size: 15px;
213
213
  font-weight: 700;
214
214
  cursor: default !important;
215
215
  margin: 5px 15px 5px 0px;
216
216
  margin-left: 0.5rem;
217
- `,bs=Qe.span`
217
+ `,qs=rt.span`
218
218
  margin: 5px 15px 5px 0px;
219
219
  transition: all 500ms ease;
220
220
 
@@ -222,14 +222,14 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
222
222
  text-decoration: underline;
223
223
  margin-left: 1rem;
224
224
  }
225
- `,vs=Qe.div`
225
+ `,Ks=rt.div`
226
226
  display: flex;
227
227
  flex-direction: column;
228
228
  overflow-y: scroll;
229
229
  overflow-x: hidden;
230
230
  padding-bottom: 50px;
231
231
  font-size: 0.8em;
232
- `,wi=Qe.div`
232
+ `,zi=rt.div`
233
233
  font-size: 3em;
234
234
  color: #0f52ba;
235
235
  font-weight: bold;
@@ -240,148 +240,148 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
240
240
  -moz-user-select: none;
241
241
  -ms-user-select: none;
242
242
  user-select: none;
243
- `,xs=v.forwardRef(({activeToolLocal:r,tools:e,changeActiveToolLocalHandler:t},n)=>{v.useImperativeHandle(n,()=>({changeTabletDisplayHandler(a){o(a==="switch"?c=>c==="none"?"flex":"none":a)}}));const[i,o]=v.useState("none");return f.jsx(v.Fragment,{children:f.jsxs(hs,{display:i,id:"desktop--tablet--container",children:[f.jsxs(ps,{children:[f.jsxs("h1",{children:["NDMVR",f.jsx("span",{children:f.jsx("i",{children:"tablet"})})]}),f.jsx("p",{children:"Tools"}),f.jsx(vs,{children:e.map((a,c)=>c===r?f.jsxs(ys,{children:[f.jsx("span",{style:{fontWeight:700,color:"#0f52ba"},children:c<10?(c+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},c):f.jsxs(bs,{onClick:()=>t(c),children:[f.jsx("span",{style:{fontWeight:700,color:"#0f52ba"},children:c<10?(c+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},c))})]}),f.jsxs("div",{style:{width:"100%",overflow:"scroll"},children:[f.jsxs(ms,{id:"desktop--tablet--container--header",children:[f.jsx("h1",{children:e[r].name}),f.jsx(gs,{id:"close--button",onClick:()=>o("none"),style:{cursor:"pointer",maxWidth:"30px"},children:f.jsx("i",{children:"Hide"})})]}),f.jsx("div",{style:{display:"flex",flexDirection:"row",height:"83%",padding:"10px",alignItems:"center",justifyContent:"center"},children:e[r].fun})]})]})})}),Ss=r=>{const[e,t]=v.useState(r.initialState);return v.useLayoutEffect(()=>{r.init();const n=r.subscribe(t);return()=>n.unsubscribe()},[]),e},ws=r=>{const[e,t]=v.useState(r.initialState);return v.useLayoutEffect(()=>{const n=r.subscribe(t);return()=>n.unsubscribe()},[]),e},hr=v.createContext(null),pr=(r="",e="zmq2ws")=>{const[t,n]=v.useState({}),i=v.useContext(hr)[e];return v.useLayoutEffect(()=>{if(i===null)return;const o=i.subscribeIn(n,r);return()=>o.unsubscribe()},[i]),t},Ci=v.createContext(null),Ei=r=>r&&Object.keys(r).length===0&&r.constructor===Object,Cs=(r="ndmspcApp")=>{const e=v.useContext(Ci)[r],t=Ss(e);return[t==null?void 0:t.data,e]},vt=(r="ndmspcApp")=>{const e=v.useContext(Ci)[r],t=ws(e);return Ei(t)?[null,e]:[t,e]};var Rr={};/**
243
+ `,Js=x.forwardRef(({activeToolLocal:n,tools:e,changeActiveToolLocalHandler:t},r)=>{x.useImperativeHandle(r,()=>({changeTabletDisplayHandler(s){o(s==="switch"?c=>c==="none"?"flex":"none":s)}}));const[i,o]=x.useState("none");return h.jsx(x.Fragment,{children:h.jsxs(Ws,{display:i,id:"desktop--tablet--container",children:[h.jsxs(Xs,{children:[h.jsxs("h1",{children:["NDMVR",h.jsx("span",{children:h.jsx("i",{children:"tablet"})})]}),h.jsx("p",{children:"Tools"}),h.jsx(Ks,{children:e.map((s,c)=>c===n?h.jsxs(Gs,{children:[h.jsx("span",{style:{fontWeight:700,color:"#0f52ba"},children:c<10?(c+1)%10:">"})," ",s.name.length>15?s.name.slice(0,12)+"...":s.name]},c):h.jsxs(qs,{onClick:()=>t(c),children:[h.jsx("span",{style:{fontWeight:700,color:"#0f52ba"},children:c<10?(c+1)%10:">"})," ",s.name.length>15?s.name.slice(0,12)+"...":s.name]},c))})]}),h.jsxs("div",{style:{width:"100%",overflow:"scroll"},children:[h.jsxs(Us,{id:"desktop--tablet--container--header",children:[h.jsx("h1",{children:e[n].name}),h.jsx(Zs,{id:"close--button",onClick:()=>o("none"),style:{cursor:"pointer",maxWidth:"30px"},children:h.jsx("i",{children:"Hide"})})]}),h.jsx("div",{style:{display:"flex",flexDirection:"row",height:"83%",padding:"10px",alignItems:"center",justifyContent:"center"},children:e[n].fun})]})]})})}),$i={},Qs=(n,e=$i,t=new si(1))=>({init:(r=n)=>{const i=localStorage.getItem(r);i===null?(e={...e,name:r,data:{}},localStorage.setItem(r,JSON.stringify(e.data))):e={...e,name:r,data:JSON.parse(i)},t.next(e)},subscribe:r=>t.subscribe(r),setData:r=>{e={...e,data:r},localStorage.setItem(n,JSON.stringify(e.data)),t.next(e)},save:()=>{localStorage.setItem(n,JSON.stringify(e.data)),t.next(e)},clear:()=>{e={},localStorage.setItem(n,JSON.stringify(e.data)),t.next(e)},clearLocalStorage:()=>{localStorage.removeItem(n)},initialState:$i}),ea={},Cr=(n=1,e=new si(n))=>({init:()=>{},subscribe:t=>e.subscribe(t),setData:t=>{e.next(t)},clear:()=>{e.next({})},get subject(){return e},initialState:ea}),ta=n=>{const[e,t]=x.useState(n.initialState);return x.useLayoutEffect(()=>{n.init();const r=n.subscribe(t);return()=>r.unsubscribe()},[]),e},na=n=>{const[e,t]=x.useState(n.initialState);return x.useLayoutEffect(()=>{const r=n.subscribe(t);return()=>r.unsubscribe()},[]),e},Nt=x.createContext(null),mt=(n="",e="zmq2ws")=>{const[t,r]=x.useState({}),i=x.useContext(Nt)[e];return x.useLayoutEffect(()=>{if(i===null)return;const o=i.subscribeIn(r,n);return()=>o.unsubscribe()},[i]),t},ra=(n="",e="zmq2ws")=>{const[t,r]=x.useState({}),i=x.useContext(Nt)[e];return x.useLayoutEffect(()=>{if(i===null)return;const o=i.subscribeOut(r,n);return()=>o.unsubscribe()},[i]),t},Tr=x.createContext(null),kr=n=>n&&Object.keys(n).length===0&&n.constructor===Object,ia=(n="ndmspcApp")=>{const e=x.useContext(Tr)[n],t=ta(e);return[t==null?void 0:t.data,e]},et=(n="ndmspcApp")=>{const e=x.useContext(Tr)[n],t=na(e);return kr(t)?[null,e]:[t,e]};var xn={};/**
244
244
  * @license React
245
- * react-jsx-runtime.development.js
245
+ * react-jsx-runtime.production.min.js
246
246
  *
247
247
  * Copyright (c) Facebook, Inc. and its affiliates.
248
248
  *
249
249
  * This source code is licensed under the MIT license found in the
250
250
  * LICENSE file in the root directory of this source tree.
251
- */var Ti;function Es(){return Ti||(Ti=1,process.env.NODE_ENV!=="production"&&function(){var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A=Symbol.iterator,S="@@iterator";function y(l){if(l===null||typeof l!="object")return null;var p=A&&l[A]||l[S];return typeof p=="function"?p:null}var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(l){{for(var p=arguments.length,x=new Array(p>1?p-1:0),z=1;z<p;z++)x[z-1]=arguments[z];$("error",l,x)}}function $(l,p,x){{var z=_.ReactDebugCurrentFrame,W=z.getStackAddendum();W!==""&&(p+="%s",x=x.concat([W]));var Q=x.map(function(V){return String(V)});Q.unshift("Warning: "+p),Function.prototype.apply.call(console[l],console,Q)}}var D=!1,b=!1,G=!1,O=!1,I=!1,X;X=Symbol.for("react.module.reference");function T(l){return!!(typeof l=="string"||typeof l=="function"||l===n||l===o||I||l===i||l===h||l===u||O||l===P||D||b||G||typeof l=="object"&&l!==null&&(l.$$typeof===E||l.$$typeof===g||l.$$typeof===a||l.$$typeof===c||l.$$typeof===d||l.$$typeof===X||l.getModuleId!==void 0))}function ee(l,p,x){var z=l.displayName;if(z)return z;var W=p.displayName||p.name||"";return W!==""?x+"("+W+")":x}function F(l){return l.displayName||"Context"}function N(l){if(l==null)return null;if(typeof l.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case n:return"Fragment";case t:return"Portal";case o:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case u:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case c:var p=l;return F(p)+".Consumer";case a:var x=l;return F(x._context)+".Provider";case d:return ee(l,l.render,"ForwardRef");case g:var z=l.displayName||null;return z!==null?z:N(l.type)||"Memo";case E:{var W=l,Q=W._payload,V=W._init;try{return N(V(Q))}catch{return null}}}return null}var L=Object.assign,K=0,q,ye,me,Se,Ae,Ie,R;function H(){}H.__reactDisabledLog=!0;function Y(){{if(K===0){q=console.log,ye=console.info,me=console.warn,Se=console.error,Ae=console.group,Ie=console.groupCollapsed,R=console.groupEnd;var l={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}K++}}function w(){{if(K--,K===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},l,{value:q}),info:L({},l,{value:ye}),warn:L({},l,{value:me}),error:L({},l,{value:Se}),group:L({},l,{value:Ae}),groupCollapsed:L({},l,{value:Ie}),groupEnd:L({},l,{value:R})})}K<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var m=_.ReactCurrentDispatcher,re;function k(l,p,x){{if(re===void 0)try{throw Error()}catch(W){var z=W.stack.trim().match(/\n( *(at )?)/);re=z&&z[1]||""}return`
252
- `+re+l}}var fe=!1,ne;{var ae=typeof WeakMap=="function"?WeakMap:Map;ne=new ae}function j(l,p){if(!l||fe)return"";{var x=ne.get(l);if(x!==void 0)return x}var z;fe=!0;var W=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Q;Q=m.current,m.current=null,Y();try{if(p){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(Ye){z=Ye}Reflect.construct(l,[],V)}else{try{V.call()}catch(Ye){z=Ye}l.call(V.prototype)}}else{try{throw Error()}catch(Ye){z=Ye}l()}}catch(Ye){if(Ye&&z&&typeof Ye.stack=="string"){for(var B=Ye.stack.split(`
253
- `),Ce=z.stack.split(`
254
- `),ce=B.length-1,he=Ce.length-1;ce>=1&&he>=0&&B[ce]!==Ce[he];)he--;for(;ce>=1&&he>=0;ce--,he--)if(B[ce]!==Ce[he]){if(ce!==1||he!==1)do if(ce--,he--,he<0||B[ce]!==Ce[he]){var ze=`
255
- `+B[ce].replace(" at new "," at ");return l.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",l.displayName)),typeof l=="function"&&ne.set(l,ze),ze}while(ce>=1&&he>=0);break}}}finally{fe=!1,m.current=Q,w(),Error.prepareStackTrace=W}var qe=l?l.displayName||l.name:"",kr=qe?k(qe):"";return typeof l=="function"&&ne.set(l,kr),kr}function le(l,p,x){return j(l,!1)}function M(l){var p=l.prototype;return!!(p&&p.isReactComponent)}function ie(l,p,x){if(l==null)return"";if(typeof l=="function")return j(l,M(l));if(typeof l=="string")return k(l);switch(l){case h:return k("Suspense");case u:return k("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case d:return le(l.render);case g:return ie(l.type,p,x);case E:{var z=l,W=z._payload,Q=z._init;try{return ie(Q(W),p,x)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,pe={},Me=_.ReactDebugCurrentFrame;function Fe(l){if(l){var p=l._owner,x=ie(l.type,l._source,p?p.type:null);Me.setExtraStackFrame(x)}else Me.setExtraStackFrame(null)}function Be(l,p,x,z,W){{var Q=Function.call.bind(we);for(var V in l)if(Q(l,V)){var B=void 0;try{if(typeof l[V]!="function"){var Ce=Error((z||"React class")+": "+x+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ce.name="Invariant Violation",Ce}B=l[V](p,V,z,x,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ce){B=ce}B&&!(B instanceof Error)&&(Fe(W),C("%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).",z||"React class",x,V,typeof B),Fe(null)),B instanceof Error&&!(B.message in pe)&&(pe[B.message]=!0,Fe(W),C("Failed %s type: %s",x,B.message),Fe(null))}}}var _t=Array.isArray;function Ge(l){return _t(l)}function Le(l){{var p=typeof Symbol=="function"&&Symbol.toStringTag,x=p&&l[Symbol.toStringTag]||l.constructor.name||"Object";return x}}function se(l){try{return De(l),!1}catch{return!0}}function De(l){return""+l}function mt(l){if(se(l))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Le(l)),De(l)}var Ve=_.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},br,vr,Rt;Rt={};function Tn(l){if(we.call(l,"ref")){var p=Object.getOwnPropertyDescriptor(l,"ref").get;if(p&&p.isReactWarning)return!1}return l.ref!==void 0}function kn(l){if(we.call(l,"key")){var p=Object.getOwnPropertyDescriptor(l,"key").get;if(p&&p.isReactWarning)return!1}return l.key!==void 0}function _n(l,p){if(typeof l.ref=="string"&&Ve.current&&p&&Ve.current.stateNode!==p){var x=N(Ve.current.type);Rt[x]||(C('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',N(Ve.current.type),l.ref),Rt[x]=!0)}}function An(l,p){{var x=function(){br||(br=!0,C("%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)",p))};x.isReactWarning=!0,Object.defineProperty(l,"key",{get:x,configurable:!0})}}function Pn(l,p){{var x=function(){vr||(vr=!0,C("%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)",p))};x.isReactWarning=!0,Object.defineProperty(l,"ref",{get:x,configurable:!0})}}var On=function(l,p,x,z,W,Q,V){var B={$$typeof:e,type:l,key:p,ref:x,props:V,_owner:Q};return B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(B,"_self",{configurable:!1,enumerable:!1,writable:!1,value:z}),Object.defineProperty(B,"_source",{configurable:!1,enumerable:!1,writable:!1,value:W}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B};function jn(l,p,x,z,W){{var Q,V={},B=null,Ce=null;x!==void 0&&(mt(x),B=""+x),kn(p)&&(mt(p.key),B=""+p.key),Tn(p)&&(Ce=p.ref,_n(p,W));for(Q in p)we.call(p,Q)&&!Je.hasOwnProperty(Q)&&(V[Q]=p[Q]);if(l&&l.defaultProps){var ce=l.defaultProps;for(Q in ce)V[Q]===void 0&&(V[Q]=ce[Q])}if(B||Ce){var he=typeof l=="function"?l.displayName||l.name||"Unknown":l;B&&An(V,he),Ce&&Pn(V,he)}return On(l,B,Ce,W,z,Ve.current,V)}}var It=_.ReactCurrentOwner,xr=_.ReactDebugCurrentFrame;function Ke(l){if(l){var p=l._owner,x=ie(l.type,l._source,p?p.type:null);xr.setExtraStackFrame(x)}else xr.setExtraStackFrame(null)}var Bt;Bt=!1;function Yt(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function Sr(){{if(It.current){var l=N(It.current.type);if(l)return`
256
-
257
- Check the render method of \``+l+"`."}return""}}function Dn(l){{if(l!==void 0){var p=l.fileName.replace(/^.*[\\\/]/,""),x=l.lineNumber;return`
258
-
259
- Check your code at `+p+":"+x+"."}return""}}var wr={};function $n(l){{var p=Sr();if(!p){var x=typeof l=="string"?l:l.displayName||l.name;x&&(p=`
260
-
261
- Check the top-level render call using <`+x+">.")}return p}}function Cr(l,p){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var x=$n(p);if(wr[x])return;wr[x]=!0;var z="";l&&l._owner&&l._owner!==It.current&&(z=" It was passed a child from "+N(l._owner.type)+"."),Ke(l),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',x,z),Ke(null)}}function Er(l,p){{if(typeof l!="object")return;if(Ge(l))for(var x=0;x<l.length;x++){var z=l[x];Yt(z)&&Cr(z,p)}else if(Yt(l))l._store&&(l._store.validated=!0);else if(l){var W=y(l);if(typeof W=="function"&&W!==l.entries)for(var Q=W.call(l),V;!(V=Q.next()).done;)Yt(V.value)&&Cr(V.value,p)}}}function zn(l){{var p=l.type;if(p==null||typeof p=="string")return;var x;if(typeof p=="function")x=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===d||p.$$typeof===g))x=p.propTypes;else return;if(x){var z=N(p);Be(x,l.props,"prop",z,l)}else if(p.PropTypes!==void 0&&!Bt){Bt=!0;var W=N(p);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",W||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Hn(l){{for(var p=Object.keys(l.props),x=0;x<p.length;x++){var z=p[x];if(z!=="children"&&z!=="key"){Ke(l),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",z),Ke(null);break}}l.ref!==null&&(Ke(l),C("Invalid attribute `ref` supplied to `React.Fragment`."),Ke(null))}}function Tr(l,p,x,z,W,Q){{var V=T(l);if(!V){var B="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(B+=" 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 Ce=Dn(W);Ce?B+=Ce:B+=Sr();var ce;l===null?ce="null":Ge(l)?ce="array":l!==void 0&&l.$$typeof===e?(ce="<"+(N(l.type)||"Unknown")+" />",B=" Did you accidentally export a JSX literal instead of a component?"):ce=typeof l,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ce,B)}var he=jn(l,p,x,W,Q);if(he==null)return he;if(V){var ze=p.children;if(ze!==void 0)if(z)if(Ge(ze)){for(var qe=0;qe<ze.length;qe++)Er(ze[qe],l);Object.freeze&&Object.freeze(ze)}else C("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 Er(ze,l)}return l===n?Hn(he):zn(he),he}}function Mn(l,p,x){return Tr(l,p,x,!0)}function Rn(l,p,x){return Tr(l,p,x,!1)}var In=Rn,Bn=Mn;Rr.Fragment=n,Rr.jsx=In,Rr.jsxs=Bn}()),Rr}var mr={};/**
251
+ */var Ii;function oa(){if(Ii)return xn;Ii=1;var n=x,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(c,d,f){var u,p={},S=null,C=null;f!==void 0&&(S=""+f),d.key!==void 0&&(S=""+d.key),d.ref!==void 0&&(C=d.ref);for(u in d)r.call(d,u)&&!o.hasOwnProperty(u)&&(p[u]=d[u]);if(c&&c.defaultProps)for(u in d=c.defaultProps,d)p[u]===void 0&&(p[u]=d[u]);return{$$typeof:e,type:c,key:S,ref:C,props:p,_owner:i.current}}return xn.Fragment=t,xn.jsx=s,xn.jsxs=s,xn}var Bn={};/**
262
252
  * @license React
263
- * react-jsx-runtime.production.min.js
253
+ * react-jsx-runtime.development.js
264
254
  *
265
255
  * Copyright (c) Facebook, Inc. and its affiliates.
266
256
  *
267
257
  * This source code is licensed under the MIT license found in the
268
258
  * LICENSE file in the root directory of this source tree.
269
- */var ki;function Ts(){if(ki)return mr;ki=1;var r=v,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(c,d,h){var u,g={},E=null,P=null;h!==void 0&&(E=""+h),d.key!==void 0&&(E=""+d.key),d.ref!==void 0&&(P=d.ref);for(u in d)n.call(d,u)&&!o.hasOwnProperty(u)&&(g[u]=d[u]);if(c&&c.defaultProps)for(u in d=c.defaultProps,d)g[u]===void 0&&(g[u]=d[u]);return{$$typeof:e,type:c,key:E,ref:P,props:g,_owner:i.current}}return mr.Fragment=t,mr.jsx=a,mr.jsxs=a,mr}process.env.NODE_ENV==="production"?Ts():Es();const xe=new gt;let vn,_i;function Ai(){const[r]=vt("ndmvrInputDevice"),e=v.useRef(),[t,n]=v.useState(0),[i,o]=v.useState(null),[a,c]=v.useState(null),[d,h]=v.useState(null),[u,g]=v.useState(null);vn=t;const[E,P]=v.useState({xPos:0,yPos:0,zPos:0,absoluteContent:0}),[A,S]=v.useState(1),y=v.useContext(yt),{source:_,theme:C,range:$,scene:D}=y.stores,[b,G]=v.useState([]),[O,I]=v.useState([]),[X,T]=v.useState([]),[ee,F]=v.useState([]);v.useEffect(()=>{const w=_!=null&&_.getOptions().length?_==null?void 0:_.getOptions():[];G(w)},[y]),v.useEffect(()=>{const w=C!=null&&C.getOptions().length?C==null?void 0:C.getOptions():[];I(w)},[y]),v.useEffect(()=>{const w=$!=null&&$.getOptions().length?$==null?void 0:$.getOptions():[];T(w)},[y]),v.useEffect(()=>{const w=D!=null&&D.getOptions().length?D==null?void 0:D.getOptions():[];F(w)},[y]),v.useEffect(()=>(_i=xe.subscribe(N),()=>_i.unsubscribe()),[b,O,X,ee]),v.useEffect(()=>{},[t]),v.useEffect(()=>{_&&i&&_.executeFunction(0,i)},[i]),v.useEffect(()=>{C&&a&&C.executeFunction(0,a)},[a]),v.useEffect(()=>{$&&d&&$.executeFunction(0,d)},[d]),v.useEffect(()=>{D&&u&&D.executeFunction(0,u)},[u]);const N=w=>{typeof w=="number"?w+1<=q.length&&(n(w),vn=t):w.changeTabletState?e.current.changeTabletDisplayHandler("switch"):w.binData?E!==w.binData&&P(w.binData):w.tool?(w.tool==="next"&&n(m=>m===q.length-1?0:m+1),w.tool==="prev"&&n(m=>m===0?q.length-1:m-1)):w.source?(w.source==="next"&&o(m=>b.indexOf(m)===b.length-1?b[0]:b[b.indexOf(m)+1]),w.source==="prev"&&o(m=>b.indexOf(m)===0?b[b.length-1]:b[b.indexOf(m)-1])):w.scale?K(w.scale):w.theme?(w.theme==="next"&&c(m=>O.indexOf(m)===O.length-1?O[0]:O[O.indexOf(m)+1]),w.theme==="prev"&&c(m=>O.indexOf(m)===0?O[O.length-1]:O[O.indexOf(m)-1])):w.range?(w.range==="next"&&h(m=>X.indexOf(m)===X.length-1?X[0]:X[X.indexOf(m)+1]),w.range==="prev"&&h(m=>X.indexOf(m)===0?X[X.length-1]:X[X.indexOf(m)-1])):w.scene&&(w.scene==="next"&&g(m=>ee.indexOf(m)===ee.length-1?ee[0]:ee[ee.indexOf(m)+1]),w.scene==="prev"&&g(m=>ee.indexOf(m)===0?ee[ee.length-1]:ee[ee.indexOf(m)-1]))},L=()=>{switch(t){case 0:return f.jsx(v.Fragment,{children:f.jsx("a-text",{value:`Selected bin:
259
+ */var Mi;function sa(){return Mi||(Mi=1,process.env.NODE_ENV!=="production"&&function(){var n=x,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),j=Symbol.iterator,b="@@iterator";function m(l){if(l===null||typeof l!="object")return null;var g=j&&l[j]||l[b];return typeof g=="function"?g:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(l){{for(var g=arguments.length,E=new Array(g>1?g-1:0),$=1;$<g;$++)E[$-1]=arguments[$];z("error",l,E)}}function z(l,g,E){{var $=k.ReactDebugCurrentFrame,Z=$.getStackAddendum();Z!==""&&(g+="%s",E=E.concat([Z]));var ee=E.map(function(X){return String(X)});ee.unshift("Warning: "+g),Function.prototype.apply.call(console[l],console,ee)}}var O=!1,v=!1,U=!1,P=!1,I=!1,Y;Y=Symbol.for("react.module.reference");function A(l){return!!(typeof l=="string"||typeof l=="function"||l===r||l===o||I||l===i||l===f||l===u||P||l===C||O||v||U||typeof l=="object"&&l!==null&&(l.$$typeof===S||l.$$typeof===p||l.$$typeof===s||l.$$typeof===c||l.$$typeof===d||l.$$typeof===Y||l.getModuleId!==void 0))}function V(l,g,E){var $=l.displayName;if($)return $;var Z=g.displayName||g.name||"";return Z!==""?E+"("+Z+")":E}function L(l){return l.displayName||"Context"}function B(l){if(l==null)return null;if(typeof l.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case r:return"Fragment";case t:return"Portal";case o:return"Profiler";case i:return"StrictMode";case f:return"Suspense";case u:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case c:var g=l;return L(g)+".Consumer";case s:var E=l;return L(E._context)+".Provider";case d:return V(l,l.render,"ForwardRef");case p:var $=l.displayName||null;return $!==null?$:B(l.type)||"Memo";case S:{var Z=l,ee=Z._payload,X=Z._init;try{return B(X(ee))}catch{return null}}}return null}var W=Object.assign,K=0,J,ye,me,we,_e,Re,R;function M(){}M.__reactDisabledLog=!0;function F(){{if(K===0){J=console.log,ye=console.info,me=console.warn,we=console.error,_e=console.group,Re=console.groupCollapsed,R=console.groupEnd;var l={configurable:!0,enumerable:!0,value:M,writable:!0};Object.defineProperties(console,{info:l,log:l,warn:l,error:l,group:l,groupCollapsed:l,groupEnd:l})}K++}}function T(){{if(K--,K===0){var l={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},l,{value:J}),info:W({},l,{value:ye}),warn:W({},l,{value:me}),error:W({},l,{value:we}),group:W({},l,{value:_e}),groupCollapsed:W({},l,{value:Re}),groupEnd:W({},l,{value:R})})}K<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=k.ReactCurrentDispatcher,ne;function _(l,g,E){{if(ne===void 0)try{throw Error()}catch(Z){var $=Z.stack.trim().match(/\n( *(at )?)/);ne=$&&$[1]||""}return`
260
+ `+ne+l}}var he=!1,re;{var le=typeof WeakMap=="function"?WeakMap:Map;re=new le}function D(l,g){if(!l||he)return"";{var E=re.get(l);if(E!==void 0)return E}var $;he=!0;var Z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ee;ee=y.current,y.current=null,F();try{if(g){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(Be){$=Be}Reflect.construct(l,[],X)}else{try{X.call()}catch(Be){$=Be}l.call(X.prototype)}}else{try{throw Error()}catch(Be){$=Be}l()}}catch(Be){if(Be&&$&&typeof Be.stack=="string"){for(var N=Be.stack.split(`
261
+ `),Ce=$.stack.split(`
262
+ `),ue=N.length-1,fe=Ce.length-1;ue>=1&&fe>=0&&N[ue]!==Ce[fe];)fe--;for(;ue>=1&&fe>=0;ue--,fe--)if(N[ue]!==Ce[fe]){if(ue!==1||fe!==1)do if(ue--,fe--,fe<0||N[ue]!==Ce[fe]){var $e=`
263
+ `+N[ue].replace(" at new "," at ");return l.displayName&&$e.includes("<anonymous>")&&($e=$e.replace("<anonymous>",l.displayName)),typeof l=="function"&&re.set(l,$e),$e}while(ue>=1&&fe>=0);break}}}finally{he=!1,y.current=ee,T(),Error.prepareStackTrace=Z}var Qe=l?l.displayName||l.name:"",Pn=Qe?_(Qe):"";return typeof l=="function"&&re.set(l,Pn),Pn}function ce(l,g,E){return D(l,!1)}function H(l){var g=l.prototype;return!!(g&&g.isReactComponent)}function ie(l,g,E){if(l==null)return"";if(typeof l=="function")return D(l,H(l));if(typeof l=="string")return _(l);switch(l){case f:return _("Suspense");case u:return _("SuspenseList")}if(typeof l=="object")switch(l.$$typeof){case d:return ce(l.render);case p:return ie(l.type,g,E);case S:{var $=l,Z=$._payload,ee=$._init;try{return ie(ee(Z),g,E)}catch{}}}return""}var Ee=Object.prototype.hasOwnProperty,pe={},He=k.ReactDebugCurrentFrame;function Le(l){if(l){var g=l._owner,E=ie(l.type,l._source,g?g.type:null);He.setExtraStackFrame(E)}else He.setExtraStackFrame(null)}function Ne(l,g,E,$,Z){{var ee=Function.call.bind(Ee);for(var X in l)if(ee(l,X)){var N=void 0;try{if(typeof l[X]!="function"){var Ce=Error(($||"React class")+": "+E+" type `"+X+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof l[X]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ce.name="Invariant Violation",Ce}N=l[X](g,X,$,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ue){N=ue}N&&!(N instanceof Error)&&(Le(Z),w("%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).",$||"React class",E,X,typeof N),Le(null)),N instanceof Error&&!(N.message in pe)&&(pe[N.message]=!0,Le(Z),w("Failed %s type: %s",E,N.message),Le(null))}}}var $t=Array.isArray;function Ke(l){return $t(l)}function Ve(l){{var g=typeof Symbol=="function"&&Symbol.toStringTag,E=g&&l[Symbol.toStringTag]||l.constructor.name||"Object";return E}}function se(l){try{return De(l),!1}catch{return!0}}function De(l){return""+l}function St(l){if(se(l))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(l)),De(l)}var We=k.ReactCurrentOwner,nt={key:!0,ref:!0,__self:!0,__source:!0},wn,En,Xt;Xt={};function zr(l){if(Ee.call(l,"ref")){var g=Object.getOwnPropertyDescriptor(l,"ref").get;if(g&&g.isReactWarning)return!1}return l.ref!==void 0}function $r(l){if(Ee.call(l,"key")){var g=Object.getOwnPropertyDescriptor(l,"key").get;if(g&&g.isReactWarning)return!1}return l.key!==void 0}function Ir(l,g){if(typeof l.ref=="string"&&We.current&&g&&We.current.stateNode!==g){var E=B(We.current.type);Xt[E]||(w('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',B(We.current.type),l.ref),Xt[E]=!0)}}function Mr(l,g){{var E=function(){wn||(wn=!0,w("%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)",g))};E.isReactWarning=!0,Object.defineProperty(l,"key",{get:E,configurable:!0})}}function Hr(l,g){{var E=function(){En||(En=!0,w("%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)",g))};E.isReactWarning=!0,Object.defineProperty(l,"ref",{get:E,configurable:!0})}}var Rr=function(l,g,E,$,Z,ee,X){var N={$$typeof:e,type:l,key:g,ref:E,props:X,_owner:ee};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function Nr(l,g,E,$,Z){{var ee,X={},N=null,Ce=null;E!==void 0&&(St(E),N=""+E),$r(g)&&(St(g.key),N=""+g.key),zr(g)&&(Ce=g.ref,Ir(g,Z));for(ee in g)Ee.call(g,ee)&&!nt.hasOwnProperty(ee)&&(X[ee]=g[ee]);if(l&&l.defaultProps){var ue=l.defaultProps;for(ee in ue)X[ee]===void 0&&(X[ee]=ue[ee])}if(N||Ce){var fe=typeof l=="function"?l.displayName||l.name||"Unknown":l;N&&Mr(X,fe),Ce&&Hr(X,fe)}return Rr(l,N,Ce,Z,$,We.current,X)}}var Ut=k.ReactCurrentOwner,Cn=k.ReactDebugCurrentFrame;function Je(l){if(l){var g=l._owner,E=ie(l.type,l._source,g?g.type:null);Cn.setExtraStackFrame(E)}else Cn.setExtraStackFrame(null)}var Zt;Zt=!1;function Gt(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function Tn(){{if(Ut.current){var l=B(Ut.current.type);if(l)return`
264
+
265
+ Check the render method of \``+l+"`."}return""}}function Fr(l){{if(l!==void 0){var g=l.fileName.replace(/^.*[\\\/]/,""),E=l.lineNumber;return`
266
+
267
+ Check your code at `+g+":"+E+"."}return""}}var kn={};function Br(l){{var g=Tn();if(!g){var E=typeof l=="string"?l:l.displayName||l.name;E&&(g=`
268
+
269
+ Check the top-level render call using <`+E+">.")}return g}}function An(l,g){{if(!l._store||l._store.validated||l.key!=null)return;l._store.validated=!0;var E=Br(g);if(kn[E])return;kn[E]=!0;var $="";l&&l._owner&&l._owner!==Ut.current&&($=" It was passed a child from "+B(l._owner.type)+"."),Je(l),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,$),Je(null)}}function jn(l,g){{if(typeof l!="object")return;if(Ke(l))for(var E=0;E<l.length;E++){var $=l[E];Gt($)&&An($,g)}else if(Gt(l))l._store&&(l._store.validated=!0);else if(l){var Z=m(l);if(typeof Z=="function"&&Z!==l.entries)for(var ee=Z.call(l),X;!(X=ee.next()).done;)Gt(X.value)&&An(X.value,g)}}}function Yr(l){{var g=l.type;if(g==null||typeof g=="string")return;var E;if(typeof g=="function")E=g.propTypes;else if(typeof g=="object"&&(g.$$typeof===d||g.$$typeof===p))E=g.propTypes;else return;if(E){var $=B(g);Ne(E,l.props,"prop",$,l)}else if(g.PropTypes!==void 0&&!Zt){Zt=!0;var Z=B(g);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Z||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Lr(l){{for(var g=Object.keys(l.props),E=0;E<g.length;E++){var $=g[E];if($!=="children"&&$!=="key"){Je(l),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Je(null);break}}l.ref!==null&&(Je(l),w("Invalid attribute `ref` supplied to `React.Fragment`."),Je(null))}}function _n(l,g,E,$,Z,ee){{var X=A(l);if(!X){var N="";(l===void 0||typeof l=="object"&&l!==null&&Object.keys(l).length===0)&&(N+=" 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 Ce=Fr(Z);Ce?N+=Ce:N+=Tn();var ue;l===null?ue="null":Ke(l)?ue="array":l!==void 0&&l.$$typeof===e?(ue="<"+(B(l.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):ue=typeof l,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ue,N)}var fe=Nr(l,g,E,Z,ee);if(fe==null)return fe;if(X){var $e=g.children;if($e!==void 0)if($)if(Ke($e)){for(var Qe=0;Qe<$e.length;Qe++)jn($e[Qe],l);Object.freeze&&Object.freeze($e)}else w("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 jn($e,l)}return l===r?Lr(fe):Yr(fe),fe}}function Vr(l,g,E){return _n(l,g,E,!0)}function Wr(l,g,E){return _n(l,g,E,!1)}var Xr=Wr,Ur=Vr;Bn.Fragment=r,Bn.jsx=Xr,Bn.jsxs=Ur}()),Bn}process.env.NODE_ENV==="production"?oa():sa();const Se=new ft;let Ar,Hi;function Ri(){const[n]=et("ndmvrInputDevice"),e=x.useRef(),[t,r]=x.useState(0),[i,o]=x.useState(null),[s,c]=x.useState(null),[d,f]=x.useState(null),[u,p]=x.useState(null);Ar=t;const[S,C]=x.useState({xPos:0,yPos:0,zPos:0,absoluteContent:0}),[j,b]=x.useState(1),m=x.useContext(Ct),{source:k,theme:w,range:z,scene:O}=m.stores,[v,U]=x.useState([]),[P,I]=x.useState([]),[Y,A]=x.useState([]),[V,L]=x.useState([]);x.useEffect(()=>{const T=k!=null&&k.getOptions().length?k==null?void 0:k.getOptions():[];U(T)},[m]),x.useEffect(()=>{const T=w!=null&&w.getOptions().length?w==null?void 0:w.getOptions():[];I(T)},[m]),x.useEffect(()=>{const T=z!=null&&z.getOptions().length?z==null?void 0:z.getOptions():[];A(T)},[m]),x.useEffect(()=>{const T=O!=null&&O.getOptions().length?O==null?void 0:O.getOptions():[];L(T)},[m]),x.useEffect(()=>(Hi=Se.subscribe(B),()=>Hi.unsubscribe()),[v,P,Y,V]),x.useEffect(()=>{},[t]),x.useEffect(()=>{k&&i&&k.executeFunction(0,i)},[i]),x.useEffect(()=>{w&&s&&w.executeFunction(0,s)},[s]),x.useEffect(()=>{z&&d&&z.executeFunction(0,d)},[d]),x.useEffect(()=>{O&&u&&O.executeFunction(0,u)},[u]);const B=T=>{typeof T=="number"?T+1<=J.length&&(r(T),Ar=t):T.changeTabletState?e.current.changeTabletDisplayHandler("switch"):T.binData?S!==T.binData&&C(T.binData):T.tool?(T.tool==="next"&&r(y=>y===J.length-1?0:y+1),T.tool==="prev"&&r(y=>y===0?J.length-1:y-1)):T.source?(T.source==="next"&&o(y=>v.indexOf(y)===v.length-1?v[0]:v[v.indexOf(y)+1]),T.source==="prev"&&o(y=>v.indexOf(y)===0?v[v.length-1]:v[v.indexOf(y)-1])):T.scale?K(T.scale):T.theme?(T.theme==="next"&&c(y=>P.indexOf(y)===P.length-1?P[0]:P[P.indexOf(y)+1]),T.theme==="prev"&&c(y=>P.indexOf(y)===0?P[P.length-1]:P[P.indexOf(y)-1])):T.range?(T.range==="next"&&f(y=>Y.indexOf(y)===Y.length-1?Y[0]:Y[Y.indexOf(y)+1]),T.range==="prev"&&f(y=>Y.indexOf(y)===0?Y[Y.length-1]:Y[Y.indexOf(y)-1])):T.scene&&(T.scene==="next"&&p(y=>V.indexOf(y)===V.length-1?V[0]:V[V.indexOf(y)+1]),T.scene==="prev"&&p(y=>V.indexOf(y)===0?V[V.length-1]:V[V.indexOf(y)-1]))},W=()=>{switch(t){case 0:return h.jsx(x.Fragment,{children:h.jsx("a-text",{value:`Selected bin:
270
270
 
271
- Value: `+E.absoluteContent+`
272
- X: `+E.xPos+`
273
- Y: `+E.yPos+`
274
- Z: `+E.zPos,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 2:return f.jsx(v.Fragment,{children:f.jsx("a-text",{value:`Bin height changer:
271
+ Value: `+S.absoluteContent+`
272
+ X: `+S.xPos+`
273
+ Y: `+S.yPos+`
274
+ Z: `+S.zPos,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 2:return h.jsx(x.Fragment,{children:h.jsx("a-text",{value:`Bin height changer:
275
275
 
276
276
  For changing
277
277
  the visual height of bins,
278
278
  use grip + joystick on
279
- the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return f.jsx("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 f.jsxs("a-entity",{rotation:"-60 0 0",children:[f.jsx("a-text",{value:`Change source:
279
+ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return h.jsx("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 h.jsxs("a-entity",{rotation:"-60 0 0",children:[h.jsx("a-text",{value:`Change source:
280
280
 
281
- `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),b.map(k=>f.jsx("a-text",{value:k,color:k===i?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*b.indexOf(k)+" 0","wrap-count":k===i?"360":"450"},k))]});case 4:return f.jsxs("a-entity",{rotation:"-60 0 0",children:[f.jsx("a-text",{value:`Change theme:
281
+ `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),v.map(_=>h.jsx("a-text",{value:_,color:_===i?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*v.indexOf(_)+" 0","wrap-count":_===i?"360":"450"},_))]});case 4:return h.jsxs("a-entity",{rotation:"-60 0 0",children:[h.jsx("a-text",{value:`Change theme:
282
282
 
283
- `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),O.map(k=>f.jsx("a-plane",{position:"0.15 "+-.025*O.indexOf(k)+" 0",height:"0.02",width:"0.1",interaction:!0,class:"clickable",children:f.jsx("a-text",{value:k,position:"-0.05 0 0.002",color:k===a?"white":"#A6ACAF",rotation:"0 0 0","wrap-count":k===a?"360":"450"},k)}))]});case 5:return f.jsxs("a-entity",{rotation:"-60 0 0",children:[f.jsx("a-text",{value:`Change range:
283
+ `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),P.map(_=>h.jsx("a-plane",{position:"0.15 "+-.025*P.indexOf(_)+" 0",height:"0.02",width:"0.1",interaction:!0,class:"clickable",children:h.jsx("a-text",{value:_,position:"-0.05 0 0.002",color:_===s?"white":"#A6ACAF",rotation:"0 0 0","wrap-count":_===s?"360":"450"},_)}))]});case 5:return h.jsxs("a-entity",{rotation:"-60 0 0",children:[h.jsx("a-text",{value:`Change range:
284
284
 
285
- `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),X.map(k=>f.jsx("a-text",{value:k,color:k===d?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*X.indexOf(k)+" 0","wrap-count":k===d?"360":"450"},k))]});case 6:const w=15,m=Math.ceil(ee.length/w),re=[];for(let k=0;k<m;k++){const fe=k*w,ne=fe+w,ae=ee.slice(fe,ne),j=f.jsx("a-entity",{position:`${k*.3} 0 0`,children:ae.map(le=>f.jsx("a-text",{value:le,color:le===u?"white":"#A6ACAF",rotation:"0 0 0",position:`0.1 ${-.025*ae.indexOf(le)} 0`,"wrap-count":le===u?"360":"450"},le))},`column-${k}`);re.push(j)}return f.jsxs("a-entity",{rotation:"-60 0 0",children:[f.jsx("a-text",{value:"Change scene:",rotation:"0 0 0",position:"0.1 +0.035 0","wrap-count":"450"}),re]});default:return f.jsx("a-text",{value:`This tool does not have
286
- an interface for Oculus Tablet`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})}};function K(w){S(m=>{let re,k=0;return w<0?(m-.01).toFixed(2)>=.01&&((m-.01).toFixed(2)>.7?k=-.1:(m-.01).toFixed(2)>.1?k=-.01:k=-.001):(m+.01).toFixed(2)>.7?k=.1:(m-.01).toFixed(2)>.1?k=.01:k=.001,re=m+k,$e.changeHistogramScale(k,"TH2"),nt.changeHistogramScale(k,"TH1"),re})}const q=[{fun:ye(),name:"Bin Info"},{fun:me(),name:"Scale Z axis"},{fun:Se(),name:"Change Data"},{fun:Ae(),name:"Change Theme"},{fun:Ie(),name:"Change Range"},{fun:R(),name:"Change Scene"},{fun:null,name:"Tool with a longer name"}];function ye(){if(r!=="oculus")return f.jsx(v.Fragment,{children:f.jsx("table",{style:{width:"100%"},children:f.jsxs("tbody",{children:[f.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[f.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[f.jsx("i",{children:"value:"})," "]}),f.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:E.absoluteContent})]}),f.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[f.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[f.jsx("i",{children:"x:"})," "]}),f.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:E.xPos})]}),f.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[f.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[f.jsx("i",{children:"y:"})," "]}),f.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:E.yPos})]}),f.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[f.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[f.jsx("i",{children:"z:"})," "]}),f.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:E.zPos})]})]})})})}function me(){let w=.01,m=2;return(A-.01).toFixed(2)>.1&&(w=.1,m=1),f.jsx(v.Fragment,{children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[f.jsx(wi,{onClick:()=>{(A+.01).toFixed(2)>.1&&(w=.1,m=1),S(A+w),$e.changeHistogramScale(w,"TH2"),nt.changeHistogramScale(w,"TH1")},children:"+"}),f.jsx("h1",{style:{fontSize:"5em",fontWeight:"bold"},children:A.toFixed(m)}),f.jsx(wi,{onClick:()=>{(A-.01).toFixed(2)>=.01&&(S(A-w),$e.changeHistogramScale(-w,"TH2"),nt.changeHistogramScale(-w,"TH1"))},children:"-"})]})})}function Se(){return f.jsx("div",{style:{display:"flex",flexDirection:"column"},children:b.map(w=>w===i?f.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>o(w),children:w},w):f.jsx("a",{onClick:()=>o(w),children:w},w))})}function Ae(){return f.jsx("div",{style:{display:"flex",flexDirection:"column"},children:O.map(w=>w===a?f.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>c(w),children:w},w):f.jsx("a",{onClick:()=>c(w),children:w},w))})}function Ie(){return f.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"7.5rem"},children:X.map(w=>w===d?f.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>h(w),children:w},w):f.jsx("a",{onClick:()=>h(w),children:w},w))})}function R(){return f.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"16.5rem"},children:ee.map(w=>w===u?f.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>g(w),children:w},w):f.jsx("a",{onClick:()=>g(w),children:w},w))})}document.getElementById("desktop--tablet--container")&&H(document.getElementById("desktop--tablet--container"));function H(w){let m=0,re=0,k=0,fe=0;document.getElementById(w.id+"--header")?document.getElementById(w.id+"--header").onmousedown=ne:w.onmousedown=ne;function ne(le){le.preventDefault(),k=le.clientX,fe=le.clientY,document.onmouseup=j,document.onmousemove=ae}function ae(le){le.preventDefault(),m=k-le.clientX,re=fe-le.clientY,k=le.clientX,fe=le.clientY,w.style.top=w.offsetTop-re+"px",w.style.left=w.offsetLeft-m+"px"}function j(){document.onmouseup=null,document.onmousemove=null}}const Y=w=>{n(w)};return r!=="oculus"?f.jsx(xs,{tools:q,activeToolLocal:t,ref:e,changeActiveToolLocalHandler:Y}):f.jsx(v.Fragment,{children:L()})}const jt=()=>vn;function xn(r,e,t){r.face.normal.x!==0?(e.setAttribute("material","color",e.userData.axisZ),ur.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Z",id:e.userData.histogramName})):r.face.normal.y!==0?(e.setAttribute("material","color",e.userData.axisY),ur.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Y",id:e.userData.histogramName})):(e.setAttribute("material","color",e.userData.axisX),ur.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"X",id:e.userData.histogramName})),e.setAttribute("material","opacity","0.75")}be.registerComponent("mouseevent",{init:function(){let r;const e=this.el;let t=0;e.addEventListener("mouseenter",function(i){const o=i.detail.intersection;r=Or.getKeyboardEvent().subscribe(a=>{a?(this.userData.markedColor=this.userData.selectColor,this.setAttribute("material","opacity","0.70"),Kn.showBinProjection(this.userData)):(Ln.deleteBinFromLocalStorage(this.userData),this.userData.markedColor=this.userData.color,this.setAttribute("material","opacity","0.50"))}),xn(o,this,"HOVER")}),e.addEventListener("mouseleave",function(){r.unsubscribe(),this.setAttribute("material","color",this.userData.markedColor),this.setAttribute("material","opacity","0.50"),t=0}),e.addEventListener("click",function(i){if(t=t+1,setTimeout(()=>{t=0},600),t===2){t=0,this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1");const a=i.detail.intersection;a&&xn(a,this,"DB_CLICK")}else if(t===1){this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1"),Kn.showBinProjection(this.userData),xe.next({binData:this.userData});const a=i.detail.intersection;a&&xn(a,this,"CLICK")}let o=document.getElementById("th2-banner");if(o===null&&(o=document.getElementById("th3-banner")),o!==null){const a=o.childNodes;if(this.userData.typeName==="TH3"&&a.length===5){const c=`[${this.userData.zTitle}] [${this.userData.zMin},${this.userData.zMax}] ${this.userData.binName!==""?this.userData.binName+`
285
+ `,rotation:"0 0 0",position:"0.1 +0.030 0","wrap-count":"450"}),Y.map(_=>h.jsx("a-text",{value:_,color:_===d?"white":"#A6ACAF",rotation:"0 0 0",position:"0.1 "+-.025*Y.indexOf(_)+" 0","wrap-count":_===d?"360":"450"},_))]});case 6:const T=15,y=Math.ceil(V.length/T),ne=[];for(let _=0;_<y;_++){const he=_*T,re=he+T,le=V.slice(he,re),D=h.jsx("a-entity",{position:`${_*.3} 0 0`,children:le.map(ce=>h.jsx("a-text",{value:ce,color:ce===u?"white":"#A6ACAF",rotation:"0 0 0",position:`0.1 ${-.025*le.indexOf(ce)} 0`,"wrap-count":ce===u?"360":"450"},ce))},`column-${_}`);ne.push(D)}return h.jsxs("a-entity",{rotation:"-60 0 0",children:[h.jsx("a-text",{value:"Change scene:",rotation:"0 0 0",position:"0.1 +0.035 0","wrap-count":"450"}),ne]});default:return h.jsx("a-text",{value:`This tool does not have
286
+ an interface for Oculus Tablet`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})}};function K(T){b(y=>{let ne,_=0;return T<0?(y-.01).toFixed(2)>=.01&&((y-.01).toFixed(2)>.7?_=-.1:(y-.01).toFixed(2)>.1?_=-.01:_=-.001):(y+.01).toFixed(2)>.7?_=.1:(y-.01).toFixed(2)>.1?_=.01:_=.001,ne=y+_,ze.changeHistogramScale(_,"TH2"),at.changeHistogramScale(_,"TH1"),ne})}const J=[{fun:ye(),name:"Bin Info"},{fun:me(),name:"Scale Z axis"},{fun:we(),name:"Change Data"},{fun:_e(),name:"Change Theme"},{fun:Re(),name:"Change Range"},{fun:R(),name:"Change Scene"},{fun:null,name:"Tool with a longer name"}];function ye(){if(n!=="oculus")return h.jsx(x.Fragment,{children:h.jsx("table",{style:{width:"100%"},children:h.jsxs("tbody",{children:[h.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[h.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[h.jsx("i",{children:"value:"})," "]}),h.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:S.absoluteContent})]}),h.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[h.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[h.jsx("i",{children:"x:"})," "]}),h.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:S.xPos})]}),h.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[h.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[h.jsx("i",{children:"y:"})," "]}),h.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:S.yPos})]}),h.jsxs("tr",{style:{display:"flex",alignItems:"flex-end"},children:[h.jsxs("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[h.jsx("i",{children:"z:"})," "]}),h.jsx("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:S.zPos})]})]})})})}function me(){let T=.01,y=2;return(j-.01).toFixed(2)>.1&&(T=.1,y=1),h.jsx(x.Fragment,{children:h.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[h.jsx(zi,{onClick:()=>{(j+.01).toFixed(2)>.1&&(T=.1,y=1),b(j+T),ze.changeHistogramScale(T,"TH2"),at.changeHistogramScale(T,"TH1")},children:"+"}),h.jsx("h1",{style:{fontSize:"5em",fontWeight:"bold"},children:j.toFixed(y)}),h.jsx(zi,{onClick:()=>{(j-.01).toFixed(2)>=.01&&(b(j-T),ze.changeHistogramScale(-T,"TH2"),at.changeHistogramScale(-T,"TH1"))},children:"-"})]})})}function we(){return h.jsx("div",{style:{display:"flex",flexDirection:"column"},children:v.map(T=>T===i?h.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>o(T),children:T},T):h.jsx("a",{onClick:()=>o(T),children:T},T))})}function _e(){return h.jsx("div",{style:{display:"flex",flexDirection:"column"},children:P.map(T=>T===s?h.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>c(T),children:T},T):h.jsx("a",{onClick:()=>c(T),children:T},T))})}function Re(){return h.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"7.5rem"},children:Y.map(T=>T===d?h.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>f(T),children:T},T):h.jsx("a",{onClick:()=>f(T),children:T},T))})}function R(){return h.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"16.5rem"},children:V.map(T=>T===u?h.jsx("a",{style:{fontFamily:"Open Sans",fontSize:"17px",fontWeight:"600",color:"black"},onClick:()=>p(T),children:T},T):h.jsx("a",{onClick:()=>p(T),children:T},T))})}document.getElementById("desktop--tablet--container")&&M(document.getElementById("desktop--tablet--container"));function M(T){let y=0,ne=0,_=0,he=0;document.getElementById(T.id+"--header")?document.getElementById(T.id+"--header").onmousedown=re:T.onmousedown=re;function re(ce){ce.preventDefault(),_=ce.clientX,he=ce.clientY,document.onmouseup=D,document.onmousemove=le}function le(ce){ce.preventDefault(),y=_-ce.clientX,ne=he-ce.clientY,_=ce.clientX,he=ce.clientY,T.style.top=T.offsetTop-ne+"px",T.style.left=T.offsetLeft-y+"px"}function D(){document.onmouseup=null,document.onmousemove=null}}const F=T=>{r(T)};return n!=="oculus"?h.jsx(Js,{tools:J,activeToolLocal:t,ref:e,changeActiveToolLocalHandler:F}):h.jsx(x.Fragment,{children:W()})}const Ft=()=>Ar;function jr(n,e,t){n.face.normal.x!==0?(e.setAttribute("material","color",e.userData.axisZ),gn.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Z",id:e.userData.histogramName})):n.face.normal.y!==0?(e.setAttribute("material","color",e.userData.axisY),gn.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Y",id:e.userData.histogramName})):(e.setAttribute("material","color",e.userData.axisX),gn.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"X",id:e.userData.histogramName})),e.setAttribute("material","opacity","0.75")}ve.registerComponent("mouseevent",{init:function(){let n;const e=this.el;let t=0;e.addEventListener("mouseenter",function(i){const o=i.detail.intersection;n=$n.getKeyboardEvent().subscribe(s=>{s?(this.userData.markedColor=this.userData.selectColor,this.setAttribute("material","opacity","0.70"),ai.showBinProjection(this.userData)):(Kr.deleteBinFromLocalStorage(this.userData),this.userData.markedColor=this.userData.color,this.setAttribute("material","opacity","0.50"))}),jr(o,this,"HOVER")}),e.addEventListener("mouseleave",function(){n.unsubscribe(),this.setAttribute("material","color",this.userData.markedColor),this.setAttribute("material","opacity","0.50"),t=0}),e.addEventListener("click",function(i){if(t=t+1,setTimeout(()=>{t=0},600),t===2){t=0,this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1");const s=i.detail.intersection;s&&jr(s,this,"DB_CLICK")}else if(t===1){this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1"),ai.showBinProjection(this.userData),Se.next({binData:this.userData});const s=i.detail.intersection;s&&jr(s,this,"CLICK")}let o=document.getElementById("th2-banner");if(o===null&&(o=document.getElementById("th3-banner")),o!==null){const s=o.childNodes;if(this.userData.typeName==="TH3"&&s.length===5){const c=`[${this.userData.zTitle}] [${this.userData.zMin},${this.userData.zMax}] ${this.userData.binName!==""?this.userData.binName+`
287
287
  `:`
288
288
  `}`,d=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
289
289
  `:`
290
- `}`,h=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
290
+ `}`,f=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
291
291
  `:`
292
292
  `}`,u=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
293
- `;a[0].setAttribute("text",`value: ${u}; color: ${this.userData.color}; align: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${d}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${h}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`),a[3].setAttribute("text",`value: ${c}; color: ${this.userData.axisZ}; align: center; width: 30; height: auto;`)}else{const c=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
293
+ `;s[0].setAttribute("text",`value: ${u}; color: ${this.userData.color}; align: center; width: 30; height: auto;`),s[1].setAttribute("text",`value: ${d}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),s[2].setAttribute("text",`value: ${f}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`),s[3].setAttribute("text",`value: ${c}; color: ${this.userData.axisZ}; align: center; width: 30; height: auto;`)}else{const c=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
294
294
  `,d=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
295
295
  `:`
296
- `}`,h=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
296
+ `}`,f=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
297
297
  `:`
298
- `}`;a[0].setAttribute("text",`value: ${c}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${d}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${h}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`)}}})},update:function(){const r=this.el;r.setAttribute("material","color",r.userData.markedColor),r.setAttribute("material","opacity","0.75")}}),be.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 r=this.el;r.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 r=this.el;r.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 Wt{constructor(){Z(this,Pe,void 0);Re(this,"verticalMoveCamera",(e,t)=>{if(s(this,Pe)===null&&U(this,Pe,document.getElementById("cameraRig")),s(this,Pe)!==null){const n=new THREE.Vector3,i=s(this,Pe).object3D.position.clone();e?(n.copy(i).add(new THREE.Vector3(0,+t,0)),s(this,Pe).object3D.position.lerp(n,.5)):s(this,Pe).object3D.position.y>3&&(n.copy(i).add(new THREE.Vector3(0,-t,0)),s(this,Pe).object3D.position.lerp(n,.5))}});Re(this,"horizontalMoveCamera",(e,t,n)=>{s(this,Pe)===null&&U(this,Pe,document.getElementById("cameraRig")),s(this,Pe)!==null&&(t?s(this,Pe).object3D.position[e]+=n:s(this,Pe).object3D.position[e]-=n)});Re(this,"horizontalDiagonalMoveCamera",(e,t,n,i)=>{if(s(this,Pe)===null&&U(this,Pe,document.getElementById("cameraRig")),s(this,Pe)!==null){const o=new THREE.Vector3;o[e]=Math.cos(Math.PI/4),o[t]=Math.sin(Math.PI/4),o.normalize(),n?s(this,Pe).object3D.position.addScaledVector(o,i):s(this,Pe).object3D.position.addScaledVector(o,-i)}});Z(this,et,(e,t,n)=>{if(s(this,Pe)!==null&&e!==null){const i=e.object3D.position.x+1*e.object3D.position.x,o=e.object3D.position.z+1*e.object3D.position.z,a=t;s(this,Pe).setAttribute("animation",`property: position; to: ${i+1} ${a} ${o+1}; dur: 100;`),s(this,Pe).setAttribute("animation__1",`property: rotation; to: ${s(this,Pe).object3D.rotation.x} ${n} ${s(this,Pe).object3D.rotation.z}; dur: 100;`)}});Re(this,"setCameraPosition",e=>{if(s(this,Pe)!==null){let t=s(this,Pe).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const n=e.xOffset+e.xOffset,i=e.yOffset+e.yOffset;setTimeout(()=>{s(this,Pe).setAttribute("animation",`property: position; to: ${n-3} ${t} ${i-3}; dur: 40;`)},1800)}});Re(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&s(this,et).call(this,e,0,180)});Re(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&s(this,et).call(this,e,0,0)});Re(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&s(this,et).call(this,e,0,90)});Re(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&s(this,et).call(this,e,0,270)});Re(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&s(this,et).call(this,e,10,180)});Re(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&s(this,et).call(this,e,10,0)});Re(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&s(this,et).call(this,e,10,90)});Re(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&s(this,et).call(this,e,10,270)});U(this,Pe,document.getElementById("cameraRig"))}getCurrentPosRot(){const e=document.getElementById("camera"),t=document.getElementById("cameraRig");return{position:{x:e.object3D.position.x+t.object3D.position.x,y:e.object3D.position.y+t.object3D.position.y,z:e.object3D.position.z+t.object3D.position.z},rotation:{x:e.object3D.rotation.x+t.object3D.rotation.x,y:e.object3D.rotation.y+t.object3D.rotation.y,z:e.object3D.rotation.z+t.object3D.rotation.z}}}calculateDefaultPosRot(e,t){if(Ei(e)){const i=t.data.histogram.fXaxis.fNbins>t.states.range?t.states.range:t.data.histogram.fXaxis.fNbins,o=t.data.histogram.fYaxis.fNbins>t.states.range?t.states.range:t.data.histogram.fYaxis.fNbins;return{position:{x:((i*1-.5)*(-2*1)-1*3/4)/2,y:8+o/2,z:-4},rotation:{x:0,y:0,z:0}}}if(e)return e}parsePosition(e){var t;if(!(!e||((t=e.position)==null?void 0:t.x)===void 0))return e.position=e.position.x+" "+e.position.y+" "+e.position.z,e}setCameraRotation(e){const t=document.getElementById("camera");t.components["look-controls"].pitchObject.rotation.set(-.9,0,0),t.components["look-controls"].yawObject.rotation.set(0,3.14159265,0),e!=null&&e.x&&t.components["look-controls"].pitchObject.rotation.set(e.x,0,0),e!=null&&e.y&&t.components["look-controls"].yawObject.rotation.set(0,e.y,0)}}Pe=new WeakMap,et=new WeakMap;class ks{constructor(){Z(this,wt,void 0);U(this,wt,new gt)}setVisibilityOfBanners(e){s(this,wt).next({device:e})}shiftBanners(){s(this,wt).next("shift")}setUserState(){s(this,wt).next("show")}getCameraSubject(){return s(this,wt).asObservable()}}wt=new WeakMap;const Dt=new ks,ut={};let Sn=new Wt,wn,xt,Ir=!1;xe.next({changeTabletState:Ir});const Cn=(r,e)=>{let t=.2;r.name==="scale"?t=.01:r.name==="rotation"&&(t=2),e.key==="ArrowDown"?r.xValue=r.xValue+t:e.key==="ArrowUp"?r.xValue=r.xValue-t:e.key==="="?r.yValue=r.yValue+t:e.key==="-"?r.yValue=r.yValue-t:e.key==="ArrowRight"?r.zValue=r.zValue+t:e.key==="ArrowLeft"&&(r.zValue=r.zValue-t),wn.setAttribute(r.name,`${r.xValue} ${r.yValue} ${r.zValue}`)},_s=r=>{r.key==="k"||r.key==="K"?($e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),He.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):r.key==="i"||r.key==="I"?($e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),He.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):r.key==="u"||r.key==="U"?He.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):r.key==="o"||r.key==="O"?He.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):r.key==="j"||r.key==="j"?(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),$e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),He.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(r.key==="l"||r.key==="L")&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),$e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),He.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},As=r=>{r.key==="k"||r.key==="K"?($e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),He.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):r.key==="i"||r.key==="I"?($e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),He.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):r.key==="u"||r.key==="U"?He.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):r.key==="o"||r.key==="O"?He.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):r.key==="l"||r.key==="L"?($e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),He.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)):(r.key==="j"||r.key==="J")&&($e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),He.changeHistogramSectionByOffset("xOffset","TH3",fal,!1))},Br=r=>{ut[r.key]=!0,(ut.Z||ut.z)&&Cn(xt[0],r),(ut.X||ut.x)&&Cn(xt[1],r),(ut.C||ut.c)&&Cn(xt[2],r),ut.Shift&&As(r),_s(r),(r.key==="e"||r.key==="E")&&Sn.verticalMoveCamera(!0,.3),(r.key==="q"||r.key==="Q")&&Sn.verticalMoveCamera(!1,.3),r.key==="1"&&xe.next(0),r.key==="2"&&xe.next(1),r.key==="3"&&xe.next(2),r.key==="4"&&xe.next(3),r.key==="5"&&xe.next(4),r.key==="6"&&xe.next(5),r.key==="7"&&xe.next(6),r.key==="8"&&xe.next(7),r.key==="9"&&xe.next(8),r.key==="0"&&xe.next(9),r.key==="Enter"&&ur.emmitCommand("REFRESH"),(r.key==="t"||r.key==="T")&&(Ir=!Ir,Ir?xe.next({changeTabletState:"flex"}):xe.next({changeTabletState:"none"})),r.key==="r"||r.key,(r.key==="m"||r.key==="M")&&$e.changeHistogramFunction("feet","TH2"),(r.key==="n"||r.key==="N")&&$e.changeHistogramFunction("default","TH2"),(r.key==="c"||r.key==="C")&&Dt.setUserState(),(r.key==="v"||r.key==="V")&&Dt.setVisibilityOfBanners("keyboard"),(r.key==="x"||r.key==="X")&&Dt.shiftBanners()},Yr=r=>{delete ut[r.key]},Pi=(r,e)=>{wn=e,xt=[r.position,r.scale,r.rotation];for(let t=0;t<3;t++)wn.setAttribute(xt[t].name,`${xt[t].xValue} ${xt[t].yValue} ${xt[t].zValue}`)},Oi=()=>{Sn=new Wt};be.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 r=this.el;Pi(this.schema,r),document.querySelector("a-scene").addEventListener("mouseover",function(){document.addEventListener("keydown",Br),document.addEventListener("keyup",Yr)}),document.querySelector("a-scene").addEventListener("mouseout",function(){document.removeEventListener("keydown",Br),document.removeEventListener("keyup",Yr)})},update:function(){Oi()}}),be.registerComponent("label-handler",{schema:{value:{type:"string"},delay:{type:"number"}},init:function(){const r=this.el;this.value=this.data.value,r.setAttribute("text","value",this.data.value)},update:function(){const r=this.el;this.value!==this.data.value&&(setTimeout(()=>{r.setAttribute("text","value",this.data.value)},this.data.delay),this.value=this.data.value)}});const Ne={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 ji{constructor(e){Ne[e]?(this.xAxis=Ne[e].axis.x,this.yAxis=Ne[e].axis.y,this.zAxis=Ne[e].axis.z,this.palette=Ne[e].colorPalette,this.primaryAccent=Ne[e].accent.primary,this.secondaryAccent=Ne[e].accent.secondary,this.primaryFont=Ne[e].font.primary,this.secondaryFont=Ne[e].font.secondary):(this.xAxis=Ne.def.axis.x,this.yAxis=Ne.def.axis.y,this.zAxis=Ne.def.axis.z,this.palette=Ne.def.colorPalette,this.primaryAccent=Ne.def.accent.primary,this.secondaryAccent=Ne.def.accent.secondary,this.primaryFont=Ne.def.font.primary,this.secondaryFont=Ne.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 n=this.palette[0];if(e>=1)return this.palette[9];const i=.12;let o=i;for(let a=0;a<=9;a++){if(e<=o){n=this.palette[a];break}o+=i}return n}}class Ps{constructor(e,t,n,i,o,a,c,d){Z(this,tr);Z(this,Oe,"");Z(this,gr,[]);Z(this,te,null);Z(this,ot,"");Z(this,oe,null);Z(this,ge,1);Z(this,ve,1);Z(this,J,1);Z(this,Xe,0);Z(this,Ze,0);Z(this,st,0);Z(this,ft,1);Z(this,Ct,1);Z(this,yr,1);Z(this,je,8);Z(this,We,{xInitial:0,yInitial:0,zInitial:0});Z(this,at,void 0);Z(this,lt,void 0);Z(this,Et,1);Z(this,ht,1);Z(this,Ht,0);Z(this,Zt,2);Z(this,Mt,4);Z(this,ue,{xOffset:0,yOffset:0,zOffset:0});Z(this,Tt,[]);Re(this,"getXOffset",()=>s(this,ge));Re(this,"getYOffset",()=>s(this,ve));Re(this,"getZOffset",()=>s(this,J));Re(this,"getContentScale",()=>s(this,ht));Re(this,"getRange",()=>s(this,je));Z(this,pt,(e,t)=>{let n=e>t-s(this,je)?t-s(this,je):e;return n<1&&(n=1),n});Z(this,Gt,e=>s(this,gr).filter(n=>n.id===e).length!==0);Z(this,tt,(e,t,n,i,o,a,c,d,h,u,g,E,P)=>({key:e+s(this,Oe),axis:t,geometry:{primitive:"plane",width:h,height:u},text:{color:P,width:4,height:"auto"},labelHandler:{value:g,delay:500},rotation:{x:a,y:c,z:d},material:{color:E},animation:{fromX:n-s(this,ue).xOffset,fromY:i+s(this,ue).zOffset,fromZ:o+s(this,ue).yOffset,toX:n,toY:i,toZ:o}}));Z(this,Lr,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,n,i,o,a,c,d,h,u,g,E,P;const A="";let S,y=0;const _=s(this,ge)+s(this,je)>s(this,Xe)?s(this,Xe):s(this,ge)+s(this,je),C=s(this,ve)+s(this,je)>s(this,Ze)?s(this,Ze):s(this,ve)+s(this,je),$=s(this,J)+s(this,je)>s(this,st)?s(this,st):s(this,J)+s(this,je),D=s(this,te).fXaxis.fTitle,b=s(this,te).fYaxis.fTitle,G=s(this,te).fZaxis.fTitle,O=s(this,te).fXaxis.fLabels?s(this,te).fXaxis.fLabels.arr:[],I=s(this,te).fYaxis.fLabels?s(this,te).fYaxis.fLabels.arr:[],X=s(this,te).fZaxis.fLabels?s(this,te).fZaxis.fLabels.arr:[],T=[];for(let N=s(this,J);N<=$;N++)for(let L=s(this,ve);L<=C;L++)for(let K=s(this,ge);K<=_;K++){t=s(this,te).fXaxis.GetBinCenter(K),n=s(this,te).fXaxis.GetBinLowEdge(K),i=t+(t-n),o=i-n,a=s(this,te).fYaxis.GetBinCenter(L),c=s(this,te).fYaxis.GetBinLowEdge(L),d=a+(a-c),h=d-c,u=s(this,te).fZaxis.GetBinCenter(N),g=s(this,te).fZaxis.GetBinLowEdge(N),E=u+(u-g),P=E-g;const q=s(this,Kt).call(this,s(this,te).getBinContent(K,L,N));if(q<=s(this,Ht))continue;S=s(this,lt)?s(this,nr).call(this,s(this,lt).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:K,y:L,z:N})):q;let ye=S;S<.15&&(ye=.15);let me=s(this,at)?s(this,at).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:K,y:L,z:N,content:S}):null;me=me||s(this,oe).getBinColor(S);const Se=s(this,Oe)+n+"th3"+i+"th3"+g+"th3"+E+"th3"+c+"th3"+d;let Ae;s(this,Gt).call(this,Se)?Ae=s(this,oe).getSecondaryAccentColor():Ae=me;const Ie=`id: ${Se};
299
- histogramName: ${s(this,Oe)};
298
+ `}`;s[0].setAttribute("text",`value: ${c}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),s[1].setAttribute("text",`value: ${d}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),s[2].setAttribute("text",`value: ${f}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`)}}})},update:function(){const n=this.el;n.setAttribute("material","color",n.userData.markedColor),n.setAttribute("material","opacity","0.75")}}),ve.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 n=this.el;n.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 n=this.el;n.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 kt{constructor(){q(this,be,void 0);q(this,tt,void 0);Ie(this,"verticalMoveCamera",(e,t)=>{if(a(this,be)===null&&G(this,be,document.getElementById("cameraRig")),a(this,be)!==null){const r=new THREE.Vector3,i=a(this,be).object3D.position.clone();e?(r.copy(i).add(new THREE.Vector3(0,+t,0)),a(this,be).object3D.position.lerp(r,.5)):a(this,be).object3D.position.y>3&&(r.copy(i).add(new THREE.Vector3(0,-t,0)),a(this,be).object3D.position.lerp(r,.5))}});Ie(this,"horizontalMoveCamera",(e,t,r)=>{a(this,be)===null&&G(this,be,document.getElementById("cameraRig")),a(this,be)!==null&&(t?a(this,be).object3D.position[e]+=r:a(this,be).object3D.position[e]-=r)});Ie(this,"horizontalMoveCameraLocal",(e,t,r)=>{if(a(this,be)!==null){let i=new THREE.Vector2(e,t),o=a(this,tt).object3D.rotation.y;i.rotateAround(new THREE.Vector3(0,0),-o),i.normalize(),i.multiplyScalar(r),a(this,be).object3D.position.x+=i.x,a(this,be).object3D.position.z+=i.y}});Ie(this,"horizontalDiagonalMoveCamera",(e,t,r,i)=>{if(a(this,be)===null&&G(this,be,document.getElementById("cameraRig")),a(this,be)!==null){const o=new THREE.Vector3;o[e]=Math.cos(Math.PI/4),o[t]=Math.sin(Math.PI/4),o.normalize(),r?a(this,be).object3D.position.addScaledVector(o,i):a(this,be).object3D.position.addScaledVector(o,-i)}});q(this,it,(e,t,r)=>{if(a(this,be)!==null&&e!==null){const i=e.object3D.position.x+1*e.object3D.position.x,o=e.object3D.position.z+1*e.object3D.position.z,s=t;a(this,be).setAttribute("animation",`property: position; to: ${i+1} ${s} ${o+1}; dur: 100;`),a(this,be).setAttribute("animation__1",`property: rotation; to: ${a(this,be).object3D.rotation.x} ${r} ${a(this,be).object3D.rotation.z}; dur: 100;`)}});Ie(this,"setCameraPosition",e=>{if(a(this,be)!==null){let t=a(this,be).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const r=e.xOffset+e.xOffset,i=e.yOffset+e.yOffset;setTimeout(()=>{a(this,be).setAttribute("animation",`property: position; to: ${r-3} ${t} ${i-3}; dur: 40;`)},1800)}});Ie(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&a(this,it).call(this,e,0,180)});Ie(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&a(this,it).call(this,e,0,0)});Ie(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&a(this,it).call(this,e,0,90)});Ie(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&a(this,it).call(this,e,0,270)});Ie(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&a(this,it).call(this,e,10,180)});Ie(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&a(this,it).call(this,e,10,0)});Ie(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&a(this,it).call(this,e,10,90)});Ie(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&a(this,it).call(this,e,10,270)});G(this,be,document.getElementById("cameraRig")),G(this,tt,document.getElementById("camera"))}getCurrentPosRot(){const e=document.getElementById("camera"),t=document.getElementById("cameraRig");return{position:{x:e.object3D.position.x+t.object3D.position.x,y:e.object3D.position.y+t.object3D.position.y,z:e.object3D.position.z+t.object3D.position.z},rotation:{x:e.object3D.rotation.x+t.object3D.rotation.x,y:e.object3D.rotation.y+t.object3D.rotation.y,z:e.object3D.rotation.z+t.object3D.rotation.z}}}calculateDefaultPosRot(e,t){if(kr(e)){const i=t.states.range||5,o=t.data.histogram.fXaxis.fNbins>i?i:t.data.histogram.fXaxis.fNbins,s=t.data.histogram.fYaxis.fNbins>i?i:t.data.histogram.fYaxis.fNbins;return t.data.histogram.fZaxis.fNbins>i||t.data.histogram.fZaxis.fNbins,{position:{x:((o*1-.5)*(-2*1)-1*3/4)/2,y:8+s/2,z:-7},rotation:{x:-.5,y:3,z:0}}}if(e)return e}parsePosition(e){var t;if(!(!e||((t=e.position)==null?void 0:t.x)===void 0))return e.position=e.position.x+" "+e.position.y+" "+e.position.z,e}setCameraRotation(e){if(!a(this,tt))return;const t=e||{x:-.4,y:3,z:0};a(this,tt).setAttribute("look-controls","magicWindowTrackingEnabled","false"),a(this,tt).components["look-controls"].pitchObject.rotation.set(-.9,0,0),a(this,tt).components["look-controls"].yawObject.rotation.set(0,3.14159265,0),t!=null&&t.x&&a(this,tt).components["look-controls"].pitchObject.rotation.set(t.x,0,0),t!=null&&t.y&&a(this,tt).components["look-controls"].yawObject.rotation.set(0,t.y,0)}getCamera(){return a(this,tt)}}be=new WeakMap,tt=new WeakMap,it=new WeakMap;class aa{constructor(){q(this,_t,void 0);G(this,_t,new ft)}setVisibilityOfBanners(e){a(this,_t).next({device:e})}shiftBanners(){a(this,_t).next("shift")}setUserState(){a(this,_t).next("show")}getCameraSubject(){return a(this,_t).asObservable()}}_t=new WeakMap;const Bt=new aa,gt={};let _r=new kt,Pr,At,Yn=!1;Se.next({changeTabletState:Yn});const Or=(n,e)=>{let t=.2;n.name==="scale"?t=.01:n.name==="rotation"&&(t=2),e.key==="ArrowDown"?n.xValue=n.xValue+t:e.key==="ArrowUp"?n.xValue=n.xValue-t:e.key==="="?n.yValue=n.yValue+t:e.key==="-"?n.yValue=n.yValue-t:e.key==="ArrowRight"?n.zValue=n.zValue+t:e.key==="ArrowLeft"&&(n.zValue=n.zValue-t),Pr.setAttribute(n.name,`${n.xValue} ${n.yValue} ${n.zValue}`)},la=n=>{n.key==="k"||n.key==="K"?(ze.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Me.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):n.key==="i"||n.key==="I"?(ze.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Me.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):n.key==="u"||n.key==="U"?Me.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):n.key==="o"||n.key==="O"?Me.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):n.key==="j"||n.key==="j"?(at.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),ze.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Me.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(n.key==="l"||n.key==="L")&&(at.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),ze.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Me.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},ca=n=>{n.key==="k"||n.key==="K"?(ze.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Me.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):n.key==="i"||n.key==="I"?(ze.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Me.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):n.key==="u"||n.key==="U"?Me.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):n.key==="o"||n.key==="O"?Me.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):n.key==="l"||n.key==="L"?(ze.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Me.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)):(n.key==="j"||n.key==="J")&&(ze.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Me.changeHistogramSectionByOffset("xOffset","TH3",fal,!1))},Ln=n=>{gt[n.key]=!0,(gt.Z||gt.z)&&Or(At[0],n),(gt.X||gt.x)&&Or(At[1],n),(gt.C||gt.c)&&Or(At[2],n),gt.Shift&&ca(n),la(n),(n.key==="e"||n.key==="E")&&_r.verticalMoveCamera(!0,.3),(n.key==="q"||n.key==="Q")&&_r.verticalMoveCamera(!1,.3),n.key==="1"&&Se.next(0),n.key==="2"&&Se.next(1),n.key==="3"&&Se.next(2),n.key==="4"&&Se.next(3),n.key==="5"&&Se.next(4),n.key==="6"&&Se.next(5),n.key==="7"&&Se.next(6),n.key==="8"&&Se.next(7),n.key==="9"&&Se.next(8),n.key==="0"&&Se.next(9),n.key==="Enter"&&gn.emmitCommand("REFRESH"),(n.key==="t"||n.key==="T")&&(Yn=!Yn,Yn?Se.next({changeTabletState:"flex"}):Se.next({changeTabletState:"none"})),n.key==="r"||n.key,(n.key==="m"||n.key==="M")&&ze.changeHistogramFunction("feet","TH2"),(n.key==="n"||n.key==="N")&&ze.changeHistogramFunction("default","TH2"),(n.key==="c"||n.key==="C")&&Bt.setUserState(),(n.key==="v"||n.key==="V")&&Bt.setVisibilityOfBanners("keyboard"),(n.key==="x"||n.key==="X")&&Bt.shiftBanners()},Vn=n=>{delete gt[n.key]},Ni=(n,e)=>{Pr=e,At=[n.position,n.scale,n.rotation];for(let t=0;t<3;t++)Pr.setAttribute(At[t].name,`${At[t].xValue} ${At[t].yValue} ${At[t].zValue}`)},Fi=()=>{_r=new kt};ve.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 n=this.el;Ni(this.schema,n),document.querySelector("a-scene").addEventListener("mouseover",function(){document.addEventListener("keydown",Ln),document.addEventListener("keyup",Vn)}),document.querySelector("a-scene").addEventListener("mouseout",function(){document.removeEventListener("keydown",Ln),document.removeEventListener("keyup",Vn)})},update:function(){Fi()}}),ve.registerComponent("label-handler",{schema:{value:{type:"string"},delay:{type:"number"}},init:function(){const n=this.el;this.value=this.data.value,n.setAttribute("text","value",this.data.value)},update:function(){const n=this.el;this.value!==this.data.value&&(setTimeout(()=>{n.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 Bi{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 i=.12;let o=i;for(let s=0;s<=9;s++){if(e<=o){r=this.palette[s];break}o+=i}return r}}class ua{constructor(e,t,r,i,o,s,c,d){q(this,cn);q(this,Pe,"");q(this,bn,[]);q(this,te,null);q(this,ct,"");q(this,oe,null);q(this,ge,1);q(this,xe,1);q(this,Q,1);q(this,Xe,0);q(this,qe,0);q(this,ut,0);q(this,vt,1);q(this,Pt,1);q(this,Sn,1);q(this,Oe,8);q(this,Ue,{xInitial:0,yInitial:0,zInitial:0});q(this,dt,void 0);q(this,ht,void 0);q(this,Ot,1);q(this,xt,1);q(this,Vt,0);q(this,tn,2);q(this,Wt,4);q(this,de,{xOffset:0,yOffset:0,zOffset:0});q(this,Dt,[]);Ie(this,"getXOffset",()=>a(this,ge));Ie(this,"getYOffset",()=>a(this,xe));Ie(this,"getZOffset",()=>a(this,Q));Ie(this,"getContentScale",()=>a(this,xt));Ie(this,"getRange",()=>a(this,Oe));q(this,bt,(e,t)=>{let r=e>t-a(this,Oe)?t-a(this,Oe):e;return r<1&&(r=1),r});q(this,nn,e=>a(this,bn).filter(r=>r.id===e).length!==0);q(this,ot,(e,t,r,i,o,s,c,d,f,u,p,S,C)=>({key:e+a(this,Pe),axis:t,geometry:{primitive:"plane",width:f,height:u},text:{color:C,width:4,height:"auto"},labelHandler:{value:p,delay:500},rotation:{x:s,y:c,z:d},material:{color:S},animation:{fromX:r-a(this,de).xOffset,fromY:i+a(this,de).zOffset,fromZ:o+a(this,de).yOffset,toX:r,toY:i,toZ:o}}));q(this,Zn,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,i,o,s,c,d,f,u,p,S,C;const j="";let b,m=0;const k=a(this,ge)+a(this,Oe)>a(this,Xe)?a(this,Xe):a(this,ge)+a(this,Oe),w=a(this,xe)+a(this,Oe)>a(this,qe)?a(this,qe):a(this,xe)+a(this,Oe),z=a(this,Q)+a(this,Oe)>a(this,ut)?a(this,ut):a(this,Q)+a(this,Oe),O=a(this,te).fXaxis.fTitle,v=a(this,te).fYaxis.fTitle,U=a(this,te).fZaxis.fTitle,P=a(this,te).fXaxis.fLabels?a(this,te).fXaxis.fLabels.arr:[],I=a(this,te).fYaxis.fLabels?a(this,te).fYaxis.fLabels.arr:[],Y=a(this,te).fZaxis.fLabels?a(this,te).fZaxis.fLabels.arr:[],A=[];for(let B=a(this,Q);B<=z;B++)for(let W=a(this,xe);W<=w;W++)for(let K=a(this,ge);K<=k;K++){t=a(this,te).fXaxis.GetBinCenter(K),r=a(this,te).fXaxis.GetBinLowEdge(K),i=t+(t-r),o=i-r,s=a(this,te).fYaxis.GetBinCenter(W),c=a(this,te).fYaxis.GetBinLowEdge(W),d=s+(s-c),f=d-c,u=a(this,te).fZaxis.GetBinCenter(B),p=a(this,te).fZaxis.GetBinLowEdge(B),S=u+(u-p),C=S-p;const J=a(this,rn).call(this,a(this,te).getBinContent(K,W,B));if(J<=a(this,Vt))continue;b=a(this,ht)?a(this,dn).call(this,a(this,ht).call(this,{histogram:a(this,te),histogramId:a(this,Pe),x:K,y:W,z:B})):J;let ye=b;b<.15&&(ye=.15);let me=a(this,dt)?a(this,dt).call(this,{histogram:a(this,te),histogramId:a(this,Pe),x:K,y:W,z:B,content:b}):null;me=me||a(this,oe).getBinColor(b);const we=a(this,Pe)+r+"th3"+i+"th3"+p+"th3"+S+"th3"+c+"th3"+d;let _e;a(this,nn).call(this,we)?_e=a(this,oe).getSecondaryAccentColor():_e=me;const Re=`id: ${we};
299
+ histogramName: ${a(this,Pe)};
300
300
  typeName: 'TH3';
301
- content: ${S};
301
+ content: ${b};
302
302
  color: ${me};
303
- yTitle: ${b};
304
- xTitle: ${D};
305
- zTitle: ${G};
306
- absoluteContent: ${q};
307
- binName: ${A};
308
- xMin: ${n};
303
+ yTitle: ${v};
304
+ xTitle: ${O};
305
+ zTitle: ${U};
306
+ absoluteContent: ${J};
307
+ binName: ${j};
308
+ xMin: ${r};
309
309
  yMin: ${c};
310
- zMin: ${g};
310
+ zMin: ${p};
311
311
  xMax: ${i};
312
312
  yMax: ${d};
313
- zMax: ${E};
313
+ zMax: ${S};
314
314
  xPos: ${K};
315
- yPos: ${L};
316
- zPos: ${N};
315
+ yPos: ${W};
316
+ zPos: ${B};
317
317
  xCenter: ${t};
318
- yCenter: ${a};
318
+ yCenter: ${s};
319
319
  zCenter: ${u};
320
320
  xWidth: ${o};
321
- yWidth: ${h};
322
- zWidth: ${P};
323
- markedColor: ${Ae};
324
- selectColor: ${s(this,oe).getSecondaryAccentColor()};
325
- axisX: ${s(this,oe).getAxisColor("x")};
326
- axisY: ${s(this,oe).getAxisColor("y")};
327
- axisZ: ${s(this,oe).getAxisColor("z")}`,R=ye*.8,H=-(K-1),Y=N-1,w=L-1;e.bins[y]={id:Se,color:me,binData:Ie,content:q,animation:{fromWidth:s(this,kt).call(this,Se),fromHeight:s(this,kt).call(this,Se),fromDepth:s(this,kt).call(this,Se),toWidth:R,toHeight:R,toDepth:R},animation2:{fromX:H,fromY:Y,fromZ:w,toX:H,toY:Y,toZ:w},animation3:{fromColor:s(this,rr).call(this,Se),toColor:Ae}},T[y]={key:Se,scale:R,color:Ae},y++}U(this,Tt,T);const ee=[],F=[];return y=s(this,Qt).call(this,e,ee,F,C,_,I,b,0),y=s(this,er).call(this,e,ee,F,_,C,O,D,y),y=s(this,Jt).call(this,e,ee,F,_,C,$,X,G,y),Kr(this,tr,qr).call(this,e,ee,F,_,C,y),e.labels=[...ee,...F],e});Z(this,Vr,()=>{const e={type:"TH2",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,n,i,o,a,c,d,h,u,g;const E="";let P=0;const A=s(this,ge)+s(this,je)>s(this,te).fXaxis.fNbins?s(this,te).fXaxis.fNbins:s(this,ge)+s(this,je),S=s(this,ve)+s(this,je)>s(this,te).fYaxis.fNbins?s(this,te).fYaxis.fNbins:s(this,ve)+s(this,je),y=s(this,te).fXaxis.fTitle!==""?s(this,te).fXaxis.fTitle:"x",_=s(this,te).fYaxis.fTitle!==""?s(this,te).fYaxis.fTitle:"y",C=s(this,te).fXaxis.fLabels?s(this,te).fXaxis.fLabels.arr:[],$=s(this,te).fYaxis.fLabels?s(this,te).fYaxis.fLabels.arr:[],D=[];for(let O=s(this,ve);O<=S;O++)for(let I=s(this,ge);I<=A;I++){n=s(this,te).fXaxis.GetBinCenter(I),i=s(this,te).fXaxis.GetBinLowEdge(I),o=n+(n-i),a=o-i,c=s(this,te).fYaxis.GetBinCenter(O),d=s(this,te).fYaxis.GetBinLowEdge(O),h=c+(c-d),u=h-d;const X=s(this,Kt).call(this,s(this,te).getBinContent(I,O));if(X<=s(this,Ht))continue;g=s(this,lt)?s(this,nr).call(this,s(this,lt).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:I,y:O})):X,t=g*s(this,ht)/(s(this,Mt)*2);let T=s(this,at)?s(this,at).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:I,y:O,content:g}):null;T=T||s(this,oe).getBinColor(g);const ee=s(this,Oe)+i+"th2"+o+"th2"+d+"th2"+h;let F;s(this,Gt).call(this,ee)?F=s(this,oe).getSecondaryAccentColor():F=T;const N=`id: ${ee};
328
- histogramName: ${s(this,Oe)};
321
+ yWidth: ${f};
322
+ zWidth: ${C};
323
+ markedColor: ${_e};
324
+ selectColor: ${a(this,oe).getSecondaryAccentColor()};
325
+ axisX: ${a(this,oe).getAxisColor("x")};
326
+ axisY: ${a(this,oe).getAxisColor("y")};
327
+ axisZ: ${a(this,oe).getAxisColor("z")}`,R=ye*.8,M=-(K-1),F=B-1,T=W-1;e.bins[m]={id:we,color:me,binData:Re,content:J,animation:{fromWidth:a(this,zt).call(this,we),fromHeight:a(this,zt).call(this,we),fromDepth:a(this,zt).call(this,we),toWidth:R,toHeight:R,toDepth:R},animation2:{fromX:M,fromY:F,fromZ:T,toX:M,toY:F,toZ:T},animation3:{fromColor:a(this,un).call(this,we),toColor:_e}},A[m]={key:we,scale:R,color:_e},m++}G(this,Dt,A);const V=[],L=[];return m=a(this,an).call(this,e,V,L,w,k,I,v,0),m=a(this,ln).call(this,e,V,L,k,w,P,O,m),m=a(this,sn).call(this,e,V,L,k,w,z,Y,U,m),tr(this,cn,nr).call(this,e,V,L,k,w,m),e.labels=[...V,...L],e});q(this,Gn,()=>{const e={type:"TH2",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,i,o,s,c,d,f,u,p;const S="";let C=0;const j=a(this,ge)+a(this,Oe)>a(this,te).fXaxis.fNbins?a(this,te).fXaxis.fNbins:a(this,ge)+a(this,Oe),b=a(this,xe)+a(this,Oe)>a(this,te).fYaxis.fNbins?a(this,te).fYaxis.fNbins:a(this,xe)+a(this,Oe),m=a(this,te).fXaxis.fTitle!==""?a(this,te).fXaxis.fTitle:"x",k=a(this,te).fYaxis.fTitle!==""?a(this,te).fYaxis.fTitle:"y",w=a(this,te).fXaxis.fLabels?a(this,te).fXaxis.fLabels.arr:[],z=a(this,te).fYaxis.fLabels?a(this,te).fYaxis.fLabels.arr:[],O=[];for(let P=a(this,xe);P<=b;P++)for(let I=a(this,ge);I<=j;I++){r=a(this,te).fXaxis.GetBinCenter(I),i=a(this,te).fXaxis.GetBinLowEdge(I),o=r+(r-i),s=o-i,c=a(this,te).fYaxis.GetBinCenter(P),d=a(this,te).fYaxis.GetBinLowEdge(P),f=c+(c-d),u=f-d;const Y=a(this,rn).call(this,a(this,te).getBinContent(I,P));if(Y<=a(this,Vt))continue;p=a(this,ht)?a(this,dn).call(this,a(this,ht).call(this,{histogram:a(this,te),histogramId:a(this,Pe),x:I,y:P})):Y,t=p*a(this,xt)/(a(this,Wt)*2);let A=a(this,dt)?a(this,dt).call(this,{histogram:a(this,te),histogramId:a(this,Pe),x:I,y:P,content:p}):null;A=A||a(this,oe).getBinColor(p);const V=a(this,Pe)+i+"th2"+o+"th2"+d+"th2"+f;let L;a(this,nn).call(this,V)?L=a(this,oe).getSecondaryAccentColor():L=A;const B=`id: ${V};
328
+ histogramName: ${a(this,Pe)};
329
329
  typeName: 'TH2';
330
- content: ${g};
331
- color: ${T};
332
- yTitle: ${_};
333
- xTitle: ${y};
330
+ content: ${p};
331
+ color: ${A};
332
+ yTitle: ${k};
333
+ xTitle: ${m};
334
334
  zTitle: 'none';
335
- absoluteContent: ${X};
336
- binName: ${E};
335
+ absoluteContent: ${Y};
336
+ binName: ${S};
337
337
  xMin: ${i};
338
338
  yMin: ${d};
339
339
  zMin: 0;
340
340
  xMax: ${o};
341
- yMax: ${h};
341
+ yMax: ${f};
342
342
  zMax: 0;
343
343
  xPos: ${I};
344
- yPos: ${O};
344
+ yPos: ${P};
345
345
  zPos: 0;
346
- xCenter: ${n};
346
+ xCenter: ${r};
347
347
  yCenter: ${c};
348
348
  yCenter: 0;
349
- xWidth: ${a};
349
+ xWidth: ${s};
350
350
  yWidth: ${u};
351
351
  zWidth: 0;
352
- markedColor: ${F};
353
- selectColor: ${s(this,oe).getSecondaryAccentColor()};
354
- axisX: ${s(this,oe).getAxisColor("x")};
355
- axisY: ${s(this,oe).getAxisColor("y")};
356
- axisZ: ${s(this,oe).getAxisColor("z")}`,L=a/s(this,ft)/s(this,Zt),K=u/s(this,Ct)/s(this,Zt),q=-(I-1),ye=O-1;e.bins[P]={id:ee,color:T,binData:N,content:X,animation:{fromWidth:L,fromHeight:s(this,kt).call(this,ee),fromDepth:K,toWidth:L,toHeight:g*s(this,ht)/s(this,Mt),toDepth:K},animation2:{fromX:q,fromY:t,fromZ:ye,toX:q,toY:t,toZ:ye},animation3:{fromColor:s(this,rr).call(this,ee),toColor:F}},D[P]={key:ee,scale:g,color:F},P++}U(this,Tt,D);const b=[],G=[];return P=s(this,Qt).call(this,e,b,G,S,A,$,_,0),P=s(this,er).call(this,e,b,G,A,S,C,y,P),P=s(this,Jt).call(this,e,b,G,A,S,void 0,void 0,void 0,P),Kr(this,tr,qr).call(this,e,b,G,A,S,P),e.labels=[...b,...G],e});Z(this,Xr,()=>{const e={type:"TH1",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,n,i,o,a,c;const d="";let h=0;const u=s(this,ge)+s(this,je)>s(this,te).fXaxis.fNbins?s(this,te).fXaxis.fNbins:s(this,ge)+s(this,je),g=1,E=s(this,te).fXaxis.fTitle!==""?s(this,te).fXaxis.fTitle:"x",P=s(this,te).fXaxis.fLabels?s(this,te).fXaxis.fLabels.arr:[],A=[];for(let _=s(this,ge);_<=u;_++){n=s(this,te).fXaxis.GetBinCenter(_),i=s(this,te).fXaxis.GetBinLowEdge(_),o=n+(n-i),a=o-i;const C=s(this,Kt).call(this,s(this,te).getBinContent(_));if(C<=s(this,Ht))continue;c=s(this,lt)?s(this,nr).call(this,s(this,lt).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:_})):C,t=c*s(this,ht)/(s(this,Mt)*2);let $=s(this,at)?s(this,at).call(this,{histogram:s(this,te),histogramId:s(this,Oe),x:_,content:c}):null;$=$||s(this,oe).getBinColor(c);const D=s(this,Oe)+i+"th1"+o;let b;s(this,Gt).call(this,D)?b=s(this,oe).getSecondaryAccentColor():b=$,console.log(_,i,o,n);const G=`id: ${D};
357
- histogramName: ${s(this,Oe)};
352
+ markedColor: ${L};
353
+ selectColor: ${a(this,oe).getSecondaryAccentColor()};
354
+ axisX: ${a(this,oe).getAxisColor("x")};
355
+ axisY: ${a(this,oe).getAxisColor("y")};
356
+ axisZ: ${a(this,oe).getAxisColor("z")}`,W=s/a(this,vt)/a(this,tn),K=u/a(this,Pt)/a(this,tn),J=-(I-1),ye=P-1;e.bins[C]={id:V,color:A,binData:B,content:Y,animation:{fromWidth:W,fromHeight:a(this,zt).call(this,V),fromDepth:K,toWidth:W,toHeight:p*a(this,xt)/a(this,Wt),toDepth:K},animation2:{fromX:J,fromY:t,fromZ:ye,toX:J,toY:t,toZ:ye},animation3:{fromColor:a(this,un).call(this,V),toColor:L}},O[C]={key:V,scale:p,color:L},C++}G(this,Dt,O);const v=[],U=[];return C=a(this,an).call(this,e,v,U,b,j,z,k,0),C=a(this,ln).call(this,e,v,U,j,b,w,m,C),C=a(this,sn).call(this,e,v,U,j,b,void 0,void 0,void 0,C),tr(this,cn,nr).call(this,e,v,U,j,b,C),e.labels=[...v,...U],e});q(this,qn,()=>{const e={type:"TH1",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,i,o,s,c;const d="";let f=0;const u=a(this,ge)+a(this,Oe)>a(this,te).fXaxis.fNbins?a(this,te).fXaxis.fNbins:a(this,ge)+a(this,Oe),p=1,S=a(this,te).fXaxis.fTitle!==""?a(this,te).fXaxis.fTitle:"x",C=a(this,te).fXaxis.fLabels?a(this,te).fXaxis.fLabels.arr:[],j=[];for(let k=a(this,ge);k<=u;k++){r=a(this,te).fXaxis.GetBinCenter(k),i=a(this,te).fXaxis.GetBinLowEdge(k),o=r+(r-i),s=o-i;const w=a(this,rn).call(this,a(this,te).getBinContent(k));if(w<=a(this,Vt))continue;c=a(this,ht)?a(this,dn).call(this,a(this,ht).call(this,{histogram:a(this,te),histogramId:a(this,Pe),x:k})):w,t=c*a(this,xt)/(a(this,Wt)*2);let z=a(this,dt)?a(this,dt).call(this,{histogram:a(this,te),histogramId:a(this,Pe),x:k,content:c}):null;z=z||a(this,oe).getBinColor(c);const O=a(this,Pe)+i+"th1"+o;let v;a(this,nn).call(this,O)?v=a(this,oe).getSecondaryAccentColor():v=z;const U=`id: ${O};
357
+ histogramName: ${a(this,Pe)};
358
358
  typeName: 'TH1';
359
359
  content: ${c};
360
- xTitle: ${E};
360
+ xTitle: ${S};
361
361
  zTitle: 'none';
362
- absoluteContent: ${C};
362
+ absoluteContent: ${w};
363
363
  binName: ${d};
364
364
  xMin: ${i};
365
365
  zMin: 0;
366
366
  xMax: ${o};
367
367
  zMax: 0;
368
- xPos: ${_};
368
+ xPos: ${k};
369
369
  zPos: 0;
370
- xCenter: ${n};
370
+ xCenter: ${r};
371
371
  yCenter: 0;
372
- xWidth: ${a};
372
+ xWidth: ${s};
373
373
  zWidth: 0;
374
- markedColor: ${b};
375
- selectColor: ${s(this,oe).getSecondaryAccentColor()};
376
- axisX: ${s(this,oe).getAxisColor("x")};
377
- axisY: ${s(this,oe).getAxisColor("y")};
378
- axisZ: ${s(this,oe).getAxisColor("z")}`,O=a/s(this,ft)/s(this,Zt),I=-(_-1),X=0;e.bins[h]={id:D,color:$,binData:G,content:C,animation:{fromWidth:O,fromHeight:s(this,kt).call(this,D),fromDepth:O,toWidth:O,toHeight:c*s(this,ht)/s(this,Mt),toDepth:O},animation2:{fromX:I+s(this,ue).xOffset,fromY:t,fromZ:X,toX:I,toY:t,toZ:X},animation3:{fromColor:s(this,rr).call(this,D),toColor:b}},A[h]={key:D,scale:c,color:b},h++}U(this,Tt,A);const S=[],y=[];return h=s(this,Qt).call(this,e,S,y,g,u,void 0,void 0,0),h=s(this,er).call(this,e,S,y,u,g,P,E,h),h=s(this,Jt).call(this,e,S,y,u,g,void 0,void 0,void 0,h),Kr(this,tr,qr).call(this,e,S,y,u,g,h),e.labels=[...S,...y],e});Z(this,Kt,e=>e<=0?0:(s(this,Et)>1&&(e=Math.round((e/s(this,Et)+Number.EPSILON)*100)/100),e));Z(this,qt,(e,t,n,i,o)=>{if(U(this,ue,{xOffset:0,yOffset:0,zOffset:0}),n){if(o?(t[i]+=1,s(this,ue)[i]=-1):(t[i]+=t.range,s(this,ue)[i]=-t.range),e[i]<=t.range)return t[i]=1,s(this,ue)[i]=0,t;if(t[i]>e[i]-t.range)return t[i]=e[i]-t.range,s(this,ue)[i]=0,t}else if(o?(t[i]-=1,s(this,ue)[i]=1):(t[i]-=t.range,s(this,ue)[i]=t.range),t[i]<1)return t[i]=1,s(this,ue)[i]=0,t;return t});Z(this,Jt,(e,t,n,i,o,a,c,d,h)=>(t[h]=s(this,tt).call(this,9e4+h,"z",-(i+.5),s(this,J)-1,o+.5,270,360,0,2,2,`${c?c[s(this,J)-1]?c[s(this,J)-1].fString:Math.round((s(this,We).zInitial+s(this,J)-1+Number.EPSILON)*100)/100:"0"}`,s(this,oe).getAxisColor("y"),s(this,oe).getSecondaryFontColor()),n[h]=s(this,tt).call(this,91e3+h,"z",-(i+.5),s(this,J)-1,s(this,ve)-2.5,270,180,0,2,2,`${c?c[s(this,J)-1]?c[s(this,J)-1].fString:Math.round((s(this,We).zInitial+s(this,J)-1+Number.EPSILON)*100)/100:"0"}`,s(this,oe).getAxisColor("y"),s(this,oe).getSecondaryFontColor()),h++,t[h]=s(this,tt).call(this,92e3+h,"z",-(s(this,ge)-2.5),s(this,J)-1,o+.5,270,180,0,2,2,`${c?c[s(this,J)-1]?c[s(this,J)-1].fString:Math.round((s(this,We).zInitial+s(this,J)-1+Number.EPSILON)*100)/100:"0"}`,s(this,oe).getAxisColor("y"),s(this,oe).getSecondaryFontColor()),n[h]=s(this,tt).call(this,93e3+h,"z",-(s(this,ge)-2.5),s(this,J)-1,s(this,ve)-2.5,270,180,0,2,2,`${c?c[s(this,J)-1]?c[s(this,J)-1].fString:Math.round((s(this,We).zInitial+s(this,J)-1+Number.EPSILON)*100)/100:"0"}`,s(this,oe).getAxisColor("y"),s(this,oe).getSecondaryFontColor()),h++,d&&(e.axisLabels[4]={id:"upLabel1",key:95004+s(this,Oe),text:{value:d,color:s(this,oe).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:s(this,ge)-1.5+s(this,ue).xOffset,fromY:a-1+s(this,ue).zOffset,fromZ:s(this,ve)-2+s(this,ue).yOffset,toX:s(this,ge)-1.5,toY:a-1,toZ:s(this,ve)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+s(this,Oe),text:{value:d,color:s(this,oe).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:i-.5+s(this,ue).xOffset,fromY:a-1+s(this,ue).zOffset,fromZ:o+s(this,ue).yOffset,toX:i-.5,toY:a-1,toZ:o}},e.axisLabels[6]={id:"upLabel3",key:105006+s(this,Oe),text:{value:d,color:s(this,oe).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:s(this,ge)-2+s(this,ue).xOffset,fromY:a-1+s(this,ue).zOffset,fromZ:o-.5+s(this,ue).yOffset,toX:s(this,ge)-2,toY:a-1,toZ:o-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+s(this,Oe),text:{value:d,color:s(this,oe).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:i-.5+s(this,ue).xOffset,fromY:a-1+s(this,ue).zOffset,fromZ:s(this,ve)-1.5+s(this,ue).yOffset,toX:i-.5,toY:a-1,toZ:s(this,ve)-1.5}}),h));Z(this,Qt,(e,t,n,i,o,a,c,d)=>{for(let h=s(this,ve);h<=i;h++)t[d]=s(this,tt).call(this,1500+d,"y",-(s(this,ge)-2.5),s(this,J)?s(this,J)-1:0,h-1,270,180,0,2,1,`${a?a[h-1]?a[h-1].fString:Math.round((s(this,We).yInitial+(h-1)*s(this,Ct)+Number.EPSILON)*100)/100:""}`,s(this,oe).getAxisColor("z"),s(this,oe).getSecondaryFontColor()),n[d]=s(this,tt).call(this,3e3+d,"y",-(o+.5),s(this,J)?s(this,J)-1:0,h-1,270,360,0,2,1,`${a?a[h-1]?a[h-1].fString:Math.round((s(this,We).yInitial+(h-1)*s(this,Ct)+Number.EPSILON)*100)/100:""}`,s(this,oe).getAxisColor("z"),s(this,oe).getSecondaryFontColor()),d++;return e.axisLabels[0]={id:"leftLabel",key:4500+s(this,Oe),text:{value:c||"",color:s(this,oe).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:-(s(this,ge)-4+s(this,ue).xOffset),fromY:(s(this,J)?s(this,J)-1:0)+s(this,ue).zOffset,fromZ:s(this,ve)+.5+s(this,ue).yOffset,toX:-(s(this,ge)-4),toY:s(this,J)?s(this,J)-1:0,toZ:s(this,ve)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+s(this,Oe),text:{value:c||"",color:s(this,oe).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:-(o+2+s(this,ue).xOffset),fromY:(s(this,J)?s(this,J)-1:0)+s(this,ue).zOffset,fromZ:i-2.5+s(this,ue).yOffset,toX:-(o+2),toY:s(this,J)?s(this,J)-1:0,toZ:i-2.5}},d});Z(this,er,(e,t,n,i,o,a,c,d)=>{for(let h=s(this,ge);h<=i;h++)t[d]=s(this,tt).call(this,7500+d,"x",-(h-1),s(this,J)?s(this,J)-1:0,s(this,ve)-2.5,270,180,0,1,2,`${a[h-1]?a[h-1].fString:Math.round((s(this,We).xInitial+(h-1)*s(this,ft)+Number.EPSILON)*100)/100}`,s(this,oe).getAxisColor("x"),s(this,oe).getSecondaryFontColor()),n[d]=s(this,tt).call(this,9e3+d,"x",-(h-1),s(this,J)?s(this,J)-1:0,o+.5,270,180,0,1,2,`${a[h-1]?a[h-1].fString:Math.round((s(this,We).xInitial+(h-1)*s(this,ft)+Number.EPSILON)*100)/100}`,s(this,oe).getAxisColor("x"),s(this,oe).getSecondaryFontColor()),d++;return e.axisLabels[2]={id:"downLabel",key:10502+s(this,Oe),text:{value:c,color:s(this,oe).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:-(s(this,ge)+s(this,ue).xOffset),fromY:(s(this,J)?s(this,J)-1:0)+s(this,ue).zOffset,fromZ:s(this,ve)-4+s(this,ue).yOffset,toX:-s(this,ge),toY:s(this,J)?s(this,J)-1:0,toZ:s(this,ve)-4}},e.axisLabels[3]={id:"upLabel",key:12003+s(this,Oe),text:{value:c,color:s(this,oe).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:-(i-2.5-s(this,ue).xOffset),fromY:(s(this,J)?s(this,J)-1:0)+s(this,ue).zOffset,fromZ:o+2+s(this,ue).yOffset,toX:-(i-2.5),toY:s(this,J)?s(this,J)-1:0,toZ:o+2}},d});Z(this,Wr,(e,t,n)=>{const i={xOffset:s(this,Xe),yOffset:s(this,Ze),zOffset:s(this,st)},o={name:"TH3",xOffset:s(this,ge),yOffset:s(this,ve),zOffset:s(this,J),range:s(this,je)},a=s(this,qt).call(this,i,o,t,e,n);return U(this,ge,a.xOffset),U(this,ve,a.yOffset),U(this,J,a.zOffset),a});Z(this,Ur,(e,t,n)=>{const i={xOffset:s(this,Xe),yOffset:s(this,Ze)},o={name:"TH2",xOffset:s(this,ge),yOffset:s(this,ve),range:s(this,je)},a=s(this,qt).call(this,i,o,t,e,n);return U(this,ge,a.xOffset),U(this,ve,a.yOffset),a});Z(this,Zr,(e,t,n)=>{const i={xOffset:s(this,Xe)},o={name:"TH1",xOffset:s(this,ge),range:s(this,je)},a=s(this,qt).call(this,i,o,t,e,n);return U(this,ge,a.xOffset),a});Z(this,kt,e=>{const t=s(this,Tt).filter(n=>n.key===e);return t[0]&&t[0].scale?t[0].scale:0});Z(this,rr,e=>{const t=s(this,Tt).filter(n=>n.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});Z(this,nr,e=>e>s(this,Et)?s(this,Et):e<0?0:e);this.initializeFactory(e,t,n,i,o,a,c,d)}initializeFactory(e,t,n,i,o,a,c,d){this.setUniqueName(e),this.setTheme(o),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(n),this.setRange(i),this.setSelectedBin(a),this.setViewFunction(c),this.setProgressFunction(d)}updateContentScale(e){U(this,ht,e)}updateMinDisplayedContent(e){e>=0&&U(this,Ht,e)}setUniqueName(e){U(this,Oe,e)}setHistogramContentMaximum(e){U(this,Et,e>0?e:1)}setSelectedBin(e){U(this,gr,e||[])}setViewFunction(e){U(this,at,e)}setProgressFunction(e){U(this,lt,e)}setSection(e){e&&(e.xOffset&&U(this,ge,s(this,pt).call(this,e==null?void 0:e.xOffset,s(this,Xe))),e.yOffset&&!histogram._typename.includes("TH1")&&U(this,ve,s(this,pt).call(this,e==null?void 0:e.yOffset,s(this,Ze))),e.zOffset&&histogram._typename.includes("TH3")&&U(this,J,s(this,pt).call(this,e==null?void 0:e.zOffset,s(this,st))))}setHistogram(e){var t,n,i,o,a,c,d,h,u,g,E,P,A,S,y,_;U(this,te,e),U(this,ot,e==null?void 0:e._typename),U(this,ge,1),U(this,ve,1),U(this,J,1),U(this,Xe,0),U(this,Ze,0),U(this,st,0),U(this,ft,1),U(this,Ct,1),U(this,yr,1),U(this,Xe,(t=e==null?void 0:e.fXaxis)==null?void 0:t.fNbins),U(this,ft,(((n=e==null?void 0:e.fXaxis)==null?void 0:n.fXmax)-((i=e==null?void 0:e.fXaxis)==null?void 0:i.fXmin))/((o=e==null?void 0:e.fXaxis)==null?void 0:o.fNbins)),s(this,We).xInitial=(a=e==null?void 0:e.fXaxis)==null?void 0:a.fXmin,U(this,ge,s(this,pt).call(this,s(this,ge),s(this,Xe))),(c=e==null?void 0:e._typename)!=null&&c.includes("TH1")||(U(this,Ze,(d=e==null?void 0:e.fYaxis)==null?void 0:d.fNbins),U(this,Ct,(((h=e==null?void 0:e.fYaxis)==null?void 0:h.fXmax)-((u=e==null?void 0:e.fYaxis)==null?void 0:u.fXmin))/((g=e==null?void 0:e.fYaxis)==null?void 0:g.fNbins)),s(this,We).yInitial=(E=e==null?void 0:e.fYaxis)==null?void 0:E.fXmin,U(this,ve,s(this,pt).call(this,s(this,ve),s(this,Ze)))),(P=e==null?void 0:e._typename)!=null&&P.includes("TH3")&&(U(this,st,(A=e==null?void 0:e.fZaxis)==null?void 0:A.fNbins),U(this,yr,((S=e==null?void 0:e.fZaxis)==null?void 0:S.fXmax)/((y=e==null?void 0:e.fZaxis)==null?void 0:y.fNbins)),s(this,We).zInitial=(_=e==null?void 0:e.fZaxis)==null?void 0:_.fXmin,U(this,J,s(this,pt).call(this,s(this,J),s(this,st)))),this.setHistogramContentMaximum(e==null?void 0:e.fMaximum)}setRange(e){e&&(e<4&&U(this,je,4),U(this,je,e))}setTheme(e){U(this,oe,new ji(e))}getElements(){let e={};return s(this,ot).includes("TH2")?e=s(this,Vr).call(this):s(this,ot).includes("TH3")?e=s(this,Lr).call(this):s(this,ot).includes("TH1")&&(e=s(this,Xr).call(this)),e}updateSection(e,t,n){if(s(this,ot).includes("TH3"))return s(this,Wr).call(this,e,t,n);if(s(this,ot).includes("TH2"))return s(this,Ur).call(this,e,t,n);if(s(this,ot).includes("TH1"))return s(this,Zr).call(this,e,t,n)}}Oe=new WeakMap,gr=new WeakMap,te=new WeakMap,ot=new WeakMap,oe=new WeakMap,ge=new WeakMap,ve=new WeakMap,J=new WeakMap,Xe=new WeakMap,Ze=new WeakMap,st=new WeakMap,ft=new WeakMap,Ct=new WeakMap,yr=new WeakMap,je=new WeakMap,We=new WeakMap,at=new WeakMap,lt=new WeakMap,Et=new WeakMap,ht=new WeakMap,Ht=new WeakMap,Zt=new WeakMap,Mt=new WeakMap,ue=new WeakMap,Tt=new WeakMap,pt=new WeakMap,Gt=new WeakMap,tt=new WeakMap,Lr=new WeakMap,Vr=new WeakMap,Xr=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,er=new WeakMap,tr=new WeakSet,qr=function(e,t,n,i,o,a,c,d){d++;const h=135,u=-(i+5.5),g=(s(this,J)?s(this,J)+7:7)+s(this,ue).zOffset,E=s(this,ve)+s(this,je)/2+10;e.titles[0]={key:195e3+s(this,Oe),text:{value:s(this,te).fTitle,color:s(this,oe).getPrimaryFontColor()},rotation:{x:0,y:h,z:0},position:{x:u,y:g+9,z:E},innerText:{value:"Press V to show projections or controls",color:s(this,oe).getPrimaryFontColor()}},d++;const P=s(this,je)>s(this,Xe)?s(this,Xe)+1:s(this,je),A=s(this,je)>s(this,Ze)?s(this,Ze)+1:s(this,je);e.ground={key:22500+d+s(this,Oe),scale:{width:P+8,height:.2,depth:A+8},animation:{fromX:s(this,ge)+P*.5-1+s(this,ue).xOffset,fromY:-.5,fromZ:s(this,ve)+A*.5-.5+s(this,ue).yOffset,toX:s(this,ge)+P*.5-1,toY:-.5,toZ:s(this,ve)+A*.5-.5}},d++,e.banners[1]={key:24e4+d+s(this,Oe),geometry:{width:.1,height:15,depth:22},position:{x:u,y:g,z:E},rotation:{x:0,y:-h,z:0},material:{color:"#ffffff",transparent:!0}}},Wr=new WeakMap,Ur=new WeakMap,Zr=new WeakMap,kt=new WeakMap,rr=new WeakMap,nr=new WeakMap;const Os=()=>{var D,b,G,O,I,X;let r;const e=v.useContext(yt),{selectedView:t,onViewChange:n,onProgress:i,section:o,selectedBins:a}=e.states;e.experimental;const[c]=vt("ndmvrSchema"),d=(b=(D=c==null?void 0:c.histogram)==null?void 0:D.properties.range)==null?void 0:b.value,h=(O=(G=c==null?void 0:c.histogram)==null?void 0:G.properties.theme)==null?void 0:O.value,u=(X=(I=c==null?void 0:c.histogram)==null?void 0:I.properties.scale)==null?void 0:X.value,{id:g,histogram:E,projPanelIds:P}=e.data,S=v.useRef(new Ps(g,E,o||null,a,n,i)).current,[y,_]=v.useState(S.getElements()),[C]=v.useState(1),$=T=>{E._typename.includes(T.name)&&(T.axis?S.updateSection(T.axis,T.increment,T.defaultRange):T.minValue&&S.updateMinDisplayedContent(T.minValue)),T.change,_(S.getElements())};return v.useEffect(()=>{S.setUniqueName(g),_(S.getElements())},[g]),v.useEffect(()=>{S.updateContentScale(u),_(S.getElements())},[u]),v.useEffect(()=>{S.setHistogram(E),_(S.getElements())},[E]),v.useEffect(()=>{S.setSection(o),_(S.getElements())},[o]),v.useEffect(()=>{S.setRange(d),_(S.getElements())},[d]),v.useEffect(()=>{S.setTheme(h),_(S.getElements())},[h]),v.useEffect(()=>{S.setSelectedBin(a),_(S.getElements())},[a]),v.useEffect(()=>{S.setViewFunction(n),_(S.getElements())},[n]),v.useEffect(()=>{S.setViewFunction(n),_(S.getElements())},[t]),v.useEffect(()=>{S.setProgressFunction(i),_(S.getElements())},[i]),v.useEffect(()=>{if(E._typename.includes("TH2")?r=$e.getChangedSection().subscribe($):E._typename.includes("TH3")?r=He.getChangedSection().subscribe($):E._typename.includes("TH1")&&(r=nt.getChangedSection().subscribe($)),r)return()=>r.unsubscribe()},[y,u]),y!=null&&y.bins?f.jsxs("a-entity",{"histogram-control":!0,children:[y.bins.map(T=>f.jsx("a-box",{id:T.id,class:"clickable",material:`color: ${T.color}; transparent: true`,binth:T.binData,mouseevent:!0,geometry:`width:${T.animation.toWidth}; height:${T.animation.toHeight}; depth:${T.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${T.animation2.fromX} ${T.animation2.fromY} ${T.animation2.fromZ}; to: ${T.animation2.toX} ${T.animation2.toY} ${T.animation2.toZ}; dur: 800;`,children:f.jsx("a-text",{value:T.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${T.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+(C===1?-1:1)*T.animation.toHeight/2} 0`})},T.id)),y.labels.map(T=>f.jsx("a-entity",{geometry:`primitive: ${T.geometry.primitive}; width:${T.geometry.width}; height:${T.geometry.height};`,text:`color: ${T.text.color}; width: ${T.text.width}; height: ${T.text.height}; align:center; xOffset:${T.axis==="x"?-(T.text.width/12):0};baseline:top;`,"label-handler":`value: ${T.labelHandler.value}; delay:${T.labelHandler.delay};`,rotation:`${T.rotation.x} ${T.rotation.y} ${T.rotation.z}`,material:`color: ${T.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: ${T.animation.fromX} ${T.animation.fromY} ${T.animation.fromZ}; to: ${T.animation.toX} ${T.animation.toY} ${T.animation.toZ}; dur: 1005;`},T.key)),y.titles.map(T=>f.jsxs("a-entity",{rotation:`${T.rotation.x} ${T.rotation.y} ${T.rotation.z}`,position:`${T.position.x} ${T.position.y} ${T.position.z}`,material:"transparent: true",children:[f.jsx("a-text",{value:T.text.value,position:"0 0.5 0",width:"20",height:"auto",align:"center",color:T.text.color}),f.jsx("a-text",{value:T.innerText.value,position:"0 -0.5 0",width:"15",height:"auto",align:"center",color:T.innerText.color}),f.jsx("a-entity",{text:`value: ${T.innerText.value}; color: ${T.innerText.color}; width: 15; height:auto; align:center;`,position:"0 -0.5 0",material:"transparent: true"}),f.jsx("a-entity",{geometry:"primitive: plane; width:15; height:2;",position:"0 0 -0.1",material:"opacity: 0.9; color: white; transparent: true"})]},T.key)),y.axisLabels.map(T=>f.jsx("a-entity",{id:T.id,text:`value: ${T.text.value}; color: "${T.text.color}"; width: 10; height:auto; align:center;`,rotation:`${T.rotation.x} ${T.rotation.y} ${T.rotation.z}`,animation:`property: position; from: ${T.animation.fromX} ${T.animation.fromY} ${T.animation.fromZ}; to: ${T.animation.toX} ${T.animation.toY} ${T.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},T.key)),y.ground&&f.jsx("a-box",{width:y.ground.scale.width,material:"color: #fafafa",height:y.ground.scale.height,depth:y.ground.scale.depth,animation:`property: position; from: ${y.ground.animation.fromX} ${y.ground.animation.fromY} ${y.ground.animation.fromZ};
374
+ markedColor: ${v};
375
+ selectColor: ${a(this,oe).getSecondaryAccentColor()};
376
+ axisX: ${a(this,oe).getAxisColor("x")};
377
+ axisY: ${a(this,oe).getAxisColor("y")};
378
+ axisZ: ${a(this,oe).getAxisColor("z")}`,P=s/a(this,vt)/a(this,tn),I=-(k-1),Y=0;e.bins[f]={id:O,color:z,binData:U,content:w,animation:{fromWidth:P,fromHeight:a(this,zt).call(this,O),fromDepth:P,toWidth:P,toHeight:c*a(this,xt)/a(this,Wt),toDepth:P},animation2:{fromX:I+a(this,de).xOffset,fromY:t,fromZ:Y,toX:I,toY:t,toZ:Y},animation3:{fromColor:a(this,un).call(this,O),toColor:v}},j[f]={key:O,scale:c,color:v},f++}G(this,Dt,j);const b=[],m=[];return f=a(this,an).call(this,e,b,m,p,u,void 0,void 0,0),f=a(this,ln).call(this,e,b,m,u,p,C,S,f),f=a(this,sn).call(this,e,b,m,u,p,void 0,void 0,void 0,f),tr(this,cn,nr).call(this,e,b,m,u,p,f),e.labels=[...b,...m],e});q(this,rn,e=>e<=0?0:(a(this,Ot)>1&&(e=Math.round((e/a(this,Ot)+Number.EPSILON)*100)/100),e));q(this,on,(e,t,r,i,o)=>{if(G(this,de,{xOffset:0,yOffset:0,zOffset:0}),r){if(o?(t[i]+=1,a(this,de)[i]=-1):(t[i]+=t.range,a(this,de)[i]=-t.range),e[i]<=t.range)return t[i]=1,a(this,de)[i]=0,t;if(t[i]>e[i]-t.range)return t[i]=e[i]-t.range,a(this,de)[i]=0,t}else if(o?(t[i]-=1,a(this,de)[i]=1):(t[i]-=t.range,a(this,de)[i]=t.range),t[i]<1)return t[i]=1,a(this,de)[i]=0,t;return t});q(this,sn,(e,t,r,i,o,s,c,d,f)=>(t[f]=a(this,ot).call(this,9e4+f,"z",-(i+.5),a(this,Q)-1,o+.5,270,360,0,2,2,`${c?c[a(this,Q)-1]?c[a(this,Q)-1].fString:Math.round((a(this,Ue).zInitial+a(this,Q)-1+Number.EPSILON)*100)/100:"0"}`,a(this,oe).getAxisColor("y"),a(this,oe).getSecondaryFontColor()),r[f]=a(this,ot).call(this,91e3+f,"z",-(i+.5),a(this,Q)-1,a(this,xe)-2.5,270,180,0,2,2,`${c?c[a(this,Q)-1]?c[a(this,Q)-1].fString:Math.round((a(this,Ue).zInitial+a(this,Q)-1+Number.EPSILON)*100)/100:"0"}`,a(this,oe).getAxisColor("y"),a(this,oe).getSecondaryFontColor()),f++,t[f]=a(this,ot).call(this,92e3+f,"z",-(a(this,ge)-2.5),a(this,Q)-1,o+.5,270,180,0,2,2,`${c?c[a(this,Q)-1]?c[a(this,Q)-1].fString:Math.round((a(this,Ue).zInitial+a(this,Q)-1+Number.EPSILON)*100)/100:"0"}`,a(this,oe).getAxisColor("y"),a(this,oe).getSecondaryFontColor()),r[f]=a(this,ot).call(this,93e3+f,"z",-(a(this,ge)-2.5),a(this,Q)-1,a(this,xe)-2.5,270,180,0,2,2,`${c?c[a(this,Q)-1]?c[a(this,Q)-1].fString:Math.round((a(this,Ue).zInitial+a(this,Q)-1+Number.EPSILON)*100)/100:"0"}`,a(this,oe).getAxisColor("y"),a(this,oe).getSecondaryFontColor()),f++,d&&(e.axisLabels[4]={id:"upLabel1",key:95004+a(this,Pe),text:{value:d,color:a(this,oe).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:a(this,ge)-1.5+a(this,de).xOffset,fromY:s-1+a(this,de).zOffset,fromZ:a(this,xe)-2+a(this,de).yOffset,toX:a(this,ge)-1.5,toY:s-1,toZ:a(this,xe)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+a(this,Pe),text:{value:d,color:a(this,oe).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:i-.5+a(this,de).xOffset,fromY:s-1+a(this,de).zOffset,fromZ:o+a(this,de).yOffset,toX:i-.5,toY:s-1,toZ:o}},e.axisLabels[6]={id:"upLabel3",key:105006+a(this,Pe),text:{value:d,color:a(this,oe).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:a(this,ge)-2+a(this,de).xOffset,fromY:s-1+a(this,de).zOffset,fromZ:o-.5+a(this,de).yOffset,toX:a(this,ge)-2,toY:s-1,toZ:o-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+a(this,Pe),text:{value:d,color:a(this,oe).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:i-.5+a(this,de).xOffset,fromY:s-1+a(this,de).zOffset,fromZ:a(this,xe)-1.5+a(this,de).yOffset,toX:i-.5,toY:s-1,toZ:a(this,xe)-1.5}}),f));q(this,an,(e,t,r,i,o,s,c,d)=>{for(let f=a(this,xe);f<=i;f++)t[d]=a(this,ot).call(this,1500+d,"y",-(a(this,ge)-2.5),a(this,Q)?a(this,Q)-1:0,f-1,270,180,0,2,1,`${s?s[f-1]?s[f-1].fString:Math.round((a(this,Ue).yInitial+(f-1)*a(this,Pt)+Number.EPSILON)*100)/100:""}`,a(this,oe).getAxisColor("z"),a(this,oe).getSecondaryFontColor()),r[d]=a(this,ot).call(this,3e3+d,"y",-(o+.5),a(this,Q)?a(this,Q)-1:0,f-1,270,360,0,2,1,`${s?s[f-1]?s[f-1].fString:Math.round((a(this,Ue).yInitial+(f-1)*a(this,Pt)+Number.EPSILON)*100)/100:""}`,a(this,oe).getAxisColor("z"),a(this,oe).getSecondaryFontColor()),d++;return e.axisLabels[0]={id:"leftLabel",key:4500+a(this,Pe),text:{value:c||"",color:a(this,oe).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:-(a(this,ge)-4+a(this,de).xOffset),fromY:(a(this,Q)?a(this,Q)-1:0)+a(this,de).zOffset,fromZ:a(this,xe)+.5+a(this,de).yOffset,toX:-(a(this,ge)-4),toY:a(this,Q)?a(this,Q)-1:0,toZ:a(this,xe)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+a(this,Pe),text:{value:c||"",color:a(this,oe).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:-(o+2+a(this,de).xOffset),fromY:(a(this,Q)?a(this,Q)-1:0)+a(this,de).zOffset,fromZ:i-2.5+a(this,de).yOffset,toX:-(o+2),toY:a(this,Q)?a(this,Q)-1:0,toZ:i-2.5}},d});q(this,ln,(e,t,r,i,o,s,c,d)=>{for(let f=a(this,ge);f<=i;f++)t[d]=a(this,ot).call(this,7500+d,"x",-(f-1),a(this,Q)?a(this,Q)-1:0,a(this,xe)-2.5,270,180,0,1,2,`${s[f-1]?s[f-1].fString:Math.round((a(this,Ue).xInitial+(f-1)*a(this,vt)+Number.EPSILON)*100)/100}`,a(this,oe).getAxisColor("x"),a(this,oe).getSecondaryFontColor()),r[d]=a(this,ot).call(this,9e3+d,"x",-(f-1),a(this,Q)?a(this,Q)-1:0,o+.5,270,180,0,1,2,`${s[f-1]?s[f-1].fString:Math.round((a(this,Ue).xInitial+(f-1)*a(this,vt)+Number.EPSILON)*100)/100}`,a(this,oe).getAxisColor("x"),a(this,oe).getSecondaryFontColor()),d++;return e.axisLabels[2]={id:"downLabel",key:10502+a(this,Pe),text:{value:c,color:a(this,oe).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:-(a(this,ge)+a(this,de).xOffset),fromY:(a(this,Q)?a(this,Q)-1:0)+a(this,de).zOffset,fromZ:a(this,xe)-4+a(this,de).yOffset,toX:-a(this,ge),toY:a(this,Q)?a(this,Q)-1:0,toZ:a(this,xe)-4}},e.axisLabels[3]={id:"upLabel",key:12003+a(this,Pe),text:{value:c,color:a(this,oe).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:-(i-2.5-a(this,de).xOffset),fromY:(a(this,Q)?a(this,Q)-1:0)+a(this,de).zOffset,fromZ:o+2+a(this,de).yOffset,toX:-(i-2.5),toY:a(this,Q)?a(this,Q)-1:0,toZ:o+2}},d});q(this,Kn,(e,t,r)=>{const i={xOffset:a(this,Xe),yOffset:a(this,qe),zOffset:a(this,ut)},o={name:"TH3",xOffset:a(this,ge),yOffset:a(this,xe),zOffset:a(this,Q),range:a(this,Oe)},s=a(this,on).call(this,i,o,t,e,r);return G(this,ge,s.xOffset),G(this,xe,s.yOffset),G(this,Q,s.zOffset),s});q(this,Jn,(e,t,r)=>{const i={xOffset:a(this,Xe),yOffset:a(this,qe)},o={name:"TH2",xOffset:a(this,ge),yOffset:a(this,xe),range:a(this,Oe)},s=a(this,on).call(this,i,o,t,e,r);return G(this,ge,s.xOffset),G(this,xe,s.yOffset),s});q(this,Qn,(e,t,r)=>{const i={xOffset:a(this,Xe)},o={name:"TH1",xOffset:a(this,ge),range:a(this,Oe)},s=a(this,on).call(this,i,o,t,e,r);return G(this,ge,s.xOffset),s});q(this,zt,e=>{const t=a(this,Dt).filter(r=>r.key===e);return t[0]&&t[0].scale?t[0].scale:0});q(this,un,e=>{const t=a(this,Dt).filter(r=>r.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});q(this,dn,e=>e>a(this,Ot)?a(this,Ot):e<0?0:e);this.initializeFactory(e,t,r,i,o,s,c,d)}initializeFactory(e,t,r,i,o,s,c,d){this.setUniqueName(e),this.setTheme(o),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(r),this.setRange(i),this.setSelectedBin(s),this.setViewFunction(c),this.setProgressFunction(d)}updateContentScale(e){G(this,xt,e)}updateMinDisplayedContent(e){e>=0&&G(this,Vt,e)}setUniqueName(e){G(this,Pe,e)}setHistogramContentMaximum(e){G(this,Ot,e>0?e:1)}setSelectedBin(e){G(this,bn,e||[])}setViewFunction(e){G(this,dt,e)}setProgressFunction(e){G(this,ht,e)}setSection(e){e&&(e.xOffset&&G(this,ge,a(this,bt).call(this,e==null?void 0:e.xOffset,a(this,Xe))),e.yOffset&&!histogram._typename.includes("TH1")&&G(this,xe,a(this,bt).call(this,e==null?void 0:e.yOffset,a(this,qe))),e.zOffset&&histogram._typename.includes("TH3")&&G(this,Q,a(this,bt).call(this,e==null?void 0:e.zOffset,a(this,ut))))}setHistogram(e){var t,r,i,o,s,c,d,f,u,p,S,C,j,b,m,k;G(this,te,e),G(this,ct,e==null?void 0:e._typename),G(this,ge,1),G(this,xe,1),G(this,Q,1),G(this,Xe,0),G(this,qe,0),G(this,ut,0),G(this,vt,1),G(this,Pt,1),G(this,Sn,1),G(this,Xe,(t=e==null?void 0:e.fXaxis)==null?void 0:t.fNbins),G(this,vt,(((r=e==null?void 0:e.fXaxis)==null?void 0:r.fXmax)-((i=e==null?void 0:e.fXaxis)==null?void 0:i.fXmin))/((o=e==null?void 0:e.fXaxis)==null?void 0:o.fNbins)),a(this,Ue).xInitial=(s=e==null?void 0:e.fXaxis)==null?void 0:s.fXmin,G(this,ge,a(this,bt).call(this,a(this,ge),a(this,Xe))),(c=e==null?void 0:e._typename)!=null&&c.includes("TH1")||(G(this,qe,(d=e==null?void 0:e.fYaxis)==null?void 0:d.fNbins),G(this,Pt,(((f=e==null?void 0:e.fYaxis)==null?void 0:f.fXmax)-((u=e==null?void 0:e.fYaxis)==null?void 0:u.fXmin))/((p=e==null?void 0:e.fYaxis)==null?void 0:p.fNbins)),a(this,Ue).yInitial=(S=e==null?void 0:e.fYaxis)==null?void 0:S.fXmin,G(this,xe,a(this,bt).call(this,a(this,xe),a(this,qe)))),(C=e==null?void 0:e._typename)!=null&&C.includes("TH3")&&(G(this,ut,(j=e==null?void 0:e.fZaxis)==null?void 0:j.fNbins),G(this,Sn,((b=e==null?void 0:e.fZaxis)==null?void 0:b.fXmax)/((m=e==null?void 0:e.fZaxis)==null?void 0:m.fNbins)),a(this,Ue).zInitial=(k=e==null?void 0:e.fZaxis)==null?void 0:k.fXmin,G(this,Q,a(this,bt).call(this,a(this,Q),a(this,ut)))),this.setHistogramContentMaximum(e==null?void 0:e.fMaximum)}setRange(e){e&&(e<4&&G(this,Oe,4),G(this,Oe,e))}setTheme(e){G(this,oe,new Bi(e))}getElements(){let e={};return a(this,ct).includes("TH2")?e=a(this,Gn).call(this):a(this,ct).includes("TH3")?e=a(this,Zn).call(this):a(this,ct).includes("TH1")&&(e=a(this,qn).call(this)),e}updateSection(e,t,r){if(a(this,ct).includes("TH3"))return a(this,Kn).call(this,e,t,r);if(a(this,ct).includes("TH2"))return a(this,Jn).call(this,e,t,r);if(a(this,ct).includes("TH1"))return a(this,Qn).call(this,e,t,r)}}Pe=new WeakMap,bn=new WeakMap,te=new WeakMap,ct=new WeakMap,oe=new WeakMap,ge=new WeakMap,xe=new WeakMap,Q=new WeakMap,Xe=new WeakMap,qe=new WeakMap,ut=new WeakMap,vt=new WeakMap,Pt=new WeakMap,Sn=new WeakMap,Oe=new WeakMap,Ue=new WeakMap,dt=new WeakMap,ht=new WeakMap,Ot=new WeakMap,xt=new WeakMap,Vt=new WeakMap,tn=new WeakMap,Wt=new WeakMap,de=new WeakMap,Dt=new WeakMap,bt=new WeakMap,nn=new WeakMap,ot=new WeakMap,Zn=new WeakMap,Gn=new WeakMap,qn=new WeakMap,rn=new WeakMap,on=new WeakMap,sn=new WeakMap,an=new WeakMap,ln=new WeakMap,cn=new WeakSet,nr=function(e,t,r,i,o,s,c,d){d++;const f=135,u=-(i+5.5),p=(a(this,Q)?a(this,Q)+7:7)+a(this,de).zOffset,S=a(this,xe)+a(this,Oe)/2+10;e.titles[0]={key:195e3+a(this,Pe),text:{value:a(this,te).fTitle,color:a(this,oe).getPrimaryFontColor()},rotation:{x:0,y:f,z:0},position:{x:u,y:p+9,z:S},innerText:{value:"Press V to show projections or controls",color:a(this,oe).getPrimaryFontColor()}},d++;const C=a(this,Oe)>a(this,Xe)?a(this,Xe)+1:a(this,Oe),j=a(this,Oe)>a(this,qe)?a(this,qe)+1:a(this,Oe);e.ground={key:22500+d+a(this,Pe),scale:{width:C+8,height:.2,depth:j+8},animation:{fromX:a(this,ge)+C*.5-1+a(this,de).xOffset,fromY:-.5,fromZ:a(this,xe)+j*.5-.5+a(this,de).yOffset,toX:a(this,ge)+C*.5-1,toY:-.5,toZ:a(this,xe)+j*.5-.5}},d++,e.banners[1]={key:24e4+d+a(this,Pe),geometry:{width:.1,height:15,depth:22},position:{x:u,y:p,z:S},rotation:{x:0,y:-f,z:0},material:{color:"#ffffff",transparent:!0}}},Kn=new WeakMap,Jn=new WeakMap,Qn=new WeakMap,zt=new WeakMap,un=new WeakMap,dn=new WeakMap;const da=()=>{var O,v,U,P,I,Y;let n;const e=x.useContext(Ct),{selectedView:t,onViewChange:r,onProgress:i,section:o,selectedBins:s}=e.states;e.experimental;const[c]=et("ndmvrSchema"),d=(v=(O=c==null?void 0:c.histogram)==null?void 0:O.properties.range)==null?void 0:v.value,f=(P=(U=c==null?void 0:c.histogram)==null?void 0:U.properties.theme)==null?void 0:P.value,u=(Y=(I=c==null?void 0:c.histogram)==null?void 0:I.properties.scale)==null?void 0:Y.value,{id:p,histogram:S,projPanelIds:C}=e.data,b=x.useRef(new ua(p,S,o||null,s,r,i)).current,[m,k]=x.useState(b.getElements()),[w]=x.useState(1),z=A=>{S._typename.includes(A.name)&&(A.axis?b.updateSection(A.axis,A.increment,A.defaultRange):A.minValue&&b.updateMinDisplayedContent(A.minValue)),A.change,k(b.getElements())};return x.useEffect(()=>{b.setUniqueName(p),k(b.getElements())},[p]),x.useEffect(()=>{b.updateContentScale(u),k(b.getElements())},[u]),x.useEffect(()=>{b.setHistogram(S),k(b.getElements())},[S]),x.useEffect(()=>{b.setSection(o),k(b.getElements())},[o]),x.useEffect(()=>{b.setRange(d),k(b.getElements())},[d]),x.useEffect(()=>{b.setTheme(f),k(b.getElements())},[f]),x.useEffect(()=>{b.setSelectedBin(s),k(b.getElements())},[s]),x.useEffect(()=>{b.setViewFunction(r),k(b.getElements())},[r]),x.useEffect(()=>{b.setViewFunction(r),k(b.getElements())},[t]),x.useEffect(()=>{b.setProgressFunction(i),k(b.getElements())},[i]),x.useEffect(()=>{if(S._typename.includes("TH2")?n=ze.getChangedSection().subscribe(z):S._typename.includes("TH3")?n=Me.getChangedSection().subscribe(z):S._typename.includes("TH1")&&(n=at.getChangedSection().subscribe(z)),n)return()=>n.unsubscribe()},[m,u]),m!=null&&m.bins?h.jsxs("a-entity",{"histogram-control":!0,children:[m.bins.map(A=>h.jsx("a-box",{id:A.id,class:"clickable",material:`color: ${A.color}; transparent: true`,binth:A.binData,mouseevent:!0,geometry:`width:${A.animation.toWidth}; height:${A.animation.toHeight}; depth:${A.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${A.animation2.fromX} ${A.animation2.fromY} ${A.animation2.fromZ}; to: ${A.animation2.toX} ${A.animation2.toY} ${A.animation2.toZ}; dur: 800;`,children:h.jsx("a-text",{value:A.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${A.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+(w===1?-1:1)*A.animation.toHeight/2} 0`})},A.id)),m.labels.map(A=>h.jsx("a-entity",{geometry:`primitive: ${A.geometry.primitive}; width:${A.geometry.width}; height:${A.geometry.height};`,text:`color: ${A.text.color}; width: ${A.text.width}; height: ${A.text.height}; align:center; xOffset:${A.axis==="x"?-(A.text.width/12):0};baseline:top;`,"label-handler":`value: ${A.labelHandler.value}; delay:${A.labelHandler.delay};`,rotation:`${A.rotation.x} ${A.rotation.y} ${A.rotation.z}`,material:`color: ${A.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: ${A.animation.fromX} ${A.animation.fromY} ${A.animation.fromZ}; to: ${A.animation.toX} ${A.animation.toY} ${A.animation.toZ}; dur: 1005;`},A.key)),m.titles.map(A=>h.jsxs("a-entity",{rotation:`${A.rotation.x} ${A.rotation.y} ${A.rotation.z}`,position:`${A.position.x} ${A.position.y} ${A.position.z}`,material:"transparent: true",children:[h.jsx("a-text",{value:A.text.value,position:"0 0.5 0",width:"20",height:"auto",align:"center",color:A.text.color}),h.jsx("a-text",{value:A.innerText.value,position:"0 -0.5 0",width:"15",height:"auto",align:"center",color:A.innerText.color}),h.jsx("a-entity",{text:`value: ${A.innerText.value}; color: ${A.innerText.color}; width: 15; height:auto; align:center;`,position:"0 -0.5 0",material:"transparent: true"}),h.jsx("a-entity",{geometry:"primitive: plane; width:15; height:2;",position:"0 0 -0.1",material:"opacity: 0.9; color: white; transparent: true"})]},A.key)),m.axisLabels.map(A=>h.jsx("a-entity",{id:A.id,text:`value: ${A.text.value}; color: "${A.text.color}"; width: 10; height:auto; align:center;`,rotation:`${A.rotation.x} ${A.rotation.y} ${A.rotation.z}`,animation:`property: position; from: ${A.animation.fromX} ${A.animation.fromY} ${A.animation.fromZ}; to: ${A.animation.toX} ${A.animation.toY} ${A.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},A.key)),m.ground&&h.jsx("a-box",{width:m.ground.scale.width,material:"color: #fafafa",height:m.ground.scale.height,depth:m.ground.scale.depth,animation:`property: position; from: ${m.ground.animation.fromX} ${m.ground.animation.fromY} ${m.ground.animation.fromZ};
379
379
  to:
380
- ${y.ground.animation.toX} ${y.ground.animation.toY} ${y.ground.animation.toZ}; dur: 1000;`},y.ground.key),y.banners.map(T=>f.jsx("a-box",{id:P[0]?P[0]:"panel_0",geometry:`width:${T.geometry.width}; height:${T.geometry.height}; depth:${T.geometry.depth};`,position:`${T.position.x} ${T.position.y} ${T.position.z}`,rotation:`${T.rotation.x} ${T.rotation.y} ${T.rotation.z}`,material:`color: ${T.material.color}; transparent: ${T.material.transparent}`},P[0]?P[0]:"panel_0"))]}):f.jsx("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(r){function e(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return r[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var t={};return e.m=r,e.c=t,e.p="",e(0)})([function(r,e){if(typeof be>"u")throw new Error("Component attempted to register before AFRAME was available.");be.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 n in this.assets)for(var i=0;i<this.assets[n].length;i++){var o=this.assets[n][i];if(o.type=="mesh")for(var a=0,c=o.vertices.length;a<c;a++)o.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(n,i){var o;if(n=="color"||n=="none")o=new THREE.Color(this.environmentData.skyColor);else if(n=="gradient")o=new THREE.Color(this.environmentData.horizonColor);else if(n=="atmosphere"){var a=[1,.5,.22,.1,.05,0],c=["#C0CDCF","#81ADC5","#525e62","#2a2d2d","#141616","#000"];if(i<=0)return"#000";i=Math.min(1,i);for(var d=0;d<a.length;d++)if(i>a[d]){var h=new THREE.Color(c[d-1]),u=new THREE.Color(c[d]),g=(i-a[d])/(a[d-1]-a[d]);u.lerp(h,g),o=u;break}}return o.multiplyScalar(.9),o.lerp(new THREE.Color(this.data.groundColor),.3),"#"+o.getHexString()},update:function(n){var i;this.data.preset?(i=be.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)):(i=n,this.environmentData=this.data);var o=this.environmentData.background;o!=null&&this.sky.setAttribute("src",o);var a=this.environmentData.skyType,c=new THREE.Vector3(this.environmentData.lightPosition.x,this.environmentData.lightPosition.y,this.environmentData.lightPosition.z);if(c.normalize(),this.sunlight){if(this.sunlight.setAttribute("position",this.environmentData.lightPosition),a!="atmosphere"){var d=new THREE.Color(this.environmentData.skyColor);d.r=(d.r+1)/2,d.g=(d.g+1)/2,d.b=(d.b+1)/2,this.hemilight.setAttribute("light",{color:"#"+d.getHexString()}),this.sunlight.setAttribute("light",{intensity:.6}),this.hemilight.setAttribute("light",{intensity:.6})}else this.sunlight.setAttribute("light",{intensity:.1+.5*c.y}),this.hemilight.setAttribute("light",{intensity:.1+.5*c.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!==i.skyType||this.environmentData.skyColor!=i.skyColor||this.environmentData.horizonColor!=i.horizonColor){var h={};h.shader={none:"flat",color:"flat",gradient:"gradientshader",atmosphere:"skyshader"}[a],this.stars&&this.stars.setAttribute("visible",a=="atmosphere"),a=="color"?(h.color=this.environmentData.skyColor,h.fog=!1):a=="gradient"&&(h.topColor=this.environmentData.skyColor,h.bottomColor=this.environmentData.horizonColor),this.sky.setAttribute("material",h)}a=="atmosphere"&&(this.sky.setAttribute("material",{sunPosition:c}),this.setStars(2e3*(1-Math.max(0,8*(c.y+.08))))),this.environmentData.fog>0?this.el.sceneEl.setAttribute("fog",{color:this.getFogColor(a,c.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 u=!this.groundGeometry||this.environmentData.seed!=i.seed||this.environmentData.ground!=i.ground||this.environmentData.playArea!=i.playArea||this.environmentData.flatShading!=i.flatShading;(u||this.environmentData.groundColor!=i.groundColor||this.environmentData.groundColor2!=i.groundColor2||this.environmentData.groundYScale!=i.groundYScale||this.environmentData.groundTexture!=i.groundTexture||this.environmentData.gridColor!=i.gridColor||this.environmentData.grid!=i.grid)&&(this.updateGround(u),this.hemilight&&this.hemilight.setAttribute("light",{groundColor:this.environmentData.groundColor})),this.environmentData.seed==i.seed&&this.environmentData.dressingOnPlayArea==i.dressingOnPlayArea&&this.environmentData.dressing==i.dressing&&this.environmentData.flatShading==i.flatShading&&this.environmentData.dressingAmount==i.dressingAmount&&this.environmentData.dressingScale==i.dressingScale&&this.environmentData.dressingColor==i.dressingColor&&this.environmentData.dressingVariance.x==i.dressingVariance.x&&this.environmentData.dressingVariance.y==i.dressingVariance.y&&this.environmentData.dressingVariance.z==i.dressingVariance.z&&this.environmentData.dressingUniformScale==i.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 n="{";for(var i in this.schema)if(i!="preset"){n+=i+": ";var o=this.schema[i].type;n+=o=="vec3"?"{ x: "+this.environmentData[i].x+", y: "+this.environmentData[i].y+", z: "+this.environmentData[i].z+"}":o=="string"||o=="color"?'"'+this.environmentData[i]+'"':this.environmentData[i],n+=", "}n+="}",console.log(n)},dumpParametersDiff:function(){function n(g){return Math.floor(1e3*g)/1e3}var i=[],o=this.data.preset!="none"&&this.presets[this.data.preset];o&&i.push("preset: "+this.data.preset);for(var a in this.schema)if(!(a=="preset"||o&&o[a]===void 0)){var c=o?o[a]:this.schema[a].default,d=this.environmentData[a],h=this.schema[a].type;if(h=="vec3"){var u=c;typeof c=="string"&&(c=c.split(" "),u={x:c[0],y:c[1],z:c[2]}),n(u.x)==n(d.x)&&n(u.y)==n(d.y)&&n(u.z)==n(d.z)||i.push(a+": "+n(d.x)+" "+n(d.y)+" "+n(d.z))}else c!=d&&(this.schema[a].type=="number"&&(d=n(d)),i.push(a+": "+d))}},random:function(n){return parseFloat("0."+Math.sin(9999*this.environmentData.seed*n).toString().substr(7))},updateGround:function(n){var i=64;if(n){var o=this.environmentData.ground!="none";if(this.ground.setAttribute("visible",o),!o)return;this.groundGeometry||(this.groundGeometry=new THREE.PlaneGeometry(this.STAGE_SIZE+2,this.STAGE_SIZE+2,i-1,i-1));for(var a=new t(this.environmentData.seed),c=this.groundGeometry.attributes.position.array,d=c.length,h=10,u=h/i,g=0,E=0,P=2;P<d;P+=3)if(this.environmentData.ground!="flat"){var A;switch(this.environmentData.ground){case"hills":A=Math.max(0,a.noise(g,E,0));break;case"canyon":A=.2+.8*a.noise(g,E,0),A=Math.min(1,10*Math.pow(A,2));break;case"spikes":A=this.random(P)<.02?this.random(P+1):0;break;case"noise":A=this.random(P)<.35?this.random(P+1):0}A+=.1*this.random(P+2);var S=2*g/h-1,y=2*E/h-1,_=this.environmentData.playArea;S=Math.max(0,Math.min(1,(Math.abs(S)-(_-.9))*(1/_))),y=Math.max(0,Math.min(1,(Math.abs(y)-(_-.9))*(1/_))),A*=S>y?S:y,A<.01&&(A=0),c[P]=A,g+=u,g>=10&&(g=0,E+=u)}else c[P]=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 C=2048,$=20,D=this.STAGE_SIZE/$;this.groundCanvas&&this.groundCanvas.width==C||(this.gridCanvas=document.createElement("canvas"),this.gridCanvas.width=C,this.gridCanvas.height=C,this.gridTexture=new THREE.Texture(this.gridCanvas),this.gridTexture.wrapS=THREE.RepeatWrapping,this.gridTexture.wrapT=THREE.RepeatWrapping,this.gridTexture.repeat.set(D,D),this.groundCanvas=document.createElement("canvas"),this.groundCanvas.width=C,this.groundCanvas.height=C,this.groundTexture=new THREE.Texture(this.groundCanvas),this.groundTexture.wrapS=THREE.RepeatWrapping,this.groundTexture.wrapT=THREE.RepeatWrapping,this.groundTexture.repeat.set(D,D),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 b=this.groundCanvas.getContext("2d"),G=this.gridCanvas.getContext("2d");if(this.drawTexture(b,C,$),G.fillStyle="#000000",G.fillRect(0,0,C,C),this.drawGrid(G,C,$),this.groundTexture.needsUpdate=!0,this.gridTexture.needsUpdate=!0,n){var O=new THREE.Mesh(this.groundGeometry,this.groundMaterial);this.ground.setObject3D("mesh",O)}else this.ground.getObject3D("mesh").material=this.groundMaterial;this.ground.setAttribute("shadow",{cast:!1,receive:this.environmentData.shadow})},drawGrid:function(n,i,o){if(this.environmentData.grid!="none"){var a,c,d,h=Math.floor(o/2),u=i/(o/2);switch(n.fillStyle=this.environmentData.gridColor,this.environmentData.grid){case"1x1":case"2x2":for(this.environmentData.grid=="1x1"&&(h*=2,u=i/o),a=0;a<h;a++)d=Math.floor(a*u),n.fillRect(0,d,i,1),n.fillRect(d,0,1,i);break;case"crosses":var g=Math.floor(u/20);for(a=0;a<h+1;a++)for(d=Math.floor(a*u),c=0;c<h+1;c++){var E=Math.floor(-g+c*u);n.fillRect(E,d,2*g,1),n.fillRect(d,E,1,2*g)}break;case"dots":for(a=0;a<h+1;a++)for(c=0;c<h+1;c++)n.beginPath(),n.arc(Math.floor(c*u),Math.floor(a*u),4,0,2*Math.PI),n.fill();break;case"xlines":for(a=0;a<h;a++)n.fillRect(Math.floor(a*u),0,1,i);break;case"ylines":for(a=0;a<h;a++)n.fillRect(0,Math.floor(a*u),i,1)}}},drawTexture:function(n,i,o){n.fillStyle=this.environmentData.groundColor,n.fillRect(0,0,i,i);var a,c,d,h,u,g,E;if(this.environmentData.groundTexture!="none")switch(this.environmentData.groundTexture){case"checkerboard":n.fillStyle=this.environmentData.groundColor2;var P=Math.floor(o/2),A=i/(o/2);for(a=0;a<P+1;a+=2)for(var S=0;S<P+1;S++)n.fillRect(Math.floor((a+S%2)*A),Math.floor(S*A),Math.floor(A),Math.floor(A));break;case"squares":var y=16,_=i/y;for(d=new THREE.Color(this.environmentData.groundColor),h=new THREE.Color(this.environmentData.groundColor2),a=0;a<y*y;a++)c=this.random(a+3)>.5?d.clone():h.clone(),c.addScalar(.1*this.random(a+3)-.05),n.fillStyle="#"+c.getHexString(),n.fillRect(a%y*_,Math.floor(a/y)*_,_,_);break;case"noise":g=n.getImageData(0,0,i,i),u=g.data,d=new THREE.Color(this.environmentData.groundColor),h=new THREE.Color(this.environmentData.groundColor2);var C=new THREE.Color(h.r-d.r,h.g-d.g,h.b-d.b),$=new t;for(a=0,S=0,E=u.length;a<E;a+=4,S++){var D=$.noise(S%i/i*3,S/i/i*3,0);u[a+0]=Math.floor(255*(d.r+C.r*D)),u[a+1]=Math.floor(255*(d.g+C.g*D)),u[a+2]=Math.floor(255*(d.b+C.b*D))}n.putImageData(g,0,0);break;case"walkernoise":var b=Math.floor(i/2),G=document.createElement("canvas");G.width=b,G.height=b;var O=G.getContext("2d");O.fillStyle=this.environmentData.groundColor,O.fillRect(0,0,b,b),g=O.getImageData(0,0,b,b),u=g.data,d=new THREE.Color(this.environmentData.groundColor),h=new THREE.Color(this.environmentData.groundColor2);var I=[],X=1e3;for(a=0;a<X;a++)c=d.clone().lerp(h,Math.random()),I.push({x:Math.random()*b,y:Math.random()*b,r:Math.floor(255*c.r),g:Math.floor(255*c.g),b:Math.floor(255*c.b)});for(var T=5e3,ee=0;ee<T;ee++)for(a=0;a<X;a++){var F=I[a],N=4*Math.floor(F.y*b+F.x);u[N+0]=F.r,u[N+1]=F.g,u[N+2]=F.b,F.x+=Math.floor(3*Math.random())-1,F.y+=Math.floor(3*Math.random())-1,F.x>=b&&(F.x=F.x-b),F.y>=b&&(F.y=F.y-b),F.x<0&&(F.x=b+F.x),F.y<0&&(F.y=b+F.y)}O.putImageData(g,0,0),n.drawImage(G,0,0,i,i)}},getAssetGeometry:function(n){function i(_,C){for(var $=(new THREE.Vector3,_.attributes.position.array),D=$.length,b=0;b<D;b+=3)$[b]=(h.random(b)-.5)*C,$[b+1]=(h.random(b+D)-.5)*C,$[b+2]=(h.random(b+2*D)-.5)*C;_.attributes.position.needsUpdate=!0}if(!n)return null;for(var o,a,c,d=[],h=this,u=0;u<n.length;u++)if(n[u].type=="lathe"){var g=-99999,E=[];for(c=n[u].vertices,o=0;o<c.length;o+=2)E.push(new THREE.Vector2(c[o],c[o+1])),c[o+1]>g&&(g=c[o+1]);a=new THREE.LatheGeometry(E,n[u].segments||8),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI,0,0))),a.applyMatrix4(new THREE.Matrix4().makeTranslation(0,g,0)),a=a.toNonIndexed(),d.push(a)}else if(n[u].type=="extrude"){var P=new THREE.Shape;for(c=n[u].vertices,o=0;o<c.length;o+=2)o==0?P.moveTo(c[o],c[o+1]):P.lineTo(c[o],c[o+1]);a=new THREE.ExtrudeGeometry(P,{amount:1,bevelEnabled:!1}),a.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI/2,0,0))),n[u].noise&&i(a,n[u].noise),d.push(a)}else if(n[u].type=="mesh"){a=new THREE.BufferGeometry,c=n[u].vertices;var A=n[u].faces,S=new Float32Array(c);if(a.setIndex(A),a.setAttribute("position",new THREE.BufferAttribute(S,3)),n[u].mirror){var y=a.clone();y.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(0,Math.PI,0))),a=THREE.BufferGeometryUtils.mergeBufferGeometries([a,y])}n[u].noise&&i(a,n[u].noise),a=a.toNonIndexed(),a.computeVertexNormals(),d.push(a)}return d},updateDressing:function(){var n=new THREE.Object3D,i=[];if(this.dressing.setAttribute("visible",this.environmentData.dressing!="none"),this.environmentData.dressing!="none"){var o;switch(this.environmentData.dressing){case"cubes":o=[new THREE.BoxGeometry(1,1,1)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"pyramids":o=[new THREE.ConeGeometry(1,1,4,1,!0)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"cylinders":o=[new THREE.CylinderGeometry(.5,.5,1,8,1,!0)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;default:if(o=this.getAssetGeometry(this.assets[this.environmentData.dressing]),!o)return}for(var a=0,c=88343;a<this.environmentData.dressingAmount;a++,c++){var d,h=(o[Math.floor(this.random(33+a)*o.length)].clone,o[Math.floor(this.random(33+a)*o.length)].clone()),u=this.environmentData.dressingScale,g=new THREE.Vector3(this.environmentData.dressingVariance.x,this.environmentData.dressingVariance.y,this.environmentData.dressingVariance.z),E=this.random(c)<this.environmentData.dressingOnPlayArea;d=E?15*this.random(c+1):10+Math.max(g.x,g.z)+10*this.random(c+1)+this.random(c+2)*this.STAGE_SIZE/3;var P=this.random(c+3)*Math.PI*2,A=new THREE.Matrix4,S=this.random(c+4),y=this.environmentData.dressingUniformScale;A.compose(new THREE.Vector3(Math.cos(P)*d,0,Math.sin(P)*d),new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,1,0),(this.random(c+5)-.5)*g.length()*Math.PI*2),new THREE.Vector3(u+(y?S:this.random(c+6))*g.x,u+(y?S:this.random(c+7))*g.y,u+(y?S:this.random(c+8))*g.z)),h.applyMatrix4(A),i.push(h)}var _=THREE.BufferGeometryUtils.mergeBufferGeometries(i);_.attributes.position.needsUpdate=!0;var C=new THREE.MeshLambertMaterial({color:new THREE.Color(this.environmentData.dressingColor)}),$=new THREE.Mesh(_,C);n.add($),this.dressing.setObject3D("mesh",n)}},createStars:function(){for(var n=2e3,i=new THREE.BufferGeometry,o=new Float32Array(3*n),a=this.STAGE_SIZE-1,c=new THREE.Vector3,d=0;d<o.length;d+=3)c.set(this.random(d+23)-.5,this.random(d+24),this.random(d+25)-.5),c.normalize(),c.multiplyScalar(a),o[d]=c.x,o[d+1]=c.y,o[d+2]=c.z;i.setAttribute("position",new THREE.BufferAttribute(o,3)),i.setDrawRange(0,0);var h=new THREE.PointsMaterial({size:.01,color:13421772,fog:!1});this.stars.setObject3D("mesh",new THREE.Points(i,h))},setStars:function(n){this.stars||(this.stars=document.createElement("a-entity"),this.stars.id="stars",this.createStars(),this.el.appendChild(this.stars)),n=Math.floor(Math.min(2e3,Math.max(0,n))),this.stars.getObject3D("mesh").geometry.setDrawRange(0,n)}}),be.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(`
380
+ ${m.ground.animation.toX} ${m.ground.animation.toY} ${m.ground.animation.toZ}; dur: 1000;`},m.ground.key),m.banners.map(A=>h.jsx("a-box",{id:C[0]?C[0]:"panel_0",geometry:`width:${A.geometry.width}; height:${A.geometry.height}; depth:${A.geometry.depth};`,position:`${A.position.x} ${A.position.y} ${A.position.z}`,rotation:`${A.rotation.x} ${A.rotation.y} ${A.rotation.z}`,material:`color: ${A.material.color}; transparent: ${A.material.transparent}`},C[0]?C[0]:"panel_0"))]}):h.jsx("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(n){function e(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return n[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var t={};return e.m=n,e.c=t,e.p="",e(0)})([function(n,e){if(typeof ve>"u")throw new Error("Component attempted to register before AFRAME was available.");ve.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 i=0;i<this.assets[r].length;i++){var o=this.assets[r][i];if(o.type=="mesh")for(var s=0,c=o.vertices.length;s<c;s++)o.vertices[s]/=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,i){var o;if(r=="color"||r=="none")o=new THREE.Color(this.environmentData.skyColor);else if(r=="gradient")o=new THREE.Color(this.environmentData.horizonColor);else if(r=="atmosphere"){var s=[1,.5,.22,.1,.05,0],c=["#C0CDCF","#81ADC5","#525e62","#2a2d2d","#141616","#000"];if(i<=0)return"#000";i=Math.min(1,i);for(var d=0;d<s.length;d++)if(i>s[d]){var f=new THREE.Color(c[d-1]),u=new THREE.Color(c[d]),p=(i-s[d])/(s[d-1]-s[d]);u.lerp(f,p),o=u;break}}return o.multiplyScalar(.9),o.lerp(new THREE.Color(this.data.groundColor),.3),"#"+o.getHexString()},update:function(r){var i;this.data.preset?(i=ve.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)):(i=r,this.environmentData=this.data);var o=this.environmentData.background;o!=null&&this.sky.setAttribute("src",o);var s=this.environmentData.skyType,c=new THREE.Vector3(this.environmentData.lightPosition.x,this.environmentData.lightPosition.y,this.environmentData.lightPosition.z);if(c.normalize(),this.sunlight){if(this.sunlight.setAttribute("position",this.environmentData.lightPosition),s!="atmosphere"){var d=new THREE.Color(this.environmentData.skyColor);d.r=(d.r+1)/2,d.g=(d.g+1)/2,d.b=(d.b+1)/2,this.hemilight.setAttribute("light",{color:"#"+d.getHexString()}),this.sunlight.setAttribute("light",{intensity:.6}),this.hemilight.setAttribute("light",{intensity:.6})}else this.sunlight.setAttribute("light",{intensity:.1+.5*c.y}),this.hemilight.setAttribute("light",{intensity:.1+.5*c.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!==i.skyType||this.environmentData.skyColor!=i.skyColor||this.environmentData.horizonColor!=i.horizonColor){var f={};f.shader={none:"flat",color:"flat",gradient:"gradientshader",atmosphere:"skyshader"}[s],this.stars&&this.stars.setAttribute("visible",s=="atmosphere"),s=="color"?(f.color=this.environmentData.skyColor,f.fog=!1):s=="gradient"&&(f.topColor=this.environmentData.skyColor,f.bottomColor=this.environmentData.horizonColor),this.sky.setAttribute("material",f)}s=="atmosphere"&&(this.sky.setAttribute("material",{sunPosition:c}),this.setStars(2e3*(1-Math.max(0,8*(c.y+.08))))),this.environmentData.fog>0?this.el.sceneEl.setAttribute("fog",{color:this.getFogColor(s,c.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 u=!this.groundGeometry||this.environmentData.seed!=i.seed||this.environmentData.ground!=i.ground||this.environmentData.playArea!=i.playArea||this.environmentData.flatShading!=i.flatShading;(u||this.environmentData.groundColor!=i.groundColor||this.environmentData.groundColor2!=i.groundColor2||this.environmentData.groundYScale!=i.groundYScale||this.environmentData.groundTexture!=i.groundTexture||this.environmentData.gridColor!=i.gridColor||this.environmentData.grid!=i.grid)&&(this.updateGround(u),this.hemilight&&this.hemilight.setAttribute("light",{groundColor:this.environmentData.groundColor})),this.environmentData.seed==i.seed&&this.environmentData.dressingOnPlayArea==i.dressingOnPlayArea&&this.environmentData.dressing==i.dressing&&this.environmentData.flatShading==i.flatShading&&this.environmentData.dressingAmount==i.dressingAmount&&this.environmentData.dressingScale==i.dressingScale&&this.environmentData.dressingColor==i.dressingColor&&this.environmentData.dressingVariance.x==i.dressingVariance.x&&this.environmentData.dressingVariance.y==i.dressingVariance.y&&this.environmentData.dressingVariance.z==i.dressingVariance.z&&this.environmentData.dressingUniformScale==i.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 i in this.schema)if(i!="preset"){r+=i+": ";var o=this.schema[i].type;r+=o=="vec3"?"{ x: "+this.environmentData[i].x+", y: "+this.environmentData[i].y+", z: "+this.environmentData[i].z+"}":o=="string"||o=="color"?'"'+this.environmentData[i]+'"':this.environmentData[i],r+=", "}r+="}",console.log(r)},dumpParametersDiff:function(){function r(p){return Math.floor(1e3*p)/1e3}var i=[],o=this.data.preset!="none"&&this.presets[this.data.preset];o&&i.push("preset: "+this.data.preset);for(var s in this.schema)if(!(s=="preset"||o&&o[s]===void 0)){var c=o?o[s]:this.schema[s].default,d=this.environmentData[s],f=this.schema[s].type;if(f=="vec3"){var u=c;typeof c=="string"&&(c=c.split(" "),u={x:c[0],y:c[1],z:c[2]}),r(u.x)==r(d.x)&&r(u.y)==r(d.y)&&r(u.z)==r(d.z)||i.push(s+": "+r(d.x)+" "+r(d.y)+" "+r(d.z))}else c!=d&&(this.schema[s].type=="number"&&(d=r(d)),i.push(s+": "+d))}},random:function(r){return parseFloat("0."+Math.sin(9999*this.environmentData.seed*r).toString().substr(7))},updateGround:function(r){var i=64;if(r){var o=this.environmentData.ground!="none";if(this.ground.setAttribute("visible",o),!o)return;this.groundGeometry||(this.groundGeometry=new THREE.PlaneGeometry(this.STAGE_SIZE+2,this.STAGE_SIZE+2,i-1,i-1));for(var s=new t(this.environmentData.seed),c=this.groundGeometry.attributes.position.array,d=c.length,f=10,u=f/i,p=0,S=0,C=2;C<d;C+=3)if(this.environmentData.ground!="flat"){var j;switch(this.environmentData.ground){case"hills":j=Math.max(0,s.noise(p,S,0));break;case"canyon":j=.2+.8*s.noise(p,S,0),j=Math.min(1,10*Math.pow(j,2));break;case"spikes":j=this.random(C)<.02?this.random(C+1):0;break;case"noise":j=this.random(C)<.35?this.random(C+1):0}j+=.1*this.random(C+2);var b=2*p/f-1,m=2*S/f-1,k=this.environmentData.playArea;b=Math.max(0,Math.min(1,(Math.abs(b)-(k-.9))*(1/k))),m=Math.max(0,Math.min(1,(Math.abs(m)-(k-.9))*(1/k))),j*=b>m?b:m,j<.01&&(j=0),c[C]=j,p+=u,p>=10&&(p=0,S+=u)}else c[C]=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,z=20,O=this.STAGE_SIZE/z;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 v=this.groundCanvas.getContext("2d"),U=this.gridCanvas.getContext("2d");if(this.drawTexture(v,w,z),U.fillStyle="#000000",U.fillRect(0,0,w,w),this.drawGrid(U,w,z),this.groundTexture.needsUpdate=!0,this.gridTexture.needsUpdate=!0,r){var P=new THREE.Mesh(this.groundGeometry,this.groundMaterial);this.ground.setObject3D("mesh",P)}else this.ground.getObject3D("mesh").material=this.groundMaterial;this.ground.setAttribute("shadow",{cast:!1,receive:this.environmentData.shadow})},drawGrid:function(r,i,o){if(this.environmentData.grid!="none"){var s,c,d,f=Math.floor(o/2),u=i/(o/2);switch(r.fillStyle=this.environmentData.gridColor,this.environmentData.grid){case"1x1":case"2x2":for(this.environmentData.grid=="1x1"&&(f*=2,u=i/o),s=0;s<f;s++)d=Math.floor(s*u),r.fillRect(0,d,i,1),r.fillRect(d,0,1,i);break;case"crosses":var p=Math.floor(u/20);for(s=0;s<f+1;s++)for(d=Math.floor(s*u),c=0;c<f+1;c++){var S=Math.floor(-p+c*u);r.fillRect(S,d,2*p,1),r.fillRect(d,S,1,2*p)}break;case"dots":for(s=0;s<f+1;s++)for(c=0;c<f+1;c++)r.beginPath(),r.arc(Math.floor(c*u),Math.floor(s*u),4,0,2*Math.PI),r.fill();break;case"xlines":for(s=0;s<f;s++)r.fillRect(Math.floor(s*u),0,1,i);break;case"ylines":for(s=0;s<f;s++)r.fillRect(0,Math.floor(s*u),i,1)}}},drawTexture:function(r,i,o){r.fillStyle=this.environmentData.groundColor,r.fillRect(0,0,i,i);var s,c,d,f,u,p,S;if(this.environmentData.groundTexture!="none")switch(this.environmentData.groundTexture){case"checkerboard":r.fillStyle=this.environmentData.groundColor2;var C=Math.floor(o/2),j=i/(o/2);for(s=0;s<C+1;s+=2)for(var b=0;b<C+1;b++)r.fillRect(Math.floor((s+b%2)*j),Math.floor(b*j),Math.floor(j),Math.floor(j));break;case"squares":var m=16,k=i/m;for(d=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2),s=0;s<m*m;s++)c=this.random(s+3)>.5?d.clone():f.clone(),c.addScalar(.1*this.random(s+3)-.05),r.fillStyle="#"+c.getHexString(),r.fillRect(s%m*k,Math.floor(s/m)*k,k,k);break;case"noise":p=r.getImageData(0,0,i,i),u=p.data,d=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2);var w=new THREE.Color(f.r-d.r,f.g-d.g,f.b-d.b),z=new t;for(s=0,b=0,S=u.length;s<S;s+=4,b++){var O=z.noise(b%i/i*3,b/i/i*3,0);u[s+0]=Math.floor(255*(d.r+w.r*O)),u[s+1]=Math.floor(255*(d.g+w.g*O)),u[s+2]=Math.floor(255*(d.b+w.b*O))}r.putImageData(p,0,0);break;case"walkernoise":var v=Math.floor(i/2),U=document.createElement("canvas");U.width=v,U.height=v;var P=U.getContext("2d");P.fillStyle=this.environmentData.groundColor,P.fillRect(0,0,v,v),p=P.getImageData(0,0,v,v),u=p.data,d=new THREE.Color(this.environmentData.groundColor),f=new THREE.Color(this.environmentData.groundColor2);var I=[],Y=1e3;for(s=0;s<Y;s++)c=d.clone().lerp(f,Math.random()),I.push({x:Math.random()*v,y:Math.random()*v,r:Math.floor(255*c.r),g:Math.floor(255*c.g),b:Math.floor(255*c.b)});for(var A=5e3,V=0;V<A;V++)for(s=0;s<Y;s++){var L=I[s],B=4*Math.floor(L.y*v+L.x);u[B+0]=L.r,u[B+1]=L.g,u[B+2]=L.b,L.x+=Math.floor(3*Math.random())-1,L.y+=Math.floor(3*Math.random())-1,L.x>=v&&(L.x=L.x-v),L.y>=v&&(L.y=L.y-v),L.x<0&&(L.x=v+L.x),L.y<0&&(L.y=v+L.y)}P.putImageData(p,0,0),r.drawImage(U,0,0,i,i)}},getAssetGeometry:function(r){function i(k,w){for(var z=(new THREE.Vector3,k.attributes.position.array),O=z.length,v=0;v<O;v+=3)z[v]=(f.random(v)-.5)*w,z[v+1]=(f.random(v+O)-.5)*w,z[v+2]=(f.random(v+2*O)-.5)*w;k.attributes.position.needsUpdate=!0}if(!r)return null;for(var o,s,c,d=[],f=this,u=0;u<r.length;u++)if(r[u].type=="lathe"){var p=-99999,S=[];for(c=r[u].vertices,o=0;o<c.length;o+=2)S.push(new THREE.Vector2(c[o],c[o+1])),c[o+1]>p&&(p=c[o+1]);s=new THREE.LatheGeometry(S,r[u].segments||8),s.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI,0,0))),s.applyMatrix4(new THREE.Matrix4().makeTranslation(0,p,0)),s=s.toNonIndexed(),d.push(s)}else if(r[u].type=="extrude"){var C=new THREE.Shape;for(c=r[u].vertices,o=0;o<c.length;o+=2)o==0?C.moveTo(c[o],c[o+1]):C.lineTo(c[o],c[o+1]);s=new THREE.ExtrudeGeometry(C,{amount:1,bevelEnabled:!1}),s.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(-Math.PI/2,0,0))),r[u].noise&&i(s,r[u].noise),d.push(s)}else if(r[u].type=="mesh"){s=new THREE.BufferGeometry,c=r[u].vertices;var j=r[u].faces,b=new Float32Array(c);if(s.setIndex(j),s.setAttribute("position",new THREE.BufferAttribute(b,3)),r[u].mirror){var m=s.clone();m.applyMatrix4(new THREE.Matrix4().makeRotationFromEuler(new THREE.Euler(0,Math.PI,0))),s=THREE.BufferGeometryUtils.mergeBufferGeometries([s,m])}r[u].noise&&i(s,r[u].noise),s=s.toNonIndexed(),s.computeVertexNormals(),d.push(s)}return d},updateDressing:function(){var r=new THREE.Object3D,i=[];if(this.dressing.setAttribute("visible",this.environmentData.dressing!="none"),this.environmentData.dressing!="none"){var o;switch(this.environmentData.dressing){case"cubes":o=[new THREE.BoxGeometry(1,1,1)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"pyramids":o=[new THREE.ConeGeometry(1,1,4,1,!0)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;case"cylinders":o=[new THREE.CylinderGeometry(.5,.5,1,8,1,!0)],o[0].applyMatrix4(new THREE.Matrix4().makeTranslation(0,.5,0));break;default:if(o=this.getAssetGeometry(this.assets[this.environmentData.dressing]),!o)return}for(var s=0,c=88343;s<this.environmentData.dressingAmount;s++,c++){var d,f=(o[Math.floor(this.random(33+s)*o.length)].clone,o[Math.floor(this.random(33+s)*o.length)].clone()),u=this.environmentData.dressingScale,p=new THREE.Vector3(this.environmentData.dressingVariance.x,this.environmentData.dressingVariance.y,this.environmentData.dressingVariance.z),S=this.random(c)<this.environmentData.dressingOnPlayArea;d=S?15*this.random(c+1):10+Math.max(p.x,p.z)+10*this.random(c+1)+this.random(c+2)*this.STAGE_SIZE/3;var C=this.random(c+3)*Math.PI*2,j=new THREE.Matrix4,b=this.random(c+4),m=this.environmentData.dressingUniformScale;j.compose(new THREE.Vector3(Math.cos(C)*d,0,Math.sin(C)*d),new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,1,0),(this.random(c+5)-.5)*p.length()*Math.PI*2),new THREE.Vector3(u+(m?b:this.random(c+6))*p.x,u+(m?b:this.random(c+7))*p.y,u+(m?b:this.random(c+8))*p.z)),f.applyMatrix4(j),i.push(f)}var k=THREE.BufferGeometryUtils.mergeBufferGeometries(i);k.attributes.position.needsUpdate=!0;var w=new THREE.MeshLambertMaterial({color:new THREE.Color(this.environmentData.dressingColor)}),z=new THREE.Mesh(k,w);r.add(z),this.dressing.setObject3D("mesh",r)}},createStars:function(){for(var r=2e3,i=new THREE.BufferGeometry,o=new Float32Array(3*r),s=this.STAGE_SIZE-1,c=new THREE.Vector3,d=0;d<o.length;d+=3)c.set(this.random(d+23)-.5,this.random(d+24),this.random(d+25)-.5),c.normalize(),c.multiplyScalar(s),o[d]=c.x,o[d+1]=c.y,o[d+2]=c.z;i.setAttribute("position",new THREE.BufferAttribute(o,3)),i.setDrawRange(0,0);var f=new THREE.PointsMaterial({size:.01,color:13421772,fog:!1});this.stars.setObject3D("mesh",new THREE.Points(i,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)}}),ve.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(`
381
381
  `),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(`
382
- `)}),be.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(`
382
+ `)}),ve.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(`
383
383
  `),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(`
384
- `)});var t=function(n){var i;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 o;for(o=0;o<256;o++)i=parseFloat("0."+Math.sin(9999*n*o).toString().substr(7)),this.p[o]=Math.floor(256*i);for(this.perm=[],o=0;o<512;o++)this.perm[o]=this.p[255&o]};t.prototype.dot=function(n,i,o,a){return n[0]*i+n[1]*o+n[2]*a},t.prototype.mix=function(n,i,o){return(1-o)*n+o*i},t.prototype.fade=function(n){return n*n*n*(n*(6*n-15)+10)},t.prototype.noise=function(n,i,o){var a=Math.floor(n),c=Math.floor(i),d=Math.floor(o);n-=a,i-=c,o-=d,a&=255,c&=255,d&=255;var h=this.perm[a+this.perm[c+this.perm[d]]]%12,u=this.perm[a+this.perm[c+this.perm[d+1]]]%12,g=this.perm[a+this.perm[c+1+this.perm[d]]]%12,E=this.perm[a+this.perm[c+1+this.perm[d+1]]]%12,P=this.perm[a+1+this.perm[c+this.perm[d]]]%12,A=this.perm[a+1+this.perm[c+this.perm[d+1]]]%12,S=this.perm[a+1+this.perm[c+1+this.perm[d]]]%12,y=this.perm[a+1+this.perm[c+1+this.perm[d+1]]]%12,_=this.dot(this.grad3[h],n,i,o),C=this.dot(this.grad3[P],n-1,i,o),$=this.dot(this.grad3[g],n,i-1,o),D=this.dot(this.grad3[S],n-1,i-1,o),b=this.dot(this.grad3[u],n,i,o-1),G=this.dot(this.grad3[A],n-1,i,o-1),O=this.dot(this.grad3[E],n,i-1,o-1),I=this.dot(this.grad3[y],n-1,i-1,o-1),X=this.fade(n),T=this.fade(i),ee=this.fade(o),F=this.mix(_,C,X),N=this.mix(b,G,X),L=this.mix($,D,X),K=this.mix(O,I,X),q=this.mix(F,L,T),ye=this.mix(N,K,T),me=this.mix(q,ye,ee);return me}}]);function js(r){const e=(r==null?void 0:r.scene)||"labs";return f.jsx(v.Fragment,{children:f.jsx("a-entity",{environment:`preset: ${e};`})})}const Di={histogram:{description:"test2 description",properties:{theme:{type:"select",value:"def",options:["def","fire","nebula","rainforest","nature","water","sunflower","blood","magma","jupiter","magic"],description:"second input"},range:{type:"select",value:4,options:[4,5,6,7,8,9,10,11,12,13,14,20,30,40,50,100]},scale:{name:"scale",type:"number",value:1,step:1,description:"input"}}},scene:{description:"test2 description",properties:{scene:{name:"scene",value:"ndmvr",type:"select",options:["ndmvr","govorun","cern","default","labs","labs2","contact","egypt","checkerboard","forest","goaland","yavapai","goldmine","arches","threetowers","poison","tron","japan","dream","volcano","starry","osiris","moon","snow","bow","winter"],description:"second input"}}}},Ds=()=>{let r;const[e,t]=v.useState(!0),[n]=vt("ndmvrInputDevice"),i=o=>{o.changeTabletState&&t(!1)};return v.useEffect(()=>(r=xe.subscribe(i),()=>{r.unsubscribe()}),[]),f.jsxs("a-entity",{children:[n==="keyboard"&&f.jsx("a-entity",{text:"value: Press T to open NDMVR Tablet;color:black;",position:"0.2 0.8 -1"}),n!=="oculus"&&f.jsx("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"})]})},$s=()=>{let r;const{projPanelIds:t}=v.useContext(yt).data,[n,i]=v.useState(0),[o,a]=v.useState(null),[c,d]=vt("ndmvrInputDevice"),[h,u]=v.useState(!1),[g,E]=v.useState(!1),[P,A]=v.useState(!0),S=O=>{O.device?(c!==O.device&&d.setData(O.device),u(!h)):O==="shift"?_():O==="show"&&E(!g)},y=O=>{O.changeTabletState&&A(!1)},_=()=>{let O=n+90;O>=360&&(O=0),i(O)},C=O=>t[O]?t[O]:`panel_${O}`,$=()=>f.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${n} 0; dur: 1000; easing: linear;`,material:"color: white",children:[f.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[f.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press C to show help panels":"Press Button X to show help panels",position:"-20 2.8 1"}),f.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press V to switch to histogram view":"Press Button Y to switch to histogram view",position:"-20 0 1"}),f.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press X to shift panels":"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),f.jsx("a-box",{id:C(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"}),f.jsx("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;"}),f.jsx("a-box",{id:C(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"}),f.jsx("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;"}),f.jsx("a-box",{id:C(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"}),f.jsx("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;"}),f.jsx("a-box",{id:C(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"}),f.jsx("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;"})]}),D=()=>c==="keyboard"?f.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${n} 0; dur: 1000; easing: linear;`,material:"color: white",children:[f.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[f.jsx("a-text",{color:"black",width:"50",value:g?"Press C to show help panels":"Press C to show projection panels",position:"-20 2.8 1"}),f.jsx("a-text",{color:"black",width:"50",value:"Press V to switch to histogram view",position:"-20 0 1"}),f.jsx("a-text",{color:"black",width:"50",value:"Press X to shift panels",position:"-20 -2.8 1"})]}),f.jsx("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"}),f.jsx("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"}),f.jsx("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"}),f.jsx("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"})]}):f.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${n} 0; dur: 1000; easing: linear;`,children:[f.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[f.jsx("a-text",{color:"black",width:"50",value:g?"Press Button X to show help panels":"Press Button X to show projection panels",position:"-20 2.8 1"}),f.jsx("a-text",{color:"black",width:"50",value:"Press Button Y to switch to histogram view",position:"-20 0 1"}),f.jsx("a-text",{color:"black",width:"50",value:"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),f.jsx("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"}),f.jsx("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"}),f.jsx("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"}),f.jsx("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"})]}),b=()=>{const O=document.getElementById(C(0));O&&O.setAttribute("material","opacity",0)},G=()=>{const O=document.getElementById(C(0));O&&O.setAttribute("material","opacity",1)};return v.useEffect(()=>(r=xe.subscribe(y),()=>{r.unsubscribe()}),[]),v.useEffect(()=>(r=Dt.getCameraSubject().subscribe(S),()=>r.unsubscribe()),[h,g,n]),v.useEffect(()=>{const O=document.getElementById("camera");h?(a({x:O.object3D.position.x,y:O.object3D.position.y,z:O.object3D.position.z}),O.object3D.position.y=O.object3D.position.y+30,b()):(O.object3D.position.y=1.6,o!==null&&(O.object3D.position.x=o.x,O.object3D.position.z=o.z,O.object3D.position.y=o.y),G())},[h,c]),f.jsxs("a-entity",{children:[h&&!g&&D(),h&&g&&$()]})},zs=r=>{const{screenWidth:e,screenHeight:t,controller:n}=v.useContext(St),i=()=>f.jsx("a-plane",{color:"white",width:`${e}`,height:`${t}`,position:"0.2 0 -0.1",rotation:"-70 0 0",children:r.children}),o=()=>f.jsx("div",{id:"desktop--newtablet--container",style:{border:"4px solid gray",borderRadius:"8px",position:"absolute",zIndex:1e3,bottom:20,right:20,overflow:"hidden",display:"flex",flexDirection:"row",width:"30vw",height:"40vh",resize:"both",backgroundColor:"lightgray"},children:r.children});return f.jsx(f.Fragment,{children:n==="keyboard"?o():i()})};function Hs(r){let e=0,t=0,n=0,i=0,o=document.getElementById(r.id+"--header");document.getElementById(r.id+"--header")?o.onmousedown=a:r.onmousedown=a;function a(h){h.preventDefault(),n=h.clientX,i=h.clientY,o.style.cursor="grabbing",document.onmouseup=d,document.onmousemove=c}function c(h){h.preventDefault(),e=n-h.clientX,t=i-h.clientY,n=h.clientX,i=h.clientY,r.style.top=r.offsetTop-t+"px",r.style.left=r.offsetLeft-e+"px"}function d(){document.onmouseup=null,document.onmousemove=null,o.style.cursor="grab"}}const $i=r=>{const{screenWidth:e,screenHeight:t,controller:n,sideBarWidth:i}=v.useContext(St);v.useEffect(()=>{document.getElementById("desktop--newtablet--container")&&Hs(document.getElementById("desktop--newtablet--container"))},[]);const o=()=>f.jsx("a-plane",{color:"#fff8a7",width:i-.004,height:t-.004,position:-e/2+i/2+i*(r.offset||0)+" 0 0.002",rotation:"0 0 0",children:r.children}),a=()=>f.jsx("div",{id:"desktop--newtablet--container--header",style:{height:"100%",overflowY:"auto",cursor:"grab",width:"20%",border:"2px outset ňfdsa",backgroundColor:"white",borderRadius:"4px"},children:r.children});return f.jsx(f.Fragment,{children:n==="keyboard"?a():o()})},Ms=Qe.div`
384
+ `)});var t=function(r){var i;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 o;for(o=0;o<256;o++)i=parseFloat("0."+Math.sin(9999*r*o).toString().substr(7)),this.p[o]=Math.floor(256*i);for(this.perm=[],o=0;o<512;o++)this.perm[o]=this.p[255&o]};t.prototype.dot=function(r,i,o,s){return r[0]*i+r[1]*o+r[2]*s},t.prototype.mix=function(r,i,o){return(1-o)*r+o*i},t.prototype.fade=function(r){return r*r*r*(r*(6*r-15)+10)},t.prototype.noise=function(r,i,o){var s=Math.floor(r),c=Math.floor(i),d=Math.floor(o);r-=s,i-=c,o-=d,s&=255,c&=255,d&=255;var f=this.perm[s+this.perm[c+this.perm[d]]]%12,u=this.perm[s+this.perm[c+this.perm[d+1]]]%12,p=this.perm[s+this.perm[c+1+this.perm[d]]]%12,S=this.perm[s+this.perm[c+1+this.perm[d+1]]]%12,C=this.perm[s+1+this.perm[c+this.perm[d]]]%12,j=this.perm[s+1+this.perm[c+this.perm[d+1]]]%12,b=this.perm[s+1+this.perm[c+1+this.perm[d]]]%12,m=this.perm[s+1+this.perm[c+1+this.perm[d+1]]]%12,k=this.dot(this.grad3[f],r,i,o),w=this.dot(this.grad3[C],r-1,i,o),z=this.dot(this.grad3[p],r,i-1,o),O=this.dot(this.grad3[b],r-1,i-1,o),v=this.dot(this.grad3[u],r,i,o-1),U=this.dot(this.grad3[j],r-1,i,o-1),P=this.dot(this.grad3[S],r,i-1,o-1),I=this.dot(this.grad3[m],r-1,i-1,o-1),Y=this.fade(r),A=this.fade(i),V=this.fade(o),L=this.mix(k,w,Y),B=this.mix(v,U,Y),W=this.mix(z,O,Y),K=this.mix(P,I,Y),J=this.mix(L,W,A),ye=this.mix(B,K,A),me=this.mix(J,ye,V);return me}}]);function ha(n){const e=(n==null?void 0:n.scene)||"labs";return h.jsx(x.Fragment,{children:h.jsx("a-entity",{environment:`preset: ${e};`})})}const Wn={histogram:{description:"test2 description",properties:{theme:{type:"select",value:"def",options:["def","fire","nebula","rainforest","nature","water","sunflower","blood","magma","jupiter","magic"],description:"second input"},range:{type:"select",value:4,options:[4,5,6,7,8,9,10,11,12,13,14,20,30,40,50,100]},scale:{name:"scale",type:"number",value:1,step:1,description:"input"}}},scene:{description:"test2 description",properties:{scene:{name:"scene",value:"ndmvr",type:"select",options:["ndmvr","govorun","cern","default","labs","labs2","contact","egypt","checkerboard","forest","goaland","yavapai","goldmine","arches","threetowers","poison","tron","japan","dream","volcano","starry","osiris","moon","snow","bow","winter"],description:"second input"}}}},fa=()=>{let n;const[e,t]=x.useState(!0),[r]=et("ndmvrInputDevice"),i=o=>{o.changeTabletState&&t(!1)};return x.useEffect(()=>(n=Se.subscribe(i),()=>{n.unsubscribe()}),[]),h.jsxs("a-entity",{children:[r==="keyboard"&&e&&h.jsx("a-entity",{text:"value: Press T to open NDMVR Tablet;color:black;",position:"0.2 0.8 -1"}),r!=="oculus"&&h.jsx("a-entity",{cursor:"fuse: false; fuseTimeout: 2000;",rayOrigin:"mouse",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"})]})},pa=()=>{let n;const{projPanelIds:t}=x.useContext(Ct).data,[r,i]=x.useState(0),[o,s]=x.useState(null),[c,d]=et("ndmvrInputDevice"),[f,u]=x.useState(!1),[p,S]=x.useState(!1),[C,j]=x.useState(!0),b=P=>{P.device?(c!==P.device&&d.setData(P.device),u(!f)):P==="shift"?k():P==="show"&&S(!p)},m=P=>{P.changeTabletState&&j(!1)},k=()=>{let P=r+90;P>=360&&(P=0),i(P)},w=P=>t[P]?t[P]:`panel_${P}`,z=()=>h.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,material:"color: white",children:[h.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[h.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press C to show help panels":"Press Button X to show help panels",position:"-20 2.8 1"}),h.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press V to switch to histogram view":"Press Button Y to switch to histogram view",position:"-20 0 1"}),h.jsx("a-text",{color:"black",width:50,value:c==="keyboard"?"Press X to shift panels":"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),h.jsx("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"}),h.jsx("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;"}),h.jsx("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"}),h.jsx("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;"}),h.jsx("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"}),h.jsx("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;"}),h.jsx("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"}),h.jsx("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=()=>c==="keyboard"?h.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,material:"color: white",children:[h.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[h.jsx("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"}),h.jsx("a-text",{color:"black",width:"50",value:"Press V to switch to histogram view",position:"-20 0 1"}),h.jsx("a-text",{color:"black",width:"50",value:"Press X to shift panels",position:"-20 -2.8 1"})]}),h.jsx("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"}),h.jsx("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"}),h.jsx("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"}),h.jsx("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"})]}):h.jsxs("a-entity",{position:o===null?"0 30 0":`${o.x} 30 ${o.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,children:[h.jsxs("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[h.jsx("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"}),h.jsx("a-text",{color:"black",width:"50",value:"Press Button Y to switch to histogram view",position:"-20 0 1"}),h.jsx("a-text",{color:"black",width:"50",value:"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),h.jsx("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"}),h.jsx("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"}),h.jsx("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"}),h.jsx("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"})]}),v=()=>{const P=document.getElementById(w(0));P&&P.setAttribute("material","opacity",0)},U=()=>{const P=document.getElementById(w(0));P&&P.setAttribute("material","opacity",1)};return x.useEffect(()=>(n=Se.subscribe(m),()=>{n.unsubscribe()}),[]),x.useEffect(()=>(n=Bt.getCameraSubject().subscribe(b),()=>n.unsubscribe()),[f,p,r]),x.useEffect(()=>{const P=document.getElementById("camera");f?(s({x:P.object3D.position.x,y:P.object3D.position.y,z:P.object3D.position.z}),P.object3D.position.y=P.object3D.position.y+30,v()):(P.object3D.position.y=1.6,o!==null&&(P.object3D.position.x=o.x,P.object3D.position.z=o.z,P.object3D.position.y=o.y),U())},[f,c]),h.jsxs("a-entity",{children:[f&&!p&&O(),f&&p&&z()]})},ma=n=>{const{screenWidth:e,screenHeight:t,controller:r}=x.useContext(jt),i=()=>h.jsx("a-plane",{color:"white",width:`${e}`,height:`${t}`,position:"0.2 0 -0.1",rotation:"-70 0 0",children:n.children}),o=()=>h.jsx("div",{id:"desktop--newtablet--container",style:{border:"4px solid gray",borderRadius:"8px",position:"absolute",zIndex:1e3,bottom:20,right:20,overflow:"hidden",display:"flex",flexDirection:"row",width:"30vw",height:"40vh",resize:"both",backgroundColor:"lightgray"},children:n.children});return h.jsx(h.Fragment,{children:r==="keyboard"?o():i()})};function ga(n){let e=0,t=0,r=0,i=0,o=document.getElementById(n.id+"--header");document.getElementById(n.id+"--header")?o.onmousedown=s:n.onmousedown=s;function s(f){f.preventDefault(),r=f.clientX,i=f.clientY,o.style.cursor="grabbing",document.onmouseup=d,document.onmousemove=c}function c(f){f.preventDefault(),e=r-f.clientX,t=i-f.clientY,r=f.clientX,i=f.clientY,n.style.top=n.offsetTop-t+"px",n.style.left=n.offsetLeft-e+"px"}function d(){document.onmouseup=null,document.onmousemove=null,o.style.cursor="grab"}}const Yi=n=>{const{screenWidth:e,screenHeight:t,controller:r,sideBarWidth:i}=x.useContext(jt);x.useEffect(()=>{document.getElementById("desktop--newtablet--container")&&ga(document.getElementById("desktop--newtablet--container"))},[]);const o=()=>h.jsx("a-plane",{color:"#fff8a7",width:i-.004,height:t-.004,position:-e/2+i/2+i*(n.offset||0)+" 0 0.002",rotation:"0 0 0",children:n.children}),s=()=>h.jsx("div",{id:"desktop--newtablet--container--header",style:{height:"100%",overflowY:"auto",cursor:"grab",width:"20%",border:"2px outset ňfdsa",backgroundColor:"white",borderRadius:"4px"},children:n.children});return h.jsx(h.Fragment,{children:r==="keyboard"?s():o()})},ya=rt.div`
385
385
  background: yellow;
386
386
  cursor: pointer;
387
387
  border: 2px outset;
@@ -389,7 +389,7 @@ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})
389
389
  &:hover {
390
390
  background: #e0a0b3;
391
391
  }
392
- `,zi=r=>{const e=v.useContext(St),t=()=>{r.onClick(r.label)},n=()=>f.jsx("a-plane",{interaction:!0,class:"clickable",color:"blue",onClick:()=>t(),height:r.height,width:e.sideBarWidth-.005,position:"0.001 "+r.verPosition+" 0.002",rotation:"0 0 0",children:f.jsx("a-text",{position:"-0.030 0 0",scale:"2.2 2.2 2.2",height:r.height,width:e.sideBarWidth,value:r.label})}),i=()=>f.jsx(Ms,{style:{backgroundColor:r.checked?"orange":"yellow"},onClick:()=>t(),children:r.label});return f.jsx(f.Fragment,{children:e.controller==="keyboard"?i():n()})},Rs=Qe.div`
392
+ `,Li=n=>{const e=x.useContext(jt),t=()=>{n.onClick(n.label)},r=()=>h.jsx("a-plane",{interaction:!0,class:"clickable",color:"blue",onClick:()=>t(),height:n.height,width:e.sideBarWidth-.005,position:"0.001 "+n.verPosition+" 0.002",rotation:"0 0 0",children:h.jsx("a-text",{position:"-0.030 0 0",scale:"2.2 2.2 2.2",height:n.height,width:e.sideBarWidth,value:n.label})}),i=()=>h.jsx(ya,{style:{backgroundColor:n.checked?"orange":"yellow"},onClick:()=>t(),children:n.label});return h.jsx(h.Fragment,{children:e.controller==="keyboard"?i():r()})},va=rt.div`
393
393
  background: #dadaa3;
394
394
  cursor: pointer;
395
395
  border: 2px outset;
@@ -399,32 +399,32 @@ the left controller.`,rotation:"-60 0 0",position:"0.1 0 0","wrap-count":"400"})
399
399
  &:active {
400
400
  border: 2px inset;
401
401
  }
402
- `,Is=r=>{const e=v.useContext(St),t=()=>f.jsx("a-plane",{color:"#b58484",width:e.componentAreaWidth-.002,height:e.screenHeight-.002,position:"0 0 0.001",rotation:"0 0 0",children:r.options.map((i,o)=>f.jsx("a-plane",{onClick:()=>r.onSelect(i),interaction:!0,color:"black",class:"clickable",width:"0.065",height:"0.014",position:`${Math.floor(o/15)*.08-.097} ${.105-o%15*.015} 0.002`,rotation:"0 0 0",children:f.jsx("a-text",{position:"-0.03 0 0",scale:"2.2 2.2 2.2",height:"0.05",width:"0.1",value:i})},o))}),n=()=>f.jsx("div",{style:{overflowY:"auto",border:"2px inset"},children:r.options&&r.options.map((i,o)=>f.jsx(Rs,{onClick:()=>{r.onSelect(i)},children:i},o))});return f.jsx(f.Fragment,{children:e.controller==="keyboard"?n():t()})},Hi=Qe.div`
402
+ `,xa=n=>{const e=x.useContext(jt),t=()=>h.jsx("a-plane",{color:"#b58484",width:e.componentAreaWidth-.002,height:e.screenHeight-.002,position:"0 0 0.001",rotation:"0 0 0",children:n.options.map((i,o)=>h.jsx("a-plane",{onClick:()=>n.onSelect(i),interaction:!0,color:"black",class:"clickable",width:"0.065",height:"0.014",position:`${Math.floor(o/15)*.08-.097} ${.105-o%15*.015} 0.002`,rotation:"0 0 0",children:h.jsx("a-text",{position:"-0.03 0 0",scale:"2.2 2.2 2.2",height:"0.05",width:"0.1",value:i})},o))}),r=()=>h.jsx("div",{style:{overflowY:"auto",border:"2px inset"},children:n.options&&n.options.map((i,o)=>h.jsx(va,{onClick:()=>{n.onSelect(i)},children:i},o))});return h.jsx(h.Fragment,{children:e.controller==="keyboard"?r():t()})},Vi=rt.div`
403
403
  padding: 10px;
404
404
  border: 2px solid gray;
405
405
  border-radius: 6px;
406
406
  &:hover {
407
407
  background-color: lightblue;
408
408
  }
409
- `,Bs=r=>{const e=v.useContext(St),t=()=>{r.onSelect(r.value+r.step||1)},n=()=>{r.onSelect(r.value-r.step||1)},i=()=>f.jsxs("a-plane",{color:"white",width:"0.1",height:"0.1",position:"0 0 0.002",rotation:"0 0 0",children:[f.jsx("a-plane",{width:"0.03",color:"black",interaction:!0,class:"clickable",onClick:()=>n(),height:"0.03",position:"-0.05 0 0.001",children:f.jsx("a-text",{width:"0.03",color:"white",scale:"10 10 10",align:"center",height:"0.03","z-offset":"0.001",value:"<"})}),f.jsx("a-text",{height:"0.1",width:"0.1",align:"center",scale:"10 10 10","z-offset":"0.001",value:r.value}),f.jsx("a-plane",{width:"0.03",color:"black",height:"0.03",interaction:!0,onClick:()=>t(),class:"clickable",position:"0.05 0 0.001",children:f.jsx("a-text",{width:"0.03",color:"white",scale:"10 10 10",height:"0.03",align:"center","z-offset":"0.001",value:">"})})]}),o=()=>f.jsx("div",{style:{display:"flex",width:"300px",height:"100%",justifyContent:"center",alignItems:"center"},children:f.jsxs("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"white",borderRadius:"6px",boxShadow:"inset 0px 0px 2px 2px black"},children:[f.jsx(Hi,{onClick:()=>n(),children:"<"}),f.jsx("p",{style:{padding:"10px"},children:r.value}),f.jsx(Hi,{onClick:()=>t(),children:">"})]})});return f.jsx(f.Fragment,{children:e.controller==="keyboard"?o():i()})},Mi=(r,e,t)=>{switch(r){case"select":return f.jsx(Is,{...e,onSelect:t});case"number":return f.jsx(Bs,{...e,onSelect:t});default:return f.jsx("div",{children:r+" => No such component"})}},Ys=r=>{const e=v.useContext(St),t=()=>f.jsx("a-plane",{color:"gray",width:e.componentAreaWidth,height:e.screenHeight-.002,position:"0.08 0 0.001",rotation:"0 0 0",children:r.children}),n=()=>f.jsx("div",{children:r.children});return f.jsx(f.Fragment,{children:e.controller=="keyboard"?n():t()})},St=v.createContext({screenWidth:.44,screenHeight:.25,componentAreaWidth:.28,sideBarWidth:.08,controller:"keyboard"}),Ri=r=>{const[e,t]=v.useState(r.controller!=="keyboard"),[n,i]=v.useState("histogram"),[o,a]=v.useState("scale"),[c,d]=vt("ndmvrSchema"),h=g=>{d.setData({...c,[n]:{...c[n],properties:{...c[n].properties,[o]:{...c[n].properties[o],value:g}}}})},u=g=>{r.controller==="keyboard"&&t(g.changeTabletState==="flex")};return v.useEffect(()=>{let g=xe.subscribe(u);return()=>g.unsubscribe()},[]),f.jsx(St.Provider,{value:{screenWidth:.44,screenHeight:.25,componentAreaWidth:.28,sideBarWidth:.08,controller:r.controller||"keyboard"},children:e&&c&&f.jsxs(zs,{children:[f.jsx($i,{children:c&&Object.keys(c).map((g,E)=>f.jsx(zi,{i:E+"1",label:g,height:.02,checked:g===n,verPosition:.11-E*.022,onClick:P=>{i(P),Object.keys(c[P].properties).length>0&&a(Object.keys(c[P].properties)[0])}},E))}),n&&f.jsx($i,{offset:1,children:Object.keys(c[n].properties).map((g,E)=>f.jsx(zi,{i:E,label:g,height:.02,checked:g===o,verPosition:.11-E*.022,onClick:P=>{a(P)}},E))}),n&&o&&f.jsx(Ys,{children:r.componentProvider?r.componentProvider(c[n].properties[o].type,r.keyboard,c[n].properties[o],h,Mi):Mi(c[n].properties[o].type,c[n].properties[o],h)})]})})},Ns=()=>{const[r]=vt("ndmvrInputDevice"),{experimental:e}=v.useContext(yt),t=()=>f.jsxs(v.Fragment,{children:[f.jsx("a-entity",{"laser-controls":"hand: right",raycaster:`objects: .clickable;
409
+ `,ba=n=>{const e=x.useContext(jt),t=()=>{n.onSelect(n.value+n.step||1)},r=()=>{n.onSelect(n.value-n.step||1)},i=()=>h.jsxs("a-plane",{color:"white",width:"0.1",height:"0.1",position:"0 0 0.002",rotation:"0 0 0",children:[h.jsx("a-plane",{width:"0.03",color:"black",interaction:!0,class:"clickable",onClick:()=>r(),height:"0.03",position:"-0.05 0 0.001",children:h.jsx("a-text",{width:"0.03",color:"white",scale:"10 10 10",align:"center",height:"0.03","z-offset":"0.001",value:"<"})}),h.jsx("a-text",{height:"0.1",width:"0.1",align:"center",scale:"10 10 10","z-offset":"0.001",value:n.value}),h.jsx("a-plane",{width:"0.03",color:"black",height:"0.03",interaction:!0,onClick:()=>t(),class:"clickable",position:"0.05 0 0.001",children:h.jsx("a-text",{width:"0.03",color:"white",scale:"10 10 10",height:"0.03",align:"center","z-offset":"0.001",value:">"})})]}),o=()=>h.jsx("div",{style:{display:"flex",width:"300px",height:"100%",justifyContent:"center",alignItems:"center"},children:h.jsxs("div",{style:{display:"flex",flexDirection:"row",backgroundColor:"white",borderRadius:"6px",boxShadow:"inset 0px 0px 2px 2px black"},children:[h.jsx(Vi,{onClick:()=>r(),children:"<"}),h.jsx("p",{style:{padding:"10px"},children:n.value}),h.jsx(Vi,{onClick:()=>t(),children:">"})]})});return h.jsx(h.Fragment,{children:e.controller==="keyboard"?o():i()})},Wi=(n,e,t)=>{switch(n){case"select":return h.jsx(xa,{...e,onSelect:t});case"number":return h.jsx(ba,{...e,onSelect:t});default:return h.jsx("div",{children:n+" => No such component"})}},Sa=n=>{const e=x.useContext(jt),t=()=>h.jsx("a-plane",{color:"gray",width:e.componentAreaWidth,height:e.screenHeight-.002,position:"0.08 0 0.001",rotation:"0 0 0",children:n.children}),r=()=>h.jsx("div",{children:n.children});return h.jsx(h.Fragment,{children:e.controller=="keyboard"?r():t()})},jt=x.createContext({screenWidth:.44,screenHeight:.25,componentAreaWidth:.28,sideBarWidth:.08,controller:"keyboard"}),Xi=n=>{const[e,t]=x.useState(n.controller!=="keyboard"),[r,i]=x.useState("histogram"),[o,s]=x.useState("scale"),[c,d]=et("ndmvrSchema"),f=p=>{var S;(S=c[r])!=null&&S.properties[o]&&d.setData({...c,[r]:{...c[r],properties:{...c[r].properties,[o]:{...c[r].properties[o],value:p}}}})},u=p=>{n.controller==="keyboard"&&t(p.changeTabletState==="flex")};return x.useEffect(()=>{let p=Se.subscribe(u);return()=>p.unsubscribe()},[]),h.jsx(jt.Provider,{value:{screenWidth:.44,screenHeight:.25,componentAreaWidth:.28,sideBarWidth:.08,controller:n.controller||"keyboard"},children:e&&c&&h.jsxs(ma,{children:[h.jsx(Yi,{children:c&&Object.keys(c).map((p,S)=>h.jsx(Li,{i:S+"1",label:p,height:.02,checked:p===r,verPosition:.11-S*.022,onClick:C=>{i(C),Object.keys(c[C].properties).length>0&&s(Object.keys(c[C].properties)[0])}},S))}),r&&h.jsx(Yi,{offset:1,children:Object.keys(c[r].properties).map((p,S)=>h.jsx(Li,{i:S,label:p,height:.02,checked:p===o,verPosition:.11-S*.022,onClick:C=>{s(C)}},S))}),r&&o&&h.jsx(Sa,{children:n.componentProvider?n.componentProvider(c[r].properties[o].type,n.keyboard,c[r].properties[o],f,Wi):Wi(c[r].properties[o].type,c[r].properties[o],f)})]})})},wa=()=>{const[n]=et("ndmvrInputDevice"),{experimental:e}=x.useContext(Ct),t=()=>h.jsxs(x.Fragment,{children:[h.jsx("a-entity",{"laser-controls":"hand: right",raycaster:`objects: .clickable;
410
410
  lineOpacity: 0.5;
411
- far: 20;`}),f.jsx("a-entity",{"oculus-touch-controls":"hand: left","left-controller-logging":!0,"oculus-thumbstick-movement-controller":"",children:e?f.jsx(Ri,{controller:"vr"}):f.jsx(Ai,{})}),f.jsx("a-entity",{"oculus-touch-controls":"hand: right","right-controller-logging":!0})]});return f.jsx("a-entity",{children:r==="oculus"&&t()})},Fs=()=>{const r=new Wt,[e,t]=Cs("ndmvrCameraPosRot"),[n]=v.useState(yt._currentValue),[i,o]=v.useState(null);return v.useEffect(()=>{o(r.parsePosition(r.calculateDefaultPosRot(e,n)));const a=()=>{const c=document.getElementById("camera");c&&c.components["look-controls"]?r.setCameraRotation(e==null?void 0:e.rotation):setTimeout(a,100)};a()},[e]),v.useLayoutEffect(()=>()=>{t.setData(r.getCurrentPosRot())},[]),f.jsxs("a-entity",{id:"cameraRig",position:i==null?void 0:i.position,children:[f.jsx($s,{}),f.jsx("a-camera",{id:"camera","look-control":!0,"wasd-controls-enabled":"acceleration:=50",children:f.jsx(Ds,{})}),f.jsx(Ns,{})]})},Ls=({position:r,rotation:e,id:t,color:n,masterId:i})=>{v.useEffect(()=>{const a=document.getElementById(t),c=new Pt.Quaternion().fromArray(e),d=new Pt.Euler().setFromQuaternion(c,"YXZ"),h={x:Pt.MathUtils.radToDeg(d.x),y:Pt.MathUtils.radToDeg(d.y),z:-Pt.MathUtils.radToDeg(d.z)};a.setAttribute("rotation",h)},[e]);const o=()=>f.jsxs("a-entity",{position:"0 0.25 0",children:[f.jsx("a-cone",{color:"gold","radius-bottom":"0.5","radius-top":"0.1",height:"0.8",position:"0 0.4 0"}),f.jsx("a-sphere",{color:n,radius:"0.05",position:"0 0.4 -0.3"}),f.jsx("a-sphere",{color:n,radius:"0.05",position:"0 0.6 -0.2"})]});return f.jsxs("a-entity",{position:r,id:t,children:[f.jsx("a-sphere",{radius:"0.5",color:"#F8DF87",children:i===t?o():f.jsx(f.Fragment,{})}),f.jsx("a-entity",{position:"0.2 0.15 -0.45",children:f.jsx("a-sphere",{radius:"0.1",color:"#FFFFFF",children:f.jsx("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),f.jsx("a-entity",{position:"-0.2 0.15 -0.45",children:f.jsx("a-sphere",{radius:"0.1",color:"#FFFFFF",children:f.jsx("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),f.jsx("a-cylinder",{height:"0.05",radius:"0.05",color:"#FF6B6B",position:"0 -0.25 -0.4",rotation:"0 90 90"}),f.jsx("a-sphere",{radius:"0.1",color:"#FF6B6B",position:"0 -0.1 -0.5"}),f.jsx("a-cylinder",{height:"0.8",radius:"0.3",color:n,position:"0 -0.6 0"}),f.jsxs("a-entity",{position:"-0.4 -0.4 0",children:[f.jsx("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),f.jsx("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),f.jsxs("a-entity",{position:"0.4 -0.4 0",children:[f.jsx("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),f.jsx("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),f.jsxs("a-entity",{position:"-0.15 -1 0",children:[f.jsx("a-cylinder",{height:"0.8",radius:"0.2",color:n,position:"0 -0.4 0"}),f.jsx("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]}),f.jsxs("a-entity",{position:"0.15 -1 0",children:[f.jsx("a-cylinder",{height:"0.8",radius:"0.2",color:n,position:"0 -0.4 0"}),f.jsx("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]})]})},Vs=109,Xs=({wssb:r="shared"})=>{const e=v.useContext(hr)[r],{histogram:t}=v.useContext(yt).data,n=i=>{switch(i.keyCode){case Vs:e.send({type:"assign_master",payload:{}}),e.send({type:"histogram",payload:JSON.stringify(At.toJSON(t))})}};return v.useEffect(()=>(window.addEventListener("keypress",n),()=>{window.removeEventListener("keypress",n)}),[]),f.jsx(f.Fragment,{})},Ws=105,Us=106,Zs=107,Gs=108,Ks=117,qs=111,Ii=new Map([[Ws,"X_UP"],[Zs,"X_DOWN"],[Gs,"Y_UP"],[Us,"Y_DOWN"],[Ks,"Z_UP"],[qs,"Z_DOWN"]]),Bi=r=>{switch(r){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}},Js=({wssb:r="shared"})=>{const e=v.useContext(hr)[r],t=pr("axisScalingLatest",r),n=pr("axisScaling",r),i=o=>{if(!Ii.has(o.keyCode))return;let a=Ii.get(o.keyCode);e.send({type:"axis_scaling_latest",payload:{axis:a}})};return v.useEffect(()=>{n.payload!==void 0&&Object.keys(n.payload.axisMap).forEach(o=>{for(let a=0;a<n.payload.axisMap[o];a++)Bi(o)})},[n.payload]),v.useEffect(()=>{t.payload!==void 0&&Bi(t.payload.latestAxis)},[t.payload]),v.useEffect(()=>(window.addEventListener("keypress",i),()=>{window.removeEventListener("keypress",i)}),[]),f.jsx("div",{})},Qs=({wssb:r="shared"})=>{const[e,t]=v.useState(0),n=v.useContext(hr)[r];return v.useEffect(()=>{const i=document.getElementById("camera"),o=new Pt.Vector3,a=new Pt.Quaternion;i.object3D.getWorldPosition(o);const c=setInterval(()=>{i.object3D.getWorldPosition(o),i.object3D.getWorldQuaternion(a),n.send({type:"move",payload:{position:o.toArray(),rotation:a.toArray()}}),t(d=>d+1)},100);return()=>clearInterval(c)},[e]),f.jsxs("a-entity",{children:[f.jsx(Xs,{}),f.jsx(Js,{})]})},ea=({wssb:r="shared"})=>{v.useContext(hr)[r];const e=pr("move",r),t=pr("ws",r),n=pr("master",r),[i,o]=v.useState([]),[a,c]=v.useState(null),[d,h]=v.useState("");return v.useEffect(()=>{e.payload!==void 0&&(e.payload.clients.length>0?o(e.payload.clients):o([]))},[e.payload]),v.useEffect(()=>{t.payload!==void 0&&h(t.payload.id)},[t.payload]),v.useEffect(()=>{n.payload!==void 0&&c(n.payload.master)},[n.payload]),f.jsxs("a-entity",{children:[f.jsx(Qs,{}),i.filter(u=>u.id!==d).map((u,g)=>{const E=u.position,P=u.rotation,A=E.join(" ");return f.jsx(Ls,{id:u.id,position:A,rotation:P,masterId:a,color:u.color},g+u.id)})]})},ta=({startPosition:r})=>{const e=v.useContext(yt),t=2;let n=1;const i="color: white;",o="1.0",a=r||{x:0,y:0,z:0};let[c,d]=v.useState(h());return v.useEffect(()=>{d(h)},[e]),f.jsxs("a-entity",{children:[f.jsx("a-box",{position:`${a.x+c.xCenter} ${a.z} ${a.y-c.yStart}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart} ${a.z} ${a.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xCenter} ${a.z} ${a.y-c.yCenter+c.yWidth}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xCenter-c.xWidth} ${a.z} ${a.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),e.data.histogram._typename.includes("TH3")&&f.jsxs("a-entity",{children:[f.jsx("a-box",{position:`${a.x+c.xCenter} ${a.z-c.zStart+c.zWidth*2} ${a.y-c.yStart}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart} ${a.z-c.zStart+c.zWidth*2} ${a.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xCenter} ${a.z-c.zStart+c.zWidth*2} ${a.y-c.yCenter+c.yWidth}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xCenter-c.xWidth} ${a.z-c.zStart+c.zWidth*2} ${a.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart} ${a.z-c.zCenter} ${a.y-c.yStart}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart} ${a.z-c.zCenter} ${a.y-c.yStart+c.yWidth*2}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart-c.xWidth*2} ${a.z-c.zCenter} ${a.y-c.yStart+c.yWidth*2}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),f.jsx("a-box",{position:`${a.x+c.xStart-c.xWidth*2} ${a.z-c.zCenter} ${a.y-c.yStart}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o})]})]});function h(){const u=n*3/4,g=(e.data.histogram.fXaxis.fNbins-1)*n*(-2*n)-n*3/4,E=(u-g)/2,P=u-E,A=n*3/4,S=(e.data.histogram.fYaxis.fNbins-1)*n*(-2*n)-n*3/4,y=(A-S)/2,_=A-y,C=0,$=(e.data.histogram.fZaxis.fNbins-1)*n*(-2*n)-n*3/4,D=(C-$)/2,b=C-D;return{xStart:u,xWidth:E,xCenter:P,yStart:A,yWidth:y,yCenter:_,zStart:C,zWidth:D,zCenter:b}}},ra=({data:r,states:e=null,stores:t=null,config:n=Di,customComponentProvider:i,experimental:o,selectedBins:a=[],onClick:c=S=>{console.log("click isn't defined!")},onDbClick:d=S=>{console.log("DbClick isn't be defined!")},onHover:h=S=>{console.log("Hover isn't be defined!")},onView:u=null,onProgress:g=null,onExeCommand:E=S=>{console.log("exeCommand isn't be defined!")},style:P={zIndex:"1",width:"100%",minHeight:"calc(90vh)"},useShared:A=!1})=>{var b,G;let S;const[y]=vt("ndmvrInputDevice"),[_,C]=vt("ndmvrSchema"),[$,D]=v.useState(!1);return v.useEffect(()=>{_==null&&C.setData(n),console.log(r)},[n]),v.useEffect(()=>{D(!!y)},[y]),v.useEffect(()=>{if(S=ur.getBinDistributor().subscribe(O=>{var I,X,T;if((O==null?void 0:O.id)===r.id){const{zPos:ee,yPos:F,xPos:N}=O.data,L={intersectionAxis:O.intersect,obj:r.histogram,id:r.id,binId:O.data.id};switch((I=O.data)!=null&&I.zPos?(L.binz=ee,L.biny=F,L.binx=N,L.bin=r.histogram.getBin(N,F,ee),L.con=r.histogram.getBinContent(N,F,ee)):(X=O.data)!=null&&X.yPos?(L.biny=F,L.binx=N,L.bin=r.histogram.getBin(N,F),L.con=r.histogram.getBinContent(N,F)):(T=O.data)!=null&&T.xPos&&(L.binx=N,L.bin=r.histogram.getBin(N),L.con=r.histogram.getBinContent(N)),O.event){case"CLICK":c(L);break;case"HOVER":h(L);break;case"DB_CLICK":d(L);break}}else E(O.command)}),S)return()=>S.unsubscribe()},[r,e,c,d,h,E]),f.jsx(v.Fragment,{children:f.jsxs(yt.Provider,{value:{data:{id:r.id,histogram:r.histogram,projectionNames:r==null?void 0:r.projectionsNames,projPanelIds:r==null?void 0:r.projPanelIds},experimental:!!o,stores:{source:t==null?void 0:t.sourceStore},states:{onViewChange:u,onProgress:g,selectedBins:a,selectedView:e==null?void 0:e.selectedView}},children:[f.jsxs("a-scene",{embedded:!0,"vr-mode-detector":!0,style:P,children:[f.jsx(js,{scene:o?(G=(b=_==null?void 0:_.scene)==null?void 0:b.properties.scene)==null?void 0:G.value:e==null?void 0:e.scene}),A&&f.jsx(ea,{}),f.jsx(Fs,{}),f.jsx(Os,{}),f.jsx(ta,{})]}),y!=="oculus"&&f.jsx(f.Fragment,{children:o?f.jsx(Ri,{controller:"keyboard",componentProvider:i}):f.jsx(Ai,{})})]})})};class na{constructor(e){Re(this,"model",null);this.model=e}updateElement(e,t,n,i){if(this.model[n].elements[e])n==="titles"?this.createTitle(this.model[n].elements[e],this.model[n].attributes[e]):this.createElement(this.model[n].elements[e],this.model[n].attributes[e],i);else{let o;n==="titles"?o=this.createTitle(void 0,this.model[n].attributes[e]):o=this.createElement(void 0,this.model[n].attributes[e],i),this.model[n].elements[e]=o,t.appendChild(o)}}deleteUnnecessaryElements(e,t){const n=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=n,this.model[t[0]].attributes.length=n}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=n,this.model[t[0]].attributes.length=n,this.model[t[1]].elements.length=n,this.model[t[1]].attributes.length=n}}createElement(e,t,n){let i=e;if(i==null){const o=this.checkEntityType(n);i=document.createElement(o)}for(const o in t)i.setAttribute(o,t[o]);return i}createBannerElement(e,t,n){let i=e;return i==null&&(i=document.createElement("a-entity"),this.createBannerLines(t,n).map(a=>i.append(a))),i.setAttribute("position",n.position),i.setAttribute("id",n.id),i}createBannerLines(e,t){const n=[];for(let o=e-1;o>-1;o--){t.line.position.y=2*o;const a=document.createElement("a-entity");a.setAttribute("rotation",t.line.rotation),a.setAttribute("position",t.line.position),a.setAttribute("text",t.line.text),n.push(a)}const i=document.createElement("a-entity");return i.setAttribute("geometry",t.background.geometry),i.setAttribute("position",t.background.position),i.setAttribute("material",t.background.material),n.push(i),n}createTitle(e,t){let n=e;if(n==null){n=document.createElement("a-entity");const i=this.createElement(void 0,t.background);n.appendChild(i)}return delete t.background,this.createElement(n,t)}checkEntityType(e){return e==="a-box"||e==="a-sphere"||e==="a-text"||e==="a-circle"||e==="a-text"?e:"a-entity"}}class ia{bannerTemplate(e,t,n){const i={x:e.positionX,y:e.positionY,z:e.positionZ},o=e.id,a=this.bannerBackgroundTemplate(n),c=this.lineTemplate(t);return{position:i,id:o,background:a,line:c}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.scaleX,y:e.scaleY,z:e.scaleZ},i={color:e.color,opacity:.75},o=e.class,a=e.data,c=e.id;return{position:t,scale:n,material:i,id:c,class:o,binth2:a,mouseevent:""}}labelTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},i={primitive:"plane",width:4,height:1},o={value:e.value,color:e.color,width:10,height:"auto",align:"center"},a={opacity:0},c=e.id;return{position:t,rotation:n,geometry:i,text:o,material:a,id:c}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},i={primitive:"plane",width:e.width,height:e.height},o={value:e.value,color:"black",width:4,height:"auto",align:"center"},a={color:e.color,opacity:.8};return{position:t,rotation:n,geometry:i,text:o,material:a}}titleTemplate(e,t){const n={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={opacity:0},a={value:e.title,color:e.color,width:230,height:"auto",align:"center"},c=this.titleTextTemplate(t);return{position:n,rotation:i,material:o,text:a,background:c}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},n={x:e.positionX,y:e.positionY,z:e.positionZ},i={color:e.color,opacity:.6};return{position:n,geometry:t,material:i}}lineTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ};return{position:t,rotation:n,text:{value:"",width:14,height:"auto",align:"center"}}}bannerBackgroundTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={primitive:"box",width:e.width,height:e.height,depth:e.depth},i={color:e.color};return{position:t,geometry:n,material:i}}}let Yi=[];function oa(r){return Yi.filter(t=>t.id===r).length!==0}function En(r,e,t,n,i,o,a){Yi=Ln.getBinsFromLocalStorage();const c=new ia,d=new na(e),h=new ji(a),u={},g=r;let E,P,A,S,y,_,C,$,D,b;const G="";let O,I=0;const X=n+o>t.fXaxis.fXmax?t.fXaxis.fXmax:n+o,T=i+o>t.fYaxis.fXmax?t.fYaxis.fXmax:i+o,ee=t.fXaxis.fTitle,F=t.fYaxis.fTitle,N=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],L=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let q=i;q<=T;q++)for(let ye=n;ye<=X;ye++)if(P=t.fXaxis.GetBinCenter(ye),A=t.fXaxis.GetBinLowEdge(ye),S=P+(P-A),y=S-A,_=t.fYaxis.GetBinCenter(q),C=t.fYaxis.GetBinLowEdge(q),$=_+(_-C),D=$-C,O=t.getBinContent(ye,q),b=sa(O,t.fMaximum),E=b/2,b>0){const me=h.getBinColor(b),Se=A+"th2"+S+"th2"+C+"th2"+$;let Ae;oa(Se)?Ae=h.getSecondaryAccentColor():Ae=me;const Ie=`id: ${Se};
412
- content: ${b};
411
+ far: 20;`}),h.jsx("a-entity",{"oculus-touch-controls":"hand: left","left-controller-logging":!0,"oculus-thumbstick-movement-controller":"",children:e?h.jsx(Xi,{controller:"vr"}):h.jsx(Ri,{})}),h.jsx("a-entity",{"oculus-touch-controls":"hand: right","right-controller-logging":!0})]});return h.jsx("a-entity",{children:n==="oculus"&&t()})},Ea=()=>{const n=new kt,[e,t]=ia("ndmvrCameraPosRot");et("ndmvrInputDevice");const[r]=x.useState(Ct._currentValue),[i,o]=x.useState(null);return x.useEffect(()=>{if(!e)return;o(n.parsePosition(n.calculateDefaultPosRot(e,r)));const s=()=>{const c=document.getElementById("camera");c&&c.components["look-controls"]?n.setCameraRotation(e==null?void 0:e.rotation):setTimeout(s,100)};s()},[e]),x.useEffect(()=>{kr(e)&&t.setData(n.getCurrentPosRot())},[i]),x.useLayoutEffect(()=>()=>{t.setData(n.getCurrentPosRot())},[]),h.jsxs("a-entity",{id:"cameraRig",position:i==null?void 0:i.position,raycaster:"objects: .clickable",children:[h.jsx(pa,{}),h.jsx("a-camera",{id:"camera","wasd-controls-enabled":"acceleration:=50",children:h.jsx(fa,{})}),h.jsx(wa,{})]})},Ca=({position:n,rotation:e,id:t,color:r,masterId:i})=>{x.useEffect(()=>{const s=document.getElementById(t),c=new Mt.Quaternion().fromArray(e),d=new Mt.Euler().setFromQuaternion(c,"YXZ"),f={x:Mt.MathUtils.radToDeg(d.x),y:Mt.MathUtils.radToDeg(d.y),z:-Mt.MathUtils.radToDeg(d.z)};s.setAttribute("rotation",f)},[e]);const o=()=>h.jsxs("a-entity",{position:"0 0.25 0",children:[h.jsx("a-cone",{color:"gold","radius-bottom":"0.5","radius-top":"0.1",height:"0.8",position:"0 0.4 0"}),h.jsx("a-sphere",{color:r,radius:"0.05",position:"0 0.4 -0.3"}),h.jsx("a-sphere",{color:r,radius:"0.05",position:"0 0.6 -0.2"})]});return h.jsxs("a-entity",{position:n,id:t,children:[h.jsx("a-sphere",{radius:"0.5",color:"#F8DF87",children:i===t?o():h.jsx(h.Fragment,{})}),h.jsx("a-entity",{position:"0.2 0.15 -0.45",children:h.jsx("a-sphere",{radius:"0.1",color:"#FFFFFF",children:h.jsx("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),h.jsx("a-entity",{position:"-0.2 0.15 -0.45",children:h.jsx("a-sphere",{radius:"0.1",color:"#FFFFFF",children:h.jsx("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),h.jsx("a-cylinder",{height:"0.05",radius:"0.05",color:"#FF6B6B",position:"0 -0.25 -0.4",rotation:"0 90 90"}),h.jsx("a-sphere",{radius:"0.1",color:"#FF6B6B",position:"0 -0.1 -0.5"}),h.jsx("a-cylinder",{height:"0.8",radius:"0.3",color:r,position:"0 -0.6 0"}),h.jsxs("a-entity",{position:"-0.4 -0.4 0",children:[h.jsx("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),h.jsx("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),h.jsxs("a-entity",{position:"0.4 -0.4 0",children:[h.jsx("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),h.jsx("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),h.jsxs("a-entity",{position:"-0.15 -1 0",children:[h.jsx("a-cylinder",{height:"0.8",radius:"0.2",color:r,position:"0 -0.4 0"}),h.jsx("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]}),h.jsxs("a-entity",{position:"0.15 -1 0",children:[h.jsx("a-cylinder",{height:"0.8",radius:"0.2",color:r,position:"0 -0.4 0"}),h.jsx("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]})]})},Ta=109,ka=({wssb:n="shared"})=>{const e=x.useContext(Nt)[n],{histogram:t}=x.useContext(Ct).data,r=i=>{switch(i.keyCode){case Ta:e.send({type:"assign_master",payload:{}}),e.send({type:"histogram",payload:JSON.stringify(It.toJSON(t))})}};return x.useEffect(()=>(window.addEventListener("keypress",r),()=>{window.removeEventListener("keypress",r)}),[]),h.jsx(h.Fragment,{})},Aa=105,ja=106,_a=107,Pa=108,Oa=117,Da=111,Ui=new Map([[Aa,"X_UP"],[_a,"X_DOWN"],[Pa,"Y_UP"],[ja,"Y_DOWN"],[Oa,"Z_UP"],[Da,"Z_DOWN"]]),Zi=n=>{switch(n){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}},za=({wssb:n="shared"})=>{const e=x.useContext(Nt)[n],t=mt("axisScalingLatest",n),r=mt("axisScaling",n),i=o=>{if(!Ui.has(o.keyCode))return;let s=Ui.get(o.keyCode);e.send({type:"axis_scaling_latest",payload:{axis:s}})};return x.useEffect(()=>{r.payload!==void 0&&Object.keys(r.payload.axisMap).forEach(o=>{for(let s=0;s<r.payload.axisMap[o];s++)Zi(o)})},[r.payload]),x.useEffect(()=>{t.payload!==void 0&&Zi(t.payload.latestAxis)},[t.payload]),x.useEffect(()=>(window.addEventListener("keypress",i),()=>{window.removeEventListener("keypress",i)}),[]),h.jsx("div",{})},$a=({wssb:n="shared"})=>{const[e,t]=x.useState(0),r=x.useContext(Nt)[n];return x.useEffect(()=>{const i=document.getElementById("camera"),o=new Mt.Vector3,s=new Mt.Quaternion;i.object3D.getWorldPosition(o);const c=setInterval(()=>{i.object3D.getWorldPosition(o),i.object3D.getWorldQuaternion(s),r.send({type:"move",payload:{position:o.toArray(),rotation:s.toArray()}}),t(d=>d+1)},100);return()=>clearInterval(c)},[e]),h.jsxs("a-entity",{children:[h.jsx(ka,{}),h.jsx(za,{})]})},Ia=({wssb:n="shared"})=>{x.useContext(Nt)[n];const e=mt("move",n),t=mt("ws",n),r=mt("master",n),[i,o]=x.useState([]),[s,c]=x.useState(null),[d,f]=x.useState("");return x.useEffect(()=>{e.payload!==void 0&&(e.payload.clients.length>0?o(e.payload.clients):o([]))},[e.payload]),x.useEffect(()=>{t.payload!==void 0&&f(t.payload.id)},[t.payload]),x.useEffect(()=>{r.payload!==void 0&&c(r.payload.master)},[r.payload]),h.jsxs("a-entity",{children:[h.jsx($a,{}),i.filter(u=>u.id!==d).map((u,p)=>{const S=u.position,C=u.rotation,j=S.join(" ");return h.jsx(Ca,{id:u.id,position:j,rotation:C,masterId:s,color:u.color},p+u.id)})]})},Ma=({startPosition:n})=>{const e=x.useContext(Ct),t=2;let r=1;const i="color: white;",o="1.0",s=n||{x:0,y:0,z:0};let[c,d]=x.useState(f());return x.useEffect(()=>{d(f)},[e]),h.jsxs("a-entity",{children:[h.jsx("a-box",{position:`${s.x+c.xCenter} ${s.z} ${s.y-c.yStart}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xStart} ${s.z} ${s.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xCenter} ${s.z} ${s.y-c.yCenter+c.yWidth}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xCenter-c.xWidth} ${s.z} ${s.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),e.data.histogram._typename.includes("TH3")&&h.jsxs("a-entity",{children:[h.jsx("a-box",{position:`${s.x+c.xCenter} ${s.z-c.zStart+c.zWidth*2} ${s.y-c.yStart}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xStart} ${s.z-c.zStart+c.zWidth*2} ${s.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xCenter} ${s.z-c.zStart+c.zWidth*2} ${s.y-c.yCenter+c.yWidth}`,width:`${c.xWidth*t}`,height:"0.1",depth:"0.25",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xCenter-c.xWidth} ${s.z-c.zStart+c.zWidth*2} ${s.y-c.yCenter}`,width:`${c.yWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 90 0",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xStart} ${s.z-c.zCenter} ${s.y-c.yStart}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xStart} ${s.z-c.zCenter} ${s.y-c.yStart+c.yWidth*2}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xStart-c.xWidth*2} ${s.z-c.zCenter} ${s.y-c.yStart+c.yWidth*2}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o}),h.jsx("a-box",{position:`${s.x+c.xStart-c.xWidth*2} ${s.z-c.zCenter} ${s.y-c.yStart}`,width:`${c.zWidth*t}`,height:"0.1",depth:"0.25",rotation:"0 0 90",material:i,opacity:o})]})]});function f(){const u=r*3/4,p=(e.data.histogram.fXaxis.fNbins-1)*r*(-2*r)-r*3/4,S=(u-p)/2,C=u-S,j=r*3/4,b=(e.data.histogram.fYaxis.fNbins-1)*r*(-2*r)-r*3/4,m=(j-b)/2,k=j-m,w=0,z=(e.data.histogram.fZaxis.fNbins-1)*r*(-2*r)-r*3/4,O=(w-z)/2,v=w-O;return{xStart:u,xWidth:S,xCenter:C,yStart:j,yWidth:m,yCenter:k,zStart:w,zWidth:O,zCenter:v}}},Ha=()=>{let n,e;const t=new kt;function r(){t.verticalMoveCamera(!1,.15)}function i(){t.verticalMoveCamera(!0,.15)}function o(){r(),n=setInterval(r,10)}function s(){clearInterval(n)}function c(){i(),e=setInterval(i,10)}function d(){clearInterval(e)}const f=()=>{const C=document.getElementById("up-arrow");C?(C.addEventListener("touchstart",o),C.addEventListener("touchend",s)):setTimeout(f,100)},u=()=>{const C=document.getElementById("down-arrow");C?(C.addEventListener("touchstart",c),C.addEventListener("touchend",d)):setTimeout(f,100)},p=()=>{const C=document.getElementById("up-arrow");C&&(C.removeEventListener("touchstart",o),C.removeEventListener("touchend",s))},S=()=>{const C=document.getElementById("down-arrow");C&&(C.removeEventListener("touchstart",c),C.removeEventListener("touchend",d))};return x.useEffect(()=>(f(),u(),()=>{p(),S()}),[]),h.jsxs("div",{className:"mainUI",id:"uiDiv",onContextMenu:C=>C.preventDefault(),children:[h.jsx("div",{className:"regionUI skyColor",style:{top:"10px",left:"10px"},onContextMenu:C=>C.preventDefault()}),h.jsx("div",{className:"regionUI",style:{top:"10px",right:"10px"}}),h.jsxs("div",{className:"regionUI",style:{bottom:"50px",left:"50px",flexDirection:"column"},children:[h.jsxs("div",{style:{flexDirection:"row",display:"flex",marginLeft:"-32px"},children:[h.jsx("div",{id:"up-arrow",className:"buttonUI",style:{width:"64px",height:"64px"},children:h.jsx("img",{style:{rotate:"90deg"},src:"../../../assets/ndmvr/mobileControls/arrow.png",alt:"Up Arrow"})}),h.jsx("div",{id:"down-arrow",className:"buttonUI",style:{width:"64px",height:"64px"},children:h.jsx("img",{style:{rotate:"270deg"},src:"../../../assets/ndmvr/mobileControls/arrow.png",alt:"Down Arrow"})})]}),h.jsxs("div",{className:"buttonUI",style:{width:"128px",opacity:.8},children:[h.jsx("img",{src:"../../../assets/ndmvr/mobileControls/joystick-base.png",alt:"Joystick Base"}),h.jsx("div",{id:"stick1",style:{position:"absolute"},children:h.jsx("img",{src:"../../../assets/ndmvr/mobileControls/joystick-blue.png",alt:"Joystick Red"})})]})]}),h.jsx("div",{className:"regionUI baseColor",style:{bottom:"10px",right:"10px"}})]})},Ra=({wssb:n="shared"})=>{const e=x.useContext(Nt)[n],[t,r]=x.useState("ws://localhost:8443"),[i,o]=x.useState(!1),[s,c]=x.useState(!1),[d,f]=x.useState({}),[u,p]=x.useState(""),[S,C]=x.useState(""),[j,b]=x.useState(""),m=ra("_ws",n),k=mt("app",n),w=mt("joined",n),z=mt("left",n),O=mt("created",n);x.useEffect(()=>{k.payload!==void 0&&f(k.payload)},[k.payload]),x.useEffect(()=>{z.payload!==void 0&&(p(""),b(""))},[z.payload]),x.useEffect(()=>{if(w.payload!==void 0){if(w.payload.error!==void 0){b(w.payload.error);return}p(w.payload.roomName),C(""),b("")}},[w.payload]),x.useEffect(()=>{if(O.payload!==void 0){if(O.payload.error!==void 0){b(O.payload.error);return}p(O.payload.roomName),C(""),b("")}},[O.payload]),x.useLayoutEffect(()=>{m.type==="_ws"&&m.action==="state"&&(o(m.payload.connected),c(m.payload.loading))},[m]);const v=V=>{r(V)},U=V=>{V.preventDefault(),e!==null&&(i?(e.disconnect(),p(""),C(""),b("")):e.connect(t))},P=V=>{C(V)},I=V=>{if(V.trim()===""){b("Room name cannot be empty");return}e.send({type:"joinRoom",payload:V}),b("")},Y=V=>{if(V.trim()===""){b("Room name cannot be empty");return}e.send({type:"createRoom",payload:V}),b("")},A=V=>{e.send({type:"leaveRoom",payload:V}),p("")};return h.jsx(h.Fragment,{children:h.jsx(Fe.Form,{children:h.jsxs(Fe.Flex,{children:[h.jsx(Fe.FlexItem,{children:h.jsx(Fe.TextInput,{type:"url",id:"url",name:"url",value:t,onChange:v,isDisabled:i?"disabled":null})}),h.jsx(Fe.FlexItem,{children:h.jsx(Fe.Button,{type:"submit",isDisabled:s?"disabled":null,onClick:U,children:i?"Disconnect":s?"Connecting ...":"Connect"})}),h.jsx(Fe.FlexItem,{children:h.jsx(Fe.TextInput,{type:"text",id:"roomName",name:"roomName",value:S,onChange:P,isDisabled:i?null:"disabled"})}),h.jsx(Fe.FlexItem,{children:u===""&&h.jsx(Fe.Button,{isDisabled:i?null:"disabled",onClick:()=>I(S),children:"Join"})}),h.jsx(Fe.FlexItem,{children:u===""&&h.jsx(Fe.Button,{isDisabled:i?null:"disabled",onClick:()=>Y(S),children:"Create"})}),h.jsx(Fe.FlexItem,{children:u!==""&&h.jsx(Fe.Button,{isDisabled:i?null:"disabled",onClick:()=>A(u),children:"Leave"})}),h.jsx(Fe.FlexItem,{children:d.name&&d.version?h.jsx("div",{className:"pf-u-default-color-100",children:d.name+" "+d.version}):h.jsx(h.Fragment,{})}),h.jsx(Fe.FlexItem,{children:u!==""&&h.jsxs("div",{className:"pf-u-default-color-200",children:["Current room: ",u]})}),h.jsx(Fe.FlexItem,{children:j!==""&&h.jsx("div",{className:"pf-u-warning-color-100",children:j})})]})})})},Na=()=>{const[n,e]=x.useState("grp-1_itm-1"),[t,r]=x.useState(!1),[i,o]=x.useState(!1),[s,c]=et("ndmvrFullscreen"),d=[{name:"DYNAMIC TH3 histogram example",itemId:"itm-1",url:"/aframe/th3demo"},{name:"GITLAB data projection example",itemId:"itm-2",url:"/aframe/gitlabProjection"},{name:"PHYSICS data projection example",itemId:"itm-3",url:"/aframe/physicsProjection"},{name:"NDMVR monitoring adaptation",itemId:"itm-4",url:"/aframe/thAdaptation"},{name:"NDMVR Shared Projection example",itemId:"itm-5",url:"/aframe/sharedProjection"}],f=S=>{e(S.itemId)},u=()=>{r(!t),o(!i)},p=()=>{c.setData(S=>!S)};return h.jsxs("div",{children:[h.jsx("div",{className:"regionUI skyColor",style:{top:"16px",left:"16px"},children:h.jsx("div",{className:"buttonUI",children:s?h.jsx("img",{onClick:p,className:"exit-button",src:"../../../assets/ndmvr/mobileControls/X.png",alt:"Exit"}):h.jsx("img",{onClick:p,className:"maximize-button",src:"../../../assets/ndmvr/mobileControls/maximize.png",alt:"Maximize"})})}),h.jsx("div",{className:"regionUI skyColor",style:{top:"0px",right:"0px"},children:h.jsxs("div",{className:"buttonUI",children:[i&&h.jsx("div",{style:{background:"#151515",width:"100vw"},children:h.jsxs(Fe.Nav,{onSelect:f,children:[n==="itm-5"?h.jsx(Ra,{}):h.jsx(h.Fragment,{}),h.jsx(Fe.NavList,{children:d.map(S=>h.jsx(Fe.NavItem,{itemId:S.itemId,isActive:n===S.itemId,children:h.jsx(oo.Link,{to:S.url,children:S.name})},S.name))})]})}),h.jsx("img",{src:"../../../assets/ndmvr/mobileControls/back-arrow.png",alt:"Button",className:`rotate-animation ${t?"rotated":""}`,onClick:u,id:"rotateImage"})]})})]})},Gi=({data:n,states:e=null,stores:t=null,config:r=Wn,customComponentProvider:i,experimental:o,selectedBins:s=[],onClick:c=b=>{console.log("click isn't defined!")},onDbClick:d=b=>{console.log("DbClick isn't be defined!")},onHover:f=b=>{console.log("Hover isn't be defined!")},onView:u=null,onProgress:p=null,onExeCommand:S=b=>{console.log("exeCommand isn't be defined!")},style:C={zIndex:"1",width:"100%",minHeight:"calc(90vh)"},useShared:j=!1})=>{var v,U;let b;const[m]=et("ndmvrInputDevice"),[k,w]=et("ndmvrSchema"),[z,O]=x.useState(!1);return x.useEffect(()=>{k==null&&w.setData(r)},[r]),x.useEffect(()=>{O(!!m)},[m]),x.useEffect(()=>{if(b=gn.getBinDistributor().subscribe(P=>{var I,Y,A;if((P==null?void 0:P.id)===n.id){const{zPos:V,yPos:L,xPos:B}=P.data,W={intersectionAxis:P.intersect,obj:n.histogram,id:n.id,binId:P.data.id};switch((I=P.data)!=null&&I.zPos?(W.binz=V,W.biny=L,W.binx=B,W.bin=n.histogram.getBin(B,L,V),W.con=n.histogram.getBinContent(B,L,V)):(Y=P.data)!=null&&Y.yPos?(W.biny=L,W.binx=B,W.bin=n.histogram.getBin(B,L),W.con=n.histogram.getBinContent(B,L)):(A=P.data)!=null&&A.xPos&&(W.binx=B,W.bin=n.histogram.getBin(B),W.con=n.histogram.getBinContent(B)),P.event){case"CLICK":c(W);break;case"HOVER":f(W);break;case"DB_CLICK":d(W);break}}else S(P.command)}),b)return()=>b.unsubscribe()},[n,e,c,d,f,S]),h.jsx(x.Fragment,{children:h.jsxs(Ct.Provider,{value:{data:{id:n.id,histogram:n.histogram,projectionNames:n==null?void 0:n.projectionsNames,projPanelIds:n==null?void 0:n.projPanelIds},experimental:!!o,stores:{source:t==null?void 0:t.sourceStore},states:{onViewChange:u,onProgress:p,selectedBins:s,selectedView:e==null?void 0:e.selectedView}},children:[h.jsxs("div",{id:"scene",style:{position:"relative"},children:[h.jsxs("a-scene",{embedded:!0,"vr-mode-detector":!0,"screen-controls":!0,style:C,"xr-mode-ui":"XRMode: vr",children:[h.jsx(ha,{scene:o?(U=(v=k==null?void 0:k.scene)==null?void 0:v.properties.scene)==null?void 0:U.value:e==null?void 0:e.scene}),j&&h.jsx(Ia,{}),h.jsx(Ea,{}),h.jsx(da,{}),h.jsx(Ma,{})]}),m==="mobile"&&h.jsxs(h.Fragment,{children:[h.jsx(Ha,{}),h.jsx(Na,{})]})]}),m!=="oculus"&&h.jsx(h.Fragment,{children:o?h.jsx(Xi,{controller:"keyboard",componentProvider:i}):h.jsx(Ri,{})})]})})};function qi(n){AFRAME.components["vr-mode-detector"]||AFRAME.registerComponent("vr-mode-detector",{init:function(){n.setData("keyboard"),AFRAME.utils.device.isMobile()&&n.setData("mobile"),this.el.sceneEl.addEventListener("enter-vr",()=>{window.AFRAME.utils.device.checkHeadsetConnected()?AFRAME.utils.device.isMobile()?n.setData("mobile"):n.setData("oculus"):n.setData("keyboard")}),this.el.sceneEl.addEventListener("exit-vr",()=>{AFRAME.utils.device.isMobile()?n.setData("mobile"):n.setData("keyboard")})}})}class Fa{constructor(e,t,r){this.id=e,this.dragStart=null,this.touchId=null,this.active=!1,this.value={x:0,y:0};let i,o;setTimeout(()=>{i=document.getElementById(e),o=this,i&&(i.addEventListener("touchstart",s),i.addEventListener("touchmove",c,{passive:!1}),i.addEventListener("touchend",d))},100);function s(f){o.active=!0,i.style.transition="0s",f.preventDefault(),f.changedTouches?o.dragStart={x:f.changedTouches[0].clientX,y:f.changedTouches[0].clientY}:o.dragStart={x:f.clientX,y:f.clientY},f.changedTouches&&(o.touchId=f.changedTouches[0].identifier)}function c(f){if(!o.active)return;let u=null;if(f.changedTouches){for(let U=0;U<f.changedTouches.length;U++)o.touchId==f.changedTouches[U].identifier&&(u=U,f.clientX=f.changedTouches[U].clientX,f.clientY=f.changedTouches[U].clientY);if(u==null)return}const p=f.clientX-o.dragStart.x,S=f.clientY-o.dragStart.y,C=Math.atan2(S,p),j=Math.min(t,Math.hypot(p,S)),b=j*Math.cos(C),m=j*Math.sin(C);i.style.transform=`translate3d(${b}px, ${m}px, 0px)`;const k=j<r?0:t/(t-r)*(j-r),w=k*Math.cos(C),z=k*Math.sin(C),O=parseFloat((w/t).toFixed(4)),v=parseFloat((z/t).toFixed(4));o.value={x:O,y:v}}function d(f){o.active&&(f.changedTouches&&o.touchId!=f.changedTouches[0].identifier||(i.style.transition=".2s",i.style.transform="translate3d(0px, 0px, 0px)",o.value={x:0,y:0},o.touchId=null,o.active=!1))}}}function Ki(){AFRAME.components["screen-controls"]||AFRAME.registerComponent("screen-controls",{init:function(){this.cameraService=new kt,this.component=document.getElementById("camera").components["wasd-controls"],this.joystick1=new Fa("stick1",64,8)},tick:function(n,e){this.joystick1.value&&this.cameraService.horizontalMoveCameraLocal(this.joystick1.value.x,this.joystick1.value.y,.3)}})}function Ji(){let n=AFRAME.components["look-controls"];n.Component.prototype.onTouchStart=function(e){if(!this.data.touchEnabled||this.el.sceneEl.is("vr-mode")||this.el.sceneEl.is("ar-mode"))return;e.preventDefault(),this.touchStart={x:e.changedTouches[e.changedTouches.length-1].pageX,y:e.changedTouches[e.changedTouches.length-1].pageY,touchId:e.changedTouches[e.changedTouches.length-1].identifier};const t=this.el.sceneEl.canvas.clientWidth,r=this.el.sceneEl.canvas.clientHeight;r>t?(this.touchStart.x>t*(1/3)||this.touchStart.y<r*(2/3))&&(this.touchStarted=!0):(this.touchStart.x>t*(1/4)||this.touchStart.y<r*(1/2))&&(this.touchStarted=!0)},n.Component.prototype.onTouchMove=function(e){if(this.touchStarted&&this.data.touchEnabled){e.preventDefault();let t;for(let r=0;r<e.touches.length;r++)if(e.touches[r].identifier===this.touchStart.touchId){t=e.touches[r].identifier;break}this.pitchObject.rotation.x-=.6*Math.PI*(e.touches[t].pageY-this.touchStart.y)/this.el.sceneEl.canvas.clientHeight,this.yawObject.rotation.y-=Math.PI*(e.touches[t].pageX-this.touchStart.x)/this.el.sceneEl.canvas.clientWidth,this.pitchObject.rotation.x=Math.max(Math.PI/-2,Math.min(Math.PI/2,this.pitchObject.rotation.x)),this.touchStart={x:e.touches[t].pageX,y:e.touches[t].pageY,touchId:e.touches[t].identifier}}},n.Component.prototype.onTouchEnd=function(e){for(let t=0;t<e.touches.length;t++)if(e.touches[t].identifier===this.touchStart.touchId)return;this.touchStarted=!1}}const Ba=({data:n,states:e,stores:t,config:r=Wn,customComponentProvider:i,experimental:o,selectedBins:s,onClick:c,onDbClick:d,onHover:f,onView:u,onProgress:p,onExeCommand:S,style:C,useShared:j})=>{const[b,m]=x.useState(null),[k,w]=et("ndmvrFullscreen"),[z,O]=et("ndmvrInputDevice");x.useEffect(()=>{qi(O),Ki(),Ji()},[]),x.useEffect(()=>{const P=Y=>{w.setData(!1)},I=()=>{document.fullscreenElement||w.setData(!1)};return window.addEventListener("popstate",P),document.addEventListener("fullscreenchange",I),()=>{window.removeEventListener("popstate",P),document.removeEventListener("fullscreenchange",I)}},[]),x.useLayoutEffect(()=>{m(document.getElementById("scene"));const P=I=>{I.state&&I.state.navigationType==="back"&&console.log("User pressed the native back button")};return window.addEventListener(document.exitFullscreen,P),window.addEventListener("popstate",P),()=>{window.removeEventListener("popstate",P)}},[]),x.useEffect(()=>{z&&w.setData(!1)},[z]),x.useEffect(()=>{b&&(k?v():U())},[k]);function v(){b.requestFullscreen().catch(()=>{}),screen.orientation.lock("landscape").catch()}function U(){screen.orientation.unlock(),document.exitFullscreen().catch(()=>{})}return h.jsx(Gi,{data:n,states:e,stores:t,config:r,customComponentProvider:i,experimental:o,selectedBins:s,onClick:c,onDbClick:d,onHover:f,onView:u,onProgress:p,onExeCommand:S,style:C,useShared:j})},Ya=({data:n,states:e,stores:t,config:r=Wn,customComponentProvider:i,experimental:o,selectedBins:s,onClick:c,onDbClick:d,onHover:f,onView:u,onProgress:p,onExeCommand:S,style:C,useShared:j})=>h.jsx(Tr.Provider,{value:{ndmvrCameraPosRot:Qs("ndmvrCameraPosRot"),ndmvrInputDevice:Cr("ndmvrInputDevice"),ndmvrSchema:Cr("ndmvrSchema"),ndmvrFullscreen:Cr("ndmvrFullscreen")},children:h.jsx(Ba,{data:n,states:e,stores:t,config:r,customComponentProvider:i,experimental:o,selectedBins:s,onClick:c,onDbClick:d,onHover:f,onView:u,onProgress:p,onExeCommand:S,style:C,useShared:j})});class La{constructor(e){Ie(this,"model",null);this.model=e}updateElement(e,t,r,i){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],i);else{let o;r==="titles"?o=this.createTitle(void 0,this.model[r].attributes[e]):o=this.createElement(void 0,this.model[r].attributes[e],i),this.model[r].elements[e]=o,t.appendChild(o)}}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 i=e;if(i==null){const o=this.checkEntityType(r);i=document.createElement(o)}for(const o in t)i.setAttribute(o,t[o]);return i}createBannerElement(e,t,r){let i=e;return i==null&&(i=document.createElement("a-entity"),this.createBannerLines(t,r).map(s=>i.append(s))),i.setAttribute("position",r.position),i.setAttribute("id",r.id),i}createBannerLines(e,t){const r=[];for(let o=e-1;o>-1;o--){t.line.position.y=2*o;const s=document.createElement("a-entity");s.setAttribute("rotation",t.line.rotation),s.setAttribute("position",t.line.position),s.setAttribute("text",t.line.text),r.push(s)}const i=document.createElement("a-entity");return i.setAttribute("geometry",t.background.geometry),i.setAttribute("position",t.background.position),i.setAttribute("material",t.background.material),r.push(i),r}createTitle(e,t){let r=e;if(r==null){r=document.createElement("a-entity");const i=this.createElement(void 0,t.background);r.appendChild(i)}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 Va{bannerTemplate(e,t,r){const i={x:e.positionX,y:e.positionY,z:e.positionZ},o=e.id,s=this.bannerBackgroundTemplate(r),c=this.lineTemplate(t);return{position:i,id:o,background:s,line:c}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.scaleX,y:e.scaleY,z:e.scaleZ},i={color:e.color,opacity:.75},o=e.class,s=e.data,c=e.id;return{position:t,scale:r,material:i,id:c,class:o,binth2:s,mouseevent:""}}labelTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ},i={primitive:"plane",width:4,height:1},o={value:e.value,color:e.color,width:10,height:"auto",align:"center"},s={opacity:0},c=e.id;return{position:t,rotation:r,geometry:i,text:o,material:s,id:c}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ},i={primitive:"plane",width:e.width,height:e.height},o={value:e.value,color:"black",width:4,height:"auto",align:"center"},s={color:e.color,opacity:.8};return{position:t,rotation:r,geometry:i,text:o,material:s}}titleTemplate(e,t){const r={x:e.positionX,y:e.positionY,z:e.positionZ},i={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={opacity:0},s={value:e.title,color:e.color,width:230,height:"auto",align:"center"},c=this.titleTextTemplate(t);return{position:r,rotation:i,material:o,text:s,background:c}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},r={x:e.positionX,y:e.positionY,z:e.positionZ},i={color:e.color,opacity:.6};return{position:r,geometry:t,material:i}}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},i={color:e.color};return{position:t,geometry:r,material:i}}}let Qi=[];function Wa(n){return Qi.filter(t=>t.id===n).length!==0}function Dr(n,e,t,r,i,o,s){Qi=Kr.getBinsFromLocalStorage();const c=new Va,d=new La(e),f=new Bi(s),u={},p=n;let S,C,j,b,m,k,w,z,O,v;const U="";let P,I=0;const Y=r+o>t.fXaxis.fXmax?t.fXaxis.fXmax:r+o,A=i+o>t.fYaxis.fXmax?t.fYaxis.fXmax:i+o,V=t.fXaxis.fTitle,L=t.fYaxis.fTitle,B=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],W=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let J=i;J<=A;J++)for(let ye=r;ye<=Y;ye++)if(C=t.fXaxis.GetBinCenter(ye),j=t.fXaxis.GetBinLowEdge(ye),b=C+(C-j),m=b-j,k=t.fYaxis.GetBinCenter(J),w=t.fYaxis.GetBinLowEdge(J),z=k+(k-w),O=z-w,P=t.getBinContent(ye,J),v=Xa(P,t.fMaximum),S=v/2,v>0){const me=f.getBinColor(v),we=j+"th2"+b+"th2"+w+"th2"+z;let _e;Wa(we)?_e=f.getSecondaryAccentColor():_e=me;const Re=`id: ${we};
412
+ content: ${v};
413
413
  color: ${me};
414
- yTitle: ${F};
415
- xTitle: ${ee};
416
- absoluteContent: ${O};
417
- binName: ${G};
418
- xMin: ${A};
419
- yMin: ${C};
420
- xMax: ${S};
421
- yMax: ${$};
422
- xCenter: ${P};
423
- yCenter: ${_};
424
- xWidth: ${y};
425
- yWidth: ${D};
426
- markedColor: ${Ae};
427
- selectColor: ${h.getSecondaryAccentColor()};
428
- axisX: ${h.getAxisColor("x")};
429
- axisY: ${h.getAxisColor("y")};
430
- axisZ: ${h.getAxisColor("z")}`;u.id=Se,u.positionX=A,u.positionY=E,u.positionZ=C,u.scaleX=y/2,u.scaleY=b,u.scaleZ=D/2,u.color=Ae,u.class="clickable",u.data=Ie,e.bins.attributes[I]=c.binTemplate(u),d.updateElement(I,g,"bins","a-box"),I++}d.deleteUnnecessaryElements(I,["bins"]),u.id=1500+I,u.positionX=X+.5,u.positionY=0,u.positionZ=T+.5,u.rotationX=270,u.rotationY=360,u.rotationZ=0,u.width=2,u.height=2,u.value="0",u.color=h.getAxisColor("y"),e.normalXAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,g,"normalXAxis","a-entity"),u.positionZ=i-2.5,u.rotationX=270,u.rotationY=180,e.reversedYAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,g,"reversedYAxis","a-entity"),u.positionX=n-2.5,u.positionZ=T+.5,e.normalYAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,g,"normalYAxis","a-entity"),u.positionZ=i-2.5,u.rotationY=180,e.reversedXAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,g,"reversedXAxis","a-entity"),I=1;for(let q=i;q<=T;q++)u.id=1500+I,u.positionX=n-2.5,u.positionY=0,u.positionZ=q-1,u.rotationX=270,u.rotationY=180,u.rotationZ=0,u.width=2,u.height=1,u.value=`${L[q-1]?L[q-1].fString:q-1}`,u.color=h.getAxisColor("z"),e.normalYAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,g,"normalYAxis","a-entity"),u.id=4500+I,u.positionX=X+.5,u.rotationY=360,u.value=`${L[q-1]?L[q-1].fString:q-1}`,e.reversedYAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,g,"reversedYAxis","a-entity"),I++;d.deleteUnnecessaryElements(I,["normalYAxis","reversedYAxis"]),I=1;for(let q=n;q<=X;q++)u.id=1500+I,u.positionX=q-1,u.positionY=0,u.positionZ=i-2.5,u.rotationX=270,u.rotationY=270,u.rotationZ=0,u.width=2,u.height=1,u.value=`${N[q-1]?N[q-1].fString:q-1}`,u.color=h.getAxisColor("x"),e.normalXAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,g,"normalXAxis","a-entity"),u.id=4500+I,u.positionZ=T+.5,u.rotationX=270,u.rotationY=90,u.value=`${N[q-1]?N[q-1].fString:q-1}`,e.reversedXAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,g,"reversedXAxis","a-entity"),I++;d.deleteUnnecessaryElements(I,["normalXAxis","reversedXAxis"]),u.positionX=n,u.positionY=0,u.positionZ=i-4,u.rotationX=270,u.rotationY=180,u.rotationZ=0,u.width=4,u.height=1,u.value=ee,u.id="downLabel",e.labels.attributes[0]=c.labelTemplate(u),d.updateElement(0,g,"labels","a-entity"),u.positionX=X-2.5,u.positionZ=T+2,u.rotationY=0,u.id="upLabel",e.labels.attributes[1]=c.labelTemplate(u),d.updateElement(1,g,"labels","a-entity"),u.positionX=n-4,u.positionY=0,u.positionZ=i+.5,u.rotationX=270,u.rotationY=270,u.rotationZ=0,u.width=4,u.height=1,u.value=F,u.color=h.getAxisColor("z"),u.id="leftLabel",e.labels.attributes[2]=c.labelTemplate(u),d.updateElement(2,g,"labels","a-entity"),u.positionX=X+2,u.positionZ=T-2.5,u.rotationX=270,u.rotationY=90,u.id="rightLabel",e.labels.attributes[3]=c.labelTemplate(u),d.updateElement(3,g,"labels","a-entity"),u.positionX=n-90,u.positionY=-6.5,u.positionZ=i+90,u.rotationX=0,u.rotationY=123,u.rotationZ=0,u.title=t.fTitle,u.color=h.getPrimaryFontColor();const K={};K.positionX=0,K.positionY=0,K.positionZ=-1,K.width=170,K.height=30,K.color="white",e.titles.attributes[0]=c.titleTemplate(u,K),d.updateElement(0,g,"titles","a-entity"),u.positionX=n+120,u.positionZ=i-70,u.rotationY=330,u.title=t.fName,e.titles.attributes[1]=c.titleTemplate(u,K),d.updateElement(1,g,"titles","a-entity")}const sa=(r,e)=>r<=0?0:(e>1&&(r=Math.round((r/e+Number.EPSILON)*100)/100),r);class aa{constructor(e){Z(this,Gr,void 0);U(this,Gr,e)}createTH2DemoHistogram(e,t,n,i){const o=At.createHistogram("TH2I",e,t);let a=n;for(let c=1;c<=20;c++)for(let d=1;d<=20;d++){const h=o.getBin(d,c);let u=0;u=a,o.setBinContent(h,u),a+=i}return o.fXaxis.fTitle="x Axis",o.fYaxis.fTitle="y Axis",o.fName="You don't have a valid file path",o.fTitle="This is a TH2 histogram demo",o.fMaximum=a,o}createTH3DemoHistogram(e,t,n,i,o){const a=At.createHistogram("TH3I",e,t,n);let c=i;for(let d=1;d<=20;d++)for(let h=1;h<=20;h++)for(let u=1;u<=20;u++){const g=a.getBin(u,h,d);let E=0;E=c,a.setBinContent(g,E),c+=o}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=c,a}}Gr=new WeakMap;const la=be.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 r=this.el;Pi(this.schema,r),document.addEventListener("keydown",Br),document.addEventListener("keyup",Yr),this.demoHistogramService=new aa,this.localStorageService=new Qr,this.cameraService=new Wt,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=n=>{console.log(n),this.section.xOffset=n.xOffset,this.section.yOffset=n.yOffset,this.range=n.range,this.cameraService.setCameraPosition(n),En(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0},t=n=>{this.localStorageService.storeTH2Offsets(n.xOffset,n.yOffset,n.range),e(n)};this.subscription=$e.getChangedSection().subscribe(t)},update:function(){Oi(),this.section=JSON.parse(this.data.section),At.openFile(this.data.filename).then(r=>r.readObject("hUsersVsProjects")).then(r=>{this.localStorageService.initHistogramData(r),this.histogram=r,En(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(r=>{this.histogram=this.demoHistogramService.createTH2DemoHistogram(20,20,0,.1),this.localStorageService.initHistogramData(this.histogram),En(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0,console.log(r)})},tick:function(){this.render&&(this.render=!1)},remove:function(){this.subscription.unsubscribe(),document.removeEventListener("keydown",Br),document.removeEventListener("keyup",Yr)}}),ca=be.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 Wt;const ua=r=>{r.detail.y>.95&&($e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),He.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),r.detail.y<-.95&&($e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),He.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),r.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),$e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),He.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),r.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),$e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),He.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},da=r=>{r.detail.y>.95&&($e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),He.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),r.detail.y<-.95&&($e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),He.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),r.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),$e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),He.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),r.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),$e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),He.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},fa=r=>{r.detail.y>.1&&xe.next({scale:-.1}),r.detail.y<-.1&&xe.next({scale:.1})},ha=r=>{r.detail.y>.1?xe.next({source:"next"}):r.detail.y<-.1&&xe.next({source:"prev"})},pa=r=>{r.detail.y>.1?xe.next({theme:"next"}):r.detail.y<-.1&&xe.next({theme:"prev"})},ma=r=>{r.detail.y>.1?xe.next({range:"next"}):r.detail.y<-.1&&xe.next({range:"prev"})},ga=r=>{r.detail.y>.1?xe.next({scene:"next"}):r.detail.y<-.1&&xe.next({scene:"prev"})},Ni=r=>{r==="Y"?xe.next({tool:"next"}):xe.next({tool:"prev"})},Fi=r=>{He.changeHistogramSectionByOffset("zOffset","TH3",!0,r)},Li=r=>{He.changeHistogramSectionByOffset("zOffset","TH3",!1,r)},Vi=()=>{new Wt},ya=r=>{ua(r)},ba=r=>{da(r)},va=()=>{Or.saveSelectedBinToLocalStorage(),jt()===0&&xe.next({binData:Or})},xa=()=>{Or.deleteBinFromLocalStorage()},Sa=()=>{$e.changeHistogramFunction("feet","TH2")},wa=()=>{$e.changeHistogramFunction("default","TH2")},Ca=()=>{Dt.setVisibilityOfBanners("oculus")},Ea=()=>{Dt.setUserState()},Ta=()=>{Dt.shiftBanners()},ka=r=>{r.forEach(e=>{})},_a=be.registerComponent("left-controller-logging",{init:function(){let r=!1,e=!0,t=!1;const n=this.el;n.addEventListener("gripdown",()=>{r=!0}),n.addEventListener("gripup",()=>{r=!1}),n.addEventListener("thumbstickdown",()=>{}),n.addEventListener("thumbstickmoved",i=>{if(r&&jt()===2)fa(i);else if(r&&jt()===3){if(e){e=!1,ha(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&jt()===4){if(e){e=!1,pa(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&jt()===5){if(e){e=!1,ma(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(r&&jt()===6&&e){e=!1,ga(i);const o=setTimeout(()=>{e=!0},600);return()=>clearTimeout(o)}}),n.addEventListener("ybuttondown",()=>{r?t||(t=!0,Ni("Y")):Ca()}),n.addEventListener("xbuttondown",()=>{r?t||(t=!0,Ni("X")):Ea()}),n.addEventListener("ybuttonup",()=>{t=!1}),n.addEventListener("xbuttonup",()=>{t=!1})},update:function(){Vi()}}),Aa=be.registerComponent("right-controller-logging",{init:function(){let r=!1;const e=this.el;e.addEventListener("gripdown",()=>{r=!0}),e.addEventListener("gripup",()=>{r=!1}),e.addEventListener("thumbstickmoved",t=>{r?ya(t):ba(t)}),e.addEventListener("bbuttondown",()=>{Fi(!r)}),e.addEventListener("abuttondown",()=>{Li(!r)}),e.addEventListener("thumbstickdown",()=>{r?Sa():wa()}),e.addEventListener("triggerdown",()=>{r?(va(),ka()):(xa(),Ta())})},update:function(){Vi()}});class Pa{constructor(){Z(this,ir,void 0);U(this,ir,new gt)}sendSourceSubject(e){s(this,ir).next(e)}getSourceSettingSubject(){return s(this,ir).asObservable()}}ir=new WeakMap;const Oa=new Pa,ja=be.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 r=this.el;let e=!1,t=!1;r.addEventListener("gripdown",()=>{e=!0}),r.addEventListener("gripup",()=>{e=!1});let n=0;const i=500;r.addEventListener("triggerdown",()=>{const o=performance.now();if(o-n<=i){let c=function(){let h=this.sceneElement.getAttribute("position"),u={x:h.x,y:h.y-1,z:h.z};this.sceneElement.setAttribute("position",u),u.y<=a&&clearInterval(d)},a=2,d=setInterval(c.bind(this),20)}else t=!0;n=o}),r.addEventListener("triggerup",()=>{n=performance.now(),t=!1}),r.addEventListener("thumbstickmoved",o=>{e&&jt()>1?this.tsData.set(0,0):(t?this.data.fly=!0:this.data.fly=!1,this.thumbstickMoved(o))})},update:function(){this.sceneElement=document.getElementById("cameraRig")},tick:function(r,e){var t=this.data,n=this.velocity;!n[t.horizontalAxis]&&!n[t.verticalAxis]&&!this.tsData.length()||(e=e/1e3,this.updateVelocity(e),!(!n[t.horizontalAxis]&&!n[t.verticalAxis])&&this.sceneElement.object3D.position.add(this.getMovementVector(e)))},updateVelocity:function(r){var e,t,n,i=this.data,o=this.velocity,a,c;const d=1e-5;if(t=i.horizontalAxis,n=i.verticalAxis,r>.2){o[t]=0,o[n]=0;return}var h=Math.pow(1/this.moveEasing,r*60);o[t]!==0&&(o[t]=o[t]*h),o[n]!==0&&(o[n]=o[n]*h),Math.abs(o[t])<d&&(o[t]=0),Math.abs(o[n])<d&&(o[n]=0),i.enabled&&(e=i.acceleration,i.adEnabled&&this.tsData.x&&(c=i.adInverted?-1:1,o[t]+=c*e*this.tsData.x*r),i.wsEnabled&&(a=i.wsInverted?-1:1,o[n]+=a*e*this.tsData.y*r))},getMovementVector:function(){var r=new THREE.Vector3(0,0,0),e=new THREE.Euler(0,0,0,"YXZ"),t=4;return function(n){var i=this.el.sceneEl.camera.el.object3D.rotation,o=this.velocity,a;return r.copy(o),r.multiplyScalar(n),i&&(a=this.data.fly?i.x:0,e.set(a,i.y-t,0),r.applyEuler(e)),r}}(),thumbstickMoved:function(r){this.tsData.set(r.detail.x,r.detail.y)},remove:function(){this.el.removeEventListener("thumbstickmoved",this.thumbstickMoved)}}),Da=new Qr;de.Banner=ca,de.HistogramTH2=la,de.LeftController=_a,de.NdmVrScene=ra,de.RightController=Aa,de.TabletContext=St,de.ThumbsticController=ja,de.defaultScheme=Di,de.ndmVrStorage=Da,de.sourceSettingSubject=Oa,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})});
414
+ yTitle: ${L};
415
+ xTitle: ${V};
416
+ absoluteContent: ${P};
417
+ binName: ${U};
418
+ xMin: ${j};
419
+ yMin: ${w};
420
+ xMax: ${b};
421
+ yMax: ${z};
422
+ xCenter: ${C};
423
+ yCenter: ${k};
424
+ xWidth: ${m};
425
+ yWidth: ${O};
426
+ markedColor: ${_e};
427
+ selectColor: ${f.getSecondaryAccentColor()};
428
+ axisX: ${f.getAxisColor("x")};
429
+ axisY: ${f.getAxisColor("y")};
430
+ axisZ: ${f.getAxisColor("z")}`;u.id=we,u.positionX=j,u.positionY=S,u.positionZ=w,u.scaleX=m/2,u.scaleY=v,u.scaleZ=O/2,u.color=_e,u.class="clickable",u.data=Re,e.bins.attributes[I]=c.binTemplate(u),d.updateElement(I,p,"bins","a-box"),I++}d.deleteUnnecessaryElements(I,["bins"]),u.id=1500+I,u.positionX=Y+.5,u.positionY=0,u.positionZ=A+.5,u.rotationX=270,u.rotationY=360,u.rotationZ=0,u.width=2,u.height=2,u.value="0",u.color=f.getAxisColor("y"),e.normalXAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,p,"normalXAxis","a-entity"),u.positionZ=i-2.5,u.rotationX=270,u.rotationY=180,e.reversedYAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,p,"reversedYAxis","a-entity"),u.positionX=r-2.5,u.positionZ=A+.5,e.normalYAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,p,"normalYAxis","a-entity"),u.positionZ=i-2.5,u.rotationY=180,e.reversedXAxis.attributes[0]=c.axisTemplate(u),d.updateElement(0,p,"reversedXAxis","a-entity"),I=1;for(let J=i;J<=A;J++)u.id=1500+I,u.positionX=r-2.5,u.positionY=0,u.positionZ=J-1,u.rotationX=270,u.rotationY=180,u.rotationZ=0,u.width=2,u.height=1,u.value=`${W[J-1]?W[J-1].fString:J-1}`,u.color=f.getAxisColor("z"),e.normalYAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,p,"normalYAxis","a-entity"),u.id=4500+I,u.positionX=Y+.5,u.rotationY=360,u.value=`${W[J-1]?W[J-1].fString:J-1}`,e.reversedYAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,p,"reversedYAxis","a-entity"),I++;d.deleteUnnecessaryElements(I,["normalYAxis","reversedYAxis"]),I=1;for(let J=r;J<=Y;J++)u.id=1500+I,u.positionX=J-1,u.positionY=0,u.positionZ=i-2.5,u.rotationX=270,u.rotationY=270,u.rotationZ=0,u.width=2,u.height=1,u.value=`${B[J-1]?B[J-1].fString:J-1}`,u.color=f.getAxisColor("x"),e.normalXAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,p,"normalXAxis","a-entity"),u.id=4500+I,u.positionZ=A+.5,u.rotationX=270,u.rotationY=90,u.value=`${B[J-1]?B[J-1].fString:J-1}`,e.reversedXAxis.attributes[I]=c.axisTemplate(u),d.updateElement(I,p,"reversedXAxis","a-entity"),I++;d.deleteUnnecessaryElements(I,["normalXAxis","reversedXAxis"]),u.positionX=r,u.positionY=0,u.positionZ=i-4,u.rotationX=270,u.rotationY=180,u.rotationZ=0,u.width=4,u.height=1,u.value=V,u.id="downLabel",e.labels.attributes[0]=c.labelTemplate(u),d.updateElement(0,p,"labels","a-entity"),u.positionX=Y-2.5,u.positionZ=A+2,u.rotationY=0,u.id="upLabel",e.labels.attributes[1]=c.labelTemplate(u),d.updateElement(1,p,"labels","a-entity"),u.positionX=r-4,u.positionY=0,u.positionZ=i+.5,u.rotationX=270,u.rotationY=270,u.rotationZ=0,u.width=4,u.height=1,u.value=L,u.color=f.getAxisColor("z"),u.id="leftLabel",e.labels.attributes[2]=c.labelTemplate(u),d.updateElement(2,p,"labels","a-entity"),u.positionX=Y+2,u.positionZ=A-2.5,u.rotationX=270,u.rotationY=90,u.id="rightLabel",e.labels.attributes[3]=c.labelTemplate(u),d.updateElement(3,p,"labels","a-entity"),u.positionX=r-90,u.positionY=-6.5,u.positionZ=i+90,u.rotationX=0,u.rotationY=123,u.rotationZ=0,u.title=t.fTitle,u.color=f.getPrimaryFontColor();const K={};K.positionX=0,K.positionY=0,K.positionZ=-1,K.width=170,K.height=30,K.color="white",e.titles.attributes[0]=c.titleTemplate(u,K),d.updateElement(0,p,"titles","a-entity"),u.positionX=r+120,u.positionZ=i-70,u.rotationY=330,u.title=t.fName,e.titles.attributes[1]=c.titleTemplate(u,K),d.updateElement(1,p,"titles","a-entity")}const Xa=(n,e)=>n<=0?0:(e>1&&(n=Math.round((n/e+Number.EPSILON)*100)/100),n);class Ua{constructor(e){q(this,er,void 0);G(this,er,e)}createTH2DemoHistogram(e,t,r,i){const o=It.createHistogram("TH2I",e,t);let s=r;for(let c=1;c<=20;c++)for(let d=1;d<=20;d++){const f=o.getBin(d,c);let u=0;u=s,o.setBinContent(f,u),s+=i}return o.fXaxis.fTitle="x Axis",o.fYaxis.fTitle="y Axis",o.fName="You don't have a valid file path",o.fTitle="This is a TH2 histogram demo",o.fMaximum=s,o}createTH3DemoHistogram(e,t,r,i,o){const s=It.createHistogram("TH3I",e,t,r);let c=i;for(let d=1;d<=20;d++)for(let f=1;f<=20;f++)for(let u=1;u<=20;u++){const p=s.getBin(u,f,d);let S=0;S=c,s.setBinContent(p,S),c+=o}return s.fXaxis.fTitle="x Axis",s.fYaxis.fTitle="y Axis",s.fZaxis.fTitle="z Axis",s.fName="You don't have a valid file path",s.fTitle="This is a TH3 histogram demo",s.fMaximum=c,s}}er=new WeakMap;const Za=ve.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 n=this.el;Ni(this.schema,n),document.addEventListener("keydown",Ln),document.addEventListener("keyup",Vn),this.demoHistogramService=new Ua,this.localStorageService=new ir,this.cameraService=new kt,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),Dr(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=ze.getChangedSection().subscribe(t)},update:function(){Fi(),this.section=JSON.parse(this.data.section),It.openFile(this.data.filename).then(n=>n.readObject("hUsersVsProjects")).then(n=>{this.localStorageService.initHistogramData(n),this.histogram=n,Dr(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(n=>{this.histogram=this.demoHistogramService.createTH2DemoHistogram(20,20,0,.1),this.localStorageService.initHistogramData(this.histogram),Dr(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0,console.log(n)})},tick:function(){this.render&&(this.render=!1)},remove:function(){this.subscription.unsubscribe(),document.removeEventListener("keydown",Ln),document.removeEventListener("keyup",Vn)}}),Ga=ve.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 kt;const qa=n=>{n.detail.y>.95&&(ze.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Me.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),n.detail.y<-.95&&(ze.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Me.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),n.detail.x<-.95&&(at.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),ze.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Me.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),n.detail.x>.95&&(at.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),ze.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Me.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},Ka=n=>{n.detail.y>.95&&(ze.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Me.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),n.detail.y<-.95&&(ze.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Me.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),n.detail.x<-.95&&(at.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),ze.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Me.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),n.detail.x>.95&&(at.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),ze.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Me.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},Ja=n=>{n.detail.y>.1&&Se.next({scale:-.1}),n.detail.y<-.1&&Se.next({scale:.1})},Qa=n=>{n.detail.y>.1?Se.next({source:"next"}):n.detail.y<-.1&&Se.next({source:"prev"})},el=n=>{n.detail.y>.1?Se.next({theme:"next"}):n.detail.y<-.1&&Se.next({theme:"prev"})},tl=n=>{n.detail.y>.1?Se.next({range:"next"}):n.detail.y<-.1&&Se.next({range:"prev"})},nl=n=>{n.detail.y>.1?Se.next({scene:"next"}):n.detail.y<-.1&&Se.next({scene:"prev"})},eo=n=>{n==="Y"?Se.next({tool:"next"}):Se.next({tool:"prev"})},to=n=>{Me.changeHistogramSectionByOffset("zOffset","TH3",!0,n)},no=n=>{Me.changeHistogramSectionByOffset("zOffset","TH3",!1,n)},ro=()=>{new kt},rl=n=>{qa(n)},il=n=>{Ka(n)},ol=()=>{$n.saveSelectedBinToLocalStorage(),Ft()===0&&Se.next({binData:$n})},sl=()=>{$n.deleteBinFromLocalStorage()},al=()=>{ze.changeHistogramFunction("feet","TH2")},ll=()=>{ze.changeHistogramFunction("default","TH2")},cl=()=>{Bt.setVisibilityOfBanners("oculus")},ul=()=>{Bt.setUserState()},dl=()=>{Bt.shiftBanners()},hl=n=>{n.forEach(e=>{})},fl=ve.registerComponent("left-controller-logging",{init:function(){let n=!1,e=!0,t=!1;const r=this.el;r.addEventListener("gripdown",()=>{n=!0}),r.addEventListener("gripup",()=>{n=!1}),r.addEventListener("thumbstickdown",()=>{}),r.addEventListener("thumbstickmoved",i=>{if(n&&Ft()===2)Ja(i);else if(n&&Ft()===3){if(e){e=!1,Qa(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(n&&Ft()===4){if(e){e=!1,el(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(n&&Ft()===5){if(e){e=!1,tl(i);const o=setTimeout(()=>{e=!0},450);return()=>clearTimeout(o)}}else if(n&&Ft()===6&&e){e=!1,nl(i);const o=setTimeout(()=>{e=!0},600);return()=>clearTimeout(o)}}),r.addEventListener("ybuttondown",()=>{n?t||(t=!0,eo("Y")):cl()}),r.addEventListener("xbuttondown",()=>{n?t||(t=!0,eo("X")):ul()}),r.addEventListener("ybuttonup",()=>{t=!1}),r.addEventListener("xbuttonup",()=>{t=!1})},update:function(){ro()}}),pl=ve.registerComponent("right-controller-logging",{init:function(){let n=!1;const e=this.el;e.addEventListener("gripdown",()=>{n=!0}),e.addEventListener("gripup",()=>{n=!1}),e.addEventListener("thumbstickmoved",t=>{n?rl(t):il(t)}),e.addEventListener("bbuttondown",()=>{to(!n)}),e.addEventListener("abuttondown",()=>{no(!n)}),e.addEventListener("thumbstickdown",()=>{n?al():ll()}),e.addEventListener("triggerdown",()=>{n?(ol(),hl()):(sl(),dl())})},update:function(){ro()}});class ml{constructor(){q(this,hn,void 0);G(this,hn,new ft)}sendSourceSubject(e){a(this,hn).next(e)}getSourceSettingSubject(){return a(this,hn).asObservable()}}hn=new WeakMap;const gl=new ml,yl=ve.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 n=this.el;let e=!1,t=!1;n.addEventListener("gripdown",()=>{e=!0}),n.addEventListener("gripup",()=>{e=!1});let r=0;const i=500;n.addEventListener("triggerdown",()=>{const o=performance.now();if(o-r<=i){let c=function(){let f=this.sceneElement.getAttribute("position"),u={x:f.x,y:f.y-1,z:f.z};this.sceneElement.setAttribute("position",u),u.y<=s&&clearInterval(d)},s=2,d=setInterval(c.bind(this),20)}else t=!0;r=o}),n.addEventListener("triggerup",()=>{r=performance.now(),t=!1}),n.addEventListener("thumbstickmoved",o=>{e&&Ft()>1?this.tsData.set(0,0):(t?this.data.fly=!0:this.data.fly=!1,this.thumbstickMoved(o))})},update:function(){this.sceneElement=document.getElementById("cameraRig")},tick:function(n,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(n){var e,t,r,i=this.data,o=this.velocity,s,c;const d=1e-5;if(t=i.horizontalAxis,r=i.verticalAxis,n>.2){o[t]=0,o[r]=0;return}var f=Math.pow(1/this.moveEasing,n*60);o[t]!==0&&(o[t]=o[t]*f),o[r]!==0&&(o[r]=o[r]*f),Math.abs(o[t])<d&&(o[t]=0),Math.abs(o[r])<d&&(o[r]=0),i.enabled&&(e=i.acceleration,i.adEnabled&&this.tsData.x&&(c=i.adInverted?-1:1,o[t]+=c*e*this.tsData.x*n),i.wsEnabled&&(s=i.wsInverted?-1:1,o[r]+=s*e*this.tsData.y*n))},getMovementVector:function(){var n=new THREE.Vector3(0,0,0),e=new THREE.Euler(0,0,0,"YXZ"),t=4;return function(r){var i=this.el.sceneEl.camera.el.object3D.rotation,o=this.velocity,s;return n.copy(o),n.multiplyScalar(r),i&&(s=this.data.fly?i.x:0,e.set(s,i.y-t,0),n.applyEuler(e)),n}}(),thumbstickMoved:function(n){this.tsData.set(n.detail.x,n.detail.y)},remove:function(){this.el.removeEventListener("thumbstickmoved",this.thumbstickMoved)}}),vl=new ir;ae.Banner=Ga,ae.HistogramTH2=Za,ae.LeftController=fl,ae.NdmVr=Ya,ae.NdmVrScene=Gi,ae.RegisterVerticalMoveComponent=Ji,ae.RightController=pl,ae.TabletContext=jt,ae.ThumbsticController=yl,ae.defaultScheme=Wn,ae.ndmVrStorage=vl,ae.registerScreenControlsComponent=Ki,ae.registerVRModeDetector=qi,ae.sourceSettingSubject=gl,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})});