diff --git a/asset-manifest.json b/asset-manifest.json index a9c21e6..8d027f3 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { - "main.css": "/embedding-scope/static/css/main.b6a99c83.css", - "main.js": "/embedding-scope/static/js/main.9d070f09.js", - "static/js/453.f3bb842a.chunk.js": "/embedding-scope/static/js/453.f3bb842a.chunk.js", - "index.html": "/embedding-scope/index.html", - "main.b6a99c83.css.map": "/embedding-scope/static/css/main.b6a99c83.css.map", - "main.9d070f09.js.map": "/embedding-scope/static/js/main.9d070f09.js.map", - "453.f3bb842a.chunk.js.map": "/embedding-scope/static/js/453.f3bb842a.chunk.js.map" + "main.css": "/static/css/main.b6a99c83.css", + "main.js": "/static/js/main.096605f1.js", + "static/js/453.f3bb842a.chunk.js": "/static/js/453.f3bb842a.chunk.js", + "index.html": "/index.html", + "main.b6a99c83.css.map": "/static/css/main.b6a99c83.css.map", + "main.096605f1.js.map": "/static/js/main.096605f1.js.map", + "453.f3bb842a.chunk.js.map": "/static/js/453.f3bb842a.chunk.js.map" }, "entrypoints": [ "static/css/main.b6a99c83.css", - "static/js/main.9d070f09.js" + "static/js/main.096605f1.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 7edda2b..e478511 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
0?(v[V]+=Z/Q*(1+q),y[V]+=K/Q*(1+q)):(v[V]+=S*t(),y[V]+=E*t())));for(r=0,i=0;r{var r=n(6064),i=n(4223),a={dimensions:["x","y"],center:.5,scale:1};function o(e,t,n){if(!i(t))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var o=(n=r(n,a)).dimensions;if(!Array.isArray(o)||2!==o.length)throw new Error("graphology-layout/random: given dimensions are invalid.");var s=n.center,l=n.scale,u=2*Math.PI,c=(s-.5)*l,h=t.order,d=o[0],f=o[1];function p(e,t){return t[d]=l*Math.cos(e*u/h)+c,t[f]=l*Math.sin(e*u/h)+c,t}var m=0;if(!e){var g={};return t.forEachNode((function(e){g[e]=p(m++,{})})),g}t.updateEachNodeAttributes((function(e,t){return p(m++,t),t}),{attributes:o})}var s=o.bind(null,!1);s.assign=o.bind(null,!0),e.exports=s},3598:(e,t,n)=>{var r=n(6064),i=n(4223),a={dimensions:["x","y"],center:.5,rng:Math.random,scale:1};function o(e,t,n){if(!i(t))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");var o=(n=r(n,a)).dimensions;if(!Array.isArray(o)||o.length<1)throw new Error("graphology-layout/random: given dimensions are invalid.");var s=o.length,l=n.center,u=n.rng,c=n.scale,h=(l-.5)*c;function d(e){for(var t=0;t {var r=n(4223);function i(e,t,n,i){var a=t+"Centrality";if(!r(n))throw new Error("graphology-centrality/"+a+": the given graph is not a valid graphology instance.");if("degree"!==t&&"undirected"===n.type)throw new Error("graphology-centrality/"+a+": cannot compute "+t+" centrality on an undirected graph.");var o=(i=i||{}).nodeCentralityAttribute||a,s=n.order-1,l=n[t].bind(n);if(!e){var u={};return n.forEachNode((function(e){u[e]=l(e)/s})),u}n.updateEachNodeAttributes((function(e,t){return t[o]=l(e)/s,t}),{attributes:[o]})}var a=i.bind(null,!1,"degree"),o=i.bind(null,!1,"inDegree"),s=i.bind(null,!1,"outDegree");a.assign=i.bind(null,!0,"degree"),o.assign=i.bind(null,!0,"inDegree"),s.assign=i.bind(null,!0,"outDegree"),t.gI=a},4033:(e,t,n)=>{var r=n(4223),i=n(6064),a=n(8306).u,o={nodePagerankAttribute:"pagerank",getEdgeWeight:"weight",alpha:.85,maxIterations:100,tolerance:1e-6};function s(e,t,n){if(!r(t))throw new Error("graphology-metrics/centrality/pagerank: the given graph is not a valid graphology instance.");var s,l,u,c,h=(n=i(n,o)).alpha,d=n.maxIterations,f=n.tolerance,p=n.nodePagerankAttribute,m=t.order,g=1/m,v=new a(t,n.getEdgeWeight),y=new Float64Array(t.order),_=new Float64Array(v.weights.length),b=[];for(s=0;s{var r=n(4223),i=n(3524).Fd,a=n(2104);function o(e,t){return e[0]>t[0]?1:e[0] t[1]?1:e[1] {var r=n(4223),i=n(3524).Fd,a=n(2104),o="weight";function s(e,t){return e[0]>t[0]?1:e[0] t[1]?1:e[1] t[2]?1:e[2] t[0]?1:e[0] t[1]?1:e[1] t[2]?1:e[2] t[3]?1:e[3] {var r=n(7153),i=n(4374);n(5937),n(6964),r.bidirectional,r.singleSource,r.singleSourceLength,r.undirectedSingleSourceLength,r.brandes,i.edgePathFromNodePath},7153:(e,t,n)=>{var r=n(4223),i=n(2867),a=n(6331);function o(e,t,n){if(!r(t))throw new Error("graphology-shortest-path: invalid graphology instance.");if(!t.hasNode(n))throw new Error('graphology-shortest-path: the "'+n+'" source node does not exist in the given graph.');n=""+n;var i=new Set,o={},s=0;o[n]=0;for(var l,u,c,h=[n];0!==h.length;){var d=[];for(l=0,u=h.length;l{var n=function(){return!0};t.edgePathFromNodePath=function(e,t){var r,i,a,o,s=t.length;if(s<2)return i=t[0],(o=e.multi?e.findEdge(i,i,n):e.edge(i,i))?[o]:[];s--;var l=new Array(s);for(r=0;r {e.exports=function e(t,n){t=t||{};var r,i={};for(var a in n){var o=t[a],s=n[a];!(r=s)||"object"!==typeof r||"function"===typeof r||Array.isArray(r)||r instanceof Set||r instanceof Map||r instanceof RegExp||r instanceof Date?i[a]=void 0===o?s:o:i[a]=e(o,s)}return i}},3524:(e,t)=>{function n(e){return"number"!==typeof e||isNaN(e)?1:e}function r(e,t){var n={},r=function(e){return"undefined"===typeof e?t:e};"function"===typeof t&&(r=t);var i=function(t){return r(t[e])},a=function(){return r(void 0)};return"string"===typeof e?(n.fromAttributes=i,n.fromGraph=function(e,t){return i(e.getEdgeAttributes(t))},n.fromEntry=function(e,t){return i(t)},n.fromPartialEntry=n.fromEntry,n.fromMinimalEntry=n.fromEntry):"function"===typeof e?(n.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},n.fromGraph=function(t,n){var i=t.extremities(n);return r(e(n,t.getEdgeAttributes(n),i[0],i[1],t.getNodeAttributes(i[0]),t.getNodeAttributes(i[1]),t.isUndirected(n)))},n.fromEntry=function(t,n,i,a,o,s,l){return r(e(t,n,i,a,o,s,l))},n.fromPartialEntry=function(t,n,i,a){return r(e(t,n,i,a))},n.fromMinimalEntry=function(t,n){return r(e(t,n))}):(n.fromAttributes=a,n.fromGraph=a,n.fromEntry=a,n.fromMinimalEntry=a),n}t.Fd=function(e){return r(e,n)}},4223:e=>{e.exports=function(e){return null!==e&&"object"===typeof e&&"function"===typeof e.addUndirectedEdgeWithKey&&"function"===typeof e.dropNode&&"boolean"===typeof e.multi}},7611:function(e){e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,n){return a=i()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},a.apply(null,arguments)}function o(e){var t="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return a(e,arguments,n(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),r(o,e)},o(e)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(){for(var e=arguments[0],t=1,n=arguments.length;t0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function M(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function A(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=M.bind(r);return i.listener=n,r.wrapFn=i,i}function T(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n 0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)y(s,this,t);else{var l=s.length,u=P(s,l);for(n=0;n =0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1 =0;r--)this.removeListener(e,t[r]);return this},b.prototype.listeners=function(e){return T(this,e,!0)},b.prototype.rawListeners=function(e){return T(this,e,!1)},b.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},b.prototype.listenerCount=C,b.prototype.eventNames=function(){return this._eventsCount>0?m(this._events):[]},"undefined"!=typeof Symbol&&(k.prototype[Symbol.iterator]=function(){return this}),k.of=function(){var e=arguments,t=e.length,n=0;return new k((function(){return n>=t?{done:!0}:{done:!1,value:e[n++]}}))},k.empty=function(){return new k((function(){return{done:!0}}))},k.fromSequence=function(e){var t=0,n=e.length;return new k((function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}}))},k.is=function(e){return e instanceof k||"object"==typeof e&&null!==e&&"function"==typeof e.next};var L=k,D={};D.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,D.SYMBOL_SUPPORT="undefined"!=typeof Symbol;var U=L,O=D,I=O.ARRAY_BUFFER_SUPPORT,N=O.SYMBOL_SUPPORT,F=function(e){var t=function(e){return"string"==typeof e||Array.isArray(e)||I&&ArrayBuffer.isView(e)?U.fromSequence(e):"object"!=typeof e||null===e?null:N&&"function"==typeof e[Symbol.iterator]?e[Symbol.iterator]():"function"==typeof e.next?e:null}(e);if(!t)throw new Error("obliterator: target is not iterable nor a valid iterator.");return t},z=F,B=function(e,t){for(var n,r=arguments.length>1?t:1/0,i=r!==1/0?new Array(r):[],a=0,o=z(e);;){if(a===r)return i;if((n=o.next()).done)return a!==t&&(i.length=a),i;i[a++]=n.value}},G=function(e){function n(t){var n;return(n=e.call(this)||this).name="GraphError",n.message=t,n}return t(n,e),n}(o(Error)),V=function(e){function n(t){var r;return(r=e.call(this,t)||this).name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s(r),n.prototype.constructor),r}return t(n,e),n}(G),H=function(e){function n(t){var r;return(r=e.call(this,t)||this).name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s(r),n.prototype.constructor),r}return t(n,e),n}(G),W=function(e){function n(t){var r;return(r=e.call(this,t)||this).name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(s(r),n.prototype.constructor),r}return t(n,e),n}(G);function j(e,t){this.key=e,this.attributes=t,this.clear()}function X(e,t){this.key=e,this.attributes=t,this.clear()}function q(e,t){this.key=e,this.attributes=t,this.clear()}function Y(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}function $(e,t,n,r,i,a,o){var s,l,u,c;if(r=""+r,0===n){if(!(s=e._nodes.get(r)))throw new H("Graph.".concat(t,': could not find the "').concat(r,'" node in the graph.'));u=i,c=a}else if(3===n){if(i=""+i,!(l=e._edges.get(i)))throw new H("Graph.".concat(t,': could not find the "').concat(i,'" edge in the graph.'));var h=l.source.key,d=l.target.key;if(r===h)s=l.target;else{if(r!==d)throw new H("Graph.".concat(t,': the "').concat(r,'" node is not attached to the "').concat(i,'" edge (').concat(h,", ").concat(d,")."));s=l.source}u=a,c=o}else{if(!(l=e._edges.get(r)))throw new H("Graph.".concat(t,': could not find the "').concat(r,'" edge in the graph.'));s=1===n?l.source:l.target,u=i,c=a}return[s,u,c]}j.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},X.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},q.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},Y.prototype.attach=function(){var e="out",t="in";this.undirected&&(e=t="undirected");var n=this.source.key,r=this.target.key;this.source[e][r]=this,this.undirected&&n===r||(this.target[t][n]=this)},Y.prototype.attachMulti=function(){var e="out",t="in",n=this.source.key,r=this.target.key;this.undirected&&(e=t="undirected");var i=this.source[e],a=i[r];if(void 0===a)return i[r]=this,void(this.undirected&&n===r||(this.target[t][n]=this));a.previous=this,this.next=a,i[r]=this,this.target[t][n]=this},Y.prototype.detach=function(){var e=this.source.key,t=this.target.key,n="out",r="in";this.undirected&&(n=r="undirected"),delete this.source[n][t],delete this.target[r][e]},Y.prototype.detachMulti=function(){var e=this.source.key,t=this.target.key,n="out",r="in";this.undirected&&(n=r="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};var Z=[{name:function(e){return"get".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i){var a=$(this,t,n,e,r,i),o=a[0],s=a[1];return o.attributes[s]}}},{name:function(e){return"get".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r){return $(this,t,n,e,r)[0].attributes}}},{name:function(e){return"has".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i){var a=$(this,t,n,e,r,i),o=a[0],s=a[1];return o.attributes.hasOwnProperty(s)}}},{name:function(e){return"set".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i,a){var o=$(this,t,n,e,r,i,a),s=o[0],l=o[1],u=o[2];return s.attributes[l]=u,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:l}),this}}},{name:function(e){return"update".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i,a){var o=$(this,t,n,e,r,i,a),s=o[0],l=o[1],u=o[2];if("function"!=typeof u)throw new V("Graph.".concat(t,": updater should be a function."));var c=s.attributes,h=u(c[l]);return c[l]=h,this.emit("nodeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:l}),this}}},{name:function(e){return"remove".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i){var a=$(this,t,n,e,r,i),o=a[0],s=a[1];return delete o.attributes[s],this.emit("nodeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:s}),this}}},{name:function(e){return"replace".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i){var a=$(this,t,n,e,r,i),o=a[0],s=a[1];if(!c(s))throw new V("Graph.".concat(t,": provided attributes are not a plain object."));return o.attributes=s,this.emit("nodeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}},{name:function(e){return"merge".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i){var a=$(this,t,n,e,r,i),o=a[0],s=a[1];if(!c(s))throw new V("Graph.".concat(t,": provided attributes are not a plain object."));return l(o.attributes,s),this.emit("nodeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:s}),this}}},{name:function(e){return"update".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i){var a=$(this,t,n,e,r,i),o=a[0],s=a[1];if("function"!=typeof s)throw new V("Graph.".concat(t,": provided updater is not a function."));return o.attributes=s(o.attributes),this.emit("nodeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}}],K=[{name:function(e){return"get".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+e,o=""+r;if(r=arguments[2],!(i=u(this,a,o,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(a,'" - "').concat(o,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(i=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return i.attributes[r]}}},{name:function(e){return"get".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e){var r;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var i=""+e,a=""+arguments[1];if(!(r=u(this,i,a,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(i,'" - "').concat(a,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(r=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return r.attributes}}},{name:function(e){return"has".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+e,o=""+r;if(r=arguments[2],!(i=u(this,a,o,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(a,'" - "').concat(o,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(i=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return i.attributes.hasOwnProperty(r)}}},{name:function(e){return"set".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i){var a;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+e,s=""+r;if(r=arguments[2],i=arguments[3],!(a=u(this,o,s,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(o,'" - "').concat(s,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(a=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return a.attributes[r]=i,this.emit("edgeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:r}),this}}},{name:function(e){return"update".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r,i){var a;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var o=""+e,s=""+r;if(r=arguments[2],i=arguments[3],!(a=u(this,o,s,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(o,'" - "').concat(s,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(a=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}if("function"!=typeof i)throw new V("Graph.".concat(t,": updater should be a function."));return a.attributes[r]=i(a.attributes[r]),this.emit("edgeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:r}),this}}},{name:function(e){return"remove".concat(e,"Attribute")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+e,o=""+r;if(r=arguments[2],!(i=u(this,a,o,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(a,'" - "').concat(o,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(i=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}return delete i.attributes[r],this.emit("edgeAttributesUpdated",{key:i.key,type:"remove",attributes:i.attributes,name:r}),this}}},{name:function(e){return"replace".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+e,o=""+r;if(r=arguments[2],!(i=u(this,a,o,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(a,'" - "').concat(o,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(i=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}if(!c(r))throw new V("Graph.".concat(t,": provided attributes are not a plain object."));return i.attributes=r,this.emit("edgeAttributesUpdated",{key:i.key,type:"replace",attributes:i.attributes}),this}}},{name:function(e){return"merge".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+e,o=""+r;if(r=arguments[2],!(i=u(this,a,o,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(a,'" - "').concat(o,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(i=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}if(!c(r))throw new V("Graph.".concat(t,": provided attributes are not a plain object."));return l(i.attributes,r),this.emit("edgeAttributesUpdated",{key:i.key,type:"merge",attributes:i.attributes,data:r}),this}}},{name:function(e){return"update".concat(e,"Attributes")},attacher:function(e,t,n){e.prototype[t]=function(e,r){var i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new W("Graph.".concat(t,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new W("Graph.".concat(t,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var a=""+e,o=""+r;if(r=arguments[2],!(i=u(this,a,o,n)))throw new H("Graph.".concat(t,': could not find an edge for the given path ("').concat(a,'" - "').concat(o,'").'))}else{if("mixed"!==n)throw new W("Graph.".concat(t,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(e=""+e,!(i=this._edges.get(e)))throw new H("Graph.".concat(t,': could not find the "').concat(e,'" edge in the graph.'))}if("function"!=typeof r)throw new V("Graph.".concat(t,": provided updater is not a function."));return i.attributes=r(i.attributes),this.emit("edgeAttributesUpdated",{key:i.key,type:"update",attributes:i.attributes}),this}}}],Q=L,J=F,ee=function(){var e=arguments,t=null,n=-1;return new Q((function(){for(var r=null;;){if(null===t){if(++n>=e.length)return{done:!0};t=J(e[n])}if(!0!==(r=t.next()).done)break;t=null}return r}))},te=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function ne(e,t,n,r){var i=!1;for(var a in t)if(a!==r){var o=t[a];if(i=n(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&i)return o.key}}function re(e,t,n,r){var i,a,o,s=!1;for(var l in t)if(l!==r){i=t[l];do{if(a=i.source,o=i.target,s=n(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected),e&&s)return i.key;i=i.next}while(void 0!==i)}}function ie(e,t){var n,r=Object.keys(e),i=r.length,a=0;return new L((function(){do{if(n)n=n.next;else{if(a>=i)return{done:!0};var o=r[a++];if(o===t){n=void 0;continue}n=e[o]}}while(!n);return{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}}}))}function ae(e,t,n,r){var i=t[n];if(i){var a=i.source,o=i.target;return r(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected)&&e?i.key:void 0}}function oe(e,t,n,r){var i=t[n];if(i){var a=!1;do{if(a=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&a)return i.key;i=i.next}while(void 0!==i)}}function se(e,t){var n=e[t];return void 0!==n.next?new L((function(){if(!n)return{done:!0};var e={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:e}})):L.of({edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected})}function le(e,t){if(0===e.size)return[];if("mixed"===t||t===e.type)return"function"==typeof Array.from?Array.from(e._edges.keys()):B(e._edges.keys(),e._edges.size);for(var n,r,i="undirected"===t?e.undirectedSize:e.directedSize,a=new Array(i),o="undirected"===t,s=e._edges.values(),l=0;!0!==(n=s.next()).done;)(r=n.value).undirected===o&&(a[l++]=r.key);return a}function ue(e,t,n,r){if(0!==t.size)for(var i,a,o="mixed"!==n&&n!==t.type,s="undirected"===n,l=!1,u=t._edges.values();!0!==(i=u.next()).done;)if(a=i.value,!o||a.undirected===s){var c=a,h=c.key,d=c.attributes,f=c.source,p=c.target;if(l=r(h,d,f.key,p.key,f.attributes,p.attributes,a.undirected),e&&l)return h}}function ce(e,t){if(0===e.size)return L.empty();var n="mixed"!==t&&t!==e.type,r="undirected"===t,i=e._edges.values();return new L((function(){for(var e,t;;){if((e=i.next()).done)return e;if(t=e.value,!n||t.undirected===r)break}return{value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected},done:!1}}))}function he(e,t,n,r,i,a){var o,s=t?re:ne;if("undirected"!==n){if("out"!==r&&(o=s(e,i.in,a),e&&o))return o;if("in"!==r&&(o=s(e,i.out,a,r?void 0:i.key),e&&o))return o}if("directed"!==n&&(o=s(e,i.undirected,a),e&&o))return o}function de(e,t,n,r){var i=[];return he(!1,e,t,n,r,(function(e){i.push(e)})),i}function fe(e,t,n){var r=L.empty();return"undirected"!==e&&("out"!==t&&void 0!==n.in&&(r=ee(r,ie(n.in))),"in"!==t&&void 0!==n.out&&(r=ee(r,ie(n.out,t?void 0:n.key)))),"directed"!==e&&void 0!==n.undirected&&(r=ee(r,ie(n.undirected))),r}function pe(e,t,n,r,i,a,o){var s,l=n?oe:ae;if("undirected"!==t){if(void 0!==i.in&&"out"!==r&&(s=l(e,i.in,a,o),e&&s))return s;if(void 0!==i.out&&"in"!==r&&(r||i.key!==a)&&(s=l(e,i.out,a,o),e&&s))return s}if("directed"!==t&&void 0!==i.undirected&&(s=l(e,i.undirected,a,o),e&&s))return s}function me(e,t,n,r,i){var a=[];return pe(!1,e,t,n,r,i,(function(e){a.push(e)})),a}function ge(e,t,n,r){var i=L.empty();return"undirected"!==e&&(void 0!==n.in&&"out"!==t&&r in n.in&&(i=ee(i,se(n.in,r))),void 0!==n.out&&"in"!==t&&r in n.out&&(t||n.key!==r)&&(i=ee(i,se(n.out,r)))),"directed"!==e&&void 0!==n.undirected&&r in n.undirected&&(i=ee(i,se(n.undirected,r))),i}var ve=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function ye(){this.A=null,this.B=null}function _e(e,t,n,r,i){for(var a in r){var o=r[a],s=o.source,l=o.target,u=s===n?l:s;if(!t||!t.has(u.key)){var c=i(u.key,u.attributes);if(e&&c)return u.key}}}function be(e,t,n,r,i){if("mixed"!==t){if("undirected"===t)return _e(e,null,r,r.undirected,i);if("string"==typeof n)return _e(e,null,r,r[n],i)}var a,o=new ye;if("undirected"!==t){if("out"!==n){if(a=_e(e,null,r,r.in,i),e&&a)return a;o.wrap(r.in)}if("in"!==n){if(a=_e(e,o,r,r.out,i),e&&a)return a;o.wrap(r.out)}}if("directed"!==t&&(a=_e(e,o,r,r.undirected,i),e&&a))return a}function xe(e,t,n){var r=Object.keys(n),i=r.length,a=0;return new L((function(){var o=null;do{if(a>=i)return e&&e.wrap(n),{done:!0};var s=n[r[a++]],l=s.source,u=s.target;o=l===t?u:l,e&&e.has(o.key)&&(o=null)}while(null===o);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}))}function we(e,t){var n=t.name,r=t.type,i=t.direction;e.prototype[n]=function(e){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return[];e=""+e;var t=this._nodes.get(e);if(void 0===t)throw new H("Graph.".concat(n,': could not find the "').concat(e,'" node in the graph.'));return function(e,t,n){if("mixed"!==e){if("undirected"===e)return Object.keys(n.undirected);if("string"==typeof t)return Object.keys(n[t])}var r=[];return be(!1,e,t,n,(function(e){r.push(e)})),r}("mixed"===r?this.type:r,i,t)}}function Se(e,t){var n=t.name,r=t.type,i=t.direction,a=n.slice(0,-1)+"Entries";e.prototype[a]=function(e){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return L.empty();e=""+e;var t=this._nodes.get(e);if(void 0===t)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" node in the graph.'));return function(e,t,n){if("mixed"!==e){if("undirected"===e)return xe(null,n,n.undirected);if("string"==typeof t)return xe(null,n,n[t])}var r=L.empty(),i=new ye;return"undirected"!==e&&("out"!==t&&(r=ee(r,xe(i,n,n.in))),"in"!==t&&(r=ee(r,xe(i,n,n.out)))),"directed"!==e&&(r=ee(r,xe(i,n,n.undirected))),r}("mixed"===r?this.type:r,i,t)}}function Ee(e,t,n,r,i){for(var a,o,s,l,u,c,h,d=r._nodes.values(),f=r.type;!0!==(a=d.next()).done;){var p=!1;if(o=a.value,"undirected"!==f)for(s in l=o.out){u=l[s];do{if(c=u.target,p=!0,h=i(o.key,c.key,o.attributes,c.attributes,u.key,u.attributes,u.undirected),e&&h)return u;u=u.next}while(u)}if("directed"!==f)for(s in l=o.undirected)if(!(t&&o.key>s)){u=l[s];do{if((c=u.target).key!==s&&(c=u.source),p=!0,h=i(o.key,c.key,o.attributes,c.attributes,u.key,u.attributes,u.undirected),e&&h)return u;u=u.next}while(u)}if(n&&!p&&(h=i(o.key,null,o.attributes,null,null,null,null),e&&h))return null}}function Me(e){if(!c(e))throw new V('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in e))throw new V("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!c(e.attributes)||null===e.attributes))throw new V("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Ae(e){if(!c(e))throw new V('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in e))throw new V("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new V("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!c(e.attributes)||null===e.attributes))throw new V("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in e&&"boolean"!=typeof e.undirected)throw new V("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}ye.prototype.wrap=function(e){null===this.A?this.A=e:null===this.B&&(this.B=e)},ye.prototype.has=function(e){return null!==this.A&&e in this.A||null!==this.B&&e in this.B};var Te,Ce=(Te=255&Math.floor(256*Math.random()),function(){return Te++}),Pe=new Set(["directed","undirected","mixed"]),Re=new Set(["domain","_events","_eventsCount","_maxListeners"]),ke={allowSelfLoops:!0,multi:!1,type:"mixed"};function Le(e,t,n){var r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function De(e,t,n,r,i,a,o,s){if(!r&&"undirected"===e.type)throw new W("Graph.".concat(t,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(r&&"directed"===e.type)throw new W("Graph.".concat(t,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(s&&!c(s))throw new V("Graph.".concat(t,': invalid attributes. Expecting an object but got "').concat(s,'"'));if(a=""+a,o=""+o,s=s||{},!e.allowSelfLoops&&a===o)throw new W("Graph.".concat(t,': source & target are the same ("').concat(a,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var l=e._nodes.get(a),u=e._nodes.get(o);if(!l)throw new H("Graph.".concat(t,': source node "').concat(a,'" not found.'));if(!u)throw new H("Graph.".concat(t,': target node "').concat(o,'" not found.'));var h={key:null,undirected:r,source:a,target:o,attributes:s};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new W("Graph.".concat(t,': the "').concat(i,'" edge already exists in the graph.'));if(!e.multi&&(r?void 0!==l.undirected[o]:void 0!==l.out[o]))throw new W("Graph.".concat(t,': an edge linking "').concat(a,'" to "').concat(o,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));var d=new Y(r,i,l,u,s);e._edges.set(i,d);var f=a===o;return r?(l.undirectedDegree++,u.undirectedDegree++,f&&(l.undirectedLoops++,e._undirectedSelfLoopCount++)):(l.outDegree++,u.inDegree++,f&&(l.directedLoops++,e._directedSelfLoopCount++)),e.multi?d.attachMulti():d.attach(),r?e._undirectedSize++:e._directedSize++,h.key=i,e.emit("edgeAdded",h),i}function Ue(e,t,n,r,i,a,o,s,u){if(!r&&"undirected"===e.type)throw new W("Graph.".concat(t,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(r&&"directed"===e.type)throw new W("Graph.".concat(t,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(s)if(u){if("function"!=typeof s)throw new V("Graph.".concat(t,': invalid updater function. Expecting a function but got "').concat(s,'"'))}else if(!c(s))throw new V("Graph.".concat(t,': invalid attributes. Expecting an object but got "').concat(s,'"'));var h;if(a=""+a,o=""+o,u&&(h=s,s=void 0),!e.allowSelfLoops&&a===o)throw new W("Graph.".concat(t,': source & target are the same ("').concat(a,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));var d,f,p=e._nodes.get(a),m=e._nodes.get(o);if(!n&&(d=e._edges.get(i))){if(!(d.source.key===a&&d.target.key===o||r&&d.source.key===o&&d.target.key===a))throw new W("Graph.".concat(t,': inconsistency detected when attempting to merge the "').concat(i,'" edge with "').concat(a,'" source & "').concat(o,'" target vs. ("').concat(d.source.key,'", "').concat(d.target.key,'").'));f=d}if(f||e.multi||!p||(f=r?p.undirected[o]:p.out[o]),f){var g=[f.key,!1,!1,!1];if(u?!h:!s)return g;if(u){var v=f.attributes;f.attributes=h(v),e.emit("edgeAttributesUpdated",{type:"replace",key:f.key,attributes:f.attributes})}else l(f.attributes,s),e.emit("edgeAttributesUpdated",{type:"merge",key:f.key,attributes:f.attributes,data:s});return g}s=s||{},u&&h&&(s=h(s));var y={key:null,undirected:r,source:a,target:o,attributes:s};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new W("Graph.".concat(t,': the "').concat(i,'" edge already exists in the graph.'));var _=!1,b=!1;p||(p=Le(e,a,{}),_=!0,a===o&&(m=p,b=!0)),m||(m=Le(e,o,{}),b=!0),d=new Y(r,i,p,m,s),e._edges.set(i,d);var x=a===o;return r?(p.undirectedDegree++,m.undirectedDegree++,x&&(p.undirectedLoops++,e._undirectedSelfLoopCount++)):(p.outDegree++,m.inDegree++,x&&(p.directedLoops++,e._directedSelfLoopCount++)),e.multi?d.attachMulti():d.attach(),r?e._undirectedSize++:e._directedSize++,y.key=i,e.emit("edgeAdded",y),[i,!0,_,b]}function Oe(e,t){e._edges.delete(t.key);var n=t.source,r=t.target,i=t.attributes,a=t.undirected,o=n===r;a?(n.undirectedDegree--,r.undirectedDegree--,o&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,o&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),a?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:i,source:n.key,target:r.key,undirected:a})}var Ie=function(n){function r(e){var t;if(t=n.call(this)||this,"boolean"!=typeof(e=l({},ke,e)).multi)throw new V("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(e.multi,'".'));if(!Pe.has(e.type))throw new V('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(e.type,'".'));if("boolean"!=typeof e.allowSelfLoops)throw new V("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(e.allowSelfLoops,'".'));var r="mixed"===e.type?j:"directed"===e.type?X:q;d(s(t),"NodeDataClass",r);var i="geid_"+Ce()+"_",a=0;return d(s(t),"_attributes",{}),d(s(t),"_nodes",new Map),d(s(t),"_edges",new Map),d(s(t),"_directedSize",0),d(s(t),"_undirectedSize",0),d(s(t),"_directedSelfLoopCount",0),d(s(t),"_undirectedSelfLoopCount",0),d(s(t),"_edgeKeyGenerator",(function(){var e;do{e=i+a++}while(t._edges.has(e));return e})),d(s(t),"_options",e),Re.forEach((function(e){return d(s(t),e,t[e])})),f(s(t),"order",(function(){return t._nodes.size})),f(s(t),"size",(function(){return t._edges.size})),f(s(t),"directedSize",(function(){return t._directedSize})),f(s(t),"undirectedSize",(function(){return t._undirectedSize})),f(s(t),"selfLoopCount",(function(){return t._directedSelfLoopCount+t._undirectedSelfLoopCount})),f(s(t),"directedSelfLoopCount",(function(){return t._directedSelfLoopCount})),f(s(t),"undirectedSelfLoopCount",(function(){return t._undirectedSelfLoopCount})),f(s(t),"multi",t._options.multi),f(s(t),"type",t._options.type),f(s(t),"allowSelfLoops",t._options.allowSelfLoops),f(s(t),"implementation",(function(){return"graphology"})),t}t(r,n);var i=r.prototype;return i._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},i.hasNode=function(e){return this._nodes.has(""+e)},i.hasDirectedEdge=function(e,t){if("undirected"===this.type)return!1;if(1===arguments.length){var n=""+e,r=this._edges.get(n);return!!r&&!r.undirected}if(2===arguments.length){e=""+e,t=""+t;var i=this._nodes.get(e);return!!i&&i.out.hasOwnProperty(t)}throw new V("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.hasUndirectedEdge=function(e,t){if("directed"===this.type)return!1;if(1===arguments.length){var n=""+e,r=this._edges.get(n);return!!r&&r.undirected}if(2===arguments.length){e=""+e,t=""+t;var i=this._nodes.get(e);return!!i&&i.undirected.hasOwnProperty(t)}throw new V("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.hasEdge=function(e,t){if(1===arguments.length){var n=""+e;return this._edges.has(n)}if(2===arguments.length){e=""+e,t=""+t;var r=this._nodes.get(e);return!!r&&(void 0!==r.out&&r.out.hasOwnProperty(t)||void 0!==r.undirected&&r.undirected.hasOwnProperty(t))}throw new V("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},i.directedEdge=function(e,t){if("undirected"!==this.type){if(e=""+e,t=""+t,this.multi)throw new W("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var n=this._nodes.get(e);if(!n)throw new H('Graph.directedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H('Graph.directedEdge: could not find the "'.concat(t,'" target node in the graph.'));var r=n.out&&n.out[t]||void 0;return r?r.key:void 0}},i.undirectedEdge=function(e,t){if("directed"!==this.type){if(e=""+e,t=""+t,this.multi)throw new W("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var n=this._nodes.get(e);if(!n)throw new H('Graph.undirectedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H('Graph.undirectedEdge: could not find the "'.concat(t,'" target node in the graph.'));var r=n.undirected&&n.undirected[t]||void 0;return r?r.key:void 0}},i.edge=function(e,t){if(this.multi)throw new W("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.edge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H('Graph.edge: could not find the "'.concat(t,'" target node in the graph.'));var r=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(r)return r.key},i.areDirectedNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areDirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&(t in n.in||t in n.out)},i.areOutNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areOutNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&t in n.out},i.areInNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areInNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&t in n.in},i.areUndirectedNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areUndirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"directed"!==this.type&&t in n.undirected},i.areNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&(t in n.in||t in n.out)||"directed"!==this.type&&t in n.undirected},i.areInboundNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areInboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&t in n.in||"directed"!==this.type&&t in n.undirected},i.areOutboundNeighbors=function(e,t){e=""+e,t=""+t;var n=this._nodes.get(e);if(!n)throw new H('Graph.areOutboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return"undirected"!==this.type&&t in n.out||"directed"!==this.type&&t in n.undirected},i.inDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.inDegree: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.inDegree},i.outDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.outDegree: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.outDegree},i.directedDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.directedDegree: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.inDegree+t.outDegree},i.undirectedDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.undirectedDegree: could not find the "'.concat(e,'" node in the graph.'));return"directed"===this.type?0:t.undirectedDegree},i.inboundDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.inboundDegree: could not find the "'.concat(e,'" node in the graph.'));var n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.inDegree),n},i.outboundDegree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.outboundDegree: could not find the "'.concat(e,'" node in the graph.'));var n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.outDegree),n},i.degree=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.degree: could not find the "'.concat(e,'" node in the graph.'));var n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.inDegree+t.outDegree),n},i.inDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.inDegree-t.directedLoops},i.outDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.outDegree-t.directedLoops},i.directedDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return"undirected"===this.type?0:t.inDegree+t.outDegree-2*t.directedLoops},i.undirectedDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return"directed"===this.type?0:t.undirectedDegree-2*t.undirectedLoops},i.inboundDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));var n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.inDegree,r+=t.directedLoops),n-r},i.outboundDegreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));var n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.outDegree,r+=t.directedLoops),n-r},i.degreeWithoutSelfLoops=function(e){e=""+e;var t=this._nodes.get(e);if(!t)throw new H('Graph.degreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));var n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.inDegree+t.outDegree,r+=2*t.directedLoops),n-r},i.source=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.source: could not find the "'.concat(e,'" edge in the graph.'));return t.source.key},i.target=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.target: could not find the "'.concat(e,'" edge in the graph.'));return t.target.key},i.extremities=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.extremities: could not find the "'.concat(e,'" edge in the graph.'));return[t.source.key,t.target.key]},i.opposite=function(e,t){e=""+e,t=""+t;var n=this._edges.get(t);if(!n)throw new H('Graph.opposite: could not find the "'.concat(t,'" edge in the graph.'));var r=n.source.key,i=n.target.key;if(e===r)return i;if(e===i)return r;throw new H('Graph.opposite: the "'.concat(e,'" node is not attached to the "').concat(t,'" edge (').concat(r,", ").concat(i,")."))},i.hasExtremity=function(e,t){e=""+e,t=""+t;var n=this._edges.get(e);if(!n)throw new H('Graph.hasExtremity: could not find the "'.concat(e,'" edge in the graph.'));return n.source.key===t||n.target.key===t},i.isUndirected=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.isUndirected: could not find the "'.concat(e,'" edge in the graph.'));return t.undirected},i.isDirected=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.isDirected: could not find the "'.concat(e,'" edge in the graph.'));return!t.undirected},i.isSelfLoop=function(e){e=""+e;var t=this._edges.get(e);if(!t)throw new H('Graph.isSelfLoop: could not find the "'.concat(e,'" edge in the graph.'));return t.source===t.target},i.addNode=function(e,t){var n=function(e,t,n){if(n&&!c(n))throw new V('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(n,'"'));if(t=""+t,n=n||{},e._nodes.has(t))throw new W('Graph.addNode: the "'.concat(t,'" node already exist in the graph.'));var r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}(this,e,t);return n.key},i.mergeNode=function(e,t){if(t&&!c(t))throw new V('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(t,'"'));e=""+e,t=t||{};var n=this._nodes.get(e);return n?(t&&(l(n.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:n.attributes,data:t})),[e,!1]):(n=new this.NodeDataClass(e,t),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:t}),[e,!0])},i.updateNode=function(e,t){if(t&&"function"!=typeof t)throw new V('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(t,'"'));e=""+e;var n=this._nodes.get(e);if(n){if(t){var r=n.attributes;n.attributes=t(r),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:n.attributes})}return[e,!1]}var i=t?t({}):{};return n=new this.NodeDataClass(e,i),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:i}),[e,!0]},i.dropNode=function(e){e=""+e;var t,n=this._nodes.get(e);if(!n)throw new H('Graph.dropNode: could not find the "'.concat(e,'" node in the graph.'));if("undirected"!==this.type){for(var r in n.out){t=n.out[r];do{Oe(this,t),t=t.next}while(t)}for(var i in n.in){t=n.in[i];do{Oe(this,t),t=t.next}while(t)}}if("directed"!==this.type)for(var a in n.undirected){t=n.undirected[a];do{Oe(this,t),t=t.next}while(t)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:n.attributes})},i.dropEdge=function(e){var t;if(arguments.length>1){var n=""+arguments[0],r=""+arguments[1];if(!(t=u(this,n,r,this.type)))throw new H('Graph.dropEdge: could not find the "'.concat(n,'" -> "').concat(r,'" edge in the graph.'))}else if(e=""+e,!(t=this._edges.get(e)))throw new H('Graph.dropEdge: could not find the "'.concat(e,'" edge in the graph.'));return Oe(this,t),this},i.dropDirectedEdge=function(e,t){if(arguments.length<2)throw new W("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new W("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var n=u(this,e=""+e,t=""+t,"directed");if(!n)throw new H('Graph.dropDirectedEdge: could not find a "'.concat(e,'" -> "').concat(t,'" edge in the graph.'));return Oe(this,n),this},i.dropUndirectedEdge=function(e,t){if(arguments.length<2)throw new W("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new W("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var n=u(this,e,t,"undirected");if(!n)throw new H('Graph.dropUndirectedEdge: could not find a "'.concat(e,'" -> "').concat(t,'" edge in the graph.'));return Oe(this,n),this},i.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},i.clearEdges=function(){for(var e,t=this._nodes.values();!0!==(e=t.next()).done;)e.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},i.getAttribute=function(e){return this._attributes[e]},i.getAttributes=function(){return this._attributes},i.hasAttribute=function(e){return this._attributes.hasOwnProperty(e)},i.setAttribute=function(e,t){return this._attributes[e]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this},i.updateAttribute=function(e,t){if("function"!=typeof t)throw new V("Graph.updateAttribute: updater should be a function.");var n=this._attributes[e];return this._attributes[e]=t(n),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this},i.removeAttribute=function(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this},i.replaceAttributes=function(e){if(!c(e))throw new V("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},i.mergeAttributes=function(e){if(!c(e))throw new V("Graph.mergeAttributes: provided attributes are not a plain object.");return l(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this},i.updateAttributes=function(e){if("function"!=typeof e)throw new V("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},i.updateEachNodeAttributes=function(e,t){if("function"!=typeof e)throw new V("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!p(t))throw new V("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var n,r,i=this._nodes.values();!0!==(n=i.next()).done;)(r=n.value).attributes=e(r.key,r.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})},i.updateEachEdgeAttributes=function(e,t){if("function"!=typeof e)throw new V("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!p(t))throw new V("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var n,r,i,a,o=this._edges.values();!0!==(n=o.next()).done;)i=(r=n.value).source,a=r.target,r.attributes=e(r.key,r.attributes,i.key,a.key,i.attributes,a.attributes,r.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})},i.forEachAdjacencyEntry=function(e){if("function"!=typeof e)throw new V("Graph.forEachAdjacencyEntry: expecting a callback.");Ee(!1,!1,!1,this,e)},i.forEachAdjacencyEntryWithOrphans=function(e){if("function"!=typeof e)throw new V("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Ee(!1,!1,!0,this,e)},i.forEachAssymetricAdjacencyEntry=function(e){if("function"!=typeof e)throw new V("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Ee(!1,!0,!1,this,e)},i.forEachAssymetricAdjacencyEntryWithOrphans=function(e){if("function"!=typeof e)throw new V("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Ee(!1,!0,!0,this,e)},i.nodes=function(){return"function"==typeof Array.from?Array.from(this._nodes.keys()):B(this._nodes.keys(),this._nodes.size)},i.forEachNode=function(e){if("function"!=typeof e)throw new V("Graph.forEachNode: expecting a callback.");for(var t,n,r=this._nodes.values();!0!==(t=r.next()).done;)e((n=t.value).key,n.attributes)},i.findNode=function(e){if("function"!=typeof e)throw new V("Graph.findNode: expecting a callback.");for(var t,n,r=this._nodes.values();!0!==(t=r.next()).done;)if(e((n=t.value).key,n.attributes))return n.key},i.mapNodes=function(e){if("function"!=typeof e)throw new V("Graph.mapNode: expecting a callback.");for(var t,n,r=this._nodes.values(),i=new Array(this.order),a=0;!0!==(t=r.next()).done;)n=t.value,i[a++]=e(n.key,n.attributes);return i},i.someNode=function(e){if("function"!=typeof e)throw new V("Graph.someNode: expecting a callback.");for(var t,n,r=this._nodes.values();!0!==(t=r.next()).done;)if(e((n=t.value).key,n.attributes))return!0;return!1},i.everyNode=function(e){if("function"!=typeof e)throw new V("Graph.everyNode: expecting a callback.");for(var t,n,r=this._nodes.values();!0!==(t=r.next()).done;)if(!e((n=t.value).key,n.attributes))return!1;return!0},i.filterNodes=function(e){if("function"!=typeof e)throw new V("Graph.filterNodes: expecting a callback.");for(var t,n,r=this._nodes.values(),i=[];!0!==(t=r.next()).done;)e((n=t.value).key,n.attributes)&&i.push(n.key);return i},i.reduceNodes=function(e,t){if("function"!=typeof e)throw new V("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new V("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");for(var n,r,i=t,a=this._nodes.values();!0!==(n=a.next()).done;)i=e(i,(r=n.value).key,r.attributes);return i},i.nodeEntries=function(){var e=this._nodes.values();return new L((function(){var t=e.next();if(t.done)return t;var n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}))},i.export=function(){var e=this,t=new Array(this._nodes.size),n=0;this._nodes.forEach((function(e,r){t[n++]=function(e,t){var n={key:e};return h(t.attributes)||(n.attributes=l({},t.attributes)),n}(r,e)}));var r=new Array(this._edges.size);return n=0,this._edges.forEach((function(t,i){r[n++]=function(e,t,n){var r={key:t,source:n.source.key,target:n.target.key};return h(n.attributes)||(r.attributes=l({},n.attributes)),"mixed"===e&&n.undirected&&(r.undirected=!0),r}(e.type,i,t)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:t,edges:r}},i.import=function(e){var t,n,i,a,o,s=this,l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e instanceof r)return e.forEachNode((function(e,t){l?s.mergeNode(e,t):s.addNode(e,t)})),e.forEachEdge((function(e,t,n,r,i,a,o){l?o?s.mergeUndirectedEdgeWithKey(e,n,r,t):s.mergeDirectedEdgeWithKey(e,n,r,t):o?s.addUndirectedEdgeWithKey(e,n,r,t):s.addDirectedEdgeWithKey(e,n,r,t)})),this;if(!c(e))throw new V("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!c(e.attributes))throw new V("Graph.import: invalid attributes. Expecting a plain object.");l?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}if(e.nodes){if(i=e.nodes,!Array.isArray(i))throw new V("Graph.import: invalid nodes. Expecting an array.");for(t=0,n=i.length;t ",s="",l=e.source.key,u=e.target.key;e.undirected&&l>u&&(a=l,l=u,u=a);var c="(".concat(l,")").concat(o,"(").concat(u,")");n.startsWith("geid_")?t.multi&&(void 0===i[c]?i[c]=0:i[c]++,s+="".concat(i[c],". ")):s+="[".concat(n,"]: "),r[s+=c]=e.attributes}));var a={};for(var o in this)this.hasOwnProperty(o)&&!Re.has(o)&&"function"!=typeof this[o]&&"symbol"!==e(o)&&(a[o]=this[o]);return a.attributes=this._attributes,a.nodes=n,a.edges=r,d(a,"constructor",this.constructor),a},r}(g.exports.EventEmitter);"undefined"!=typeof Symbol&&(Ie.prototype[Symbol.for("nodejs.util.inspect.custom")]=Ie.prototype.inspect),[{name:function(e){return"".concat(e,"Edge")},generateKey:!0},{name:function(e){return"".concat(e,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(e){return"".concat(e,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(e){return"".concat(e,"EdgeWithKey")}},{name:function(e){return"".concat(e,"DirectedEdgeWithKey")},type:"directed"},{name:function(e){return"".concat(e,"UndirectedEdgeWithKey")},type:"undirected"}].forEach((function(e){["add","merge","update"].forEach((function(t){var n=e.name(t),r="add"===t?De:Ue;e.generateKey?Ie.prototype[n]=function(i,a,o){return r(this,n,!0,"undirected"===(e.type||this.type),null,i,a,o,"update"===t)}:Ie.prototype[n]=function(i,a,o,s){return r(this,n,!1,"undirected"===(e.type||this.type),i,a,o,s,"update"===t)}}))})),function(e){Z.forEach((function(t){var n=t.name,r=t.attacher;r(e,n("Node"),0),r(e,n("Source"),1),r(e,n("Target"),2),r(e,n("Opposite"),3)}))}(Ie),function(e){K.forEach((function(t){var n=t.name,r=t.attacher;r(e,n("Edge"),"mixed"),r(e,n("DirectedEdge"),"directed"),r(e,n("UndirectedEdge"),"undirected")}))}(Ie),function(e){te.forEach((function(t){!function(e,t){var n=t.name,r=t.type,i=t.direction;e.prototype[n]=function(e,t){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return[];if(!arguments.length)return le(this,r);if(1===arguments.length){e=""+e;var a=this._nodes.get(e);if(void 0===a)throw new H("Graph.".concat(n,': could not find the "').concat(e,'" node in the graph.'));return de(this.multi,"mixed"===r?this.type:r,i,a)}if(2===arguments.length){e=""+e,t=""+t;var o=this._nodes.get(e);if(!o)throw new H("Graph.".concat(n,': could not find the "').concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H("Graph.".concat(n,': could not find the "').concat(t,'" target node in the graph.'));return me(r,this.multi,i,o,t)}throw new V("Graph.".concat(n,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(e,t),function(e,t){var n=t.name,r=t.type,i=t.direction,a="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if("mixed"===r||"mixed"===this.type||r===this.type){if(1===arguments.length)return ue(!1,this,r,n=e);if(2===arguments.length){e=""+e,n=t;var o=this._nodes.get(e);if(void 0===o)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" node in the graph.'));return he(!1,this.multi,"mixed"===r?this.type:r,i,o,n)}if(3===arguments.length){e=""+e,t=""+t;var s=this._nodes.get(e);if(!s)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H("Graph.".concat(a,': could not find the "').concat(t,'" target node in the graph.'));return pe(!1,r,this.multi,i,s,t,n)}throw new V("Graph.".concat(a,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var o="map"+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(){var e,t=Array.prototype.slice.call(arguments),n=t.pop();if(0===t.length){var i=0;"directed"!==r&&(i+=this.undirectedSize),"undirected"!==r&&(i+=this.directedSize),e=new Array(i);var o=0;t.push((function(t,r,i,a,s,l,u){e[o++]=n(t,r,i,a,s,l,u)}))}else e=[],t.push((function(t,r,i,a,o,s,l){e.push(n(t,r,i,a,o,s,l))}));return this[a].apply(this,t),e};var s="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=[];return e.push((function(e,r,i,a,o,s,l){t(e,r,i,a,o,s,l)&&n.push(e)})),this[a].apply(this,e),n};var l="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(){var e,t,n=Array.prototype.slice.call(arguments);if(n.length<2||n.length>4)throw new V("Graph.".concat(l,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(n.length,")."));if("function"==typeof n[n.length-1]&&"function"!=typeof n[n.length-2])throw new V("Graph.".concat(l,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));2===n.length?(e=n[0],t=n[1],n=[]):3===n.length?(e=n[1],t=n[2],n=[n[0]]):4===n.length&&(e=n[2],t=n[3],n=[n[0],n[1]]);var r=t;return n.push((function(t,n,i,a,o,s,l){r=e(r,t,n,i,a,o,s,l)})),this[a].apply(this,n),r}}(e,t),function(e,t){var n=t.name,r=t.type,i=t.direction,a="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return!1;if(1===arguments.length)return ue(!0,this,r,n=e);if(2===arguments.length){e=""+e,n=t;var o=this._nodes.get(e);if(void 0===o)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" node in the graph.'));return he(!0,this.multi,"mixed"===r?this.type:r,i,o,n)}if(3===arguments.length){e=""+e,t=""+t;var s=this._nodes.get(e);if(!s)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H("Graph.".concat(a,': could not find the "').concat(t,'" target node in the graph.'));return pe(!0,r,this.multi,i,s,t,n)}throw new V("Graph.".concat(a,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var o="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(){var e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((function(e,n,r,i,a,o,s){return t(e,n,r,i,a,o,s)})),!!this[a].apply(this,e)};var s="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(){var e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((function(e,n,r,i,a,o,s){return!t(e,n,r,i,a,o,s)})),!this[a].apply(this,e)}}(e,t),function(e,t){var n=t.name,r=t.type,i=t.direction,a=n.slice(0,-1)+"Entries";e.prototype[a]=function(e,t){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return L.empty();if(!arguments.length)return ce(this,r);if(1===arguments.length){e=""+e;var n=this._nodes.get(e);if(!n)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" node in the graph.'));return fe(r,i,n)}if(2===arguments.length){e=""+e,t=""+t;var o=this._nodes.get(e);if(!o)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" source node in the graph.'));if(!this._nodes.has(t))throw new H("Graph.".concat(a,': could not find the "').concat(t,'" target node in the graph.'));return ge(r,i,o,t)}throw new V("Graph.".concat(a,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(e,t)}))}(Ie),function(e){ve.forEach((function(t){we(e,t),function(e,t){var n=t.name,r=t.type,i=t.direction,a="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t){if("mixed"===r||"mixed"===this.type||r===this.type){e=""+e;var n=this._nodes.get(e);if(void 0===n)throw new H("Graph.".concat(a,': could not find the "').concat(e,'" node in the graph.'));be(!1,"mixed"===r?this.type:r,i,n,t)}};var o="map"+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(e,t){var n=[];return this[a](e,(function(e,r){n.push(t(e,r))})),n};var s="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(e,t){var n=[];return this[a](e,(function(e,r){t(e,r)&&n.push(e)})),n};var l="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(e,t,n){if(arguments.length<3)throw new V("Graph.".concat(l,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));var r=n;return this[a](e,(function(e,n){r=t(r,e,n)})),r}}(e,t),function(e,t){var n=t.name,r=t.type,i=t.direction,a=n[0].toUpperCase()+n.slice(1,-1),o="find"+a;e.prototype[o]=function(e,t){if("mixed"===r||"mixed"===this.type||r===this.type){e=""+e;var n=this._nodes.get(e);if(void 0===n)throw new H("Graph.".concat(o,': could not find the "').concat(e,'" node in the graph.'));return be(!0,"mixed"===r?this.type:r,i,n,t)}};var s="some"+a;e.prototype[s]=function(e,t){return!!this[o](e,t)};var l="every"+a;e.prototype[l]=function(e,t){return!this[o](e,(function(e,n){return!t(e,n)}))}}(e,t),Se(e,t)}))}(Ie);var Ne=function(e){function n(t){var n=l({type:"directed"},t);if("multi"in n&&!1!==n.multi)throw new V("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==n.type)throw new V('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');return e.call(this,n)||this}return t(n,e),n}(Ie),Fe=function(e){function n(t){var n=l({type:"undirected"},t);if("multi"in n&&!1!==n.multi)throw new V("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==n.type)throw new V('UndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');return e.call(this,n)||this}return t(n,e),n}(Ie),ze=function(e){function n(t){var n=l({multi:!0},t);if("multi"in n&&!0!==n.multi)throw new V("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return e.call(this,n)||this}return t(n,e),n}(Ie),Be=function(e){function n(t){var n=l({type:"directed",multi:!0},t);if("multi"in n&&!0!==n.multi)throw new V("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==n.type)throw new V('MultiDirectedGraph.from: inconsistent "'+n.type+'" type in given options!');return e.call(this,n)||this}return t(n,e),n}(Ie),Ge=function(e){function n(t){var n=l({type:"undirected",multi:!0},t);if("multi"in n&&!0!==n.multi)throw new V("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==n.type)throw new V('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');return e.call(this,n)||this}return t(n,e),n}(Ie);function Ve(e){e.from=function(t,n){var r=l({},t.options,n),i=new e(r);return i.import(t),i}}return Ve(Ie),Ve(Ne),Ve(Fe),Ve(ze),Ve(Be),Ve(Ge),Ie.Graph=Ie,Ie.DirectedGraph=Ne,Ie.UndirectedGraph=Fe,Ie.MultiGraph=ze,Ie.MultiDirectedGraph=Be,Ie.MultiUndirectedGraph=Ge,Ie.InvalidArgumentsGraphError=V,Ie.NotFoundGraphError=H,Ie.UsageGraphError=W,Ie}()},2104:(e,t,n)=>{var r=n(8771),i=n(5475),a=n(1861),o=i.DEFAULT_COMPARATOR,s=i.reverseComparator;function l(e,t,n,r){for(var i,a,o=t[r];r>n&&e(o,a=t[i=r-1>>1])<0;)t[r]=a,r=i;t[r]=o}function u(e,t,n){for(var r,i=t.length,a=n,o=t[n],s=2*n+1;s=0&&(s=r),t[n]=t[s],s=2*(n=s)+1;t[n]=o,l(e,t,a,n)}function c(e,t,n){t.push(n),l(e,t,0,t.length-1)}function h(e,t){var n=t.pop();if(0!==t.length){var r=t[0];return t[0]=n,u(e,t,0),r}return n}function d(e,t,n){if(0===t.length)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var r=t[0];return t[0]=n,u(e,t,0),r}function f(e,t,n){var r;return 0!==t.length&&e(t[0],n)<0&&(r=t[0],t[0]=n,n=r,u(e,t,0)),n}function p(e,t){for(var n=t.length>>1;--n>=0;)u(e,t,n)}function m(e,t){for(var n=t.length,r=0,i=new Array(n);r =n.length)return n.slice().sort(e);for(c=n.slice(0,t),p(h,c),i=t,l=n.length;i 0&&d(h,c,n[i]);return c.sort(e)}var m=a.guessLength(n);return null!==m&&m 0&&d(h,c,e)),i++})),c.length>i&&(c.length=i),c.sort(e)},g.nlargest=function(e,t,n){2===arguments.length&&(n=t,t=e,e=o);var i,l,u,c,h=s(e),f=-1/0;if(1===t){if(a.isArrayLike(n)){for(i=0,l=n.length;i 0)&&(f=u);return(c=new n.constructor(1))[0]=f,c}return r(n,(function(t){(f===-1/0||e(t,f)>0)&&(f=t)})),[f]}if(a.isArrayLike(n)){if(t>=n.length)return n.slice().sort(h);for(c=n.slice(0,t),p(e,c),i=t,l=n.length;i 0&&d(e,c,n[i]);return c.sort(h)}var m=a.guessLength(n);return null!==m&&m 0&&d(e,c,n)),i++})),c.length>i&&(c.length=i),c.sort(h)},g.MinHeap=g,g.MaxHeap=v,e.exports=g},2867:(e,t,n)=>{var r=n(6823),i=n(8771);function a(){this.clear()}a.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},a.prototype.enqueue=function(e){return this.items.push(e),++this.size},a.prototype.dequeue=function(){if(this.size){var e=this.items[this.offset];return 2*++this.offset>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,e}},a.prototype.peek=function(){if(this.size)return this.items[this.offset]},a.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.offset,r=0,i=this.items.length;n=e.length)return{done:!0};var n=e[t];return t++,{value:n,done:!1}}))},a.prototype.entries=function(){var e=this.items,t=this.offset,n=0;return new r((function(){if(t>=e.length)return{done:!0};var r=e[t];return t++,{value:[n++,r],done:!1}}))},"undefined"!==typeof Symbol&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.toString=function(){return this.toArray().join(",")},a.prototype.toJSON=function(){return this.toArray()},a.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:a,enumerable:!1}),e},"undefined"!==typeof Symbol&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.from=function(e){var t=new a;return i(e,(function(e){t.enqueue(e)})),t},a.of=function(){return a.from(arguments)},e.exports=a},5475:(e,t)=>{t.DEFAULT_COMPARATOR=function(e,t){return e t?1:0},t.DEFAULT_REVERSE_COMPARATOR=function(e,t){return e t?-1:0},t.reverseComparator=function(e){return function(t,n){return e(n,t)}},t.createTupleComparator=function(e){return 2===e?function(e,t){return e[0] t[0]?1:e[1] t[1]?1:0}:function(t,n){for(var r=0;r n[r])return 1;r++}return 0}}},1861:(e,t,n)=>{var r=n(8771),i=n(393);function a(e){return"number"===typeof e.length?e.length:"number"===typeof e.size?e.size:void 0}t.isArrayLike=function(e){return Array.isArray(e)||i.isTypedArray(e)},t.guessLength=a,t.toArray=function(e){var t=a(e),n="number"===typeof t?new Array(t):[],i=0;return r(e,(function(e){n[i++]=e})),n},t.toArrayWithIndices=function(e){var t=a(e),n="number"===typeof t?i.getPointerArray(t):Array,o="number"===typeof t?new Array(t):[],s="number"===typeof t?new n(t):[],l=0;return r(e,(function(e){o[l]=e,s[l]=l++})),[o,s]}},393:(e,t)=>{var n=Math.pow(2,8)-1,r=Math.pow(2,16)-1,i=Math.pow(2,32)-1,a=Math.pow(2,7)-1,o=Math.pow(2,15)-1,s=Math.pow(2,31)-1;t.getPointerArray=function(e){var t=e-1;if(t<=n)return Uint8Array;if(t<=r)return Uint16Array;if(t<=i)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},t.getSignedPointerArray=function(e){var t=e-1;return t<=a?Int8Array:t<=o?Int16Array:t<=s?Int32Array:Float64Array},t.getNumberType=function(e){return e===(0|e)?-1===Math.sign(e)?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var l={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};t.getMinimalRepresentation=function(e,n){var r,i,a,o,s,u=null,c=0;for(o=0,s=e.length;o c&&(c=r,u=i);return u},t.isTypedArray=function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView(e)},t.concat=function(){var e,t,n,r=0;for(e=0,n=arguments.length;e{var r=n(6010),i=r.ARRAY_BUFFER_SUPPORT,a=r.SYMBOL_SUPPORT;e.exports=function(e,t){var n,r,o,s,l;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if("function"!==typeof t)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||i&&ArrayBuffer.isView(e)||"string"===typeof e||"[object Arguments]"===e.toString())for(o=0,s=e.length;o {function t(e){if("function"!==typeof e)throw new Error("obliterator/iterator: expecting a function!");this.next=e}"undefined"!==typeof Symbol&&(t.prototype[Symbol.iterator]=function(){return this}),t.of=function(){var e=arguments,n=e.length,r=0;return new t((function(){return r>=n?{done:!0}:{done:!1,value:e[r++]}}))},t.empty=function(){return new t((function(){return{done:!0}}))},t.fromSequence=function(e){var n=0,r=e.length;return new t((function(){return n>=r?{done:!0}:{done:!1,value:e[n++]}}))},t.is=function(e){return e instanceof t||"object"===typeof e&&null!==e&&"function"===typeof e.next},e.exports=t},6010:(e,t)=>{t.ARRAY_BUFFER_SUPPORT="undefined"!==typeof ArrayBuffer,t.SYMBOL_SUPPORT="undefined"!==typeof Symbol},2730:(e,t,n)=>{"use strict";var r=n(5043),i=n(8853);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!h.call(p,e)||!h.call(f,e)&&(d.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),L=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var U=Symbol.iterator;function O(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}var I,N=Object.assign;function F(e){if(void 0===I)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var z=!1;function B(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes(" ")&&(l=l.replace(" ",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function G(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function V(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case w:return"Portal";case M:return"Profiler";case E:return"StrictMode";case P:return"Suspense";case R:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case k:return null!==(t=e.displayName||null)?t:V(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return V(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return V(t);case 8:return t===E?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function j(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=j(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=j(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var n=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Z(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function K(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function Q(e,t){K(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i "+t.valueOf().toString()+"",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,Se=null,Ee=null;function Me(e){if(e=_i(e)){if("function"!==typeof we)throw Error(a(280));var t=e.stateNode;t&&(t=xi(t),we(e.stateNode,e.type,t))}}function Ae(e){Se?Ee?Ee.push(e):Ee=[e]:Se=e}function Te(){if(Se){var e=Se,t=Ee;if(Ee=Se=null,Me(e),t)for(e=0;e >>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function ht(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=ht(s):0!==(a&=o)&&(r=ht(a))}else 0!==(o=n&~i)?r=ht(o):0!==a&&(r=ht(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!==(4194240&a)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0 n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1< =On),Fn=String.fromCharCode(32),zn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Vn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function jn(e,t,n,r){Ae(r),0<(t=Xr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xn=null,qn=null;function Yn(e){Fr(e,0)}function $n(e){if(q(bi(e)))return e}function Zn(e,t){if("change"===e)return t}var Kn=!1;if(c){var Qn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Qn=Jn}else Qn=!1;Kn=Qn&&(!document.documentMode||9 =t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=cr(n,a);var o=cr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n =document.documentMode,gr=null,vr=null,yr=null,_r=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_r||null==gr||gr!==Y(r)||("selectionStart"in(r=gr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Xr(vr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},Sr={},Er={};function Mr(e){if(Sr[e])return Sr[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Er)return Sr[e]=n[t];return e}c&&(Er=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var Ar=Mr("animationend"),Tr=Mr("animationiteration"),Cr=Mr("animationstart"),Pr=Mr("transitionend"),Rr=new Map,kr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Lr(e,t){Rr.set(e,t),l(t,[e])}for(var Dr=0;Dr Si||(e.current=wi[Si],wi[Si]=null,Si--)}function Ai(e,t){Si++,wi[Si]=e.current,e.current=t}var Ti={},Ci=Ei(Ti),Pi=Ei(!1),Ri=Ti;function ki(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Li(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Di(){Mi(Pi),Mi(Ci)}function Ui(e,t,n){if(Ci.current!==Ti)throw Error(a(168));Ai(Ci,t),Ai(Pi,n)}function Oi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,H(e)||"Unknown",i));return N({},n,r)}function Ii(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Ri=Ci.current,Ai(Ci,e),Ai(Pi,Pi.current),!0}function Ni(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Oi(e,t,Ri),r.__reactInternalMemoizedMergedChildContext=e,Mi(Pi),Mi(Ci),Ai(Ci,e)):Mi(Pi),Ai(Pi,n)}var Fi=null,zi=!1,Bi=!1;function Gi(e){null===Fi?Fi=[e]:Fi.push(e)}function Vi(){if(!Bi&&null!==Fi){Bi=!0;var e=0,t=_t;try{var n=Fi;for(_t=1;e >=o,i-=o,Zi=1<<32-ot(t)+i|n<m?(g=h,h=null):g=h.sibling;var v=f(i,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(i,h),a=o(v,a,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===s.length)return n(i,h),ia&&Qi(i,m),u;if(null===h){for(;m g?(v=m,m=null):v=m.sibling;var _=f(i,m,y.value,u);if(null===_){null===m&&(m=v);break}e&&m&&null===_.alternate&&t(i,m),s=o(_,s,g),null===h?c=_:h.sibling=_,h=_,m=v}if(y.done)return n(i,m),ia&&Qi(i,g),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=d(i,y.value,u))&&(s=o(y,s,g),null===h?c=y:h.sibling=y,h=y);return ia&&Qi(i,g),c}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===h?c=y:h.sibling=y,h=y);return e&&m.forEach((function(e){return t(i,e)})),ia&&Qi(i,g),c}return function e(r,a,o,l){if("object"===typeof o&&null!==o&&o.type===S&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case x:e:{for(var u=o.key,c=a;null!==c;){if(c.key===u){if((u=o.type)===S){if(7===c.tag){n(r,c.sibling),(a=i(c,o.props.children)).return=r,r=a;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===L&&ya(u)===c.type){n(r,c.sibling),(a=i(c,o.props)).ref=ga(r,c,o),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}o.type===S?((a=Ou(o.props.children,r.mode,l,o.key)).return=r,r=a):((l=Uu(o.type,o.key,o.props,null,r.mode,l)).ref=ga(r,a,o),l.return=r,r=l)}return s(r);case w:e:{for(c=o.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Fu(o,r.mode,l)).return=r,r=a}return s(r);case L:return e(r,a,(c=o._init)(o._payload),l)}if(te(o))return m(r,a,o,l);if(O(o))return g(r,a,o,l);va(r,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Nu(o,r.mode,l)).return=r,r=a),s(r)):n(r,a)}}var ba=_a(!0),xa=_a(!1),wa=Ei(null),Sa=null,Ea=null,Ma=null;function Aa(){Ma=Ea=Sa=null}function Ta(e){var t=wa.current;Mi(wa),e._currentValue=t}function Ca(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Pa(e,t){Sa=e,Ma=Ea=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(_s=!0),e.firstContext=null)}function Ra(e){var t=e._currentValue;if(Ma!==e)if(e={context:e,memoizedValue:t,next:null},null===Ea){if(null===Sa)throw Error(a(308));Ea=e,Sa.dependencies={lanes:0,firstContext:e}}else Ea=Ea.next=e;return t}var ka=null;function La(e){null===ka?ka=[e]:ka.push(e)}function Da(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,La(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ua(e,r)}function Ua(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Oa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Na(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Fa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Cl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ua(e,n)}return null===(i=r.interleaved)?(t.next=t,La(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ua(e,n)}function Ba(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Va(e,t,n,r){var i=e.updateQueue;Oa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===o?a=u:o.next=u,o=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==a){var h=i.baseState;for(o=0,c=u=l=null,s=a;;){var d=s.lane,f=s.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(d=t,f=n,m.tag){case 1:if("function"===typeof(p=m.payload)){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(d="function"===typeof(p=m.payload)?p.call(f,h,d):p)||void 0===d)break e;h=N({},h,d);break e;case 2:Oa=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[s]:d.push(s))}else f={eventTime:f,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=f,l=h):c=c.next=f,o|=d;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(d=s).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===c&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Il|=o,e.lanes=o,e.memoizedState=h}}function Ha(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t n?n:4,e(!0);var r=io.transition;io.transition={};try{e(!1),t()}finally{_t=n,io.transition=r}}function Xo(){return _o().memoizedState}function qo(e,t,n){var r=tu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$o(e))Zo(t,n);else if(null!==(n=Da(e,t,n,r))){nu(n,e,r,eu()),Ko(n,t,r)}}function Yo(e,t,n){var r=tu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($o(e))Zo(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var l=t.interleaved;return null===l?(i.next=i,La(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(u){}null!==(n=Da(e,t,i,r))&&(nu(n,e,r,i=eu()),Ko(n,t,r))}}function $o(e){var t=e.alternate;return e===oo||null!==t&&t===oo}function Zo(e,t){co=uo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ko(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qo={readContext:Ra,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useInsertionEffect:po,useLayoutEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useMutableSource:po,useSyncExternalStore:po,useId:po,unstable_isNewReconciler:!1},Jo={readContext:Ra,useCallback:function(e,t){return yo().memoizedState=[e,void 0===t?null:t],e},useContext:Ra,useEffect:Oo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Do(4194308,4,zo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Do(4194308,4,e,t)},useInsertionEffect:function(e,t){return Do(4,2,e,t)},useMemo:function(e,t){var n=yo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qo.bind(null,oo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},yo().memoizedState=e},useState:Ro,useDebugValue:Go,useDeferredValue:function(e){return yo().memoizedState=e},useTransition:function(){var e=Ro(!1),t=e[0];return e=jo.bind(null,e[1]),yo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=oo,i=yo();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Pl)throw Error(a(349));0!==(30&ao)||Mo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Oo(To.bind(null,r,o,e),[e]),r.flags|=2048,ko(9,Ao.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=yo(),t=Pl.identifierPrefix;if(ia){var n=Ki;t=":"+t+"R"+(n=(Zi&~(1<<32-ot(Zi)-1)).toString(32)+n),0<(n=ho++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ra,useCallback:Vo,useContext:Ra,useEffect:Io,useImperativeHandle:Bo,useInsertionEffect:No,useLayoutEffect:Fo,useMemo:Ho,useReducer:xo,useRef:Lo,useState:function(){return xo(bo)},useDebugValue:Go,useDeferredValue:function(e){return Wo(_o(),so.memoizedState,e)},useTransition:function(){return[xo(bo)[0],_o().memoizedState]},useMutableSource:So,useSyncExternalStore:Eo,useId:Xo,unstable_isNewReconciler:!1},ts={readContext:Ra,useCallback:Vo,useContext:Ra,useEffect:Io,useImperativeHandle:Bo,useInsertionEffect:No,useLayoutEffect:Fo,useMemo:Ho,useReducer:wo,useRef:Lo,useState:function(){return wo(bo)},useDebugValue:Go,useDeferredValue:function(e){var t=_o();return null===so?t.memoizedState=e:Wo(t,so.memoizedState,e)},useTransition:function(){return[wo(bo)[0],_o().memoizedState]},useMutableSource:So,useSyncExternalStore:Eo,useId:Xo,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=N({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:N({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),a=Fa(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=za(e,a,i))&&(nu(t,e,i,r),Ba(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),a=Fa(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=za(e,a,i))&&(nu(t,e,i,r),Ba(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),i=Fa(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=za(e,i,r))&&(nu(t,e,r,n),Ba(t,e,r))}};function as(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,a))}function os(e,t,n){var r=!1,i=Ti,a=t.contextType;return"object"===typeof a&&null!==a?a=Ra(a):(i=Li(t)?Ri:Ci.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?ki(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ss(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ia(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=Ra(a):(a=Li(t)?Ri:Ci.current,i.context=ki(e,a)),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(rs(e,t,a,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Va(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i,digest:null}}function cs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ds="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=Fa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,jl=r),hs(0,t)},n}function ps(e,t,n){(n=Fa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){hs(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){hs(0,t),"function"!==typeof r&&(null===Xl?Xl=new Set([this]):Xl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ds;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Mu.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Fa(-1,1)).tag=2,za(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ys=b.ReactCurrentOwner,_s=!1;function bs(e,t,n,r){t.child=null===e?xa(t,null,n,r):ba(t,e.child,n,r)}function xs(e,t,n,r,i){n=n.render;var a=t.ref;return Pa(t,i),r=go(e,t,n,r,a,i),n=vo(),null===e||_s?(ia&&n&&ea(t),t.flags|=1,bs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ws(e,t,i))}function ws(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Lu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Uu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ss(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(o,r)&&e.ref===t.ref)return Ws(e,t,i)}return t.flags|=1,(e=Du(a,r)).ref=t.ref,e.return=t,t.child=e}function Ss(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref){if(_s=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,Ws(e,t,i);0!==(131072&e.flags)&&(_s=!0)}}return As(e,t,n,r,i)}function Es(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ai(Dl,Ll),Ll|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ai(Dl,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ai(Dl,Ll),Ll|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ai(Dl,Ll),Ll|=r;return bs(e,t,i,n),t.child}function Ms(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function As(e,t,n,r,i){var a=Li(n)?Ri:Ci.current;return a=ki(t,a),Pa(t,i),n=go(e,t,n,r,a,i),r=vo(),null===e||_s?(ia&&r&&ea(t),t.flags|=1,bs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ws(e,t,i))}function Ts(e,t,n,r,i){if(Li(n)){var a=!0;Ii(t)}else a=!1;if(Pa(t,i),null===t.stateNode)Hs(e,t),os(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=n.contextType;"object"===typeof u&&null!==u?u=Ra(u):u=ki(t,u=Li(n)?Ri:Ci.current);var c=n.getDerivedStateFromProps,h="function"===typeof c||"function"===typeof o.getSnapshotBeforeUpdate;h||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==r||l!==u)&&ss(t,o,r,u),Oa=!1;var d=t.memoizedState;o.state=d,Va(t,r,o,i),l=t.memoizedState,s!==r||d!==l||Pi.current||Oa?("function"===typeof c&&(rs(t,n,c,r),l=t.memoizedState),(s=Oa||as(t,n,s,r,d,l,u))?(h||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=s):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Na(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ns(t.type,s),o.props=u,h=t.pendingProps,d=o.context,"object"===typeof(l=n.contextType)&&null!==l?l=Ra(l):l=ki(t,l=Li(n)?Ri:Ci.current);var f=n.getDerivedStateFromProps;(c="function"===typeof f||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==h||d!==l)&&ss(t,o,r,l),Oa=!1,d=t.memoizedState,o.state=d,Va(t,r,o,i);var p=t.memoizedState;s!==h||d!==p||Pi.current||Oa?("function"===typeof f&&(rs(t,n,f,r),p=t.memoizedState),(u=Oa||as(t,n,u,r,d,p,l)||!1)?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=u):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,a,i)}function Cs(e,t,n,r,i,a){Ms(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&Ni(t,n,!1),Ws(e,t,a);r=t.stateNode,ys.current=t;var s=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=ba(t,e.child,null,a),t.child=ba(t,null,s,a)):bs(e,t,s,a),t.memoizedState=r.state,i&&Ni(t,n,!0),t.child}function Ps(e){var t=e.stateNode;t.pendingContext?Ui(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ui(0,t.context,!1),$a(e,t.containerInfo)}function Rs(e,t,n,r,i){return fa(),pa(i),t.flags|=256,bs(e,t,n,r),t.child}var ks,Ls,Ds,Us,Os={dehydrated:null,treeContext:null,retryLane:0};function Is(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ns(e,t,n){var r,i=t.pendingProps,o=Ja.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ai(Ja,1&o),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Iu(l,i,0,null),e=Ou(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Is(n),t.memoizedState=Os,e):Fs(t,l));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,zs(e,t,s,r=cs(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Iu({mode:"visible",children:r.children},i,0,null),(o=Ou(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!==(1&t.mode)&&ba(t,e.child,null,s),t.child.memoizedState=Is(s),t.memoizedState=Os,o);if(0===(1&t.mode))return zs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,zs(e,t,s,r=cs(o=Error(a(419)),r,void 0))}if(l=0!==(s&e.childLanes),_s||l){if(null!==(r=Pl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ua(e,i),nu(r,e,i,-1))}return mu(),zs(e,t,s,r=cs(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tu.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ui(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(qi[Yi++]=Zi,qi[Yi++]=Ki,qi[Yi++]=$i,Zi=e.id,Ki=e.overflow,$i=t),t=Fs(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,o,n);if(s){s=i.fallback,l=t.mode,r=(o=e.child).sibling;var u={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null):(i=Du(o,u)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Du(r,s):(s=Ou(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Is(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Os,i}return e=(s=e.child).sibling,i=Du(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Fs(e,t){return(t=Iu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function zs(e,t,n,r){return null!==r&&pa(r),ba(t,e.child,null,n),(e=Fs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Bs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ca(e.return,t,n)}function Gs(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Vs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(bs(e,t,r.children,n),0!==(2&(r=Ja.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Bs(e,n,t);else if(19===e.tag)Bs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ai(Ja,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===eo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Gs(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===eo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Gs(t,!0,n,null,a);break;case"together":Gs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Il|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Du(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Du(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function js(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qs(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xs(t),null;case 1:case 17:return Li(t.type)&&Di(),Xs(t),null;case 3:return r=t.stateNode,Za(),Mi(Pi),Mi(Ci),no(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ha(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==aa&&(ou(aa),aa=null))),Ls(e,t),Xs(t),null;case 5:Qa(t);var i=Ya(qa.current);if(n=t.type,null!==e&&null!=t.stateNode)Ds(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Xs(t),null}if(e=Ya(ja.current),ha(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[di]=t,r[fi]=o,e=0!==(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(i=0;i <\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[di]=t,e[fi]=r,ks(e,t,!1,!1),t.stateNode=e;e:{switch(l=_e(n,r),n){case"dialog":zr("cancel",e),zr("close",e),i=r;break;case"iframe":case"object":case"embed":zr("load",e),i=r;break;case"video":case"audio":for(i=0;i Vl&&(t.flags|=128,r=!0,js(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=eo(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),js(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!ia)return Xs(t),null}else 2*Ke()-o.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,r=!0,js(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ke(),t.sibling=null,n=Ja.current,Ai(Ja,r?1&n|2:1&n),t):(Xs(t),null);case 22:case 23:return hu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ll)&&(Xs(t),6&t.subtreeFlags&&(t.flags|=8192)):Xs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ys(e,t){switch(ta(t),t.tag){case 1:return Li(t.type)&&Di(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Za(),Mi(Pi),Mi(Ci),no(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Qa(t),null;case 13:if(Mi(Ja),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));fa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Mi(Ja),null;case 4:return Za(),null;case 10:return Ta(t.type._context),null;case 22:case 23:return hu(),null;default:return null}}ks=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ls=function(){},Ds=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ya(ja.current);var a,o=null;switch(n){case"input":i=$(e,i),r=$(e,r),o=[];break;case"select":i=N({},i,{value:void 0}),r=N({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(c in ye(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(o=o||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(o=o||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&zr("scroll",e),o||l===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}},Us=function(e,t,n,r){n!==r&&(t.flags|=4)};var $s=!1,Zs=!1,Ks="function"===typeof WeakSet?WeakSet:Set,Qs=null;function Js(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Eu(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Eu(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&el(t,n,a)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[di],delete t[fi],delete t[mi],delete t[gi],delete t[vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,hl=!1;function dl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Zs||Js(n,t);case 6:var r=cl,i=hl;cl=null,dl(e,t,n),hl=i,null!==(cl=r)&&(hl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(hl?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Vt(e)):li(cl,n.stateNode));break;case 4:r=cl,i=hl,cl=n.stateNode.containerInfo,hl=!0,dl(e,t,n),cl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!Zs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!==(2&a)||0!==(4&a))&&el(n,t,o),i=i.next}while(i!==r)}dl(e,t,n);break;case 1:if(!Zs&&(Js(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Eu(n,t,s)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?(Zs=(r=Zs)||null!==n.memoizedState,dl(e,t,n),Zs=r):dl(e,t,n);break;default:dl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ks),t.forEach((function(t){var r=Cu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Ke()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*El(r/1960))-r)){e.timeoutHandle=ri(xu.bind(null,e,Bl,Hl),r);break}xu(e,Bl,Hl);break;default:throw Error(a(329))}}}return ru(e,Ke()),e.callbackNode===n?iu.bind(null,e):null}function au(e,t){var n=zl;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Bl,Bl=n,null!==t&&ou(t)),e}function ou(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function su(e,t){for(t&=~Fl,t&=~Nl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,$l=0,0!==(6&Cl))throw Error(a(331));var i=Cl;for(Cl|=4,Qs=e.current;null!==Qs;){var o=Qs,s=o.child;if(0!==(16&Qs.flags)){var l=o.deletions;if(null!==l){for(var u=0;u Ke()-Gl?du(e,0):Fl|=n),ru(e,t)}function Au(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=eu();null!==(e=Ua(e,t))&&(vt(e,t,n),ru(e,n))}function Tu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Au(e,n)}function Cu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Au(e,n)}function Pu(e,t){return qe(e,t)}function Ru(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ku(e,t,n,r){return new Ru(e,t,n,r)}function Lu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Du(e,t){var n=e.alternate;return null===n?((n=ku(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Uu(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)Lu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return Ou(n.children,i,o,t);case E:s=8,i|=8;break;case M:return(e=ku(12,n,t,2|i)).elementType=M,e.lanes=o,e;case P:return(e=ku(13,n,t,i)).elementType=P,e.lanes=o,e;case R:return(e=ku(19,n,t,i)).elementType=R,e.lanes=o,e;case D:return Iu(n,i,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case A:s=10;break e;case T:s=9;break e;case C:s=11;break e;case k:s=14;break e;case L:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=ku(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ou(e,t,n,r){return(e=ku(7,e,r,t)).lanes=n,e}function Iu(e,t,n,r){return(e=ku(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Nu(e,t,n){return(e=ku(6,e,null,t)).lanes=n,e}function Fu(e,t,n){return(t=ku(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bu(e,t,n,r,i,a,o,s,l){return e=new zu(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=ku(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ia(a),e}function Gu(e){if(!e)return Ti;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Li(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Li(n))return Oi(e,n,t)}return t}function Vu(e,t,n,r,i,a,o,s,l){return(e=Bu(n,r,!0,e,0,a,0,s,l)).context=Gu(null),n=e.current,(a=Fa(r=eu(),i=tu(n))).callback=void 0!==t&&null!==t?t:null,za(n,a,i),e.current.lanes=i,vt(e,i,r),ru(e,r),e}function Hu(e,t,n,r){var i=t.current,a=eu(),o=tu(i);return n=Gu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Fa(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=za(i,t,o))&&(nu(e,i,o,a),Ba(e,i,o)),o}function Wu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ju(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n {"use strict";var r=n(7950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},7950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2730)},7302:(e,t)=>{"use strict";t.ConcurrentRoot=1,t.ContinuousEventPriority=4,t.DefaultEventPriority=16,t.DiscreteEventPriority=1},6958:(e,t,n)=>{e.exports=function(e){var t={},r=n(5043),i=n(8513),a=Object.assign;function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n --s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes(" ")&&(l=l.replace(" ",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{tt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?et(e):""}var rt=Object.prototype.hasOwnProperty,it=[],at=-1;function ot(e){return{current:e}}function st(e){0>at||(e.current=it[at],it[at]=null,at--)}function lt(e,t){at++,it[at]=e.current,e.current=t}var ut={},ct=ot(ut),ht=ot(!1),dt=ut;function ft(e,t){var n=e.type.contextTypes;if(!n)return ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function pt(e){return null!==(e=e.childContextTypes)&&void 0!==e}function mt(){st(ht),st(ct)}function gt(e,t,n){if(ct.current!==ut)throw Error(o(168));lt(ct,t),lt(ht,n)}function vt(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,E(e)||"Unknown",i));return a({},n,r)}function yt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ut,dt=ct.current,lt(ct,e),lt(ht,ht.current),!0}function _t(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=vt(e,t,dt),r.__reactInternalMemoizedMergedChildContext=e,st(ht),st(ct),lt(ct,e)):st(ht),lt(ht,n)}var bt=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(xt(e)/wt|0)|0},xt=Math.log,wt=Math.LN2;var St=64,Et=4194304;function Mt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function At(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=Mt(s):0!==(a&=o)&&(r=Mt(a))}else 0!==(o=n&~i)?r=Mt(o):0!==a&&(r=Mt(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!==(4194240&a)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0 n;n++)t.push(e);return t}function Rt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-bt(t)]=n}function kt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-bt(n),i=1< >=o,i-=o,In=1<<32-bt(t)+i|n<d?(f=h,h=null):f=h.sibling;var p=g(i,h,s[d],l);if(null===p){null===h&&(h=f);break}e&&h&&null===p.alternate&&t(i,h),o=a(p,o,d),null===c?u=p:c.sibling=p,c=p,h=f}if(d===s.length)return n(i,h),Wn&&Fn(i,d),u;if(null===h){for(;d f?(p=d,d=null):p=d.sibling;var _=g(i,d,y.value,u);if(null===_){null===d&&(d=p);break}e&&d&&null===_.alternate&&t(i,d),s=a(_,s,f),null===h?c=_:h.sibling=_,h=_,d=p}if(y.done)return n(i,d),Wn&&Fn(i,f),c;if(null===d){for(;!y.done;f++,y=l.next())null!==(y=m(i,y.value,u))&&(s=a(y,s,f),null===h?c=y:h.sibling=y,h=y);return Wn&&Fn(i,f),c}for(d=r(i,d);!y.done;f++,y=l.next())null!==(y=v(d,i,f,y.value,u))&&(e&&null!==y.alternate&&d.delete(null===y.key?f:y.key),s=a(y,s,f),null===h?c=y:h.sibling=y,h=y);return e&&d.forEach((function(e){return t(i,e)})),Wn&&Fn(i,f),c}return function e(r,a,o,h){if("object"===typeof o&&null!==o&&o.type===c&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case l:e:{for(var d=o.key,f=a;null!==f;){if(f.key===d){if((d=o.type)===c){if(7===f.tag){n(r,f.sibling),(a=i(f,o.props.children)).return=r,r=a;break e}}else if(f.elementType===d||"object"===typeof d&&null!==d&&d.$$typeof===_&&rr(d)===f.type){n(r,f.sibling),(a=i(f,o.props)).ref=tr(r,f,o),a.return=r,r=a;break e}n(r,f);break}t(r,f),f=f.sibling}o.type===c?((a=ns(o.props.children,r.mode,h,o.key)).return=r,r=a):((h=ts(o.type,o.key,o.props,null,r.mode,h)).ref=tr(r,a,o),h.return=r,r=h)}return s(r);case u:e:{for(f=o.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=as(o,r.mode,h)).return=r,r=a}return s(r);case _:return e(r,a,(f=o._init)(o._payload),h)}if(L(o))return y(r,a,o,h);if(w(o))return b(r,a,o,h);nr(r,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=is(o,r.mode,h)).return=r,r=a),s(r)):n(r,a)}}var ar=ir(!0),or=ir(!1),sr={},lr=ot(sr),ur=ot(sr),cr=ot(sr);function hr(e){if(e===sr)throw Error(o(174));return e}function dr(e,t){lt(cr,t),lt(ur,e),lt(lr,sr),e=U(t),st(lr),lt(lr,e)}function fr(){st(lr),st(ur),st(cr)}function pr(e){var t=hr(cr.current),n=hr(lr.current);n!==(t=O(n,e.type,t))&&(lt(ur,e),lt(lr,t))}function mr(e){ur.current===e&&(st(lr),st(ur))}var gr=ot(0);function vr(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ie(n)||Ne(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yr=[];function _r(){for(var e=0;e n?n:4,e(!0);var r=xr.transition;xr.transition={};try{e(!1),t()}finally{Lt=n,xr.transition=r}}function oi(){return Or().memoizedState}function si(e,t,n){var r=wo(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ui(e)?ci(t,n):(hi(e,t,n),null!==(e=So(e,r,n=xo()))&&di(e,t,r))}function li(e,t,n){var r=wo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ui(e))ci(t,i);else{hi(e,t,i);var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,jt(s,o))return}catch(l){}null!==(e=So(e,r,n=xo()))&&di(e,t,r)}}function ui(e){var t=e.alternate;return e===Sr||null!==t&&t===Sr}function ci(e,t){Tr=Ar=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hi(e,t,n){null!==Ya&&0!==(1&e.mode)&&0===(2&qa)?(null===(e=t.interleaved)?(n.next=n,null===dn?dn=[t]:dn.push(t)):(n.next=e.next,e.next=n),t.interleaved=n):(null===(e=t.pending)?n.next=n:(n.next=e.next,e.next=n),t.pending=n)}function di(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,kt(e,n)}}var fi={readContext:hn,useCallback:Rr,useContext:Rr,useEffect:Rr,useImperativeHandle:Rr,useInsertionEffect:Rr,useLayoutEffect:Rr,useMemo:Rr,useReducer:Rr,useRef:Rr,useState:Rr,useDebugValue:Rr,useDeferredValue:Rr,useTransition:Rr,useMutableSource:Rr,useSyncExternalStore:Rr,useId:Rr,unstable_isNewReconciler:!1},pi={readContext:hn,useCallback:function(e,t){return Ur().memoizedState=[e,void 0===t?null:t],e},useContext:hn,useEffect:Zr,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Yr(4194308,4,ei.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yr(4,2,e,t)},useMemo:function(e,t){var n=Ur();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ur();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=si.bind(null,Sr,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ur().memoizedState=e},useState:jr,useDebugValue:ni,useDeferredValue:function(e){var t=jr(e),n=t[0],r=t[1];return Zr((function(){var t=xr.transition;xr.transition={};try{r(e)}finally{xr.transition=t}}),[e]),n},useTransition:function(){var e=jr(!1),t=e[0];return e=ai.bind(null,e[1]),Ur().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Sr,i=Ur();if(Wn){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Ya)throw Error(o(349));0!==(30&wr)||Gr(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Zr(Hr.bind(null,r,a,e),[e]),r.flags|=2048,Xr(9,Vr.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Ur(),t=Ya.identifierPrefix;if(Wn){var n=Nn;t=":"+t+"R"+(n=(In&~(1<<32-bt(In)-1)).toString(32)+n),0<(n=Cr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Pr++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mi={readContext:hn,useCallback:ri,useContext:hn,useEffect:Kr,useImperativeHandle:ti,useInsertionEffect:Qr,useLayoutEffect:Jr,useMemo:ii,useReducer:Nr,useRef:qr,useState:function(){return Nr(Ir)},useDebugValue:ni,useDeferredValue:function(e){var t=Nr(Ir),n=t[0],r=t[1];return Kr((function(){var t=xr.transition;xr.transition={};try{r(e)}finally{xr.transition=t}}),[e]),n},useTransition:function(){return[Nr(Ir)[0],Or().memoizedState]},useMutableSource:zr,useSyncExternalStore:Br,useId:oi,unstable_isNewReconciler:!1},gi={readContext:hn,useCallback:ri,useContext:hn,useEffect:Kr,useImperativeHandle:ti,useInsertionEffect:Qr,useLayoutEffect:Jr,useMemo:ii,useReducer:Fr,useRef:qr,useState:function(){return Fr(Ir)},useDebugValue:ni,useDeferredValue:function(e){var t=Fr(Ir),n=t[0],r=t[1];return Kr((function(){var t=xr.transition;xr.transition={};try{r(e)}finally{xr.transition=t}}),[e]),n},useTransition:function(){return[Fr(Ir)[0],Or().memoizedState]},useMutableSource:zr,useSyncExternalStore:Br,useId:oi,unstable_isNewReconciler:!1};function vi(e,t){try{var n="",r=t;do{n+=Jt(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i}}function yi(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var _i,bi,xi,wi,Si="function"===typeof WeakMap?WeakMap:Map;function Ei(e,t,n){(n=gn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){co||(co=!0,ho=r),yi(0,t)},n}function Mi(e,t,n){(n=gn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){yi(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){yi(0,t),"function"!==typeof r&&(null===fo?fo=new Set([this]):fo.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Ai(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Si;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Xo.bind(null,e,t,n),t.then(e,e))}function Ti(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ci(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=gn(-1,1)).tag=2,vn(n,t))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}function Pi(e){e.flags|=4}function Ri(e,t){if(null!==e&&e.child===t.child)return!0;if(0!==(16&t.flags))return!1;for(e=t.child;null!==e;){if(0!==(12854&e.flags)||0!==(12854&e.subtreeFlags))return!1;e=e.sibling}return!0}if(Y)_i=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)z(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},bi=function(){},xi=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var a=t.stateNode,o=hr(lr.current);n=G(a,n,e,r,i,o),(t.updateQueue=n)&&Pi(t)}},wi=function(e,t,n,r){n!==r&&Pi(t)};else if($){_i=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=ke(a,i.type,i.memoizedProps,i)),z(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=Le(a,i.memoizedProps,i)),z(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),_i(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var ki=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=ke(a,i.type,i.memoizedProps,i)),Ce(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=Le(a,i.memoizedProps,i)),Ce(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),ki(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};bi=function(e,t){var n=t.stateNode;if(!Ri(e,t)){e=n.containerInfo;var r=Te(e);ki(r,t,!1,!1),n.pendingChildren=r,Pi(t),Pe(e,r)}},xi=function(e,t,n,r,i){var a=e.stateNode,o=e.memoizedProps;if((e=Ri(e,t))&&o===r)t.stateNode=a;else{var s=t.stateNode,l=hr(lr.current),u=null;o!==r&&(u=G(s,n,o,r,i,l)),e&&null===u?t.stateNode=a:(a=Ae(a,u,n,o,r,t,e,s),B(a,n,r,i,l)&&Pi(t),t.stateNode=a,e?Pi(t):_i(a,t,!1,!1))}},wi=function(e,t,n,r){n!==r?(e=hr(cr.current),n=hr(lr.current),t.stateNode=H(r,e,n,t),Pi(t)):t.stateNode=e.stateNode}}else bi=function(){},xi=function(){},wi=function(){};function Li(e,t){if(!Wn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Di(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ui(e,t,n){var r=t.pendingProps;switch(Gn(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Di(t),null;case 1:case 17:return pt(t.type)&&mt(),Di(t),null;case 3:return r=t.stateNode,fr(),st(ht),st(ct),_r(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Qn(t)?Pi(t):null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==Xn&&(Co(Xn),Xn=null))),bi(e,t),Di(t),null;case 5:mr(t),n=hr(cr.current);var i=t.type;if(null!==e&&null!=t.stateNode)xi(e,t,i,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Di(t),null}if(e=hr(lr.current),Qn(t)){if(!Z)throw Error(o(175));e=He(t.stateNode,t.type,t.memoizedProps,n,e,t,!jn),t.updateQueue=e,null!==e&&Pi(t)}else{var a=F(i,r,n,e,t);_i(a,t,!1,!1),t.stateNode=a,B(a,i,r,n,e)&&Pi(t)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Di(t),null;case 6:if(e&&null!=t.stateNode)wi(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(e=hr(cr.current),n=hr(lr.current),Qn(t)){if(!Z)throw Error(o(176));if(e=t.stateNode,r=t.memoizedProps,(n=We(e,r,t,!jn))&&null!==(i=Vn))switch(a=0!==(1&i.mode),i.tag){case 3:Qe(i.stateNode.containerInfo,e,r,a);break;case 5:Je(i.type,i.memoizedProps,i.stateNode,e,r,a)}n&&Pi(t)}else t.stateNode=H(r,e,n,t)}return Di(t),null;case 13:if(st(gr),r=t.memoizedState,Wn&&null!==Hn&&0!==(1&t.mode)&&0===(128&t.flags)){for(e=Hn;e;)e=ze(e);return Jn(),t.flags|=98560,t}if(null!==r&&null!==r.dehydrated){if(r=Qn(t),null===e){if(!r)throw Error(o(318));if(!Z)throw Error(o(344));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(o(317));je(e,t)}else Jn(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;return Di(t),null}return null!==Xn&&(Co(Xn),Xn=null),0!==(128&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?Qn(t):n=null!==e.memoizedState,r&&!n&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&gr.current)?0===Ja&&(Ja=3):Io())),null!==t.updateQueue&&(t.flags|=4),Di(t),null);case 4:return fr(),bi(e,t),null===e&&Q(t.stateNode.containerInfo),Di(t),null;case 10:return ln(t.type._context),Di(t),null;case 19:if(st(gr),null===(i=t.memoizedState))return Di(t),null;if(r=0!==(128&t.flags),null===(a=i.rendering))if(r)Li(i,!1);else{if(0!==Ja||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=vr(e))){for(t.flags|=128,Li(i,!1),null!==(e=a.updateQueue)&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=n,r=t.child;null!==r;)i=e,(n=r).flags&=14680066,null===(a=n.alternate)?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,i=a.dependencies,n.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext}),r=r.sibling;return lt(gr,1&gr.current|2),t.child}e=e.sibling}null!==i.tail&&Ft()>so&&(t.flags|=128,r=!0,Li(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=vr(a))){if(t.flags|=128,r=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),Li(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!Wn)return Di(t),null}else 2*Ft()-i.renderingStartTime>so&&1073741824!==n&&(t.flags|=128,r=!0,Li(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ft(),t.sibling=null,e=gr.current,lt(gr,r?1&e|2:1&e),t):(Di(t),null);case 22:case 23:return Lo(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ka)&&(Di(t),Y&&6&t.subtreeFlags&&(t.flags|=8192)):Di(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}var Oi=s.ReactCurrentOwner,Ii=!1;function Ni(e,t,n,r){t.child=null===e?or(t,null,n,r):ar(t,e.child,n,r)}function Fi(e,t,n,r,i){n=n.render;var a=t.ref;return cn(t,i),r=Lr(e,t,n,r,a,i),n=Dr(),null===e||Ii?(Wn&&n&&Bn(t),t.flags|=1,Ni(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ia(e,t,i))}function zi(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Jo(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ts(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Bi(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:Qt)(o,r)&&e.ref===t.ref)return ia(e,t,i)}return t.flags|=1,(e=es(a,r)).ref=t.ref,e.return=t,t.child=e}function Bi(e,t,n,r,i){if(null!==e&&Qt(e.memoizedProps,r)&&e.ref===t.ref){if(Ii=!1,0===(e.lanes&i))return t.lanes=e.lanes,ia(e,t,i);0!==(131072&e.flags)&&(Ii=!0)}return Hi(e,t,n,r,i)}function Gi(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},lt(Qa,Ka),Ka|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null},t.updateQueue=null,lt(Qa,Ka),Ka|=e,null;t.memoizedState={baseLanes:0,cachePool:null},r=null!==a?a.baseLanes:n,lt(Qa,Ka),Ka|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,lt(Qa,Ka),Ka|=r;return Ni(e,t,i,n),t.child}function Vi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Hi(e,t,n,r,i){var a=pt(n)?dt:ct.current;return a=ft(t,a),cn(t,i),n=Lr(e,t,n,r,a,i),r=Dr(),null===e||Ii?(Wn&&r&&Bn(t),t.flags|=1,Ni(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ia(e,t,i))}function Wi(e,t,n,r,i){if(pt(n)){var a=!0;yt(t)}else a=!1;if(cn(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),An(t,n,r),Cn(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=n.contextType;"object"===typeof u&&null!==u?u=hn(u):u=ft(t,u=pt(n)?dt:ct.current);var c=n.getDerivedStateFromProps,h="function"===typeof c||"function"===typeof o.getSnapshotBeforeUpdate;h||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==r||l!==u)&&Tn(t,o,r,u),fn=!1;var d=t.memoizedState;o.state=d,bn(t,r,o,i),l=t.memoizedState,s!==r||d!==l||ht.current||fn?("function"===typeof c&&(Sn(t,n,c,r),l=t.memoizedState),(s=fn||Mn(t,n,s,r,d,l,u))?(h||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=s):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,mn(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:en(t.type,s),o.props=u,h=t.pendingProps,d=o.context,"object"===typeof(l=n.contextType)&&null!==l?l=hn(l):l=ft(t,l=pt(n)?dt:ct.current);var f=n.getDerivedStateFromProps;(c="function"===typeof f||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==h||d!==l)&&Tn(t,o,r,l),fn=!1,d=t.memoizedState,o.state=d,bn(t,r,o,i);var p=t.memoizedState;s!==h||d!==p||ht.current||fn?("function"===typeof f&&(Sn(t,n,f,r),p=t.memoizedState),(u=fn||Mn(t,n,u,r,d,p,l)||!1)?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=u):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ji(e,t,n,r,a,i)}function ji(e,t,n,r,i,a){Vi(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&_t(t,n,!1),ia(e,t,a);r=t.stateNode,Oi.current=t;var s=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=ar(t,e.child,null,a),t.child=ar(t,null,s,a)):Ni(e,t,s,a),t.memoizedState=r.state,i&&_t(t,n,!0),t.child}function Xi(e){var t=e.stateNode;t.pendingContext?gt(0,t.pendingContext,t.pendingContext!==t.context):t.context&>(0,t.context,!1),dr(e,t.containerInfo)}function qi(e,t,n,r,i){return Jn(),er(i),t.flags|=256,Ni(e,t,n,r),t.child}var Yi={dehydrated:null,treeContext:null,retryLane:0};function $i(e){return{baseLanes:e,cachePool:null}}function Zi(e,t,n){var r,i=t.pendingProps,a=gr.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),lt(gr,1&a),null===e)return Zn(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:Ne(e)?t.lanes=8:t.lanes=1073741824,null):(a=i.children,e=i.fallback,s?(i=t.mode,s=t.child,a={mode:"hidden",children:a},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=a):s=rs(a,i,0,null),e=ns(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=$i(n),t.memoizedState=Yi,e):Ki(t,a));if(null!==(a=e.memoizedState)){if(null!==(r=a.dehydrated)){if(l)return 256&t.flags?(t.flags&=-257,ea(e,t,n,Error(o(422)))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=i.fallback,a=t.mode,i=rs({mode:"visible",children:i.children},a,0,null),(s=ns(s,a,n,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,0!==(1&t.mode)&&ar(t,e.child,null,n),t.child.memoizedState=$i(n),t.memoizedState=Yi,s);if(0===(1&t.mode))t=ea(e,t,n,null);else if(Ne(r))t=ea(e,t,n,Error(o(419)));else if(i=0!==(n&e.childLanes),Ii||i){if(null!==(i=Ya)){switch(n&-n){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}0!==(i=0!==(s&(i.suspendedLanes|n))?0:s)&&i!==a.retryLane&&(a.retryLane=i,So(e,i,-1))}Io(),t=ea(e,t,n,Error(o(421)))}else Ie(r)?(t.flags|=128,t.child=e.child,t=Yo.bind(null,e),Fe(r,t),t=null):(n=a.treeContext,Z&&(Hn=Ve(r),Vn=t,Wn=!0,Xn=null,jn=!1,null!==n&&(Dn[Un++]=In,Dn[Un++]=Nn,Dn[Un++]=On,In=n.id,Nn=n.overflow,On=t)),(t=Ki(t,t.pendingProps.children)).flags|=4096);return t}return s?(i=Ji(e,t,i.children,i.fallback,n),s=t.child,a=e.child.memoizedState,s.memoizedState=null===a?$i(n):{baseLanes:a.baseLanes|n,cachePool:null},s.childLanes=e.childLanes&~n,t.memoizedState=Yi,i):(n=Qi(e,t,i.children,n),t.memoizedState=null,n)}return s?(i=Ji(e,t,i.children,i.fallback,n),s=t.child,a=e.child.memoizedState,s.memoizedState=null===a?$i(n):{baseLanes:a.baseLanes|n,cachePool:null},s.childLanes=e.childLanes&~n,t.memoizedState=Yi,i):(n=Qi(e,t,i.children,n),t.memoizedState=null,n)}function Ki(e,t){return(t=rs({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Qi(e,t,n,r){var i=e.child;return e=i.sibling,n=es(i,{mode:"visible",children:n}),0===(1&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n}function Ji(e,t,n,r,i){var a=t.mode,o=(e=e.child).sibling,s={mode:"hidden",children:n};return 0===(1&a)&&t.child!==e?((n=t.child).childLanes=0,n.pendingProps=s,t.deletions=null):(n=es(e,s)).subtreeFlags=14680064&e.subtreeFlags,null!==o?r=es(o,r):(r=ns(r,a,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ea(e,t,n,r){return null!==r&&er(r),ar(t,e.child,null,n),(e=Ki(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ta(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),un(e.return,t,n)}function na(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ra(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ni(e,t,r.children,n),0!==(2&(r=gr.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ta(e,n,t);else if(19===e.tag)ta(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(lt(gr,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===vr(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),na(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===vr(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}na(t,!0,n,null,a);break;case"together":na(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ia(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),to|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=es(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=es(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function aa(e,t){switch(Gn(t),t.tag){case 1:return pt(t.type)&&mt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return fr(),st(ht),st(ct),_r(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return mr(t),null;case 13:if(st(gr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));Jn()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return st(gr),null;case 4:return fr(),null;case 10:return ln(t.type._context),null;case 22:case 23:return Lo(),null;default:return null}}var oa=!1,sa=!1,la="function"===typeof WeakSet?WeakSet:Set,ua=null;function ca(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){jo(e,t,r)}else n.current=null}function ha(e,t,n){try{n()}catch(r){jo(e,t,r)}}var da=!1;function fa(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&ha(t,n,a)}i=i.next}while(i!==r)}}function pa(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ma(e){var t=e.ref;if(null!==t){var n=e.stateNode;if(5===e.tag)e=D(n);else e=n;"function"===typeof t?t(e):t.current=e}}function ga(e,t,n){if(Wt&&"function"===typeof Wt.onCommitFiberUnmount)try{Wt.onCommitFiberUnmount(Ht,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e=e.next;do{var i=r,a=i.destroy;i=i.tag,void 0!==a&&(0!==(2&i)||0!==(4&i))&&ha(t,n,a),r=r.next}while(r!==e)}break;case 1:if(ca(t,n),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){jo(t,n,o)}break;case 5:ca(t,n);break;case 4:Y?Ea(e,t,n):$&&$&&(t=t.stateNode.containerInfo,n=Te(t),Re(t,n))}}function va(e,t,n){for(var r=t;;)if(ga(e,r,n),null===r.child||Y&&4===r.tag){if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else r.child.return=r,r=r.child}function ya(e){var t=e.alternate;null!==t&&(e.alternate=null,ya(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&ee(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _a(e){return 5===e.tag||3===e.tag||4===e.tag}function ba(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||_a(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function xa(e){if(Y){e:{for(var t=e.return;null!==t;){if(_a(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(n.tag){case 5:t=n.stateNode,32&n.flags&&(be(t),n.flags&=-33),Sa(e,n=ba(e),t);break;case 3:case 4:t=n.stateNode.containerInfo,wa(e,n=ba(e),t);break;default:throw Error(o(161))}}}function wa(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ve(n,e,t):de(n,e);else if(4!==r&&null!==(e=e.child))for(wa(e,t,n),e=e.sibling;null!==e;)wa(e,t,n),e=e.sibling}function Sa(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ge(n,e,t):he(n,e);else if(4!==r&&null!==(e=e.child))for(Sa(e,t,n),e=e.sibling;null!==e;)Sa(e,t,n),e=e.sibling}function Ea(e,t,n){for(var r,i,a=t,s=!1;;){if(!s){s=a.return;e:for(;;){if(null===s)throw Error(o(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===a.tag||6===a.tag)va(e,a,n),i?_e(r,a.stateNode):ye(r,a.stateNode);else if(18===a.tag)i?Ze(r,a.stateNode):$e(r,a.stateNode);else if(4===a.tag){if(null!==a.child){r=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue}}else if(ga(e,a,n),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(s=!1)}a.sibling.return=a.return,a=a.sibling}}function Ma(e,t){if(Y){switch(t.tag){case 0:case 11:case 14:case 15:return fa(3,t,t.return),pa(3,t),void fa(5,t,t.return);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&me(n,a,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(o(162));return n=t.memoizedProps,void fe(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(Z&&null!==e&&e.memoizedState.isDehydrated&&qe(t.stateNode.containerInfo));case 13:case 19:return void Aa(t)}throw Error(o(163))}switch(t.tag){case 0:case 11:case 14:case 15:return fa(3,t,t.return),pa(3,t),void fa(5,t,t.return);case 12:case 22:case 23:return;case 13:case 19:return void Aa(t);case 3:Z&&null!==e&&e.memoizedState.isDehydrated&&qe(t.stateNode.containerInfo)}e:if($){switch(t.tag){case 1:case 5:case 6:break e;case 3:case 4:t=t.stateNode,Re(t.containerInfo,t.pendingChildren);break e}throw Error(o(163))}}function Aa(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new la),t.forEach((function(t){var r=$o.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ta(e,t,n){ua=e,Ca(e,t,n)}function Ca(e,t,n){for(var r=0!==(1&e.mode);null!==ua;){var i=ua,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||oa;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||sa;s=oa;var u=sa;if(oa=o,(sa=l)&&!u)for(ua=i;null!==ua;)l=(o=ua).child,22===o.tag&&null!==o.memoizedState?ka(i):null!==l?(l.return=o,ua=l):ka(i);for(;null!==a;)ua=a,Ca(a,t,n),a=a.sibling;ua=i,oa=s,sa=u}Pa(e)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,ua=a):Pa(e)}}function Pa(e){for(;null!==ua;){var t=ua;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:sa||pa(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!sa)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:en(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&xn(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=D(t.child.stateNode);break;case 1:n=t.child.stateNode}xn(t,s,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&pe(l,t.type,t.memoizedProps,t);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:break;case 13:if(Z&&null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var h=c.dehydrated;null!==h&&Ye(h)}}}break;default:throw Error(o(163))}sa||512&t.flags&&ma(t)}catch(d){jo(t,t.return,d)}}if(t===e){ua=null;break}if(null!==(n=t.sibling)){n.return=t.return,ua=n;break}ua=t.return}}function Ra(e){for(;null!==ua;){var t=ua;if(t===e){ua=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ua=n;break}ua=t.return}}function ka(e){for(;null!==ua;){var t=ua;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pa(4,t)}catch(l){jo(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){jo(t,i,l)}}var a=t.return;try{ma(t)}catch(l){jo(t,a,l)}break;case 5:var o=t.return;try{ma(t)}catch(l){jo(t,o,l)}}}catch(l){jo(t,t.return,l)}if(t===e){ua=null;break}var s=t.sibling;if(null!==s){s.return=t.return,ua=s;break}ua=t.return}}var La=0,Da=1,Ua=2,Oa=3,Ia=4;if("function"===typeof Symbol&&Symbol.for){var Na=Symbol.for;La=Na("selector.component"),Da=Na("selector.has_pseudo_class"),Ua=Na("selector.role"),Oa=Na("selector.test_id"),Ia=Na("selector.text")}function Fa(e){var t=K(e);if(null!=t){if("string"!==typeof t.memoizedProps["data-testname"])throw Error(o(364));return t}if(null===(e=ie(e)))throw Error(o(362));return e.stateNode.current}function za(e,t){switch(t.$$typeof){case La:if(e.type===t.value)return!0;break;case Da:e:{t=t.value,e=[e,0];for(var n=0;n ";case Da:return":has("+(Ba(e)||"")+")";case Ua:return'[role="'+e.value+'"]';case Ia:return'"'+e.value+'"';case Oa:return'[data-testname="'+e.value+'"]';default:throw Error(o(365))}}function Ga(e,t){var n=[];e=[e,0];for(var r=0;r i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Ft()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ha(r/1960))-r)){e.timeoutHandle=W(Vo.bind(null,e,ao),r);break}Vo(e,ao);break;default:throw Error(o(329))}}}return Mo(e,Ft()),e.callbackNode===n?Ao.bind(null,e):null}function To(e,t){var n=io;return e.current.memoizedState.isDehydrated&&(Do(e,t).flags|=256),2!==(e=No(e,t))&&(t=ao,ao=n,null!==t&&Co(t)),e}function Co(e){null===ao?ao=e:ao.push.apply(ao,e)}function Po(e,t){for(t&=~ro,t&=~no,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 e?16:e,null===mo)var r=!1;else{if(e=mo,mo=null,go=0,0!==(6&qa))throw Error(o(331));var i=qa;for(qa|=4,ua=e.current;null!==ua;){var a=ua,s=a.child;if(0!==(16&ua.flags)){var l=a.deletions;if(null!==l){for(var u=0;u Ft()-oo?Do(e,0):ro|=n),Mo(e,t)}function qo(e,t){0===t&&(0===(1&e.mode)?t=1:(t=Et,0===(130023424&(Et<<=1))&&(Et=4194304)));var n=xo();null!==(e=Eo(e,t))&&(Rt(e,t,n),Mo(e,n))}function Yo(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),qo(e,n)}function $o(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),qo(e,n)}function Zo(e,t){return Ut(e,t)}function Ko(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qo(e,t,n,r){return new Ko(e,t,n,r)}function Jo(e){return!(!(e=e.prototype)||!e.isReactComponent)}function es(e,t){var n=e.alternate;return null===n?((n=Qo(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ts(e,t,n,r,i,a){var s=2;if(r=e,"function"===typeof e)Jo(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case c:return ns(n.children,i,a,t);case h:s=8,i|=8;break;case d:return(e=Qo(12,n,t,2|i)).elementType=d,e.lanes=a,e;case g:return(e=Qo(13,n,t,i)).elementType=g,e.lanes=a,e;case v:return(e=Qo(19,n,t,i)).elementType=v,e.lanes=a,e;case b:return rs(n,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case f:s=10;break e;case p:s=9;break e;case m:s=11;break e;case y:s=14;break e;case _:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Qo(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function ns(e,t,n,r){return(e=Qo(7,e,r,t)).lanes=n,e}function rs(e,t,n,r){return(e=Qo(22,e,r,t)).elementType=b,e.lanes=n,e.stateNode={},e}function is(e,t,n){return(e=Qo(6,e,null,t)).lanes=n,e}function as(e,t,n){return(t=Qo(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function os(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=X,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pt(0),this.expirationTimes=Pt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pt(0),this.identifierPrefix=r,this.onRecoverableError=i,Z&&(this.mutableSourceEagerHydrationData=null)}function ss(e,t,n,r,i,a,o,s,l){return e=new os(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Qo(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null},pn(a),e}function ls(e){if(!e)return ut;e:{if(M(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(pt(n))return vt(e,n,t)}return t}function us(e){var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return null===(e=C(t))?null:e.stateNode}function cs(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n =c&&a>=d&&i<=h&&s<=f){e.splice(t,1);break}if(!(r!==c||n.width!==u.width||fs)){d>a&&(u.height+=d-a,u.y=a),f i)){c>r&&(u.width+=c-r,u.x=r),hn&&(n=s)),s")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},t.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?D(e.child.stateNode):e.child.stateNode:null},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:ds,findFiberByHostInstance:e.findFiberByHostInstance||fs,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},"undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Ht=t.inject(e),Wt=t}catch(n){}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!re)throw Error(o(363));e=Va(e,t);var i=ce(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=Lt;try{return Lt=e,t()}finally{Lt=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,a=xo(),o=wo(i);return n=ls(n),null===t.context?t.context=n:t.pendingContext=n,(t=gn(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),vn(i,t),null!==(e=So(i,o,a))&&yn(e,i,o),o},t}},7205:(e,t,n)=>{"use strict";e.exports=n(7302)},2016:(e,t,n)=>{"use strict";e.exports=n(6958)},2062:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0 >>1,i=e[r];if(!(0>>1;r a(l,n))ua(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(ua(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],h=1,d=null,f=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,_="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(g=!1,b(e),!m)if(null!==r(u))m=!0,D(w);else{var t=r(c);null!==t&&U(x,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(A),A=-1),p=!0;var a=f;try{for(b(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!P());){var o=d.callback;if("function"===typeof o){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?d.callback=s:d===r(u)&&i(u),b(n)}else i(u);d=r(u)}if(null!==d)var l=!0;else{var h=r(c);null!==h&&U(x,h.startTime-n),l=!1}return l}finally{d=null,f=a,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,E=!1,M=null,A=-1,T=5,C=-1;function P(){return!(t.unstable_now()-C e||125 o?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(g?(y(A),A=-1):g=!0,U(x,a-o))):(e.sortIndex=s,n(u,e),m||p||(m=!0,D(w))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},8513:(e,t,n)=>{"use strict";e.exports=n(2062)},1153:(e,t,n)=>{"use strict";var r=n(5043),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,a={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,r)&&!l.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:c,props:a,_owner:s.current}}t.Fragment=a,t.jsx=u,t.jsxs=u},4202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function y(){}function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var b=_.prototype=new y;b.constructor=_,m(b,v.prototype),b.isPureReactComponent=!0;var x=Array.isArray,w=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function M(e,t,r){var i,a={},o=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,i)&&!E.hasOwnProperty(i)&&(a[i]=t[i]);var l=arguments.length-2;if(1===l)a.children=r;else if(1 {"use strict";e.exports=n(4202)},579:(e,t,n)=>{"use strict";e.exports=n(1153)},7234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0 >>1,i=e[r];if(!(0>>1;r a(l,n))ua(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(ua(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],h=1,d=null,f=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,_="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(g=!1,b(e),!m)if(null!==r(u))m=!0,D(w);else{var t=r(c);null!==t&&U(x,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(A),A=-1),p=!0;var a=f;try{for(b(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!P());){var o=d.callback;if("function"===typeof o){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?d.callback=s:d===r(u)&&i(u),b(n)}else i(u);d=r(u)}if(null!==d)var l=!0;else{var h=r(c);null!==h&&U(x,h.startTime-n),l=!1}return l}finally{d=null,f=a,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,E=!1,M=null,A=-1,T=5,C=-1;function P(){return!(t.unstable_now()-C e||125 o?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(g?(y(A),A=-1):g=!0,U(x,a-o))):(e.sortIndex=s,n(u,e),m||p||(m=!0,D(w))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},8853:(e,t,n)=>{"use strict";e.exports=n(7234)},5956:(e,t,n)=>{"use strict";var r=n(5043);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=r.useState,o=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var c="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return s((function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})}),[e,n,t]),o((function(){return u(i)&&c({inst:i}),e((function(){u(i)&&c({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},5039:(e,t,n)=>{"use strict";var r=n(5043),i=n(9461);var a="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=i.useSyncExternalStore,s=r.useRef,l=r.useEffect,u=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var h=s(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;h=u((function(){function e(e){if(!l){if(l=!0,o=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return s=t}return s=e}if(t=s,a(o,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(o=e,s=n)}var o,s,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,i]);var f=o(e,h[0],h[1]);return l((function(){d.hasValue=!0,d.value=f}),[f]),c(f),f}},9461:(e,t,n)=>{"use strict";e.exports=n(5956)},8443:(e,t,n)=>{"use strict";e.exports=n(5039)},8139:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t {var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var a=Object.create(null);n.r(a);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,n.d(a,o),a}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f3bb842a.chunk.js",n.miniCssF=e=>{},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="demo:";n.l=(r,i,a,o)=>{if(e[r])e[r].push(i);else{var s,l;if(void 0!==a)for(var u=document.getElementsByTagName("script"),c=0;c {s.onerror=s.onload=null,clearTimeout(f);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(n))),t)return t(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise(((n,r)=>i=e[t]=[n,r]));r.push(i[2]=a);var o=n.p+n.u(t),s=new Error;n.l(o,(r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",s.name="ChunkLoadError",s.type=a,s.request=o,i[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var i,a,o=r[0],s=r[1],l=r[2],u=0;if(o.some((t=>0!==e[t]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)l(n)}for(t&&t(r);u {"use strict";var e={};n.r(e),n.d(e,{ACESFilmicToneMapping:()=>Mt,AddEquation:()=>Ye,AddOperation:()=>bt,AdditiveAnimationBlendMode:()=>tr,AdditiveBlending:()=>We,AlphaFormat:()=>rn,AlwaysCompare:()=>Fr,AlwaysDepth:()=>ht,AlwaysStencilFunc:()=>Rr,AmbientLight:()=>ep,AmbientLightProbe:()=>vp,AnimationAction:()=>jp,AnimationClip:()=>Ef,AnimationLoader:()=>Df,AnimationMixer:()=>qp,AnimationObjectGroup:()=>Wp,AnimationUtils:()=>hf,ArcCurve:()=>Th,ArrayCamera:()=>Zu,ArrowHelper:()=>Fm,Audio:()=>Pp,AudioAnalyser:()=>Op,AudioContext:()=>pp,AudioListener:()=>Cp,AudioLoader:()=>mp,AxesHelper:()=>zm,BackSide:()=>ze,BasicDepthPacking:()=>sr,BasicShadowMap:()=>Ue,Bone:()=>Vc,BooleanKeyframeTrack:()=>vf,Box2:()=>am,Box3:()=>Yi,Box3Helper:()=>Dm,BoxGeometry:()=>os,BoxHelper:()=>Lm,BufferAttribute:()=>wo,BufferGeometry:()=>Bo,BufferGeometryLoader:()=>sp,ByteType:()=>qt,Cache:()=>Af,Camera:()=>ds,CameraHelper:()=>Pm,CanvasTexture:()=>Eh,CapsuleGeometry:()=>Yh,CatmullRomCurve3:()=>Dh,CineonToneMapping:()=>Et,CircleGeometry:()=>$h,ClampToEdgeWrapping:()=>Ut,Clock:()=>wp,Color:()=>ho,ColorKeyframeTrack:()=>yf,ColorManagement:()=>Pi,CompressedArrayTexture:()=>Sh,CompressedTexture:()=>wh,CompressedTextureLoader:()=>Uf,ConeGeometry:()=>Kh,CubeCamera:()=>ms,CubeReflectionMapping:()=>Ct,CubeRefractionMapping:()=>Pt,CubeTexture:()=>gs,CubeTextureLoader:()=>If,CubeUVReflectionMapping:()=>Lt,CubicBezierCurve:()=>Nh,CubicBezierCurve3:()=>Fh,CubicInterpolant:()=>ff,CullFaceBack:()=>ke,CullFaceFront:()=>Le,CullFaceFrontBack:()=>De,CullFaceNone:()=>Re,Curve:()=>Mh,CurvePath:()=>jh,CustomBlending:()=>qe,CustomToneMapping:()=>At,CylinderGeometry:()=>Zh,Cylindrical:()=>rm,Data3DTexture:()=>Gi,DataArrayTexture:()=>zi,DataTexture:()=>Hc,DataTextureLoader:()=>Nf,DataUtils:()=>_o,DecrementStencilOp:()=>_r,DecrementWrapStencilOp:()=>xr,DefaultLoadingManager:()=>Cf,DepthFormat:()=>ln,DepthStencilFormat:()=>un,DepthTexture:()=>ec,DirectionalLight:()=>Jf,DirectionalLightHelper:()=>Am,DiscreteInterpolant:()=>mf,DisplayP3ColorSpace:()=>pr,DodecahedronGeometry:()=>Jh,DoubleSide:()=>Be,DstAlphaFactor:()=>at,DstColorFactor:()=>st,DynamicCopyUsage:()=>Xr,DynamicDrawUsage:()=>Br,DynamicReadUsage:()=>Hr,EdgesGeometry:()=>id,EllipseCurve:()=>Ah,EqualCompare:()=>Dr,EqualDepth:()=>pt,EqualStencilFunc:()=>Mr,EquirectangularReflectionMapping:()=>Rt,EquirectangularRefractionMapping:()=>kt,Euler:()=>ka,EventDispatcher:()=>Jr,ExtrudeGeometry:()=>Ud,FileLoader:()=>Lf,Float16BufferAttribute:()=>Ro,Float32BufferAttribute:()=>ko,Float64BufferAttribute:()=>Lo,FloatType:()=>Qt,Fog:()=>lc,FogExp2:()=>sc,FramebufferTexture:()=>xh,FrontSide:()=>Fe,Frustum:()=>Es,GLBufferAttribute:()=>Qp,GLSL1:()=>Yr,GLSL3:()=>$r,GreaterCompare:()=>Or,GreaterDepth:()=>gt,GreaterEqualCompare:()=>Nr,GreaterEqualDepth:()=>mt,GreaterEqualStencilFunc:()=>Pr,GreaterStencilFunc:()=>Tr,GridHelper:()=>xm,Group:()=>Ku,HalfFloatType:()=>Jt,HemisphereLight:()=>Bf,HemisphereLightHelper:()=>bm,HemisphereLightProbe:()=>gp,IcosahedronGeometry:()=>Id,ImageBitmapLoader:()=>dp,ImageLoader:()=>Of,ImageUtils:()=>ki,IncrementStencilOp:()=>yr,IncrementWrapStencilOp:()=>br,InstancedBufferAttribute:()=>qc,InstancedBufferGeometry:()=>op,InstancedInterleavedBuffer:()=>Kp,InstancedMesh:()=>th,Int16BufferAttribute:()=>Ao,Int32BufferAttribute:()=>Co,Int8BufferAttribute:()=>So,IntType:()=>Zt,InterleavedBuffer:()=>cc,InterleavedBufferAttribute:()=>dc,Interpolant:()=>df,InterpolateDiscrete:()=>Yn,InterpolateLinear:()=>$n,InterpolateSmooth:()=>Zn,InvertStencilOp:()=>wr,KeepStencilOp:()=>gr,KeyframeTrack:()=>gf,LOD:()=>kc,LatheGeometry:()=>qh,Layers:()=>La,LessCompare:()=>Lr,LessDepth:()=>dt,LessEqualCompare:()=>Ur,LessEqualDepth:()=>ft,LessEqualStencilFunc:()=>Ar,LessStencilFunc:()=>Er,Light:()=>zf,LightProbe:()=>rp,Line:()=>lh,Line3:()=>lm,LineBasicMaterial:()=>nh,LineCurve:()=>zh,LineCurve3:()=>Bh,LineDashedMaterial:()=>rf,LineLoop:()=>dh,LineSegments:()=>hh,LinearEncoding:()=>ar,LinearFilter:()=>Gt,LinearInterpolant:()=>pf,LinearMipMapLinearFilter:()=>jt,LinearMipMapNearestFilter:()=>Ht,LinearMipmapLinearFilter:()=>Wt,LinearMipmapNearestFilter:()=>Vt,LinearSRGBColorSpace:()=>fr,LinearToneMapping:()=>wt,Loader:()=>Pf,LoaderUtils:()=>ap,LoadingManager:()=>Tf,LoopOnce:()=>jn,LoopPingPong:()=>qn,LoopRepeat:()=>Xn,LuminanceAlphaFormat:()=>sn,LuminanceFormat:()=>on,MOUSE:()=>Ce,Material:()=>oo,MaterialLoader:()=>ip,MathUtils:()=>fi,Matrix3:()=>mi,Matrix4:()=>xa,MaxEquation:()=>Qe,Mesh:()=>is,MeshBasicMaterial:()=>po,MeshDepthMaterial:()=>Wu,MeshDistanceMaterial:()=>ju,MeshLambertMaterial:()=>tf,MeshMatcapMaterial:()=>nf,MeshNormalMaterial:()=>ef,MeshPhongMaterial:()=>Qd,MeshPhysicalMaterial:()=>Kd,MeshStandardMaterial:()=>Zd,MeshToonMaterial:()=>Jd,MinEquation:()=>Ke,MirroredRepeatWrapping:()=>Ot,MixOperation:()=>_t,MultiplyBlending:()=>Xe,MultiplyOperation:()=>yt,NearestFilter:()=>It,NearestMipMapLinearFilter:()=>Bt,NearestMipMapNearestFilter:()=>Ft,NearestMipmapLinearFilter:()=>zt,NearestMipmapNearestFilter:()=>Nt,NeverCompare:()=>kr,NeverDepth:()=>ct,NeverStencilFunc:()=>Sr,NoBlending:()=>Ve,NoColorSpace:()=>hr,NoToneMapping:()=>xt,NormalAnimationBlendMode:()=>er,NormalBlending:()=>He,NotEqualCompare:()=>Ir,NotEqualDepth:()=>vt,NotEqualStencilFunc:()=>Cr,NumberKeyframeTrack:()=>_f,Object3D:()=>Xa,ObjectLoader:()=>lp,ObjectSpaceNormalMap:()=>cr,OctahedronGeometry:()=>Nd,OneFactor:()=>et,OneMinusDstAlphaFactor:()=>ot,OneMinusDstColorFactor:()=>lt,OneMinusSrcAlphaFactor:()=>it,OneMinusSrcColorFactor:()=>nt,OrthographicCamera:()=>Fs,PCFShadowMap:()=>Oe,PCFSoftShadowMap:()=>Ie,PMREMGenerator:()=>qs,Path:()=>Xh,PerspectiveCamera:()=>fs,Plane:()=>xs,PlaneGeometry:()=>Ts,PlaneHelper:()=>Um,PointLight:()=>Kf,PointLightHelper:()=>gm,Points:()=>yh,PointsMaterial:()=>fh,PolarGridHelper:()=>wm,PolyhedronGeometry:()=>Qh,PositionalAudio:()=>Up,PropertyBinding:()=>Hp,PropertyMixer:()=>Ip,QuadraticBezierCurve:()=>Gh,QuadraticBezierCurve3:()=>Vh,Quaternion:()=>Wi,QuaternionKeyframeTrack:()=>xf,QuaternionLinearInterpolant:()=>bf,RED_GREEN_RGTC2_Format:()=>Hn,RED_RGTC1_Format:()=>Gn,REVISION:()=>Te,RGBADepthPacking:()=>lr,RGBAFormat:()=>an,RGBAIntegerFormat:()=>pn,RGBA_ASTC_10x10_Format:()=>Nn,RGBA_ASTC_10x5_Format:()=>Un,RGBA_ASTC_10x6_Format:()=>On,RGBA_ASTC_10x8_Format:()=>In,RGBA_ASTC_12x10_Format:()=>Fn,RGBA_ASTC_12x12_Format:()=>zn,RGBA_ASTC_4x4_Format:()=>An,RGBA_ASTC_5x4_Format:()=>Tn,RGBA_ASTC_5x5_Format:()=>Cn,RGBA_ASTC_6x5_Format:()=>Pn,RGBA_ASTC_6x6_Format:()=>Rn,RGBA_ASTC_8x5_Format:()=>kn,RGBA_ASTC_8x6_Format:()=>Ln,RGBA_ASTC_8x8_Format:()=>Dn,RGBA_BPTC_Format:()=>Bn,RGBA_ETC2_EAC_Format:()=>Mn,RGBA_PVRTC_2BPPV1_Format:()=>wn,RGBA_PVRTC_4BPPV1_Format:()=>xn,RGBA_S3TC_DXT1_Format:()=>gn,RGBA_S3TC_DXT3_Format:()=>vn,RGBA_S3TC_DXT5_Format:()=>yn,RGB_ETC1_Format:()=>Sn,RGB_ETC2_Format:()=>En,RGB_PVRTC_2BPPV1_Format:()=>bn,RGB_PVRTC_4BPPV1_Format:()=>_n,RGB_S3TC_DXT1_Format:()=>mn,RGFormat:()=>dn,RGIntegerFormat:()=>fn,RawShaderMaterial:()=>$d,Ray:()=>ba,Raycaster:()=>Jp,RectAreaLight:()=>tp,RedFormat:()=>cn,RedIntegerFormat:()=>hn,ReinhardToneMapping:()=>St,RepeatWrapping:()=>Dt,ReplaceStencilOp:()=>vr,ReverseSubtractEquation:()=>Ze,RingGeometry:()=>Fd,SIGNED_RED_GREEN_RGTC2_Format:()=>Wn,SIGNED_RED_RGTC1_Format:()=>Vn,SRGBColorSpace:()=>dr,Scene:()=>uc,ShaderChunk:()=>Cs,ShaderLib:()=>Rs,ShaderMaterial:()=>hs,ShadowMaterial:()=>Yd,Shape:()=>ad,ShapeGeometry:()=>zd,ShapePath:()=>Bm,ShapeUtils:()=>kd,ShortType:()=>Yt,Skeleton:()=>Xc,SkeletonHelper:()=>pm,SkinnedMesh:()=>Gc,Source:()=>Di,Sphere:()=>da,SphereGeometry:()=>Bd,Spherical:()=>nm,SphericalHarmonics3:()=>np,SplineCurve:()=>Hh,SpotLight:()=>Xf,SpotLightHelper:()=>cm,Sprite:()=>Tc,SpriteMaterial:()=>fc,SrcAlphaFactor:()=>rt,SrcAlphaSaturateFactor:()=>ut,SrcColorFactor:()=>tt,StaticCopyUsage:()=>jr,StaticDrawUsage:()=>zr,StaticReadUsage:()=>Vr,StereoCamera:()=>xp,StreamCopyUsage:()=>qr,StreamDrawUsage:()=>Gr,StreamReadUsage:()=>Wr,StringKeyframeTrack:()=>wf,SubtractEquation:()=>$e,SubtractiveBlending:()=>je,TOUCH:()=>Pe,TangentSpaceNormalMap:()=>ur,TetrahedronGeometry:()=>Gd,Texture:()=>Ii,TextureLoader:()=>Ff,TorusGeometry:()=>Vd,TorusKnotGeometry:()=>Hd,Triangle:()=>io,TriangleFanDrawMode:()=>ir,TriangleStripDrawMode:()=>rr,TrianglesDrawMode:()=>nr,TubeGeometry:()=>Wd,TwoPassDoubleSide:()=>Ge,UVMapping:()=>Tt,Uint16BufferAttribute:()=>To,Uint32BufferAttribute:()=>Po,Uint8BufferAttribute:()=>Eo,Uint8ClampedBufferAttribute:()=>Mo,Uniform:()=>Yp,UniformsGroup:()=>Zp,UniformsLib:()=>Ps,UniformsUtils:()=>cs,UnsignedByteType:()=>Xt,UnsignedInt248Type:()=>nn,UnsignedIntType:()=>Kt,UnsignedShort4444Type:()=>en,UnsignedShort5551Type:()=>tn,UnsignedShortType:()=>$t,VSMShadowMap:()=>Ne,Vector2:()=>pi,Vector3:()=>ji,Vector4:()=>Ni,VectorKeyframeTrack:()=>Sf,VideoTexture:()=>bh,WebGL1Renderer:()=>oc,WebGL3DRenderTarget:()=>Vi,WebGLArrayRenderTarget:()=>Bi,WebGLCoordinateSystem:()=>Kr,WebGLCubeRenderTarget:()=>vs,WebGLMultipleRenderTargets:()=>Hi,WebGLRenderTarget:()=>Fi,WebGLRenderer:()=>ac,WebGLUtils:()=>$u,WebGPUCoordinateSystem:()=>Qr,WireframeGeometry:()=>jd,WrapAroundEnding:()=>Jn,ZeroCurvatureEnding:()=>Kn,ZeroFactor:()=>Je,ZeroSlopeEnding:()=>Qn,ZeroStencilOp:()=>mr,_SRGBAFormat:()=>Zr,sRGBEncoding:()=>or});var t,r=n(5043),i=n.t(r,2),a=n(4391),o=n(7950),s=n.t(o,2);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t =0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function g(e,n,r,i){void 0===i&&(i={});let{window:a=document.defaultView,v5Compat:o=!1}=i,s=a.history,h=t.Pop,m=null,g=v();function v(){return(s.state||{idx:null}).idx}function y(){h=t.Pop;let e=v(),n=null==e?null:e-g;g=e,m&&m({action:h,location:b.location,delta:n})}function _(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:p(e);return n=n.replace(/ $/,"%20"),c(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,s.replaceState(l({},s.state,{idx:g}),""));let b={get action(){return h},get location(){return e(a,s)},listen(e){if(m)throw new Error("A history only accepts one active listener");return a.addEventListener(u,y),m=e,()=>{a.removeEventListener(u,y),m=null}},createHref:e=>n(a,e),createURL:_,encodeLocation(e){let t=_(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){h=t.Push;let i=f(b.location,e,n);r&&r(i,e),g=v()+1;let l=d(i,g),u=b.createHref(i);try{s.pushState(l,"",u)}catch(xv){if(xv instanceof DOMException&&"DataCloneError"===xv.name)throw xv;a.location.assign(u)}o&&m&&m({action:h,location:b.location,delta:1})},replace:function(e,n){h=t.Replace;let i=f(b.location,e,n);r&&r(i,e),g=v();let a=d(i,g),l=b.createHref(i);s.replaceState(a,"",l),o&&m&&m({action:h,location:b.location,delta:0})},go:e=>s.go(e)};return b}var v;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(v||(v={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,n){return void 0===n&&(n="/"),_(e,t,n,!1)}function _(e,t,n,r){let i=D(("string"===typeof t?m(t):t).pathname||"/",n);if(null==i)return null;let a=b(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let o=null;for(let s=0;null==o&&s {let o={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};o.relativePath.startsWith("/")&&(c(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(r.length));let s=F([r,o.relativePath]),l=n.concat(o);e.children&&e.children.length>0&&(c(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),b(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:P(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of x(e.path))i(e,t,r);else i(e,t)})),t}function x(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return i?[a,""]:[a];let o=x(r.join("/")),s=[];return s.push(...o.map((e=>""===e?a:[a,e].join("/")))),i&&s.push(...o),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const w=/^:[\w-]+$/,S=3,E=2,M=1,A=10,T=-2,C=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some(C)&&(r+=T),t&&(r+=E),n.filter((e=>!C(e))).reduce(((e,t)=>e+(w.test(t)?S:""===t?M:A)),r)}function R(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},a="/",o=[];for(let s=0;s (r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let a=new RegExp(i,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1),l=r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=s[n]||"";o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:a,pathnameBase:o,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(xv){return h(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+xv+")."),e}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function U(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function O(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function I(e,t){let n=O(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function N(e,t,n,r){let i;void 0===r&&(r=!1),"string"===typeof e?i=m(e):(i=l({},e),c(!i.pathname||!i.pathname.includes("?"),U("?","pathname","search",i)),c(!i.pathname||!i.pathname.includes("#"),U("#","pathname","hash",i)),c(!i.search||!i.search.includes("#"),U("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?m(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:B(r),hash:G(i)}}(i,a),h=s&&"/"!==s&&s.endsWith("/"),d=(o||"."===s)&&n.endsWith("/");return u.pathname.endsWith("/")||!h&&!d||(u.pathname+="/"),u}const F=e=>e.join("/").replace(/\/\/+/g,"/"),z=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",G=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function V(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const H=["post","put","patch","delete"],W=(new Set(H),["get",...H]);new Set(W),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t {n.current=!0}));let i=r.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,j({fromRouteId:t},i)))}),[e,t]);return i}():function(){Q()||c(!1);let e=r.useContext(X),{basename:t,future:n,navigator:i}=r.useContext(Y),{matches:a}=r.useContext(Z),{pathname:o}=J(),s=JSON.stringify(I(a,n.v7_relativeSplatPath)),l=r.useRef(!1);ee((()=>{l.current=!0}));let u=r.useCallback((function(n,r){if(void 0===r&&(r={}),!l.current)return;if("number"===typeof n)return void i.go(n);let a=N(n,JSON.parse(s),o,"path"===r.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:F([t,a.pathname])),(r.replace?i.replace:i.push)(a,r.state,r)}),[t,i,s,o,e]);return u}()}function ne(e,n,i,a){Q()||c(!1);let{navigator:o}=r.useContext(Y),{matches:s}=r.useContext(Z),l=s[s.length-1],u=l?l.params:{},h=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let d,f=J();if(n){var p;let e="string"===typeof n?m(n):n;"/"===h||(null==(p=e.pathname)?void 0:p.startsWith(h))||c(!1),d=e}else d=f;let g=d.pathname||"/",v=g;if("/"!==h){let e=h.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let _=y(e,{pathname:v});let b=se(_&&_.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:F([h,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:F([h,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,i,a);return n&&b?r.createElement($.Provider,{value:{location:j({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:t.Pop}},b):b}function re(){let e=function(){var e;let t=r.useContext(K),n=he(ue.UseRouteError),i=de(ue.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[i]}(),t=V(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:a},n):null,null)}const ie=r.createElement(re,null);class ae extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(Z.Provider,{value:this.props.routeContext},r.createElement(K.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function oe(e){let{routeContext:t,match:n,children:i}=e,a=r.useContext(X);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(Z.Provider,{value:t},i)}function se(e,t,n,i){var a;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===i&&(i=null),null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=i)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let s=e,l=null==(a=n)?void 0:a.errors;if(null!=l){let e=s.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||c(!1),s=s.slice(0,Math.min(s.length,e+1))}let u=!1,h=-1;if(n&&i&&i.v7_partialHydration)for(let r=0;r =0?s.slice(0,h+1):[s[0]];break}}}return s.reduceRight(((e,i,a)=>{let o,c=!1,d=null,f=null;var p;n&&(o=l&&i.route.id?l[i.route.id]:void 0,d=i.route.errorElement||ie,u&&(h<0&&0===a?(p="route-fallback",!1||fe[p]||(fe[p]=!0),c=!0,f=null):h===a&&(c=!0,f=i.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,a+1)),g=()=>{let t;return t=o?d:c?f:i.route.Component?r.createElement(i.route.Component,null):i.route.element?i.route.element:e,r.createElement(oe,{match:i,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===a)?r.createElement(ae,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()}),null)}var le=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(le||{}),ue=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ue||{});function ce(e){let t=r.useContext(X);return t||c(!1),t}function he(e){let t=r.useContext(q);return t||c(!1),t}function de(e){let t=function(){let e=r.useContext(Z);return e||c(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||c(!1),n.route.id}const fe={};i.startTransition;function pe(e){c(!1)}function me(e){let{basename:n="/",children:i=null,location:a,navigationType:o=t.Pop,navigator:s,static:l=!1,future:u}=e;Q()&&c(!1);let h=n.replace(/^\/*/,"/"),d=r.useMemo((()=>({basename:h,navigator:s,static:l,future:j({v7_relativeSplatPath:!1},u)})),[h,u,s,l]);"string"===typeof a&&(a=m(a));let{pathname:f="/",search:p="",hash:g="",state:v=null,key:y="default"}=a,_=r.useMemo((()=>{let e=D(f,h);return null==e?null:{location:{pathname:e,search:p,hash:g,state:v,key:y},navigationType:o}}),[h,f,p,g,v,y,o]);return null==_?null:r.createElement(Y.Provider,{value:d},r.createElement($.Provider,{children:i,value:_}))}function ge(e){let{children:t,location:n}=e;return ne(ve(t),n)}new Promise((()=>{}));r.Component;function ve(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,i)=>{if(!r.isValidElement(e))return;let a=[...t,i];if(e.type===r.Fragment)return void n.push.apply(n,ve(e.props.children,a));e.type!==pe&&c(!1),e.props.index&&e.props.children&&c(!1);let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=ve(e.props.children,a)),n.push(o)})),n}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(JR){}new Map;const ye=i.startTransition;s.flushSync,i.useId;function _e(e){let{basename:t,children:n,future:i,window:a}=e,o=r.useRef();var s;null==o.current&&(o.current=(void 0===(s={window:a,v5Compat:!0})&&(s={}),g((function(e,t){let{pathname:n,search:r,hash:i}=e.location;return f("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:p(t)}),null,s)));let l=o.current,[u,c]=r.useState({action:l.action,location:l.location}),{v7_startTransition:h}=i||{},d=r.useCallback((e=>{h&&ye?ye((()=>c(e))):c(e)}),[c,h]);return r.useLayoutEffect((()=>l.listen(d)),[l,d]),r.createElement(me,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:l,future:i})}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var be,xe;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(be||(be={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(xe||(xe={}));const we=JSON.parse('[{"query":"what are the characteristics of the eucalyptus","features":[[39122,0.2565361261367798],[142071,0.2326408177614212],[15678,0.22456130385398865],[189083,0.2144891917705536],[14689,0.20261666178703308],[86926,0.19939829409122467],[3168,0.19904030859470367],[169204,0.19839507341384888],[56299,0.1955619603395462],[86173,0.18528518080711365],[170636,0.17611809074878693],[185795,0.17273491621017456],[97387,0.16686248779296875],[84179,0.1645534336566925],[179723,0.16367103159427643],[70125,0.1634458303451538],[91192,0.15895499289035797],[184724,0.1584332287311554],[175658,0.15617969632148743],[143004,0.15239885449409485],[179395,0.15138722956180573],[6479,0.15092724561691284],[3125,0.14811581373214722],[164666,0.14613616466522217],[65869,0.14349457621574402],[155348,0.1399354189634323],[133505,0.138727605342865],[84713,0.13556817173957825],[133298,0.13478969037532806],[145348,0.13436296582221985],[162877,0.13409988582134247],[90742,0.13328829407691956],[73910,0.13211983442306519],[42846,0.1312192976474762],[175427,0.13070179522037506],[140447,0.12881207466125488],[150192,0.12810906767845154],[29312,0.12750405073165894],[191646,0.12728196382522583],[98196,0.12649966776371002],[114454,0.12613734602928162],[30822,0.1259511262178421],[190049,0.1259368360042572],[192223,0.1257035881280899],[127750,0.12441393733024597],[129400,0.1236352026462555],[121675,0.1220947653055191],[155393,0.12145853042602539],[39670,0.12014792859554291],[191038,0.11844992637634277],[165223,0.11650469154119492],[182171,0.11550574004650116],[53246,0.1153828576207161],[13833,0.11434566974639893],[78778,0.11424180865287781],[110514,0.11411722004413605],[89578,0.11329203099012375],[84340,0.11118011176586151],[77341,0.11108909547328949],[50733,0.10944029688835144],[93416,0.1092497855424881],[144831,0.10763023048639297],[159774,0.10741627216339111],[47496,0.10671830177307129],[150355,0.10590122640132904],[168020,0.10555928945541382],[155875,0.10543880611658096],[102251,0.10326051712036133],[161321,0.10318853706121445],[141694,0.10306692123413086],[3120,0.10211865603923798],[36130,0.10194186866283417],[135521,0.10180142521858215],[185470,0.10178080201148987],[63937,0.10110638290643692],[113225,0.10097953677177429],[105938,0.10080383718013763],[140319,0.09921974688768387],[53017,0.09848219156265259],[66937,0.0969758927822113],[140365,0.09686040878295898],[99842,0.09641668200492859],[138701,0.09551522880792618],[62679,0.09533842653036118],[179848,0.09136795997619629],[185691,0.09096818417310715],[1225,0.0908844843506813],[37335,0.09071023762226105],[17240,0.0896964818239212],[95246,0.08950379490852356],[57004,0.08910299092531204],[112575,0.08886975049972534],[49631,0.08759638667106628],[100445,0.08665215969085693],[181197,0.08649720251560211],[62718,0.08626246452331543],[131613,0.08590549230575562],[178008,0.08572070300579071],[18017,0.08484749495983124],[22033,0.08415680378675461],[163616,0.08410290628671646],[47115,0.08396364748477936],[191151,0.08384953439235687],[112846,0.082681804895401],[69658,0.08162564039230347],[183110,0.08141214400529861],[136670,0.08015267550945282],[34486,0.079727403819561],[181999,0.07949096709489822],[106131,0.07938773930072784],[28470,0.07866701483726501],[29492,0.07846599072217941],[164224,0.07844463735818863],[149257,0.07836426794528961],[166667,0.07822799682617188],[163316,0.07816015183925629],[78287,0.0776999294757843],[137124,0.07731852680444717],[155936,0.07706938683986664],[27151,0.0769881010055542],[156883,0.07591843605041504],[86133,0.07533714920282364],[114743,0.07467340677976608],[115287,0.07422034442424774],[164696,0.07267153263092041],[12288,0.07209306955337524],[122602,0.07160419225692749],[150096,0.0714968740940094],[80622,0.07119765877723694],[128054,0.07100316137075424],[122542,0.06955081224441528],[190293,0.06942683458328247],[112872,0.06869649887084961],[138090,0.06842655688524246],[72922,0.06791501492261887],[66476,0.06697990000247955],[86168,0.0665016695857048],[145600,0.06626223772764206],[32708,0.06586006283760071],[69622,0.0652608871459961],[82236,0.06493651121854782],[149713,0.06466647982597351],[105970,0.06421422958374023],[131804,0.06419146806001663],[81836,0.06380577385425568],[115131,0.063137486577034],[137947,0.0625172108411789],[116068,0.06158630549907684],[60919,0.06156133487820625],[111296,0.061174675822257996],[45139,0.06076236069202423],[179450,0.059731170535087585],[130615,0.058613501489162445],[167440,0.05851159244775772],[56767,0.057125337421894073],[149110,0.05678213760256767],[190218,0.05601450428366661],[16449,0.05517422407865524],[22157,0.054802779108285904],[142485,0.05458414554595947],[41532,0.054533835500478745],[10017,0.05446960777044296],[143764,0.05183697119355202],[94250,0.05111365020275116],[82050,0.04979934170842171],[96583,0.04971593990921974],[7222,0.04838193207979202],[58227,0.04776930809020996],[67056,0.04738306999206543],[147921,0.046129580587148666],[186343,0.04545968025922775],[135873,0.04504530131816864],[77269,0.04491928592324257],[128474,0.04425015300512314],[124812,0.044113390147686005],[168914,0.043700311332941055],[154104,0.043066345155239105],[97820,0.042389579117298126],[10648,0.04087026044726372],[139299,0.04004142805933952],[180752,0.039582330733537674],[85961,0.03921687602996826],[184785,0.03887160122394562],[3001,0.037596650421619415],[133501,0.037161458283662796],[45812,0.03666526824235916],[85372,0.03432171046733856],[52797,0.033833641558885574],[178790,0.033090170472860336],[102929,0.03206354379653931],[81460,0.032024867832660675],[164594,0.031921546906232834],[166209,0.03156137093901634],[27794,0.03150995820760727],[174548,0.03145939111709595],[179612,0.031142033636569977],[1162,0.029851632192730904],[144571,0.029757170006632805],[80058,0.028381727635860443],[144324,0.026130154728889465],[87771,0.02606121636927128],[136995,0.02423897385597229],[117576,0.02365228161215782],[126755,0.022944742813706398],[87157,0.022125450894236565],[127076,0.021720532327890396],[88445,0.013864979147911072],[34480,0.012824300676584244],[81451,0.008656542748212814],[186583,0.008400402963161469],[83278,0.007347036153078079],[180767,0.007267415523529053],[98005,0.005204681307077408],[58666,0.0037348195910453796],[19883,0.0010118559002876282]]},{"query":"best wr in nfl history","features":[[155393,0.36324426531791687],[71882,0.2305648773908615],[69658,0.21420149505138397],[100445,0.19935688376426697],[78287,0.19439536333084106],[106131,0.1869133561849594],[127750,0.17456592619419098],[163316,0.17170874774456024],[165223,0.169921875],[91192,0.1659468561410904],[102929,0.16529522836208344],[102251,0.1629827469587326],[119658,0.16217826306819916],[34480,0.15659350156784058],[182171,0.15339092910289764],[136670,0.14621706306934357],[86173,0.14437316358089447],[142071,0.14385361969470978],[10017,0.14351430535316467],[192223,0.14168009161949158],[155348,0.14128661155700684],[140365,0.14110881090164185],[32708,0.14021942019462585],[73910,0.13921797275543213],[133298,0.1386154294013977],[57004,0.13731643557548523],[181999,0.13556285202503204],[164594,0.13283026218414307],[39122,0.13273553550243378],[185795,0.13251769542694092],[190049,0.13245299458503723],[185691,0.13184745609760284],[169204,0.13090753555297852],[130615,0.12767928838729858],[49631,0.1275852769613266],[186343,0.12727010250091553],[97820,0.12489782273769379],[126755,0.12424182891845703],[180767,0.12382876873016357],[124812,0.12269312888383865],[1225,0.12266866862773895],[86168,0.12237783521413803],[63937,0.122209332883358],[128474,0.12109483778476715],[155875,0.1209629699587822],[99842,0.11987538635730743],[45139,0.1193355843424797],[140447,0.11905401200056076],[137124,0.1187814474105835],[86926,0.11789436638355255],[191646,0.11591344326734543],[86133,0.11509547382593155],[142485,0.1149546205997467],[30822,0.1149228885769844],[145600,0.11363491415977478],[183110,0.11226177215576172],[166667,0.1110137552022934],[112575,0.11095142364501953],[56299,0.11032414436340332],[37335,0.10983676463365555],[82236,0.10733500123023987],[174548,0.10684797167778015],[140319,0.10619022697210312],[115131,0.10609808564186096],[84179,0.10476766526699066],[145348,0.10430271923542023],[164224,0.10306059569120407],[170636,0.10287201404571533],[168914,0.1014164388179779],[53246,0.10069697350263596],[117576,0.09930810332298279],[175427,0.09903939068317413],[56767,0.09766189008951187],[62718,0.09686174988746643],[129400,0.09654730558395386],[1162,0.09653937816619873],[13833,0.09511102735996246],[87771,0.09471528232097626],[154104,0.09376348555088043],[84340,0.09332216531038284],[135873,0.09332126379013062],[27151,0.09264598041772842],[27794,0.09117088466882706],[168020,0.0896691307425499],[90742,0.08942672610282898],[189083,0.08843383193016052],[41953,0.08842745423316956],[166209,0.08776546269655228],[88445,0.0875641405582428],[191038,0.08737818151712418],[85372,0.08642717450857162],[82050,0.0859900638461113],[155936,0.08504261076450348],[190293,0.08503267168998718],[178790,0.08438796550035477],[112846,0.08415963500738144],[12288,0.08393791317939758],[47496,0.0837981253862381],[179723,0.08368320763111115],[122602,0.08360989391803741],[185470,0.0830305814743042],[122542,0.08237649500370026],[60919,0.08132585883140564],[98005,0.08130642026662827],[133501,0.08107611536979675],[141694,0.0805707722902298],[179612,0.08053530752658844],[97387,0.08036375045776367],[55185,0.07967056334018707],[114454,0.07905308902263641],[136995,0.07852532714605331],[98196,0.0785193145275116],[53017,0.07837457209825516],[16449,0.07780414074659348],[184724,0.0767146572470665],[179848,0.076524518430233],[95246,0.0749850869178772],[22033,0.0749182403087616],[190218,0.07401497662067413],[83278,0.07183151692152023],[149257,0.07182441651821136],[144571,0.07144086062908173],[149110,0.06930215656757355],[131804,0.06810499727725983],[111296,0.06798133254051208],[58227,0.0671483725309372],[52797,0.06706099212169647],[121675,0.06670289486646652],[127076,0.06571357697248459],[78778,0.06520622968673706],[114743,0.0650465339422226],[14689,0.06460793316364288],[180752,0.06445520371198654],[143764,0.06299223005771637],[87157,0.06221774220466614],[77341,0.06207192316651344],[41532,0.061890147626399994],[89578,0.06185542419552803],[143004,0.06161114573478699],[138090,0.06063482165336609],[164666,0.06026078015565872],[175658,0.05986678600311279],[110514,0.05817534029483795],[96583,0.058171890676021576],[70125,0.05816800519824028],[125750,0.0550386980175972],[62679,0.0547972097992897],[159774,0.05473029613494873],[29312,0.05409502983093262],[28470,0.0535716637969017],[45812,0.053472138941287994],[150355,0.053398553282022476],[22157,0.053240761160850525],[7222,0.05208420753479004],[137947,0.051398783922195435],[116068,0.04877283051609993],[149713,0.048435039818286896],[3168,0.04754186421632767],[150443,0.047022946178913116],[133505,0.04672012850642204],[167440,0.04645087569952011],[135521,0.043685100972652435],[67056,0.043315306305885315],[131613,0.04313354939222336],[150096,0.042833611369132996],[39670,0.04218582808971405],[81836,0.042014703154563904],[36130,0.04132642224431038],[66476,0.04075583070516586],[112872,0.04072124511003494],[184785,0.04021228104829788],[66937,0.03870983049273491],[3125,0.03858760744333267],[138701,0.037464872002601624],[50276,0.03734122961759567],[150192,0.03706511855125427],[128054,0.0364888571202755],[105938,0.035972870886325836],[147921,0.03509946167469025],[29492,0.03478369116783142],[178008,0.03468067944049835],[181197,0.03466580808162689],[161321,0.03461071103811264],[15678,0.034566543996334076],[164696,0.034277014434337616],[179395,0.033721014857292175],[162877,0.03328819200396538],[113225,0.03276273235678673],[18017,0.031769320368766785],[81460,0.031067168340086937],[3001,0.030946845188736916],[115287,0.028370194137096405],[69622,0.028130576014518738],[34486,0.027997855097055435],[86399,0.027433279901742935],[84713,0.025255151093006134],[105970,0.024752959609031677],[85961,0.02296236902475357],[93416,0.022776518017053604],[144831,0.02167210914194584],[17240,0.02069593220949173],[144324,0.020230092108249664],[191151,0.019026119261980057],[52808,0.018803659826517105],[91793,0.01785656437277794],[157385,0.016873855143785477],[69629,0.015797588974237442],[65992,0.014202587306499481],[179450,0.011789597570896149],[72922,0.011761505156755447],[123736,0.01148970052599907],[65869,0.010986674576997757],[156883,0.010934222489595413],[45073,0.009793031960725784],[6479,0.008021116256713867],[81451,0.007540279999375343],[47115,0.006474481895565987],[185412,0.00600071158260107],[42846,0.00598137266933918],[57777,0.005488067865371704],[163616,0.004737731069326401],[39329,0.004597080871462822],[80058,0.004545200616121292],[83484,0.004229281097650528],[76473,0.0033879540860652924],[77269,0.003302842378616333],[50733,0.003087420016527176],[141721,0.0015335530042648315],[127094,0.001394122838973999],[3120,0.0011511854827404022]]},{"query":"how long is cough in children lasting","features":[[15678,0.33924856781959534],[45139,0.3133310079574585],[185691,0.2605490982532501],[39122,0.25579720735549927],[56299,0.22399388253688812],[179848,0.22110643982887268],[133505,0.20070484280586243],[164696,0.1981653869152069],[164666,0.18178927898406982],[110514,0.16938461363315582],[136995,0.16391903162002563],[34480,0.16187280416488647],[126755,0.1588025689125061],[27151,0.15580514073371887],[170636,0.15486975014209747],[50733,0.1533927321434021],[69622,0.15246255695819855],[53246,0.15139895677566528],[57004,0.1507168859243393],[3168,0.14892953634262085],[89578,0.1443977802991867],[179395,0.14331604540348053],[181999,0.14235073328018188],[97820,0.1404617726802826],[127076,0.1372717320919037],[136670,0.13467825949192047],[140365,0.13434650003910065],[58227,0.13432414829730988],[131613,0.13431262969970703],[13833,0.13422539830207825],[185470,0.13306516408920288],[81460,0.12893253564834595],[77341,0.12760332226753235],[47115,0.12757518887519836],[130615,0.1264737844467163],[60919,0.12638087570667267],[73910,0.12598203122615814],[29312,0.12581266462802887],[162877,0.12467797845602036],[7222,0.12416377663612366],[29492,0.1240442544221878],[156883,0.12356503307819366],[115287,0.12339320033788681],[137124,0.12337317317724228],[190049,0.12172194570302963],[52797,0.1201731413602829],[149257,0.11882767826318741],[90742,0.11618322134017944],[178790,0.11468394845724106],[135521,0.11357176303863525],[133298,0.11303801089525223],[121675,0.11239354312419891],[114743,0.1110919862985611],[78287,0.11044134199619293],[80058,0.109368234872818],[96583,0.10936041176319122],[175427,0.109092578291893],[163316,0.10855799913406372],[65869,0.10810169577598572],[128054,0.10721451044082642],[168020,0.1072063222527504],[36130,0.10637158155441284],[190293,0.10603807121515274],[105970,0.10595164448022842],[116068,0.10591781139373779],[161321,0.10494841635227203],[86133,0.10473164170980453],[127750,0.10472369194030762],[18017,0.10437966883182526],[93416,0.10343153774738312],[169204,0.10193656384944916],[124812,0.10125479847192764],[17240,0.09995470941066742],[102251,0.09949519485235214],[82236,0.0994700938463211],[164594,0.09887826442718506],[167440,0.09838148206472397],[6479,0.0983055830001831],[112872,0.09549291431903839],[179450,0.09454705566167831],[3120,0.09410837292671204],[142071,0.09372307360172272],[41532,0.09320667386054993],[39670,0.09301836788654327],[16449,0.09290023148059845],[159774,0.09275037795305252],[3001,0.09229966998100281],[81451,0.09229368716478348],[149713,0.0918552428483963],[143004,0.09182047843933105],[181197,0.09072799980640411],[84179,0.09062683582305908],[27794,0.09053771942853928],[141694,0.0904819518327713],[144571,0.09028228372335434],[62679,0.08989943563938141],[30822,0.08914834260940552],[14689,0.08856391906738281],[185795,0.08844214677810669],[106131,0.08639249205589294],[12288,0.08630698919296265],[140319,0.08617743849754333],[163616,0.08552885055541992],[135873,0.0853574275970459],[95246,0.08453518152236938],[3125,0.08422692120075226],[114454,0.08417125046253204],[184785,0.0840020626783371],[179612,0.08389806747436523],[155348,0.08245966583490372],[105938,0.08212924003601074],[140447,0.08158720284700394],[72922,0.08095073699951172],[145348,0.08068328350782394],[86173,0.0794265866279602],[22033,0.07862545549869537],[80622,0.0782776027917862],[144324,0.07794526219367981],[81836,0.07699137926101685],[70125,0.07551945745944977],[47496,0.07471367716789246],[78778,0.07464072108268738],[113225,0.07461719959974289],[147921,0.07365084439516068],[87771,0.07334772497415543],[183110,0.07161349803209305],[53017,0.07133011519908905],[191038,0.07125838100910187],[41953,0.07105810940265656],[49631,0.07099363207817078],[174548,0.07083499431610107],[115131,0.07055781036615372],[179723,0.06952770054340363],[119658,0.06910272687673569],[175658,0.06815414130687714],[87157,0.06772372871637344],[165223,0.0675981193780899],[184724,0.06742341071367264],[189083,0.06741120666265488],[186343,0.06720441579818726],[84713,0.06709400564432144],[98005,0.06676744669675827],[77269,0.06659066677093506],[150192,0.06606176495552063],[86926,0.06540285050868988],[155393,0.06460683047771454],[66476,0.06431502103805542],[102929,0.06382746994495392],[180752,0.061626359820365906],[131804,0.06142064929008484],[50276,0.060751594603061676],[112575,0.06024555861949921],[145600,0.05980081111192703],[85961,0.059512004256248474],[91192,0.05913710594177246],[178008,0.058296866714954376],[129400,0.058265138417482376],[164224,0.056239694356918335],[144831,0.056165337562561035],[112846,0.05614268779754639],[34486,0.05500079691410065],[85372,0.053733259439468384],[128474,0.053639788180589676],[154104,0.0527203232049942],[122542,0.052423447370529175],[155936,0.05232533439993858],[155875,0.05226043984293938],[191151,0.0521012507379055],[10017,0.05151332914829254],[150355,0.05057249218225479],[192223,0.05044874921441078],[166209,0.05032697319984436],[100445,0.05009555071592331],[67056,0.04984131455421448],[1225,0.04966070502996445],[82050,0.04762524738907814],[45812,0.04740219563245773],[133501,0.046510495245456696],[122602,0.04635782167315483],[97387,0.04578062519431114],[94250,0.04478515312075615],[99842,0.044498588889837265],[182171,0.043891195207834244],[139299,0.040097884833812714],[190218,0.03847885876893997],[137947,0.037634484469890594],[168914,0.03736744076013565],[37335,0.03720679134130478],[42846,0.036960963159799576],[63937,0.03610512614250183],[143764,0.035676464438438416],[69658,0.03503549471497536],[149110,0.03391553461551666],[22157,0.03376932442188263],[66937,0.03087633103132248],[28470,0.030226146802306175],[86168,0.029327791184186935],[191646,0.02899171970784664],[138701,0.02862129732966423],[62718,0.028554674237966537],[1162,0.024720802903175354],[56767,0.02411540597677231],[83278,0.022018996998667717],[117576,0.022011779248714447],[88445,0.019773222506046295],[111296,0.01851518452167511],[166667,0.011772534810006618],[142485,0.010646212846040726],[98196,0.008662018924951553],[180767,0.008432161062955856],[84340,0.0025227870792150497],[138090,0.0003256034106016159]]},{"query":"types of active transducers","features":[[39122,0.3894751965999603],[78287,0.23378336429595947],[155875,0.23157182335853577],[15678,0.20340101420879364],[78778,0.17915940284729004],[175427,0.17614716291427612],[17240,0.17478232085704803],[121675,0.17257602512836456],[149110,0.1713554412126541],[56299,0.1641102284193039],[27151,0.1622108370065689],[169204,0.16035547852516174],[179723,0.1600685566663742],[165223,0.15858674049377441],[133298,0.15816925466060638],[99842,0.1563730090856552],[47115,0.15508133172988892],[86133,0.15319935977458954],[189083,0.1530558168888092],[185795,0.1525212824344635],[137124,0.14921970665454865],[10017,0.14891071617603302],[127076,0.14786705374717712],[6479,0.14712075889110565],[112846,0.1436929553747177],[163616,0.14332178235054016],[142071,0.14194367825984955],[88445,0.14088106155395508],[143764,0.14032411575317383],[102251,0.13933037221431732],[83278,0.13888686895370483],[3168,0.13880908489227295],[28470,0.1383575201034546],[154104,0.1362650990486145],[3125,0.1346612423658371],[105938,0.13420581817626953],[22157,0.13290706276893616],[110514,0.1326262503862381],[127750,0.13221248984336853],[22033,0.13060982525348663],[166667,0.12979547679424286],[155936,0.12947897613048553],[45139,0.1284252107143402],[96583,0.12826944887638092],[52797,0.1256716400384903],[81836,0.12518520653247833],[168020,0.12435166537761688],[145600,0.12295687943696976],[1225,0.12263037264347076],[150096,0.11907218396663666],[145348,0.11711081862449646],[166209,0.11681444942951202],[100445,0.11675623059272766],[150355,0.11622516810894012],[175658,0.11572792381048203],[36130,0.11543198674917221],[179450,0.11485955119132996],[138090,0.11453051120042801],[112872,0.11431505531072617],[164224,0.11392790824174881],[138701,0.11228681355714798],[85961,0.11012498289346695],[140365,0.1087111234664917],[159774,0.10852449387311935],[12288,0.10831432789564133],[95246,0.1053524911403656],[190049,0.10415848344564438],[136670,0.10372303426265717],[140319,0.10307016223669052],[87771,0.10304524749517441],[149713,0.10292641073465347],[81451,0.10270728170871735],[3001,0.10253003239631653],[167440,0.10004907101392746],[42846,0.09983556717634201],[164666,0.09959699213504791],[41532,0.09792245924472809],[67056,0.09751145541667938],[113225,0.09735439717769623],[16449,0.09618887305259705],[179612,0.0944012850522995],[178008,0.09420041739940643],[53246,0.09382251650094986],[122542,0.09323567152023315],[87157,0.09264842420816422],[62718,0.09249107539653778],[170636,0.09080647677183151],[39670,0.090775266289711],[130615,0.09068282693624496],[150192,0.09059696644544601],[98196,0.09020695090293884],[58227,0.0868389904499054],[143004,0.08664561063051224],[122602,0.085594542324543],[73910,0.085126131772995],[77269,0.08301008492708206],[7222,0.08163682371377945],[65869,0.08118091523647308],[131804,0.08084402978420258],[155393,0.0805901437997818],[106131,0.08017408847808838],[34480,0.07982887327671051],[47496,0.07970355451107025],[128474,0.07966186106204987],[91192,0.07908706367015839],[86168,0.07836338877677917],[164594,0.07782994210720062],[34486,0.07710427790880203],[184785,0.0769200399518013],[161321,0.07682672888040543],[119658,0.07612478733062744],[77341,0.07501938939094543],[116068,0.07475533336400986],[80622,0.07372668385505676],[162877,0.07272201776504517],[126755,0.07259270548820496],[82236,0.07233871519565582],[89578,0.07229137420654297],[115131,0.07125796377658844],[180767,0.0704510360956192],[105970,0.06990547478199005],[32708,0.06989017128944397],[82050,0.06977082788944244],[66476,0.06908895075321198],[60919,0.06900642812252045],[185470,0.06874937564134598],[142485,0.06863581389188766],[191646,0.06847862899303436],[174548,0.06778088212013245],[84713,0.06722813844680786],[144324,0.06571078300476074],[14689,0.06565186381340027],[182171,0.06564302742481232],[50733,0.06468412280082703],[97820,0.0640575960278511],[156883,0.06388157606124878],[144831,0.06369204819202423],[133501,0.06365875899791718],[133505,0.06354621797800064],[86926,0.06165064871311188],[1162,0.06153666228055954],[180752,0.06133441627025604],[129400,0.06122645363211632],[178790,0.0611451230943203],[69658,0.05964432656764984],[56767,0.059566792100667953],[128054,0.059215277433395386],[94250,0.059005256742239],[112575,0.05890825763344765],[37335,0.05862082540988922],[85372,0.05855508893728256],[181999,0.0582621768116951],[192223,0.058160945773124695],[190218,0.05710570514202118],[93416,0.05677506700158119],[69622,0.05648445710539818],[191038,0.055826231837272644],[191151,0.05575485900044441],[50276,0.05525420606136322],[30822,0.05513998121023178],[185691,0.05510656163096428],[29312,0.054867975413799286],[181197,0.054239921271800995],[53017,0.053505733609199524],[190293,0.05231315642595291],[84340,0.05108177289366722],[115287,0.0503242127597332],[179395,0.04963933303952217],[18017,0.04955514147877693],[111296,0.04948802292346954],[80058,0.04939046502113342],[155348,0.048370808362960815],[49631,0.047757185995578766],[70125,0.04734397679567337],[27794,0.04644239693880081],[140447,0.044529981911182404],[62679,0.04451926052570343],[114743,0.04404572397470474],[117576,0.043790385127067566],[81460,0.043595097959041595],[141694,0.043478645384311676],[137947,0.04269484430551529],[114454,0.042596153914928436],[98005,0.041435375809669495],[183110,0.04007363319396973],[124812,0.039430126547813416],[163316,0.039219487458467484],[139299,0.0382981076836586],[97387,0.03694954887032509],[164696,0.03668191283941269],[149257,0.03624114394187927],[168914,0.03595145791769028],[131613,0.03594718128442764],[29492,0.03592916578054428],[90742,0.03586150333285332],[41953,0.034697018563747406],[84179,0.03346099331974983],[147921,0.032958414405584335],[63937,0.031599193811416626],[136995,0.031554244458675385],[179848,0.028355160728096962],[57004,0.027399107813835144],[107313,0.026604371145367622],[186343,0.026343150064349174],[13833,0.024868007749319077],[45812,0.024632234126329422],[72922,0.020449375733733177],[86173,0.020237073302268982],[3120,0.019213922321796417],[144571,0.017939966171979904],[66937,0.017482154071331024],[184724,0.01704036444425583],[158650,0.017004508525133133],[135873,0.016063151881098747],[135521,0.015714522451162338],[8710,0.006791930645704269]]},{"query":"how long is refrigerated pie crust good for after expiration date","features":[[164696,0.30419883131980896],[189083,0.2536301016807556],[186343,0.23278239369392395],[185691,0.22820734977722168],[39122,0.2239360511302948],[178790,0.2179209589958191],[15678,0.21764028072357178],[179848,0.20390689373016357],[126755,0.19133324921131134],[170636,0.17970147728919983],[190293,0.17496952414512634],[164224,0.1745724081993103],[69658,0.16908934712409973],[182171,0.1686510443687439],[97387,0.16634275019168854],[56299,0.15779419243335724],[27794,0.15737929940223694],[135873,0.15475420653820038],[57004,0.15460459887981415],[45139,0.14859142899513245],[178008,0.1454233080148697],[37335,0.14384447038173676],[13833,0.14331769943237305],[1162,0.14267577230930328],[78778,0.14159244298934937],[161321,0.1371360868215561],[81460,0.13460923731327057],[87771,0.13426926732063293],[190218,0.13237053155899048],[181999,0.13080266118049622],[96583,0.12881895899772644],[69622,0.12782500684261322],[105970,0.1273888647556305],[150355,0.12571735680103302],[22157,0.12495329231023788],[47496,0.12351859360933304],[65869,0.12337763607501984],[185795,0.12329816818237305],[169204,0.121781125664711],[192223,0.12150482833385468],[112846,0.11919236183166504],[100445,0.1163843423128128],[144324,0.11637502163648605],[179450,0.11618179082870483],[159774,0.11616651713848114],[80058,0.1160462349653244],[90742,0.11594375967979431],[180767,0.11352735757827759],[155348,0.11258475482463837],[144571,0.11173835396766663],[112575,0.11117902398109436],[129400,0.11076976358890533],[86173,0.11035151034593582],[14689,0.10964466631412506],[102251,0.10904738306999207],[50733,0.10770360380411148],[163616,0.10755161941051483],[137947,0.10632427036762238],[150192,0.10424056649208069],[3120,0.10342374444007874],[1225,0.1032119020819664],[136995,0.10267344862222672],[82050,0.10258898138999939],[105938,0.1011108011007309],[140319,0.10077709704637527],[53017,0.10063871741294861],[7222,0.10048288106918335],[164666,0.09990660846233368],[191646,0.09759530425071716],[122602,0.09744152426719666],[58227,0.09675028920173645],[52797,0.0961282029747963],[124812,0.09561974555253983],[150096,0.09535485506057739],[190049,0.0928788110613823],[168914,0.09050633758306503],[85372,0.09024259448051453],[3001,0.09023258090019226],[185470,0.0901653841137886],[86133,0.08950216323137283],[138701,0.08778246492147446],[183110,0.08761660009622574],[149110,0.08584794402122498],[196354,0.08503059297800064],[77269,0.08498934656381607],[133505,0.0848298892378807],[142071,0.08478520810604095],[86926,0.08476598560810089],[175427,0.08445940911769867],[95246,0.08419971913099289],[80622,0.08383656293153763],[128474,0.08371338248252869],[141694,0.08311814069747925],[41953,0.08303966373205185],[77341,0.08261819183826447],[166667,0.08177060633897781],[128054,0.08162188529968262],[102929,0.08147983253002167],[117576,0.08146992325782776],[136670,0.08108765631914139],[22033,0.08038505166769028],[166209,0.07930198311805725],[93416,0.07870180904865265],[184785,0.07853376120328903],[174548,0.07777184247970581],[127076,0.0771559551358223],[36130,0.07685478031635284],[156883,0.07554522156715393],[122542,0.07541734725236893],[56767,0.07461537420749664],[6479,0.07421430945396423],[53246,0.07358239591121674],[145600,0.07344457507133484],[114743,0.07322230935096741],[149713,0.07294539362192154],[165223,0.07290767133235931],[87157,0.07221879065036774],[145348,0.07193116098642349],[60919,0.07152578979730606],[97820,0.07131123542785645],[62718,0.07096391916275024],[81836,0.070104219019413],[88445,0.06988056004047394],[42846,0.06955784559249878],[138090,0.06909201294183731],[83278,0.06870271265506744],[89578,0.06867209821939468],[135521,0.06862003356218338],[130615,0.06825792789459229],[45812,0.06759357452392578],[106131,0.06741544604301453],[30822,0.06724044680595398],[168020,0.06634240597486496],[28470,0.0661238580942154],[140365,0.06579326838254929],[131804,0.06546779721975327],[140447,0.06517473608255386],[27151,0.06462858617305756],[12288,0.0638233870267868],[180752,0.06377663463354111],[143004,0.06336328387260437],[110514,0.06312092393636703],[91192,0.0625419095158577],[154104,0.06234987825155258],[133501,0.06175653263926506],[84179,0.061086416244506836],[179612,0.06035314500331879],[86168,0.0601658821105957],[164594,0.059742268174886703],[143764,0.058506742119789124],[139299,0.058245040476322174],[167440,0.058116596192121506],[163316,0.05806908756494522],[3168,0.057525165379047394],[114454,0.05624491721391678],[50276,0.05597934499382973],[29312,0.05520033463835716],[175658,0.054572075605392456],[181197,0.054453834891319275],[49631,0.05381585657596588],[34486,0.05323281139135361],[84340,0.05284176021814346],[41532,0.05238931626081467],[137124,0.05187875032424927],[111296,0.05170876532793045],[98005,0.05121152475476265],[72922,0.04953685402870178],[99842,0.04945167154073715],[115131,0.04874911531805992],[147921,0.0481497161090374],[121675,0.047526765614748],[3125,0.04745882749557495],[67056,0.04638216644525528],[34480,0.04503311216831207],[116068,0.04427027329802513],[16449,0.04310042783617973],[47115,0.04243829846382141],[184724,0.041846901178359985],[155875,0.041600897908210754],[112872,0.040391430258750916],[155393,0.039674896746873856],[32708,0.03956994041800499],[115287,0.03900613635778427],[179395,0.03768385574221611],[85961,0.037466540932655334],[131613,0.03632538765668869],[82236,0.036107126623392105],[39670,0.035599708557128906],[162877,0.03526431322097778],[66476,0.03502373397350311],[98196,0.0339915007352829],[84713,0.033664826303720474],[63937,0.03334822133183479],[78287,0.03216952085494995],[149257,0.03206564113497734],[113225,0.03034377098083496],[155936,0.030225347727537155],[179723,0.02951371856033802],[81451,0.029388803988695145],[29492,0.026681747287511826],[17240,0.02627255767583847],[94250,0.02409200370311737],[18017,0.023641914129257202],[119658,0.02242121659219265],[10017,0.020952953025698662],[191151,0.017669692635536194],[73910,0.012151546776294708],[133298,0.011872866190969944],[127750,0.011377168819308281],[144831,0.00868210382759571],[70125,0.008334910497069359],[2971,0.0044402554631233215],[61715,0.0027185939252376556],[138420,0.00018288008868694305]]}]'),Se=JSON.parse('{"3125":"pattern, structure, variation, sequence","14689":"pets, veterinary, animals, dog, care","15678":"health, nutrition, immune, disease, metabolism","39122":"stimuli, patterns, response, signals, activation","39670":"cosmetics, color, skin, makeup, stain","45139":"time, duration, sleep, hours, minutes","56299":"measurements, values, dimensions, statistics","69658":"wildcard, subsequences, activation, neuron","71882":"baseball, athletes, performance, statistics","78287":"classification, types, examples, varieties","78778":"ocean, wildlife, tourism, entertainment","100445":"tennis, courts, justices, championships","114454":"Beauty, identity, color, fashion, expression","142071":"climate, weather, precipitation, seasons","155393":"celebrity, entertainment, personality, humor","155875":"automotive, engineering, mechanics","164696":"cleaning, duration, residue, products, maintenance","185691":"weather, forecast, conditions, cold, outlook","186343":"ingredients, cooking, recipes, flavors, meals","189083":"temperature, climate, humidity, weather, degrees"}');var Ee=n(579);const Me=e=>{let{featureId:t,description:n,score:r}=e;const i=te();return(0,Ee.jsxs)("div",{className:"bg-white text-black p-4 rounded-lg shadow-md flex justify-between items-center",children:[(0,Ee.jsx)("div",{children:n&&(0,Ee.jsx)("h3",{className:"text-lg font-semibold",children:n})}),(0,Ee.jsxs)("p",{className:"text-sm",children:["Activation Score: ",r]}),(0,Ee.jsxs)("div",{className:"text-center",children:[n&&(0,Ee.jsx)("button",{onClick:()=>{i(`/visualize/${t}`)},className:"bg-white text-accent px-3 py-1 rounded",children:"Visualize"}),(0,Ee.jsxs)("p",{className:"text-xs",children:["id = ",t]})]})]})},Ae=()=>{const[e,t]=(0,r.useState)("what is prism in eyeglasses"),[n,i]=(0,r.useState)(we[0].features);return(0,r.useEffect)((()=>{if(e){const t=we.find((t=>t.query===e));t&&i(t.features)}else i([])}),[e]),(0,Ee.jsx)("div",{className:"min-h-screen bg-gray-100 p-8",children:(0,Ee.jsxs)("div",{className:"max-w-xl mx-auto",children:[(0,Ee.jsx)("h1",{className:"text-3xl font-bold mb-4",children:"Latent feature visualizer"}),(0,Ee.jsx)("p",{className:"mb-4",children:"Pick a sample MsMarco query to observe the top latent features from our k-sparse autoencoder and their semantic meaning."}),(0,Ee.jsx)("select",{className:"w-full p-2 border border-gray-300 rounded mb-6",value:e,onChange:e=>t(e.target.value),children:we.map(((e,t)=>(0,Ee.jsx)("option",{value:e.query,children:e.query},t)))}),(0,Ee.jsx)("div",{className:"space-y-4",children:n.map((e=>{let[t,n]=e;return(0,Ee.jsx)(Me,{featureId:t,description:Se[t],score:n},t)}))})]})})},Te="154",Ce={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Pe={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Re=0,ke=1,Le=2,De=3,Ue=0,Oe=1,Ie=2,Ne=3,Fe=0,ze=1,Be=2,Ge=2,Ve=0,He=1,We=2,je=3,Xe=4,qe=5,Ye=100,$e=101,Ze=102,Ke=103,Qe=104,Je=200,et=201,tt=202,nt=203,rt=204,it=205,at=206,ot=207,st=208,lt=209,ut=210,ct=0,ht=1,dt=2,ft=3,pt=4,mt=5,gt=6,vt=7,yt=0,_t=1,bt=2,xt=0,wt=1,St=2,Et=3,Mt=4,At=5,Tt=300,Ct=301,Pt=302,Rt=303,kt=304,Lt=306,Dt=1e3,Ut=1001,Ot=1002,It=1003,Nt=1004,Ft=1004,zt=1005,Bt=1005,Gt=1006,Vt=1007,Ht=1007,Wt=1008,jt=1008,Xt=1009,qt=1010,Yt=1011,$t=1012,Zt=1013,Kt=1014,Qt=1015,Jt=1016,en=1017,tn=1018,nn=1020,rn=1021,an=1023,on=1024,sn=1025,ln=1026,un=1027,cn=1028,hn=1029,dn=1030,fn=1031,pn=1033,mn=33776,gn=33777,vn=33778,yn=33779,_n=35840,bn=35841,xn=35842,wn=35843,Sn=36196,En=37492,Mn=37496,An=37808,Tn=37809,Cn=37810,Pn=37811,Rn=37812,kn=37813,Ln=37814,Dn=37815,Un=37816,On=37817,In=37818,Nn=37819,Fn=37820,zn=37821,Bn=36492,Gn=36283,Vn=36284,Hn=36285,Wn=36286,jn=2200,Xn=2201,qn=2202,Yn=2300,$n=2301,Zn=2302,Kn=2400,Qn=2401,Jn=2402,er=2500,tr=2501,nr=0,rr=1,ir=2,ar=3e3,or=3001,sr=3200,lr=3201,ur=0,cr=1,hr="",dr="srgb",fr="srgb-linear",pr="display-p3",mr=0,gr=7680,vr=7681,yr=7682,_r=7683,br=34055,xr=34056,wr=5386,Sr=512,Er=513,Mr=514,Ar=515,Tr=516,Cr=517,Pr=518,Rr=519,kr=512,Lr=513,Dr=514,Ur=515,Or=516,Ir=517,Nr=518,Fr=519,zr=35044,Br=35048,Gr=35040,Vr=35045,Hr=35049,Wr=35041,jr=35046,Xr=35050,qr=35042,Yr="100",$r="300 es",Zr=1035,Kr=2e3,Qr=2001;class Jr{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t >8&255]+ei[e>>16&255]+ei[e>>24&255]+"-"+ei[255&t]+ei[t>>8&255]+"-"+ei[t>>16&15|64]+ei[t>>24&255]+"-"+ei[63&n|128]+ei[n>>8&255]+"-"+ei[n>>16&255]+ei[n>>24&255]+ei[255&r]+ei[r>>8&255]+ei[r>>16&255]+ei[r>>24&255]).toLowerCase()}function ai(e,t,n){return Math.max(t,Math.min(n,e))}function oi(e,t){return(e%t+t)%t}function si(e,t,n){return(1-n)*e+n*t}function li(e){return 0===(e&e-1)&&0!==e}function ui(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function ci(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function hi(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function di(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const fi={DEG2RAD:ni,RAD2DEG:ri,generateUUID:ii,clamp:ai,euclideanModulo:oi,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:si,damp:function(e,t,n,r){return si(e,t,1-Math.exp(-n*r))},pingpong:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t-Math.abs(oi(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(ti=e);let t=ti+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*ni},radToDeg:function(e){return e*ri},isPowerOfTwo:li,ceilPowerOfTwo:ui,floorPowerOfTwo:ci,setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,o=Math.sin,s=a(n/2),l=o(n/2),u=a((t+r)/2),c=o((t+r)/2),h=a((t-r)/2),d=o((t-r)/2),f=a((r-t)/2),p=o((r-t)/2);switch(i){case"XYX":e.set(s*c,l*h,l*d,s*u);break;case"YZY":e.set(l*d,s*c,l*h,s*u);break;case"ZXZ":e.set(l*h,l*d,s*c,s*u);break;case"XZX":e.set(s*c,l*p,l*f,s*u);break;case"YXY":e.set(l*f,s*c,l*p,s*u);break;case"ZYZ":e.set(l*p,l*f,s*c,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:di,denormalize:hi};class pi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;pi.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.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(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(ai(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class mi{constructor(e,t,n,r,i,a,o,s,l){mi.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,o,s,l)}set(e,t,n,r,i,a,o,s,l){const u=this.elements;return u[0]=e,u[1]=r,u[2]=o,u[3]=t,u[4]=i,u[5]=s,u[6]=n,u[7]=a,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],l=n[1],u=n[4],c=n[7],h=n[2],d=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],_=r[7],b=r[2],x=r[5],w=r[8];return i[0]=a*p+o*v+s*b,i[3]=a*m+o*y+s*x,i[6]=a*g+o*_+s*w,i[1]=l*p+u*v+c*b,i[4]=l*m+u*y+c*x,i[7]=l*g+u*_+c*w,i[2]=h*p+d*v+f*b,i[5]=h*m+d*y+f*x,i[8]=h*g+d*_+f*w,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8];return t*a*u-t*o*l-n*i*u+n*o*s+r*i*l-r*a*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=u*a-o*l,h=o*s-u*i,d=l*i-a*s,f=t*c+n*h+r*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);const p=1/f;return e[0]=c*p,e[1]=(r*l-u*n)*p,e[2]=(o*n-r*a)*p,e[3]=h*p,e[4]=(u*t-r*s)*p,e[5]=(r*i-o*t)*p,e[6]=d*p,e[7]=(n*s-l*t)*p,e[8]=(a*t-n*i)*p,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){const s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*a+l*o)+a+e,-r*l,r*s,-r*(-l*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(gi.makeScale(e,t)),this}rotate(e){return this.premultiply(gi.makeRotation(-e)),this}translate(e,t){return this.premultiply(gi.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const gi=new mi;function vi(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const yi={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function _i(e,t){return new yi[e](t)}function bi(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}const xi={};function wi(e){e in xi||(xi[e]=!0,console.warn(e))}function Si(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Ei(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const Mi=(new mi).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),Ai=(new mi).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);const Ti={[fr]:e=>e,[dr]:e=>e.convertSRGBToLinear(),[pr]:function(e){return e.convertSRGBToLinear().applyMatrix3(Ai)}},Ci={[fr]:e=>e,[dr]:e=>e.convertLinearToSRGB(),[pr]:function(e){return e.applyMatrix3(Mi).convertLinearToSRGB()}},Pi={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return fr},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const r=Ti[t],i=Ci[n];if(void 0===r||void 0===i)throw new Error(`Unsupported color space conversion, "${t}" to "${n}".`);return i(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}};let Ri;class ki{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"===typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Ri&&(Ri=bi("canvas")),Ri.width=e.width,Ri.height=e.height;const n=Ri.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Ri}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){const t=bi("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e 0&&void 0!==arguments[0]?arguments[0]:null;this.isSource=!0,Object.defineProperty(this,"id",{value:Li++}),this.uuid=ii(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t 0&&void 0!==arguments[0]?arguments[0]:Ii.DEFAULT_IMAGE,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ii.DEFAULT_MAPPING,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ut,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ut,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Gt,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Wt,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:an,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Xt,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:Ii.DEFAULT_ANISOTROPY,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:hr;super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Oi++}),this.uuid=ii(),this.name="",this.source=new Di(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=a,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=s,this.offset=new pi(0,0),this.repeat=new pi(1,1),this.center=new pi(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new mi,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,"string"===typeof u?this.colorSpace=u:(wi("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=u===or?dr:hr),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){void 0===e&&(e=null),this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Tt)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Dt:e.x=e.x-Math.floor(e.x);break;case Ut:e.x=e.x<0?0:1;break;case Ot:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Dt:e.y=e.y-Math.floor(e.y);break;case Ut:e.y=e.y<0?0:1;break;case Ot:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return wi("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===dr?or:ar}set encoding(e){wi("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===or?dr:hr}}Ii.DEFAULT_IMAGE=null,Ii.DEFAULT_MAPPING=Tt,Ii.DEFAULT_ANISOTROPY=1;class Ni{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;Ni.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const a=.01,o=.1,s=e.elements,l=s[0],u=s[4],c=s[8],h=s[1],d=s[5],f=s[9],p=s[2],m=s[6],g=s[10];if(Math.abs(u-h)s&&e>v?ev?s1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Fi extends Jr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Ni(0,0,e,t),this.scissorTest=!1,this.viewport=new Ni(0,0,e,t);const r={width:e,height:t,depth:1};void 0!==n.encoding&&(wi("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===or?dr:hr),this.texture=new Ii(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:Gt,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Di(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class zi extends Ii{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=It,this.minFilter=It,this.wrapR=Ut,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Bi extends Fi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new zi(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class Gi extends Ii{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=It,this.minFilter=It,this.wrapR=Ut,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Vi extends Fi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new Gi(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class Hi extends Fi{constructor(){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),this.isWebGLMultipleRenderTargets=!0;const t=this.texture;this.texture=[];for(let n=0;n 2&&void 0!==arguments[2]?arguments[2]:1;if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3];const h=i[a+0],d=i[a+1],f=i[a+2],p=i[a+3];if(0===o)return e[t+0]=s,e[t+1]=l,e[t+2]=u,void(e[t+3]=c);if(1===o)return e[t+0]=h,e[t+1]=d,e[t+2]=f,void(e[t+3]=p);if(c!==p||s!==h||l!==d||u!==f){let e=1-o;const t=s*h+l*d+u*f+c*p,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,o=Math.sin(o*a)/i}const i=o*n;if(s=s*e+h*i,l=l*e+d*i,u=u*e+f*i,c=c*e+p*i,e===1-o){const e=1/Math.sqrt(s*s+l*l+u*u+c*c);s*=e,l*=e,u*=e,c*=e}}e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=c}static multiplyQuaternionsFlat(e,t,n,r,i,a){const o=n[r],s=n[r+1],l=n[r+2],u=n[r+3],c=i[a],h=i[a+1],d=i[a+2],f=i[a+3];return e[t]=o*f+u*c+s*d-l*h,e[t+1]=s*f+u*h+l*c-o*d,e[t+2]=l*f+u*d+o*h-s*c,e[t+3]=u*f-o*c-s*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,l=o(n/2),u=o(r/2),c=o(i/2),h=s(n/2),d=s(r/2),f=s(i/2);switch(a){case"XYZ":this._x=h*u*c+l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c-h*d*f;break;case"YXZ":this._x=h*u*c+l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c+h*d*f;break;case"ZXY":this._x=h*u*c-l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c-h*d*f;break;case"ZYX":this._x=h*u*c-l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c+h*d*f;break;case"YZX":this._x=h*u*c+l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c-h*d*f;break;case"XZY":this._x=h*u*c-l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],l=t[2],u=t[6],c=t[10],h=n+o+c;if(h>0){const e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(u-s)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>o&&n>c){const e=2*Math.sqrt(1+n-o-c);this._w=(u-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(o>c){const e=2*Math.sqrt(1+o-n-c);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+u)/e}else{const e=2*Math.sqrt(1+c-n-o);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(s+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(ai(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),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(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._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 e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,l=t._z,u=t._w;return this._x=n*u+a*o+r*l-i*s,this._y=r*u+a*s+i*o-n*l,this._z=i*u+a*l+n*s-r*o,this._w=a*u-n*o-r*s-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,a=this._w;let o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;const s=1-o*o;if(s<=Number.EPSILON){const e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(s),u=Math.atan2(l,o),c=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=a*c+this._w*h,this._x=n*c+this._x*h,this._y=r*c+this._y*h,this._z=i*c+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class ji{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;ji.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(qi.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(qi.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*r-o*n,u=s*n+o*t-i*r,c=s*r+i*n-a*t,h=-i*t-a*n-o*r;return this.x=l*s+h*-i+u*-o-c*-a,this.y=u*s+h*-a+c*-i-l*-o,this.z=c*s+h*-o+l*-a-u*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.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(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Xi.copy(this).projectOnVector(e),this.sub(Xi)}reflect(e){return this.sub(Xi.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(ai(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Xi=new ji,qi=new Wi;class Yi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ji(1/0,1/0,1/0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ji(-1/0,-1/0,-1/0);this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t 1&&void 0!==arguments[1]&&arguments[1];return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x 1&&void 0!==arguments[1]&&arguments[1];if(e.updateWorldMatrix(!1,!1),void 0!==e.boundingBox)null===e.boundingBox&&e.computeBoundingBox(),Ki.copy(e.boundingBox),Ki.applyMatrix4(e.matrixWorld),this.union(Ki);else{const n=e.geometry;if(void 0!==n)if(t&&void 0!==n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,r=t.count;n this.max.x||e.y this.max.y||e.z this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x this.max.x||e.max.y this.max.y||e.max.z this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Zi),Zi.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ia),aa.subVectors(this.max,ia),Qi.subVectors(e.a,ia),Ji.subVectors(e.b,ia),ea.subVectors(e.c,ia),ta.subVectors(Ji,Qi),na.subVectors(ea,Ji),ra.subVectors(Qi,ea);let t=[0,-ta.z,ta.y,0,-na.z,na.y,0,-ra.z,ra.y,ta.z,0,-ta.x,na.z,0,-na.x,ra.z,0,-ra.x,-ta.y,ta.x,0,-na.y,na.x,0,-ra.y,ra.x,0];return!!la(t,Qi,Ji,ea,aa)&&(t=[1,0,0,0,1,0,0,0,1],!!la(t,Qi,Ji,ea,aa)&&(oa.crossVectors(ta,na),t=[oa.x,oa.y,oa.z],la(t,Qi,Ji,ea,aa)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Zi).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(Zi).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||($i[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),$i[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),$i[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),$i[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),$i[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),$i[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),$i[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),$i[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints($i)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const $i=[new ji,new ji,new ji,new ji,new ji,new ji,new ji,new ji],Zi=new ji,Ki=new Yi,Qi=new ji,Ji=new ji,ea=new ji,ta=new ji,na=new ji,ra=new ji,ia=new ji,aa=new ji,oa=new ji,sa=new ji;function la(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){sa.fromArray(e,a);const o=i.x*Math.abs(sa.x)+i.y*Math.abs(sa.y)+i.z*Math.abs(sa.z),s=t.dot(sa),l=n.dot(sa),u=r.dot(sa);if(Math.max(-Math.max(s,l,u),Math.min(s,l,u))>o)return!1}return!0}const ua=new Yi,ca=new ji,ha=new ji;class da{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ji,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):ua.setFromPoints(e).getCenter(n);let r=0;for(let i=0,a=e.length;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;ca.subVectors(e,this.center);const t=ca.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(ca,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(ha.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ca.copy(e.center).add(ha)),this.expandByPoint(ca.copy(e.center).sub(ha))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const fa=new ji,pa=new ji,ma=new ji,ga=new ji,va=new ji,ya=new ji,_a=new ji;class ba{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ji,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ji(0,0,-1);this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,fa)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=fa.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(fa.copy(this.origin).addScaledVector(this.direction,t),fa.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){pa.copy(e).add(t).multiplyScalar(.5),ma.copy(t).sub(e).normalize(),ga.copy(this.origin).sub(pa);const i=.5*e.distanceTo(t),a=-this.direction.dot(ma),o=ga.dot(this.direction),s=-ga.dot(ma),l=ga.lengthSq(),u=Math.abs(1-a*a);let c,h,d,f;if(u>0)if(c=a*s-o,h=a*o-s,f=i*u,c>=0)if(h>=-f)if(h<=f){const e=1/u;c*=e,h*=e,d=c*(c+a*h+2*o)+h*(a*c+h+2*s)+l}else h=i,c=Math.max(0,-(a*h+o)),d=-c*c+h*(h+2*s)+l;else h=-i,c=Math.max(0,-(a*h+o)),d=-c*c+h*(h+2*s)+l;else h<=-f?(c=Math.max(0,-(-a*i+o)),h=c>0?-i:Math.min(Math.max(-i,-s),i),d=-c*c+h*(h+2*s)+l):h<=f?(c=0,h=Math.min(Math.max(-i,-s),i),d=h*(h+2*s)+l):(c=Math.max(0,-(a*i+o)),h=c>0?i:Math.min(Math.max(-i,-s),i),d=-c*c+h*(h+2*s)+l);else h=a>0?-i:i,c=Math.max(0,-(a*h+o)),d=-c*c+h*(h+2*s)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,c),r&&r.copy(pa).addScaledVector(ma,h),d}intersectSphere(e,t){fa.subVectors(e.center,this.origin);const n=fa.dot(this.direction),r=fa.dot(fa)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s;const l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),u>=0?(i=(e.min.y-h.y)*u,a=(e.max.y-h.y)*u):(i=(e.max.y-h.y)*u,a=(e.min.y-h.y)*u),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a =0?(o=(e.min.z-h.z)*c,s=(e.max.z-h.z)*c):(o=(e.max.z-h.z)*c,s=(e.min.z-h.z)*c),n>s||o>r?null:((o>n||n!==n)&&(n=o),(s =0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,fa)}intersectTriangle(e,t,n,r,i){va.subVectors(t,e),ya.subVectors(n,e),_a.crossVectors(va,ya);let a,o=this.direction.dot(_a);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}ga.subVectors(this.origin,e);const s=a*this.direction.dot(ya.crossVectors(ga,ya));if(s<0)return null;const l=a*this.direction.dot(va.cross(ga));if(l<0)return null;if(s+l>o)return null;const u=-a*ga.dot(_a);return u<0?null:this.at(u/o,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class xa{constructor(e,t,n,r,i,a,o,s,l,u,c,h,d,f,p,m){xa.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,o,s,l,u,c,h,d,f,p,m)}set(e,t,n,r,i,a,o,s,l,u,c,h,d,f,p,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=o,g[13]=s,g[2]=l,g[6]=u,g[10]=c,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new xa).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/wa.setFromMatrixColumn(e,0).length(),i=1/wa.setFromMatrixColumn(e,1).length(),a=1/wa.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){const e=a*u,n=a*c,r=o*u,i=o*c;t[0]=s*u,t[4]=-s*c,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-o*s,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*s}else if("YXZ"===e.order){const e=s*u,n=s*c,r=l*u,i=l*c;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if("ZXY"===e.order){const e=s*u,n=s*c,r=l*u,i=l*c;t[0]=e-i*o,t[4]=-a*c,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*u,t[9]=i-e*o,t[2]=-a*l,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){const e=a*u,n=a*c,r=o*u,i=o*c;t[0]=s*u,t[4]=r*l-n,t[8]=e*l+i,t[1]=s*c,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){const e=a*s,n=a*l,r=o*s,i=o*l;t[0]=s*u,t[4]=i-e*c,t[8]=r*c+n,t[1]=c,t[5]=a*u,t[9]=-o*u,t[2]=-l*u,t[6]=n*c+r,t[10]=e-i*c}else if("XZY"===e.order){const e=a*s,n=a*l,r=o*s,i=o*l;t[0]=s*u,t[4]=-c,t[8]=l*u,t[1]=e*c+i,t[5]=a*u,t[9]=n*c-r,t[2]=r*c-n,t[6]=o*u,t[10]=i*c+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Ea,e,Ma)}lookAt(e,t,n){const r=this.elements;return Ca.subVectors(e,t),0===Ca.lengthSq()&&(Ca.z=1),Ca.normalize(),Aa.crossVectors(n,Ca),0===Aa.lengthSq()&&(1===Math.abs(n.z)?Ca.x+=1e-4:Ca.z+=1e-4,Ca.normalize(),Aa.crossVectors(n,Ca)),Aa.normalize(),Ta.crossVectors(Ca,Aa),r[0]=Aa.x,r[4]=Ta.x,r[8]=Ca.x,r[1]=Aa.y,r[5]=Ta.y,r[9]=Ca.y,r[2]=Aa.z,r[6]=Ta.z,r[10]=Ca.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],l=n[12],u=n[1],c=n[5],h=n[9],d=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],b=n[15],x=r[0],w=r[4],S=r[8],E=r[12],M=r[1],A=r[5],T=r[9],C=r[13],P=r[2],R=r[6],k=r[10],L=r[14],D=r[3],U=r[7],O=r[11],I=r[15];return i[0]=a*x+o*M+s*P+l*D,i[4]=a*w+o*A+s*R+l*U,i[8]=a*S+o*T+s*k+l*O,i[12]=a*E+o*C+s*L+l*I,i[1]=u*x+c*M+h*P+d*D,i[5]=u*w+c*A+h*R+d*U,i[9]=u*S+c*T+h*k+d*O,i[13]=u*E+c*C+h*L+d*I,i[2]=f*x+p*M+m*P+g*D,i[6]=f*w+p*A+m*R+g*U,i[10]=f*S+p*T+m*k+g*O,i[14]=f*E+p*C+m*L+g*I,i[3]=v*x+y*M+_*P+b*D,i[7]=v*w+y*A+_*R+b*U,i[11]=v*S+y*T+_*k+b*O,i[15]=v*E+y*C+_*L+b*I,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],l=e[13],u=e[2],c=e[6],h=e[10],d=e[14];return e[3]*(+i*s*c-r*l*c-i*o*h+n*l*h+r*o*d-n*s*d)+e[7]*(+t*s*d-t*l*h+i*a*h-r*a*d+r*l*u-i*s*u)+e[11]*(+t*l*c-t*o*d-i*a*c+n*a*d+i*o*u-n*l*u)+e[15]*(-r*o*u-t*s*c+t*o*h+r*a*c-n*a*h+n*s*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=c*m*l-p*h*l+p*s*d-o*m*d-c*s*g+o*h*g,y=f*h*l-u*m*l-f*s*d+a*m*d+u*s*g-a*h*g,_=u*p*l-f*c*l+f*o*d-a*p*d-u*o*g+a*c*g,b=f*c*s-u*p*s-f*o*h+a*p*h+u*o*m-a*c*m,x=t*v+n*y+r*_+i*b;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/x;return e[0]=v*w,e[1]=(p*h*i-c*m*i-p*r*d+n*m*d+c*r*g-n*h*g)*w,e[2]=(o*m*i-p*s*i+p*r*l-n*m*l-o*r*g+n*s*g)*w,e[3]=(c*s*i-o*h*i-c*r*l+n*h*l+o*r*d-n*s*d)*w,e[4]=y*w,e[5]=(u*m*i-f*h*i+f*r*d-t*m*d-u*r*g+t*h*g)*w,e[6]=(f*s*i-a*m*i-f*r*l+t*m*l+a*r*g-t*s*g)*w,e[7]=(a*h*i-u*s*i+u*r*l-t*h*l-a*r*d+t*s*d)*w,e[8]=_*w,e[9]=(f*c*i-u*p*i-f*n*d+t*p*d+u*n*g-t*c*g)*w,e[10]=(a*p*i-f*o*i+f*n*l-t*p*l-a*n*g+t*o*g)*w,e[11]=(u*o*i-a*c*i-u*n*l+t*c*l+a*n*d-t*o*d)*w,e[12]=b*w,e[13]=(u*p*r-f*c*r+f*n*h-t*p*h-u*n*m+t*c*m)*w,e[14]=(f*o*r-a*p*r-f*n*s+t*p*s+a*n*m-t*o*m)*w,e[15]=(a*c*r-u*o*r+u*n*s-t*c*s-a*n*h+t*o*h)*w,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,l=i*a,u=i*o;return this.set(l*a+n,l*o-r*s,l*s+r*o,0,l*o+r*s,u*o+n,u*s-r*a,0,l*s-r*o,u*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,l=i+i,u=a+a,c=o+o,h=i*l,d=i*u,f=i*c,p=a*u,m=a*c,g=o*c,v=s*l,y=s*u,_=s*c,b=n.x,x=n.y,w=n.z;return r[0]=(1-(p+g))*b,r[1]=(d+_)*b,r[2]=(f-y)*b,r[3]=0,r[4]=(d-_)*x,r[5]=(1-(h+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*w,r[9]=(m-v)*w,r[10]=(1-(h+p))*w,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=wa.set(r[0],r[1],r[2]).length();const a=wa.set(r[4],r[5],r[6]).length(),o=wa.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Sa.copy(this);const s=1/i,l=1/a,u=1/o;return Sa.elements[0]*=s,Sa.elements[1]*=s,Sa.elements[2]*=s,Sa.elements[4]*=l,Sa.elements[5]*=l,Sa.elements[6]*=l,Sa.elements[8]*=u,Sa.elements[9]*=u,Sa.elements[10]*=u,t.setFromRotationMatrix(Sa),n.x=i,n.y=a,n.z=o,this}makePerspective(e,t,n,r,i,a){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Kr;const s=this.elements,l=2*i/(t-e),u=2*i/(n-r),c=(t+e)/(t-e),h=(n+r)/(n-r);let d,f;if(o===Kr)d=-(a+i)/(a-i),f=-2*a*i/(a-i);else{if(o!==Qr)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);d=-a/(a-i),f=-a*i/(a-i)}return s[0]=l,s[4]=0,s[8]=c,s[12]=0,s[1]=0,s[5]=u,s[9]=h,s[13]=0,s[2]=0,s[6]=0,s[10]=d,s[14]=f,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,r,i,a){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Kr;const s=this.elements,l=1/(t-e),u=1/(n-r),c=1/(a-i),h=(t+e)*l,d=(n+r)*u;let f,p;if(o===Kr)f=(a+i)*c,p=-2*c;else{if(o!==Qr)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);f=i*c,p=-1*c}return s[0]=2*l,s[4]=0,s[8]=0,s[12]=-h,s[1]=0,s[5]=2*u,s[9]=0,s[13]=-d,s[2]=0,s[6]=0,s[10]=p,s[14]=-f,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const wa=new ji,Sa=new xa,Ea=new ji(0,0,0),Ma=new ji(1,1,1),Aa=new ji,Ta=new ji,Ca=new ji,Pa=new xa,Ra=new Wi;class ka{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ka.DEFAULT_ORDER;this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._order;return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],l=r[5],u=r[9],c=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(ai(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-ai(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(ai(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-ai(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(ai(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(o,d));break;case"XZY":this._z=Math.asin(-ai(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Pa.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Pa,t,n)}setFromVector3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._order;return this.set(e.x,e.y,e.z,t)}reorder(e){return Ra.setFromEuler(this),this.setFromQuaternion(Ra,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ka.DEFAULT_ORDER="XYZ";class La{constructor(){this.mask=1}set(e){this.mask=1< >>0}enable(e){this.mask|=1< 1){for(let e=0;e 1){for(let e=0;e 0&&(n=n.concat(i))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Fa,e,za),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Fa,Ba,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n 0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t 0){r.children=[];for(let t=0;t 0){r.animations=[];for(let t=0;t 0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),l.length>0&&(n.skeletons=l),u.length>0&&(n.animations=u),c.length>0&&(n.nodes=c)}return n.object=r,n;function a(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let n=0;n 0&&void 0!==arguments[0]?arguments[0]:new ji,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ji,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new ji;this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),qa.subVectors(e,t),r.cross(qa);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){qa.subVectors(r,t),Ya.subVectors(n,t),$a.subVectors(e,t);const a=qa.dot(qa),o=qa.dot(Ya),s=qa.dot($a),l=Ya.dot(Ya),u=Ya.dot($a),c=a*l-o*o;if(0===c)return i.set(-2,-1,-1);const h=1/c,d=(l*s-o*u)*h,f=(a*u-o*s)*h;return i.set(1-d-f,f,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Za),Za.x>=0&&Za.y>=0&&Za.x+Za.y<=1}static getUV(e,t,n,r,i,a,o,s){return!1===ro&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ro=!0),this.getInterpolation(e,t,n,r,i,a,o,s)}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,Za),s.setScalar(0),s.addScaledVector(i,Za.x),s.addScaledVector(a,Za.y),s.addScaledVector(o,Za.z),s}static isFrontFacing(e,t,n,r){return qa.subVectors(n,t),Ya.subVectors(e,t),qa.cross(Ya).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return qa.subVectors(this.c,this.b),Ya.subVectors(this.a,this.b),.5*qa.cross(Ya).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return io.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return io.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return!1===ro&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ro=!0),io.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}getInterpolation(e,t,n,r,i){return io.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return io.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return io.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let a,o;Ka.subVectors(r,n),Qa.subVectors(i,n),eo.subVectors(e,n);const s=Ka.dot(eo),l=Qa.dot(eo);if(s<=0&&l<=0)return t.copy(n);to.subVectors(e,r);const u=Ka.dot(to),c=Qa.dot(to);if(u>=0&&c<=u)return t.copy(r);const h=s*c-u*l;if(h<=0&&s>=0&&u<=0)return a=s/(s-u),t.copy(n).addScaledVector(Ka,a);no.subVectors(e,i);const d=Ka.dot(no),f=Qa.dot(no);if(f>=0&&d<=f)return t.copy(i);const p=d*l-s*f;if(p<=0&&l>=0&&f<=0)return o=l/(l-f),t.copy(n).addScaledVector(Qa,o);const m=u*f-d*c;if(m<=0&&c-u>=0&&d-f>=0)return Ja.subVectors(i,r),o=(c-u)/(c-u+(d-f)),t.copy(r).addScaledVector(Ja,o);const g=1/(m+p+h);return a=p*g,o=h*g,t.copy(n).addScaledVector(Ka,a).addScaledVector(Qa,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let ao=0;class oo extends Jr{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ao++}),this.uuid=ii(),this.name="",this.type="Material",this.blending=He,this.side=Fe,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=rt,this.blendDst=it,this.blendEquation=Ye,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=ft,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Rr,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=gr,this.stencilZFail=gr,this.stencilZPass=gr,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!==e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==He&&(n.blending=this.blending),this.side!==Fe&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=this.alphaHash),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(n.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}const so={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},lo={h:0,s:0,l:0},uo={h:0,s:0,l:0};function co(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class ho{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"===typeof t?this.setHex(t):"string"===typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr;return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Pi.toWorkingColorSpace(this,t),this}setRGB(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Pi.workingColorSpace;return this.r=e,this.g=t,this.b=n,Pi.toWorkingColorSpace(this,r),this}setHSL(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Pi.workingColorSpace;if(e=oi(e,1),t=ai(t,0,1),n=ai(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=co(i,r,e+1/3),this.g=co(i,r,e),this.b=co(i,r,e-1/3)}return Pi.toWorkingColorSpace(this,r),this}setStyle(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr;function r(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}if(t=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const a=t[1],o=t[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,n);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,n);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return r(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(t=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=t[1],i=r.length;if(3===i)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(6===i)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dr;const n=so[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Si(e.r),this.g=Si(e.g),this.b=Si(e.b),this}copyLinearToSRGB(e){return this.r=Ei(e.r),this.g=Ei(e.g),this.b=Ei(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dr;return Pi.fromWorkingColorSpace(fo.copy(this),e),65536*Math.round(ai(255*fo.r,0,255))+256*Math.round(ai(255*fo.g,0,255))+Math.round(ai(255*fo.b,0,255))}getHexString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dr;return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pi.workingColorSpace;Pi.fromWorkingColorSpace(fo.copy(this),t);const n=fo.r,r=fo.g,i=fo.b,a=Math.max(n,r,i),o=Math.min(n,r,i);let s,l;const u=(o+a)/2;if(o===a)s=0,l=0;else{const e=a-o;switch(l=u<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r1&&void 0!==arguments[1]?arguments[1]:Pi.workingColorSpace;return Pi.fromWorkingColorSpace(fo.copy(this),t),e.r=fo.r,e.g=fo.g,e.b=fo.b,e}getStyle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dr;Pi.fromWorkingColorSpace(fo.copy(this),e);const t=fo.r,n=fo.g,r=fo.b;return e!==dr?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*r)})`}offsetHSL(e,t,n){return this.getHSL(lo),lo.h+=e,lo.s+=t,lo.l+=n,this.setHSL(lo.h,lo.s,lo.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(lo),e.getHSL(uo);const n=si(lo.h,uo.h,t),r=si(lo.s,uo.s,t),i=si(lo.l,uo.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const fo=new ho;ho.NAMES=so;class po extends oo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ho(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=yt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const mo=go();function go(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const e=l-127;e<-27?(r[l]=0,r[256|l]=32768,i[l]=24,i[256|l]=24):e<-14?(r[l]=1024>>-e-14,r[256|l]=1024>>-e-14|32768,i[l]=-e-1,i[256|l]=-e-1):e<=15?(r[l]=e+15<<10,r[256|l]=e+15<<10|32768,i[l]=13,i[256|l]=13):e<128?(r[l]=31744,r[256|l]=64512,i[l]=24,i[256|l]=24):(r[l]=31744,r[256|l]=64512,i[l]=13,i[256|l]=13)}const a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let l=1;l<1024;++l){let e=l<<13,t=0;for(;0===(8388608&e);)e<<=1,t-=8388608;e&=-8388609,t+=947912704,a[l]=e|t}for(let l=1024;l<2048;++l)a[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)32!==l&&(s[l]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}function vo(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=ai(e,-65504,65504),mo.floatView[0]=e;const t=mo.uint32View[0],n=t>>23&511;return mo.baseTable[n]+((8388607&t)>>mo.shiftTable[n])}function yo(e){const t=e>>10;return mo.uint32View[0]=mo.mantissaTable[mo.offsetTable[t]+(1023&e)]+mo.exponentTable[t],mo.floatView[0]}const _o={toHalfFloat:vo,fromHalfFloat:yo},bo=new ji,xo=new pi;class wo{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=zr,this.updateRange={offset:0,count:-1},this.gpuType=Qt,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r1&&void 0!==arguments[1]?arguments[1]:0;return this.array.set(e,t),this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=hi(t,this.array)),t}setX(e,t){return this.normalized&&(t=di(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=hi(t,this.array)),t}setY(e,t){return this.normalized&&(t=di(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=hi(t,this.array)),t}setZ(e,t){return this.normalized&&(t=di(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=hi(t,this.array)),t}setW(e,t){return this.normalized&&(t=di(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=di(t,this.array),n=di(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=di(t,this.array),n=di(n,this.array),r=di(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=di(t,this.array),n=di(n,this.array),r=di(r,this.array),i=di(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==zr&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}class So extends wo{constructor(e,t,n){super(new Int8Array(e),t,n)}}class Eo extends wo{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class Mo extends wo{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Ao extends wo{constructor(e,t,n){super(new Int16Array(e),t,n)}}class To extends wo{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Co extends wo{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Po extends wo{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Ro extends wo{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=yo(this.array[e*this.itemSize]);return this.normalized&&(t=hi(t,this.array)),t}setX(e,t){return this.normalized&&(t=di(t,this.array)),this.array[e*this.itemSize]=vo(t),this}getY(e){let t=yo(this.array[e*this.itemSize+1]);return this.normalized&&(t=hi(t,this.array)),t}setY(e,t){return this.normalized&&(t=di(t,this.array)),this.array[e*this.itemSize+1]=vo(t),this}getZ(e){let t=yo(this.array[e*this.itemSize+2]);return this.normalized&&(t=hi(t,this.array)),t}setZ(e,t){return this.normalized&&(t=di(t,this.array)),this.array[e*this.itemSize+2]=vo(t),this}getW(e){let t=yo(this.array[e*this.itemSize+3]);return this.normalized&&(t=hi(t,this.array)),t}setW(e,t){return this.normalized&&(t=di(t,this.array)),this.array[e*this.itemSize+3]=vo(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=di(t,this.array),n=di(n,this.array)),this.array[e+0]=vo(t),this.array[e+1]=vo(n),this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=di(t,this.array),n=di(n,this.array),r=di(r,this.array)),this.array[e+0]=vo(t),this.array[e+1]=vo(n),this.array[e+2]=vo(r),this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=di(t,this.array),n=di(n,this.array),r=di(r,this.array),i=di(i,this.array)),this.array[e+0]=vo(t),this.array[e+1]=vo(n),this.array[e+2]=vo(r),this.array[e+3]=vo(i),this}}class ko extends wo{constructor(e,t,n){super(new Float32Array(e),t,n)}}class Lo extends wo{constructor(e,t,n){super(new Float64Array(e),t,n)}}let Do=0;const Uo=new xa,Oo=new Xa,Io=new ji,No=new Yi,Fo=new Yi,zo=new ji;class Bo extends Jr{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Do++}),this.uuid=ii(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(vi(e)?Po:To)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new mi).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Uo.makeRotationFromQuaternion(e),this.applyMatrix4(Uo),this}rotateX(e){return Uo.makeRotationX(e),this.applyMatrix4(Uo),this}rotateY(e){return Uo.makeRotationY(e),this.applyMatrix4(Uo),this}rotateZ(e){return Uo.makeRotationZ(e),this.applyMatrix4(Uo),this}translate(e,t,n){return Uo.makeTranslation(e,t,n),this.applyMatrix4(Uo),this}scale(e,t,n){return Uo.makeScale(e,t,n),this.applyMatrix4(Uo),this}lookAt(e){return Oo.lookAt(e),Oo.updateMatrix(),this.applyMatrix4(Oo.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Io).negate(),this.translate(Io.x,Io.y,Io.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n 0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const s in n){const t=n[s];e.data.attributes[s]=t.toJSON(e.data)}const r={};let i=!1;for(const s in this.morphAttributes){const t=this.morphAttributes[s],n=[];for(let r=0,i=t.length;r0&&(r[s]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:new Bo,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new po;super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e (e.far-e.near)**2)return}Go.copy(i).invert(),Vo.copy(e.ray).applyMatrix4(Go),null!==n.boundingBox&&!1===Vo.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,Vo)}}_computeIntersections(e,t,n){let r;const i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,l=i.attributes.uv,u=i.attributes.uv1,c=i.attributes.normal,h=i.groups,d=i.drawRange;if(null!==o)if(Array.isArray(a))for(let f=0,p=h.length;f n.far?null:{distance:u,point:rs.clone(),object:e}}(e,t,n,r,jo,Xo,qo,ns);if(c){i&&(Zo.fromBufferAttribute(i,s),Ko.fromBufferAttribute(i,l),Qo.fromBufferAttribute(i,u),c.uv=io.getInterpolation(ns,jo,Xo,qo,Zo,Ko,Qo,new pi)),a&&(Zo.fromBufferAttribute(a,s),Ko.fromBufferAttribute(a,l),Qo.fromBufferAttribute(a,u),c.uv1=io.getInterpolation(ns,jo,Xo,qo,Zo,Ko,Qo,new pi),c.uv2=c.uv1),o&&(Jo.fromBufferAttribute(o,s),es.fromBufferAttribute(o,l),ts.fromBufferAttribute(o,u),c.normal=io.getInterpolation(ns,jo,Xo,qo,Jo,es,ts,new ji),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const e={a:s,b:l,c:u,normal:new ji,materialIndex:0};io.getNormal(jo,Xo,qo,e.normal),c.face=e}return c}class os extends Bo{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const s=[],l=[],u=[],c=[];let h=0,d=0;function f(e,t,n,r,i,a,f,p,m,g,v){const y=a/m,_=f/g,b=a/2,x=f/2,w=p/2,S=m+1,E=g+1;let M=0,A=0;const T=new ji;for(let o=0;o
0?1:-1,u.push(T.x,T.y,T.z),c.push(s/m),c.push(1-o/g),M+=1}}for(let o=0;o 0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class ds extends Xa{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new xa,this.projectionMatrix=new xa,this.projectionMatrixInverse=new xa,this.coordinateSystem=Kr}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class fs extends ds{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2e3;super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*ri*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*ni*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*ri*Math.atan(Math.tan(.5*ni*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*ni*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}const o=this.filmOffset;0!==o&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const ps=-90;class ms extends Xa{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null;const r=new fs(ps,1,e,t);r.layers=this.layers,this.add(r);const i=new fs(ps,1,e,t);i.layers=this.layers,this.add(i);const a=new fs(ps,1,e,t);a.layers=this.layers,this.add(a);const o=new fs(ps,1,e,t);o.layers=this.layers,this.add(o);const s=new fs(ps,1,e,t);s.layers=this.layers,this.add(s);const l=new fs(ps,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(const l of t)this.remove(l);if(e===Kr)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else{if(e!==Qr)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1)}for(const l of t)this.add(l),l.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,i,a,o,s,l]=this.children,u=e.getRenderTarget(),c=e.toneMapping,h=e.xr.enabled;e.toneMapping=xt,e.xr.enabled=!1;const d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,a),e.setRenderTarget(n,3),e.render(t,o),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=d,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.toneMapping=c,e.xr.enabled=h,n.texture.needsPMREMUpdate=!0}}class gs extends Ii{constructor(e,t,n,r,i,a,o,s,l,u){super(e=void 0!==e?e:[],t=void 0!==t?t:Ct,n,r,i,a,o,s,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class vs extends Fi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];void 0!==t.encoding&&(wi("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===or?dr:hr),this.texture=new gs(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Gt}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new os(5,5,5),i=new hs({name:"CubemapFromEquirect",uniforms:ss(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:ze,blending:Ve});i.uniforms.tEquirect.value=t;const a=new is(r,i),o=t.minFilter;t.minFilter===Wt&&(t.minFilter=Gt);return new ms(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,r);e.setRenderTarget(i)}}const ys=new ji,_s=new ji,bs=new mi;class xs{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ji(1,0,0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=ys.subVectors(n,t).cross(_s.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(ys),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||bs.getNormalMatrix(e),r=this.coplanarPoint(ys).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const ws=new da,Ss=new ji;class Es{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new xs,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new xs,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new xs,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new xs,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new xs,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:new xs;this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Kr;const n=this.planes,r=e.elements,i=r[0],a=r[1],o=r[2],s=r[3],l=r[4],u=r[5],c=r[6],h=r[7],d=r[8],f=r[9],p=r[10],m=r[11],g=r[12],v=r[13],y=r[14],_=r[15];if(n[0].setComponents(s-i,h-l,m-d,_-g).normalize(),n[1].setComponents(s+i,h+l,m+d,_+g).normalize(),n[2].setComponents(s+a,h+u,m+f,_+v).normalize(),n[3].setComponents(s-a,h-u,m-f,_-v).normalize(),n[4].setComponents(s-o,h-c,m-p,_-y).normalize(),t===Kr)n[5].setComponents(s+o,h+c,m+p,_+y).normalize();else{if(t!==Qr)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);n[5].setComponents(o,c,p,y).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),ws.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),ws.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(ws)}intersectsSprite(e){return ws.center.set(0,0,0),ws.radius=.7071067811865476,ws.applyMatrix4(e.matrixWorld),this.intersectsSphere(ws)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n) 0?e.max.x:e.min.x,Ss.y=r.normal.y>0?e.max.y:e.min.y,Ss.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Ss)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Ms(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function As(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version 0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,a=t/2,o=Math.floor(n),s=Math.floor(r),l=o+1,u=s+1,c=e/o,h=t/s,d=[],f=[],p=[],m=[];for(let g=0;g 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometry.viewDir, geometry.normal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, vMapUv );\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include