@qctrl/visualizer
Version:
The Q-CTRL Visualizer is a package for displaying animated 3d Bloch sphere visualizations.
1 lines • 692 kB
JavaScript
(()=>{var t={43:(t,e,n)=>{var i=n(6624),r=n(7367),a=n(2050),s=Function.prototype,o=Object.prototype,l=s.toString,c=o.hasOwnProperty,h=l.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=i(t))return!1;var e=r(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==h}},77:(t,e,n)=>{var i=n(5364),r=n(6615),a=n(3676),s=n(2489),o=n(2039),l=n(6624),c=n(1513),h="[object Map]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",m=c(i),g=c(r),_=c(a),v=c(s),L=c(o),x=l;(i&&x(new i(new ArrayBuffer(1)))!=f||r&&x(new r)!=h||a&&x(a.resolve())!=u||s&&x(new s)!=d||o&&x(new o)!=p)&&(x=function(t){var e=l(t),n="[object Object]"==e?t.constructor:void 0,i=n?c(n):"";if(i)switch(i){case m:return f;case g:return h;case _:return u;case v:return d;case L:return p}return e}),t.exports=x},253:(t,e,n)=>{var i=n(6431),r=n(8975),a=n(8305);t.exports=function(t){return i(t,a,r)}},462:(t,e,n)=>{var i=n(2645),r=n(7717);t.exports=function(t,e,n){var a=!0,s=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return r(n)&&(a="leading"in n?!!n.leading:a,s="trailing"in n?!!n.trailing:s),i(t,e,{leading:a,maxWait:e,trailing:s})}},581:(t,e,n)=>{var i=n(7384),r=n(4238),a=n(2329),s=n(4037),o=n(3613);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=o,t.exports=l},617:t=>{t.exports=function(){return[]}},644:(t,e,n)=>{var i=n(2582);t.exports=function(t,e,n){var r=null==t?void 0:i(t,e);return void 0===r?n:r}},677:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},683:(t,e,n)=>{var i=n(1176),r=n(2864),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];a.call(t,e)&&r(s,n)&&(void 0!==n||e in t)||i(t,e,n)}},715:t=>{var e=Date.now;t.exports=function(t){var n=0,i=0;return function(){var r=e(),a=16-(r-i);if(i=r,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},764:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}},943:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}},951:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},1017:(t,e,n)=>{var i=n(7714),r=n(1142),a=n(5525),s=n(6521),o=n(5768);t.exports=function(t,e){return(s(t)?i:r)(t,o(a(e,3)))}},1142:(t,e,n)=>{var i=n(9797);t.exports=function(t,e){var n=[];return i(t,function(t,i,r){e(t,i,r)&&n.push(t)}),n}},1176:(t,e,n)=>{var i=n(8835);t.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},1187:(t,e,n)=>{var i=n(1330),r=n(1992),a=n(7717),s=n(1513),o=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,h=l.toString,u=c.hasOwnProperty,d=RegExp("^"+h.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||r(t))&&(i(t)?d:o).test(s(t))}},1241:(t,e,n)=>{var i=n(2839),r=n(6615),a=n(2229);t.exports=function(t,e){var n=this.__data__;if(n instanceof i){var s=n.__data__;if(!r||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(s)}return n.set(t,e),this.size=n.size,this}},1242:(t,e,n)=>{var i=n(764);t.exports=function(t,e){return i(e,function(e){return t[e]})}},1327:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},1330:(t,e,n)=>{var i=n(6624),r=n(7717);t.exports=function(t){if(!r(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1359:(t,e,n)=>{var i=n(8089),r=n(2118);t.exports=function(t,e,n,a){var s=n.length,o=s,l=!a;if(null==t)return!o;for(t=Object(t);s--;){var c=n[s];if(l&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++s<o;){var h=(c=n[s])[0],u=t[h],d=c[1];if(l&&c[2]){if(void 0===u&&!(h in t))return!1}else{var p=new i;if(a)var f=a(u,d,h,t,e,p);if(!(void 0===f?r(d,u,3,a,p):f))return!1}}return!0}},1373:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},1379:(t,e,n)=>{var i=n(8802);t.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}},1387:t=>{t.exports=function(t){return this.__data__.has(t)}},1513:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},1577:(t,e,n)=>{var i=n(5418),r=n(715)(i);t.exports=r},1600:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}},1922:(t,e,n)=>{var i=n(6521),r=n(6770),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(i(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!r(t))||(s.test(t)||!a.test(t)||null!=e&&t in Object(e))}},1992:(t,e,n)=>{var i,r=n(2353),a=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!a&&a in t}},2008:(t,e,n)=>{var i=n(2961),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=i(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},2039:(t,e,n)=>{var i=n(2310)(n(8453),"WeakMap");t.exports=i},2050:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},2055:t=>{t.exports=function(){return!1}},2118:(t,e,n)=>{var i=n(8196),r=n(2050);t.exports=function t(e,n,a,s,o){return e===n||(null==e||null==n||!r(e)&&!r(n)?e!=e&&n!=n:i(e,n,a,s,t,o))}},2229:(t,e,n)=>{var i=n(3752),r=n(9886),a=n(6969),s=n(5989),o=n(3485);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=o,t.exports=l},2238:(t,e,n)=>{var i=n(2424),r=n(4525),a=n(1577);t.exports=function(t,e){return a(r(t,e,i),t+"")}},2252:(t,e,n)=>{var i=n(5750),r=n(6626),a=n(6521);t.exports=function(t){return(a(t)?i:r)(t)}},2261:(t,e,n)=>{var i=n(1176),r=n(2864);t.exports=function(t,e,n){(void 0!==n&&!r(t[e],n)||void 0===n&&!(e in t))&&i(t,e,n)}},2310:(t,e,n)=>{var i=n(1187),r=n(3584);t.exports=function(t,e){var n=r(t,e);return i(n)?n:void 0}},2329:(t,e,n)=>{var i=n(7946),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},2353:(t,e,n)=>{var i=n(8453)["__core-js_shared__"];t.exports=i},2354:(t,e,n)=>{t=n.nmd(t);var i=n(8453),r=e&&!e.nodeType&&e,a=r&&t&&!t.nodeType&&t,s=a&&a.exports===r?i.Buffer:void 0,o=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,i=o?o(n):new t.constructor(n);return t.copy(i),i}},2413:t=>{t.exports=function(t){return this.__data__.get(t)}},2424:t=>{t.exports=function(t){return t}},2473:(t,e,n)=>{var i=n(7162),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,s,o){var l=1&n,c=i(t),h=c.length;if(h!=i(e).length&&!l)return!1;for(var u=h;u--;){var d=c[u];if(!(l?d in e:r.call(e,d)))return!1}var p=o.get(t),f=o.get(e);if(p&&f)return p==e&&f==t;var m=!0;o.set(t,e),o.set(e,t);for(var g=l;++u<h;){var _=t[d=c[u]],v=e[d];if(a)var L=l?a(v,_,d,e,t,o):a(_,v,d,t,e,o);if(!(void 0===L?_===v||s(_,v,n,a,o):L)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var x=t.constructor,y=e.constructor;x==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof y&&y instanceof y||(m=!1)}return o.delete(t),o.delete(e),m}},2489:(t,e,n)=>{var i=n(2310)(n(8453),"Set");t.exports=i},2582:(t,e,n)=>{var i=n(9041),r=n(7901);t.exports=function(t,e){for(var n=0,a=(e=i(e,t)).length;null!=t&&n<a;)t=t[r(e[n++])];return n&&n==a?t:void 0}},2645:(t,e,n)=>{var i=n(7717),r=n(4884),a=n(6086),s=Math.max,o=Math.min;t.exports=function(t,e,n){var l,c,h,u,d,p,f=0,m=!1,g=!1,_=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var n=l,i=c;return l=c=void 0,f=e,u=t.apply(i,n)}function L(t){var n=t-p;return void 0===p||n>=e||n<0||g&&t-f>=h}function x(){var t=r();if(L(t))return y(t);d=setTimeout(x,function(t){var n=e-(t-p);return g?o(n,h-(t-f)):n}(t))}function y(t){return d=void 0,_&&l?v(t):(l=c=void 0,u)}function S(){var t=r(),n=L(t);if(l=arguments,c=this,p=t,n){if(void 0===d)return function(t){return f=t,d=setTimeout(x,e),m?v(t):u}(p);if(g)return clearTimeout(d),d=setTimeout(x,e),v(p)}return void 0===d&&(d=setTimeout(x,e)),u}return e=a(e)||0,i(n)&&(m=!!n.leading,h=(g="maxWait"in n)?s(a(n.maxWait)||0,e):h,_="trailing"in n?!!n.trailing:_),S.cancel=function(){void 0!==d&&clearTimeout(d),f=0,l=p=c=d=void 0},S.flush=function(){return void 0===d?u:y(r())},S}},2715:(t,e,n)=>{var i=n(2961);t.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}},2753:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&e.test(t))&&t>-1&&t%1==0&&t<n}},2839:(t,e,n)=>{var i=n(3614),r=n(2008),a=n(2715),s=n(5655),o=n(8383);function l(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=a,l.prototype.has=s,l.prototype.set=o,t.exports=l},2864:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},2950:(t,e,n)=>{var i=n(7e3),r=n(5002),a=n(8825),s=4294967295,o=Math.min;t.exports=function(t,e){if((t=a(t))<1||t>9007199254740991)return[];var n=s,l=o(t,s);e=r(e),t-=s;for(var c=i(l,e);++n<t;)e(n);return c}},2961:(t,e,n)=>{var i=n(2864);t.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}},3075:t=>{var e=Math.floor,n=Math.random;t.exports=function(t,i){return t+e(n()*(i-t+1))}},3127:(t,e,n)=>{var i=n(1359),r=n(3360),a=n(3173);t.exports=function(t){var e=r(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||i(n,t,e)}}},3173:t=>{t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},3360:(t,e,n)=>{var i=n(7500),r=n(4630);t.exports=function(t){for(var e=r(t),n=e.length;n--;){var a=e[n],s=t[a];e[n]=[a,s,i(s)]}return e}},3439:(t,e,n)=>{var i=n(677),r=n(6998);t.exports=function(t,e){return null!=t&&r(t,e,i)}},3480:(t,e,n)=>{var i=n(8976),r=/^\s+/;t.exports=function(t){return t?t.slice(0,i(t)+1).replace(r,""):t}},3485:(t,e,n)=>{var i=n(1379);t.exports=function(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}},3486:t=>{t.exports=function(t){return function(){return t}}},3584:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},3613:(t,e,n)=>{var i=n(7946);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},3614:t=>{t.exports=function(){this.__data__=[],this.size=0}},3676:(t,e,n)=>{var i=n(2310)(n(8453),"Promise");t.exports=i},3752:(t,e,n)=>{var i=n(581),r=n(2839),a=n(6615);t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(a||r),string:new i}}},3921:(t,e,n)=>{var i=n(8429);t.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},4037:(t,e,n)=>{var i=n(7946),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:r.call(e,t)}},4061:(t,e,n)=>{var i=n(6624),r=n(9358),a=n(2050),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&r(t.length)&&!!s[i(t)]}},4073:(t,e,n)=>{var i=n(8453).Symbol;t.exports=i},4167:(t,e,n)=>{var i=n(4061),r=n(8877),a=n(6273),s=a&&a.isTypedArray,o=s?r(s):i;t.exports=o},4238:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},4415:(t,e,n)=>{var i=n(7667),r=n(1600),a=n(9707);t.exports=function(t,e,n,s,o,l){var c=1&n,h=t.length,u=e.length;if(h!=u&&!(c&&u>h))return!1;var d=l.get(t),p=l.get(e);if(d&&p)return d==e&&p==t;var f=-1,m=!0,g=2&n?new i:void 0;for(l.set(t,e),l.set(e,t);++f<h;){var _=t[f],v=e[f];if(s)var L=c?s(v,_,f,e,t,l):s(_,v,f,t,e,l);if(void 0!==L){if(L)continue;m=!1;break}if(g){if(!r(e,function(t,e){if(!a(g,e)&&(_===t||o(_,t,n,s,l)))return g.push(e)})){m=!1;break}}else if(_!==v&&!o(_,v,n,s,l)){m=!1;break}}return l.delete(t),l.delete(e),m}},4454:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},4478:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},4511:(t,e,n)=>{var i=n(2238),r=n(6027);t.exports=function(t){return i(function(e,n){var i=-1,a=n.length,s=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(a--,s):void 0,o&&r(n[0],n[1],o)&&(s=a<3?void 0:s,a=1),e=Object(e);++i<a;){var l=n[i];l&&t(e,l,i,s)}return e})}},4525:(t,e,n)=>{var i=n(7057),r=Math.max;t.exports=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var a=arguments,s=-1,o=r(a.length-e,0),l=Array(o);++s<o;)l[s]=a[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=a[s];return c[e]=n(l),i(t,this,c)}}},4533:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,i){n[++e]=[i,t]}),n}},4630:(t,e,n)=>{var i=n(8079),r=n(5152),a=n(8710);t.exports=function(t){return a(t)?i(t):r(t)}},4633:(t,e,n)=>{var i=n(5152),r=n(77),a=n(6356),s=n(6521),o=n(8710),l=n(9232),c=n(1327),h=n(4167),u=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(o(t)&&(s(t)||"string"==typeof t||"function"==typeof t.splice||l(t)||h(t)||a(t)))return!t.length;var e=r(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!i(t).length;for(var n in t)if(u.call(t,n))return!1;return!0}},4884:(t,e,n)=>{var i=n(8453);t.exports=function(){return i.Date.now()}},4928:(t,e,n)=>{var i=n(2229);function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],a=n.cache;if(a.has(r))return a.get(r);var s=t.apply(this,i);return n.cache=a.set(r,s)||a,s};return n.cache=new(r.Cache||i),n}r.Cache=i,t.exports=r},5002:(t,e,n)=>{var i=n(2424);t.exports=function(t){return"function"==typeof t?t:i}},5149:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},5152:(t,e,n)=>{var i=n(1327),r=n(5450),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return r(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},5161:(t,e,n)=>{var i=n(9761),r=n(4630);t.exports=function(t,e){return t&&i(t,e,r)}},5200:(t,e,n)=>{var i=n(2261),r=n(2354),a=n(3921),s=n(5799),o=n(7569),l=n(6356),c=n(6521),h=n(9941),u=n(9232),d=n(1330),p=n(7717),f=n(43),m=n(4167),g=n(4454),_=n(7332);t.exports=function(t,e,n,v,L,x,y){var S=g(t,n),M=g(e,n),b=y.get(M);if(b)i(t,n,b);else{var E=x?x(S,M,n+"",t,e,y):void 0,T=void 0===E;if(T){var w=c(M),A=!w&&u(M),R=!w&&!A&&m(M);E=M,w||A||R?c(S)?E=S:h(S)?E=s(S):A?(T=!1,E=r(M,!0)):R?(T=!1,E=a(M,!0)):E=[]:f(M)||l(M)?(E=S,l(S)?E=_(S):p(S)&&!d(S)||(E=o(M))):T=!1}T&&(y.set(M,E),L(E,M,v,x,y),y.delete(M)),i(t,n,E)}}},5313:(t,e,n)=>{var i=n(8710);t.exports=function(t,e){return function(n,r){if(null==n)return n;if(!i(n))return t(n,r);for(var a=n.length,s=e?a:-1,o=Object(n);(e?s--:++s<a)&&!1!==r(o[s],s,o););return n}}},5340:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},5364:(t,e,n)=>{var i=n(2310)(n(8453),"DataView");t.exports=i},5391:(t,e,n)=>{var i=n(7717),r=n(1327),a=n(5149),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return a(t);var e=r(t),n=[];for(var o in t)("constructor"!=o||!e&&s.call(t,o))&&n.push(o);return n}},5418:(t,e,n)=>{var i=n(3486),r=n(8835),a=n(2424),s=r?function(t,e){return r(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:a;t.exports=s},5450:(t,e,n)=>{var i=n(951)(Object.keys,Object);t.exports=i},5525:(t,e,n)=>{var i=n(3127),r=n(7234),a=n(2424),s=n(6521),o=n(9791);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?s(t)?r(t[0],t[1]):i(t):o(t)}},5655:(t,e,n)=>{var i=n(2961);t.exports=function(t){return i(this.__data__,t)>-1}},5750:(t,e,n)=>{var i=n(3075);t.exports=function(t){var e=t.length;return e?t[i(0,e-1)]:void 0}},5768:t=>{t.exports=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}},5794:(t,e,n)=>{var i=n(6360),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=i(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,function(t,n,i,r){e.push(i?r.replace(a,"$1"):n||t)}),e});t.exports=s},5799:t=>{t.exports=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}},5962:(t,e,n)=>{var i=n(8089),r=n(2261),a=n(9761),s=n(5200),o=n(7717),l=n(8305),c=n(4454);t.exports=function t(e,n,h,u,d){e!==n&&a(n,function(a,l){if(d||(d=new i),o(a))s(e,n,l,h,t,u,d);else{var p=u?u(c(e,l),a,l+"",e,n,d):void 0;void 0===p&&(p=a),r(e,l,p)}},l)}},5989:(t,e,n)=>{var i=n(1379);t.exports=function(t){return i(this,t).has(t)}},6027:(t,e,n)=>{var i=n(2864),r=n(8710),a=n(2753),s=n(7717);t.exports=function(t,e,n){if(!s(n))return!1;var o=typeof e;return!!("number"==o?r(n)&&a(e,n.length):"string"==o&&e in n)&&i(n[e],t)}},6086:(t,e,n)=>{var i=n(3480),r=n(7717),a=n(6770),s=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=i(t);var n=o.test(t);return n||l.test(t)?c(t.slice(2),n?2:8):s.test(t)?NaN:+t}},6273:(t,e,n)=>{t=n.nmd(t);var i=n(8928),r=e&&!e.nodeType&&e,a=r&&t&&!t.nodeType&&t,s=a&&a.exports===r&&i.process,o=function(){try{var t=a&&a.require&&a.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=o},6284:(t,e,n)=>{var i=n(5962),r=n(4511)(function(t,e,n){i(t,e,n)});t.exports=r},6356:(t,e,n)=>{var i=n(7382),r=n(2050),a=Object.prototype,s=a.hasOwnProperty,o=a.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(t){return r(t)&&s.call(t,"callee")&&!o.call(t,"callee")};t.exports=l},6360:(t,e,n)=>{var i=n(4928);t.exports=function(t){var e=i(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}},6431:(t,e,n)=>{var i=n(9512),r=n(6521);t.exports=function(t,e,n){var a=e(t);return r(t)?a:i(a,n(t))}},6521:t=>{var e=Array.isArray;t.exports=e},6615:(t,e,n)=>{var i=n(2310)(n(8453),"Map");t.exports=i},6624:(t,e,n)=>{var i=n(4073),r=n(7915),a=n(4478),s=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?r(t):a(t)}},6626:(t,e,n)=>{var i=n(5750),r=n(7168);t.exports=function(t){return i(r(t))}},6770:(t,e,n)=>{var i=n(6624),r=n(2050);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==i(t)}},6969:(t,e,n)=>{var i=n(1379);t.exports=function(t){return i(this,t).get(t)}},6998:(t,e,n)=>{var i=n(9041),r=n(6356),a=n(6521),s=n(2753),o=n(9358),l=n(7901);t.exports=function(t,e,n){for(var c=-1,h=(e=i(e,t)).length,u=!1;++c<h;){var d=l(e[c]);if(!(u=null!=t&&n(t,d)))break;t=t[d]}return u||++c!=h?u:!!(h=null==t?0:t.length)&&o(h)&&s(d,h)&&(a(t)||r(t))}},7e3:t=>{t.exports=function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}},7057:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},7073:t=>{t.exports=function(t){return this.__data__.has(t)}},7084:(t,e,n)=>{var i=n(8453).Uint8Array;t.exports=i},7162:(t,e,n)=>{var i=n(6431),r=n(7328),a=n(4630);t.exports=function(t){return i(t,a,r)}},7168:(t,e,n)=>{var i=n(1242),r=n(4630);t.exports=function(t){return null==t?[]:i(t,r(t))}},7234:(t,e,n)=>{var i=n(2118),r=n(644),a=n(3439),s=n(1922),o=n(7500),l=n(3173),c=n(7901);t.exports=function(t,e){return s(t)&&o(e)?l(c(t),e):function(n){var s=r(n,t);return void 0===s&&s===e?a(n,t):i(e,s,3)}}},7295:(t,e,n)=>{var i=n(2582);t.exports=function(t){return function(e){return i(e,t)}}},7328:(t,e,n)=>{var i=n(7714),r=n(617),a=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,o=s?function(t){return null==t?[]:(t=Object(t),i(s(t),function(e){return a.call(t,e)}))}:r;t.exports=o},7332:(t,e,n)=>{var i=n(9111),r=n(8305);t.exports=function(t){return i(t,r(t))}},7367:(t,e,n)=>{var i=n(951)(Object.getPrototypeOf,Object);t.exports=i},7380:(t,e,n)=>{var i=n(2839);t.exports=function(){this.__data__=new i,this.size=0}},7382:(t,e,n)=>{var i=n(6624),r=n(2050);t.exports=function(t){return r(t)&&"[object Arguments]"==i(t)}},7384:(t,e,n)=>{var i=n(7946);t.exports=function(){this.__data__=i?i(null):{},this.size=0}},7456:(t,e,n)=>{var i=n(6086),r=1/0;t.exports=function(t){return t?(t=i(t))===r||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},7468:(t,e,n)=>{var i=n(2118);t.exports=function(t,e){return i(t,e)}},7500:(t,e,n)=>{var i=n(7717);t.exports=function(t){return t==t&&!i(t)}},7569:(t,e,n)=>{var i=n(8408),r=n(7367),a=n(1327);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:i(r(t))}},7667:(t,e,n)=>{var i=n(2229),r=n(5340),a=n(1387);function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i;++e<n;)this.add(t[e])}s.prototype.add=s.prototype.push=r,s.prototype.has=a,t.exports=s},7714:t=>{t.exports=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,a=[];++n<i;){var s=t[n];e(s,n,t)&&(a[r++]=s)}return a}},7717:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7850:(t,e,n)=>{var i=n(683),r=n(9041),a=n(2753),s=n(7717),o=n(7901);t.exports=function(t,e,n,l){if(!s(t))return t;for(var c=-1,h=(e=r(e,t)).length,u=h-1,d=t;null!=d&&++c<h;){var p=o(e[c]),f=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return t;if(c!=u){var m=d[p];void 0===(f=l?l(m,p,d):void 0)&&(f=s(m)?m:a(e[c+1])?[]:{})}i(d,p,f),d=d[p]}return t}},7862:(t,e,n)=>{var i=n(764),r=n(5525),a=n(9140),s=n(253);t.exports=function(t,e){if(null==t)return{};var n=i(s(t),function(t){return[t]});return e=r(e),a(t,n,function(t,n){return e(t,n[0])})}},7901:(t,e,n)=>{var i=n(6770);t.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},7915:(t,e,n)=>{var i=n(4073),r=Object.prototype,a=r.hasOwnProperty,s=r.toString,o=i?i.toStringTag:void 0;t.exports=function(t){var e=a.call(t,o),n=t[o];try{t[o]=void 0;var i=!0}catch(t){}var r=s.call(t);return i&&(e?t[o]=n:delete t[o]),r}},7946:(t,e,n)=>{var i=n(2310)(Object,"create");t.exports=i},8079:(t,e,n)=>{var i=n(7e3),r=n(6356),a=n(6521),s=n(9232),o=n(2753),l=n(4167),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),h=!n&&r(t),u=!n&&!h&&s(t),d=!n&&!h&&!u&&l(t),p=n||h||u||d,f=p?i(t.length,String):[],m=f.length;for(var g in t)!e&&!c.call(t,g)||p&&("length"==g||u&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,m))||f.push(g);return f}},8089:(t,e,n)=>{var i=n(2839),r=n(7380),a=n(8354),s=n(2413),o=n(7073),l=n(1241);function c(t){var e=this.__data__=new i(t);this.size=e.size}c.prototype.clear=r,c.prototype.delete=a,c.prototype.get=s,c.prototype.has=o,c.prototype.set=l,t.exports=c},8196:(t,e,n)=>{var i=n(8089),r=n(4415),a=n(9306),s=n(2473),o=n(77),l=n(6521),c=n(9232),h=n(4167),u="[object Arguments]",d="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,m,g,_){var v=l(t),L=l(e),x=v?d:o(t),y=L?d:o(e),S=(x=x==u?p:x)==p,M=(y=y==u?p:y)==p,b=x==y;if(b&&c(t)){if(!c(e))return!1;v=!0,S=!1}if(b&&!S)return _||(_=new i),v||h(t)?r(t,e,n,m,g,_):a(t,e,x,n,m,g,_);if(!(1&n)){var E=S&&f.call(t,"__wrapped__"),T=M&&f.call(e,"__wrapped__");if(E||T){var w=E?t.value():t,A=T?e.value():e;return _||(_=new i),g(w,A,n,m,_)}}return!!b&&(_||(_=new i),s(t,e,n,m,g,_))}},8305:(t,e,n)=>{var i=n(8079),r=n(5391),a=n(8710);t.exports=function(t){return a(t)?i(t,!0):r(t)}},8354:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},8382:(t,e,n)=>{var i=n(9020);t.exports=function(t){return null==t?"":i(t)}},8383:(t,e,n)=>{var i=n(2961);t.exports=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},8408:(t,e,n)=>{var i=n(7717),r=Object.create,a=function(){function t(){}return function(e){if(!i(e))return{};if(r)return r(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},8429:(t,e,n)=>{var i=n(7084);t.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}},8453:(t,e,n)=>{var i=n(8928),r="object"==typeof self&&self&&self.Object===Object&&self,a=i||r||Function("return this")();t.exports=a},8710:(t,e,n)=>{var i=n(1330),r=n(9358);t.exports=function(t){return null!=t&&r(t.length)&&!i(t)}},8802:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},8825:(t,e,n)=>{var i=n(7456);t.exports=function(t){var e=i(t),n=e%1;return e==e?n?e-n:e:0}},8835:(t,e,n)=>{var i=n(2310),r=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=r},8877:t=>{t.exports=function(t){return function(e){return t(e)}}},8928:(t,e,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},8975:(t,e,n)=>{var i=n(9512),r=n(7367),a=n(7328),s=n(617),o=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)i(e,a(t)),t=r(t);return e}:s;t.exports=o},8976:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},9020:(t,e,n)=>{var i=n(4073),r=n(764),a=n(6521),s=n(6770),o=i?i.prototype:void 0,l=o?o.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return r(e,t)+"";if(s(e))return l?l.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},9041:(t,e,n)=>{var i=n(6521),r=n(1922),a=n(5794),s=n(8382);t.exports=function(t,e){return i(t)?t:r(t,e)?[t]:a(s(t))}},9111:(t,e,n)=>{var i=n(683),r=n(1176);t.exports=function(t,e,n,a){var s=!n;n||(n={});for(var o=-1,l=e.length;++o<l;){var c=e[o],h=a?a(n[c],t[c],c,n,t):void 0;void 0===h&&(h=t[c]),s?r(n,c,h):i(n,c,h)}return n}},9140:(t,e,n)=>{var i=n(2582),r=n(7850),a=n(9041);t.exports=function(t,e,n){for(var s=-1,o=e.length,l={};++s<o;){var c=e[s],h=i(t,c);n(h,c)&&r(l,a(c,t),h)}return l}},9232:(t,e,n)=>{t=n.nmd(t);var i=n(8453),r=n(2055),a=e&&!e.nodeType&&e,s=a&&t&&!t.nodeType&&t,o=s&&s.exports===a?i.Buffer:void 0,l=(o?o.isBuffer:void 0)||r;t.exports=l},9306:(t,e,n)=>{var i=n(4073),r=n(7084),a=n(2864),s=n(4415),o=n(4533),l=n(943),c=i?i.prototype:void 0,h=c?c.valueOf:void 0;t.exports=function(t,e,n,i,c,u,d){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!u(new r(t),new r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=o;case"[object Set]":var f=1&i;if(p||(p=l),t.size!=e.size&&!f)return!1;var m=d.get(t);if(m)return m==e;i|=2,d.set(t,e);var g=s(p(t),p(e),i,c,u,d);return d.delete(t),g;case"[object Symbol]":if(h)return h.call(t)==h.call(e)}return!1}},9358:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},9512:t=>{t.exports=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}},9677:t=>{t.exports=function(t){return function(e,n,i){for(var r=-1,a=Object(e),s=i(e),o=s.length;o--;){var l=s[t?o:++r];if(!1===n(a[l],l,a))break}return e}}},9707:t=>{t.exports=function(t,e){return t.has(e)}},9761:(t,e,n)=>{var i=n(9677)();t.exports=i},9791:(t,e,n)=>{var i=n(1373),r=n(7295),a=n(1922),s=n(7901);t.exports=function(t){return a(t)?i(s(t)):r(t)}},9797:(t,e,n)=>{var i=n(5161),r=n(5313)(i);t.exports=r},9886:(t,e,n)=>{var i=n(1379);t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},9941:(t,e,n)=>{var i=n(8710),r=n(2050);t.exports=function(t){return r(t)&&i(t)}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={id:i,loaded:!1,exports:{}};return t[i](a,a.exports,n),a.loaded=!0,a.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var i={};(()=>{"use strict";n.r(i),n.d(i,{AVAILABLE_CAMERA_PRESETS:()=>bs,ConstructorProps:()=>t.ConstructorProps,GATE_AXES:()=>lu,OnUpdateProps:()=>t.OnUpdateProps,STANDARD_GATE_ROTATION_RADIANS:()=>ou,UpdateProps:()=>t.UpdateProps,default:()=>Su,getFinalStateFromGates:()=>yu});var t={};n.r(t),n.d(t,{A:()=>xu});var e=n(462),r=n.n(e),a=n(6284),s=n.n(a),o=n(7862),l=n.n(o),c=n(4633),h=n.n(c),u=n(1017),d=n.n(u),p=n(7468),f=n.n(p);const m="181",g=0,_=1,v=2,L=0,x=1,y=2,S=3,M=0,b=1,E=2,T=100,w=101,A=102,R=200,C=201,P=202,D=203,I=204,U=205,N=206,O=207,F=208,z=209,B=210,V=211,k=212,H=213,G=214,W=0,j=1,X=2,q=3,Y=4,Z=5,K=6,J=7,$=301,Q=302,tt=303,et=304,nt=306,it=1e3,rt=1001,at=1002,st=1003,ot=1004,lt=1005,ct=1006,ht=1007,ut=1008,dt=1009,pt=1010,ft=1011,mt=1012,gt=1013,_t=1014,vt=1015,Lt=1016,xt=1017,yt=1018,St=1020,Mt=35902,bt=35899,Et=1023,Tt=1026,wt=1027,At=1028,Rt=1029,Ct=1030,Pt=1031,Dt=1033,It=33776,Ut=33777,Nt=33778,Ot=33779,Ft=35840,zt=35841,Bt=35842,Vt=35843,kt=36196,Ht=37492,Gt=37496,Wt=37808,jt=37809,Xt=37810,qt=37811,Yt=37812,Zt=37813,Kt=37814,Jt=37815,$t=37816,Qt=37817,te=37818,ee=37819,ne=37820,ie=37821,re=36492,ae=36494,se=36495,oe=36283,le=36284,ce=36285,he=36286,ue=2300,de=2301,pe=2302,fe=2400,me=2401,ge=2402,_e="",ve="srgb",Le="srgb-linear",xe="linear",ye="srgb",Se=7680,Me=512,be=513,Ee=514,Te=515,we=516,Ae=517,Re=518,Ce=519,Pe=35044,De="300 es",Ie=2e3,Ue=2001;function Ne(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function Oe(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Fe(){const t=Oe("canvas");return t.style.display="block",t}const ze={};let Be=null;function Ve(...t){const e="THREE."+t.shift();Be?Be("log",e,...t):console.log(e,...t)}function ke(...t){const e="THREE."+t.shift();Be?Be("warn",e,...t):console.warn(e,...t)}function He(...t){const e="THREE."+t.shift();Be?Be("error",e,...t):console.error(e,...t)}function Ge(...t){const e=t.join(" ");e in ze||(ze[e]=!0,ke(...t))}class We{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){const n=this._listeners;return void 0!==n&&(void 0!==n[t]&&-1!==n[t].indexOf(e))}removeEventListener(t,e){const n=this._listeners;if(void 0===n)return;const i=n[t];if(void 0!==i){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}dispatchEvent(t){const e=this._listeners;if(void 0===e)return;const n=e[t.type];if(void 0!==n){t.target=this;const e=n.slice(0);for(let n=0,i=e.length;n<i;n++)e[n].call(this,t);t.target=null}}}const je=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let Xe=1234567;const qe=Math.PI/180,Ye=180/Math.PI;function Ze(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(je[255&t]+je[t>>8&255]+je[t>>16&255]+je[t>>24&255]+"-"+je[255&e]+je[e>>8&255]+"-"+je[e>>16&15|64]+je[e>>24&255]+"-"+je[63&n|128]+je[n>>8&255]+"-"+je[n>>16&255]+je[n>>24&255]+je[255&i]+je[i>>8&255]+je[i>>16&255]+je[i>>24&255]).toLowerCase()}function Ke(t,e,n){return Math.max(e,Math.min(n,t))}function Je(t,e){return(t%e+e)%e}function $e(t,e,n){return(1-n)*t+n*e}function Qe(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function tn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}const en={DEG2RAD:qe,RAD2DEG:Ye,generateUUID:Ze,clamp:Ke,euclideanModulo:Je,mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},inverseLerp:function(t,e,n){return t!==e?(n-t)/(e-t):0},lerp:$e,damp:function(t,e,n,i){return $e(t,e,1-Math.exp(-n*i))},pingpong:function(t,e=1){return e-Math.abs(Je(t,2*e)-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(Xe=t);let e=Xe+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*qe},radToDeg:function(t){return t*Ye},isPowerOfTwo:function(t){return!(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},setQuaternionFromProperEuler:function(t,e,n,i,r){const a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),c=a((e+i)/2),h=s((e+i)/2),u=a((e-i)/2),d=s((e-i)/2),p=a((i-e)/2),f=s((i-e)/2);switch(r){case"XYX":t.set(o*h,l*u,l*d,o*c);break;case"YZY":t.set(l*d,o*h,l*u,o*c);break;case"ZXZ":t.set(l*u,l*d,o*h,o*c);break;case"XZX":t.set(o*h,l*f,l*p,o*c);break;case"YXY":t.set(l*p,o*h,l*f,o*c);break;case"ZYZ":t.set(l*f,l*p,o*h,o*c);break;default:ke("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:tn,denormalize:Qe};class nn{constructor(t=0,e=0){nn.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Ke(this.x,t.x,e.x),this.y=Ke(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=Ke(this.x,t,e),this.y=Ke(this.y,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Ke(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(Ke(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,a=this.y-t.y;return this.x=r*n-a*i+t.x,this.y=r*i+a*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class rn{constructor(t=0,e=0,n=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=i}static slerpFlat(t,e,n,i,r,a,s){let o=n[i+0],l=n[i+1],c=n[i+2],h=n[i+3],u=r[a+0],d=r[a+1],p=r[a+2],f=r[a+3];if(s<=0)return t[e+0]=o,t[e+1]=l,t[e+2]=c,void(t[e+3]=h);if(s>=1)return t[e+0]=u,t[e+1]=d,t[e+2]=p,void(t[e+3]=f);if(h!==f||o!==u||l!==d||c!==p){let t=o*u+l*d+c*p+h*f;t<0&&(u=-u,d=-d,p=-p,f=-f,t=-t);let e=1-s;if(t<.9995){const n=Math.acos(t),i=Math.sin(n);e=Math.sin(e*n)/i,o=o*e+u*(s=Math.sin(s*n)/i),l=l*e+d*s,c=c*e+p*s,h=h*e+f*s}else{o=o*e+u*s,l=l*e+d*s,c=c*e+p*s,h=h*e+f*s;const t=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=t,l*=t,c*=t,h*=t}}t[e]=o,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,r,a){const s=n[i],o=n[i+1],l=n[i+2],c=n[i+3],h=r[a],u=r[a+1],d=r[a+2],p=r[a+3];return t[e]=s*p+c*h+o*d-l*u,t[e+1]=o*p+c*u+l*h-s*d,t[e+2]=l*p+c*d+s*u-o*h,t[e+3]=c*p-s*h-o*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t._x,i=t._y,r=t._z,a=t._order,s=Math.cos,o=Math.sin,l=s(n/2),c=s(i/2),h=s(r/2),u=o(n/2),d=o(i/2),p=o(r/2);switch(a){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:ke("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],a=e[1],s=e[5],o=e[9],l=e[2],c=e[6],h=e[10],u=n+s+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-o)*t,this._y=(r-l)*t,this._z=(a-i)*t}else if(n>s&&n>h){const t=2*Math.sqrt(1+n-s-h);this._w=(c-o)/t,this._x=.25*t,this._y=(i+a)/t,this._z=(r+l)/t}else if(s>h){const t=2*Math.sqrt(1+s-n-h);this._w=(r-l)/t,this._x=(i+a)/t,this._y=.25*t,this._z=(o+c)/t}else{const t=2*Math.sqrt(1+h-n-s);this._w=(a-i)/t,this._x=(r+l)/t,this._y=(o+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<1e-8?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Ke(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,a=t._w,s=e._x,o=e._y,l=e._z,c=e._w;return this._x=n*c+a*s+i*l-r*o,this._y=i*c+a*o+r*s-n*l,this._z=r*c+a*l+n*o-i*s,this._w=a*c-n*s-i*o-r*l,this._onChangeCallback(),this}slerp(t,e){if(e<=0)return this;if(e>=1)return this.copy(t);let n=t._x,i=t._y,r=t._z,a=t._w,s=this.dot(t);s<0&&(n=-n,i=-i,r=-r,a=-a,s=-s);let o=1-e;if(s<.9995){const t=Math.acos(s),l=Math.sin(t);o=Math.sin(o*t)/l,e=Math.sin(e*t)/l,this._x=this._x*o+n*e,this._y=this._y*o+i*e,this._z=this._z*o+r*e,this._w=this._w*o+a*e,this._onChangeCallback()}else this._x=this._x*o+n*e,this._y=this._y*o+i*e,this._z=this._z*o+r*e,this._w=this._w*o+a*e,this.normalize();return this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class an{constructor(t=0,e=0,n=0){an.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(on.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(on.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,a=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*a,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*a,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*a,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,a=t.y,s=t.z,o=t.w,l=2*(a*i-s*n),c=2*(s*e-r*i),h=2*(r*n-a*e);return this.x=e+o*l+a*h-s*c,this.y=n+o*c+s*l-r*h,this.z=i+o*h+r*c-a*l,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Ke(this.x,t.x,e.x),this.y=Ke(this.y,t.y,e.y),this.z=Ke(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=Ke(this.x,t,e),this.y=Ke(this.y,t,e),this.z=Ke(this.z,t,e),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Ke(n,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,a=e.x,s=e.y,o=e.z;return this.x=i*o-r*s,this.y=r*a-n*o,this.z=n*s-i*a,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return sn.copy(this).projectOnVector(t),this.sub(sn)