From 4d8d339d53065dcc8d7cf762002640a687d55469 Mon Sep 17 00:00:00 2001 From: Daan Vanden Bosch Date: Sat, 13 Jul 2019 21:54:51 +0200 Subject: [PATCH] Release 14. --- CNAME | Bin 46 -> 21 bytes asset-manifest.json | 10 +++++----- index.html | 2 +- npcs/{SaintMillion.nj => SaintMilion.nj} | Bin npcs/{SaintMillion.xvm => SaintMilion.xvm} | Bin ...e-manifest.a4851f9db561df7be3534ab6dd2622e4.js | 14 +++++++------- service-worker.js | 2 +- .../{2.cc615272.chunk.js => 2.5fe280a5.chunk.js} | 4 ++-- ...15272.chunk.js.map => 2.5fe280a5.chunk.js.map} | 2 +- ...n.843aa861.chunk.js => main.840f3b07.chunk.js} | 4 ++-- static/js/main.840f3b07.chunk.js.map | 1 + static/js/main.843aa861.chunk.js.map | 1 - 12 files changed, 20 insertions(+), 20 deletions(-) rename npcs/{SaintMillion.nj => SaintMilion.nj} (100%) rename npcs/{SaintMillion.xvm => SaintMilion.xvm} (100%) rename precache-manifest.3ac71fe6c1824ea93c81198628f7fe51.js => precache-manifest.a4851f9db561df7be3534ab6dd2622e4.js (52%) rename static/js/{2.cc615272.chunk.js => 2.5fe280a5.chunk.js} (74%) rename static/js/{2.cc615272.chunk.js.map => 2.5fe280a5.chunk.js.map} (51%) rename static/js/{main.843aa861.chunk.js => main.840f3b07.chunk.js} (62%) create mode 100644 static/js/main.840f3b07.chunk.js.map delete mode 100644 static/js/main.843aa861.chunk.js.map diff --git a/CNAME b/CNAME index c482f040afdce245fcc8409e1f9999b1232047cf..046e5f7875bda87ba1dedc1704013707d6cf1e5b 100644 GIT binary patch literal 21 ccmXRfFV`!`NX#oqEY3~L(JRj{%1Pk@09{!K9RL6T literal 46 tcmezWubcq{^%x2mG8hsW@)$~hWHCc7kjw#!mNVot6aiT&47?0n3;-pS3MT*n diff --git a/asset-manifest.json b/asset-manifest.json index 1de810fb..cadb654b 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/static/css/main.e2763c37.chunk.css", - "main.js": "/static/js/main.843aa861.chunk.js", - "main.js.map": "/static/js/main.843aa861.chunk.js.map", + "main.js": "/static/js/main.840f3b07.chunk.js", + "main.js.map": "/static/js/main.840f3b07.chunk.js.map", "runtime~main.js": "/static/js/runtime~main.a8a9905a.js", "runtime~main.js.map": "/static/js/runtime~main.a8a9905a.js.map", "static/css/2.ebfed7b9.chunk.css": "/static/css/2.ebfed7b9.chunk.css", - "static/js/2.cc615272.chunk.js": "/static/js/2.cc615272.chunk.js", - "static/js/2.cc615272.chunk.js.map": "/static/js/2.cc615272.chunk.js.map", + "static/js/2.5fe280a5.chunk.js": "/static/js/2.5fe280a5.chunk.js", + "static/js/2.5fe280a5.chunk.js.map": "/static/js/2.5fe280a5.chunk.js.map", "index.html": "/index.html", - "precache-manifest.3ac71fe6c1824ea93c81198628f7fe51.js": "/precache-manifest.3ac71fe6c1824ea93c81198628f7fe51.js", + "precache-manifest.a4851f9db561df7be3534ab6dd2622e4.js": "/precache-manifest.a4851f9db561df7be3534ab6dd2622e4.js", "service-worker.js": "/service-worker.js", "static/css/2.ebfed7b9.chunk.css.map": "/static/css/2.ebfed7b9.chunk.css.map", "static/css/main.e2763c37.chunk.css.map": "/static/css/main.e2763c37.chunk.css.map" diff --git a/index.html b/index.html index d0dded4a..0b302448 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/npcs/SaintMillion.nj b/npcs/SaintMilion.nj similarity index 100% rename from npcs/SaintMillion.nj rename to npcs/SaintMilion.nj diff --git a/npcs/SaintMillion.xvm b/npcs/SaintMilion.xvm similarity index 100% rename from npcs/SaintMillion.xvm rename to npcs/SaintMilion.xvm diff --git a/precache-manifest.3ac71fe6c1824ea93c81198628f7fe51.js b/precache-manifest.a4851f9db561df7be3534ab6dd2622e4.js similarity index 52% rename from precache-manifest.3ac71fe6c1824ea93c81198628f7fe51.js rename to precache-manifest.a4851f9db561df7be3534ab6dd2622e4.js index 79034e92..2960f66b 100644 --- a/precache-manifest.3ac71fe6c1824ea93c81198628f7fe51.js +++ b/precache-manifest.a4851f9db561df7be3534ab6dd2622e4.js @@ -1,23 +1,23 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "3f396dcc8772652c68af7a90453a9ec8", + "revision": "35bda28032eb26f14e3f545636523f07", "url": "/index.html" }, { - "revision": "3e5f3febef94f99a5f35", + "revision": "481aefd0c61c3c24112e", "url": "/static/css/2.ebfed7b9.chunk.css" }, { - "revision": "d43435938374283e45f4", + "revision": "1225e91ad6a165f475fd", "url": "/static/css/main.e2763c37.chunk.css" }, { - "revision": "3e5f3febef94f99a5f35", - "url": "/static/js/2.cc615272.chunk.js" + "revision": "481aefd0c61c3c24112e", + "url": "/static/js/2.5fe280a5.chunk.js" }, { - "revision": "d43435938374283e45f4", - "url": "/static/js/main.843aa861.chunk.js" + "revision": "1225e91ad6a165f475fd", + "url": "/static/js/main.840f3b07.chunk.js" }, { "revision": "42ac5946195a7306e2a5", diff --git a/service-worker.js b/service-worker.js index ae765d4e..ced45e7c 100644 --- a/service-worker.js +++ b/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/precache-manifest.3ac71fe6c1824ea93c81198628f7fe51.js" + "/precache-manifest.a4851f9db561df7be3534ab6dd2622e4.js" ); self.addEventListener('message', (event) => { diff --git a/static/js/2.cc615272.chunk.js b/static/js/2.5fe280a5.chunk.js similarity index 74% rename from static/js/2.cc615272.chunk.js rename to static/js/2.5fe280a5.chunk.js index efc1e3fa..675ad5d8 100644 --- a/static/js/2.cc615272.chunk.js +++ b/static/js/2.5fe280a5.chunk.js @@ -1,2 +1,2 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(246)},function(e,t,n){e.exports=n(261)()},function(e,t,n){"use strict";t.__esModule=!0;var r,l=n(104),i=(r=l)&&r.__esModule?r:{default:r};t.default=i.default||function(e){for(var t=1;t=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function a(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,l,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){l={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(l)throw l.error}}return o}var u="An invariant failed, however the error is obfuscated because this is an production build.",s=[];Object.freeze(s);var c={};function h(){return++xe.mobxGuid}function f(e){throw p(!1,e),"X"}function p(e,t){if(!e)throw new Error("[mobx] "+(t||u))}Object.freeze(c);function d(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function m(e){return null!==e&&"object"===typeof e}function g(e){if(null===e||"object"!==typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function y(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function b(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return m(e)&&!0===e[n]}}function w(e){return e instanceof Map}function _(e){return e instanceof Set}function x(e){var t=new Set;for(var n in e)t.add(n);return Object.getOwnPropertySymbols(e).forEach(function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)}),Array.from(t)}function M(e){return e&&e.toString?e.toString():new String(e).toString()}function S(e){return null===e?null:"object"===typeof e?""+e:e}var C=Symbol("mobx administration"),z=function(){function e(e){void 0===e&&(e="Atom@"+h()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=le.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.reportObserved=function(){return Oe(this)},e.prototype.reportChanged=function(){Te(),function(e){if(e.lowestObserverState===le.STALE)return;e.lowestObserverState=le.STALE,e.observers.forEach(function(t){t.dependenciesState===le.UP_TO_DATE&&(t.isTracing!==ie.NONE&&Pe(t,e),t.onBecomeStale()),t.dependenciesState=le.STALE})}(this),Ee()},e.prototype.toString=function(){return this.name},e}(),T=b("Atom",z);function E(e,t,n){void 0===t&&(t=v),void 0===n&&(n=v);var r,l=new z(e);return t!==v&&Ye("onBecomeObserved",l,t,r),n!==v&&function(e,t,n){Ye("onBecomeUnobserved",e,t,n)}(l,n),l}var O={identity:function(e,t){return e===t},structural:function(e,t){return Ht(e,t)},default:function(e,t){return Object.is(e,t)}},P=Symbol("mobx did run lazy initializers"),L=Symbol("mobx pending decorators"),A={},k={};function R(e){if(!0!==e[P]){var t=e[L];if(t)for(var n in y(e,P,!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function I(e,t){return function(){var n,r,l=function(r,l,o,a){if(!0===a)return t(r,l,o,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,L)){var u=r[L];y(r,L,i({},u))}return r[L][l]={prop:l,propertyCreator:t,descriptor:o,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?A:k;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return R(this),this[e]},set:function(t){R(this),this[e]=t}})}(l,e)};return(2===(r=arguments).length||3===r.length)&&"string"===typeof r[1]||4===r.length&&!0===r[3]?(n=s,l.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),l)}}function V(e,t,n){return tt(e)?e:Array.isArray(e)?Y.array(e,{name:n}):g(e)?Y.object(e,void 0,{name:n}):w(e)?Y.map(e,{name:n}):_(e)?Y.set(e,{name:n}):e}function H(e){return e}function N(t){p(t);var n=I(!0,function(e,n,r,l,i){var o=r?r.initializer?r.initializer.call(e):r.value:void 0;Et(e).addObservableProp(n,o,t)}),r=("undefined"!==typeof e&&Object({NODE_ENV:"production",PUBLIC_URL:""}),n);return r.enhancer=t,r}var D={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function j(e){return null===e||void 0===e?D:"string"===typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(D);var F=N(V),B=N(function(e,t,n){return void 0===e||null===e?e:kt(e)||bt(e)||Mt(e)||zt(e)?e:Array.isArray(e)?Y.array(e,{name:n,deep:!1}):g(e)?Y.object(e,void 0,{name:n,deep:!1}):w(e)?Y.map(e,{name:n,deep:!1}):_(e)?Y.set(e,{name:n,deep:!1}):f(!1)}),U=N(H),G=N(function(e,t,n){return Ht(e,t)?t:e});function W(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?H:V}var q={box:function(e,t){arguments.length>2&&K("box");var n=j(t);return new oe(e,W(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&K("array");var n=j(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+h());void 0===r&&(r=!1);var l=new vt(n,t,r);i=l.values,o=C,a=l,Object.defineProperty(i,o,{enumerable:!1,writable:!1,configurable:!0,value:a});var i,o,a;var u=new Proxy(l.values,dt);if(l.proxy=u,e&&e.length){var s=ne(!0);l.spliceWithArray(0,0,e),re(s)}return u}(e,W(n),n.name)},map:function(e,t){arguments.length>2&&K("map");var n=j(t);return new xt(e,W(n),n.name)},set:function(e,t){arguments.length>2&&K("set");var n=j(t);return new Ct(e,W(n),n.name)},object:function(e,t,n){"string"===typeof arguments[1]&&K("object");var r=j(n);if(!1===r.proxy)return Xe({},e,t,r);var l=Ze(r),i=function(e){var t=new Proxy(e,at);return e[C].proxy=t,t}(Xe({},void 0,void 0,r));return Je(i,e,t,l),i},ref:U,shallow:B,deep:F,struct:G},Y=function(e,t,n){if("string"===typeof arguments[1])return F.apply(null,arguments);if(tt(e))return e;var r=g(e)?Y.object(e,t,n):Array.isArray(e)?Y.array(e,t):w(e)?Y.map(e,t):_(e)?Y.set(e,t):e;if(r!==e)return r;f(!1)};function K(e){f("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(q).forEach(function(e){return Y[e]=q[e]});var X=I(!1,function(e,t,n,r,l){var o=n.get,a=n.set,u=l[0]||{};Et(e).addComputedProp(e,t,i({get:o,set:a,context:e},u))}),Z=X({equals:O.structural}),J=function(e,t,n){if("string"===typeof t)return X.apply(null,arguments);if(null!==e&&"object"===typeof e&&1===arguments.length)return X.apply(null,arguments);var r="object"===typeof t?t:{};return r.get=e,r.set="function"===typeof t?t:r.set,r.name=r.name||e.name||"",new ae(r)};function Q(e,t,n){var r=function(){return $(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function $(e,t,n,r){var l=function(e,t,n,r){var l=!1,i=0;var o=me();Te();var a=ne(!0);return{prevDerivation:o,prevAllowStateChanges:a,notifySpy:l,startTime:i}}(),i=!0;try{var o=t.apply(n,r);return i=!1,o}finally{i?(xe.suppressReactionErrors=i,ee(l),xe.suppressReactionErrors=!1):ee(l)}}function ee(e){re(e.prevAllowStateChanges),Ee(),ge(e.prevDerivation),e.notifySpy}function te(e,t){var n,r=ne(e);try{n=t()}finally{re(r)}return n}function ne(e){var t=xe.allowStateChanges;return xe.allowStateChanges=e,t}function re(e){xe.allowStateChanges=e}J.struct=Z;var le,ie,oe=function(e){function t(t,n,r,l,i){void 0===r&&(r="ObservableValue@"+h()),void 0===l&&(l=!0),void 0===i&&(i=O.default);var o=e.call(this,r)||this;return o.enhancer=n,o.name=r,o.equals=i,o.hasUnreportedChange=!1,o.value=n(t,void 0,r),o}return function(e,t){function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==xe.UNCHANGED){0,this.setNewValue(e)}},t.prototype.prepareNewValue=function(e){if(fe(this),ut(this)){var t=ct(this,{object:this,type:"update",newValue:e});if(!t)return xe.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?xe.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),ht(this)&&pt(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return st(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),ft(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return S(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(z),ae=(b("ObservableValue",oe),function(){function e(e){this.dependenciesState=le.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=le.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+h(),this.value=new se(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ie.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+h(),e.set&&(this.setter=Q(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?O.structural:O.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==le.UP_TO_DATE)return;e.lowestObserverState=le.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===le.UP_TO_DATE&&(t.dependenciesState=le.POSSIBLY_STALE,t.isTracing!==ie.NONE&&Pe(t,e),t.onBecomeStale())})}(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.get=function(){this.isComputing&&f("Cycle detected in computation "+this.name+": "+this.derivation),0!==xe.inBatch||0!==this.observers.size||this.keepAlive?(Oe(this),he(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===le.STALE)return;e.lowestObserverState=le.STALE,e.observers.forEach(function(t){t.dependenciesState===le.POSSIBLY_STALE?t.dependenciesState=le.STALE:t.dependenciesState===le.UP_TO_DATE&&(e.lowestObserverState=le.UP_TO_DATE)})}(this)):he(this)&&(this.warnAboutUntrackedRead(),Te(),this.value=this.computeValue(!1),Ee());var e=this.value;if(ce(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(ce(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){p(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else p(!1,!1)},e.prototype.trackAndCompute=function(){var e=this.value,t=this.dependenciesState===le.NOT_TRACKING,n=this.computeValue(!0),r=t||ce(e)||ce(n)||!this.equals(e,n);return r&&(this.value=n),r},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,xe.computationDepth++,e)t=pe(this,this.derivation,this.scope);else if(!0===xe.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(n){t=new se(n)}return xe.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(de(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,l=void 0;return Ge(function(){var i=n.get();if(!r||t){var o=me();e({type:"update",object:n,newValue:i,oldValue:l}),ge(o)}r=!1,l=i})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return S(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}()),ue=b("ComputedValue",ae);!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(le||(le={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(ie||(ie={}));var se=function(){return function(e){this.cause=e}}();function ce(e){return e instanceof se}function he(e){switch(e.dependenciesState){case le.UP_TO_DATE:return!1;case le.NOT_TRACKING:case le.STALE:return!0;case le.POSSIBLY_STALE:for(var t=me(),n=e.observing,r=n.length,l=0;l0;xe.computationDepth>0&&t&&f(!1),xe.allowStateChanges||!t&&"strict"!==xe.enforceActions||f(!1)}function pe(e,t,n){ye(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++xe.runId;var r,l=xe.trackingDerivation;if(xe.trackingDerivation=e,!0===xe.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(i){r=new se(i)}return xe.trackingDerivation=l,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=le.UP_TO_DATE,l=0,i=e.unboundDepsCount,o=0;or&&(r=a.dependenciesState)}n.length=l,e.newObserving=null,i=t.length;for(;i--;){var a=t[i];0===a.diffValue&&Ce(a,e),a.diffValue=0}for(;l--;){var a=n[l];1===a.diffValue&&(a.diffValue=0,Se(a,e))}r!==le.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function de(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Ce(t[n],e);e.dependenciesState=le.NOT_TRACKING}function ve(e){var t=me();try{return e()}finally{ge(t)}}function me(){var e=xe.trackingDerivation;return xe.trackingDerivation=null,e}function ge(e){xe.trackingDerivation=e}function ye(e){if(e.dependenciesState!==le.UP_TO_DATE){e.dependenciesState=le.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=le.UP_TO_DATE}}var be=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),we=!0,_e=!1,xe=function(){var e=Me();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(we=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new be).version&&(we=!1),we?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new be):(setTimeout(function(){_e||f("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new be)}();function Me(){return"undefined"!==typeof window?window:r}function Se(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ce(e,t){e.observers.delete(t),0===e.observers.size&&ze(e)}function ze(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,xe.pendingUnobservations.push(e))}function Te(){xe.inBatch++}function Ee(){if(0===--xe.inBatch){Re();for(var e=xe.pendingUnobservations,t=0;t0&&ze(e),!1)}function Pe(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ie.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}(Qe(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof ae?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Le=function(){function e(e,t,n){void 0===e&&(e="Reaction@"+h()),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.observing=[],this.newObserving=[],this.dependenciesState=le.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+h(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ie.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,xe.pendingReactions.push(this),Re())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Te(),this._isScheduled=!1,he(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(e){this.reportExceptionInDerivation(e)}}Ee()}},e.prototype.track=function(e){if(!this.isDisposed){Te();0,this._isRunning=!0;var t=pe(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&de(this),ce(t)&&this.reportExceptionInDerivation(t.cause),Ee()}},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(xe.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";xe.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),xe.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Te(),de(this),Ee()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[C]=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t0||xe.isRunningReactions||ke(Ie)}function Ie(){xe.isRunningReactions=!0;for(var e=xe.pendingReactions,t=0;e.length>0;){++t===Ae&&(console.error("Reaction doesn't converge to a stable state after "+Ae+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,l=n.length;r",e):2===arguments.length&&"function"===typeof t?Q(e,t):1===arguments.length&&"string"===typeof e?je(e):!0!==r?je(t).apply(null,arguments):void y(e,t,Q(e.name||t,n.value,this))};function Be(e,t){"string"===typeof e||e.name;return $(0,"function"===typeof e?e:t,this,void 0)}function Ue(e,t,n){y(e,t,Q(t,n.bind(e)))}function Ge(e,t){void 0===t&&(t=c);var n,r=t&&t.name||e.name||"Autorun@"+h();if(!t.scheduler&&!t.delay)n=new Le(r,function(){this.track(o)},t.onError);else{var l=qe(t),i=!1;n=new Le(r,function(){i||(i=!0,l(function(){i=!1,n.isDisposed||n.track(o)}))},t.onError)}function o(){e(n)}return n.schedule(),n.getDisposer()}Fe.bound=function(e,t,n,r){return!0===r?(Ue(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ue(this,t,n.value||n.initializer.call(this)),this[t]},set:De}:{enumerable:!1,configurable:!0,set:function(e){Ue(this,t,e)},get:function(){}}};var We=function(e){return e()};function qe(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:We}function Ye(e,t,n,r){var l="string"===typeof n?Rt(t,n):Rt(t),i="string"===typeof n?r:n,o=e+"Listeners";return l[o]?l[o].add(i):l[o]=new Set([i]),"function"!==typeof l[e]?f(!1):function(){var e=l[o];e&&(e.delete(i),0===e.size&&delete l[o])}}function Ke(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,l=e.disableErrorBoundaries,i=e.reactionScheduler;if(!0===e.isolateGlobalState&&((xe.pendingReactions.length||xe.inBatch||xe.isRunningReactions)&&f("isolateGlobalState should be called before MobX is running any reactions"),_e=!0,we&&(0===--Me().__mobxInstanceCount&&(Me().__mobxGlobals=void 0),xe=new be)),void 0!==t){var o=void 0;switch(t){case!0:case"observed":o=!0;break;case!1:case"never":o=!1;break;case"strict":case"always":o="strict";break;default:f("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}xe.enforceActions=o,xe.allowStateChanges=!0!==o&&"strict"!==o}void 0!==n&&(xe.computedRequiresReaction=!!n),void 0!==r&&(xe.computedConfigurable=!!r),void 0!==l&&(!0===l&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),xe.disableErrorBoundaries=!!l),i&&He(i)}function Xe(e,t,n,r){var l=Ze(r=j(r));return R(e),Et(e,r.name,l.enhancer),t&&Je(e,t,n,l),e}function Ze(e){return e.defaultDecorator||(!1===e.deep?U:F)}function Je(e,t,n,r){var l,i;Te();try{var a=x(t);try{for(var u=o(a),s=u.next();!s.done;s=u.next()){var c=s.value,h=Object.getOwnPropertyDescriptor(t,c);0;var f=(n&&c in n?n[c]:h.get?X:r)(e,c,h,!0);f&&Object.defineProperty(e,c,f)}}catch(p){l={error:p}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(l)throw l.error}}}finally{Ee()}}function Qe(e,t){return $e(Rt(e,t))}function $e(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=function(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}(e.observing).map($e)),t}function et(e,t){return null!==e&&void 0!==e&&(void 0!==t?!!kt(e)&&e[C].values.has(t):kt(e)||!!e[C]||T(e)||Ve(e)||ue(e))}function tt(e){return 1!==arguments.length&&f(!1),et(e)}function nt(e,t){void 0===t&&(t=void 0),Te();try{return e.apply(t)}finally{Ee()}}function rt(e,t,n){return 1===arguments.length||t&&"object"===typeof t?function(e,t){0;var n,r=new Promise(function(r,l){var o=lt(e,r,i({},t,{onError:l}));n=function(){o(),l("WHEN_CANCELLED")}});return r.cancel=n,r}(e,t):lt(e,t,n||{})}function lt(e,t,n){var r;"number"===typeof n.timeout&&(r=setTimeout(function(){if(!i[C].isDisposed){i();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+h();var l=Q(n.name+"-effect",t),i=Ge(function(t){e()&&(t.dispose(),r&&clearTimeout(r),l())},n);return i}function it(e){return e[C]}function ot(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e}var at={has:function(e,t){if(t===C||"constructor"===t||t===P)return!0;var n=it(e);return ot(t)?n.has(t):t in e},get:function(e,t){if(t===C||"constructor"===t||t===P)return e[t];var n=it(e),r=n.values.get(t);if(r instanceof z){var l=r.get();return void 0===l&&n.has(t),l}return ot(t)&&n.has(t),e[t]},set:function(e,t,n){return!!ot(t)&&(function e(t,n,r){if(2!==arguments.length||zt(t))if(kt(t)){var l=t[C];l.values.get(n)?l.write(n,r):l.addObservableProp(n,r,l.defaultEnhancer)}else if(Mt(t))t.set(n,r);else if(zt(t))t.add(n);else{if(!bt(t))return f(!1);"number"!==typeof n&&(n=parseInt(n,10)),p(n>=0,"Not a valid index: '"+n+"'"),Te(),n>=t.length&&(t.length=n+1),t[n]=r,Ee()}else{Te();var i=n;try{for(var o in i)e(t,o,i[o])}finally{Ee()}}}(e,t,n),!0)},deleteProperty:function(e,t){return!!ot(t)&&(it(e).remove(t),!0)},ownKeys:function(e){return it(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return f("Dynamic observable objects cannot be frozen"),!1}};function ut(e){return void 0!==e.interceptors&&e.interceptors.length>0}function st(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),d(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function ct(e,t){var n=me();try{var r=e.interceptors;if(r)for(var l=0,i=r.length;l0}function ft(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),d(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function pt(e,t){var n=me(),r=e.changeListeners;if(r){for(var l=0,i=(r=r.slice()).length;l0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return st(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),ft(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!==typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;rl?e=l:e<0&&(e=Math.max(0,l+e)),t=1===arguments.length?l-e:void 0===t||null===t?0:Math.max(0,Math.min(t,l-e)),void 0===n&&(n=s),ut(this)){var i=ct(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!i)return s;t=i.removedCount,n=i.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var o=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,o),this.dehanceValues(o)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,function(){for(var e=[],t=0;t-1&&(this.splice(n,1),!0)},get:function(e){var t=this[C];if(t){if(e0?1:+e}),"name"in Function.prototype===!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>8&255]+e[t>>16&255]+e[t>>24&255]+"-"+e[255&n]+e[n>>8&255]+"-"+e[n>>16&15|64]+e[n>>24&255]+"-"+e[63&r|128]+e[r>>8&255]+"-"+e[r>>16&255]+e[r>>24&255]+e[255&l]+e[l>>8&255]+e[l>>16&255]+e[l>>24&255]).toUpperCase()}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,l){return r+(e-t)*(l-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*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())},degToRad:function(e){return e*jt.DEG2RAD},radToDeg:function(e){return e*jt.RAD2DEG},isPowerOfTwo:function(e){return 0===(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};function Ft(e,t){this.x=e||0,this.y=t||0}function Bt(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}function Ut(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}function Gt(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(Ft.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(Ft.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(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:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var 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:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(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:function(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:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){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:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},cross:function(e){return this.x*e.y-this.y*e.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var n=Math.cos(t),r=Math.sin(t),l=this.x-e.x,i=this.y-e.y;return this.x=l*n-i*r+e.x,this.y=l*r+i*n+e.y,this}}),Object.assign(Bt,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,l,i,o){var a=n[r+0],u=n[r+1],s=n[r+2],c=n[r+3],h=l[i+0],f=l[i+1],p=l[i+2],d=l[i+3];if(c!==d||a!==h||u!==f||s!==p){var v=1-o,m=a*h+u*f+s*p+c*d,g=m>=0?1:-1,y=1-m*m;if(y>Number.EPSILON){var b=Math.sqrt(y),w=Math.atan2(b,m*g);v=Math.sin(v*w)/b,o=Math.sin(o*w)/b}var _=o*g;if(a=a*v+h*_,u=u*v+f*_,s=s*v+p*_,c=c*v+d*_,v===1-o){var x=1/Math.sqrt(a*a+u*u+s*s+c*c);a*=x,u*=x,s*=x,c*=x}}e[t]=a,e[t+1]=u,e[t+2]=s,e[t+3]=c}}),Object.defineProperties(Bt.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}}),Object.assign(Bt.prototype,{isQuaternion:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,l=e._z,i=e.order,o=Math.cos,a=Math.sin,u=o(n/2),s=o(r/2),c=o(l/2),h=a(n/2),f=a(r/2),p=a(l/2);return"XYZ"===i?(this._x=h*s*c+u*f*p,this._y=u*f*c-h*s*p,this._z=u*s*p+h*f*c,this._w=u*s*c-h*f*p):"YXZ"===i?(this._x=h*s*c+u*f*p,this._y=u*f*c-h*s*p,this._z=u*s*p-h*f*c,this._w=u*s*c+h*f*p):"ZXY"===i?(this._x=h*s*c-u*f*p,this._y=u*f*c+h*s*p,this._z=u*s*p+h*f*c,this._w=u*s*c-h*f*p):"ZYX"===i?(this._x=h*s*c-u*f*p,this._y=u*f*c+h*s*p,this._z=u*s*p-h*f*c,this._w=u*s*c+h*f*p):"YZX"===i?(this._x=h*s*c+u*f*p,this._y=u*f*c+h*s*p,this._z=u*s*p-h*f*c,this._w=u*s*c-h*f*p):"XZY"===i&&(this._x=h*s*c-u*f*p,this._y=u*f*c-h*s*p,this._z=u*s*p+h*f*c,this._w=u*s*c+h*f*p),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var 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:function(e){var t,n=e.elements,r=n[0],l=n[4],i=n[8],o=n[1],a=n[5],u=n[9],s=n[2],c=n[6],h=n[10],f=r+a+h;return f>0?(t=.5/Math.sqrt(f+1),this._w=.25/t,this._x=(c-u)*t,this._y=(i-s)*t,this._z=(o-l)*t):r>a&&r>h?(t=2*Math.sqrt(1+r-a-h),this._w=(c-u)/t,this._x=.25*t,this._y=(l+o)/t,this._z=(i+s)/t):a>h?(t=2*Math.sqrt(1+a-r-h),this._w=(i-s)/t,this._x=(l+o)/t,this._y=.25*t,this._z=(u+c)/t):(t=2*Math.sqrt(1+h-r-a),this._w=(o-l)/t,this._x=(i+s)/t,this._y=(u+c)/t,this._z=.25*t),this._onChangeCallback(),this},setFromUnitVectors:function(e,t){var n=e.dot(t)+1;return n<1e-6?(n=0,Math.abs(e.x)>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:function(e){return 2*Math.acos(Math.abs(jt.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var 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:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,l=e._z,i=e._w,o=t._x,a=t._y,u=t._z,s=t._w;return this._x=n*s+i*o+r*u-l*a,this._y=r*s+i*a+l*o-n*u,this._z=l*s+i*u+n*a-r*o,this._w=i*s-n*o-r*a-l*u,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,l=this._z,i=this._w,o=i*e._w+n*e._x+r*e._y+l*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=i,this._x=n,this._y=r,this._z=l,this;var a=1-o*o;if(a<=Number.EPSILON){var u=1-t;return this._w=u*i+t*this._w,this._x=u*n+t*this._x,this._y=u*r+t*this._y,this._z=u*l+t*this._z,this.normalize(),this._onChangeCallback(),this}var s=Math.sqrt(a),c=Math.atan2(s,o),h=Math.sin((1-t)*c)/s,f=Math.sin(t*c)/s;return this._w=i*h+this._w*f,this._x=n*h+this._x*f,this._y=r*h+this._y*f,this._z=l*h+this._z*f,this._onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}}),Object.assign(Ut.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(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:function(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:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(){var e=new Bt;return function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(e.setFromEuler(t))}}(),applyAxisAngle:function(){var e=new Bt;return function(t,n){return this.applyQuaternion(e.setFromAxisAngle(t,n))}}(),applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,l=e.elements;return this.x=l[0]*t+l[3]*n+l[6]*r,this.y=l[1]*t+l[4]*n+l[7]*r,this.z=l[2]*t+l[5]*n+l[8]*r,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,l=e.elements,i=1/(l[3]*t+l[7]*n+l[11]*r+l[15]);return this.x=(l[0]*t+l[4]*n+l[8]*r+l[12])*i,this.y=(l[1]*t+l[5]*n+l[9]*r+l[13])*i,this.z=(l[2]*t+l[6]*n+l[10]*r+l[14])*i,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,l=e.x,i=e.y,o=e.z,a=e.w,u=a*t+i*r-o*n,s=a*n+o*t-l*r,c=a*r+l*n-i*t,h=-l*t-i*n-o*r;return this.x=u*a+h*-l+s*-o-c*-i,this.y=s*a+h*-i+c*-l-u*-o,this.z=c*a+h*-o+u*-i-s*-l,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,n=this.y,r=this.z,l=e.elements;return this.x=l[0]*t+l[4]*n+l[8]*r,this.y=l[1]*t+l[5]*n+l[9]*r,this.z=l[2]*t+l[6]*n+l[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(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:function(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:function(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:function(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:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){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:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(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:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,l=e.z,i=t.x,o=t.y,a=t.z;return this.x=r*a-l*o,this.y=l*i-n*a,this.z=n*o-r*i,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:function(){var e=new Ut;return function(t){return e.copy(this).projectOnVector(t),this.sub(e)}}(),reflect:function(){var e=new Ut;return function(t){return this.sub(e.copy(t).multiplyScalar(2*this.dot(t)))}}(),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(jt.clamp(t,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,n){var 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:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var 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:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}}),Object.assign(Gt.prototype,{isMatrix3:!0,set:function(e,t,n,r,l,i,o,a,u){var s=this.elements;return s[0]=e,s[1]=r,s[2]=o,s[3]=t,s[4]=l,s[5]=a,s[6]=n,s[7]=i,s[8]=u,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var 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},setFromMatrix4:function(e){var 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},applyToBufferAttribute:function(){var e=new Ut;return function(t){for(var n=0,r=t.count;n2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},qt=0;function Yt(e,t,n,r,l,i,o,a,u,s){Object.defineProperty(this,"id",{value:qt++}),this.uuid=jt.generateUUID(),this.name="",this.image=void 0!==e?e:Yt.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:Yt.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:ye,this.wrapT=void 0!==r?r:ye,this.magFilter=void 0!==l?l:Me,this.minFilter=void 0!==i?i:Ce,this.anisotropy=void 0!==u?u:1,this.format=void 0!==o?o:je,this.type=void 0!==a?a:ze,this.offset=new Ft(0,0),this.repeat=new Ft(1,1),this.center=new Ft(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Gt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==s?s:Et,this.version=0,this.onUpdate=null}function Kt(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1}function Xt(e,t,n){this.width=e,this.height=t,this.scissor=new Kt(0,0,e,t),this.scissorTest=!1,this.viewport=new Kt(0,0,e,t),n=n||{},this.texture=new Yt(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=e,this.texture.image.height=t,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:Me,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}function Zt(e,t,n){Xt.call(this,e,t,n),this.samples=4}function Jt(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function Qt(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._order=r||Qt.DefaultOrder}function $t(){this.mask=1}Yt.DEFAULT_IMAGE=void 0,Yt.DEFAULT_MAPPING=se,Yt.prototype=Object.assign(Object.create(r.prototype),{constructor:Yt,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,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.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.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,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,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=jt.generateUUID()),!t&&void 0===e.images[r.uuid]){var l;if(Array.isArray(r)){l=[];for(var i=0,o=r.length;i1)switch(this.wrapS){case ge:e.x=e.x-Math.floor(e.x);break;case ye:e.x=e.x<0?0:1;break;case be: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 ge:e.y=e.y-Math.floor(e.y);break;case ye:e.y=e.y<0?0:1;break;case be: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}}),Object.defineProperty(Yt.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.defineProperties(Kt.prototype,{width:{get:function(){return this.z},set:function(e){this.z=e}},height:{get:function(){return this.w},set:function(e){this.w=e}}}),Object.assign(Kt.prototype,{isVector4:!0,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(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:function(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:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(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:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(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:function(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:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(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},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,l=this.w,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r+i[12]*l,this.y=i[1]*t+i[5]*n+i[9]*r+i[13]*l,this.z=i[2]*t+i[6]*n+i[10]*r+i[14]*l,this.w=i[3]*t+i[7]*n+i[11]*r+i[15]*l,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var 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:function(e){var t,n,r,l,i=e.elements,o=i[0],a=i[4],u=i[8],s=i[1],c=i[5],h=i[9],f=i[2],p=i[6],d=i[10];if(Math.abs(a-s)<.01&&Math.abs(u-f)<.01&&Math.abs(h-p)<.01){if(Math.abs(a+s)<.1&&Math.abs(u+f)<.1&&Math.abs(h+p)<.1&&Math.abs(o+c+d-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var v=(o+1)/2,m=(c+1)/2,g=(d+1)/2,y=(a+s)/4,b=(u+f)/4,w=(h+p)/4;return v>m&&v>g?v<.01?(n=0,r=.707106781,l=.707106781):(r=y/(n=Math.sqrt(v)),l=b/n):m>g?m<.01?(n=.707106781,r=0,l=.707106781):(n=y/(r=Math.sqrt(m)),l=w/r):g<.01?(n=.707106781,r=.707106781,l=0):(n=b/(l=Math.sqrt(g)),r=w/l),this.set(n,r,l,t),this}var _=Math.sqrt((p-h)*(p-h)+(u-f)*(u-f)+(s-a)*(s-a));return Math.abs(_)<.001&&(_=1),this.x=(p-h)/_,this.y=(u-f)/_,this.z=(s-a)/_,this.w=Math.acos((o+c+d-1)/2),this},min:function(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.w=Math.min(this.w,e.w),this},max:function(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.w=Math.max(this.w,e.w),this},clamp:function(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.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(){var e,t;return function(n,r){return void 0===e&&(e=new Kt,t=new Kt),e.set(n,n,n,n),t.set(r,r,r,r),this.clamp(e,t)}}(),clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){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.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(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.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),Xt.prototype=Object.assign(Object.create(r.prototype),{constructor:Xt,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.texture.image.width=e,this.texture.image.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Zt.prototype=Object.assign(Object.create(Xt.prototype),{constructor:Zt,isWebGLMultisampleRenderTarget:!0,copy:function(e){return Xt.prototype.copy.call(this,e),this.samples=e.samples,this}}),Object.assign(Jt.prototype,{isMatrix4:!0,set:function(e,t,n,r,l,i,o,a,u,s,c,h,f,p,d,v){var m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=l,m[5]=i,m[9]=o,m[13]=a,m[2]=u,m[6]=s,m[10]=c,m[14]=h,m[3]=f,m[7]=p,m[11]=d,m[15]=v,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new Jt).fromArray(this.elements)},copy:function(e){var 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:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(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:function(){var e=new Ut;return function(t){var n=this.elements,r=t.elements,l=1/e.setFromMatrixColumn(t,0).length(),i=1/e.setFromMatrixColumn(t,1).length(),o=1/e.setFromMatrixColumn(t,2).length();return n[0]=r[0]*l,n[1]=r[1]*l,n[2]=r[2]*l,n[3]=0,n[4]=r[4]*i,n[5]=r[5]*i,n[6]=r[6]*i,n[7]=0,n[8]=r[8]*o,n[9]=r[9]*o,n[10]=r[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}}(),makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,l=e.z,i=Math.cos(n),o=Math.sin(n),a=Math.cos(r),u=Math.sin(r),s=Math.cos(l),c=Math.sin(l);if("XYZ"===e.order){var h=i*s,f=i*c,p=o*s,d=o*c;t[0]=a*s,t[4]=-a*c,t[8]=u,t[1]=f+p*u,t[5]=h-d*u,t[9]=-o*a,t[2]=d-h*u,t[6]=p+f*u,t[10]=i*a}else if("YXZ"===e.order){var v=a*s,m=a*c,g=u*s,y=u*c;t[0]=v+y*o,t[4]=g*o-m,t[8]=i*u,t[1]=i*c,t[5]=i*s,t[9]=-o,t[2]=m*o-g,t[6]=y+v*o,t[10]=i*a}else if("ZXY"===e.order){v=a*s,m=a*c,g=u*s,y=u*c;t[0]=v-y*o,t[4]=-i*c,t[8]=g+m*o,t[1]=m+g*o,t[5]=i*s,t[9]=y-v*o,t[2]=-i*u,t[6]=o,t[10]=i*a}else if("ZYX"===e.order){h=i*s,f=i*c,p=o*s,d=o*c;t[0]=a*s,t[4]=p*u-f,t[8]=h*u+d,t[1]=a*c,t[5]=d*u+h,t[9]=f*u-p,t[2]=-u,t[6]=o*a,t[10]=i*a}else if("YZX"===e.order){var b=i*a,w=i*u,_=o*a,x=o*u;t[0]=a*s,t[4]=x-b*c,t[8]=_*c+w,t[1]=c,t[5]=i*s,t[9]=-o*s,t[2]=-u*s,t[6]=w*c+_,t[10]=b-x*c}else if("XZY"===e.order){b=i*a,w=i*u,_=o*a,x=o*u;t[0]=a*s,t[4]=-c,t[8]=u*s,t[1]=b*c+x,t[5]=i*s,t[9]=w*c-_,t[2]=_*c-w,t[6]=o*s,t[10]=x*c+b}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(){var e=new Ut(0,0,0),t=new Ut(1,1,1);return function(n){return this.compose(e,n,t)}}(),lookAt:function(){var e=new Ut,t=new Ut,n=new Ut;return function(r,l,i){var o=this.elements;return n.subVectors(r,l),0===n.lengthSq()&&(n.z=1),n.normalize(),e.crossVectors(i,n),0===e.lengthSq()&&(1===Math.abs(i.z)?n.x+=1e-4:n.z+=1e-4,n.normalize(),e.crossVectors(i,n)),e.normalize(),t.crossVectors(n,e),o[0]=e.x,o[4]=t.x,o[8]=n.x,o[1]=e.y,o[5]=t.y,o[9]=n.y,o[2]=e.z,o[6]=t.z,o[10]=n.z,this}}(),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,l=this.elements,i=n[0],o=n[4],a=n[8],u=n[12],s=n[1],c=n[5],h=n[9],f=n[13],p=n[2],d=n[6],v=n[10],m=n[14],g=n[3],y=n[7],b=n[11],w=n[15],_=r[0],x=r[4],M=r[8],S=r[12],C=r[1],z=r[5],T=r[9],E=r[13],O=r[2],P=r[6],L=r[10],A=r[14],k=r[3],R=r[7],I=r[11],V=r[15];return l[0]=i*_+o*C+a*O+u*k,l[4]=i*x+o*z+a*P+u*R,l[8]=i*M+o*T+a*L+u*I,l[12]=i*S+o*E+a*A+u*V,l[1]=s*_+c*C+h*O+f*k,l[5]=s*x+c*z+h*P+f*R,l[9]=s*M+c*T+h*L+f*I,l[13]=s*S+c*E+h*A+f*V,l[2]=p*_+d*C+v*O+m*k,l[6]=p*x+d*z+v*P+m*R,l[10]=p*M+d*T+v*L+m*I,l[14]=p*S+d*E+v*A+m*V,l[3]=g*_+y*C+b*O+w*k,l[7]=g*x+y*z+b*P+w*R,l[11]=g*M+y*T+b*L+w*I,l[15]=g*S+y*E+b*A+w*V,this},multiplyScalar:function(e){var 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},applyToBufferAttribute:function(){var e=new Ut;return function(t){for(var n=0,r=t.count;n1){for(var t=0;t1){for(var t=0;t0){r.children=[];for(a=0;a0&&(n.geometries=h),f.length>0&&(n.materials=f),p.length>0&&(n.textures=p),d.length>0&&(n.images=d),o.length>0&&(n.shapes=o)}return n.object=r,n;function v(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),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.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.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;nl&&(l=s),c>i&&(i=c),h>o&&(o=h)}return this.min.set(t,n,r),this.max.set(l,i,o),this},setFromBufferAttribute:function(e){for(var t=1/0,n=1/0,r=1/0,l=-1/0,i=-1/0,o=-1/0,a=0,u=e.count;al&&(l=s),c>i&&(i=c),h>o&&(o=h)}return this.min.set(t,n,r),this.max.set(l,i,o),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)},containsBox:function(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:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new Ut),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:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)},intersectsSphere:function(){var e=new Ut;return function(t){return this.clampPoint(t.center,e),e.distanceToSquared(t.center)<=t.radius*t.radius}}(),intersectsPlane:function(e){var 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:function(){var e=new Ut,t=new Ut,n=new Ut,r=new Ut,l=new Ut,i=new Ut,o=new Ut,a=new Ut,u=new Ut,s=new Ut;function c(r){var l,i;for(l=0,i=r.length-3;l<=i;l+=3){o.fromArray(r,l);var a=u.x*Math.abs(o.x)+u.y*Math.abs(o.y)+u.z*Math.abs(o.z),s=e.dot(o),c=t.dot(o),h=n.dot(o);if(Math.max(-Math.max(s,c,h),Math.min(s,c,h))>a)return!1}return!0}return function(o){if(this.isEmpty())return!1;this.getCenter(a),u.subVectors(this.max,a),e.subVectors(o.a,a),t.subVectors(o.b,a),n.subVectors(o.c,a),r.subVectors(t,e),l.subVectors(n,t),i.subVectors(e,n);var h=[0,-r.z,r.y,0,-l.z,l.y,0,-i.z,i.y,r.z,0,-r.x,l.z,0,-l.x,i.z,0,-i.x,-r.y,r.x,0,-l.y,l.x,0,-i.y,i.x,0];return!!c(h)&&(!!c(h=[1,0,0,0,1,0,0,0,1])&&(s.crossVectors(r,l),c(h=[s.x,s.y,s.z])))}}(),clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new Ut),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new Ut;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),getBoundingSphere:function(){var e=new Ut;return function(t){return void 0===t&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(t.center),t.radius=.5*this.getSize(e).length(),t}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(){var e=[new Ut,new Ut,new Ut,new Ut,new Ut,new Ut,new Ut,new Ut];return function(t){return this.isEmpty()?this:(e[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),e[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),e[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),e[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),e[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),e[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),e[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),e[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(e),this)}}(),translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(ln.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(){var e=new rn;return function(t,n){var r=this.center;void 0!==n?r.copy(n):e.setFromPoints(t).getCenter(r);for(var l=0,i=0,o=t.length;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new rn),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}}),Object.assign(on.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new Ut),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(){var e=new Ut;return function(t){return this.origin.copy(this.at(t,e)),this}}(),closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new Ut),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(){var e=new Ut;return function(t){var n=e.subVectors(t,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(t):(e.copy(this.direction).multiplyScalar(n).add(this.origin),e.distanceToSquared(t))}}(),distanceSqToSegment:function(){var e=new Ut,t=new Ut,n=new Ut;return function(r,l,i,o){e.copy(r).add(l).multiplyScalar(.5),t.copy(l).sub(r).normalize(),n.copy(this.origin).sub(e);var a,u,s,c,h=.5*r.distanceTo(l),f=-this.direction.dot(t),p=n.dot(this.direction),d=-n.dot(t),v=n.lengthSq(),m=Math.abs(1-f*f);if(m>0)if(u=f*p-d,c=h*m,(a=f*d-p)>=0)if(u>=-c)if(u<=c){var g=1/m;s=(a*=g)*(a+f*(u*=g)+2*p)+u*(f*a+u+2*d)+v}else u=h,s=-(a=Math.max(0,-(f*u+p)))*a+u*(u+2*d)+v;else u=-h,s=-(a=Math.max(0,-(f*u+p)))*a+u*(u+2*d)+v;else u<=-c?s=-(a=Math.max(0,-(-f*h+p)))*a+(u=a>0?-h:Math.min(Math.max(-h,-d),h))*(u+2*d)+v:u<=c?(a=0,s=(u=Math.min(Math.max(-h,-d),h))*(u+2*d)+v):s=-(a=Math.max(0,-(f*h+p)))*a+(u=a>0?h:Math.min(Math.max(-h,-d),h))*(u+2*d)+v;else u=f>0?-h:h,s=-(a=Math.max(0,-(f*u+p)))*a+u*(u+2*d)+v;return i&&i.copy(this.direction).multiplyScalar(a).add(this.origin),o&&o.copy(t).multiplyScalar(u).add(e),s}}(),intersectSphere:function(){var e=new Ut;return function(t,n){e.subVectors(t.center,this.origin);var r=e.dot(this.direction),l=e.dot(e)-r*r,i=t.radius*t.radius;if(l>i)return null;var o=Math.sqrt(i-l),a=r-o,u=r+o;return a<0&&u<0?null:a<0?this.at(u,n):this.at(a,n)}}(),intersectsSphere:function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},intersectPlane:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var n,r,l,i,o,a,u=1/this.direction.x,s=1/this.direction.y,c=1/this.direction.z,h=this.origin;return u>=0?(n=(e.min.x-h.x)*u,r=(e.max.x-h.x)*u):(n=(e.max.x-h.x)*u,r=(e.min.x-h.x)*u),s>=0?(l=(e.min.y-h.y)*s,i=(e.max.y-h.y)*s):(l=(e.max.y-h.y)*s,i=(e.min.y-h.y)*s),n>i||l>r?null:((l>n||n!==n)&&(n=l),(i=0?(o=(e.min.z-h.z)*c,a=(e.max.z-h.z)*c):(o=(e.max.z-h.z)*c,a=(e.min.z-h.z)*c),n>a||o>r?null:((o>n||n!==n)&&(n=o),(a=0?n:r,t)))},intersectsBox:function(){var e=new Ut;return function(t){return null!==this.intersectBox(t,e)}}(),intersectTriangle:function(){var e=new Ut,t=new Ut,n=new Ut,r=new Ut;return function(l,i,o,a,u){t.subVectors(i,l),n.subVectors(o,l),r.crossVectors(t,n);var s,c=this.direction.dot(r);if(c>0){if(a)return null;s=1}else{if(!(c<0))return null;s=-1,c=-c}e.subVectors(this.origin,l);var h=s*this.direction.dot(n.crossVectors(e,n));if(h<0)return null;var f=s*this.direction.dot(t.cross(e));if(f<0)return null;if(h+f>c)return null;var p=-s*e.dot(r);return p<0?null:this.at(p/c,u)}}(),applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}}),Object.assign(an,{getNormal:function(){var e=new Ut;return function(t,n,r,l){void 0===l&&(console.warn("THREE.Triangle: .getNormal() target is now required"),l=new Ut),l.subVectors(r,n),e.subVectors(t,n),l.cross(e);var i=l.lengthSq();return i>0?l.multiplyScalar(1/Math.sqrt(i)):l.set(0,0,0)}}(),getBarycoord:function(){var e=new Ut,t=new Ut,n=new Ut;return function(r,l,i,o,a){e.subVectors(o,l),t.subVectors(i,l),n.subVectors(r,l);var u=e.dot(e),s=e.dot(t),c=e.dot(n),h=t.dot(t),f=t.dot(n),p=u*h-s*s;if(void 0===a&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),a=new Ut),0===p)return a.set(-2,-1,-1);var d=1/p,v=(h*c-s*f)*d,m=(u*f-s*c)*d;return a.set(1-v-m,m,v)}}(),containsPoint:function(){var e=new Ut;return function(t,n,r,l){return an.getBarycoord(t,n,r,l,e),e.x>=0&&e.y>=0&&e.x+e.y<=1}}(),getUV:function(){var e=new Ut;return function(t,n,r,l,i,o,a,u){return this.getBarycoord(t,n,r,l,e),u.set(0,0),u.addScaledVector(i,e.x),u.addScaledVector(o,e.y),u.addScaledVector(a,e.z),u}}(),isFrontFacing:function(){var e=new Ut,t=new Ut;return function(n,r,l,i){return e.subVectors(l,r),t.subVectors(n,r),e.cross(t).dot(i)<0}}()}),Object.assign(an.prototype,{set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:function(){var e=new Ut,t=new Ut;return function(){return e.subVectors(this.c,this.b),t.subVectors(this.a,this.b),.5*e.cross(t).length()}}(),getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new Ut),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return an.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new Ut),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return an.getBarycoord(e,this.a,this.b,this.c,t)},getUV:function(e,t,n,r,l){return an.getUV(e,this.a,this.b,this.c,t,n,r,l)},containsPoint:function(e){return an.containsPoint(e,this.a,this.b,this.c)},isFrontFacing:function(e){return an.isFrontFacing(this.a,this.b,this.c,e)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:function(){var e=new Ut,t=new Ut,n=new Ut,r=new Ut,l=new Ut,i=new Ut;return function(o,a){void 0===a&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),a=new Ut);var u,s,c=this.a,h=this.b,f=this.c;e.subVectors(h,c),t.subVectors(f,c),r.subVectors(o,c);var p=e.dot(r),d=t.dot(r);if(p<=0&&d<=0)return a.copy(c);l.subVectors(o,h);var v=e.dot(l),m=t.dot(l);if(v>=0&&m<=v)return a.copy(h);var g=p*m-v*d;if(g<=0&&p>=0&&v<=0)return u=p/(p-v),a.copy(c).addScaledVector(e,u);i.subVectors(o,f);var y=e.dot(i),b=t.dot(i);if(b>=0&&y<=b)return a.copy(f);var w=y*d-p*b;if(w<=0&&d>=0&&b<=0)return s=d/(d-b),a.copy(c).addScaledVector(t,s);var _=v*b-y*m;if(_<=0&&m-v>=0&&y-b>=0)return n.subVectors(f,h),s=(m-v)/(m-v+(y-b)),a.copy(h).addScaledVector(n,s);var x=1/(_+w+g);return u=w*x,s=g*x,a.copy(c).addScaledVector(e,u).addScaledVector(t,s)}}(),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}});var un={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};function sn(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}function cn(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}function hn(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function fn(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}function pn(e,t,n,r,l,i){this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new Ut,this.vertexNormals=Array.isArray(r)?r:[],this.color=l&&l.isColor?l:new sn,this.vertexColors=Array.isArray(l)?l:[],this.materialIndex=void 0!==i?i:0}Object.assign(sn.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(e,t,n){if(e=jt.euclideanModulo(e,1),t=jt.clamp(t,0,1),n=jt.clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+t):n+t-n*t,l=2*n-r;this.r=cn(l,r,e+1/3),this.g=cn(l,r,e),this.b=cn(l,r,e-1/3)}return this},setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var r,l=n[1],i=n[2];switch(l){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(i)){var o=parseFloat(r[1])/360,a=parseInt(r[2],10)/100,u=parseInt(r[3],10)/100;return t(r[5]),this.setHSL(o,a,u)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var s,c=(s=n[1]).length;if(3===c)return this.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,this;if(6===c)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,this}e&&e.length>0&&(void 0!==(s=un[e])?this.setHex(s):console.warn("THREE.Color: Unknown color "+e));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},convertGammaToLinear:function(e){return this.copyGammaToLinear(this,e),this},convertLinearToGamma:function(e){return this.copyLinearToGamma(this,e),this},copySRGBToLinear:function(e){return this.r=hn(e.r),this.g=hn(e.g),this.b=hn(e.b),this},copyLinearToSRGB:function(e){return this.r=fn(e.r),this.g=fn(e.g),this.b=fn(e.b),this},convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n,r=this.r,l=this.g,i=this.b,o=Math.max(r,l,i),a=Math.min(r,l,i),u=(a+o)/2;if(a===o)t=0,n=0;else{var s=o-a;switch(n=u<=.5?s/(o+a):s/(2-o-a),o){case r:t=(l-i)/s+(lt&&(t=e[n]);return t}vn.prototype=Object.assign(Object.create(r.prototype),{constructor:vn,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var 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."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===b;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var 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),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.shininess&&(n.shininess=this.shininess),void 0!==this.clearCoat&&(n.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(n.clearCoatRoughness=this.clearCoatRoughness),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),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.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==C&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==m&&(n.side=this.side),this.vertexColors!==_&&(n.vertexColors=this.vertexColors),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,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),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.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!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.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var l=r(e.textures),i=r(e.images);l.length>0&&(n.textures=l),i.length>0&&(n.images=i)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.lights=e.lights,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,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.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.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.userData=JSON.parse(JSON.stringify(e.userData)),this.clipShadows=e.clipShadows,this.clipIntersection=e.clipIntersection;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var l=0;l!==r;++l)n[l]=t[l].clone()}return this.clippingPlanes=n,this.shadowSide=e.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),mn.prototype=Object.create(vn.prototype),mn.prototype.constructor=mn,mn.prototype.isMeshBasicMaterial=!0,mn.prototype.copy=function(e){return vn.prototype.copy.call(this,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.skinning=e.skinning,this.morphTargets=e.morphTargets,this},Object.defineProperty(gn.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(gn.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==e?e.length/this.itemSize:0,this.array=e,this},setDynamic:function(e){return this.dynamic=e,this},copy:function(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.dynamic=e.dynamic,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,l=this.itemSize;r0,o=l[1]&&l[1].length>0,a=e.morphTargets,u=a.length;if(u>0){t=[];for(var s=0;s0){c=[];for(s=0;s0&&0===n.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(s=0;s65535?Sn:xn)(e,1):this.index=e},addAttribute:function(e,t){return t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):(this.attributes[e]=t,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(e,new gn(arguments[1],arguments[2])))},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new Gt).getNormalMatrix(e).applyToBufferAttribute(n),n.needsUpdate=!0);var r=this.attributes.tangent;void 0!==r&&((new Gt).getNormalMatrix(e).applyToBufferAttribute(r),r.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var e=new Jt;return function(t){return e.makeRotationX(t),this.applyMatrix(e),this}}(),rotateY:function(){var e=new Jt;return function(t){return e.makeRotationY(t),this.applyMatrix(e),this}}(),rotateZ:function(){var e=new Jt;return function(t){return e.makeRotationZ(t),this.applyMatrix(e),this}}(),translate:function(){var e=new Jt;return function(t,n,r){return e.makeTranslation(t,n,r),this.applyMatrix(e),this}}(),scale:function(){var e=new Jt;return function(t,n,r){return e.makeScale(t,n,r),this.applyMatrix(e),this}}(),lookAt:function(){var e=new tn;return function(t){e.lookAt(t),e.updateMatrix(),this.applyMatrix(e.matrix)}}(),center:function(){var e=new Ut;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(e).negate(),this.translate(e.x,e.y,e.z),this}}(),setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var n=new Cn(3*t.vertices.length,3),r=new Cn(3*t.colors.length,3);if(this.addAttribute("position",n.copyVector3sArray(t.vertices)),this.addAttribute("color",r.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var l=new Cn(t.lineDistances.length,1);this.addAttribute("lineDistance",l.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n0){var n=new Float32Array(3*e.normals.length);this.addAttribute("normal",new gn(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var r=new Float32Array(3*e.colors.length);this.addAttribute("color",new gn(r,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var l=new Float32Array(2*e.uvs.length);this.addAttribute("uv",new gn(l,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var i=new Float32Array(2*e.uvs2.length);this.addAttribute("uv2",new gn(i,2).copyVector2sArray(e.uvs2))}for(var o in this.groups=e.groups,e.morphTargets){for(var a=[],u=e.morphTargets[o],s=0,c=u.length;s0){var p=new Cn(4*e.skinIndices.length,4);this.addAttribute("skinIndex",p.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var d=new Cn(4*e.skinWeights.length,4);this.addAttribute("skinWeight",d.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){var e=new rn;return function(){null===this.boundingBox&&(this.boundingBox=new rn);var t=this.attributes.position,n=this.morphAttributes.position;if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),n)for(var r=0,l=n.length;r0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;null!==r&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});var l=this.attributes;for(var n in l){var i=(f=l[n]).toJSON();""!==f.name&&(i.name=f.name),e.data.attributes[n]=i}var o={},a=!1;for(var n in this.morphAttributes){for(var u=this.morphAttributes[n],s=[],c=0,h=u.length;c0&&(o[n]=s,a=!0)}a&&(e.data.morphAttributes=o);var p=this.groups;p.length>0&&(e.data.groups=JSON.parse(JSON.stringify(p)));var d=this.boundingSphere;return null!==d&&(e.data.boundingSphere={center:d.center.toArray(),radius:d.radius}),e},clone:function(){return(new Pn).copy(this)},copy:function(e){var t,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var l=e.index;null!==l&&this.setIndex(l.clone());var i=e.attributes;for(t in i){var o=i[t];this.addAttribute(t,o.clone())}var a=e.morphAttributes;for(t in a){var u=[],s=a[t];for(n=0,r=s.length;n0){var o=l[i[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(){var e=new Jt,t=new on,n=new ln,r=new Ut,l=new Ut,i=new Ut,o=new Ut,a=new Ut,u=new Ut,s=new Ut,c=new Ut,h=new Ut,f=new Ft,p=new Ft,d=new Ft,v=new Ut,m=new Ut;function b(e,t,n,r,l,i,o,a){if(null===(t.side===g?r.intersectTriangle(o,i,l,!0,a):r.intersectTriangle(l,i,o,t.side!==y,a)))return null;m.copy(a),m.applyMatrix4(e.matrixWorld);var u=n.ray.origin.distanceTo(m);return un.far?null:{distance:u,point:m.clone(),object:e}}function w(e,t,n,m,g,y,w,_,x,M){r.fromBufferAttribute(g,_),l.fromBufferAttribute(g,x),i.fromBufferAttribute(g,M);var S=e.morphTargetInfluences;if(t.morphTargets&&y&&S){s.set(0,0,0),c.set(0,0,0),h.set(0,0,0);for(var C=0,z=y.length;C0&&(k=H);for(var N=0,D=V.length;N0?1:-1,s.push(O.x,O.y,O.z),c.push(y/v),c.push(1-b/m),T+=1}}for(b=0;b0)for(s=0;s0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,n;for(this.computeFaceNormals(),e=0,t=this.faces.length;e0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,n,r,l;for(n=0,r=this.faces.length;n=0;n--){var d=f[n];for(this.faces.splice(d,1),o=0,a=this.faceVertexUvs.length;o0,m=p.vertexNormals.length>0,g=1!==p.color.r||1!==p.color.g||1!==p.color.b,y=p.vertexColors.length>0,b=0;if(b=M(b,0,0),b=M(b,1,!0),b=M(b,2,!1),b=M(b,3,d),b=M(b,4,v),b=M(b,5,m),b=M(b,6,g),b=M(b,7,y),o.push(b),o.push(p.a,p.b,p.c),o.push(p.materialIndex),d){var w=this.faceVertexUvs[0][l];o.push(z(w[0]),z(w[1]),z(w[2]))}if(v&&o.push(S(p.normal)),m){var _=p.vertexNormals;o.push(S(_[0]),S(_[1]),S(_[2]))}if(g&&o.push(C(p.color)),y){var x=p.vertexColors;o.push(C(x[0]),C(x[1]),C(x[2]))}}function M(e,t,n){return n?e|1<0&&(e.data.colors=s),h.length>0&&(e.data.uvs=[h]),e.data.faces=o,e},clone:function(){return(new kn).copy(this)},copy:function(e){var t,n,r,l,i,o;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var a=e.vertices;for(t=0,n=a.length;t0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var l={};for(var i in this.extensions)!0===this.extensions[i]&&(l[i]=!0);return Object.keys(l).length>0&&(t.extensions=l),t},Bn.prototype=Object.assign(Object.create(tn.prototype),{constructor:Bn,isCamera:!0,copy:function(e,t){return tn.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Ut),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){tn.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Un.prototype=Object.assign(Object.create(Bn.prototype),{constructor:Un,isPerspectiveCamera:!0,copy:function(e,t){return Bn.prototype.copy.call(this,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:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*jt.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*jt.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*jt.RAD2DEG*Math.atan(Math.tan(.5*jt.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,l,i){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=l,this.view.height=i,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*jt.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,l=-.5*r,i=this.view;if(null!==this.view&&this.view.enabled){var o=i.fullWidth,a=i.fullHeight;l+=i.offsetX*r/o,t-=i.offsetY*n/a,r*=i.width/o,n*=i.height/a}var u=this.filmOffset;0!==u&&(l+=e*u/this.getFilmWidth()),this.projectionMatrix.makePerspective(l,l+r,t,t-n,e,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=tn.prototype.toJSON.call(this,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}});var Gn=90,Wn=1;function qn(e,t,n,r){tn.call(this),this.type="CubeCamera";var l=new Un(Gn,Wn,e,t);l.up.set(0,-1,0),l.lookAt(new Ut(1,0,0)),this.add(l);var i=new Un(Gn,Wn,e,t);i.up.set(0,-1,0),i.lookAt(new Ut(-1,0,0)),this.add(i);var o=new Un(Gn,Wn,e,t);o.up.set(0,0,1),o.lookAt(new Ut(0,1,0)),this.add(o);var a=new Un(Gn,Wn,e,t);a.up.set(0,0,-1),a.lookAt(new Ut(0,-1,0)),this.add(a);var u=new Un(Gn,Wn,e,t);u.up.set(0,-1,0),u.lookAt(new Ut(0,0,1)),this.add(u);var s=new Un(Gn,Wn,e,t);s.up.set(0,-1,0),s.lookAt(new Ut(0,0,-1)),this.add(s),r=r||{format:De,magFilter:Me,minFilter:Me},this.renderTarget=new Yn(n,n,r),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var n=e.getRenderTarget(),r=this.renderTarget,c=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0),e.render(t,l),e.setRenderTarget(r,1),e.render(t,i),e.setRenderTarget(r,2),e.render(t,o),e.setRenderTarget(r,3),e.render(t,a),e.setRenderTarget(r,4),e.render(t,u),r.texture.generateMipmaps=c,e.setRenderTarget(r,5),e.render(t,s),e.setRenderTarget(n)},this.clear=function(e,t,n,r){for(var l=e.getRenderTarget(),i=this.renderTarget,o=0;o<6;o++)e.setRenderTarget(i,o),e.clear(t,n,r);e.setRenderTarget(l)}}function Yn(e,t,n){Xt.call(this,e,t,n)}function Kn(e,t,n,r,l,i,o,a,u,s,c,h){Yt.call(this,null,i,o,a,u,s,r,l,c,h),this.image={data:e,width:t,height:n},this.magFilter=void 0!==u?u:we,this.minFilter=void 0!==s?s:we,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function Xn(e,t){this.normal=void 0!==e?e:new Ut(1,0,0),this.constant=void 0!==t?t:0}function Zn(e,t,n,r,l,i){this.planes=[void 0!==e?e:new Xn,void 0!==t?t:new Xn,void 0!==n?n:new Xn,void 0!==r?r:new Xn,void 0!==l?l:new Xn,void 0!==i?i:new Xn]}qn.prototype=Object.create(tn.prototype),qn.prototype.constructor=qn,Yn.prototype=Object.create(Xt.prototype),Yn.prototype.constructor=Yn,Yn.prototype.isWebGLRenderTargetCube=!0,Yn.prototype.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=t.format,this.texture.encoding=t.encoding;var n=new nn,r={uniforms:{tEquirect:{value:null}},vertexShader:["varying vec3 vWorldDirection;","vec3 transformDirection( in vec3 dir, in mat4 matrix ) {","\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );","}","void main() {","\tvWorldDirection = transformDirection( position, modelMatrix );","\t#include ","\t#include ","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV;","\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;","\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},l=new Fn({type:"CubemapFromEquirect",uniforms:Vn(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:g,blending:S});l.uniforms.tEquirect.value=t;var i=new Ln(new In(5,5,5),l);n.add(i);var o=new qn(1,10,1);return o.renderTarget=this,o.renderTarget.texture.name="CubeCameraTexture",o.update(e,n),i.geometry.dispose(),i.material.dispose(),this},Kn.prototype=Object.create(Yt.prototype),Kn.prototype.constructor=Kn,Kn.prototype.isDataTexture=!0,Object.assign(Xn.prototype,{isPlane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(){var e=new Ut,t=new Ut;return function(n,r,l){var i=e.subVectors(l,r).cross(t.subVectors(n,r)).normalize();return this.setFromNormalAndCoplanarPoint(i,n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new Ut),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(){var e=new Ut;return function(t,n){void 0===n&&(console.warn("THREE.Plane: .intersectLine() target is now required"),n=new Ut);var r=t.delta(e),l=this.normal.dot(r);if(0===l)return 0===this.distanceToPoint(t.start)?n.copy(t.start):void 0;var i=-(t.start.dot(this.normal)+this.constant)/l;return i<0||i>1?void 0:n.copy(r).multiplyScalar(i).add(t.start)}}(),intersectsLine:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new Ut),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var e=new Ut,t=new Gt;return function(n,r){var l=r||t.getNormalMatrix(n),i=this.coplanarPoint(e).applyMatrix4(n),o=this.normal.applyMatrix3(l).normalize();return this.constant=-i.dot(o),this}}(),translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}}),Object.assign(Zn.prototype,{set:function(e,t,n,r,l,i){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(l),o[5].copy(i),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],l=n[1],i=n[2],o=n[3],a=n[4],u=n[5],s=n[6],c=n[7],h=n[8],f=n[9],p=n[10],d=n[11],v=n[12],m=n[13],g=n[14],y=n[15];return t[0].setComponents(o-r,c-a,d-h,y-v).normalize(),t[1].setComponents(o+r,c+a,d+h,y+v).normalize(),t[2].setComponents(o+l,c+u,d+f,y+m).normalize(),t[3].setComponents(o-l,c-u,d-f,y-m).normalize(),t[4].setComponents(o-i,c-s,d-p,y-g).normalize(),t[5].setComponents(o+i,c+s,d+p,y+g).normalize(),this},intersectsObject:function(){var e=new ln;return function(t){var n=t.geometry;return null===n.boundingSphere&&n.computeBoundingSphere(),e.copy(n.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSprite:function(){var e=new ln;return function(t){return e.center.set(0,0,0),e.radius=.7071067811865476,e.applyMatrix4(t.matrixWorld),this.intersectsSphere(e)}}(),intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,l=0;l<6;l++){if(t[l].distanceToPoint(n)0?t.max.x:t.min.x,e.y=l.normal.y>0?t.max.y:t.min.y,e.z=l.normal.z>0?t.max.z:t.min.z,l.distanceToPoint(e)<0)return!1}return!0}}(),containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}});var Jn={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\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\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_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}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * 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}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float 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 average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\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}\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};\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}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\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 linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = normalMatrix * objectTangent;\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, uv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\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}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, 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#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\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_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\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 )\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:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent ));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\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\tfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\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 fogDepth;\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 TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif",lights_pars_begin:"uniform 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 GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.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\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.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 GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",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;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, 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_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\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.specularRoughness;\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#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#endif\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#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\tfloat clearCoatInv = 1.0 - clearCoatDHR;\n\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec3 singleScattering = vec3( 0.0 );\n\t\tvec3 multiScattering = vec3( 0.0 );\n\t\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\t\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * singleScattering;\n\t\treflectedLight.indirectDiffuse += multiScattering * cosineWeightedIrradiance;\n\t\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n\t#else\n\t\treflectedLight.indirectSpecular += clearCoatInv * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#endif\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\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\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\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 = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\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#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\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\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\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, irradiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = 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#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\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#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t#endif\n#endif",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t#ifdef FLIP_SIDED\n\t\t\tnormal = - normal;\n\t\t#endif\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\tnormal = normalize( normalMatrix * normal );\n\t#else\n\t\t#ifdef USE_TANGENT\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy = normalScale * mapN.xy;\n\t\t\tnormal = normalize( vTBN * mapN );\n\t\t#else\n\t\t\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n\t\t#endif\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\t#ifdef OBJECTSPACE_NORMALMAP\n\t\tuniform mat3 normalMatrix;\n\t#else\n\t\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\t\tvec2 st0 = dFdx( vUv.st );\n\t\t\tvec2 st1 = dFdy( vUv.st );\n\t\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\t\tvec3 N = normalize( surf_norm );\n\t\t\tmat3 tsn = mat3( S, T, N );\n\t\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\t\tmapN.xy *= normalScale;\n\t\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\treturn normalize( tsn * mapN );\n\t\t}\n\t#endif\n#endif",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}\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 linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( 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 invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#if defined( DITHERING )\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#if defined( 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, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\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\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\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 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\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\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 )\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:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\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\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\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, vUv );\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\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\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 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",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}",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 = mapTexelToLinear( texColor );\n\tgl_FragColor.a *= opacity;\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}",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 \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#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}",depth_vert:"#include \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}",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 \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\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}",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}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \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 \nvoid main() {\n\t#include \n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \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( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\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\t#include \n\t#include \n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \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( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \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( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\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\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \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( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#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\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \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( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#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\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#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\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#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\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvarying vec3 vViewPosition;\n#endif\n#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\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#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\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || ( defined( USE_NORMALMAP ) && ! defined( OBJECTSPACE_NORMALMAP ) )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n}",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"},Qn={common:{diffuse:{value:new sn(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Gt},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Ft(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new sn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new sn(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new Gt}},sprite:{diffuse:{value:new sn(15658734)},opacity:{value:1},center:{value:new Ft(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new Gt}}},$n={basic:{uniforms:Hn([Qn.common,Qn.specularmap,Qn.envmap,Qn.aomap,Qn.lightmap,Qn.fog]),vertexShader:Jn.meshbasic_vert,fragmentShader:Jn.meshbasic_frag},lambert:{uniforms:Hn([Qn.common,Qn.specularmap,Qn.envmap,Qn.aomap,Qn.lightmap,Qn.emissivemap,Qn.fog,Qn.lights,{emissive:{value:new sn(0)}}]),vertexShader:Jn.meshlambert_vert,fragmentShader:Jn.meshlambert_frag},phong:{uniforms:Hn([Qn.common,Qn.specularmap,Qn.envmap,Qn.aomap,Qn.lightmap,Qn.emissivemap,Qn.bumpmap,Qn.normalmap,Qn.displacementmap,Qn.gradientmap,Qn.fog,Qn.lights,{emissive:{value:new sn(0)},specular:{value:new sn(1118481)},shininess:{value:30}}]),vertexShader:Jn.meshphong_vert,fragmentShader:Jn.meshphong_frag},standard:{uniforms:Hn([Qn.common,Qn.envmap,Qn.aomap,Qn.lightmap,Qn.emissivemap,Qn.bumpmap,Qn.normalmap,Qn.displacementmap,Qn.roughnessmap,Qn.metalnessmap,Qn.fog,Qn.lights,{emissive:{value:new sn(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Jn.meshphysical_vert,fragmentShader:Jn.meshphysical_frag},matcap:{uniforms:Hn([Qn.common,Qn.bumpmap,Qn.normalmap,Qn.displacementmap,Qn.fog,{matcap:{value:null}}]),vertexShader:Jn.meshmatcap_vert,fragmentShader:Jn.meshmatcap_frag},points:{uniforms:Hn([Qn.points,Qn.fog]),vertexShader:Jn.points_vert,fragmentShader:Jn.points_frag},dashed:{uniforms:Hn([Qn.common,Qn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Jn.linedashed_vert,fragmentShader:Jn.linedashed_frag},depth:{uniforms:Hn([Qn.common,Qn.displacementmap]),vertexShader:Jn.depth_vert,fragmentShader:Jn.depth_frag},normal:{uniforms:Hn([Qn.common,Qn.bumpmap,Qn.normalmap,Qn.displacementmap,{opacity:{value:1}}]),vertexShader:Jn.normal_vert,fragmentShader:Jn.normal_frag},sprite:{uniforms:Hn([Qn.sprite,Qn.fog]),vertexShader:Jn.sprite_vert,fragmentShader:Jn.sprite_frag},background:{uniforms:{uvTransform:{value:new Gt},t2D:{value:null}},vertexShader:Jn.background_vert,fragmentShader:Jn.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Jn.cube_vert,fragmentShader:Jn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Jn.equirect_vert,fragmentShader:Jn.equirect_frag},distanceRGBA:{uniforms:Hn([Qn.common,Qn.displacementmap,{referencePosition:{value:new Ut},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Jn.distanceRGBA_vert,fragmentShader:Jn.distanceRGBA_frag},shadow:{uniforms:Hn([Qn.lights,Qn.fog,{color:{value:new sn(0)},opacity:{value:1}}]),vertexShader:Jn.shadow_vert,fragmentShader:Jn.shadow_frag}};function er(){var e=null,t=!1,n=null;function r(l,i){!1!==t&&(n(l,i),e.requestAnimationFrame(r))}return{start:function(){!0!==t&&null!==n&&(e.requestAnimationFrame(r),t=!0)},stop:function(){t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function tr(e){var t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var l=t.get(n);void 0===l?t.set(n,function(t,n){var r=t.array,l=t.dynamic?35048:35044,i=e.createBuffer();e.bindBuffer(n,i),e.bufferData(n,r,l),t.onUploadCallback();var o=5126;return r instanceof Float32Array?o=5126:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?o=5123:r instanceof Int16Array?o=5122:r instanceof Uint32Array?o=5125:r instanceof Int32Array?o=5124:r instanceof Int8Array?o=5120:r instanceof Uint8Array&&(o=5121),{buffer:i,type:o,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version}}(n,r)):l.version0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var i="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext,o=void 0!==n.precision?n.precision:"highp",a=l(o);a!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",a,"instead."),o=a);var u=!0===n.logarithmicDepthBuffer,s=e.getParameter(34930),c=e.getParameter(35660),h=e.getParameter(3379),f=e.getParameter(34076),p=e.getParameter(34921),d=e.getParameter(36347),v=e.getParameter(36348),m=e.getParameter(36349),g=c>0,y=i||!!t.get("OES_texture_float");return{isWebGL2:i,getMaxAnisotropy:function(){if(void 0!==r)return r;var n=t.get("EXT_texture_filter_anisotropic");return r=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:l,precision:o,logarithmicDepthBuffer:u,maxTextures:s,maxVertexTextures:c,maxTextureSize:h,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:d,maxVaryings:v,maxFragmentUniforms:m,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y,maxSamples:i?e.getParameter(36183):0}}function ar(){var e=this,t=null,n=0,r=!1,l=!1,i=new Xn,o=new Gt,a={value:null,needsUpdate:!1};function u(){a.value!==t&&(a.value=t,a.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function s(t,n,r,l){var u=null!==t?t.length:0,s=null;if(0!==u){if(s=a.value,!0!==l||null===s){var c=r+4*u,h=n.matrixWorldInverse;o.getNormalMatrix(h),(null===s||s.length65535?Sn:xn)(i,1),t.update(n,34963),l[e.id]=n,n}}}function cr(e,t,n,r){var l,i,o;this.setMode=function(e){l=e},this.setIndex=function(e){i=e.type,o=e.bytesPerElement},this.render=function(t,r){e.drawElements(l,r,i,t*o),n.update(r,l)},this.renderInstances=function(a,u,s){var c;if(r.isWebGL2)c=e;else if(null===(c=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[r.isWebGL2?"drawElementsInstanced":"drawElementsInstancedANGLE"](l,s,i,u*o,a.maxInstancedCount),n.update(s,l,a.maxInstancedCount)}}function hr(e){var t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(r=r||1,t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 5:case 6:t.triangles+=r*(e-2);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function fr(e,t){return Math.abs(t[1])-Math.abs(e[1])}function pr(e){var t={},n=new Float32Array(8);return{update:function(r,l,i,o){var a=r.morphTargetInfluences,u=a.length,s=t[l.id];if(void 0===s){s=[];for(var c=0;c0)return e;var l=t*n,i=xr[l];if(void 0===i&&(i=new Float32Array(l),xr[l]=i),0!==t){r.toArray(i,0);for(var o=1,a=0;o!==t;++o)a+=n,e[o].toArray(i,a)}return i}function Er(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n/gm,function(e,t){var n=Jn[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return xl(n)})}function Ml(e){return e.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(e,t,n,r){for(var l="",i=parseInt(t);i0?e.gammaFactor:1,w=o.isWebGL2?"":function(e,t,n){return[(e=e||{}).derivatives||t.envMapCubeUV||t.bumpMap||t.normalMap&&!t.objectSpaceNormalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(bl).join("\n")}(r.extensions,i,t),_=function(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(u),x=a.createProgram();if(r.isRawShaderMaterial?((g=[_].filter(bl).join("\n")).length>0&&(g+="\n"),(y=[w,_].filter(bl).join("\n")).length>0&&(y+="\n")):(g=["precision "+i.precision+" float;","precision "+i.precision+" int;","#define SHADER_NAME "+l.name,_,i.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+i.maxBones,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+p:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMap&&i.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",i.displacementMap&&i.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.vertexTangents?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.useVertexTexture?"#define BONE_TEXTURE":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&!1===i.flatShading?"#define USE_MORPHNORMALS":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+h:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&(o.isWebGL2||t.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(bl).join("\n"),y=[w,"precision "+i.precision+" float;","precision "+i.precision+" int;","#define SHADER_NAME "+l.name,_,i.alphaTest?"#define ALPHATEST "+i.alphaTest+(i.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+b,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+f:"",i.envMap?"#define "+p:"",i.envMap?"#define "+m:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMap&&i.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.vertexTangents?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+h:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&(o.isWebGL2||t.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",i.envMap&&(o.isWebGL2||t.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",i.toneMapping!==re?"#define TONE_MAPPING":"",i.toneMapping!==re?Jn.tonemapping_pars_fragment:"",i.toneMapping!==re?yl("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.outputEncoding||i.mapEncoding||i.matcapEncoding||i.envMapEncoding||i.emissiveMapEncoding?Jn.encodings_pars_fragment:"",i.mapEncoding?ml("mapTexelToLinear",i.mapEncoding):"",i.matcapEncoding?ml("matcapTexelToLinear",i.matcapEncoding):"",i.envMapEncoding?ml("envMapTexelToLinear",i.envMapEncoding):"",i.emissiveMapEncoding?ml("emissiveMapTexelToLinear",i.emissiveMapEncoding):"",i.outputEncoding?gl("linearToOutputTexel",i.outputEncoding):"",i.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(bl).join("\n")),s=_l(s=wl(s=xl(s),i),i),c=_l(c=wl(c=xl(c),i),i),s=Ml(s),c=Ml(c),o.isWebGL2&&!r.isRawShaderMaterial){var M=!1,S=/^\s*#version\s+300\s+es\s*\n/;r.isShaderMaterial&&null!==s.match(S)&&null!==c.match(S)&&(M=!0,s=s.replace(S,""),c=c.replace(S,"")),g=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,y=["#version 300 es\n","#define varying in",M?"":"out highp vec4 pc_fragColor;",M?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+y}var C,z,T=y+c,E=fl(a,35633,g+s),O=fl(a,35632,T);if(a.attachShader(x,E),a.attachShader(x,O),void 0!==r.index0AttributeName?a.bindAttribLocation(x,0,r.index0AttributeName):!0===i.morphTargets&&a.bindAttribLocation(x,0,"position"),a.linkProgram(x),e.debug.checkShaderErrors){var P=a.getProgramInfoLog(x).trim(),L=a.getShaderInfoLog(E).trim(),A=a.getShaderInfoLog(O).trim(),k=!0,R=!0;if(!1===a.getProgramParameter(x,35714)){k=!1;var I=vl(a,E,"vertex"),V=vl(a,O,"fragment");console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(x,35715),"gl.getProgramInfoLog",P,I,V)}else""!==P?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",P):""!==L&&""!==A||(R=!1);R&&(this.diagnostics={runnable:k,material:r,programLog:P,vertexShader:{log:L,prefix:g},fragmentShader:{log:A,prefix:y}})}return a.deleteShader(E),a.deleteShader(O),this.getUniforms=function(){return void 0===C&&(C=new hl(a,x)),C},this.getAttributes=function(){return void 0===z&&(z=function(e,t){for(var n={},r=e.getProgramParameter(t,35721),l=0;l0,maxBones:f,useVertexTexture:n.floatVertexTextures,morphTargets:t.morphTargets,morphNormals:t.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numClippingPlanes:u,numClipIntersection:s,dithering:t.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.receiveShadow&&i.length>0,shadowMapType:e.shadowMap.type,toneMapping:e.toneMapping,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:t.premultipliedAlpha,alphaTest:t.alphaTest,doubleSided:t.side===y,flipSided:t.side===g,depthPacking:void 0!==t.depthPacking&&t.depthPacking}},this.getProgramCode=function(t,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var l in t.defines)r.push(l),r.push(t.defines[l]);for(var o=0;o1&&n.sort(Tl),r.length>1&&r.sort(El)}}}function Pl(){var e={};function t(n){var r=n.target;r.removeEventListener("dispose",t),delete e[r.id]}return{get:function(n,r){var l,i=e[n.id];return void 0===i?(l=new Ol,e[n.id]={},e[n.id][r.id]=l,n.addEventListener("dispose",t)):void 0===(l=i[r.id])&&(l=new Ol,i[r.id]=l),l},dispose:function(){e={}}}}function Ll(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new Ut,color:new sn,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Ft};break;case"SpotLight":n={position:new Ut,direction:new Ut,color:new sn,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Ft};break;case"PointLight":n={position:new Ut,color:new sn,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Ft,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new Ut,skyColor:new sn,groundColor:new sn};break;case"RectAreaLight":n={color:new sn,position:new Ut,halfWidth:new Ut,halfHeight:new Ut}}return e[t.id]=n,n}}}var Al=0;function kl(){for(var e=new Ll,t={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,shadowsLength:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},n=0;n<9;n++)t.probe.push(new Ut);var r=new Ut,l=new Jt,i=new Jt;return{setup:function(n,o,a){for(var u=0,s=0,c=0,h=0;h<9;h++)t.probe[h].set(0,0,0);for(var f=0,p=0,d=0,v=0,m=0,g=a.matrixWorldInverse,y=(h=0,n.length);h0:a&&a.isGeometry&&(m=a.morphTargets&&a.morphTargets.length>0)),t.isSkinnedMesh&&!1===n.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t);var g=t.isSkinnedMesh&&n.skinning,y=0;m&&(y|=s),g&&(y|=c),u=h[y]}if(e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var w=u.uuid,_=n.uuid,x=v[w];void 0===x&&(x={},v[w]=x);var M=x[_];void 0===M&&(M=u.clone(),x[_]=M),u=M}return u.visible=n.visible,u.wireframe=n.wireframe,u.side=null!=n.shadowSide?n.shadowSide:b[n.side],u.clipShadows=n.clipShadows,u.clippingPlanes=n.clippingPlanes,u.clipIntersection=n.clipIntersection,u.wireframeLinewidth=n.wireframeLinewidth,u.linewidth=n.linewidth,r&&u.isMeshDistanceMaterial&&(u.referencePosition.copy(l),u.nearDistance=i,u.farDistance=o),u}function L(n,l,i,o){if(!1!==n.visible){if(n.layers.test(l.layers)&&(n.isMesh||n.isLine||n.isPoints)&&n.castShadow&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,n.matrixWorld);var a=t.update(n),s=n.material;if(Array.isArray(s))for(var c=a.groups,h=0,f=c.length;h=1):-1!==U.indexOf("OpenGL ES")&&(B=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(U)[1]),F=B>=2);var G=null,W={},ee=new Kt,te=new Kt;function ne(t,n,r){var l=new Uint8Array(4),i=e.createTexture();e.bindTexture(t,i),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var o=0;or||e.height>r)&&(l=r/Math.max(e.width,e.height)),l<1||!0===t){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){var i=t?jt.floorPowerOfTwo:Math.floor,o=i(l*e.width),u=i(l*e.height);void 0===a&&(a=c(o,u));var s=n?c(o,u):a;return s.width=o,s.height=u,s.getContext("2d").drawImage(e,0,0,o,u),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+u+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function f(e){return jt.isPowerOfTwo(e.width)&&jt.isPowerOfTwo(e.height)}function p(e,t){return e.generateMipmaps&&t&&e.minFilter!==we&&e.minFilter!==Me}function d(t,n,l,i){e.generateMipmap(t),r.get(n).__maxMipLevel=Math.log(Math.max(l,i))*Math.LOG2E}function v(e,n){if(!l.isWebGL2)return e;var r=e;return 6403===e&&(5126===n&&(r=33326),5131===n&&(r=33325),5121===n&&(r=33321)),6407===e&&(5126===n&&(r=34837),5131===n&&(r=34843),5121===n&&(r=32849)),6408===e&&(5126===n&&(r=34836),5131===n&&(r=34842),5121===n&&(r=32856)),33325===r||33326===r||34842===r||34836===r?t.get("EXT_color_buffer_float"):34843!==r&&34837!==r||console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),r}function m(e){return e===we||e===_e||e===xe?9728:9729}function g(t){var n=t.target;n.removeEventListener("dispose",g),function(t){var n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&delete u[n.id],o.memory.textures--}function y(t){var n=t.target;n.removeEventListener("dispose",y),function(t){var n=r.get(t),l=r.get(t.texture);if(!t)return;void 0!==l.__webglTexture&&e.deleteTexture(l.__webglTexture);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLRenderTargetCube)for(var i=0;i<6;i++)e.deleteFramebuffer(n.__webglFramebuffer[i]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[i]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);r.remove(t.texture),r.remove(t)}(n),o.memory.textures--}var b=0;function w(e,t){var l=r.get(e);if(e.isVideoTexture&&function(e){var t=e.id,n=o.render.frame;u[t]!==n&&(u[t]=n,e.update())}(e),e.version>0&&l.__version!==e.version){var i=e.image;if(void 0===i)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==i.complete)return void C(l,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,l.__webglTexture)}function _(t,o){var a=r.get(t);if(6===t.image.length)if(t.version>0&&a.__version!==t.version){S(a,t),n.activeTexture(33984+o),n.bindTexture(34067,a.__webglTexture),e.pixelStorei(37440,t.flipY);for(var u=t&&t.isCompressedTexture,s=t.image[0]&&t.image[0].isDataTexture,c=[],m=0;m<6;m++)c[m]=u||s?s?t.image[m].image:t.image[m]:h(t.image[m],!1,!0,l.maxCubemapSize);var g=c[0],y=f(g)||l.isWebGL2,b=i.convert(t.format),w=i.convert(t.type),_=v(b,w);M(34067,t,y);for(m=0;m<6;m++)if(u)for(var x,C=c[m].mipmaps,z=0,T=C.length;z-1?n.compressedTexImage2D(34069+m,z,_,x.width,x.height,0,x.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+m,z,_,x.width,x.height,0,b,w,x.data);else s?n.texImage2D(34069+m,0,_,c[m].width,c[m].height,0,b,w,c[m].data):n.texImage2D(34069+m,0,_,b,w,c[m]);a.__maxMipLevel=u?C.length-1:0,p(t,y)&&d(34067,t,g.width,g.height),a.__version=t.version,t.onUpdate&&t.onUpdate(t)}else n.activeTexture(33984+o),n.bindTexture(34067,a.__webglTexture)}function x(e,t){n.activeTexture(33984+t),n.bindTexture(34067,r.get(e).__webglTexture)}function M(n,o,a){var u;if(a?(e.texParameteri(n,10242,i.convert(o.wrapS)),e.texParameteri(n,10243,i.convert(o.wrapT)),32879!==n&&35866!==n||e.texParameteri(n,32882,i.convert(o.wrapR)),e.texParameteri(n,10240,i.convert(o.magFilter)),e.texParameteri(n,10241,i.convert(o.minFilter))):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),o.wrapS===ye&&o.wrapT===ye||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,m(o.magFilter)),e.texParameteri(n,10241,m(o.minFilter)),o.minFilter!==we&&o.minFilter!==Me&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),u=t.get("EXT_texture_filter_anisotropic")){if(o.type===Ae&&null===t.get("OES_texture_float_linear"))return;if(o.type===ke&&null===(l.isWebGL2||t.get("OES_texture_half_float_linear")))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,u.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,l.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function S(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",g),t.__webglTexture=e.createTexture(),o.memory.textures++)}function C(t,r,o){var a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),S(t,r),n.activeTexture(33984+o),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment);var u=function(e){return!l.isWebGL2&&(e.wrapS!==ye||e.wrapT!==ye||e.minFilter!==we&&e.minFilter!==Me)}(r)&&!1===f(r.image),s=h(r.image,u,!1,l.maxTextureSize),c=f(s)||l.isWebGL2,m=i.convert(r.format),g=i.convert(r.type),y=v(m,g);M(a,r,c);var b,w=r.mipmaps;if(r.isDepthTexture){if(y=6402,r.type===Ae){if(!l.isWebGL2)throw new Error("Float Depth Texture only supported in WebGL2.0");y=36012}else l.isWebGL2&&(y=33189);r.format===Ge&&6402===y&&r.type!==Oe&&r.type!==Le&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Oe,g=i.convert(r.type)),r.format===We&&(y=34041,r.type!==He&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=He,g=i.convert(r.type))),n.texImage2D(3553,0,y,s.width,s.height,0,m,g,null)}else if(r.isDataTexture)if(w.length>0&&c){for(var _=0,x=w.length;_-1?n.compressedTexImage2D(3553,_,y,b.width,b.height,0,b.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,_,y,b.width,b.height,0,m,g,b.data);t.__maxMipLevel=w.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,y,s.width,s.height,s.depth,0,m,g,s.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,y,s.width,s.height,s.depth,0,m,g,s.data),t.__maxMipLevel=0;else if(w.length>0&&c){for(_=0,x=w.length;_=l.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l.maxTextures),b+=1,e},this.resetTextureUnits=function(){b=0},this.setTexture2D=w,this.setTexture2DArray=function(e,t){var l=r.get(e);e.version>0&&l.__version!==e.version?C(l,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,l.__webglTexture))},this.setTexture3D=function(e,t){var l=r.get(e);e.version>0&&l.__version!==e.version?C(l,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,l.__webglTexture))},this.setTextureCube=_,this.setTextureCubeDynamic=x,this.setupRenderTarget=function(t){var a=r.get(t),u=r.get(t.texture);t.addEventListener("dispose",y),u.__webglTexture=e.createTexture(),o.memory.textures++;var s=!0===t.isWebGLRenderTargetCube,c=!0===t.isWebGLMultisampleRenderTarget,h=f(t)||l.isWebGL2;if(s){a.__webglFramebuffer=[];for(var m=0;m<6;m++)a.__webglFramebuffer[m]=e.createFramebuffer()}else if(a.__webglFramebuffer=e.createFramebuffer(),c)if(l.isWebGL2){a.__webglMultisampledFramebuffer=e.createFramebuffer(),a.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,a.__webglColorRenderbuffer);var g=v(i.convert(t.texture.format),i.convert(t.texture.type)),b=O(t);e.renderbufferStorageMultisample(36161,b,g,t.width,t.height),e.bindFramebuffer(36160,a.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,a.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(a.__webglDepthRenderbuffer=e.createRenderbuffer(),T(a.__webglDepthRenderbuffer,t,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(s){for(n.bindTexture(34067,u.__webglTexture),M(34067,t.texture,h),m=0;m<6;m++)z(a.__webglFramebuffer[m],t,36064,34069+m);p(t.texture,h)&&d(34067,t.texture,t.width,t.height),n.bindTexture(34067,null)}else n.bindTexture(3553,u.__webglTexture),M(3553,t.texture,h),z(a.__webglFramebuffer,t,36064,3553),p(t.texture,h)&&d(3553,t.texture,t.width,t.height),n.bindTexture(3553,null);t.depthBuffer&&E(t)},this.updateRenderTargetMipmap=function(e){var t=e.texture;if(p(t,f(e)||l.isWebGL2)){var i=e.isWebGLRenderTargetCube?34067:3553,o=r.get(t).__webglTexture;n.bindTexture(i,o),d(i,t,e.width,e.height),n.bindTexture(i,null)}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(l.isWebGL2){var n=r.get(t);e.bindFramebuffer(36008,n.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,n.__webglFramebuffer);var i=t.width,o=t.height,a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===P&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),P=!0),e=e.texture),w(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLRenderTargetCube&&(!1===L&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),L=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?_(e,t):x(e,t)}}function Fl(e,t,n){return{convert:function(e){var r;if(e===ge)return 10497;if(e===ye)return 33071;if(e===be)return 33648;if(e===we)return 9728;if(e===_e)return 9984;if(e===xe)return 9986;if(e===Me)return 9729;if(e===Se)return 9985;if(e===Ce)return 9987;if(e===ze)return 5121;if(e===Re)return 32819;if(e===Ie)return 32820;if(e===Ve)return 33635;if(e===Te)return 5120;if(e===Ee)return 5122;if(e===Oe)return 5123;if(e===Pe)return 5124;if(e===Le)return 5125;if(e===Ae)return 5126;if(e===ke){if(n.isWebGL2)return 5131;if(null!==(r=t.get("OES_texture_half_float")))return r.HALF_FLOAT_OES}if(e===Ne)return 6406;if(e===De)return 6407;if(e===je)return 6408;if(e===Fe)return 6409;if(e===Be)return 6410;if(e===Ge)return 6402;if(e===We)return 34041;if(e===qe)return 6403;if(e===P)return 32774;if(e===L)return 32778;if(e===A)return 32779;if(e===I)return 0;if(e===V)return 1;if(e===H)return 768;if(e===N)return 769;if(e===D)return 770;if(e===j)return 771;if(e===F)return 772;if(e===B)return 773;if(e===U)return 774;if(e===G)return 775;if(e===W)return 776;if((e===Ye||e===Ke||e===Xe||e===Ze)&&null!==(r=t.get("WEBGL_compressed_texture_s3tc"))){if(e===Ye)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===Ke)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===Xe)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===Ze)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((e===Je||e===Qe||e===$e||e===et)&&null!==(r=t.get("WEBGL_compressed_texture_pvrtc"))){if(e===Je)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===Qe)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===$e)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===et)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e===tt&&null!==(r=t.get("WEBGL_compressed_texture_etc1")))return r.COMPRESSED_RGB_ETC1_WEBGL;if((e===nt||e===rt||e===lt||e===it||e===ot||e===at||e===ut||e===st||e===ct||e===ht||e===ft||e===pt||e===dt||e===vt)&&null!==(r=t.get("WEBGL_compressed_texture_astc")))return e;if(e===k||e===R){if(n.isWebGL2){if(e===k)return 32775;if(e===R)return 32776}if(null!==(r=t.get("EXT_blend_minmax"))){if(e===k)return r.MIN_EXT;if(e===R)return r.MAX_EXT}}if(e===He){if(n.isWebGL2)return 34042;if(null!==(r=t.get("WEBGL_depth_texture")))return r.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Bl(){tn.call(this),this.type="Group"}function Ul(e){Un.call(this),this.cameras=e||[]}Vl.prototype=Object.create(vn.prototype),Vl.prototype.constructor=Vl,Vl.prototype.isMeshDepthMaterial=!0,Vl.prototype.copy=function(e){return vn.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},Hl.prototype=Object.create(vn.prototype),Hl.prototype.constructor=Hl,Hl.prototype.isMeshDistanceMaterial=!0,Hl.prototype.copy=function(e){return vn.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this},Bl.prototype=Object.assign(Object.create(tn.prototype),{constructor:Bl,isGroup:!0}),Ul.prototype=Object.assign(Object.create(Un.prototype),{constructor:Ul,isArrayCamera:!0});var Gl,Wl=new Ut,ql=new Ut;function Yl(e,t,n){Wl.setFromMatrixPosition(t.matrixWorld),ql.setFromMatrixPosition(n.matrixWorld);var r=Wl.distanceTo(ql),l=t.projectionMatrix.elements,i=n.projectionMatrix.elements,o=l[14]/(l[10]-1),a=l[14]/(l[10]+1),u=(l[9]+1)/l[5],s=(l[9]-1)/l[5],c=(l[8]-1)/l[0],h=(i[8]+1)/i[0],f=o*c,p=o*h,d=r/(-c+h),v=d*-c;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(v),e.translateZ(d),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.getInverse(e.matrixWorld);var m=o+d,g=a+d,y=f-v,b=p+(r-v),w=u*a/g*m,_=s*a/g*m;e.projectionMatrix.makePerspective(y,b,w,_,m,g)}function Kl(e){var t,n,r=this,l=null,i=null,o=null,a=[],u=new Jt,s=new Jt,c=1,h="local-floor";"undefined"!==typeof window&&"VRFrameData"in window&&(i=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",_,!1));var f=new Jt,p=new Bt,d=new Ut,v=new Un;v.viewport=new Kt,v.layers.enable(1);var m=new Un;m.viewport=new Kt,m.layers.enable(2);var g=new Ul([v,m]);function y(){return null!==l&&!0===l.isPresenting}g.layers.enable(1),g.layers.enable(2);var b,w=new Ft;function _(){if(y()){var i=l.getEyeParameters("left");t=2*i.renderWidth*c,n=i.renderHeight*c,b=e.getPixelRatio(),e.getSize(w),e.setDrawingBufferSize(t,n,1),v.viewport.set(0,0,t/2,n),m.viewport.set(t/2,0,t/2,n),C.start(),r.dispatchEvent({type:"sessionstart"})}else r.enabled&&e.setDrawingBufferSize(w.width,w.height,b),C.stop(),r.dispatchEvent({type:"sessionend"})}var x=[];function M(e){for(var t=navigator.getGamepads&&navigator.getGamepads(),n=0,r=0,l=t.length;n=0){var u=r[o];if(void 0!==u){var s=u.normalized,c=u.itemSize,h=x.get(u);if(void 0===h)continue;var f=h.buffer,p=h.type,g=h.bytesPerElement;if(u.isInterleavedBufferAttribute){var b=u.data,w=b.stride,_=u.offset;b&&b.isInstancedInterleavedBuffer?(y.enableAttributeAndDivisor(a,b.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=b.meshPerAttribute*b.count)):y.enableAttribute(a),d.bindBuffer(34962,f),d.vertexAttribPointer(a,c,p,s,w*g,_*g)}else u.isInstancedBufferAttribute?(y.enableAttributeAndDivisor(a,u.meshPerAttribute),void 0===n.maxInstancedCount&&(n.maxInstancedCount=u.meshPerAttribute*u.count)):y.enableAttribute(a),d.bindBuffer(34962,f),d.vertexAttribPointer(a,c,p,s,0,0)}else if(void 0!==i){var M=i[o];if(void 0!==M)switch(M.length){case 2:d.vertexAttrib2fv(a,M);break;case 3:d.vertexAttrib3fv(a,M);break;case 4:d.vertexAttrib4fv(a,M);break;default:d.vertexAttrib1fv(a,M)}}}}y.disableUnusedAttributes()}(r,a,n),null!==c&&d.bindBuffer(34963,s.buffer));var g=1/0;null!==c?g=c.count:void 0!==h&&(g=h.count);var b=n.drawRange.start*f,w=n.drawRange.count*f,_=null!==i?i.start*f:0,S=null!==i?i.count*f:1/0,C=Math.max(b,_),z=Math.min(g,b+w,_+S)-1,T=Math.max(0,z-C+1);if(0!==T){if(l.isMesh)if(!0===r.wireframe)y.setLineWidth(r.wireframeLinewidth*oe()),p.setMode(1);else switch(l.drawMode){case Ct:p.setMode(4);break;case zt:p.setMode(5);break;case Tt:p.setMode(6)}else if(l.isLine){var E=r.linewidth;void 0===E&&(E=1),y.setLineWidth(E*oe()),l.isLineSegments?p.setMode(1):l.isLineLoop?p.setMode(2):p.setMode(3)}else l.isPoints?p.setMode(0):l.isSprite&&p.setMode(4);n&&n.isInstancedBufferGeometry?n.maxInstancedCount>0&&p.renderInstances(n,C,T):p.render(C,T)}},this.compile=function(e,t){(p=T.get(e,t)).init(),e.traverse(function(e){e.isLight&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))}),p.setupLights(t),e.traverse(function(t){if(t.material)if(Array.isArray(t.material))for(var n=0;n=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(d=0;d=0&&e.numSupportedMorphNormals++}var v=r.shader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=ee.numPlanes,r.numIntersection=ee.numIntersection,v.clippingPlanes=ee.uniform),r.fog=t,r.lightsStateVersion=o,e.lights&&(v.ambientLightColor.value=l.state.ambient,v.lightProbe.value=l.state.probe,v.directionalLights.value=l.state.directional,v.spotLights.value=l.state.spot,v.rectAreaLights.value=l.state.rectArea,v.pointLights.value=l.state.point,v.hemisphereLights.value=l.state.hemi,v.directionalShadowMap.value=l.state.directionalShadowMap,v.directionalShadowMatrix.value=l.state.directionalShadowMatrix,v.spotShadowMap.value=l.state.spotShadowMap,v.spotShadowMatrix.value=l.state.spotShadowMatrix,v.pointShadowMap.value=l.state.pointShadowMap,v.pointShadowMatrix.value=l.state.pointShadowMatrix);var m=r.program.getUniforms(),g=hl.seqWithValue(m.seq,v);r.uniformsList=g}function we(e,t,n,r){_.resetTextureUnits();var l=w.get(n),i=p.state.lights;if(te&&(ne||e!==B)){var o=e===B&&n.id===j;ee.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,l,o)}!1===n.needsUpdate&&(void 0===l.program?n.needsUpdate=!0:n.fog&&l.fog!==t?n.needsUpdate=!0:n.lights&&l.lightsStateVersion!==i.state.version?n.needsUpdate=!0:void 0===l.numClippingPlanes||l.numClippingPlanes===ee.numPlanes&&l.numIntersection===ee.numIntersection||(n.needsUpdate=!0)),n.needsUpdate&&(be(n,t,r),n.needsUpdate=!1);var a,u,s=!1,c=!1,h=!1,f=l.program,v=f.getUniforms(),b=l.shader.uniforms;if(y.useProgram(f.program)&&(s=!0,c=!0,h=!0),n.id!==j&&(j=n.id,c=!0),s||B!==e){if(v.setValue(d,"projectionMatrix",e.projectionMatrix),m.logarithmicDepthBuffer&&v.setValue(d,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),B!==e&&(B=e,c=!0,h=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var x=v.map.cameraPosition;void 0!==x&&x.setValue(d,ie.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&v.setValue(d,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){v.setOptional(d,r,"bindMatrix"),v.setOptional(d,r,"bindMatrixInverse");var M=r.skeleton;if(M){var S=M.bones;if(m.floatVertexTextures){if(void 0===M.boneTexture){var C=Math.sqrt(4*S.length);C=jt.ceilPowerOfTwo(C),C=Math.max(C,4);var z=new Float32Array(C*C*4);z.set(M.boneMatrices);var T=new Kn(z,C,C,je,Ae);T.needsUpdate=!0,M.boneMatrices=z,M.boneTexture=T,M.boneTextureSize=C}v.setValue(d,"boneTexture",M.boneTexture,_),v.setValue(d,"boneTextureSize",M.boneTextureSize)}else v.setOptional(d,M,"boneMatrices")}}return c&&(v.setValue(d,"toneMappingExposure",k.toneMappingExposure),v.setValue(d,"toneMappingWhitePoint",k.toneMappingWhitePoint),n.lights&&(u=h,(a=b).ambientLightColor.needsUpdate=u,a.lightProbe.needsUpdate=u,a.directionalLights.needsUpdate=u,a.pointLights.needsUpdate=u,a.spotLights.needsUpdate=u,a.rectAreaLights.needsUpdate=u,a.hemisphereLights.needsUpdate=u),t&&n.fog&&function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}(b,t),n.isMeshBasicMaterial?_e(b,n):n.isMeshLambertMaterial?(_e(b,n),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(b,n)):n.isMeshPhongMaterial?(_e(b,n),n.isMeshToonMaterial?function(e,t){xe(e,t),t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(b,n):xe(b,n)):n.isMeshStandardMaterial?(_e(b,n),n.isMeshPhysicalMaterial?function(e,t){Me(e,t),e.reflectivity.value=t.reflectivity,e.clearCoat.value=t.clearCoat,e.clearCoatRoughness.value=t.clearCoatRoughness}(b,n):Me(b,n)):n.isMeshMatcapMaterial?(_e(b,n),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===g&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===g&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(b,n)):n.isMeshDepthMaterial?(_e(b,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(b,n)):n.isMeshDistanceMaterial?(_e(b,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(b,n)):n.isMeshNormalMaterial?(_e(b,n),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===g&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===g&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(b,n)):n.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(b,n),n.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(b,n)):n.isPointsMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*X,e.scale.value=.5*K,e.map.value=t.map,null!==t.map&&(!0===t.map.matrixAutoUpdate&&t.map.updateMatrix(),e.uvTransform.value.copy(t.map.matrix))}(b,n):n.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,e.map.value=t.map,null!==t.map&&(!0===t.map.matrixAutoUpdate&&t.map.updateMatrix(),e.uvTransform.value.copy(t.map.matrix))}(b,n):n.isShadowMaterial&&(b.color.value.copy(n.color),b.opacity.value=n.opacity),void 0!==b.ltc_1&&(b.ltc_1.value=Qn.LTC_1),void 0!==b.ltc_2&&(b.ltc_2.value=Qn.LTC_2),hl.upload(d,l.uniformsList,b,_)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(hl.upload(d,l.uniformsList,b,_),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&v.setValue(d,"center",r.center),v.setValue(d,"modelViewMatrix",r.modelViewMatrix),v.setValue(d,"normalMatrix",r.normalMatrix),v.setValue(d,"modelMatrix",r.matrixWorld),f}function _e(e,t){var n;e.opacity.value=t.opacity,t.color&&e.diffuse.value.copy(t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap),t.envMap&&(e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio,e.maxMipLevel.value=w.get(t.envMap).__maxMipLevel),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity),t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}function xe(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===g&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===g&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function Me(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===g&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===g&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}me.setAnimationLoop(function(e){se.isPresenting()||ve&&ve(e)}),"undefined"!==typeof window&&me.setContext(window),this.setAnimationLoop=function(e){ve=e,se.setAnimationLoop(e),me.start()},this.render=function(e,t){var n,r;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),r=arguments[3]),t&&t.isCamera){if(!R){F.geometry=null,F.program=null,F.wireframe=!1,j=-1,B=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),se.enabled&&(t=se.getCamera(t)),(p=T.get(e,t)).init(),e.onBeforeRender(k,e,t,n||N),re.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),$.setFromMatrix(re),ne=this.localClippingEnabled,te=ee.init(this.clippingPlanes,ne,t),(f=z.get(e,t)).init(),function e(t,n,r,l){if(!1===t.visible)return;var i=t.layers.test(n.layers);if(i)if(t.isGroup)r=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(n);else if(t.isLight)p.pushLight(t),t.castShadow&&p.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||$.intersectsSprite(t)){l&&ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(re);var o=S.update(t),a=t.material;a.visible&&f.push(t,o,a,r,ie.z,null)}}else if(t.isImmediateRenderObject)l&&ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(re),f.push(t,null,t.material,r,ie.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||$.intersectsObject(t))){l&&ie.setFromMatrixPosition(t.matrixWorld).applyMatrix4(re);var o=S.update(t),a=t.material;if(Array.isArray(a))for(var u=o.groups,s=0,c=u.length;s=0&&t<=e.width-r&&n>=0&&n<=e.height-l&&d.readPixels(t,n,r,l,A.convert(c),A.convert(h),i):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{u&&d.bindFramebuffer(36160,D)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){var r=t.image.width,l=t.image.height,i=A.convert(t.format);_.setTexture2D(t,0),d.copyTexImage2D(3553,n||0,i,e.x,e.y,r,l,0)},this.copyTextureToTexture=function(e,t,n,r){var l=t.image.width,i=t.image.height,o=A.convert(n.format),a=A.convert(n.type);_.setTexture2D(n,0),t.isDataTexture?d.texSubImage2D(3553,r||0,e.x,e.y,l,i,o,a,t.image.data):d.texSubImage2D(3553,r||0,e.x,e.y,o,a,t.image)},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Jl(e,t){this.name="",this.color=new sn(e),this.density=void 0!==t?t:25e-5}function Ql(e,t,n){this.name="",this.color=new sn(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function $l(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function ei(e,t,n,r){this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function ti(e){vn.call(this),this.type="SpriteMaterial",this.color=new sn(16777215),this.map=null,this.rotation=0,this.sizeAttenuation=!0,this.lights=!1,this.transparent=!0,this.setValues(e)}function ni(e){if(tn.call(this),this.type="Sprite",void 0===Gl){Gl=new Pn;var t=new $l(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);Gl.setIndex([0,1,2,0,2,3]),Gl.addAttribute("position",new ei(t,3,0,!1)),Gl.addAttribute("uv",new ei(t,2,3,!1))}this.geometry=Gl,this.material=void 0!==e?e:new ti,this.center=new Ft(.5,.5)}function ri(){tn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function li(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),Ln.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Jt,this.bindMatrixInverse=new Jt}function ii(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var n=0,r=this.bones.length;n=0?(e(m-1e-5,v,h),f.subVectors(c,h)):(e(m+1e-5,v,h),f.subVectors(h,c)),v-1e-5>=0?(e(m,v-1e-5,h),p.subVectors(c,h)):(e(m,v+1e-5,h),p.subVectors(h,c)),s.crossVectors(f,p).normalize(),a.push(s.x,s.y,s.z),u.push(m,v)}}for(r=0;r.9&&o<.1&&(t<.2&&(i[e+0]+=1),n<.2&&(i[e+2]+=1),r<.2&&(i[e+4]+=1))}}()}(),this.addAttribute("position",new Cn(l,3)),this.addAttribute("normal",new Cn(l.slice(),3)),this.addAttribute("uv",new Cn(i,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function xi(e,t){kn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Mi(e,t)),this.mergeVertices()}function Mi(e,t){_i.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Si(e,t){kn.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ci(e,t)),this.mergeVertices()}function Ci(e,t){_i.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function zi(e,t){kn.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ti(e,t)),this.mergeVertices()}function Ti(e,t){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];_i.call(this,r,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Ei(e,t){kn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Oi(e,t)),this.mergeVertices()}function Oi(e,t){var n=(1+Math.sqrt(5))/2,r=1/n,l=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];_i.call(this,l,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Pi(e,t,n,r,l,i){kn.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:l},void 0!==i&&console.warn("THREE.TubeGeometry: taper has been removed.");var o=new Li(e,t,n,r,l);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals,this.fromBufferGeometry(o),this.mergeVertices()}function Li(e,t,n,r,l){Pn.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:l},t=t||64,n=n||1,r=r||8,l=l||!1;var i=e.computeFrenetFrames(t,l);this.tangents=i.tangents,this.normals=i.normals,this.binormals=i.binormals;var o,a,u=new Ut,s=new Ut,c=new Ft,h=new Ut,f=[],p=[],d=[],v=[];function m(l){h=e.getPointAt(l/t,h);var o=i.normals[l],c=i.binormals[l];for(a=0;a<=r;a++){var d=a/r*Math.PI*2,v=Math.sin(d),m=-Math.cos(d);s.x=m*o.x+v*c.x,s.y=m*o.y+v*c.y,s.z=m*o.z+v*c.z,s.normalize(),p.push(s.x,s.y,s.z),u.x=h.x+n*s.x,u.y=h.y+n*s.y,u.z=h.z+n*s.z,f.push(u.x,u.y,u.z)}}!function(){for(o=0;or.far||l.push({distance:y,point:e.clone(),uv:an.getUV(e,o,a,u,s,c,h,new Ft),face:null,object:this})}}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return tn.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),ri.prototype=Object.assign(Object.create(tn.prototype),{constructor:ri,isLOD:!0,copy:function(e){tn.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n1){e.setFromMatrixPosition(n.matrixWorld),t.setFromMatrixPosition(this.matrixWorld);var l=e.distanceTo(t);r[0].object.visible=!0;for(var i=1,o=r.length;i=r[i].distance;i++)r[i-1].object.visible=!1,r[i].object.visible=!0;for(;is))p.applyMatrix4(this.matrixWorld),(S=r.ray.origin.distanceTo(p))r.far||l.push({distance:S,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}else for(y=0,b=m.length/3-1;ys))p.applyMatrix4(this.matrixWorld),(S=r.ray.origin.distanceTo(p))r.far||l.push({distance:S,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else if(o.isGeometry){var x=o.vertices,M=x.length;for(y=0;ys))p.applyMatrix4(this.matrixWorld),(S=r.ray.origin.distanceTo(p))r.far||l.push({distance:S,point:f.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),si.prototype=Object.assign(Object.create(ui.prototype),{constructor:si,isLineSegments:!0,computeLineDistances:function(){var e=new Ut,t=new Ut;return function(){var n=this.geometry;if(n.isBufferGeometry)if(null===n.index){for(var r=n.attributes.position,l=[],i=0,o=r.count;ir.far)return;l.push({distance:u,distanceToRay:Math.sqrt(o),point:f.clone(),index:n,face:null,object:i})}}}}(),updateMorphTargets:function(){var e,t,n,r=this.geometry.morphAttributes,l=Object.keys(r);if(l.length>0){var i=r[l[0]];if(void 0!==i)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=i.length;e=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),di.prototype=Object.create(Yt.prototype),di.prototype.constructor=di,di.prototype.isCompressedTexture=!0,vi.prototype=Object.create(Yt.prototype),vi.prototype.constructor=vi,vi.prototype.isCanvasTexture=!0,mi.prototype=Object.create(Yt.prototype),mi.prototype.constructor=mi,mi.prototype.isDepthTexture=!0,gi.prototype=Object.create(Pn.prototype),gi.prototype.constructor=gi,yi.prototype=Object.create(kn.prototype),yi.prototype.constructor=yi,bi.prototype=Object.create(Pn.prototype),bi.prototype.constructor=bi,wi.prototype=Object.create(kn.prototype),wi.prototype.constructor=wi,_i.prototype=Object.create(Pn.prototype),_i.prototype.constructor=_i,xi.prototype=Object.create(kn.prototype),xi.prototype.constructor=xi,Mi.prototype=Object.create(_i.prototype),Mi.prototype.constructor=Mi,Si.prototype=Object.create(kn.prototype),Si.prototype.constructor=Si,Ci.prototype=Object.create(_i.prototype),Ci.prototype.constructor=Ci,zi.prototype=Object.create(kn.prototype),zi.prototype.constructor=zi,Ti.prototype=Object.create(_i.prototype),Ti.prototype.constructor=Ti,Ei.prototype=Object.create(kn.prototype),Ei.prototype.constructor=Ei,Oi.prototype=Object.create(_i.prototype),Oi.prototype.constructor=Oi,Pi.prototype=Object.create(kn.prototype),Pi.prototype.constructor=Pi,Li.prototype=Object.create(Pn.prototype),Li.prototype.constructor=Li,Li.prototype.toJSON=function(){var e=Pn.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},Ai.prototype=Object.create(kn.prototype),Ai.prototype.constructor=Ai,ki.prototype=Object.create(Pn.prototype),ki.prototype.constructor=ki,Ri.prototype=Object.create(kn.prototype),Ri.prototype.constructor=Ri,Ii.prototype=Object.create(Pn.prototype),Ii.prototype.constructor=Ii;var Vi=function(e,t,n){n=n||2;var r,l,i,o,a,u,s,c=t&&t.length,h=c?t[0]*n:e.length,f=Hi(e,0,h,n,!0),p=[];if(!f||f.next===f.prev)return p;if(c&&(f=function(e,t,n,r){var l,i,o,a,u,s=[];for(l=0,i=t.length;l80*n){r=i=e[0],l=o=e[1];for(var d=n;di&&(i=a),u>o&&(o=u);s=0!==(s=Math.max(i-r,o-l))?1/s:0}return Di(f,p,n,r,l,s),p};function Hi(e,t,n,r,l){var i,o;if(l===function(e,t,n,r){for(var l=0,i=t,o=n-r;i0)for(i=t;i=t;i-=r)o=to(i,e[i],e[i+1],o);return o&&Ji(o,o.next)&&(no(o),o=o.next),o}function Ni(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Ji(r,r.next)&&0!==Zi(r.prev,r,r.next))r=r.next;else{if(no(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function Di(e,t,n,r,l,i,o){if(e){!o&&i&&function(e,t,n,r){var l=e;do{null===l.z&&(l.z=qi(l.x,l.y,t,n,r)),l.prevZ=l.prev,l.nextZ=l.next,l=l.next}while(l!==e);l.prevZ.nextZ=null,l.prevZ=null,function(e){var t,n,r,l,i,o,a,u,s=1;do{for(n=e,e=null,i=null,o=0;n;){for(o++,r=n,a=0,t=0;t0||u>0&&r;)0!==a&&(0===u||!r||n.z<=r.z)?(l=n,n=n.nextZ,a--):(l=r,r=r.nextZ,u--),i?i.nextZ=l:e=l,l.prevZ=i,i=l;n=r}i.nextZ=null,s*=2}while(o>1)}(l)}(e,r,l,i);for(var a,u,s=e;e.prev!==e.next;)if(a=e.prev,u=e.next,i?Fi(e,r,l,i):ji(e))t.push(a.i/n),t.push(e.i/n),t.push(u.i/n),no(e),e=u.next,s=u.next;else if((e=u)===s){o?1===o?Di(e=Bi(e,t,n),t,n,r,l,i,2):2===o&&Ui(e,t,n,r,l,i):Di(Ni(e),t,n,r,l,i,1);break}}}function ji(e){var t=e.prev,n=e,r=e.next;if(Zi(t,n,r)>=0)return!1;for(var l=e.next.next;l!==e.prev;){if(Ki(t.x,t.y,n.x,n.y,r.x,r.y,l.x,l.y)&&Zi(l.prev,l,l.next)>=0)return!1;l=l.next}return!0}function Fi(e,t,n,r){var l=e.prev,i=e,o=e.next;if(Zi(l,i,o)>=0)return!1;for(var a=l.xi.x?l.x>o.x?l.x:o.x:i.x>o.x?i.x:o.x,c=l.y>i.y?l.y>o.y?l.y:o.y:i.y>o.y?i.y:o.y,h=qi(a,u,t,n,r),f=qi(s,c,t,n,r),p=e.prevZ,d=e.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==e.prev&&p!==e.next&&Ki(l.x,l.y,i.x,i.y,o.x,o.y,p.x,p.y)&&Zi(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==e.prev&&d!==e.next&&Ki(l.x,l.y,i.x,i.y,o.x,o.y,d.x,d.y)&&Zi(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&Ki(l.x,l.y,i.x,i.y,o.x,o.y,p.x,p.y)&&Zi(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==e.prev&&d!==e.next&&Ki(l.x,l.y,i.x,i.y,o.x,o.y,d.x,d.y)&&Zi(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Bi(e,t,n){var r=e;do{var l=r.prev,i=r.next.next;!Ji(l,i)&&Qi(l,r,r.next,i)&&$i(l,i)&&$i(i,l)&&(t.push(l.i/n),t.push(r.i/n),t.push(i.i/n),no(r),no(r.next),r=e=i),r=r.next}while(r!==e);return r}function Ui(e,t,n,r,l,i){var o=e;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&Xi(o,a)){var u=eo(o,a);return o=Ni(o,o.next),u=Ni(u,u.next),Di(o,t,n,r,l,i),void Di(u,t,n,r,l,i)}a=a.next}o=o.next}while(o!==e)}function Gi(e,t){return e.x-t.x}function Wi(e,t){if(t=function(e,t){var n,r=t,l=e.x,i=e.y,o=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=l&&a>o){if(o=a,a===l){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&l!==r.x&&Ki(in.x)&&$i(r,e)&&(n=r,f=u),r=r.next;return n}(e,t)){var n=eo(t,e);Ni(n,n.next)}}function qi(e,t,n,r,l){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*l)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*l)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Yi(e){var t=e,n=e;do{(t.x=0&&(e-o)*(r-a)-(n-o)*(t-a)>=0&&(n-o)*(i-a)-(l-o)*(r-a)>=0}function Xi(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Qi(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&$i(e,t)&&$i(t,e)&&function(e,t){var n=e,r=!1,l=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!==n.next.y>i&&n.next.y!==n.y&&l<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)}function Zi(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Ji(e,t){return e.x===t.x&&e.y===t.y}function Qi(e,t,n,r){return!!(Ji(e,n)&&Ji(t,r)||Ji(e,r)&&Ji(n,t))||Zi(e,t,n)>0!==Zi(e,t,r)>0&&Zi(n,r,e)>0!==Zi(n,r,t)>0}function $i(e,t){return Zi(e.prev,e,e.next)<0?Zi(e,t,e.next)>=0&&Zi(e,e.prev,t)>=0:Zi(e,t,e.prev)<0||Zi(e,e.next,t)<0}function eo(e,t){var n=new ro(e.i,e.x,e.y),r=new ro(t.i,t.x,t.y),l=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=l,l.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function to(e,t,n,r){var l=new ro(e,t,n);return r?(l.next=r.next,l.prev=r,r.next.prev=l,r.next=l):(l.prev=l,l.next=l),l}function no(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function ro(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var lo={area:function(e){for(var t=e.length,n=0,r=t-1,l=0;l2&&e[t-1].equals(e[0])&&e.pop()}function oo(e,t){for(var n=0;nNumber.EPSILON){var f=Math.sqrt(c),p=Math.sqrt(u*u+s*s),d=t.x-a/f,v=t.y+o/f,m=((n.x-s/p-d)*s-(n.y+u/p-v)*u)/(o*s-a*u),g=(r=d+o*m-e.x)*r+(l=v+a*m-e.y)*l;if(g<=2)return new Ft(r,l);i=Math.sqrt(g/2)}else{var y=!1;o>Number.EPSILON?u>Number.EPSILON&&(y=!0):o<-Number.EPSILON?u<-Number.EPSILON&&(y=!0):Math.sign(a)===Math.sign(s)&&(y=!0),y?(r=-a,l=o,i=Math.sqrt(c)):(r=o,l=a,i=Math.sqrt(c/2))}return new Ft(r/i,l/i)}for(var j=[],F=0,B=O.length,U=B-1,G=F+1;F=0;L--){for(k=L/p,R=c*Math.cos(k*Math.PI/2),A=h*Math.sin(k*Math.PI/2)+f,F=0,B=O.length;F=0;){n=F,(r=F-1)<0&&(r=e.length-1);var l=0,i=a+2*p;for(l=0;l0)&&d.push(x,M,C),(u!==n-1||s0&&g(!0),t>0&&g(!1)),this.setIndex(s),this.addAttribute("position",new Cn(c,3)),this.addAttribute("normal",new Cn(h,3)),this.addAttribute("uv",new Cn(f,2))}function zo(e,t,n,r,l,i,o){So.call(this,0,e,t,n,r,l,i,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:l,thetaStart:i,thetaLength:o}}function To(e,t,n,r,l,i,o){Co.call(this,0,e,t,n,r,l,i,o),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:l,thetaStart:i,thetaLength:o}}function Eo(e,t,n,r){kn.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new Oo(e,t,n,r)),this.mergeVertices()}function Oo(e,t,n,r){Pn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},e=e||1,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var l,i,o=[],a=[],u=[],s=[],c=new Ut,h=new Ft;for(a.push(0,0,0),u.push(0,0,1),s.push(.5,.5),i=0,l=3;i<=t;i++,l+=3){var f=n+i/t*r;c.x=e*Math.cos(f),c.y=e*Math.sin(f),a.push(c.x,c.y,c.z),u.push(0,0,1),h.x=(a[l]/e+1)/2,h.y=(a[l+1]/e+1)/2,s.push(h.x,h.y)}for(l=1;l<=t;l++)o.push(l,l+1,0);this.setIndex(o),this.addAttribute("position",new Cn(a,3)),this.addAttribute("normal",new Cn(u,3)),this.addAttribute("uv",new Cn(s,2))}ho.prototype=Object.create(kn.prototype),ho.prototype.constructor=ho,fo.prototype=Object.create(uo.prototype),fo.prototype.constructor=fo,po.prototype=Object.create(kn.prototype),po.prototype.constructor=po,vo.prototype=Object.create(Pn.prototype),vo.prototype.constructor=vo,mo.prototype=Object.create(kn.prototype),mo.prototype.constructor=mo,go.prototype=Object.create(Pn.prototype),go.prototype.constructor=go,yo.prototype=Object.create(kn.prototype),yo.prototype.constructor=yo,bo.prototype=Object.create(Pn.prototype),bo.prototype.constructor=bo,wo.prototype=Object.create(kn.prototype),wo.prototype.constructor=wo,wo.prototype.toJSON=function(){var e=kn.prototype.toJSON.call(this);return xo(this.parameters.shapes,e)},_o.prototype=Object.create(Pn.prototype),_o.prototype.constructor=_o,_o.prototype.toJSON=function(){var e=Pn.prototype.toJSON.call(this);return xo(this.parameters.shapes,e)},Mo.prototype=Object.create(Pn.prototype),Mo.prototype.constructor=Mo,So.prototype=Object.create(kn.prototype),So.prototype.constructor=So,Co.prototype=Object.create(Pn.prototype),Co.prototype.constructor=Co,zo.prototype=Object.create(So.prototype),zo.prototype.constructor=zo,To.prototype=Object.create(Co.prototype),To.prototype.constructor=To,Eo.prototype=Object.create(kn.prototype),Eo.prototype.constructor=Eo,Oo.prototype=Object.create(Pn.prototype),Oo.prototype.constructor=Oo;var Po=Object.freeze({WireframeGeometry:gi,ParametricGeometry:yi,ParametricBufferGeometry:bi,TetrahedronGeometry:xi,TetrahedronBufferGeometry:Mi,OctahedronGeometry:Si,OctahedronBufferGeometry:Ci,IcosahedronGeometry:zi,IcosahedronBufferGeometry:Ti,DodecahedronGeometry:Ei,DodecahedronBufferGeometry:Oi,PolyhedronGeometry:wi,PolyhedronBufferGeometry:_i,TubeGeometry:Pi,TubeBufferGeometry:Li,TorusKnotGeometry:Ai,TorusKnotBufferGeometry:ki,TorusGeometry:Ri,TorusBufferGeometry:Ii,TextGeometry:ho,TextBufferGeometry:fo,SphereGeometry:po,SphereBufferGeometry:vo,RingGeometry:mo,RingBufferGeometry:go,PlaneGeometry:nr,PlaneBufferGeometry:rr,LatheGeometry:yo,LatheBufferGeometry:bo,ShapeGeometry:wo,ShapeBufferGeometry:_o,ExtrudeGeometry:ao,ExtrudeBufferGeometry:uo,EdgesGeometry:Mo,ConeGeometry:zo,ConeBufferGeometry:To,CylinderGeometry:So,CylinderBufferGeometry:Co,CircleGeometry:Eo,CircleBufferGeometry:Oo,BoxGeometry:Rn,BoxBufferGeometry:In});function Lo(e){vn.call(this),this.type="ShadowMaterial",this.color=new sn(0),this.transparent=!0,this.setValues(e)}function Ao(e){Fn.call(this,e),this.type="RawShaderMaterial"}function ko(e){vn.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new sn(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new sn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ft(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ro(e){ko.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(e)}function Io(e){vn.call(this),this.type="MeshPhongMaterial",this.color=new sn(16777215),this.specular=new sn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new sn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ft(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ee,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Vo(e){Io.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function Ho(e){vn.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ft(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function No(e){vn.call(this),this.type="MeshLambertMaterial",this.color=new sn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new sn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=ee,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Do(e){vn.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new sn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ft(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.lights=!1,this.setValues(e)}function jo(e){ai.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}Lo.prototype=Object.create(vn.prototype),Lo.prototype.constructor=Lo,Lo.prototype.isShadowMaterial=!0,Lo.prototype.copy=function(e){return vn.prototype.copy.call(this,e),this.color.copy(e.color),this},Ao.prototype=Object.create(Fn.prototype),Ao.prototype.constructor=Ao,Ao.prototype.isRawShaderMaterial=!0,ko.prototype=Object.create(vn.prototype),ko.prototype.constructor=ko,ko.prototype.isMeshStandardMaterial=!0,ko.prototype.copy=function(e){return vn.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Ro.prototype=Object.create(ko.prototype),Ro.prototype.constructor=Ro,Ro.prototype.isMeshPhysicalMaterial=!0,Ro.prototype.copy=function(e){return ko.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearCoat=e.clearCoat,this.clearCoatRoughness=e.clearCoatRoughness,this},Io.prototype=Object.create(vn.prototype),Io.prototype.constructor=Io,Io.prototype.isMeshPhongMaterial=!0,Io.prototype.copy=function(e){return vn.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,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.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Vo.prototype=Object.create(Io.prototype),Vo.prototype.constructor=Vo,Vo.prototype.isMeshToonMaterial=!0,Vo.prototype.copy=function(e){return Io.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},Ho.prototype=Object.create(vn.prototype),Ho.prototype.constructor=Ho,Ho.prototype.isMeshNormalMaterial=!0,Ho.prototype.copy=function(e){return vn.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},No.prototype=Object.create(vn.prototype),No.prototype.constructor=No,No.prototype.isMeshLambertMaterial=!0,No.prototype.copy=function(e){return vn.prototype.copy.call(this,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.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,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.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Do.prototype=Object.create(vn.prototype),Do.prototype.constructor=Do,Do.prototype.isMeshMatcapMaterial=!0,Do.prototype.copy=function(e){return vn.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},jo.prototype=Object.create(ai.prototype),jo.prototype.constructor=jo,jo.prototype.isLineDashedMaterial=!0,jo.prototype.copy=function(e){return ai.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var Fo=Object.freeze({ShadowMaterial:Lo,SpriteMaterial:ti,RawShaderMaterial:Ao,ShaderMaterial:Fn,PointsMaterial:hi,MeshPhysicalMaterial:Ro,MeshStandardMaterial:ko,MeshPhongMaterial:Io,MeshToonMaterial:Vo,MeshNormalMaterial:Ho,MeshLambertMaterial:No,MeshDepthMaterial:Vl,MeshDistanceMaterial:Hl,MeshBasicMaterial:mn,MeshMatcapMaterial:Do,LineDashedMaterial:jo,LineBasicMaterial:ai,Material:vn}),Bo={arraySlice:function(e,t,n){return Bo.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"===typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,n=new Array(t),r=0;r!==t;++r)n[r]=r;return n.sort(function(t,n){return e[t]-e[n]}),n},sortedArray:function(e,t,n){for(var r=e.length,l=new e.constructor(r),i=0,o=0;o!==r;++i)for(var a=n[i]*t,u=0;u!==t;++u)l[o++]=e[a+u];return l},flattenJSON:function(e,t,n,r){for(var l=1,i=e[0];void 0!==i&&void 0===i[r];)i=e[l++];if(void 0!==i){var o=i[r];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=i[r])&&(t.push(i.time),n.push.apply(n,o)),i=e[l++]}while(void 0!==i);else if(void 0!==o.toArray)do{void 0!==(o=i[r])&&(t.push(i.time),o.toArray(n,n.length)),i=e[l++]}while(void 0!==i);else do{void 0!==(o=i[r])&&(t.push(i.time),n.push(o)),i=e[l++]}while(void 0!==i)}}};function Uo(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n}function Go(e,t,n,r){Uo.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function Wo(e,t,n,r){Uo.call(this,e,t,n,r)}function qo(e,t,n,r){Uo.call(this,e,t,n,r)}function Yo(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Bo.convertArray(t,this.TimeBufferType),this.values=Bo.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}function Ko(e,t,n){Yo.call(this,e,t,n)}function Xo(e,t,n,r){Yo.call(this,e,t,n,r)}function Zo(e,t,n,r){Yo.call(this,e,t,n,r)}function Jo(e,t,n,r){Uo.call(this,e,t,n,r)}function Qo(e,t,n,r){Yo.call(this,e,t,n,r)}function $o(e,t,n,r){Yo.call(this,e,t,n,r)}function ea(e,t,n,r){Yo.call(this,e,t,n,r)}function ta(e,t,n){this.name=e,this.tracks=n,this.duration=void 0!==t?t:-1,this.uuid=jt.generateUUID(),this.duration<0&&this.resetDuration()}function na(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Zo;case"vector":case"vector2":case"vector3":case"vector4":return ea;case"color":return Xo;case"quaternion":return Qo;case"bool":case"boolean":return Ko;case"string":return $o}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){var n=[],r=[];Bo.flattenJSON(e.keys,n,r,"value"),e.times=n,e.values=r}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}Object.assign(Uo.prototype,{evaluate:function(e){var t=this.parameterPositions,n=this._cachedIndex,r=t[n],l=t[n-1];e:{t:{var i;n:{r:if(!(e=l)break e;var a=t[1];e=(l=t[--n-1]))break t}i=n,n=0}for(;n>>1;et;)--i;if(++i,0!==l||i!==r){l>=i&&(l=(i=Math.max(i,1))-1);var o=this.getValueSize();this.times=Bo.arraySlice(n,l,i),this.values=Bo.arraySlice(this.values,l*o,i*o)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,l=n.length;0===l&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var i=null,o=0;o!==l;o++){var a=n[o];if("number"===typeof a&&isNaN(a)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,a),e=!1;break}if(null!==i&&i>a){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,a,i),e=!1;break}i=a}if(void 0!==r&&Bo.isTypedArray(r)){o=0;for(var u=r.length;o!==u;++o){var s=r[o];if(isNaN(s)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,s),e=!1;break}}}return e},optimize:function(){for(var e=this.times,t=this.values,n=this.getValueSize(),r=this.getInterpolation()===_t,l=1,i=e.length-1,o=1;o0){e[l]=e[i];for(d=i*n,v=l*n,f=0;f!==n;++f)t[v+f]=t[d+f];++l}return l!==e.length&&(this.times=Bo.arraySlice(e,0,l),this.values=Bo.arraySlice(t,0,l*n)),this},clone:function(){var e=Bo.arraySlice(this.times,0),t=Bo.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),Ko.prototype=Object.assign(Object.create(Yo.prototype),{constructor:Ko,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:bt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Xo.prototype=Object.assign(Object.create(Yo.prototype),{constructor:Xo,ValueTypeName:"color"}),Zo.prototype=Object.assign(Object.create(Yo.prototype),{constructor:Zo,ValueTypeName:"number"}),Jo.prototype=Object.assign(Object.create(Uo.prototype),{constructor:Jo,interpolate_:function(e,t,n,r){for(var l=this.resultBuffer,i=this.sampleValues,o=this.valueSize,a=e*o,u=(n-t)/(r-t),s=a+o;a!==s;a+=4)Bt.slerpFlat(l,0,i,a-o,i,a,u);return l}}),Qo.prototype=Object.assign(Object.create(Yo.prototype),{constructor:Qo,ValueTypeName:"quaternion",DefaultInterpolation:wt,InterpolantFactoryMethodLinear:function(e){return new Jo(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),$o.prototype=Object.assign(Object.create(Yo.prototype),{constructor:$o,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:bt,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ea.prototype=Object.assign(Object.create(Yo.prototype),{constructor:ea,ValueTypeName:"vector"}),Object.assign(ta,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),l=0,i=n.length;l!==i;++l)t.push(na(n[l]).scale(r));return new ta(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid},l=0,i=n.length;l!==i;++l)t.push(Yo.toJSON(n[l]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var l=t.length,i=[],o=0;o1){var s=r[h=u[1]];s||(r[h]=s=[]),s.push(a)}}var c=[];for(var h in r)c.push(ta.CreateFromMorphTargetSequence(h,r[h],t,n));return c},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,l){if(0!==n.length){var i=[],o=[];Bo.flattenJSON(n,i,o,r),0!==i.length&&l.push(new e(t,i,o))}},r=[],l=e.name||"default",i=e.length||-1,o=e.fps||30,a=e.hierarchy||[],u=0;u0||0===e.search(/^data\:image\/jpeg/);l.format=r?De:je,l.needsUpdate=!0,void 0!==t&&t(l)},n,r),l},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(da.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],l=this.getPoint(0),i=0;for(r.push(0),n=1;n<=e;n++)i+=(t=this.getPoint(n/e)).distanceTo(l),r.push(i),l=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),l=0,i=r.length;n=t||e*r[i-1];for(var o,a=0,u=i-1;a<=u;)if((o=r[l=Math.floor(a+(u-a)/2)]-n)<0)a=l+1;else{if(!(o>0)){u=l;break}u=l-1}if(r[l=u]===n)return l/(i-1);var s=r[l];return(l+(n-s)/(r[l+1]-s))/(i-1)},getTangent:function(e){var t=e-1e-4,n=e+1e-4;t<0&&(t=0),n>1&&(n=1);var r=this.getPoint(t);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,r,l,i=new Ut,o=[],a=[],u=[],s=new Ut,c=new Jt;for(n=0;n<=e;n++)r=n/e,o[n]=this.getTangentAt(r),o[n].normalize();a[0]=new Ut,u[0]=new Ut;var h=Number.MAX_VALUE,f=Math.abs(o[0].x),p=Math.abs(o[0].y),d=Math.abs(o[0].z);for(f<=h&&(h=f,i.set(1,0,0)),p<=h&&(h=p,i.set(0,1,0)),d<=h&&i.set(0,0,1),s.crossVectors(o[0],i).normalize(),a[0].crossVectors(o[0],s),u[0].crossVectors(o[0],a[0]),n=1;n<=e;n++)a[n]=a[n-1].clone(),u[n]=u[n-1].clone(),s.crossVectors(o[n-1],o[n]),s.length()>Number.EPSILON&&(s.normalize(),l=Math.acos(jt.clamp(o[n-1].dot(o[n]),-1,1)),a[n].applyMatrix4(c.makeRotationAxis(s,l))),u[n].crossVectors(o[n],a[n]);if(!0===t)for(l=Math.acos(jt.clamp(a[0].dot(a[e]),-1,1)),l/=e,o[0].dot(s.crossVectors(a[0],a[e]))>0&&(l=-l),n=1;n<=e;n++)a[n].applyMatrix4(c.makeRotationAxis(o[n],l*n)),u[n].crossVectors(o[n],a[n]);return{tangents:o,normals:a,binormals:u}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),va.prototype=Object.create(da.prototype),va.prototype.constructor=va,va.prototype.isEllipseCurve=!0,va.prototype.getPoint=function(e,t){for(var n=t||new Ft,r=2*Math.PI,l=this.aEndAngle-this.aStartAngle,i=Math.abs(l)r;)l-=r;l0?0:(Math.floor(Math.abs(c)/u)+1)*u:0===h&&c===u-1&&(c=u-2,h=1),this.closed||c>0?n=a[(c-1)%u]:(ya.subVectors(a[0],a[1]).add(a[0]),n=ya),r=a[c%u],l=a[(c+1)%u],this.closed||c+2r.length-2?r.length-1:i+1],c=r[i>r.length-3?r.length-1:i+2];return n.set(Ma(o,a.x,u.x,s.x,c.x),Ma(o,a.y,u.y,s.y,c.y)),n},Aa.prototype.copy=function(e){da.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t=t){var l=n[r]-t,i=this.curves[r],o=i.getLength(),a=0===o?0:1-l/o;return i.getPointAt(a)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){da.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t0){var s=u.getPoint(0);s.equals(this.currentPoint)||this.lineTo(s.x,s.y)}this.curves.push(u);var c=u.getPoint(1);this.currentPoint.copy(c)},copy:function(e){return Ra.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=Ra.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return Ra.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Va.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Va,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n0){var i=new ha(new la(t));i.setCrossOrigin(this.crossOrigin);for(var o=0,a=e.length;o0?new li(o,a):new Ln(o,a),void 0!==e.drawMode&&r.setDrawMode(e.drawMode);break;case"LOD":r=new ri;break;case"Line":r=new ui(l(e.geometry),i(e.material),e.mode);break;case"LineLoop":r=new ci(l(e.geometry),i(e.material));break;case"LineSegments":r=new si(l(e.geometry),i(e.material));break;case"PointCloud":case"Points":r=new fi(l(e.geometry),i(e.material));break;case"Sprite":r=new ni(i(e.material));break;case"Group":r=new Bl;break;default:r=new tn}if(r.uuid=e.uuid,void 0!==e.name&&(r.name=e.name),void 0!==e.matrix?(r.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(r.matrixAutoUpdate=e.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==e.position&&r.position.fromArray(e.position),void 0!==e.rotation&&r.rotation.fromArray(e.rotation),void 0!==e.quaternion&&r.quaternion.fromArray(e.quaternion),void 0!==e.scale&&r.scale.fromArray(e.scale)),void 0!==e.castShadow&&(r.castShadow=e.castShadow),void 0!==e.receiveShadow&&(r.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(r.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(r.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&r.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(r.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.frustumCulled&&(r.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(r.renderOrder=e.renderOrder),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.layers&&(r.layers.mask=e.layers),void 0!==e.children)for(var u=e.children,s=0;sNumber.EPSILON){if(s<0&&(o=t[i],u=-u,a=t[l],s=-s),e.ya.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var c=s*(e.x-o.x)-u*(e.y-o.y);if(0===c)return!0;if(c<0)continue;r=!r}}else{if(e.y!==o.y)continue;if(a.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=a.x)return!0}}return r}var l=lo.isClockWise,i=this.subPaths;if(0===i.length)return[];if(!0===t)return n(i);var o,a,u,s=[];if(1===i.length)return a=i[0],(u=new Va).curves=a.curves,s.push(u),s;var c=!l(i[0].getPoints());c=e?!c:c;var h,f,p=[],d=[],v=[],m=0;d[m]=void 0,v[m]=[];for(var g=0,y=i.length;g1){for(var b=!1,w=[],_=0,x=d.length;_0&&(b||(v=p))}g=0;for(var E=d.length;g0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e=.5)for(var i=0;i!==l;++i)e[t+i]=e[n+i]},_slerp:function(e,t,n,r){Bt.slerpFlat(e,t,e,t,e,n,r)},_lerp:function(e,t,n,r,l){for(var i=1-r,o=0;o!==l;++o){var a=t+o;e[a]=e[a]*i+e[n+o]*r}}});var Su,Cu;function zu(e,t,n){var r=n||Tu.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function Tu(e,t,n){this.path=t,this.parsedPath=n||Tu.parseTrackName(t),this.node=Tu.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function Eu(){this.uuid=jt.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}function Ou(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var r=t.tracks,l=r.length,i=new Array(l),o={endingStart:xt,endingEnd:xt},a=0;a!==l;++a){var u=r[a].createInterpolant(null);i[a]=u,u.settings=o}this._interpolantSettings=o,this._interpolants=i,this._propertyBindings=new Array(l),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=gt,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function Pu(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function Lu(e){"string"===typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function Au(e,t,n){$l.call(this,e,t),this.meshPerAttribute=n||1}function ku(e,t,n,r){this.ray=new on(e,t),this.near=n||0,this.far=r||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function Ru(e,t){return e.distance-t.distance}function Iu(e,t,n,r){if(!1!==e.visible&&(e.raycast(t,n),!0===r))for(var l=e.children,i=0,o=l.length;i=t){var c=t++,h=e[c];n[h.uuid]=s,e[s]=h,n[u]=c,e[c]=a;for(var f=0,p=l;f!==p;++f){var d=r[f],v=d[c],m=d[s];d[s]=v,d[c]=m}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,l=this._bindings,i=l.length,o=0,a=arguments.length;o!==a;++o){var u=arguments[o].uuid,s=r[u];if(void 0!==s)if(delete r[u],s0)for(var u=this._interpolants,s=this._propertyBindings,c=0,h=u.length;c!==h;++c)u[c].evaluate(o),s[c].accumulate(r,a)}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e,n=this._clip.duration,r=this.loop,l=this._loopCount,i=r===yt;if(0===e)return-1===l?t:i&&1===(1&l)?n-t:t;if(r===mt){-1===l&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=n)t=n;else{if(!(t<0)){this.time=t;break e}t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===l&&(e>=0?(l=0,this._setEndings(!0,0===this.repetitions,i)):this._setEndings(0===this.repetitions,!0,i)),t>=n||t<0){var o=Math.floor(t/n);t-=n*o,l+=Math.abs(o);var a=this.repetitions-l;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?n:0,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){var u=e<0;this._setEndings(u,!u,i)}else this._setEndings(!1,!1,i);this._loopCount=l,this.time=t,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=t;if(i&&1===(1&l))return n-t}return t},_setEndings:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=Mt,r.endingEnd=Mt):(r.endingStart=e?this.zeroSlopeAtStart?Mt:xt:St,r.endingEnd=t?this.zeroSlopeAtEnd?Mt:xt:St)},_scheduleFading:function(e,t,n){var r=this._mixer,l=r.time,i=this._weightInterpolant;null===i&&(i=r._lendControlInterpolant(),this._weightInterpolant=i);var o=i.parameterPositions,a=i.sampleValues;return o[0]=l,a[0]=t,o[1]=l+e,a[1]=n,this}}),Pu.prototype=Object.assign(Object.create(r.prototype),{constructor:Pu,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,l=r.length,i=e._propertyBindings,o=e._interpolants,a=n.uuid,u=this._bindingsByRootAndName,s=u[a];void 0===s&&(s={},u[a]=s);for(var c=0;c!==l;++c){var h=r[c],f=h.name,p=s[f];if(void 0!==p)i[c]=p;else{if(void 0!==(p=i[c])){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,a,f));continue}var d=t&&t._propertyBindings[c].binding.parsedPath;++(p=new Mu(Tu.create(n,f,d),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(p,a,f),i[c]=p}o[c].resultBuffer=p.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var l=e._propertyBindings,i=0,o=l.length;i!==o;++i){var a=l[i];0===a.useCount++&&(this._lendBinding(a),a.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var l=t[n];0===--l.useCount&&(l.restoreOriginalState(),this._takeBackBinding(l))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&tthis.max.x||e.ythis.max.y)},containsBox:function(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},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new Ft),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Ft),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(){var e=new Ft;return function(t){return e.copy(t).clamp(this.min,this.max).sub(t).length()}}(),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(Du.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new Ut),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new Ut),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new Ut),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(){var e=new Ut,t=new Ut;return function(n,r){e.subVectors(n,this.start),t.subVectors(this.end,this.start);var l=t.dot(t),i=t.dot(e)/l;return r&&(i=jt.clamp(i,0,1)),i}}(),closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new Ut),this.delta(n).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),ju.prototype=Object.create(tn.prototype),ju.prototype.constructor=ju,ju.prototype.isImmediateRenderObject=!0,Fu.prototype=Object.create(si.prototype),Fu.prototype.constructor=Fu,Fu.prototype.update=function(){var e=new Ut,t=new Ut,n=new Gt;return function(){var r=["a","b","c"];this.object.updateMatrixWorld(!0),n.getNormalMatrix(this.object.matrixWorld);var l=this.object.matrixWorld,i=this.geometry.attributes.position,o=this.object.geometry;if(o&&o.isGeometry)for(var a=o.vertices,u=o.faces,s=0,c=0,h=u.length;c1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}},Wu.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()},qu.prototype=Object.create(tn.prototype),qu.prototype.constructor=qu,qu.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},qu.prototype.update=function(){var e=new Ut,t=new sn,n=new sn;return function(){var r=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var l=r.geometry.getAttribute("color");t.copy(this.light.color),n.copy(this.light.groundColor);for(var i=0,o=l.count;i.99999?this.quaternion.set(0,0,0,1):n.y<-.99999?this.quaternion.set(1,0,0,0):(t.set(n.z,0,-n.x).normalize(),e=Math.acos(n.y),this.quaternion.setFromAxisAngle(t,e))}}(),rs.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(0,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},rs.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},rs.prototype.copy=function(e){return tn.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},rs.prototype.clone=function(){return(new this.constructor).copy(this)},ls.prototype=Object.create(si.prototype),ls.prototype.constructor=ls;var os=0,as=1;function us(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function ss(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}function cs(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new fi(e,t)}function hs(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new ni(e)}function fs(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new fi(e,t)}function ps(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new hi(e)}function ds(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new hi(e)}function vs(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new hi(e)}function ms(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new Ut(e,t,n)}function gs(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new gn(e,t).setDynamic(!0)}function ys(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new yn(e,t)}function bs(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new bn(e,t)}function ws(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new wn(e,t)}function _s(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new _n(e,t)}function xs(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new xn(e,t)}function Ms(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Mn(e,t)}function Ss(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Sn(e,t)}function Cs(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Cn(e,t)}function zs(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new zn(e,t)}function Ts(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),xa.call(this,e),this.type="catmullrom",this.closed=!0}function Es(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),xa.call(this,e),this.type="catmullrom"}function Os(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),xa.call(this,e),this.type="catmullrom"}function Ps(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new ls(e)}function Ls(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new es(e,t)}function As(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new si(new Mo(e.geometry),new ai({color:void 0!==t?t:16777215}))}function ks(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new si(new gi(e.geometry),new ai({color:void 0!==t?t:16777215}))}function Rs(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new aa(e)}function Is(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new ca(e)}da.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(da.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(Ra.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new kn,n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:x;if(e){var n=this.definitions.get(e);return n&&"function"===typeof n.icon&&(n=c()({},n,{icon:n.icon(t.primaryColor,t.secondaryColor)})),n}}},{key:"setTwoToneColors",value:function(e){var t=e.primaryColor,n=e.secondaryColor;x.primaryColor=t,x.secondaryColor=n||Object(_.c)(t)}},{key:"getTwoToneColors",value:function(){return c()({},x)}}]),t}(r.Component);M.displayName="IconReact",M.definitions=new _.a;var S=M;function C(){return(C=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,l=void 0===n?{}:n;if("undefined"!==typeof document&&"undefined"!==typeof window&&"function"===typeof document.createElement&&"string"===typeof t&&t.length&&!T.has(t)){var i=document.createElement("script");i.setAttribute("src",t),i.setAttribute("data-namespace",t),T.add(t),document.body.appendChild(i)}var o=function(e){var t=e.type,n=e.children,i=z(e,["type","children"]),o=null;return e.type&&(o=r.createElement("use",{xlinkHref:"#".concat(t)})),n&&(o=n),r.createElement(G,C({},i,l),o)};return o.displayName="Iconfont",o},U.getTwoToneColor=function(){return S.getTwoToneColors().primaryColor},U.setTwoToneColor=V;var G=t.a=U},function(e,t,n){"use strict";t.__esModule=!0;var r,l=n(173),i=(r=l)&&r.__esModule?r:{default:r};t.default=function(e,t,n){return t in e?(0,i.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(0),l=n(50),i=n.n(l),o=n(3),a=n.n(o),u=n(49);function s(){return(s=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function l(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,a=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?a="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==a){var u=e.displayName||e.name,s="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=l),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return o}),r.__suppressDeprecationWarning=!0,l.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){e.exports={default:n(271),__esModule:!0}},function(e,t,n){"use strict";var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigation.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},function(e,t,n){var r,l;!function(i){"use strict";var o,a={};a.VERSION="1.6.0";var u={},s=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t=t.value},trace:function(){this.invoke(a.TRACE,arguments)},debug:function(){this.invoke(a.DEBUG,arguments)},info:function(){this.invoke(a.INFO,arguments)},warn:function(){this.invoke(a.WARN,arguments)},error:function(){this.invoke(a.ERROR,arguments)},time:function(e){"string"===typeof e&&e.length>0&&this.invoke(a.TIME,[e,"start"])},timeEnd:function(e){"string"===typeof e&&e.length>0&&this.invoke(a.TIME,[e,"end"])},invoke:function(e,t){o&&this.enabledFor(e)&&o(t,c({level:e},this.context))}};var p=new f({filterLevel:a.OFF});!function(){var e=a;e.enabledFor=s(p,p.enabledFor),e.trace=s(p,p.trace),e.debug=s(p,p.debug),e.time=s(p,p.time),e.timeEnd=s(p,p.timeEnd),e.info=s(p,p.info),e.warn=s(p,p.warn),e.error=s(p,p.error),e.log=e.info}(),a.setHandler=function(e){o=e},a.setLevel=function(e){for(var t in p.setLevel(e),u)u.hasOwnProperty(t)&&u[t].setLevel(e)},a.getLevel=function(){return p.getLevel()},a.get=function(e){return u[e]||(u[e]=new f(c({name:e},p.context)))},a.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"===typeof console?function(){}:function(r,l){r=Array.prototype.slice.call(r);var i,o=console.log;l.level===a.TIME?(i=(l.name?"["+l.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(i):t[i]=(new Date).getTime():console.timeEnd?console.timeEnd(i):n(o,[i+": "+((new Date).getTime()-t[i])+"ms"])):(l.level===a.WARN&&console.warn?o=console.warn:l.level===a.ERROR&&console.error?o=console.error:l.level===a.INFO&&console.info?o=console.info:l.level===a.DEBUG&&console.debug?o=console.debug:l.level===a.TRACE&&console.trace&&(o=console.trace),e.formatter(r,l),n(o,r))}},a.useDefaults=function(e){a.setLevel(e&&e.defaultLevel||a.DEBUG),a.setHandler(a.createDefaultHandler(e))},void 0===(l="function"===typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=l)}()},function(e,t,n){"use strict";var r=n(53),l=n.n(r),i={};t.a=function(e,t,n){e||i[n]||(l()(!1,"[antd: ".concat(t,"] ").concat(n)),i[n]=!0)}},function(e,t,n){"use strict";var r=n(13),l=n(4),i=n(0),o=n.n(i);if(!i.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!l.o)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var a=!1;function u(){return a}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){l={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(l)throw l.error}}return o}function h(e){return e.current?Object(l.i)(e.current):""}var f=[];function p(){var e=c(Object(i.useState)(0),2)[1];return Object(i.useCallback)(function(){e(function(e){return e+1})},[])}var d={};function v(e,t,n){if(void 0===t&&(t="observed"),void 0===n&&(n=d),u())return e();var r=(n.useForceUpdate||p)(),o=Object(i.useRef)(null);o.current||(o.current=new l.b("observer("+t+")",function(){r()}));var a,s,c=function(){o.current&&!o.current.isDisposed&&o.current.dispose()};if(Object(i.useDebugValue)(o,h),function(e){Object(i.useEffect)(function(){return e},f)}(function(){c()}),o.current.track(function(){try{a=e()}catch(t){s=t}}),s)throw c(),s;return a}function m(e,t){if(u())return e;var n,r,l,o=s({forwardRef:!1},t),a=e.displayName||e.name,c=function(t,n){return v(function(){return e(t,n)},a)};return c.displayName=a,n=o.forwardRef?Object(i.memo)(Object(i.forwardRef)(c)):Object(i.memo)(c),r=e,l=n,Object.keys(r).forEach(function(e){r.hasOwnProperty(e)&&!g[e]&&Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(r,e))}),n.displayName=a,n}var g={$$typeof:!0,render:!0,compare:!0,type:!0};function y(e){var t=e.children,n=e.render,r=t||n;return"function"!==typeof r?null:v(r)}function b(e,t,n,r,l){var i="children"===t?"render":"children",o="function"===typeof e[t],a="function"===typeof e[i];return o&&a?new Error("MobX Observer: Do not use children and render in the same time in`"+n):o||a?null:new Error("Invalid prop `"+l+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}y.propTypes={children:b,render:b},y.displayName="Observer",n.d(t,"a",function(){return N});var w=0,_={};function x(e){return _[e]||(_[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+w+")";return w++,t}(e)),_[e]}function M(e,t){if(S(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var l=0;l0;)r[l]=arguments[l+2];t.locks++;try{var i;return null!=e&&(i=e.apply(this,r)),i}finally{t.locks--,0===t.locks&&t.methods.forEach(function(e){e.apply(n,r)})}}function O(e,t){return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];E.call.apply(E,[this,e,t].concat(n))}}function P(e,t,n){var r=function(e,t){var n=e[z]=e[z]||{},r=n[t]=n[t]||{};return r.locks=r.locks||0,r.methods=r.methods||[],r}(e,t);r.methods.indexOf(n)<0&&r.methods.push(n);var l=Object.getOwnPropertyDescriptor(e,t);if(!l||!l[T]){var i=function e(t,n,r,l,i){var o,a=O(i,l);return(o={})[T]=!0,o.get=function(){return a},o.set=function(i){if(this===t)a=O(i,l);else{var o=e(this,n,r,l,i);Object.defineProperty(this,n,o)}},o.configurable=!0,o.enumerable=r,o}(e,t,l?l.enumerable:void 0,r,e[t]);Object.defineProperty(e,t,i)}}var L=l.a||"$mobx",A=x("isUnmounted"),k=x("skipRender"),R=x("isForcingUpdate");function I(e,t){return u()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||!M(this.props,e)}function V(e,t){var n=x("reactProp_"+t+"_valueHolder"),r=x("reactProp_"+t+"_atomHolder");function i(){return this[r]||C(this,r,Object(l.h)("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return i.call(this).reportObserved(),this[n]},set:function(e){this[R]||M(this[n],e)?C(this,n,e):(C(this,n,e),C(this,k,!0),i.call(this).reportChanged(),C(this,k,!1))}})}var H="function"==typeof i.forwardRef&&Object(i.forwardRef)(function(e,t){}).$$typeof;function N(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),H&&e.$$typeof===H){var t=e.render;if("function"!=typeof t)throw new Error("render property of ForwardRef was not a function");return Object(i.forwardRef)(function(){var e=arguments;return o.a.createElement(y,null,function(){return t.apply(void 0,e)})})}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||i.Component.isPrototypeOf(e)?function(e){var t=e.prototype;if(t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==i.PureComponent)if(t.shouldComponentUpdate){if(t.shouldComponentUpdate!==I)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else t.shouldComponentUpdate=I;V(t,"props"),V(t,"state");var n=t.render;return t.render=function(){return function(e){var t=this;if(!0===u())return e.call(this);C(this,k,!1),C(this,R,!1);var n=this.displayName||this.name||this.constructor&&(this.constructor.displayName||this.constructor.name)||"",r=e.bind(this),o=!1,a=new l.b(n+".render()",function(){if(!o&&(o=!0,!0!==t[A])){var e=!0;try{C(t,R,!0),t[k]||i.Component.prototype.forceUpdate.call(t),e=!1}finally{C(t,R,!1),e&&a.dispose()}}});function s(){o=!1;var e=void 0,t=void 0;if(a.track(function(){try{t=Object(l.c)(!1,r)}catch(t){e=t}}),e)throw e;return t}return a.reactComponent=this,s[L]=a,this.render=s,s.call(this)}.call(this,n)},P(t,"componentWillUnmount",function(){!0!==u()&&(this.render[L]&&this.render[L].dispose(),this[A]=!0)}),e}(e):m(e)}var D={children:!0,key:!0,ref:!0},j=Object(i.createContext)({});function F(e){return!D[e]&&"suppressChangedStoreWarning"!==e}(function(e){function t(t,n){e.call(this,t,n),this.state=Object.assign({},n,function(e){var t={};if(!e)return t;for(var n in e)F(n)&&(t[n]=e[n]);return t}(t))}return e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t,t.prototype.render=function(){return Object(i.createElement)(j.Provider,{value:this.state},i.Children.only(this.props.children))},t.getDerivedStateFromProps=function(e,t){return t},t}(i.Component)).contextType=j;x("disposeOnUnmountProto"),x("disposeOnUnmountInst");function B(e){function t(t,n,r,i,o,a){for(var u=[],s=arguments.length-6;s-- >0;)u[s]=arguments[s+6];return Object(l.q)(function(){return i=i||"<>",a=a||r,null==n[r]?t?new Error("The "+o+" `"+a+"` is marked as required in `"+i+"`, but its value is `"+(null===n[r]?"null":"undefined")+"`."):null:e.apply(void 0,[n,r,i,o,a].concat(u))})}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function U(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol}(t,e)?"symbol":t}function G(e,t){return B(function(n,r,i,o,a){return Object(l.q)(function(){if(e&&U(n[r])===t.toLowerCase())return null;var o;switch(t){case"Array":o=l.j;break;case"Object":o=l.l;break;case"Map":o=l.k;break;default:throw new Error("Unexpected mobxType: "+t)}var u=n[r];if(!o(u)){var s=function(e){var t=U(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}(u),c=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+a+"` of type `"+s+"` supplied to `"+i+"`, expected `mobx.Observable"+t+"`"+c+".")}return null})})}function W(e,t){return B(function(n,r,i,o,a){for(var u=[],s=arguments.length-5;s-- >0;)u[s]=arguments[s+5];return Object(l.q)(function(){if("function"!=typeof t)return new Error("Property `"+a+"` of component `"+i+"` has invalid PropType notation.");var l=G(e,"Array")(n,r,i);if(l instanceof Error)return l;for(var s=n[r],c=0;c=i)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return(0,a.default)(t[r++])}catch(n){return"[Circular]"}break;default:return e}}),u=t[r];r children");r=e}}),r}var x=n(13),M=n.n(x),S=n(107),C={isAppearSupported:function(e){return e.transitionName&&e.transitionAppear||e.animation.appear},isEnterSupported:function(e){return e.transitionName&&e.transitionEnter||e.animation.enter},isLeaveSupported:function(e){return e.transitionName&&e.transitionLeave||e.animation.leave},allowAppearCallback:function(e){return e.transitionAppear||e.animation.appear},allowEnterCallback:function(e){return e.transitionEnter||e.animation.enter},allowLeaveCallback:function(e){return e.transitionLeave||e.animation.leave}},z={enter:"transitionEnter",appear:"transitionAppear",leave:"transitionLeave"},T=function(e){function t(){return u()(this,t),f()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d()(t,e),c()(t,[{key:"componentWillUnmount",value:function(){this.stop()}},{key:"componentWillEnter",value:function(e){C.isEnterSupported(this.props)?this.transition("enter",e):e()}},{key:"componentWillAppear",value:function(e){C.isAppearSupported(this.props)?this.transition("appear",e):e()}},{key:"componentWillLeave",value:function(e){C.isLeaveSupported(this.props)?this.transition("leave",e):e()}},{key:"transition",value:function(e,t){var n=this,r=M.a.findDOMNode(this),l=this.props,i=l.transitionName,o="object"===typeof i;this.stop();var a=function(){n.stopper=null,t()};if((S.b||!l.animation[e])&&i&&l[z[e]]){var u=o?i[e]:i+"-"+e,s=u+"-active";o&&i[e+"Active"]&&(s=i[e+"Active"]),this.stopper=Object(S.a)(r,{name:u,active:s},a)}else this.stopper=l.animation[e](r,a)}},{key:"stop",value:function(){var e=this.stopper;e&&(this.stopper=null,e.stop())}},{key:"render",value:function(){return this.props.children}}]),t}(m.a.Component);T.propTypes={children:y.a.any,animation:y.a.any,transitionName:y.a.any};var E=T,O="rc_animate_"+Date.now();function P(e){var t=e.children;return m.a.isValidElement(t)&&!t.key?m.a.cloneElement(t,{key:O}):t}function L(){}var A=function(e){function t(e){u()(this,t);var n=f()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return k.call(n),n.currentlyAnimatingKeys={},n.keysToEnter=[],n.keysToLeave=[],n.state={children:b(P(e))},n.childrenRefs={},n}return d()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.showProp,n=this.state.children;t&&(n=n.filter(function(e){return!!e.props[t]})),n.forEach(function(t){t&&e.performAppear(t.key)})}},{key:"componentWillReceiveProps",value:function(e){var t=this;this.nextProps=e;var n=b(P(e)),r=this.props;r.exclusive&&Object.keys(this.currentlyAnimatingKeys).forEach(function(e){t.stop(e)});var l=r.showProp,i=this.currentlyAnimatingKeys,a=r.exclusive?b(P(r)):this.state.children,u=[];l?(a.forEach(function(e){var t=e&&w(n,e.key),r=void 0;(r=t&&t.props[l]||!e.props[l]?t:m.a.cloneElement(t||e,o()({},l,!0)))&&u.push(r)}),n.forEach(function(e){e&&w(a,e.key)||u.push(e)})):u=function(e,t){var n=[],r={},l=[];return e.forEach(function(e){e&&w(t,e.key)?l.length&&(r[e.key]=l,l=[]):l.push(e)}),t.forEach(function(e){e&&Object.prototype.hasOwnProperty.call(r,e.key)&&(n=n.concat(r[e.key])),n.push(e)}),n=n.concat(l)}(a,n),this.setState({children:u}),n.forEach(function(e){var n=e&&e.key;if(!e||!i[n]){var r=e&&w(a,n);if(l){var o=e.props[l];if(r)!_(a,n,l)&&o&&t.keysToEnter.push(n);else o&&t.keysToEnter.push(n)}else r||t.keysToEnter.push(n)}}),a.forEach(function(e){var r=e&&e.key;if(!e||!i[r]){var o=e&&w(n,r);if(l){var a=e.props[l];if(o)!_(n,r,l)&&a&&t.keysToLeave.push(r);else a&&t.keysToLeave.push(r)}else o||t.keysToLeave.push(r)}})}},{key:"componentDidUpdate",value:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)}},{key:"isValidChildByKey",value:function(e,t){var n=this.props.showProp;return n?_(e,t,n):w(e,t)}},{key:"stop",value:function(e){delete this.currentlyAnimatingKeys[e];var t=this.childrenRefs[e];t&&t.stop()}},{key:"render",value:function(){var e=this,t=this.props;this.nextProps=t;var n=this.state.children,r=null;n&&(r=n.map(function(n){if(null===n||void 0===n)return n;if(!n.key)throw new Error("must set key for children");return m.a.createElement(E,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)}));var i=t.component;if(i){var o=t;return"string"===typeof i&&(o=l()({className:t.className,style:t.style},t.componentProps)),m.a.createElement(i,o,r)}return r[0]||null}}]),t}(m.a.Component);A.isAnimate=!0,A.propTypes={className:y.a.string,style:y.a.object,component:y.a.any,componentProps:y.a.object,animation:y.a.object,transitionName:y.a.oneOfType([y.a.string,y.a.object]),transitionEnter:y.a.bool,transitionAppear:y.a.bool,exclusive:y.a.bool,transitionLeave:y.a.bool,onEnd:y.a.func,onEnter:y.a.func,onLeave:y.a.func,onAppear:y.a.func,showProp:y.a.string,children:y.a.node},A.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:L,onEnter:L,onLeave:L,onAppear:L};var k=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var l=b(P(r));e.isValidChildByKey(l,t)?"appear"===n?C.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):C.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r=b(P(n));if(e.isValidChildByKey(r,t))e.performEnter(t);else{var l=function(){C.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};!function(e,t,n){var r=e.length===t.length;return r&&e.forEach(function(e,l){var i=t[l];e&&i&&(e&&!i||!e&&i?r=!1:e.key!==i.key?r=!1:n&&e.props[n]!==i.props[n]&&(r=!1))}),r}(e.state.children,r,n.showProp)?e.setState({children:r},l):l()}}}};t.a=A},function(e,t,n){"use strict";var r=n(2),l=n.n(r),i=n(23),o=n.n(i),a=n(6),u=n.n(a),s=n(8),c=n.n(s),h=n(9),f=n.n(h),p=n(0),d=n.n(p),v=n(1),m=n.n(v),g=n(63),y=n(26);function b(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t=e.subMenuTitle.offsetWidth||(t.style.minWidth=e.subMenuTitle.offsetWidth+"px")}},this.saveSubMenuTitle=function(t){e.subMenuTitle=t}},B=Object(g.connect)(function(e,t){var n=e.openKeys,r=e.activeKey,l=e.selectedKeys,i=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(i)>-1,active:r[o]===i,selectedKeys:l}})(j);B.isSubMenu=!0;var U=B,G=!("undefined"===typeof window||!window.document||!window.document.createElement),W="menuitem-overflowed",q=.5;G&&n(485);var Y=function(e){function t(){var n,r,i;u()(this,t);for(var a=arguments.length,s=Array(a),h=0;h=0});i.forEach(function(e){O(e,"display","inline-block")}),r.menuItemSizes=l.map(function(e){return E(e)}),i.forEach(function(e){O(e,"display","none")}),r.overflowedIndicatorWidth=E(e.children[e.children.length-1]),r.originalTotalWidth=r.menuItemSizes.reduce(function(e,t){return e+t},0),r.handleResize(),O(n,"display","none")}}}},r.resizeObserver=null,r.mutationObserver=null,r.originalTotalWidth=0,r.overflowedItems=[],r.menuItemSizes=[],r.handleResize=function(){if("horizontal"===r.props.mode){var e=L.a.findDOMNode(r);if(e){var t=E(e);r.overflowedItems=[];var n=0,l=void 0;r.originalTotalWidth>t+q&&(l=-1,r.menuItemSizes.forEach(function(e){(n+=e)+r.overflowedIndicatorWidth<=t&&l++})),r.setState({lastVisibleIndex:l})}}},i=n,c()(r,i)}return f()(t,e),t.prototype.componentDidMount=function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=L.a.findDOMNode(this);if(!t)return;this.resizeObserver=new A.a(function(t){t.forEach(e.setChildrenWidthAndResize)}),[].slice.call(t.children).concat(t).forEach(function(t){e.resizeObserver.observe(t)}),"undefined"!==typeof MutationObserver&&(this.mutationObserver=new MutationObserver(function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach(function(t){e.resizeObserver.observe(t)}),e.setChildrenWidthAndResize()}),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}},t.prototype.componentWillUnmount=function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.resizeObserver.disconnect()},t.prototype.renderChildren=function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce(function(r,l,i){var o=l;if("horizontal"===t.props.mode){var a=t.getOverflowedSubMenuItem(l.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf(t.props.prefixCls+"-root")&&(i>n&&(o=d.a.cloneElement(l,{style:{display:"none"},eventKey:l.props.eventKey+"-hidden",className:l.className+" "+W})),i===n+1&&(t.overflowedItems=e.slice(n+1).map(function(e){return d.a.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})}),a=t.getOverflowedSubMenuItem(l.props.eventKey,t.overflowedItems)));var u=[].concat(r,[a,o]);return i===e.length-1&&u.push(t.getOverflowedSubMenuItem(l.props.eventKey,[],!0)),u}return[].concat(r,[o])},[])},t.prototype.render=function(){var e=this.props,t=e.hiddenClassName,n=e.visible,r=(e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),l=(e.children,e.theme,o()(e,["hiddenClassName","visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]));return n||(l.className+=" "+t),d.a.createElement(r,l,this.renderChildren(this.props.children))},t}(d.a.Component);Y.propTypes={className:m.a.string,children:m.a.node,mode:m.a.oneOf(["horizontal","vertical","vertical-left","vertical-right","inline"]),prefixCls:m.a.string,level:m.a.number,theme:m.a.string,overflowedIndicator:m.a.node,visible:m.a.bool,hiddenClassName:m.a.string,tag:m.a.string,style:m.a.object},Y.defaultProps={tag:"div",className:""};var K=Y;function X(e,t,n){var r,i=e.getState();e.setState({activeKey:l()({},i.activeKey,(r={},r[t]=n,r))})}function Z(e){return e.eventKey||"0-menu-"}function J(e,t){var n=t,r=e.children,l=e.eventKey;if(n){var i=void 0;if(z(r,function(e,t){e&&e.props&&!e.props.disabled&&n===S(e,l,t)&&(i=!0)}),i)return n}return n=null,e.defaultActiveFirst?(z(r,function(e,t){n||!e||e.props.disabled||(n=S(e,l,t))}),n):n}function Q(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var $=function(e){function t(n){var r;u()(this,t);var i=c()(this,e.call(this,n));return ee.call(i),n.store.setState({activeKey:l()({},n.store.getState().activeKey,(r={},r[n.eventKey]=J(n,n.activeKey),r))}),i.instanceArray=[],i}return f()(t,e),t.prototype.componentDidMount=function(){this.props.manualRef&&this.props.manualRef(this)},t.prototype.shouldComponentUpdate=function(e){return this.props.visible||e.visible},t.prototype.componentDidUpdate=function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[Z(t)],r=J(t,n);if(r!==n)X(t.store,Z(t),r);else if("activeKey"in e){r!==J(e,e.activeKey)&&X(t.store,Z(t),r)}},t.prototype.render=function(){var e=this,t=o()(this.props,[]);this.instanceArray=[];var n={className:_()(t.prefixCls,t.className,t.prefixCls+"-"+t.mode),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex="0",n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,u=t.level,s=t.mode,c=t.overflowedIndicator,h=t.theme;return T.forEach(function(e){return delete t[e]}),delete t.onClick,d.a.createElement(K,l()({},t,{prefixCls:r,mode:s,tag:"ul",level:u,theme:h,hiddenClassName:r+"-hidden",visible:a,overflowedIndicator:c},n),d.a.Children.map(t.children,function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")}))},t}(d.a.Component);$.propTypes={onSelect:m.a.func,onClick:m.a.func,onDeselect:m.a.func,onOpenChange:m.a.func,onDestroy:m.a.func,openTransitionName:m.a.string,openAnimation:m.a.oneOfType([m.a.string,m.a.object]),openKeys:m.a.arrayOf(m.a.string),visible:m.a.bool,children:m.a.any,parentMenu:m.a.object,eventKey:m.a.string,store:m.a.shape({getState:m.a.func,setState:m.a.func}),focusable:m.a.bool,multiple:m.a.bool,style:m.a.object,defaultActiveFirst:m.a.bool,activeKey:m.a.string,selectedKeys:m.a.arrayOf(m.a.string),defaultSelectedKeys:m.a.arrayOf(m.a.string),defaultOpenKeys:m.a.arrayOf(m.a.string),level:m.a.number,mode:m.a.oneOf(["horizontal","vertical","vertical-left","vertical-right","inline"]),triggerSubMenuAction:m.a.oneOf(["click","hover"]),inlineIndent:m.a.oneOfType([m.a.number,m.a.string]),manualRef:m.a.func,itemIcon:m.a.oneOfType([m.a.func,m.a.node]),expandIcon:m.a.oneOfType([m.a.func,m.a.node])},$.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:M};var ee=function(){var e=this;this.onKeyDown=function(t,n){var r=t.keyCode,l=void 0;if(e.getFlatInstanceArray().forEach(function(e){e&&e.props.active&&e.onKeyDown&&(l=e.onKeyDown(t))}),l)return 1;var i=null;return r!==y.a.UP&&r!==y.a.DOWN||(i=e.step(r===y.a.UP?-1:1)),i?(t.preventDefault(),X(e.props.store,Z(e.props),i.props.eventKey),"function"===typeof n&&n(i),1):void 0},this.onItemHover=function(t){var n=t.key,r=t.hover;X(e.props.store,Z(e.props),r?n:null)},this.onDeselect=function(t){e.props.onDeselect(t)},this.onSelect=function(t){e.props.onSelect(t)},this.onClick=function(t){e.props.onClick(t)},this.onOpenChange=function(t){e.props.onOpenChange(t)},this.onDestroy=function(t){e.props.onDestroy(t)},this.getFlatInstanceArray=function(){return e.instanceArray},this.getOpenTransitionName=function(){return e.props.openTransitionName},this.step=function(t){var n=e.getFlatInstanceArray(),r=e.props.store.getState().activeKey[Z(e.props)],l=n.length;if(!l)return null;t<0&&(n=n.concat().reverse());var i=-1;if(n.every(function(e,t){return!e||e.props.eventKey!==r||(i=t,!1)}),e.props.defaultActiveFirst||-1===i||(o=n.slice(i,l-1)).length&&!o.every(function(e){return!!e.props.disabled})){var o,a=(i+1)%l,u=a;do{var s=n[u];if(s&&!s.props.disabled)return s;u=(u+1)%l}while(u!==a);return null}},this.renderCommonMenuItem=function(t,n,r){var i=e.props.store.getState(),o=e.props,a=S(t,o.eventKey,n),u=t.props;if(!u||"string"===typeof t.type)return t;var s=a===i.activeKey,c=l()({mode:u.mode||o.mode,level:o.level,inlineIndent:o.inlineIndent,renderMenuItem:e.renderMenuItem,rootPrefixCls:o.prefixCls,index:n,parentMenu:o.parentMenu,manualRef:u.disabled?void 0:b(t.ref,Q.bind(e)),eventKey:a,active:!u.disabled&&s,multiple:o.multiple,onClick:function(t){(u.onClick||M)(t),e.onClick(t)},onItemHover:e.onItemHover,openTransitionName:e.getOpenTransitionName(),openAnimation:o.openAnimation,subMenuOpenDelay:o.subMenuOpenDelay,subMenuCloseDelay:o.subMenuCloseDelay,forceSubMenuRender:o.forceSubMenuRender,onOpenChange:e.onOpenChange,onDeselect:e.onDeselect,onSelect:e.onSelect,builtinPlacements:o.builtinPlacements,itemIcon:u.itemIcon||e.props.itemIcon,expandIcon:u.expandIcon||e.props.expandIcon},r);return("inline"===o.mode||x.any)&&(c.triggerSubMenuAction="click"),d.a.cloneElement(t,c)},this.renderMenuItem=function(t,n,r){if(!t)return null;var l=e.props.store.getState(),i={openKeys:l.openKeys,selectedKeys:l.selectedKeys,triggerSubMenuAction:e.props.triggerSubMenuAction,subMenuKey:r};return e.renderCommonMenuItem(t,n,i)}},te=Object(g.connect)()($),ne=function(e){function t(n){u()(this,t);var r=c()(this,e.call(this,n));re.call(r),r.isRootMenu=!0;var l=n.defaultSelectedKeys,i=n.defaultOpenKeys;return"selectedKeys"in n&&(l=n.selectedKeys||[]),"openKeys"in n&&(i=n.openKeys||[]),r.store=Object(g.create)({selectedKeys:l,openKeys:i,activeKey:{"0-menu-":J(n,n.activeKey)}}),r}return f()(t,e),t.prototype.componentDidMount=function(){this.updateMiniStore()},t.prototype.componentDidUpdate=function(){this.updateMiniStore()},t.prototype.updateMiniStore=function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})},t.prototype.render=function(){var e=this,t=o()(this.props,[]);return t.className+=" "+t.prefixCls+"-root",t=l()({},t,{onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,openTransitionName:this.getOpenTransitionName(),parentMenu:this}),d.a.createElement(g.Provider,{store:this.store},d.a.createElement(te,l()({},t,{ref:function(t){return e.innerMenu=t}}),this.props.children))},t}(d.a.Component);ne.propTypes={defaultSelectedKeys:m.a.arrayOf(m.a.string),defaultActiveFirst:m.a.bool,selectedKeys:m.a.arrayOf(m.a.string),defaultOpenKeys:m.a.arrayOf(m.a.string),openKeys:m.a.arrayOf(m.a.string),mode:m.a.oneOf(["horizontal","vertical","vertical-left","vertical-right","inline"]),getPopupContainer:m.a.func,onClick:m.a.func,onSelect:m.a.func,onDeselect:m.a.func,onDestroy:m.a.func,openTransitionName:m.a.string,openAnimation:m.a.oneOfType([m.a.string,m.a.object]),subMenuOpenDelay:m.a.number,subMenuCloseDelay:m.a.number,forceSubMenuRender:m.a.bool,triggerSubMenuAction:m.a.string,level:m.a.number,selectable:m.a.bool,multiple:m.a.bool,children:m.a.any,className:m.a.string,style:m.a.object,activeKey:m.a.string,prefixCls:m.a.string,builtinPlacements:m.a.object,itemIcon:m.a.oneOfType([m.a.func,m.a.node]),expandIcon:m.a.oneOfType([m.a.func,m.a.node]),overflowedIndicator:m.a.node},ne.defaultProps={selectable:!0,onClick:M,onSelect:M,onOpenChange:M,onDeselect:M,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:d.a.createElement("span",null,"\xb7\xb7\xb7")};var re=function(){var e=this;this.onSelect=function(t){var n=e.props;if(n.selectable){var r=e.store.getState().selectedKeys,i=t.key;r=n.multiple?r.concat([i]):[i],"selectedKeys"in n||e.store.setState({selectedKeys:r}),n.onSelect(l()({},t,{selectedKeys:r}))}},this.onClick=function(t){e.props.onClick(t)},this.onKeyDown=function(t,n){e.innerMenu.getWrappedInstance().onKeyDown(t,n)},this.onOpenChange=function(t){var n=e.props,r=e.store.getState().openKeys.concat(),l=!1,i=function(e){var t=!1;if(e.open)(t=-1===r.indexOf(e.key))&&r.push(e.key);else{var n=r.indexOf(e.key);(t=-1!==n)&&r.splice(n,1)}l=l||t};Array.isArray(t)?t.forEach(i):i(t),l&&("openKeys"in e.props||e.store.setState({openKeys:r}),n.onOpenChange(r))},this.onDeselect=function(t){var n=e.props;if(n.selectable){var r=e.store.getState().selectedKeys.concat(),i=t.key,o=r.indexOf(i);-1!==o&&r.splice(o,1),"selectedKeys"in n||e.store.setState({selectedKeys:r}),n.onDeselect(l()({},t,{selectedKeys:r}))}},this.getOpenTransitionName=function(){var t=e.props,n=t.openTransitionName,r=t.openAnimation;return n||"string"!==typeof r||(n=t.prefixCls+"-open-"+r),n}},le=ne,ie=n(90),oe=n.n(ie),ae=function(e){function t(n){u()(this,t);var r=c()(this,e.call(this,n));return r.onKeyDown=function(e){if(e.keyCode===y.a.ENTER)return r.onClick(e),!0},r.onMouseLeave=function(e){var t=r.props,n=t.eventKey,l=t.onItemHover,i=t.onMouseLeave;l({key:n,hover:!1}),i({key:n,domEvent:e})},r.onMouseEnter=function(e){var t=r.props,n=t.eventKey,l=t.onItemHover,i=t.onMouseEnter;l({key:n,hover:!0}),i({key:n,domEvent:e})},r.onClick=function(e){var t=r.props,n=t.eventKey,l=t.multiple,i=t.onClick,o=t.onSelect,a=t.onDeselect,u=t.isSelected,s={key:n,keyPath:[n],item:r,domEvent:e};i(s),l?u?a(s):o(s):u||o(s)},r}return f()(t,e),t.prototype.componentDidMount=function(){this.callRef()},t.prototype.componentDidUpdate=function(){this.props.active&&oe()(L.a.findDOMNode(this),L.a.findDOMNode(this.props.parentMenu),{onlyScrollIfNeeded:!0}),this.callRef()},t.prototype.componentWillUnmount=function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)},t.prototype.getPrefixCls=function(){return this.props.rootPrefixCls+"-item"},t.prototype.getActiveClassName=function(){return this.getPrefixCls()+"-active"},t.prototype.getSelectedClassName=function(){return this.getPrefixCls()+"-selected"},t.prototype.getDisabledClassName=function(){return this.getPrefixCls()+"-disabled"},t.prototype.callRef=function(){this.props.manualRef&&this.props.manualRef(this)},t.prototype.render=function(){var e,t=l()({},this.props),n=_()(this.getPrefixCls(),t.className,((e={})[this.getActiveClassName()]=!t.disabled&&t.active,e[this.getSelectedClassName()]=t.isSelected,e[this.getDisabledClassName()]=t.disabled,e)),r=l()({},t.attribute,{title:t.title,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?r=l()({},r,{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(r.role="none");var i={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},o=l()({},t.style);"inline"===t.mode&&(o.paddingLeft=t.inlineIndent*t.level),T.forEach(function(e){return delete t[e]});var a=this.props.itemIcon;return"function"===typeof this.props.itemIcon&&(a=d.a.createElement(this.props.itemIcon,this.props)),d.a.createElement("li",l()({},t,r,i,{style:o}),t.children,a)},t}(d.a.Component);ae.propTypes={attribute:m.a.object,rootPrefixCls:m.a.string,eventKey:m.a.string,active:m.a.bool,children:m.a.any,selectedKeys:m.a.array,disabled:m.a.bool,title:m.a.string,onItemHover:m.a.func,onSelect:m.a.func,onClick:m.a.func,onDeselect:m.a.func,parentMenu:m.a.object,onDestroy:m.a.func,onMouseEnter:m.a.func,onMouseLeave:m.a.func,multiple:m.a.bool,isSelected:m.a.bool,manualRef:m.a.func,itemIcon:m.a.oneOfType([m.a.func,m.a.node])},ae.defaultProps={onSelect:M,onMouseEnter:M,onMouseLeave:M,manualRef:M},ae.isMenuItem=!0;var ue=Object(g.connect)(function(e,t){var n=e.activeKey,r=e.selectedKeys,l=t.eventKey;return{active:n[t.subMenuKey]===l,isSelected:-1!==r.indexOf(l)}})(ae),se=function(e){function t(){var n,r,l;u()(this,t);for(var i=arguments.length,o=Array(i),a=0;a=0&&u===a&&s())}var _=n(23),x=n.n(_),M=n(163),S=n.n(M),C=(n(1),function(){function e(t){var n=t.cellCount,r=t.cellSizeGetter,l=t.estimatedCellSize;o()(this,e),this._lastMeasuredIndex=-1,this._cellSizeGetter=r,this._cellCount=n,this._estimatedCellSize=l,this._layoutVector=new S.a,this._layoutVector.setLength(n),this._layoutVector.setDefaultSize(l)}return u()(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,n=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=n,this._cellSizeGetter=r,this._layoutVector.setLength(t),this._layoutVector.setDefaultSize(n)}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index "+e+" is outside of range 0.."+this._cellCount);var t=this._layoutVector;if(e>this._lastMeasuredIndex){for(var n={index:this._lastMeasuredIndex+1},r=n.index;r<=e;n.index=++r){var l=this._cellSizeGetter(n);if(void 0===l||l!==l)throw Error("Invalid size returned for cell "+r+" of value "+l);null!==l&&t.setItemSize(r,l)}this._lastMeasuredIndex=Math.min(e,this._cellCount-1)}return{offset:t.start(e),size:t.getItemSize(e)}}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){var e=this._lastMeasuredIndex;if(e<=0)return{offset:0,size:0};var t=this._layoutVector;return{offset:t.start(e),size:t.getItemSize(e)}}},{key:"getTotalSize",value:function(){var e=this._cellCount-1;return e>=0?this._layoutVector.end(e):0}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,l=e.currentOffset,i=e.targetIndex;if(r<=0)return 0;var o=this.getSizeAndPositionOfCell(i),a=o.offset,u=a-r+o.size,s=void 0;switch(n){case"start":s=a;break;case"end":s=u;break;case"center":s=a-(r-o.size)/2;break;default:s=Math.max(u,Math.min(a,l))}var c=this.getTotalSize();return Math.max(0,Math.min(c-r,s))}},{key:"getVisibleCellRange",value:function(e){if(0===this.getTotalSize())return{};var t=e.containerSize,n=e.offset,r=n+t-1;return{start:this._findNearestCell(n),stop:this._findNearestCell(r)}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset "+e+" specified");for(var t=this._layoutVector,n=this._cellCount-1,r=Math.max(0,Math.min(e,t.start(n))),l=t.indexOf(r);l>this._lastMeasuredIndex;){if(this.getSizeAndPositionOfCell(l),l===n)return l;-1===(l=t.indexOf(r))&&(l=this._lastMeasuredIndex,this._lastMeasuredIndex=l-1,r=Math.max(0,Math.min(e,t.start(n))))}return l}}]),e}()),z=function(){return"undefined"!==typeof window&&window.chrome&&window.chrome.webstore?16777100:15e5},T=function(){function e(t){var n=t.maxScrollSize,r=void 0===n?z():n,l=x()(t,["maxScrollSize"]);o()(this,e),this._cellSizeAndPositionManager=new C(l),this._maxScrollSize=r}return u()(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),l=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:l});return Math.round(i*(l-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,l=e.currentOffset,i=e.targetIndex;l=this._safeOffsetToOffset({containerSize:r,offset:l});var o=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:l,targetIndex:i});return this._offsetToSafeOffset({containerSize:r,offset:o})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,r=e.totalSize;return r<=t?0:n/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),l=this.getTotalSize();if(r===l)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:r});return Math.round(i*(l-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),l=this.getTotalSize();if(r===l)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:l});return Math.round(i*(r-t))}}]),e}(),E=n(48),O=n.n(E);function P(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var r=n.callback,l=n.indices,i=O()(l),o=!e||i.every(function(e){var t=l[e];return Array.isArray(t)?t.length>0:t>=0}),a=i.length!==O()(t).length||i.some(function(e){var n=t[e],r=l[e];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r});t=l,o&&a&&r(l)}}var L=1;function A(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,r=e.previousCellsCount,l=e.previousCellSize,i=e.previousScrollToAlignment,o=e.previousScrollToIndex,a=e.previousSize,u=e.scrollOffset,s=e.scrollToAlignment,c=e.scrollToIndex,h=e.size,f=e.sizeJustIncreasedFromZero,p=e.updateScrollIndexCallback,d=n.getCellCount(),v=c>=0&&c0&&(hn.getTotalSize()-h&&p(d-1)}var k=n(87),R=n.n(k),I=n(102),V=n.n(I),H=void 0,N=(H="undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).requestAnimationFrame||H.webkitRequestAnimationFrame||H.mozRequestAnimationFrame||H.oRequestAnimationFrame||H.msRequestAnimationFrame||function(e){return H.setTimeout(e,1e3/60)},D=H.cancelAnimationFrame||H.webkitCancelAnimationFrame||H.mozCancelAnimationFrame||H.oCancelAnimationFrame||H.msCancelAnimationFrame||function(e){H.clearTimeout(e)},j=N,F=D,B=function(e){return F(e.id)},U=function(e,t){var n=void 0;V.a.resolve().then(function(){n=Date.now()});var r={id:j(function l(){Date.now()-n>=t?e.call():r.id=j(l)})};return r},G="observed",W="requested",q=function(e){function t(e){o()(this,t);var n=c()(this,(t.__proto__||l()(t)).call(this,e));n._onGridRenderedMemoizer=P(),n._onScrollMemoizer=P(!1),n._deferredInvalidateColumnIndex=null,n._deferredInvalidateRowIndex=null,n._recomputeScrollLeftFlag=!1,n._recomputeScrollTopFlag=!1,n._horizontalScrollBarSize=0,n._verticalScrollBarSize=0,n._scrollbarPresenceChanged=!1,n._renderedColumnStartIndex=0,n._renderedColumnStopIndex=0,n._renderedRowStartIndex=0,n._renderedRowStopIndex=0,n._styleCache={},n._cellCache={},n._debounceScrollEndedCallback=function(){n._disablePointerEventsTimeoutId=null,n.setState({isScrolling:!1,needToResetStyleCache:!1})},n._invokeOnGridRenderedHelper=function(){var e=n.props.onSectionRendered;n._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:n._columnStartIndex,columnOverscanStopIndex:n._columnStopIndex,columnStartIndex:n._renderedColumnStartIndex,columnStopIndex:n._renderedColumnStopIndex,rowOverscanStartIndex:n._rowStartIndex,rowOverscanStopIndex:n._rowStopIndex,rowStartIndex:n._renderedRowStartIndex,rowStopIndex:n._renderedRowStopIndex}})},n._setScrollingContainerRef=function(e){n._scrollingContainer=e},n._onScroll=function(e){e.target===n._scrollingContainer&&n.handleScrollEvent(e.target)};var r=new T({cellCount:e.columnCount,cellSizeGetter:function(n){return t._wrapSizeGetter(e.columnWidth)(n)},estimatedCellSize:t._getEstimatedColumnSize(e)}),i=new T({cellCount:e.rowCount,cellSizeGetter:function(n){return t._wrapSizeGetter(e.rowHeight)(n)},estimatedCellSize:t._getEstimatedRowSize(e)});return n.state={instanceProps:{columnSizeAndPositionManager:r,rowSizeAndPositionManager:i,prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:!0===e.isScrolling,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,prevScrollLeft:e.scrollLeft,prevScrollTop:e.scrollTop,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:L,scrollDirectionVertical:L,scrollLeft:e.scrollLeft||0,scrollTop:e.scrollTop||0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return f()(t,e),u()(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,l=void 0===r?this.props.scrollToColumn:r,i=e.rowIndex,o=void 0===i?this.props.scrollToRow:i,a=y()({},this.props,{scrollToAlignment:n,scrollToColumn:l,scrollToRow:o});return{scrollLeft:this._getCalculatedScrollLeft(a),scrollTop:this._getCalculatedScrollTop(a)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,l=void 0===r?0:r;if(!(l<0)){this._debounceScrollEnded();var i=this.props,o=i.autoHeight,a=i.autoWidth,u=i.height,s=i.width,c=this.state.instanceProps,h=c.scrollbarSize,f=c.rowSizeAndPositionManager.getTotalSize(),p=c.columnSizeAndPositionManager.getTotalSize(),d=Math.min(Math.max(0,p-s+h),n),v=Math.min(Math.max(0,f-u+h),l);if(this.state.scrollLeft!==d||this.state.scrollTop!==v){var m={isScrolling:!0,scrollDirectionHorizontal:d!==this.state.scrollLeft?d>this.state.scrollLeft?L:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:v!==this.state.scrollTop?v>this.state.scrollTop?L:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:G};o||(m.scrollTop=v),a||(m.scrollLeft=d),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:v,totalColumnsWidth:p,totalRowsHeight:f})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,l=void 0===r?0:r,i=this.props,o=i.scrollToColumn,a=i.scrollToRow,u=this.state.instanceProps;u.columnSizeAndPositionManager.resetCell(n),u.rowSizeAndPositionManager.resetCell(l),this._recomputeScrollLeftFlag=o>=0&&(this.state.scrollDirectionHorizontal===L?n<=o:n>=o),this._recomputeScrollTopFlag=a>=0&&(this.state.scrollDirectionVertical===L?l<=a:l>=a),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,l=this.props;r>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(y()({},l,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(y()({},l,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,l=e.scrollLeft,i=e.scrollToColumn,o=e.scrollTop,a=e.scrollToRow,u=e.width,s=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),s.scrollbarSizeMeasured||this.setState(function(e){var t=y()({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t}),"number"===typeof l&&l>=0||"number"===typeof o&&o>=0){var c=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:l,scrollTop:o});c&&(c.needToResetStyleCache=!1,this.setState(c))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var h=r>0&&u>0;i>=0&&h&&this._updateScrollLeftForScrollToColumn(),a>=0&&h&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:l||0,scrollTop:o||0,totalColumnsWidth:s.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:s.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,l=r.autoHeight,i=r.autoWidth,o=r.columnCount,a=r.height,u=r.rowCount,s=r.scrollToAlignment,c=r.scrollToColumn,h=r.scrollToRow,f=r.width,p=this.state,d=p.scrollLeft,v=p.scrollPositionChangeReason,m=p.scrollTop,g=p.instanceProps;this._handleInvalidatedGridSize();var y=o>0&&0===e.columnCount||u>0&&0===e.rowCount;v===W&&(!i&&d>=0&&(d!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=d),!l&&m>=0&&(m!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=m));var b=(0===e.width||0===e.height)&&a>0&&f>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):A({cellSizeAndPositionManager:g.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:d,scrollToAlignment:s,scrollToIndex:c,size:f,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):A({cellSizeAndPositionManager:g.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:m,scrollToAlignment:s,scrollToIndex:h,size:a,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),d!==t.scrollLeft||m!==t.scrollTop){var w=g.rowSizeAndPositionManager.getTotalSize(),_=g.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:m,totalColumnsWidth:_,totalRowsHeight:w})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&B(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,l=e.className,i=e.containerProps,o=e.containerRole,a=e.containerStyle,u=e.height,s=e.id,c=e.noContentRenderer,h=e.role,f=e.style,d=e.tabIndex,v=e.width,m=this.state,g=m.instanceProps,w=m.needToResetStyleCache,_=this._isScrolling(),x={boxSizing:"border-box",direction:"ltr",height:n?"auto":u,position:"relative",width:r?"auto":v,WebkitOverflowScrolling:"touch",willChange:"transform"};w&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var M=g.columnSizeAndPositionManager.getTotalSize(),S=g.rowSizeAndPositionManager.getTotalSize(),C=S>u?g.scrollbarSize:0,z=M>v?g.scrollbarSize:0;z===this._horizontalScrollBarSize&&C===this._verticalScrollBarSize||(this._horizontalScrollBarSize=z,this._verticalScrollBarSize=C,this._scrollbarPresenceChanged=!0),x.overflowX=M+C<=v?"hidden":"auto",x.overflowY=S+z<=u?"hidden":"auto";var T=this._childrenToDisplay,E=0===T.length&&u>0&&v>0;return p.createElement("div",y()({ref:this._setScrollingContainerRef},i,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:Object(b.default)("ReactVirtualized__Grid",l),id:s,onScroll:this._onScroll,role:h,style:y()({},x,f),tabIndex:d}),T.length>0&&p.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:o,style:y()({width:t?"auto":M,height:S,maxWidth:M,maxHeight:S,overflow:"hidden",pointerEvents:_?"none":"",position:"relative"},a)},T),E&&c())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,l=e.columnCount,i=e.deferredMeasurementCache,o=e.height,a=e.overscanColumnCount,u=e.overscanIndicesGetter,s=e.overscanRowCount,c=e.rowCount,h=e.width,f=e.isScrollingOptOut,p=t.scrollDirectionHorizontal,d=t.scrollDirectionVertical,v=t.instanceProps,m=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,g=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],o>0&&h>0){var b=v.columnSizeAndPositionManager.getVisibleCellRange({containerSize:h,offset:g}),w=v.rowSizeAndPositionManager.getVisibleCellRange({containerSize:o,offset:m}),_=v.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:h,offset:g}),x=v.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:o,offset:m});this._renderedColumnStartIndex=b.start,this._renderedColumnStopIndex=b.stop,this._renderedRowStartIndex=w.start,this._renderedRowStopIndex=w.stop;var M=u({direction:"horizontal",cellCount:l,overscanCellsCount:a,scrollDirection:p,startIndex:"number"===typeof b.start?b.start:0,stopIndex:"number"===typeof b.stop?b.stop:-1}),S=u({direction:"vertical",cellCount:c,overscanCellsCount:s,scrollDirection:d,startIndex:"number"===typeof w.start?w.start:0,stopIndex:"number"===typeof w.stop?w.stop:-1}),C=M.overscanStartIndex,z=M.overscanStopIndex,T=S.overscanStartIndex,E=S.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var O=T;O<=E;O++)if(!i.has(O,0)){C=0,z=l-1;break}if(!i.hasFixedWidth())for(var P=C;P<=z;P++)if(!i.has(0,P)){T=0,E=c-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:v.columnSizeAndPositionManager,columnStartIndex:C,columnStopIndex:z,deferredMeasurementCache:i,horizontalOffsetAdjustment:_,isScrolling:y,isScrollingOptOut:f,parent:this,rowSizeAndPositionManager:v.rowSizeAndPositionManager,rowStartIndex:T,rowStopIndex:E,scrollLeft:g,scrollTop:m,styleCache:this._styleCache,verticalOffsetAdjustment:x,visibleColumnIndices:b,visibleRowIndices:w}),this._columnStartIndex=C,this._columnStopIndex=z,this._rowStartIndex=T,this._rowStopIndex=E}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&B(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=U(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex&&"number"===typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,l=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t.props,a=o.height;(0,o.onScroll)({clientHeight:a,clientWidth:o.width,scrollHeight:i,scrollLeft:n,scrollTop:r,scrollWidth:l})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,l=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});l&&(l.needToResetStyleCache=!1,this.setState(l))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var l=this._columnStartIndex;l<=this._columnStopIndex;l++){var i=r+"-"+l;this._styleCache[i]=e[i],n&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={},l=n.instanceProps;0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==l.prevScrollLeft&&e.scrollToColumn<0||e.scrollTop!==l.prevScrollTop&&e.scrollToRow<0)&&m()(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop})),r.needToResetStyleCache=!1,e.columnWidth===l.prevColumnWidth&&e.rowHeight===l.prevRowHeight||(r.needToResetStyleCache=!0),l.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),l.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==l.prevColumnCount&&0!==l.prevRowCount||(l.prevColumnCount=0,l.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===l.prevIsScrolling&&m()(r,{isScrolling:!1});var i=void 0,o=void 0;return w({cellCount:l.prevColumnCount,cellSize:"number"===typeof l.prevColumnWidth?l.prevColumnWidth:null,computeMetadataCallback:function(){return l.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"===typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:l.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),w({cellCount:l.prevRowCount,cellSize:"number"===typeof l.prevRowHeight?l.prevRowHeight:null,computeMetadataCallback:function(){return l.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"===typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:l.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){o=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),l.prevColumnCount=e.columnCount,l.prevColumnWidth=e.columnWidth,l.prevIsScrolling=!0===e.isScrolling,l.prevRowCount=e.rowCount,l.prevRowHeight=e.rowHeight,l.prevScrollToColumn=e.scrollToColumn,l.prevScrollToRow=e.scrollToRow,l.prevScrollLeft=e.scrollLeft,l.prevScrollTop=e.scrollTop,l.scrollbarSize=e.getScrollbarSize(),void 0===l.scrollbarSize?(l.scrollbarSizeMeasured=!1,l.scrollbarSize=0):l.scrollbarSizeMeasured=!0,r.instanceProps=l,y()({},r,i,o)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"===typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"===typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,l={scrollPositionChangeReason:W};return"number"===typeof n&&n>=0&&(l.scrollDirectionHorizontal=n>t.scrollLeft?L:-1,l.scrollLeft=n),"number"===typeof r&&r>=0&&(l.scrollDirectionVertical=r>t.scrollTop?L:-1,l.scrollTop=r),"number"===typeof n&&n>=0&&n!==t.scrollLeft||"number"===typeof r&&r>=0&&r!==t.scrollTop?l:null}},{key:"_wrapSizeGetter",value:function(e){return"function"===typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,l=e.scrollToAlignment,i=e.scrollToColumn,o=e.width,a=t.scrollLeft,u=t.instanceProps;if(n>0){var s=n-1,c=i<0?s:Math.min(s,i),h=u.rowSizeAndPositionManager.getTotalSize(),f=u.scrollbarSizeMeasured&&h>r?u.scrollbarSize:0;return u.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:o-f,currentOffset:a,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,l=t._getCalculatedScrollLeft(e,n);return"number"===typeof l&&l>=0&&r!==l?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:l,scrollTop:-1}):null}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,l=e.scrollToAlignment,i=e.scrollToRow,o=e.width,a=t.scrollTop,u=t.instanceProps;if(r>0){var s=r-1,c=i<0?s:Math.min(s,i),h=u.columnSizeAndPositionManager.getTotalSize(),f=u.scrollbarSizeMeasured&&h>o?u.scrollbarSize:0;return u.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:n-f,currentOffset:a,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,l=t._getCalculatedScrollTop(e,n);return"number"===typeof l&&l>=0&&r!==l?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:l}):null}}]),t}(p.PureComponent);q.defaultProps={"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,n=e.cellRenderer,r=e.columnSizeAndPositionManager,l=e.columnStartIndex,i=e.columnStopIndex,o=e.deferredMeasurementCache,a=e.horizontalOffsetAdjustment,u=e.isScrolling,s=e.isScrollingOptOut,c=e.parent,h=e.rowSizeAndPositionManager,f=e.rowStartIndex,p=e.rowStopIndex,d=e.styleCache,v=e.verticalOffsetAdjustment,m=e.visibleColumnIndices,g=e.visibleRowIndices,y=[],b=r.areOffsetsAdjusted()||h.areOffsetsAdjusted(),w=!u&&!b,_=f;_<=p;_++)for(var x=h.getSizeAndPositionOfCell(_),M=l;M<=i;M++){var S=r.getSizeAndPositionOfCell(M),C=M>=m.start&&M<=m.stop&&_>=g.start&&_<=g.stop,z=_+"-"+M,T=void 0;w&&d[z]?T=d[z]:o&&!o.has(_,M)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:x.size,left:S.offset+a,position:"absolute",top:x.offset+v,width:S.size},d[z]=T);var E={columnIndex:M,isScrolling:u,isVisible:C,key:z,parent:c,rowIndex:_,style:T},O=void 0;!s&&!u||a||v?O=n(E):(t[z]||(t[z]=n(E)),O=t[z]),null!=O&&!1!==O&&y.push(O)}return y},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:R.a,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,l=e.startIndex,i=e.stopIndex;return r===L?{overscanStartIndex:Math.max(0,l),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,l-n),overscanStopIndex:Math.min(t-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1},q.propTypes=null,Object(d.polyfill)(q);var Y=q,K=1;function X(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,l=e.startIndex,i=e.stopIndex;return n=Math.max(1,n),r===K?{overscanStartIndex:Math.max(0,l-1),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,l-n),overscanStopIndex:Math.min(t-1,i+1)}}var Z=function(e){function t(){var e,n,r,i;o()(this,t);for(var a=arguments.length,u=Array(a),s=0;s0&&void 0!==arguments[0]?arguments[0]:{};o()(this,e),this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._columnCount=0,this._rowCount=0,this.columnWidth=function(e){var n=e.index,r=t._keyMapper(0,n);return t._columnWidthCache.hasOwnProperty(r)?t._columnWidthCache[r]:t._defaultWidth},this.rowHeight=function(e){var n=e.index,r=t._keyMapper(n,0);return t._rowHeightCache.hasOwnProperty(r)?t._rowHeightCache[r]:t._defaultHeight};var r=n.defaultHeight,l=n.defaultWidth,i=n.fixedHeight,a=n.fixedWidth,u=n.keyMapper,s=n.minHeight,c=n.minWidth;this._hasFixedHeight=!0===i,this._hasFixedWidth=!0===a,this._minHeight=s||0,this._minWidth=c||0,this._keyMapper=u||le,this._defaultHeight=Math.max(this._minHeight,"number"===typeof r?r:ne),this._defaultWidth=Math.max(this._minWidth,"number"===typeof l?l:re)}u()(e,[{key:"clear",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(e,t);delete this._cellHeightCache[n],delete this._cellWidthCache[n],this._updateCachedColumnAndRowSizes(e,t)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var n=this._keyMapper(e,t);return this._cellHeightCache.hasOwnProperty(n)?Math.max(this._minHeight,this._cellHeightCache[n]):this._defaultHeight}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var n=this._keyMapper(e,t);return this._cellWidthCache.hasOwnProperty(n)?Math.max(this._minWidth,this._cellWidthCache[n]):this._defaultWidth}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(e,t);return this._cellHeightCache.hasOwnProperty(n)}},{key:"set",value:function(e,t,n,r){var l=this._keyMapper(e,t);t>=this._columnCount&&(this._columnCount=t+1),e>=this._rowCount&&(this._rowCount=e+1),this._cellHeightCache[l]=r,this._cellWidthCache[l]=n,this._updateCachedColumnAndRowSizes(e,t)}},{key:"_updateCachedColumnAndRowSizes",value:function(e,t){if(!this._hasFixedWidth){for(var n=0,r=0;r=0){var c=t.getScrollPositionForCell({align:r,cellIndex:l,height:n,scrollLeft:u,scrollTop:s,width:i});c.scrollLeft===u&&c.scrollTop===s||a._setScrollPosition(c)}},a._onScroll=function(e){if(e.target===a._scrollingContainer){a._enablePointerEventsAfterDelay();var t=a.props,n=t.cellLayoutManager,r=t.height,l=t.isScrollingChange,i=t.width,o=a._scrollbarSize,u=n.getTotalSize(),s=u.height,c=u.width,h=Math.max(0,Math.min(c-i+o,e.target.scrollLeft)),f=Math.max(0,Math.min(s-r+o,e.target.scrollTop));if(a.state.scrollLeft!==h||a.state.scrollTop!==f){var p=e.cancelable?ie.OBSERVED:ie.REQUESTED;a.state.isScrolling||l(!0),a.setState({isScrolling:!0,scrollLeft:h,scrollPositionChangeReason:p,scrollTop:f})}a._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:f,totalWidth:c,totalHeight:s})}},a._scrollbarSize=R()(),void 0===a._scrollbarSize?(a._scrollbarSizeMeasured=!1,a._scrollbarSize=0):a._scrollbarSizeMeasured=!0,a}return f()(t,e),u()(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,l=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=R()(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||l>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:l}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),o=i.height,a=i.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:l||0,totalHeight:o,totalWidth:a})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,l=n.scrollToAlignment,i=n.scrollToCell,o=n.width,a=this.state,u=a.scrollLeft,s=a.scrollPositionChangeReason,c=a.scrollTop;s===ie.REQUESTED&&(u>=0&&u!==t.scrollLeft&&u!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=u),c>=0&&c!==t.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),r===e.height&&l===e.scrollToAlignment&&i===e.scrollToCell&&o===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,r=e.cellLayoutManager,l=e.className,i=e.height,o=e.horizontalOverscanSize,a=e.id,u=e.noContentRenderer,s=e.style,c=e.verticalOverscanSize,h=e.width,f=this.state,d=f.isScrolling,v=f.scrollLeft,m=f.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var g=r.getTotalSize(),w=g.height,_=g.width,x=Math.max(0,v-o),M=Math.max(0,m-c),S=Math.min(_,v+h+o),C=Math.min(w,m+i+c),z=i>0&&h>0?r.cellRenderers({height:C-M,isScrolling:d,width:S-x,x:x,y:M}):[],T={boxSizing:"border-box",direction:"ltr",height:t?"auto":i,position:"relative",WebkitOverflowScrolling:"touch",width:h,willChange:"transform"},E=w>i?this._scrollbarSize:0,O=_>h?this._scrollbarSize:0;return T.overflowX=_+E<=h?"hidden":"auto",T.overflowY=w+O<=i?"hidden":"auto",p.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Object(b.default)("ReactVirtualized__Collection",l),id:a,onScroll:this._onScroll,role:"grid",style:y()({},T,s),tabIndex:0},n>0&&p.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:w,maxHeight:w,maxWidth:_,overflow:"hidden",pointerEvents:d?"none":"",width:_}},z),0===n&&u())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,l=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t.props,a=o.height;(0,o.onScroll)({clientHeight:a,clientWidth:o.width,scrollHeight:l,scrollLeft:n,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:ie.REQUESTED};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop}:null:{scrollLeft:0,scrollTop:0}}}]),t}(p.PureComponent);oe.defaultProps={"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0},oe.propTypes={},Object(d.polyfill)(oe);var ae=oe,ue=function(){function e(t){var n=t.height,r=t.width,l=t.x,i=t.y;o()(this,e),this.height=n,this.width=r,this.x=l,this.y=i,this._indexMap={},this._indices=[]}return u()(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return this.x+","+this.y+" "+this.width+"x"+this.height}}]),e}(),se=100,ce=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se;o()(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return u()(e,[{key:"getCellIndices",value:function(e){var t=e.height,n=e.width,r=e.x,l=e.y,i={};return this.getSections({height:t,width:n,x:r,y:l}).forEach(function(e){return e.getCellIndices().forEach(function(e){i[e]=e})}),O()(i).map(function(e){return i[e]})}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,n=e.width,r=e.x,l=e.y,i=Math.floor(r/this._sectionSize),o=Math.floor((r+n-1)/this._sectionSize),a=Math.floor(l/this._sectionSize),u=Math.floor((l+t-1)/this._sectionSize),s=[],c=i;c<=o;c++)for(var h=a;h<=u;h++){var f=c+"."+h;this._sections[f]||(this._sections[f]=new ue({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:h*this._sectionSize})),s.push(this._sections[f])}return s}},{key:"getTotalSectionCount",value:function(){return O()(this._sections).length}},{key:"toString",value:function(){var e=this;return O()(this._sections).map(function(t){return e._sections[t].toString()})}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,n=e.index;this._cellMetadata[n]=t,this.getSections(t).forEach(function(e){return e.addCellIndex({index:n})})}}]),e}();function he(e){var t=e.align,n=void 0===t?"auto":t,r=e.cellOffset,l=e.cellSize,i=e.containerSize,o=e.currentOffset,a=r,u=a-i+l;switch(n){case"start":return a;case"end":return u;case"center":return a-(i-l)/2;default:return Math.max(u,Math.min(a,o))}}var fe=function(e){function t(e,n){o()(this,t);var r=c()(this,(t.__proto__||l()(t)).call(this,e,n));return r._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(r),r._setCollectionViewRef=r._setCollectionViewRef.bind(r),r}return f()(t,e),u()(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=x()(this.props,[]);return p.createElement(ae,y()({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,n=e.cellSizeAndPositionGetter,r=e.sectionSize,l=[],i=new ce(r),o=0,a=0,u=0;u=0&&nn||l1&&void 0!==arguments[1]?arguments[1]:0,n="function"===typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,l=this.props,i=l.isRowLoaded,o=l.minimumBatchSize,a=l.rowCount,u=l.threshold,s=function(e){for(var t=e.isRowLoaded,n=e.minimumBatchSize,r=e.rowCount,l=e.startIndex,i=e.stopIndex,o=[],a=null,u=null,s=l;s<=i;s++){var c=t({index:s});c?null!==u&&(o.push({startIndex:a,stopIndex:u}),a=u=null):(u=s,null===a&&(a=s))}if(null!==u){for(var h=Math.min(Math.max(u,a+n-1),r-1),f=u+1;f<=h&&!t({index:f});f++)u=f;o.push({startIndex:a,stopIndex:u})}if(o.length)for(var p=o[0];p.stopIndex-p.startIndex+10;){var d=p.startIndex-1;if(t({index:d}))break;p.startIndex=d}return o}({isRowLoaded:i,minimumBatchSize:o,rowCount:a,startIndex:Math.max(0,e-u),stopIndex:Math.min(a-1,t+u)}),c=(n=[]).concat.apply(n,ve()(s.map(function(e){return[e.startIndex,e.stopIndex]})));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(s)},indices:{squashedUnloadedRanges:c}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(p.PureComponent);me.defaultProps={minimumBatchSize:10,rowCount:0,threshold:15};me.propTypes={};var ge=n(162),ye=n.n(ge),be=function(e){function t(){var e,n,r,i;o()(this,t);for(var a=arguments.length,u=Array(a),s=0;s0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,l=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,l=e.width,i=Object(b.default)("ReactVirtualized__List",t);return p.createElement(Y,y()({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:i,columnWidth:l,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(p.PureComponent);be.defaultProps={autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:X,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}},be.propTypes=null;var we=n(16),_e=n.n(we),xe=n(222),Me=n.n(xe);var Se={ge:function(e,t,n,r,l){return"function"===typeof n?function(e,t,n,r,l){for(var i=n+1;t<=n;){var o=t+n>>>1;l(e[o],r)>=0?(i=o,n=o-1):t=o+1}return i}(e,void 0===r?0:0|r,void 0===l?e.length-1:0|l,t,n):function(e,t,n,r){for(var l=n+1;t<=n;){var i=t+n>>>1;e[i]>=r?(l=i,n=i-1):t=i+1}return l}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},gt:function(e,t,n,r,l){return"function"===typeof n?function(e,t,n,r,l){for(var i=n+1;t<=n;){var o=t+n>>>1;l(e[o],r)>0?(i=o,n=o-1):t=o+1}return i}(e,void 0===r?0:0|r,void 0===l?e.length-1:0|l,t,n):function(e,t,n,r){for(var l=n+1;t<=n;){var i=t+n>>>1;e[i]>r?(l=i,n=i-1):t=i+1}return l}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},lt:function(e,t,n,r,l){return"function"===typeof n?function(e,t,n,r,l){for(var i=t-1;t<=n;){var o=t+n>>>1;l(e[o],r)<0?(i=o,t=o+1):n=o-1}return i}(e,void 0===r?0:0|r,void 0===l?e.length-1:0|l,t,n):function(e,t,n,r){for(var l=t-1;t<=n;){var i=t+n>>>1;e[i]>>1;l(e[o],r)<=0?(i=o,t=o+1):n=o-1}return i}(e,void 0===r?0:0|r,void 0===l?e.length-1:0|l,t,n):function(e,t,n,r){for(var l=t-1;t<=n;){var i=t+n>>>1;e[i]<=r?(l=i,t=i+1):n=i-1}return l}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},eq:function(e,t,n,r,l){return"function"===typeof n?function(e,t,n,r,l){for(;t<=n;){var i=t+n>>>1,o=l(e[i],r);if(0===o)return i;o<=0?t=i+1:n=i-1}return-1}(e,void 0===r?0:0|r,void 0===l?e.length-1:0|l,t,n):function(e,t,n,r){for(;t<=n;){var l=t+n>>>1,i=e[l];if(i===r)return l;i<=r?t=l+1:n=l-1}return-1}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)}},Ce=0,ze=1;function Te(e,t,n,r,l){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=l,this.count=(t?t.count:0)+(n?n.count:0)+r.length}var Ee=Te.prototype;function Oe(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function Pe(e,t){var n=De(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function Le(e,t){var n=e.intervals([]);n.push(t),Pe(e,n)}function Ae(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?Ce:(n.splice(r,1),Pe(e,n),ze)}function ke(e,t,n){for(var r=0;r=0&&e[r][1]>=t;--r){var l=n(e[r]);if(l)return l}}function Ie(e,t){for(var n=0;n>1],l=[],i=[],o=[];for(n=0;n3*(t+1)?Le(this,e):this.left.insert(e):this.left=De([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?Le(this,e):this.right.insert(e):this.right=De([e]);else{var n=Se.ge(this.leftPoints,e,He),r=Se.ge(this.rightPoints,e,Ne);this.leftPoints.splice(n,0,e),this.rightPoints.splice(r,0,e)}},Ee.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?Ae(this,e):2===(i=this.left.remove(e))?(this.left=null,this.count-=1,ze):(i===ze&&(this.count-=1),i):Ce;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?Ae(this,e):2===(i=this.right.remove(e))?(this.right=null,this.count-=1,ze):(i===ze&&(this.count-=1),i):Ce;if(1===this.count)return this.leftPoints[0]===e?2:Ce;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,r=this.left;r.right;)n=r,r=r.right;if(n===this)r.right=this.right;else{var l=this.left,i=this.right;n.count-=r.count,n.right=r.left,r.left=l,r.right=i}Oe(this,r),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?Oe(this,this.left):Oe(this,this.right);return ze}for(l=Se.ge(this.leftPoints,e,He);lthis.mid){var n;if(this.right)if(n=this.right.queryPoint(e,t))return n;return Re(this.rightPoints,e,t)}return Ie(this.leftPoints,t)},Ee.queryInterval=function(e,t,n){var r;if(ethis.mid&&this.right&&(r=this.right.queryInterval(e,t,n)))return r;return tthis.mid?Re(this.rightPoints,e,n):Ie(this.leftPoints,n)};var Fe=je.prototype;Fe.insert=function(e){this.root?this.root.insert(e):this.root=new Te(e[0],null,null,[e],[e])},Fe.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),t!==Ce}return!1},Fe.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},Fe.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(Fe,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Fe,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var Be=function(){function e(){var t;o()(this,e),this._columnSizeMap={},this._intervalTree=t&&0!==t.length?new je(De(t)):new je(null),this._leftMap={}}return u()(e,[{key:"estimateTotalHeight",value:function(e,t,n){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*n}},{key:"range",value:function(e,t,n){var r=this;this._intervalTree.queryInterval(e,e+t,function(e){var t=Me()(e,3),l=t[0],i=(t[1],t[2]);return n(i,r._leftMap[i],l)})}},{key:"setPosition",value:function(e,t,n,r){this._intervalTree.insert([n,n+r,e]),this._leftMap[e]=t;var l=this._columnSizeMap,i=l[t];l[t]=void 0===i?n+r:Math.max(i,n+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=Math.max(t,r)}return t}}]),e}(),Ue=function(e){function t(){var e,n,r,i;o()(this,t);for(var a=arguments.length,u=Array(a),s=0;s0&&void 0!==arguments[0]?arguments[0]:{};o()(this,e),this.columnWidth=function(e){var n=e.index;t._cellMeasurerCache.columnWidth({index:n+t._columnIndexOffset})},this.rowHeight=function(e){var n=e.index;t._cellMeasurerCache.rowHeight({index:n+t._rowIndexOffset})};var r=n.cellMeasurerCache,l=n.columnIndexOffset,i=void 0===l?0:l,a=n.rowIndexOffset,u=void 0===a?0:a;this._cellMeasurerCache=r,this._columnIndexOffset=i,this._rowIndexOffset=u}return u()(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,n,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,n,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}(),qe=function(e){function t(e,n){o()(this,t);var r=c()(this,(t.__proto__||l()(t)).call(this,e,n));Ye.call(r);var i=e.deferredMeasurementCache,a=e.fixedColumnCount,u=e.fixedRowCount;return r._maybeCalculateCachedStyles(!0),i&&(r._deferredMeasurementCacheBottomLeftGrid=u>0?new We({cellMeasurerCache:i,columnIndexOffset:0,rowIndexOffset:u}):i,r._deferredMeasurementCacheBottomRightGrid=a>0||u>0?new We({cellMeasurerCache:i,columnIndexOffset:a,rowIndexOffset:u}):i,r._deferredMeasurementCacheTopRightGrid=a>0?new We({cellMeasurerCache:i,columnIndexOffset:a,rowIndexOffset:0}):i),r}return f()(t,e),u()(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,l=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,l):l}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,l=void 0===r?0:r,i=this.props,o=i.fixedColumnCount,a=i.fixedRowCount,u=Math.max(0,n-o),s=Math.max(0,l-a);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:s}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:u,rowIndex:s}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:l}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:u,rowIndex:l}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),l=(e.scrollTop,e.scrollToRow),i=x()(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var o=this.state,a=o.scrollLeft,u=o.scrollTop;return p.createElement("div",{style:this._containerOuterStyle},p.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(i),this._renderTopRightGrid(y()({},i,{onScroll:t,scrollLeft:a}))),p.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(y()({},i,{onScroll:t,scrollTop:u})),this._renderBottomRightGrid(y()({},i,{onScroll:t,onSectionRendered:n,scrollLeft:a,scrollToColumn:r,scrollToRow:l,scrollTop:u}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(null==this._leftGridWidth)if("function"===typeof n){for(var r=0,l=0;l=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(p.PureComponent);qe.defaultProps={classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1};var Ye=function(){var e=this;this.state={scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1},this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this._bottomLeftGridRef=function(t){e._bottomLeftGrid=t},this._bottomRightGridRef=function(t){e._bottomRightGrid=t},this._cellRendererBottomLeftGrid=function(t){var n=t.rowIndex,r=x()(t,["rowIndex"]),l=e.props,i=l.cellRenderer,o=l.fixedRowCount;return n===l.rowCount-o?p.createElement("div",{key:r.key,style:y()({},r.style,{height:20})}):i(y()({},r,{parent:e,rowIndex:n+o}))},this._cellRendererBottomRightGrid=function(t){var n=t.columnIndex,r=t.rowIndex,l=x()(t,["columnIndex","rowIndex"]),i=e.props,o=i.cellRenderer,a=i.fixedColumnCount,u=i.fixedRowCount;return o(y()({},l,{columnIndex:n+a,parent:e,rowIndex:r+u}))},this._cellRendererTopRightGrid=function(t){var n=t.columnIndex,r=x()(t,["columnIndex"]),l=e.props,i=l.cellRenderer,o=l.columnCount,a=l.fixedColumnCount;return n===o-a?p.createElement("div",{key:r.key,style:y()({},r.style,{width:20})}):i(y()({},r,{columnIndex:n+a,parent:e}))},this._columnWidthRightGrid=function(t){var n=t.index,r=e.props,l=r.columnCount,i=r.fixedColumnCount,o=r.columnWidth,a=e.state,u=a.scrollbarSize;return a.showHorizontalScrollbar&&n===l-i?u:"function"===typeof o?o({index:n+i}):o},this._onScroll=function(t){var n=t.scrollLeft,r=t.scrollTop;e.setState({scrollLeft:n,scrollTop:r});var l=e.props.onScroll;l&&l(t)},this._onScrollbarPresenceChange=function(t){var n=t.horizontal,r=t.size,l=t.vertical,i=e.state,o=i.showHorizontalScrollbar,a=i.showVerticalScrollbar;if(n!==o||l!==a){e.setState({scrollbarSize:r,showHorizontalScrollbar:n,showVerticalScrollbar:l});var u=e.props.onScrollbarPresenceChange;"function"===typeof u&&u({horizontal:n,size:r,vertical:l})}},this._onScrollLeft=function(t){var n=t.scrollLeft;e._onScroll({scrollLeft:n,scrollTop:e.state.scrollTop})},this._onScrollTop=function(t){var n=t.scrollTop;e._onScroll({scrollTop:n,scrollLeft:e.state.scrollLeft})},this._rowHeightBottomGrid=function(t){var n=t.index,r=e.props,l=r.fixedRowCount,i=r.rowCount,o=r.rowHeight,a=e.state,u=a.scrollbarSize;return a.showVerticalScrollbar&&n===i-l?u:"function"===typeof o?o({index:n+l}):o},this._topLeftGridRef=function(t){e._topLeftGrid=t},this._topRightGridRef=function(t){e._topRightGrid=t}};qe.propTypes={},Object(d.polyfill)(qe);var Ke=qe,Xe=function(e){function t(e,n){o()(this,t);var r=c()(this,(t.__proto__||l()(t)).call(this,e,n));return r.state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(r),r}return f()(t,e),u()(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,l=t.scrollHeight,i=t.scrollLeft,o=t.scrollTop,a=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:l,scrollLeft:i,scrollTop:o,scrollWidth:a})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,l=e.scrollLeft,i=e.scrollTop,o=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:l,scrollTop:i,scrollWidth:o})}}]),t}(p.PureComponent);Xe.propTypes={};function Ze(e){var t=e.className,n=e.columns,r=e.style;return p.createElement("div",{className:t,role:"row",style:r},n)}Ze.propTypes=null;var Je={ASC:"ASC",DESC:"DESC"};function Qe(e){var t=e.sortDirection,n=Object(b.default)("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===Je.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===Je.DESC});return p.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===Je.ASC?p.createElement("path",{d:"M7 14l5-5 5 5z"}):p.createElement("path",{d:"M7 10l5 5 5-5z"}),p.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function $e(e){var t=e.dataKey,n=e.label,r=e.sortBy,l=e.sortDirection,i=r===t,o=[p.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"===typeof n?n:null},n)];return i&&o.push(p.createElement(Qe,{key:"SortIndicator",sortDirection:l})),o}function et(e){var t=e.className,n=e.columns,r=e.index,l=e.key,i=e.onRowClick,o=e.onRowDoubleClick,a=e.onRowMouseOut,u=e.onRowMouseOver,s=e.onRowRightClick,c=e.rowData,h=e.style,f={"aria-rowindex":r+1};return(i||o||a||u||s)&&(f["aria-label"]="row",f.tabIndex=0,i&&(f.onClick=function(e){return i({event:e,index:r,rowData:c})}),o&&(f.onDoubleClick=function(e){return o({event:e,index:r,rowData:c})}),a&&(f.onMouseOut=function(e){return a({event:e,index:r,rowData:c})}),u&&(f.onMouseOver=function(e){return u({event:e,index:r,rowData:c})}),s&&(f.onContextMenu=function(e){return s({event:e,index:r,rowData:c})})),p.createElement("div",y()({},f,{className:t,key:l,role:"row",style:h}),n)}Qe.propTypes={},$e.propTypes=null,et.propTypes=null;var tt=function(e){function t(){return o()(this,t),c()(this,(t.__proto__||l()(t)).apply(this,arguments))}return f()(t,e),t}(p.Component);tt.defaultProps={cellDataGetter:function(e){var t=e.dataKey,n=e.rowData;return"function"===typeof n.get?n.get(t):n[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:Je.ASC,flexGrow:0,flexShrink:1,headerRenderer:$e,style:{}};var nt=tt;tt.propTypes={};var rt=function(e){function t(e){o()(this,t);var n=c()(this,(t.__proto__||l()(t)).call(this,e));return n.state={scrollbarWidth:0},n._createColumn=n._createColumn.bind(n),n._createRow=n._createRow.bind(n),n._onScroll=n._onScroll.bind(n),n._onSectionRendered=n._onSectionRendered.bind(n),n._setRef=n._setRef.bind(n),n}return f()(t,e),u()(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,l=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,l=t.disableHeader,i=t.gridClassName,o=t.gridStyle,a=t.headerHeight,u=t.headerRowRenderer,s=t.height,c=t.id,h=t.noRowsRenderer,f=t.rowClassName,d=t.rowStyle,v=t.scrollToIndex,m=t.style,g=t.width,w=this.state.scrollbarWidth,_=l?s:s-a,x="function"===typeof f?f({index:-1}):f,M="function"===typeof d?d({index:-1}):d;return this._cachedColumnStyles=[],p.Children.toArray(n).forEach(function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=y()({},r,{overflow:"hidden"})}),p.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":p.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:Object(b.default)("ReactVirtualized__Table",r),id:c,role:"grid",style:m},!l&&u({className:Object(b.default)("ReactVirtualized__Table__headerRow",x),columns:this._getHeaderColumns(),style:y()({height:a,overflow:"hidden",paddingRight:w,width:g},M)}),p.createElement(Y,y()({},this.props,{autoContainerWidth:!0,className:Object(b.default)("ReactVirtualized__Table__Grid",i),cellRenderer:this._createRow,columnWidth:g,columnCount:1,height:_,id:void 0,noContentRenderer:h,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:w,scrollToRow:v,style:y()({},o,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,l=e.parent,i=e.rowData,o=e.rowIndex,a=this.props.onColumnClick,u=t.props,s=u.cellDataGetter,c=u.cellRenderer,h=u.className,f=u.columnData,d=u.dataKey,v=u.id,m=c({cellData:s({columnData:f,dataKey:d,rowData:i}),columnData:f,columnIndex:n,dataKey:d,isScrolling:r,parent:l,rowData:i,rowIndex:o}),g=this._cachedColumnStyles[n],y="string"===typeof m?m:null;return p.createElement("div",{"aria-colindex":n+1,"aria-describedby":v,className:Object(b.default)("ReactVirtualized__Table__rowColumn",h),key:"Row"+o+"-Col"+n,onClick:function(e){a&&a({columnData:f,dataKey:d,event:e})},role:"gridcell",style:g,title:y},m)}},{key:"_createHeader",value:function(e){var t=e.column,n=e.index,r=this.props,l=r.headerClassName,i=r.headerStyle,o=r.onHeaderClick,a=r.sort,u=r.sortBy,s=r.sortDirection,c=t.props,h=c.columnData,f=c.dataKey,d=c.defaultSortDirection,v=c.disableSort,m=c.headerRenderer,g=c.id,w=c.label,_=!v&&a,x=Object(b.default)("ReactVirtualized__Table__headerColumn",l,t.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:_}),M=this._getFlexStyleForColumn(t,y()({},i,t.props.headerStyle)),S=m({columnData:h,dataKey:f,disableSort:v,label:w,sortBy:u,sortDirection:s}),C=void 0,z=void 0,T=void 0,E=void 0,O=void 0;if(_||o){var P=u!==f?d:s===Je.DESC?Je.ASC:Je.DESC,L=function(e){_&&a({defaultSortDirection:d,event:e,sortBy:f,sortDirection:P}),o&&o({columnData:h,dataKey:f,event:e})};O=t.props["aria-label"]||w||f,E="none",T=0,C=L,z=function(e){"Enter"!==e.key&&" "!==e.key||L(e)}}return u===f&&(E=s===Je.ASC?"ascending":"descending"),p.createElement("div",{"aria-label":O,"aria-sort":E,className:x,id:g,key:"Header-Col"+n,onClick:C,onKeyDown:z,role:"columnheader",style:M,tabIndex:T},S)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,l=e.key,i=e.parent,o=e.style,a=this.props,u=a.children,s=a.onRowClick,c=a.onRowDoubleClick,h=a.onRowRightClick,f=a.onRowMouseOver,d=a.onRowMouseOut,v=a.rowClassName,m=a.rowGetter,g=a.rowRenderer,w=a.rowStyle,_=this.state.scrollbarWidth,x="function"===typeof v?v({index:n}):v,M="function"===typeof w?w({index:n}):w,S=m({index:n}),C=p.Children.toArray(u).map(function(e,l){return t._createColumn({column:e,columnIndex:l,isScrolling:r,parent:i,rowData:S,rowIndex:n,scrollbarWidth:_})}),z=Object(b.default)("ReactVirtualized__Table__row",x),T=y()({},o,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:_},M);return g({className:z,columns:C,index:n,isScrolling:r,key:l,onRowClick:s,onRowDoubleClick:c,onRowRightClick:h,onRowMouseOver:f,onRowMouseOut:d,rowData:S,style:T})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.props.flexGrow+" "+e.props.flexShrink+" "+e.props.width+"px",r=y()({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:p.Children.toArray(n)).map(function(t,n){return e._createHeader({column:t,index:n})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"===typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,l=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:l})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){if(this.Grid){var e=Object(ee.findDOMNode)(this.Grid),t=e.clientWidth||0,n=(e.offsetWidth||0)-t;this.setState({scrollbarWidth:n})}}}]),t}(p.PureComponent);rt.defaultProps={disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:X,overscanRowCount:10,rowRenderer:et,headerRowRenderer:Ze,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}};var lt=rt;rt.propTypes={};var it=[],ot=null,at=null;function ut(){at&&(at=null,document.body&&null!=ot&&(document.body.style.pointerEvents=ot),ot=null)}function st(){ut(),it.forEach(function(e){return e.__resetIsScrolling()})}function ct(e){e.currentTarget===window&&null==ot&&document.body&&(ot=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){at&&B(at);var e=0;it.forEach(function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)}),at=U(st,e)}(),it.forEach(function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()})}function ht(e,t){it.some(function(e){return e.props.scrollElement===t})||t.addEventListener("scroll",ct),it.push(e)}function ft(e,t){(it=it.filter(function(t){return t!==e})).length||(t.removeEventListener("scroll",ct),at&&(B(at),ut()))}var pt=function(e){return e===window},dt=function(e){return e.getBoundingClientRect()};function vt(e,t){if(e){if(pt(e)){var n=window,r=n.innerHeight,l=n.innerWidth;return{height:"number"===typeof r?r:0,width:"number"===typeof l?l:0}}return dt(e)}return{height:t.serverHeight,width:t.serverWidth}}function mt(e){return pt(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}var gt=function(){return"undefined"!==typeof window?window:void 0},yt=function(e){function t(){var e,n,r,i;o()(this,t);for(var a=arguments.length,u=Array(a),s=0;s0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,l=n.width,i=this._child||ee.findDOMNode(this);if(i instanceof Element&&e){var o=function(e,t){if(pt(t)&&document.documentElement){var n=document.documentElement,r=dt(e),l=dt(n);return{top:r.top-l.top,left:r.left-l.left}}var i=mt(t),o=dt(e),a=dt(t);return{top:o.top+i.top-a.top,left:o.left+i.left-a.left}}(i,e);this._positionFromTop=o.top,this._positionFromLeft=o.left}var a=vt(e,this.props);r===a.height&&l===a.width||(this.setState({height:a.height,width:a.width}),t({height:a.height,width:a.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=Object(J.a)(),this.updatePosition(e),e&&(ht(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&null!=r&&null!=n&&(this.updatePosition(n),ft(this,r),ht(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(ft(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,l=t.scrollLeft,i=t.height,o=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:n,scrollLeft:l,scrollTop:r,width:o})}}]),t}(p.PureComponent);yt.defaultProps={onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:gt(),serverHeight:0,serverWidth:0},yt.propTypes=null;n.d(t,"a",function(){return $}),n.d(t,"c",function(){return Ke}),n.d(t,"e",function(){return lt}),n.d(t,"b",function(){return nt}),n.d(t,"d",function(){return Je})},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);te.max&&i&&i(e.max),"min"in e&&e.min!==a&&"number"===typeof r&&r1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e,10);return isNaN(r)?e:(rn&&(r=n),r)},t.prototype.setValue=function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e,10))?null:parseFloat(e,10),l=this.state,i=l.value,o=void 0===i?null:i,a=l.inputValue,u=void 0===a?null:a,s="number"===typeof r?r.toFixed(n):""+r,c=r!==o||s!==""+u;"value"in this.props?this.setState({inputValue:this.toPrecisionAsStep(this.state.value)},t):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r)},t.prototype.getPrecision=function(e){if(O(this.props.precision))return this.props.precision;var t=e.toString();if(t.indexOf("e-")>=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},t.prototype.getMaxPrecision=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,l=n.step;if(O(r))return r;var i=this.getPrecision(t),o=this.getPrecision(l),a=this.getPrecision(e);return e?Math.max(a,i+o):i+o},t.prototype.getPrecisionFactor=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)},t.prototype.fixCaret=function(e,t){if(void 0!==e&&void 0!==t&&this.input&&this.input.value)try{var n=this.input.selectionStart,r=this.input.selectionEnd;e===n&&t===r||this.input.setSelectionRange(e,t)}catch(l){}},t.prototype.focus=function(){this.input.focus(),this.recordCursorPosition()},t.prototype.blur=function(){this.input.blur()},t.prototype.formatWrapper=function(e){return this.props.formatter?this.props.formatter(e):e},t.prototype.toPrecisionAsStep=function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)},t.prototype.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},t.prototype.toNumber=function(e){var t=e&&e.length>16&&this.state.focused;return this.isNotCompleteNumber(e)||t?e:O(this.props.precision)?Number(Number(e).toFixed(this.props.precision)):Number(e)},t.prototype.upStep=function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),l=Math.abs(this.getMaxPrecision(e,t)),i=((r*e+r*n*t)/r).toFixed(l);return this.toNumber(i)},t.prototype.downStep=function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),l=Math.abs(this.getMaxPrecision(e,t)),i=((r*e-r*n*t)/r).toFixed(l);return this.toNumber(i)},t.prototype.step=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=arguments[3];this.stop(),t&&(t.persist(),t.preventDefault());var i=this.props;if(!i.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var a=this[e+"Step"](o,r),u=a>i.max||ai.max?a=i.max:a=t.max&&(d=n+"-handler-up-disabled"),g<=t.min&&(v=n+"-handler-down-disabled")}var y={};for(var b in t)!t.hasOwnProperty(b)||"data-"!==b.substr(0,5)&&"aria-"!==b.substr(0,5)&&"role"!==b||(y[b]=t[b]);var w=!t.readOnly&&!t.disabled,_=this.getInputDisplayValue(),x=void 0,M=void 0;a?(x={onTouchStart:w&&!d?this.up:z,onTouchEnd:this.stop},M={onTouchStart:w&&!v?this.down:z,onTouchEnd:this.stop}):(x={onMouseDown:w&&!d?this.up:z,onMouseUp:this.stop,onMouseLeave:this.stop},M={onMouseDown:w&&!v?this.down:z,onMouseUp:this.stop,onMouseLeave:this.stop});var S=this.formatWrapper(_);O(this.props.decimalSeparator)&&(S=S.toString().replace(".",this.props.decimalSeparator));var E=!!d||r||i,P=!!v||r||i;return l.a.createElement("div",{className:p,style:t.style,title:t.title,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onMouseOver:t.onMouseOver,onMouseOut:t.onMouseOut},l.a.createElement("div",{className:n+"-handler-wrap"},l.a.createElement(C,c()({ref:this.saveUp,disabled:E,prefixCls:n,unselectable:"unselectable"},x,{role:"button","aria-label":"Increase Value","aria-disabled":!!E,className:n+"-handler "+n+"-handler-up "+d}),h||l.a.createElement("span",{unselectable:"unselectable",className:n+"-handler-up-inner",onClick:T})),l.a.createElement(C,c()({ref:this.saveDown,disabled:P,prefixCls:n,unselectable:"unselectable"},M,{role:"button","aria-label":"Decrease Value","aria-disabled":!!P,className:n+"-handler "+n+"-handler-down "+v}),f||l.a.createElement("span",{unselectable:"unselectable",className:n+"-handler-down-inner",onClick:T}))),l.a.createElement("div",{className:n+"-input-wrap",role:"spinbutton","aria-valuemin":t.min,"aria-valuemax":t.max,"aria-valuenow":m},l.a.createElement("input",c()({required:t.required,type:t.type,placeholder:t.placeholder,onClick:t.onClick,onMouseUp:this.onMouseUp,className:n+"-input",tabIndex:t.tabIndex,autoComplete:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:w?this.onKeyDown:z,onKeyUp:w?this.onKeyUp:z,autoFocus:t.autoFocus,maxLength:t.maxLength,readOnly:t.readOnly,disabled:t.disabled,max:t.max,min:t.min,step:t.step,name:t.name,id:t.id,onChange:this.onChange,ref:this.saveInput,value:S,pattern:t.pattern},y))))},t}(l.a.Component);P.propTypes={value:y.a.oneOfType([y.a.number,y.a.string]),defaultValue:y.a.oneOfType([y.a.number,y.a.string]),focusOnUpDown:y.a.bool,autoFocus:y.a.bool,onChange:y.a.func,onKeyDown:y.a.func,onKeyUp:y.a.func,prefixCls:y.a.string,tabIndex:y.a.oneOfType([y.a.string,y.a.number]),disabled:y.a.bool,onFocus:y.a.func,onBlur:y.a.func,readOnly:y.a.bool,max:y.a.number,min:y.a.number,step:y.a.oneOfType([y.a.number,y.a.string]),upHandler:y.a.node,downHandler:y.a.node,useTouch:y.a.bool,formatter:y.a.func,parser:y.a.func,onMouseEnter:y.a.func,onMouseLeave:y.a.func,onMouseOver:y.a.func,onMouseOut:y.a.func,onMouseUp:y.a.func,precision:y.a.number,required:y.a.bool,pattern:y.a.string,decimalSeparator:y.a.string},P.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",min:-E,step:1,style:{},onChange:z,onKeyDown:z,onFocus:z,onBlur:z,parser:function(e){return e.replace(/[^\w\.-]+/g,"")},required:!1,autoComplete:"off"};var L=function(){var e=this;this.onKeyDown=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),l=1;l1?n-1:0),l=1;l1?n-1:0),l=1;l>>0,r=0;r0)for(n=0;n=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+r}var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,j=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},B={};function U(e,t,n,r){var l=r;"string"===typeof r&&(l=function(){return this[r]()}),e&&(B[e]=l),t&&(B[t[0]]=function(){return N(l.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function G(e,t){return e.isValid()?(t=W(t,e.localeData()),F[t]=F[t]||function(e){var t,n,r,l=e.match(D);for(t=0,n=l.length;t=0&&j.test(e);)e=e.replace(j,r),j.lastIndex=0,n-=1;return e}var q=/\d/,Y=/\d\d/,K=/\d{3}/,X=/\d{4}/,Z=/[+-]?\d{6}/,J=/\d\d?/,Q=/\d\d\d\d?/,$=/\d\d\d\d\d\d?/,ee=/\d{1,3}/,te=/\d{1,4}/,ne=/[+-]?\d{1,6}/,re=/\d+/,le=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function se(e,t,n){ue[e]=O(t)?t:function(e,r){return e&&n?n:t}}function ce(e,t){return c(ue,e)?ue[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,l){return t||n||r||l})))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function pe(e,t){var n,r=t;for("string"===typeof e&&(e=[e]),a(t)&&(r=function(e,n){n[t]=x(e)}),n=0;n68?1900:2e3)};var Te,Ee=Oe("FullYear",!0);function Oe(e,t){return function(n){return null!=n?(Le(this,e,n),r.updateOffset(this,t),this):Pe(this,e)}}function Pe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Le(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ze(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ae(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ae(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ze(e)?29:28:31-r%7%2}Te=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Be(e,t,n){var r=7+t-n,l=(7+Fe(e,0,r).getUTCDay()-t)%7;return-l+r-1}function Ue(e,t,n,r,l){var i,o,a=(7+n-r)%7,u=Be(e,r,l),s=1+7*(t-1)+a+u;return s<=0?o=Ce(i=e-1)+s:s>Ce(e)?(i=e+1,o=s-Ce(e)):(i=e,o=s),{year:i,dayOfYear:o}}function Ge(e,t,n){var r,l,i=Be(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?(l=e.year()-1,r=o+We(l,t,n)):o>We(e.year(),t,n)?(r=o-We(e.year(),t,n),l=e.year()+1):(l=e.year(),r=o),{week:r,year:l}}function We(e,t,n){var r=Be(e,t,n),l=Be(e+1,t,n);return(Ce(e)-r+l)/7}function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),k("week","w"),k("isoWeek","W"),H("week",5),H("isoWeek",5),se("w",J),se("ww",J,Y),se("W",J),se("WW",J,Y),de(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=x(e)}),U("d",0,"do","day"),U("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),U("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),U("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),k("day","d"),k("weekday","e"),k("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),se("d",J),se("e",J),se("E",J),se("dd",function(e,t){return t.weekdaysMinRegex(e)}),se("ddd",function(e,t){return t.weekdaysShortRegex(e)}),se("dddd",function(e,t){return t.weekdaysRegex(e)}),de(["dd","ddd","dddd"],function(e,t,n,r){var l=n._locale.weekdaysParse(e,r,n._strict);null!=l?t.d=l:p(n).invalidWeekday=e}),de(["d","e","E"],function(e,t,n,r){t[r]=x(e)});var Ye="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ze=ae,Je=ae,Qe=ae;function $e(){function e(e,t){return t.length-e.length}var t,n,r,l,i,o=[],a=[],u=[],s=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=this.weekdaysMin(n,""),l=this.weekdaysShort(n,""),i=this.weekdays(n,""),o.push(r),a.push(l),u.push(i),s.push(r),s.push(l),s.push(i);for(o.sort(e),a.sort(e),u.sort(e),s.sort(e),t=0;t<7;t++)a[t]=he(a[t]),u[t]=he(u[t]),s[t]=he(s[t]);this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function et(){return this.hours()%12||12}function tt(e,t){U(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function nt(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,et),U("k",["kk",2],0,function(){return this.hours()||24}),U("hmm",0,0,function(){return""+et.apply(this)+N(this.minutes(),2)}),U("hmmss",0,0,function(){return""+et.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),tt("a",!0),tt("A",!1),k("hour","h"),H("hour",13),se("a",nt),se("A",nt),se("H",J),se("h",J),se("k",J),se("HH",J,Y),se("hh",J,Y),se("kk",J,Y),se("hmm",Q),se("hmmss",$),se("Hmm",Q),se("Hmmss",$),pe(["H","HH"],be),pe(["k","kk"],function(e,t,n){var r=x(e);t[be]=24===r?0:r}),pe(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),pe(["h","hh"],function(e,t,n){t[be]=x(e),p(n).bigHour=!0}),pe("hmm",function(e,t,n){var r=e.length-2;t[be]=x(e.substr(0,r)),t[we]=x(e.substr(r)),p(n).bigHour=!0}),pe("hmmss",function(e,t,n){var r=e.length-4,l=e.length-2;t[be]=x(e.substr(0,r)),t[we]=x(e.substr(r,2)),t[_e]=x(e.substr(l)),p(n).bigHour=!0}),pe("Hmm",function(e,t,n){var r=e.length-2;t[be]=x(e.substr(0,r)),t[we]=x(e.substr(r))}),pe("Hmmss",function(e,t,n){var r=e.length-4,l=e.length-2;t[be]=x(e.substr(0,r)),t[we]=x(e.substr(r,2)),t[_e]=x(e.substr(l))});var rt,lt=Oe("Hours",!0),it={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Re,monthsShort:Ie,week:{dow:0,doy:6},weekdays:Ye,weekdaysMin:Xe,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},ot={},at={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function st(t){var n=null;if(!ot[t]&&"undefined"!==typeof e&&e&&e.exports)try{n=rt._abbr,!function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}(),ct(n)}catch(r){}return ot[t]}function ct(e,t){var n;return e&&((n=o(t)?ft(e):ht(e,t))?rt=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function ht(e,t){if(null!==t){var n,r=it;if(t.abbr=e,null!=ot[e])E("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ot[e]._config;else if(null!=t.parentLocale)if(null!=ot[t.parentLocale])r=ot[t.parentLocale]._config;else{if(null==(n=st(t.parentLocale)))return at[t.parentLocale]||(at[t.parentLocale]=[]),at[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ot[e]=new L(P(r,t)),at[e]&&at[e].forEach(function(e){ht(e.name,e.config)}),ct(e),ot[e]}return delete ot[e],null}function ft(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!l(e)){if(t=st(e))return t;e=[e]}return function(e){for(var t,n,r,l,i=0;i0;){if(r=st(l.slice(0,t).join("-")))return r;if(n&&n.length>=t&&M(l,n,!0)>=t-1)break;t--}i++}return rt}(e)}function pt(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[ye]<1||n[ye]>Ae(n[me],n[ge])?ye:n[be]<0||n[be]>24||24===n[be]&&(0!==n[we]||0!==n[_e]||0!==n[xe])?be:n[we]<0||n[we]>59?we:n[_e]<0||n[_e]>59?_e:n[xe]<0||n[xe]>999?xe:-1,p(e)._overflowDayOfYear&&(tye)&&(t=ye),p(e)._overflowWeeks&&-1===t&&(t=Me),p(e)._overflowWeekday&&-1===t&&(t=Se),p(e).overflow=t),e}function dt(e,t,n){return null!=e?e:null!=t?t:n}function vt(e){var t,n,l,i,o,a=[];if(!e._d){for(l=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ye]&&null==e._a[ge]&&function(e){var t,n,r,l,i,o,a,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,n=dt(t.GG,e._a[me],Ge(Pt(),1,4).year),r=dt(t.W,1),((l=dt(t.E,1))<1||l>7)&&(u=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var s=Ge(Pt(),i,o);n=dt(t.gg,e._a[me],s.year),r=dt(t.w,s.week),null!=t.d?((l=t.d)<0||l>6)&&(u=!0):null!=t.e?(l=t.e+i,(t.e<0||t.e>6)&&(u=!0)):l=i}r<1||r>We(n,i,o)?p(e)._overflowWeeks=!0:null!=u?p(e)._overflowWeekday=!0:(a=Ue(n,r,l,i,o),e._a[me]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(o=dt(e._a[me],l[me]),(e._dayOfYear>Ce(o)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Fe(o,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=l[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[we]&&0===e._a[_e]&&0===e._a[xe]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?Fe:function(e,t,n,r,l,i,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,l,i,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,l,i,o),a}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(p(e).weekdayMismatch=!0)}}var mt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],wt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_t=/^\/?Date\((\-?\d+)/i;function xt(e){var t,n,r,l,i,o,a=e._i,u=mt.exec(a)||gt.exec(a);if(u){for(p(e).iso=!0,t=0,n=bt.length;t0&&p(e).unusedInput.push(o),a=a.slice(a.indexOf(n)+n.length),s+=n.length),B[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),ve(i,n,e)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=u-s,a.length>0&&p(e).unusedInput.push(a),e._a[be]<=12&&!0===p(e).bigHour&&e._a[be]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[be]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),vt(e),pt(e)}else zt(e);else xt(e)}function Et(e){var t=e._i,n=e._f;return e._locale=e._locale||ft(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(pt(t)):(u(t)?e._d=t:l(n)?function(e){var t,n,r,l,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(l=0;lthis?this:e:v()});function kt(e,t){var n,r;if(1===t.length&&l(t[0])&&(t=t[0]),!t.length)return Pt();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-an:new Date(e,t,n).valueOf()}function cn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-an:Date.UTC(e,t,n)}function hn(e,t){U(0,[e,e.length],0,t)}function fn(e,t,n,r,l){var i;return null==e?Ge(this,r,l).year:(i=We(e,r,l),t>i&&(t=i),function(e,t,n,r,l){var i=Ue(e,t,n,r,l),o=Fe(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,e,t,n,r,l))}U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),hn("gggg","weekYear"),hn("ggggg","weekYear"),hn("GGGG","isoWeekYear"),hn("GGGGG","isoWeekYear"),k("weekYear","gg"),k("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),se("G",le),se("g",le),se("GG",J,Y),se("gg",J,Y),se("GGGG",te,X),se("gggg",te,X),se("GGGGG",ne,Z),se("ggggg",ne,Z),de(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=x(e)}),de(["gg","GG"],function(e,t,n,l){t[l]=r.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),k("quarter","Q"),H("quarter",7),se("Q",q),pe("Q",function(e,t){t[ge]=3*(x(e)-1)}),U("D",["DD",2],"Do","date"),k("date","D"),H("date",9),se("D",J),se("DD",J,Y),se("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),pe(["D","DD"],ye),pe("Do",function(e,t){t[ye]=x(e.match(J)[0])});var pn=Oe("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),k("dayOfYear","DDD"),H("dayOfYear",4),se("DDD",ee),se("DDDD",K),pe(["DDD","DDDD"],function(e,t,n){n._dayOfYear=x(e)}),U("m",["mm",2],0,"minute"),k("minute","m"),H("minute",14),se("m",J),se("mm",J,Y),pe(["m","mm"],we);var dn=Oe("Minutes",!1);U("s",["ss",2],0,"second"),k("second","s"),H("second",15),se("s",J),se("ss",J,Y),pe(["s","ss"],_e);var vn,mn=Oe("Seconds",!1);for(U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),k("millisecond","ms"),H("millisecond",16),se("S",ee,q),se("SS",ee,Y),se("SSS",ee,K),vn="SSSS";vn.length<=9;vn+="S")se(vn,re);function gn(e,t){t[xe]=x(1e3*("0."+e))}for(vn="S";vn.length<=9;vn+="S")pe(vn,gn);var yn=Oe("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var bn=b.prototype;function wn(e){return e}bn.add=Jt,bn.calendar=function(e,t){var n=e||Pt(),l=Ft(n,this).startOf("day"),i=r.calendarFormat(this,l)||"sameElse",o=t&&(O(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Pt(n)))},bn.clone=function(){return new b(this)},bn.diff=function(e,t,n){var r,l,i;if(!this.isValid())return NaN;if(!(r=Ft(e,this)).isValid())return NaN;switch(l=6e4*(r.utcOffset()-this.utcOffset()),t=R(t)){case"year":i=$t(this,r)/12;break;case"month":i=$t(this,r);break;case"quarter":i=$t(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-l)/864e5;break;case"week":i=(this-r-l)/6048e5;break;default:i=this-r}return n?i:_(i)},bn.endOf=function(e){var t;if(void 0===(e=R(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?cn:sn;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=on-un(t+(this._isUTC?0:this.utcOffset()*ln),on)-1;break;case"minute":t=this._d.valueOf(),t+=ln-un(t,ln)-1;break;case"second":t=this._d.valueOf(),t+=rn-un(t,rn)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},bn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},bn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Pt(e).isValid())?qt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},bn.fromNow=function(e){return this.from(Pt(),e)},bn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Pt(e).isValid())?qt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},bn.toNow=function(e){return this.to(Pt(),e)},bn.get=function(e){return O(this[e=R(e)])?this[e]():this},bn.invalidAt=function(){return p(this).overflow},bn.isAfter=function(e,t){var n=w(e)?e:Pt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},bn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+l)},bn.toJSON=function(){return this.isValid()?this.toISOString():null},bn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},bn.unix=function(){return Math.floor(this.valueOf()/1e3)},bn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},bn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},bn.year=Ee,bn.isLeapYear=function(){return ze(this.year())},bn.weekYear=function(e){return fn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},bn.isoWeekYear=function(e){return fn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},bn.quarter=bn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},bn.month=He,bn.daysInMonth=function(){return Ae(this.year(),this.month())},bn.week=bn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},bn.isoWeek=bn.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},bn.weeksInYear=function(){var e=this.localeData()._week;return We(this.year(),e.dow,e.doy)},bn.isoWeeksInYear=function(){return We(this.year(),1,4)},bn.date=pn,bn.day=bn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},bn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},bn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},bn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},bn.hour=bn.hours=lt,bn.minute=bn.minutes=dn,bn.second=bn.seconds=mn,bn.millisecond=bn.milliseconds=yn,bn.utcOffset=function(e,t,n){var l,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(null===(e=jt(oe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(l=Bt(this)),this._offset=e,this._isUTC=!0,null!=l&&this.add(l,"m"),i!==e&&(!t||this._changeInProgress?Zt(this,qt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Bt(this)},bn.utc=function(e){return this.utcOffset(0,e)},bn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Bt(this),"m")),this},bn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=jt(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},bn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Pt(e).utcOffset():0,(this.utcOffset()-e)%60===0)},bn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},bn.isLocal=function(){return!!this.isValid()&&!this._isUTC},bn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},bn.isUtc=Ut,bn.isUTC=Ut,bn.zoneAbbr=function(){return this._isUTC?"UTC":""},bn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},bn.dates=C("dates accessor is deprecated. Use date instead.",pn),bn.months=C("months accessor is deprecated. Use month instead",He),bn.years=C("years accessor is deprecated. Use year instead",Ee),bn.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),bn.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=Et(e))._a){var t=e._isUTC?f(e._a):Pt(e._a);this._isDSTShifted=this.isValid()&&M(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var _n=L.prototype;function xn(e,t,n,r){var l=ft(),i=f().set(r,t);return l[n](i,e)}function Mn(e,t,n){if(a(e)&&(t=e,e=void 0),e=e||"",null!=t)return xn(e,t,n,"month");var r,l=[];for(r=0;r<12;r++)l[r]=xn(e,r,n,"month");return l}function Sn(e,t,n,r){"boolean"===typeof e?(a(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,a(t)&&(n=t,t=void 0),t=t||"");var l,i=ft(),o=e?i._week.dow:0;if(null!=n)return xn(t,(n+o)%7,r,"day");var u=[];for(l=0;l<7;l++)u[l]=xn(t,(l+o)%7,r,"day");return u}_n.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r},_n.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},_n.invalidDate=function(){return this._invalidDate},_n.ordinal=function(e){return this._ordinal.replace("%d",e)},_n.preparse=wn,_n.postformat=wn,_n.relativeTime=function(e,t,n,r){var l=this._relativeTime[n];return O(l)?l(e,t,n,r):l.replace(/%d/i,e)},_n.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},_n.set=function(e){var t,n;for(n in e)O(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},_n.months=function(e,t){return e?l(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ke).test(t)?"format":"standalone"][e.month()]:l(this._months)?this._months:this._months.standalone},_n.monthsShort=function(e,t){return e?l(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ke.test(t)?"format":"standalone"][e.month()]:l(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},_n.monthsParse=function(e,t,n){var r,l,i;if(this._monthsParseExact)return function(e,t,n){var r,l,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(l=Te.call(this._shortMonthsParse,o))?l:null:-1!==(l=Te.call(this._longMonthsParse,o))?l:null:"MMM"===t?-1!==(l=Te.call(this._shortMonthsParse,o))?l:-1!==(l=Te.call(this._longMonthsParse,o))?l:null:-1!==(l=Te.call(this._longMonthsParse,o))?l:-1!==(l=Te.call(this._shortMonthsParse,o))?l:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(l=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(l,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(l,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(l,"")+"|^"+this.monthsShort(l,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},_n.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=De),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},_n.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Ne),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},_n.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},_n.firstDayOfYear=function(){return this._week.doy},_n.firstDayOfWeek=function(){return this._week.dow},_n.weekdays=function(e,t){var n=l(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?qe(n,this._week.dow):e?n[e.day()]:n},_n.weekdaysMin=function(e){return!0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},_n.weekdaysShort=function(e){return!0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},_n.weekdaysParse=function(e,t,n){var r,l,i;if(this._weekdaysParseExact)return function(e,t,n){var r,l,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(l=Te.call(this._weekdaysParse,o))?l:null:"ddd"===t?-1!==(l=Te.call(this._shortWeekdaysParse,o))?l:null:-1!==(l=Te.call(this._minWeekdaysParse,o))?l:null:"dddd"===t?-1!==(l=Te.call(this._weekdaysParse,o))?l:-1!==(l=Te.call(this._shortWeekdaysParse,o))?l:-1!==(l=Te.call(this._minWeekdaysParse,o))?l:null:"ddd"===t?-1!==(l=Te.call(this._shortWeekdaysParse,o))?l:-1!==(l=Te.call(this._weekdaysParse,o))?l:-1!==(l=Te.call(this._minWeekdaysParse,o))?l:null:-1!==(l=Te.call(this._minWeekdaysParse,o))?l:-1!==(l=Te.call(this._weekdaysParse,o))?l:-1!==(l=Te.call(this._shortWeekdaysParse,o))?l:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(l=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},_n.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},_n.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},_n.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||$e.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},_n.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},_n.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ct("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===x(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),r.lang=C("moment.lang is deprecated. Use moment.locale instead.",ct),r.langData=C("moment.langData is deprecated. Use moment.localeData instead.",ft);var Cn=Math.abs;function zn(e,t,n,r){var l=qt(t,n);return e._milliseconds+=r*l._milliseconds,e._days+=r*l._days,e._months+=r*l._months,e._bubble()}function Tn(e){return e<0?Math.floor(e):Math.ceil(e)}function En(e){return 4800*e/146097}function On(e){return 146097*e/4800}function Pn(e){return function(){return this.as(e)}}var Ln=Pn("ms"),An=Pn("s"),kn=Pn("m"),Rn=Pn("h"),In=Pn("d"),Vn=Pn("w"),Hn=Pn("M"),Nn=Pn("Q"),Dn=Pn("y");function jn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Fn=jn("milliseconds"),Bn=jn("seconds"),Un=jn("minutes"),Gn=jn("hours"),Wn=jn("days"),qn=jn("months"),Yn=jn("years"),Kn=Math.round,Xn={ss:44,s:45,m:45,h:22,d:26,M:11},Zn=Math.abs;function Jn(e){return(e>0)-(e<0)||+e}function Qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Zn(this._milliseconds)/1e3,r=Zn(this._days),l=Zn(this._months);e=_(n/60),t=_(e/60),n%=60,e%=60;var i=_(l/12),o=l%=12,a=r,u=t,s=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",p=Jn(this._months)!==Jn(h)?"-":"",d=Jn(this._days)!==Jn(h)?"-":"",v=Jn(this._milliseconds)!==Jn(h)?"-":"";return f+"P"+(i?p+i+"Y":"")+(o?p+o+"M":"")+(a?d+a+"D":"")+(u||s||c?"T":"")+(u?v+u+"H":"")+(s?v+s+"M":"")+(c?v+c+"S":"")}var $n=It.prototype;return $n.isValid=function(){return this._isValid},$n.abs=function(){var e=this._data;return this._milliseconds=Cn(this._milliseconds),this._days=Cn(this._days),this._months=Cn(this._months),e.milliseconds=Cn(e.milliseconds),e.seconds=Cn(e.seconds),e.minutes=Cn(e.minutes),e.hours=Cn(e.hours),e.months=Cn(e.months),e.years=Cn(e.years),this},$n.add=function(e,t){return zn(this,e,t,1)},$n.subtract=function(e,t){return zn(this,e,t,-1)},$n.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=R(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+En(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(On(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},$n.asMilliseconds=Ln,$n.asSeconds=An,$n.asMinutes=kn,$n.asHours=Rn,$n.asDays=In,$n.asWeeks=Vn,$n.asMonths=Hn,$n.asQuarters=Nn,$n.asYears=Dn,$n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},$n._bubble=function(){var e,t,n,r,l,i=this._milliseconds,o=this._days,a=this._months,u=this._data;return i>=0&&o>=0&&a>=0||i<=0&&o<=0&&a<=0||(i+=864e5*Tn(On(a)+o),o=0,a=0),u.milliseconds=i%1e3,e=_(i/1e3),u.seconds=e%60,t=_(e/60),u.minutes=t%60,n=_(t/60),u.hours=n%24,o+=_(n/24),l=_(En(o)),a+=l,o-=Tn(On(l)),r=_(a/12),a%=12,u.days=o,u.months=a,u.years=r,this},$n.clone=function(){return qt(this)},$n.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},$n.milliseconds=Fn,$n.seconds=Bn,$n.minutes=Un,$n.hours=Gn,$n.days=Wn,$n.weeks=function(){return _(this.days()/7)},$n.months=qn,$n.years=Yn,$n.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=qt(e).abs(),l=Kn(r.as("s")),i=Kn(r.as("m")),o=Kn(r.as("h")),a=Kn(r.as("d")),u=Kn(r.as("M")),s=Kn(r.as("y")),c=l<=Xn.ss&&["s",l]||l0,c[4]=n,function(e,t,n,r,l){return l.relativeTime(t||1,!!n,e,r)}.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},$n.toISOString=Qn,$n.toString=Qn,$n.toJSON=Qn,$n.locale=en,$n.localeData=nn,$n.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qn),$n.lang=tn,U("X",0,0,"unix"),U("x",0,0,"valueOf"),se("x",le),se("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),pe("x",function(e,t,n){n._d=new Date(x(e))}),r.version="2.24.0",t=Pt,r.fn=bn,r.min=function(){return kt("isBefore",[].slice.call(arguments,0))},r.max=function(){return kt("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return Pt(1e3*e)},r.months=function(e,t){return Mn(e,t,"months")},r.isDate=u,r.locale=ct,r.invalid=v,r.duration=qt,r.isMoment=w,r.weekdays=function(e,t,n){return Sn(e,t,n,"weekdays")},r.parseZone=function(){return Pt.apply(null,arguments).parseZone()},r.localeData=ft,r.isDuration=Vt,r.monthsShort=function(e,t){return Mn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return Sn(e,t,n,"weekdaysMin")},r.defineLocale=ht,r.updateLocale=function(e,t){if(null!=t){var n,r,l=it;null!=(r=st(e))&&(l=r._config),t=P(l,t),(n=new L(t)).parentLocale=ot[e],ot[e]=n,ct(e)}else null!=ot[e]&&(null!=ot[e].parentLocale?ot[e]=ot[e].parentLocale:null!=ot[e]&&delete ot[e]);return ot[e]},r.locales=function(){return z(ot)},r.weekdaysShort=function(e,t,n){return Sn(e,t,n,"weekdaysShort")},r.normalizeUnits=R,r.relativeTimeRounding=function(e){return void 0===e?Kn:"function"===typeof e&&(Kn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==Xn[e]&&(void 0===t?Xn[e]:(Xn[e]=t,"s"===e&&(Xn.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=bn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(113)(e))},function(e,t,n){"use strict";var r=n(0),l=n.n(r),i=n(1);function o(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,a(t).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,r["Component"]),t}();function c(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}s.isSelectOptGroup=!0;var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,h(t).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,r["Component"]),t}();function d(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t-1}function X(e,t){return function(n){e[t]=n}}function Z(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:7&n|8).toString(16)})}function J(){return(J=Object.assign||function(e){for(var t=1;t0)return!0;return!1}(r,t)){var l=n.getValueByInput(r);return void 0!==l&&n.fireChange(l),n.setOpenState(!1,{needFocus:!0}),void n.setInputValue("",!1)}n.setInputValue(r),n.setState({open:!0}),H(n.props)&&n.fireChange([r])},n.onDropdownVisibleChange=function(e){e&&!n._focused&&(n.clearBlurTime(),n.timeoutFocus(),n._focused=!0,n.updateFocusClassName()),n.setOpenState(e)},n.onKeyDown=function(e){var t=n.state.open;if(!n.props.disabled){var r=e.keyCode;t&&!n.getInputDOMNode()?n.onInputKeyDown(e):r===S.a.ENTER||r===S.a.DOWN?(t||n.setOpenState(!0),e.preventDefault()):r===S.a.SPACE&&(t||(n.setOpenState(!0),e.preventDefault()))}},n.onInputKeyDown=function(e){var t=n.props,r=t.disabled,l=t.combobox,i=t.defaultActiveFirstOption;if(!r){var o=n.state,a=n.getRealOpenState(o),u=e.keyCode;if(!N(n.props)||e.target.value||u!==S.a.BACKSPACE){if(u===S.a.DOWN){if(!o.open)return n.openIfHasChildren(),e.preventDefault(),void e.stopPropagation()}else if(u===S.a.ENTER&&o.open)!a&&l||e.preventDefault(),a&&l&&!1===i&&(n.comboboxTimer=setTimeout(function(){n.setOpenState(!1)}));else if(u===S.a.ESC)return void(o.open&&(n.setOpenState(!1),e.preventDefault(),e.stopPropagation()));if(a&&n.selectTriggerRef){var s=n.selectTriggerRef.getInnerMenu();s&&s.onKeyDown(e,n.handleBackfill)&&(e.preventDefault(),e.stopPropagation())}}else{e.preventDefault();var c=o.value;c.length&&n.removeSelected(c[c.length-1])}}},n.onMenuSelect=function(e){var t=e.item;if(t){var r=n.state.value,l=n.props,i=I(t),o=r[r.length-1];if(n.fireSelect(i),N(l)){if(-1!==G(r,i))return;r=r.concat([i])}else{if(!H(l)&&void 0!==o&&o===i&&i!==n.state.backfillValue)return void n.setOpenState(!1,{needFocus:!0,fireSearch:!1});r=[i],n.setOpenState(!1,{needFocus:!0,fireSearch:!1})}n.fireChange(r);var a=H(l)?V(t,l.optionLabelProp):"";l.autoClearSearchValue&&n.setInputValue(a,!1)}},n.onMenuDeselect=function(e){var t=e.item,r=e.domEvent;"keydown"!==r.type||r.keyCode!==S.a.ENTER?("click"===r.type&&n.removeSelected(I(t)),n.props.autoClearSearchValue&&n.setInputValue("")):n.removeSelected(I(t))},n.onArrowClick=function(e){e.stopPropagation(),e.preventDefault(),n.props.disabled||n.setOpenState(!n.state.open,{needFocus:!n.state.open})},n.onPlaceholderClick=function(){n.getInputDOMNode&&n.getInputDOMNode()&&n.getInputDOMNode().focus()},n.onOuterFocus=function(e){if(n.props.disabled)e.preventDefault();else{n.clearBlurTime();var t=n.getInputDOMNode();t&&e.target===n.rootRef||(D(n.props)||e.target!==t)&&(n._focused||(n._focused=!0,n.updateFocusClassName(),N(n.props)&&n._mouseDown||n.timeoutFocus()))}},n.onPopupFocus=function(){n.maybeFocus(!0,!0)},n.onOuterBlur=function(e){n.props.disabled?e.preventDefault():n.blurTimer=window.setTimeout(function(){n._focused=!1,n.updateFocusClassName();var e=n.props,t=n.state.value,r=n.state.inputValue;if(j(e)&&e.showSearch&&r&&e.defaultActiveFirstOption){var l=n._options||[];if(l.length){var i=function e(t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.needFocus,l=t.fireSearch,i=n.props;if(n.state.open!==e){n.props.onDropdownVisibleChange&&n.props.onDropdownVisibleChange(e);var o={open:e,backfillValue:""};!e&&j(i)&&i.showSearch&&n.setInputValue("",l),e||n.maybeFocus(e,!!r),n.setState(pe({open:e},o),function(){e&&n.maybeFocus(e,!!r)})}else n.maybeFocus(e,!!r)},n.setInputValue=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.props.onSearch;e!==n.state.inputValue&&n.setState(function(n){return t&&e!==n.inputValue&&r&&r(e),{inputValue:e}},n.forcePopupAlign)},n.getValueByInput=function(e){var t=n.props,r=t.multiple,l=t.tokenSeparators,i=n.state.value,o=!1;return function(e,t){var n=new RegExp("[".concat(t.join(),"]"));return e.split(n).filter(function(e){return e})}(e,l).forEach(function(e){var t=[e];if(r){var l=n.getValueByLabel(e);l&&-1===G(i,l)&&(i=i.concat(l),o=!0,n.fireSelect(l))}else-1===G(i,e)&&(i=i.concat(t),o=!0,n.fireSelect(e))}),o?i:void 0},n.getRealOpenState=function(e){var t=n.props.open;if("boolean"===typeof t)return t;var r=(e||n.state).open,l=n._options||[];return!D(n.props)&&n.props.showSearch||r&&!l.length&&(r=!1),r},n.markMouseDown=function(){n._mouseDown=!0},n.markMouseLeave=function(){n._mouseDown=!1},n.handleBackfill=function(e){if(n.props.backfill&&(j(n.props)||H(n.props))){var t=I(e);H(n.props)&&n.setInputValue(t,!1),n.setState({value:[t],backfillValue:t})}},n.filterOption=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:K,l=n.state.value,i=l[l.length-1];if(!e||i&&i===n.state.backfillValue)return!0;var o=n.props.filterOption;return"filterOption"in n.props?!0===o&&(o=r.bind(me(n))):o=r.bind(me(n)),!o||("function"===typeof o?o.call(me(n),e,t):!t.props.disabled)},n.timeoutFocus=function(){var e=n.props.onFocus;n.focusTimer&&n.clearFocusTime(),n.focusTimer=window.setTimeout(function(){e&&e()},10)},n.clearFocusTime=function(){n.focusTimer&&(clearTimeout(n.focusTimer),n.focusTimer=null)},n.clearBlurTime=function(){n.blurTimer&&(clearTimeout(n.blurTimer),n.blurTimer=null)},n.clearComboboxTime=function(){n.comboboxTimer&&(clearTimeout(n.comboboxTimer),n.comboboxTimer=null)},n.updateFocusClassName=function(){var e=n.rootRef,t=n.props;n._focused?w()(e).add("".concat(t.prefixCls,"-focused")):w()(e).remove("".concat(t.prefixCls,"-focused"))},n.maybeFocus=function(e,t){if(t||e){var r=n.getInputDOMNode(),l=document.activeElement;r&&(e||D(n.props))?l!==r&&(r.focus(),n._focused=!0):l!==n.selectionRef&&n.selectionRef&&(n.selectionRef.focus(),n._focused=!0)}},n.removeSelected=function(e,t){var r=n.props;if(!r.disabled&&!n.isChildDisabled(e)){t&&t.stopPropagation&&t.stopPropagation();var l=n.state.value.filter(function(t){return t!==e});if(N(r)){var i=e;r.labelInValue&&(i={key:e,label:n.getLabelBySingleValue(e)}),r.onDeselect&&r.onDeselect(i,n.getOptionBySingleValue(e))}n.fireChange(l)}},n.openIfHasChildren=function(){var e=n.props;(r.Children.count(e.children)||j(e))&&n.setOpenState(!0)},n.fireSelect=function(e){n.props.onSelect&&n.props.onSelect(n.getVLBySingleValue(e),n.getOptionBySingleValue(e))},n.fireChange=function(e){var t=n.props;"value"in t||n.setState({value:e},n.forcePopupAlign);var r=n.getVLForOnChange(e),l=n.getOptionsBySingleValue(e);t.onChange&&t.onChange(r,N(n.props)?l:l[0])},n.isChildDisabled=function(e){return M(n.props.children).some(function(t){return I(t)===e&&t.props&&t.props.disabled})},n.forcePopupAlign=function(){n.state.open&&n.selectTriggerRef&&n.selectTriggerRef.triggerRef&&n.selectTriggerRef.triggerRef.forcePopupAlign()},n.renderFilterOptions=function(){var e=n.state.inputValue,t=n.props,l=t.children,i=t.tags,o=t.notFoundContent,a=[],u=[],s=!1,c=n.renderFilterOptionsFromChildren(l,u,a);if(i){var h=n.state.value;(h=h.filter(function(t){return-1===u.indexOf(t)&&(!e||String(t).indexOf(String(e))>-1)})).sort(function(e,t){return e.length-t.length}),h.forEach(function(e){var t=e,n=r.createElement(x.b,{style:q,role:"option",attribute:Y,value:t,key:t},t);c.push(n),a.push(n)}),e&&a.every(function(t){return I(t)!==e})&&c.unshift(r.createElement(x.b,{style:q,role:"option",attribute:Y,value:e,key:e},e))}return!c.length&&o&&(s=!0,c=[r.createElement(x.b,{style:q,attribute:Y,disabled:!0,role:"option",value:"NOT_FOUND",key:"NOT_FOUND"},o)]),{empty:s,options:c}},n.renderFilterOptionsFromChildren=function(e,t,l){var i=[],o=n.props,a=n.state.inputValue,u=o.tags;return r.Children.forEach(e,function(e){if(e){var o=e.type;if(o.isSelectOptGroup){var s=e.props.label,c=e.key;if(c||"string"!==typeof s?!s&&c&&(s=c):c=s,a&&n.filterOption(a,e)){var h=M(e.props.children).map(function(e){var t=I(e)||e.key;return r.createElement(x.b,pe({key:t,value:t},e.props))});i.push(r.createElement(x.c,{key:c,title:s},h))}else{var f=n.renderFilterOptionsFromChildren(e.props.children,t,l);f.length&&i.push(r.createElement(x.c,{key:c,title:s},f))}}else{E()(o.isSelectOption,"the children of `Select` should be `Select.Option` or `Select.OptGroup`, "+"instead of `".concat(o.name||o.displayName||e.type,"`."));var p=I(e);if(function(e,t){if(!j(t)&&!function(e){return e.multiple}(t)&&"string"!==typeof e)throw new Error("Invalid `value` of type `".concat(typeof e,"` supplied to Option, ")+"expected `string` when `tags/combobox` is `true`.")}(p,n.props),n.filterOption(a,e)){var d=r.createElement(x.b,pe({style:q,attribute:Y,value:p,key:p,role:"option"},e.props));i.push(d),l.push(d)}u&&t.push(p)}}}),i},n.renderTopControlNode=function(){var e=n.state,t=e.open,l=e.inputValue,i=n.state.value,o=n.props,a=o.choiceTransitionName,u=o.prefixCls,s=o.maxTagTextLength,c=o.maxTagCount,h=o.showSearch,f=o.removeIcon,p=o.maxTagPlaceholder,d="".concat(u,"-selection__rendered"),v=null;if(j(o)){var m=null;if(i.length){var g=!1,y=1;h&&t?(g=!l)&&(y=.4):g=!0;var b=i[0],w=n.getOptionInfoBySingleValue(b),x=w.label,M=w.title;m=r.createElement("div",{key:"value",className:"".concat(u,"-selection-selected-value"),title:R(M||x),style:{display:g?"block":"none",opacity:y}},x)}v=h?[m,r.createElement("div",{className:"".concat(u,"-search ").concat(u,"-search--inline"),key:"input",style:{display:t?"block":"none"}},n.getInputElement())]:[m]}else{var S,C=[],z=i;if(void 0!==c&&i.length>c){z=z.slice(0,c);var T=n.getVLForOnChange(i.slice(c,i.length)),E="+ ".concat(i.length-c," ...");p&&(E="function"===typeof p?p(T):p),S=r.createElement("li",pe({style:q},Y,{role:"presentation",onMouseDown:U,className:"".concat(u,"-selection__choice ").concat(u,"-selection__choice__disabled"),key:"maxTagPlaceholder",title:R(E)}),r.createElement("div",{className:"".concat(u,"-selection__choice__content")},E))}N(o)&&(C=z.map(function(e){var t=n.getOptionInfoBySingleValue(e),l=t.label,i=t.title||l;s&&"string"===typeof l&&l.length>s&&(l="".concat(l.slice(0,s),"..."));var o=n.isChildDisabled(e),a=o?"".concat(u,"-selection__choice ").concat(u,"-selection__choice__disabled"):"".concat(u,"-selection__choice");return r.createElement("li",pe({style:q},Y,{onMouseDown:U,className:a,role:"presentation",key:e||ye,title:R(i)}),r.createElement("div",{className:"".concat(u,"-selection__choice__content")},l),o?null:r.createElement("span",{onClick:function(t){n.removeSelected(e,t)},className:"".concat(u,"-selection__choice__remove")},f||r.createElement("i",{className:"".concat(u,"-selection__choice__remove-icon")},"\xd7")))})),S&&C.push(S),C.push(r.createElement("li",{className:"".concat(u,"-search ").concat(u,"-search--inline"),key:"__input"},n.getInputElement())),v=N(o)&&a?r.createElement(_.a,{onLeave:n.onChoiceAnimationLeave,component:"ul",transitionName:a},C):r.createElement("ul",null,C)}return r.createElement("div",{className:d,ref:n.saveTopCtrlRef},n.getPlaceholderElement(),v)};var o=t.getOptionsInfoFromProps(e);if(e.tags&&"function"!==typeof e.filterOption){var a=Object.keys(o).some(function(e){return o[e].disabled});E()(!a,"Please avoid setting option to disabled in tags mode since user can always type text as tag.")}return n.state={value:t.getValueFromProps(e,!0),inputValue:e.combobox?t.getInputValueForCombobox(e,o,!0):"",open:e.defaultOpen,optionsInfo:o,backfillValue:"",skipBuildOptionsInfo:!0,ariaId:""},n.saveInputRef=X(me(n),"inputRef"),n.saveInputMirrorRef=X(me(n),"inputMirrorRef"),n.saveTopCtrlRef=X(me(n),"topCtrlRef"),n.saveSelectTriggerRef=X(me(n),"selectTriggerRef"),n.saveRootRef=X(me(n),"rootRef"),n.saveSelectionRef=X(me(n),"selectionRef"),n}var n,l,i;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ge(e,t)}(t,r["Component"]),n=t,(l=[{key:"componentDidMount",value:function(){(this.props.autoFocus||this.state.open)&&this.focus(),this.setState({ariaId:Z()})}},{key:"componentDidUpdate",value:function(){if(N(this.props)){var e=this.getInputDOMNode(),t=this.getInputMirrorDOMNode();e&&e.value&&t?(e.style.width="",e.style.width="".concat(t.clientWidth,"px")):e&&(e.style.width="")}this.forcePopupAlign()}},{key:"componentWillUnmount",value:function(){this.clearFocusTime(),this.clearBlurTime(),this.clearComboboxTime(),this.dropdownContainer&&(C.unmountComponentAtNode(this.dropdownContainer),document.body.removeChild(this.dropdownContainer),this.dropdownContainer=null)}},{key:"focus",value:function(){j(this.props)&&this.selectionRef?this.selectionRef.focus():this.getInputDOMNode()&&this.getInputDOMNode().focus()}},{key:"blur",value:function(){j(this.props)&&this.selectionRef?this.selectionRef.blur():this.getInputDOMNode()&&this.getInputDOMNode().blur()}},{key:"renderArrow",value:function(e){var t=this.props,n=t.showArrow,l=void 0===n?!e:n,i=t.loading,o=t.inputIcon,a=t.prefixCls;if(!l&&!i)return null;var u=i?r.createElement("i",{className:"".concat(a,"-arrow-loading")}):r.createElement("i",{className:"".concat(a,"-arrow-icon")});return r.createElement("span",pe({key:"arrow",className:"".concat(a,"-arrow"),style:q},Y,{onClick:this.onArrowClick}),o||u)}},{key:"renderClear",value:function(){var e=this.props,t=e.prefixCls,n=e.allowClear,l=e.clearIcon,i=this.state.inputValue,o=this.state.value,a=r.createElement("span",pe({key:"clear",className:"".concat(t,"-selection__clear"),onMouseDown:U,style:q},Y,{onClick:this.onClearSelection}),l||r.createElement("i",{className:"".concat(t,"-selection__clear-icon")},"\xd7"));return n?H(this.props)?i?a:null:i||o.length?a:null:null}},{key:"render",value:function(){var e,t=this.props,n=N(t),l=t.showArrow,i=void 0===l||l,o=this.state,a=t.className,u=t.disabled,s=t.prefixCls,c=t.loading,h=this.renderTopControlNode(),f=this.state,p=f.open,d=f.ariaId;if(p){var v=this.renderFilterOptions();this._empty=v.empty,this._options=v.options}var m=this.getRealOpenState(),g=this._empty,b=this._options||[],w={};Object.keys(t).forEach(function(e){!Object.prototype.hasOwnProperty.call(t,e)||"data-"!==e.substr(0,5)&&"aria-"!==e.substr(0,5)&&"role"!==e||(w[e]=t[e])});var _=pe({},w);D(t)||(_=pe({},_,{onKeyDown:this.onKeyDown,tabIndex:t.disabled?-1:t.tabIndex}));var x=(fe(e={},a,!!a),fe(e,s,1),fe(e,"".concat(s,"-open"),p),fe(e,"".concat(s,"-focused"),p||!!this._focused),fe(e,"".concat(s,"-combobox"),H(t)),fe(e,"".concat(s,"-disabled"),u),fe(e,"".concat(s,"-enabled"),!u),fe(e,"".concat(s,"-allow-clear"),!!t.allowClear),fe(e,"".concat(s,"-no-arrow"),!i),fe(e,"".concat(s,"-loading"),!!c),e);return r.createElement(he,{onPopupFocus:this.onPopupFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,dropdownAlign:t.dropdownAlign,dropdownClassName:t.dropdownClassName,dropdownMatchSelectWidth:t.dropdownMatchSelectWidth,defaultActiveFirstOption:t.defaultActiveFirstOption,dropdownMenuStyle:t.dropdownMenuStyle,transitionName:t.transitionName,animation:t.animation,prefixCls:t.prefixCls,dropdownStyle:t.dropdownStyle,combobox:t.combobox,showSearch:t.showSearch,options:b,empty:g,multiple:n,disabled:u,visible:m,inputValue:o.inputValue,value:o.value,backfillValue:o.backfillValue,firstActiveValue:t.firstActiveValue,onDropdownVisibleChange:this.onDropdownVisibleChange,getPopupContainer:t.getPopupContainer,onMenuSelect:this.onMenuSelect,onMenuDeselect:this.onMenuDeselect,onPopupScroll:t.onPopupScroll,showAction:t.showAction,ref:this.saveSelectTriggerRef,menuItemSelectedIcon:t.menuItemSelectedIcon,dropdownRender:t.dropdownRender,ariaId:d},r.createElement("div",{id:t.id,style:t.style,ref:this.saveRootRef,onBlur:this.onOuterBlur,onFocus:this.onOuterFocus,className:y()(x),onMouseDown:this.markMouseDown,onMouseUp:this.markMouseLeave,onMouseOut:this.markMouseLeave},r.createElement("div",pe({ref:this.saveSelectionRef,key:"selection",className:"".concat(s,"-selection\n ").concat(s,"-selection--").concat(n?"multiple":"single"),role:"combobox","aria-autocomplete":"list","aria-haspopup":"true","aria-controls":d,"aria-expanded":m},_),h,this.renderClear(),this.renderArrow(!!n))))}}])&&de(n.prototype,l),i&&de(n,i),t}();_e.propTypes=m,_e.defaultProps={prefixCls:"rc-select",defaultOpen:!1,labelInValue:!1,defaultActiveFirstOption:!0,showSearch:!0,allowClear:!1,placeholder:"",onChange:be,onFocus:be,onBlur:be,onSelect:be,onSearch:be,onDeselect:be,onInputKeyDown:be,dropdownMatchSelectWidth:!0,dropdownStyle:{},dropdownMenuStyle:{},optionFilterProp:"value",optionLabelProp:"value",notFoundContent:"Not Found",backfill:!1,showAction:["click"],tokenSeparators:[],autoClearSearchValue:!0,tabIndex:0,dropdownRender:function(e){return e}},_e.getDerivedStateFromProps=function(e,t){var n=t.skipBuildOptionsInfo?t.optionsInfo:_e.getOptionsInfoFromProps(e,t),r={optionsInfo:n,skipBuildOptionsInfo:!1};if("open"in e&&(r.open=e.open),"value"in e){var l=_e.getValueFromProps(e);r.value=l,e.combobox&&(r.inputValue=_e.getInputValueForCombobox(e,n))}return r},_e.getOptionsFromChildren=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r.Children.forEach(e,function(e){e&&(e.type.isSelectOptGroup?_e.getOptionsFromChildren(e.props.children,t):t.push(e))}),t},_e.getInputValueForCombobox=function(e,t,n){var r=[];if("value"in e&&!n&&(r=F(e.value)),"defaultValue"in e&&n&&(r=F(e.defaultValue)),!r.length)return"";var l=r=r[0];return e.labelInValue?l=r.label:t[B(r)]&&(l=t[B(r)].label),void 0===l&&(l=""),l},_e.getLabelFromOption=function(e,t){return V(t,e.optionLabelProp)},_e.getOptionsInfoFromProps=function(e,t){var n=_e.getOptionsFromChildren(e.children),r={};if(n.forEach(function(t){var n=I(t);r[B(n)]={option:t,value:n,label:_e.getLabelFromOption(e,t),title:t.props.title,disabled:t.props.disabled}}),t){var l=t.optionsInfo,i=t.value;i&&i.forEach(function(e){var t=B(e);r[t]||void 0===l[t]||(r[t]=l[t])})}return r},_e.getValueFromProps=function(e,t){var n=[];return"value"in e&&!t&&(n=F(e.value)),"defaultValue"in e&&t&&(n=F(e.defaultValue)),e.labelInValue&&(n=n.map(function(e){return e.key})),n},_e.displayName="Select",Object(z.polyfill)(_e);var xe=_e;xe.Option=p,xe.OptGroup=s;var Me=xe,Se=n(18),Ce=n(37),ze=n(28),Te=n(15),Ee=n(33);function Oe(e){return(Oe="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})(e)}function Pe(){return(Pe=Object.assign||function(e){for(var t=1;t0?this.branchAndCut():this.simplex(),this.updateVariableValues(),this.getSolution()},o.prototype.copy=function(){var e=new o(this.priority,this.reducedCosts.length);return e.reducedCosts=this.reducedCosts.slice(),e},i.prototype.setOptionalObjective=function(e,t,n){var r=this.objectivesByPriority[e];void 0===r&&(r=new o(e,Math.max(this.width,t+1)),this.objectivesByPriority[e]=r,this.optionalObjectives.push(r),this.optionalObjectives.sort(function(e,t){return e.priority-t.priority}));r.reducedCosts[t]=n},i.prototype.initialize=function(e,t,n,r){this.variables=n,this.unrestrictedVars=r,this.width=e,this.height=t;for(var l=new Array(e),i=0;i0)return this.availableIndexes.pop();var e=this.lastElementIndex;return this.lastElementIndex+=1,e},i.prototype.density=function(){for(var e=0,t=this.matrix,n=0;n0?new l(this,e,this.feasible,this.bounded,this.branchAndCutIterations):new r(this,e,this.feasible,this.bounded)}},function(e,t,n){var r=n(194),l="object"==typeof self&&self&&self.Object===Object&&self,i=r||l||Function("return this")();e.exports=i},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(57),l=n(169),i=n(136),o=Object.defineProperty;t.f=n(62)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),l)try{return o(e,t,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(82)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=t.connect=t.Provider=void 0;var r=o(n(479)),l=o(n(480)),i=o(n(483));function o(e){return e&&e.__esModule?e:{default:e}}t.Provider=r.default,t.connect=l.default,t.create=i.default},function(e,t,n){"use strict";var r=n(2),l=n.n(r),i=n(6),o=n.n(i),a=n(8),u=n.n(a),s=n(9),c=n.n(s),h=n(0),f=n.n(h),p=n(1),d=n.n(p),v=n(13),m=n.n(v),g=n(76),y=n(65),b=n(128),w=n(129),_=n(3),x=n.n(_);function M(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function S(e,t){this[e]=t}var C=n(12),z=n.n(C),T=void 0,E={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function O(){if(void 0!==T)return T;T="";var e=document.createElement("p").style;for(var t in E)t+"Transform"in e&&(T=t);return T}function P(){return O()?O()+"TransitionProperty":"transitionProperty"}function L(){return O()?O()+"Transform":"transform"}function A(e,t){var n=P();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function k(e,t){var n=L();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var R=/matrix\((.*)\)/,I=/matrix3d\((.*)\)/;var V="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},H=void 0;function N(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function D(e,t,n){var r=n;if("object"!==("undefined"===typeof t?"undefined":V(t)))return"undefined"!==typeof r?("number"===typeof r&&(r+="px"),void(e.style[t]=r)):H(e,t);for(var l in t)t.hasOwnProperty(l)&&D(e,l,t[l])}function j(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!==typeof n){var l=e.document;"number"!==typeof(n=l.documentElement[r])&&(n=l.body[r])}return n}function F(e){return j(e)}function B(e){return j(e,!0)}function U(e){var t=function(e){var t,n=void 0,r=void 0,l=e.ownerDocument,i=l.body,o=l&&l.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=o.clientLeft||i.clientLeft||0,top:r-=o.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=F(r),t.top+=B(r),t}function G(e){return null!==e&&void 0!==e&&e==e.window}function W(e){return G(e)?e.document:9===e.nodeType?e:e.ownerDocument}var q=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),Y=/^(top|right|bottom|left)$/,K="currentStyle",X="runtimeStyle",Z="left",J="px";function Q(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function $(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function ee(e,t,n){"static"===D(e,"position")&&(e.style.position="relative");var r=-999,l=-999,i=Q("left",n),o=Q("top",n),a=$(i),u=$(o);"left"!==i&&(r=999),"top"!==o&&(l=999);var s,c="",h=U(e);("left"in t||"top"in t)&&(c=(s=e).style.transitionProperty||s.style[P()]||"",A(e,"none")),"left"in t&&(e.style[a]="",e.style[i]=r+"px"),"top"in t&&(e.style[u]="",e.style[o]=l+"px"),N(e);var f=U(e),p={};for(var d in t)if(t.hasOwnProperty(d)){var v=Q(d,n),m="left"===d?r:l,g=h[d]-f[d];p[v]=v===d?m+g:m-g}D(e,p),N(e),("left"in t||"top"in t)&&A(e,c);var y={};for(var b in t)if(t.hasOwnProperty(b)){var w=Q(b,n),_=t[b]-h[b];y[w]=b===w?p[w]+_:p[w]-_}D(e,y)}function te(e,t){var n=U(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(L());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),l={x:r.x,y:r.y};"left"in t&&(l.x=r.x+t.left-n.left),"top"in t&&(l.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(L());if(r&&"none"!==r){var l=void 0,i=r.match(R);i?((l=(i=i[1]).split(",").map(function(e){return parseFloat(e,10)}))[4]=t.x,l[5]=t.y,k(e,"matrix("+l.join(",")+")")):((l=r.match(I)[1].split(",").map(function(e){return parseFloat(e,10)}))[12]=t.x,l[13]=t.y,k(e,"matrix3d("+l.join(",")+")"))}else k(e,"translateX("+t.x+"px) translateY("+t.y+"px) translateZ(0)")}(e,l)}function ne(e,t){for(var n=0;n=0&&t.left>=0&&t.bottom>t.top&&t.right>t.left?t:null};var we=function(e,t,n,r){var l=ve.clone(e),i={width:t.width,height:t.height};return r.adjustX&&l.left=n.left&&l.left+i.width>n.right&&(i.width-=l.left+i.width-n.right),r.adjustX&&l.left+i.width>n.right&&(l.left=Math.max(n.right-i.width,n.left)),r.adjustY&&l.top=n.top&&l.top+i.height>n.bottom&&(i.height-=l.top+i.height-n.bottom),r.adjustY&&l.top+i.height>n.bottom&&(l.top=Math.max(n.bottom-i.height,n.top)),ve.mix(l,i)};var _e=function(e){var t=void 0,n=void 0,r=void 0;if(ve.isWindow(e)||9===e.nodeType){var l=ve.getWindow(e);t={left:ve.getWindowScrollLeft(l),top:ve.getWindowScrollTop(l)},n=ve.viewportWidth(l),r=ve.viewportHeight(l)}else t=ve.offset(e),n=ve.outerWidth(e),r=ve.outerHeight(e);return t.width=n,t.height=r,t};var xe=function(e,t){var n=t.charAt(0),r=t.charAt(1),l=e.width,i=e.height,o=e.left,a=e.top;return"c"===n?a+=i/2:"b"===n&&(a+=i),"c"===r?o+=l/2:"r"===r&&(o+=l),{left:o,top:a}};var Me=function(e,t,n,r,l){var i=xe(t,n[1]),o=xe(e,n[0]),a=[o.left-i.left,o.top-i.top];return{left:Math.round(e.left-a[0]+r[0]-l[0]),top:Math.round(e.top-a[1]+r[1]-l[1])}};function Se(e,t,n){return e.leftn.right}function Ce(e,t,n){return e.topn.bottom}function ze(e,t,n){var r=[];return ve.each(e,function(e){r.push(e.replace(t,function(e){return n[e]}))}),r}function Te(e,t){return e[t]=-e[t],e}function Ee(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Oe(e,t){e[0]=Ee(e[0],t.width),e[1]=Ee(e[1],t.height)}var Pe=function(e,t,n,r){var l=n.points,i=n.offset||[0,0],o=n.targetOffset||[0,0],a=n.overflow,u=n.source||e;i=[].concat(i),o=[].concat(o),a=a||{};var s={},c=0,h=be(u),f=_e(u);Oe(i,f),Oe(o,t);var p=Me(f,t,l,i,o),d=ve.merge(f,p);if(h&&(a.adjustX||a.adjustY)&&r){if(a.adjustX&&Se(p,f,h)){var v=ze(l,/[lr]/gi,{l:"r",r:"l"}),m=Te(i,0),g=Te(o,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=t.right||n.top>=t.bottom}(r);return Pe(e,l,n,i)}Le.__getOffsetParent=ge,Le.__getVisibleRectForElement=be;var Ae=Le,ke=Object.assign||function(e){for(var t=1;t=0&&r<=a+s&&l>=0&&l<=u+c,p=[n.points[0],"cc"];return Pe(e,h,ke({},n,{points:p}),f)};function Ie(e){return e&&"object"===typeof e&&e.window===e}function Ve(e,t){var n=Math.floor(e),r=Math.floor(t);return Math.abs(n-r)<=1}function He(e){return"function"===typeof e&&e?e():null}function Ne(e){return"object"===typeof e&&e?e:null}var De=function(e){function t(){var e,n,r,l;o()(this,t);for(var i=arguments.length,a=Array(i),s=0;s1?(!n&&t&&(r.className+=" "+t),f.a.createElement("div",r)):f.a.Children.only(r.children)},t}(h.Component);Ge.propTypes={children:d.a.any,className:d.a.string,visible:d.a.bool,hiddenClassName:d.a.string};var We=Ge,qe=function(e){function t(){return o()(this,t),u()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.className;return e.visible||(t+=" "+e.hiddenClassName),f.a.createElement("div",{className:t,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onMouseDown:e.onMouseDown,onTouchStart:e.onTouchStart,style:e.style},f.a.createElement(We,{className:e.prefixCls+"-content",visible:e.visible},e.children))},t}(h.Component);qe.propTypes={hiddenClassName:d.a.string,className:d.a.string,prefixCls:d.a.string,onMouseEnter:d.a.func,onMouseLeave:d.a.func,onMouseDown:d.a.func,onTouchStart:d.a.func,children:d.a.any};var Ye=qe,Ke=function(e){function t(n){o()(this,t);var r=u()(this,e.call(this,n));return Xe.call(r),r.state={stretchChecked:!1,targetWidth:void 0,targetHeight:void 0},r.savePopupRef=S.bind(r,"popupInstance"),r.saveAlignRef=S.bind(r,"alignInstance"),r}return c()(t,e),t.prototype.componentDidMount=function(){this.rootNode=this.getPopupDomNode(),this.setStretchSize()},t.prototype.componentDidUpdate=function(){this.setStretchSize()},t.prototype.getPopupDomNode=function(){return m.a.findDOMNode(this.popupInstance)},t.prototype.getMaskTransitionName=function(){var e=this.props,t=e.maskTransitionName,n=e.maskAnimation;return!t&&n&&(t=e.prefixCls+"-"+n),t},t.prototype.getTransitionName=function(){var e=this.props,t=e.transitionName;return!t&&e.animation&&(t=e.prefixCls+"-"+e.animation),t},t.prototype.getClassName=function(e){return this.props.prefixCls+" "+this.props.className+" "+e},t.prototype.getPopupElement=function(){var e=this,t=this.savePopupRef,n=this.state,r=n.stretchChecked,i=n.targetHeight,o=n.targetWidth,a=this.props,u=a.align,s=a.visible,c=a.prefixCls,h=a.style,p=a.getClassNameFromAlign,d=a.destroyPopupOnHide,v=a.stretch,m=a.children,g=a.onMouseEnter,y=a.onMouseLeave,b=a.onMouseDown,w=a.onTouchStart,_=this.getClassName(this.currentAlignClassName||p(u)),x=c+"-hidden";s||(this.currentAlignClassName=null);var M={};v&&(-1!==v.indexOf("height")?M.height=i:-1!==v.indexOf("minHeight")&&(M.minHeight=i),-1!==v.indexOf("width")?M.width=o:-1!==v.indexOf("minWidth")&&(M.minWidth=o),r||(M.visibility="hidden",setTimeout(function(){e.alignInstance&&e.alignInstance.forceAlign()},0)));var S={className:_,prefixCls:c,ref:t,onMouseEnter:g,onMouseLeave:y,onMouseDown:b,onTouchStart:w,style:l()({},M,h,this.getZIndexStyle())};return d?f.a.createElement(Fe.a,{component:"",exclusive:!0,transitionAppear:!0,transitionName:this.getTransitionName()},s?f.a.createElement(je,{target:this.getAlignTarget(),key:"popup",ref:this.saveAlignRef,monitorWindowResize:!0,align:u,onAlign:this.onAlign},f.a.createElement(Ye,l()({visible:!0},S),m)):null):f.a.createElement(Fe.a,{component:"",exclusive:!0,transitionAppear:!0,transitionName:this.getTransitionName(),showProp:"xVisible"},f.a.createElement(je,{target:this.getAlignTarget(),key:"popup",ref:this.saveAlignRef,monitorWindowResize:!0,xVisible:s,childrenProps:{visible:"xVisible"},disabled:!s,align:u,onAlign:this.onAlign},f.a.createElement(Ye,l()({hiddenClassName:x},S),m)))},t.prototype.getZIndexStyle=function(){var e={},t=this.props;return void 0!==t.zIndex&&(e.zIndex=t.zIndex),e},t.prototype.getMaskElement=function(){var e=this.props,t=void 0;if(e.mask){var n=this.getMaskTransitionName();t=f.a.createElement(We,{style:this.getZIndexStyle(),key:"mask",className:e.prefixCls+"-mask",hiddenClassName:e.prefixCls+"-mask-hidden",visible:e.visible}),n&&(t=f.a.createElement(Fe.a,{key:"mask",showProp:"visible",transitionAppear:!0,component:"",transitionName:n},t))}return t},t.prototype.render=function(){return f.a.createElement("div",null,this.getMaskElement(),this.getPopupElement())},t}(h.Component);Ke.propTypes={visible:d.a.bool,style:d.a.object,getClassNameFromAlign:d.a.func,onAlign:d.a.func,getRootDomNode:d.a.func,align:d.a.any,destroyPopupOnHide:d.a.bool,className:d.a.string,prefixCls:d.a.string,onMouseEnter:d.a.func,onMouseLeave:d.a.func,onMouseDown:d.a.func,onTouchStart:d.a.func,stretch:d.a.string,children:d.a.node,point:d.a.shape({pageX:d.a.number,pageY:d.a.number})};var Xe=function(){var e=this;this.onAlign=function(t,n){var r=e.props,l=r.getClassNameFromAlign(n);e.currentAlignClassName!==l&&(e.currentAlignClassName=l,t.className=e.getClassName(l)),r.onAlign(t,n)},this.setStretchSize=function(){var t=e.props,n=t.stretch,r=t.getRootDomNode,l=t.visible,i=e.state,o=i.stretchChecked,a=i.targetHeight,u=i.targetWidth;if(n&&l){var s=r();if(s){var c=s.offsetHeight,h=s.offsetWidth;a===c&&u===h&&o||e.setState({stretchChecked:!0,targetHeight:c,targetWidth:h})}}else o&&e.setState({stretchChecked:!1})},this.getTargetElement=function(){return e.props.getRootDomNode()},this.getAlignTarget=function(){var t=e.props.point;return t||e.getTargetElement}},Ze=Ke;function Je(){}var Qe=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"],$e=!!v.createPortal,et={rcTrigger:d.a.shape({onPopupMouseDown:d.a.func})},tt=function(e){function t(n){o()(this,t);var r=u()(this,e.call(this,n));nt.call(r);var l=void 0;return l="popupVisible"in n?!!n.popupVisible:!!n.defaultPopupVisible,r.prevPopupVisible=l,r.state={popupVisible:l},r}return c()(t,e),t.prototype.getChildContext=function(){return{rcTrigger:{onPopupMouseDown:this.onPopupMouseDown}}},t.prototype.componentWillMount=function(){var e=this;Qe.forEach(function(t){e["fire"+t]=function(n){e.fireEvents(t,n)}})},t.prototype.componentDidMount=function(){this.componentDidUpdate({},{popupVisible:this.state.popupVisible})},t.prototype.componentWillReceiveProps=function(e){var t=e.popupVisible;void 0!==t&&this.setState({popupVisible:t})},t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=this.state;if($e||this.renderComponent(null,function(){t.popupVisible!==r.popupVisible&&n.afterPopupVisibleChange(r.popupVisible)}),this.prevPopupVisible=t.popupVisible,r.popupVisible){var l=void 0;return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(l=n.getDocument(),this.clickOutsideHandler=Object(y.a)(l,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(l=l||n.getDocument(),this.touchOutsideHandler=Object(y.a)(l,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(l=l||n.getDocument(),this.contextMenuOutsideHandler1=Object(y.a)(l,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(y.a)(window,"blur",this.onContextMenuClose)))}this.clearOutsideHandler()},t.prototype.componentWillUnmount=function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout)},t.prototype.getPopupDomNode=function(){return this._component&&this._component.getPopupDomNode?this._component.getPopupDomNode():null},t.prototype.getPopupAlign=function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return l()({},r,n)}(r,t,n):n},t.prototype.setPopupVisible=function(e,t){var n=this.props.alignPoint;this.clearDelayTimer(),this.state.popupVisible!==e&&("popupVisible"in this.props||this.setState({popupVisible:e}),this.props.onPopupVisibleChange(e)),n&&t&&this.setPoint(t)},t.prototype.delaySetPopupVisible=function(e,t,n){var r=this,l=1e3*t;if(this.clearDelayTimer(),l){var i=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(function(){r.setPopupVisible(e,i),r.clearDelayTimer()},l)}else this.setPopupVisible(e,n)},t.prototype.clearDelayTimer=function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},t.prototype.clearOutsideHandler=function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},t.prototype.createTwoChains=function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire"+e]:t[e]||n[e]},t.prototype.isClickToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")},t.prototype.isContextMenuToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")},t.prototype.isClickToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")},t.prototype.isMouseEnterToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")},t.prototype.isMouseLeaveToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")},t.prototype.isFocusToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")},t.prototype.isBlurToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")},t.prototype.forcePopupAlign=function(){this.state.popupVisible&&this._component&&this._component.alignInstance&&this._component.alignInstance.forceAlign()},t.prototype.fireEvents=function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)},t.prototype.close=function(){this.setPopupVisible(!1)},t.prototype.render=function(){var e=this,t=this.state.popupVisible,n=this.props,r=n.children,l=n.forceRender,i=n.alignPoint,o=n.className,a=f.a.Children.only(r),u={key:"trigger"};this.isContextMenuToShow()?u.onContextMenu=this.onContextMenu:u.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(u.onClick=this.onClick,u.onMouseDown=this.onMouseDown,u.onTouchStart=this.onTouchStart):(u.onClick=this.createTwoChains("onClick"),u.onMouseDown=this.createTwoChains("onMouseDown"),u.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(u.onMouseEnter=this.onMouseEnter,i&&(u.onMouseMove=this.onMouseMove)):u.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?u.onMouseLeave=this.onMouseLeave:u.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(u.onFocus=this.onFocus,u.onBlur=this.onBlur):(u.onFocus=this.createTwoChains("onFocus"),u.onBlur=this.createTwoChains("onBlur"));var s=x()(a&&a.props&&a.props.className,o);s&&(u.className=s);var c=f.a.cloneElement(a,u);if(!$e)return f.a.createElement(b.a,{parent:this,visible:t,autoMount:!1,forceRender:l,getComponent:this.getComponent,getContainer:this.getContainer},function(t){var n=t.renderComponent;return e.renderComponent=n,c});var h=void 0;return(t||this._component||l)&&(h=f.a.createElement(w.a,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),[c,h]},t}(f.a.Component);tt.propTypes={children:d.a.any,action:d.a.oneOfType([d.a.string,d.a.arrayOf(d.a.string)]),showAction:d.a.any,hideAction:d.a.any,getPopupClassNameFromAlign:d.a.any,onPopupVisibleChange:d.a.func,afterPopupVisibleChange:d.a.func,popup:d.a.oneOfType([d.a.node,d.a.func]).isRequired,popupStyle:d.a.object,prefixCls:d.a.string,popupClassName:d.a.string,className:d.a.string,popupPlacement:d.a.string,builtinPlacements:d.a.object,popupTransitionName:d.a.oneOfType([d.a.string,d.a.object]),popupAnimation:d.a.any,mouseEnterDelay:d.a.number,mouseLeaveDelay:d.a.number,zIndex:d.a.number,focusDelay:d.a.number,blurDelay:d.a.number,getPopupContainer:d.a.func,getDocument:d.a.func,forceRender:d.a.bool,destroyPopupOnHide:d.a.bool,mask:d.a.bool,maskClosable:d.a.bool,onPopupAlign:d.a.func,popupAlign:d.a.object,popupVisible:d.a.bool,defaultPopupVisible:d.a.bool,maskTransitionName:d.a.oneOfType([d.a.string,d.a.object]),maskAnimation:d.a.string,stretch:d.a.string,alignPoint:d.a.bool},tt.contextTypes=et,tt.childContextTypes=et,tt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:function(){return""},getDocument:function(){return window.document},onPopupVisibleChange:Je,afterPopupVisibleChange:Je,onPopupAlign:Je,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[]};var nt=function(){var e=this;this.onMouseEnter=function(t){var n=e.props.mouseEnterDelay;e.fireEvents("onMouseEnter",t),e.delaySetPopupVisible(!0,n,n?null:t)},this.onMouseMove=function(t){e.fireEvents("onMouseMove",t),e.setPoint(t)},this.onMouseLeave=function(t){e.fireEvents("onMouseLeave",t),e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},this.onPopupMouseEnter=function(){e.clearDelayTimer()},this.onPopupMouseLeave=function(t){t.relatedTarget&&!t.relatedTarget.setTimeout&&e._component&&e._component.getPopupDomNode&&Object(g.a)(e._component.getPopupDomNode(),t.relatedTarget)||e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},this.onFocus=function(t){e.fireEvents("onFocus",t),e.clearDelayTimer(),e.isFocusToShow()&&(e.focusTime=Date.now(),e.delaySetPopupVisible(!0,e.props.focusDelay))},this.onMouseDown=function(t){e.fireEvents("onMouseDown",t),e.preClickTime=Date.now()},this.onTouchStart=function(t){e.fireEvents("onTouchStart",t),e.preTouchTime=Date.now()},this.onBlur=function(t){e.fireEvents("onBlur",t),e.clearDelayTimer(),e.isBlurToHide()&&e.delaySetPopupVisible(!1,e.props.blurDelay)},this.onContextMenu=function(t){t.preventDefault(),e.fireEvents("onContextMenu",t),e.setPopupVisible(!0,t)},this.onContextMenuClose=function(){e.isContextMenuToShow()&&e.close()},this.onClick=function(t){if(e.fireEvents("onClick",t),e.focusTime){var n=void 0;if(e.preClickTime&&e.preTouchTime?n=Math.min(e.preClickTime,e.preTouchTime):e.preClickTime?n=e.preClickTime:e.preTouchTime&&(n=e.preTouchTime),Math.abs(n-e.focusTime)<20)return;e.focusTime=0}e.preClickTime=0,e.preTouchTime=0,e.isClickToShow()&&(e.isClickToHide()||e.isBlurToHide())&&t&&t.preventDefault&&t.preventDefault();var r=!e.state.popupVisible;(e.isClickToHide()&&!r||r&&e.isClickToShow())&&e.setPopupVisible(!e.state.popupVisible,t)},this.onPopupMouseDown=function(){var t=e.context.rcTrigger,n=void 0===t?{}:t;e.hasPopupMouseDown=!0,clearTimeout(e.mouseDownTimeout),e.mouseDownTimeout=setTimeout(function(){e.hasPopupMouseDown=!1},0),n.onPopupMouseDown&&n.onPopupMouseDown.apply(n,arguments)},this.onDocumentClick=function(t){if(!e.props.mask||e.props.maskClosable){var n=t.target,r=Object(v.findDOMNode)(e);Object(g.a)(r,n)||e.hasPopupMouseDown||e.close()}},this.getRootDomNode=function(){return Object(v.findDOMNode)(e)},this.getPopupClassNameFromAlign=function(t){var n=[],r=e.props,l=r.popupPlacement,i=r.builtinPlacements,o=r.prefixCls,a=r.alignPoint,u=r.getPopupClassNameFromAlign;return l&&i&&n.push(function(e,t,n,r){var l=n.points;for(var i in e)if(e.hasOwnProperty(i)&&M(e[i].points,l,r))return t+"-placement-"+i;return""}(i,o,t,a)),u&&n.push(u(t)),n.join(" ")},this.getComponent=function(){var t=e.props,n=t.prefixCls,r=t.destroyPopupOnHide,i=t.popupClassName,o=t.action,a=t.onPopupAlign,u=t.popupAnimation,s=t.popupTransitionName,c=t.popupStyle,h=t.mask,p=t.maskAnimation,d=t.maskTransitionName,v=t.zIndex,m=t.popup,g=t.stretch,y=t.alignPoint,b=e.state,w=b.popupVisible,_=b.point,x=e.getPopupAlign(),M={};return e.isMouseEnterToShow()&&(M.onMouseEnter=e.onPopupMouseEnter),e.isMouseLeaveToHide()&&(M.onMouseLeave=e.onPopupMouseLeave),M.onMouseDown=e.onPopupMouseDown,M.onTouchStart=e.onPopupMouseDown,f.a.createElement(Ze,l()({prefixCls:n,destroyPopupOnHide:r,visible:w,point:y&&_,className:i,action:o,align:x,onAlign:a,animation:u,getClassNameFromAlign:e.getPopupClassNameFromAlign},M,{stretch:g,getRootDomNode:e.getRootDomNode,style:c,mask:h,zIndex:v,transitionName:s,maskAnimation:p,maskTransitionName:d,ref:e.savePopup}),"function"===typeof m?m():m)},this.getContainer=function(){var t=e.props,n=document.createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",(t.getPopupContainer?t.getPopupContainer(Object(v.findDOMNode)(e)):t.getDocument().body).appendChild(n),n},this.setPoint=function(t){e.props.alignPoint&&t&&e.setState({point:{pageX:t.pageX,pageY:t.pageY}})},this.handlePortalUpdate=function(){e.prevPopupVisible!==e.state.popupVisible&&e.props.afterPopupVisibleChange(e.state.popupVisible)},this.savePopup=function(t){e._component=t}};t.a=tt},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(225),l=n.n(r),i=n(13),o=n.n(i);function a(e,t,n,r){var i=o.a.unstable_batchedUpdates?function(e){o.a.unstable_batchedUpdates(n,e)}:n;return l()(e,t,i,r)}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bpfrpt_proptype_VisibleCellRange=t.bpfrpt_proptype_Alignment=t.bpfrpt_proptype_OverscanIndicesGetter=t.bpfrpt_proptype_OverscanIndices=t.bpfrpt_proptype_OverscanIndicesGetterParams=t.bpfrpt_proptype_RenderedSection=t.bpfrpt_proptype_ScrollbarPresenceChange=t.bpfrpt_proptype_Scroll=t.bpfrpt_proptype_NoContentRenderer=t.bpfrpt_proptype_CellSize=t.bpfrpt_proptype_CellSizeGetter=t.bpfrpt_proptype_CellRangeRenderer=t.bpfrpt_proptype_CellRangeRendererParams=t.bpfrpt_proptype_StyleCache=t.bpfrpt_proptype_CellCache=t.bpfrpt_proptype_CellRenderer=t.bpfrpt_proptype_CellRendererParams=t.bpfrpt_proptype_CellPosition=void 0;(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e})(n(0)),r(n(149)),r(n(1));function r(e){return e&&e.__esModule?e:{default:e}}t.bpfrpt_proptype_CellPosition=null,t.bpfrpt_proptype_CellRendererParams=null,t.bpfrpt_proptype_CellRenderer=null,t.bpfrpt_proptype_CellCache=null,t.bpfrpt_proptype_StyleCache=null,t.bpfrpt_proptype_CellRangeRendererParams=null,t.bpfrpt_proptype_CellRangeRenderer=null,t.bpfrpt_proptype_CellSizeGetter=null,t.bpfrpt_proptype_CellSize=null,t.bpfrpt_proptype_NoContentRenderer=null,t.bpfrpt_proptype_Scroll=null,t.bpfrpt_proptype_ScrollbarPresenceChange=null,t.bpfrpt_proptype_RenderedSection=null,t.bpfrpt_proptype_OverscanIndicesGetterParams=null,t.bpfrpt_proptype_OverscanIndices=null,t.bpfrpt_proptype_OverscanIndicesGetter=null,t.bpfrpt_proptype_Alignment=null,t.bpfrpt_proptype_VisibleCellRange=null},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(275)),l=o(n(283)),i="function"===typeof l.default&&"symbol"===typeof r.default?function(e){return typeof e}:function(e){return e&&"function"===typeof l.default&&e.constructor===l.default&&e!==l.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"===typeof l.default&&"symbol"===i(r.default)?function(e){return"undefined"===typeof e?"undefined":i(e)}:function(e){return e&&"function"===typeof l.default&&e.constructor===l.default&&e!==l.default.prototype?"symbol":"undefined"===typeof e?"undefined":i(e)}},function(e,t,n){"use strict";var r=n(125),l=n(88);function i(){return(i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}var d=function(){function e(){o()(this,e),this.collection={}}return u()(e,[{key:"clear",value:function(){this.collection={}}},{key:"delete",value:function(e){return delete this.collection[e]}},{key:"get",value:function(e){return this.collection[e]}},{key:"has",value:function(e){return Boolean(this.collection[e])}},{key:"set",value:function(e,t){return this.collection[e]=t,this}},{key:"size",get:function(){return Object.keys(this.collection).length}}]),e}();function v(e,t,n){return n?c.createElement(e.tag,l()({key:t},p(e.attrs),n),(e.children||[]).map(function(n,r){return v(n,t+"-"+e.tag+"-"+r)})):c.createElement(e.tag,l()({key:t},p(e.attrs)),(e.children||[]).map(function(n,r){return v(n,t+"-"+e.tag+"-"+r)}))}function m(e){return Object(s.generate)(e)[0]}function g(e,t){switch(t){case"fill":return e+"-fill";case"outline":return e+"-o";case"twotone":return e+"-twotone";default:throw new TypeError("Unknown theme type: "+t+", name: "+e)}}}).call(this,n(134))},function(e,t,n){var r=n(61),l=n(94);e.exports=n(62)?function(e,t,n){return r.f(e,t,l(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(171),l=n(137);e.exports=function(e){return r(l(e))}},function(e,t,n){var r=n(409),l=n(412);e.exports=function(e,t){var n=l(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";function r(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(19);function l(e,t,n){return(l="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var l=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(l){var i=Object.getOwnPropertyDescriptor(l,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}n.d(t,"a",function(){return l})},function(e,t,n){"use strict";t.__esModule=!0;var r,l=n(341),i=(r=l)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0||this.setState({activeKey:K(e)}))}},{key:"componentWillUnmount",value:function(){this.destroy=!0,C.a.cancel(this.sentinelId)}},{key:"updateSentinelContext",value:function(){var e=this;this.destroy||(C.a.cancel(this.sentinelId),this.sentinelId=C()(function(){e.destroy||e.forceUpdate()}))}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.navWrapper,i=t.tabBarPosition,o=t.className,u=t.renderTabContent,c=t.renderTabBar,f=t.destroyInactiveTabPane,p=h()(t,["prefixCls","navWrapper","tabBarPosition","className","renderTabContent","renderTabBar","destroyInactiveTabPane"]),d=M()((e={},s()(e,n,1),s()(e,n+"-"+i,1),s()(e,o,!!o),e));this.tabBar=c();var v=l.a.cloneElement(this.tabBar,{prefixCls:n,navWrapper:r,key:"tabBar",onKeyDown:this.onNavKeyDown,tabBarPosition:i,onTabClick:this.onTabClick,panels:t.children,activeKey:this.state.activeKey}),m=l.a.cloneElement(u(),{prefixCls:n,tabBarPosition:i,activeKey:this.state.activeKey,destroyInactiveTabPane:f,children:t.children,onChange:this.setActiveKey,key:"tabContent"}),g=l.a.createElement(W,{key:"sentinelStart",setRef:this.setSentinelStart,nextElement:this.panelSentinelStart}),y=l.a.createElement(W,{key:"sentinelEnd",setRef:this.setSentinelEnd,prevElement:this.panelSentinelEnd}),b=[];return"bottom"===i?b.push(g,m,y,v):b.push(v,g,m,y),l.a.createElement(F,{value:{sentinelStart:this.sentinelStart,sentinelEnd:this.sentinelEnd,setPanelSentinelStart:this.setPanelSentinelStart,setPanelSentinelEnd:this.setPanelSentinelEnd}},l.a.createElement("div",a()({className:d,style:t.style},I(p),{onScroll:this.onScroll}),b))}}]),t}(l.a.Component),Z=function(){var e=this;this.onTabClick=function(t,n){e.tabBar.props.onTabClick&&e.tabBar.props.onTabClick(t,n),e.setActiveKey(t)},this.onNavKeyDown=function(t){var n=t.keyCode;if(n===E||n===O){t.preventDefault();var r=e.getNextActiveKey(!0);e.onTabClick(r)}else if(n===z||n===T){t.preventDefault();var l=e.getNextActiveKey(!1);e.onTabClick(l)}},this.onScroll=function(e){var t=e.target;t===e.currentTarget&&t.scrollLeft>0&&(t.scrollLeft=0)},this.setSentinelStart=function(t){e.sentinelStart=t},this.setSentinelEnd=function(t){e.sentinelEnd=t},this.setPanelSentinelStart=function(t){t!==e.panelSentinelStart&&e.updateSentinelContext(),e.panelSentinelStart=t},this.setPanelSentinelEnd=function(t){t!==e.panelSentinelEnd&&e.updateSentinelContext(),e.panelSentinelEnd=t},this.setActiveKey=function(t){e.state.activeKey!==t&&("activeKey"in e.props||e.setState({activeKey:t}),e.props.onChange(t))},this.getNextActiveKey=function(t){var n=e.state.activeKey,r=[];l.a.Children.forEach(e.props.children,function(e){e&&!e.props.disabled&&(t?r.push(e):r.unshift(e))});var i=r.length,o=i&&r[0].key;return r.forEach(function(e,t){e.key===n&&(o=t===i-1?r[0].key:r[t+1].key)}),o}},J=X;X.propTypes={destroyInactiveTabPane:_.a.bool,renderTabBar:_.a.func.isRequired,renderTabContent:_.a.func.isRequired,navWrapper:_.a.func,onChange:_.a.func,children:_.a.node,prefixCls:_.a.string,className:_.a.string,tabBarPosition:_.a.string,style:_.a.object,activeKey:_.a.string,defaultActiveKey:_.a.string},X.defaultProps={prefixCls:"rc-tabs",destroyInactiveTabPane:!1,onChange:function(){},navWrapper:function(e){return e},tabBarPosition:"top",children:null,style:{}},X.TabPane=Y;var Q=function(e){function t(){return p()(this,t),g()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return b()(t,e),v()(t,[{key:"getTabPanes",value:function(){var e=this.props,t=e.activeKey,n=e.children,r=[];return l.a.Children.forEach(n,function(n){if(n){var i=n.key,o=t===i;r.push(l.a.cloneElement(n,{active:o,destroyInactiveTabPane:e.destroyInactiveTabPane,rootPrefixCls:e.prefixCls}))}}),r}},{key:"render",value:function(){var e,t,n=this.props,r=n.prefixCls,i=n.children,o=n.activeKey,u=n.className,c=n.tabBarPosition,h=n.animated,f=n.animatedWithMargin,p=n.style,d=M()((e={},s()(e,r+"-content",!0),s()(e,h?r+"-content-animated":r+"-content-no-animated",!0),e),u);if(h){var v=L(i,o);if(-1!==v){var m=f?function(e,t){var n=R(t)?"marginTop":"marginLeft";return s()({},n,100*-e+"%")}(v,c):{transform:t=function(e,t){return(R(t)?"translateY":"translateX")+"("+100*-e+"%) translateZ(0)"}(v,c),WebkitTransform:t,MozTransform:t};p=a()({},p,m)}else p=a()({},p,{display:"none"})}return l.a.createElement("div",{className:d,style:p},this.getTabPanes())}}]),t}(l.a.Component),$=Q;Q.propTypes={animated:_.a.bool,animatedWithMargin:_.a.bool,prefixCls:_.a.string,children:_.a.node,activeKey:_.a.string,style:_.a.any,tabBarPosition:_.a.string,className:_.a.string},Q.defaultProps={animated:!0};var ee=J;function te(e,t){var n=e.props,r=n.styles,l=n.panels,i=n.activeKey,o=e.props.getRef("root"),a=e.props.getRef("nav")||o,u=e.props.getRef("inkBar"),s=e.props.getRef("activeTab"),c=u.style,h=e.props.tabBarPosition,f=L(l,i);if(t&&(c.display="none"),s){var p=s,d=k(c);if(A(c,""),c.width="",c.height="",c.left="",c.top="",c.bottom="",c.right="","top"===h||"bottom"===h){var v=function(e,t){return H("left","offsetWidth","right",e,t)}(p,a),m=p.offsetWidth;m===o.offsetWidth?m=0:r.inkBar&&void 0!==r.inkBar.width&&(m=parseFloat(r.inkBar.width,10))&&(v+=(p.offsetWidth-m)/2),d?A(c,"translate3d("+v+"px,0,0)"):c.left=v+"px",c.width=m+"px"}else{var g=function(e,t){return H("top","offsetHeight","bottom",e,t)}(p,a),y=p.offsetHeight;r.inkBar&&void 0!==r.inkBar.height&&(y=parseFloat(r.inkBar.height,10))&&(g+=(p.offsetHeight-y)/2),d?(A(c,"translate3d(0,"+g+"px,0)"),c.top="0"):c.top=g+"px",c.height=y+"px"}}c.display=-1!==f?"block":"none"}var ne=function(e){function t(){return p()(this,t),g()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return b()(t,e),v()(t,[{key:"componentDidMount",value:function(){var e=this;this.timeout=setTimeout(function(){te(e,!0)},0)}},{key:"componentDidUpdate",value:function(){te(this)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.styles,i=t.inkBarAnimated,o=n+"-ink-bar",a=M()((e={},s()(e,o,!0),s()(e,i?o+"-animated":o+"-no-animated",!0),e));return l.a.createElement("div",{style:r.inkBar,className:a,key:"inkBar",ref:this.props.saveRef("inkBar")})}}]),t}(l.a.Component),re=ne;ne.propTypes={prefixCls:_.a.string,styles:_.a.object,inkBarAnimated:_.a.bool,saveRef:_.a.func},ne.defaultProps={prefixCls:"",inkBarAnimated:!0,styles:{},saveRef:function(){}};var le=n(227),ie=n.n(le),oe=function(e){function t(){return p()(this,t),g()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return b()(t,e),v()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.panels,r=t.activeKey,i=t.prefixCls,o=t.tabBarGutter,u=t.saveRef,c=t.tabBarPosition,h=t.renderTabBarNode,f=[];return l.a.Children.forEach(n,function(t,p){if(t){var d=t.key,v=r===d?i+"-tab-active":"";v+=" "+i+"-tab";var m={};t.props.disabled?v+=" "+i+"-tab-disabled":m={onClick:e.props.onTabClick.bind(e,d)};var g={};r===d&&(g.ref=u("activeTab"));var y=o&&p===n.length-1?0:o,b=s()({},R(c)?"marginBottom":"marginRight",y);ie()("tab"in t.props,"There must be `tab` property on children of Tabs.");var w=l.a.createElement("div",a()({role:"tab","aria-disabled":t.props.disabled?"true":"false","aria-selected":r===d?"true":"false"},m,{className:v,key:d,style:b},g),t.props.tab);h&&(w=h(w)),f.push(w)}}),l.a.createElement("div",{ref:u("navTabsContainer")},f)}}]),t}(l.a.Component),ae=oe;oe.propTypes={activeKey:_.a.string,panels:_.a.node,prefixCls:_.a.string,tabBarGutter:_.a.number,onTabClick:_.a.func,saveRef:_.a.func,renderTabBarNode:_.a.func,tabBarPosition:_.a.string},oe.defaultProps={panels:[],prefixCls:[],tabBarGutter:null,onTabClick:function(){},saveRef:function(){}};var ue=function(e){function t(){return p()(this,t),g()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return b()(t,e),v()(t,[{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.onKeyDown,i=e.className,o=e.extraContent,u=e.style,c=e.tabBarPosition,f=e.children,p=h()(e,["prefixCls","onKeyDown","className","extraContent","style","tabBarPosition","children"]),d=M()(t+"-bar",s()({},i,!!i)),v="top"===c||"bottom"===c,m=v?{float:"right"}:{},g=o&&o.props?o.props.style:{},y=f;return o&&(y=[Object(r.cloneElement)(o,{key:"extra",style:a()({},m,g)}),Object(r.cloneElement)(f,{key:"content"})],y=v?y:y.reverse()),l.a.createElement("div",a()({role:"tablist",className:d,tabIndex:"0",ref:this.props.saveRef("root"),onKeyDown:n,style:u},I(p)),y)}}]),t}(l.a.Component),se=ue;ue.propTypes={prefixCls:_.a.string,className:_.a.string,style:_.a.object,tabBarPosition:_.a.oneOf(["left","right","top","bottom"]),children:_.a.node,extraContent:_.a.node,onKeyDown:_.a.func,saveRef:_.a.func},ue.defaultProps={prefixCls:"",className:"",style:{},tabBarPosition:"top",extraContent:null,children:null,onKeyDown:function(){},saveRef:function(){}};var ce=n(130),he=n.n(ce),fe=n(89),pe=function(e){function t(e){p()(this,t);var n=g()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.prevTransitionEnd=function(e){if("opacity"===e.propertyName){var t=n.props.getRef("container");n.scrollToActiveTab({target:t,currentTarget:t})}},n.scrollToActiveTab=function(e){var t=n.props.getRef("activeTab"),r=n.props.getRef("navWrap");if((!e||e.target===e.currentTarget)&&t){var l=n.isNextPrevShown()&&n.lastNextPrevShown;if(n.lastNextPrevShown=n.isNextPrevShown(),l){var i=n.getScrollWH(t),o=n.getOffsetWH(r),a=n.offset,u=n.getOffsetLT(r),s=n.getOffsetLT(t);u>s?(a+=u-s,n.setOffset(a)):u+o=0)u=!1,this.setOffset(0,!1),i=0;else if(o1&&void 0!==arguments[1])||arguments[1],n=Math.min(0,e);if(this.offset!==n){this.offset=n;var r={},l=this.props.tabBarPosition,i=this.props.getRef("nav").style,o=k(i);r="left"===l||"right"===l?o?{value:"translate3d(0,"+n+"px,0)"}:{name:"top",value:n+"px"}:o?{value:"translate3d("+n+"px,0,0)"}:{name:"left",value:n+"px"},o?A(i,r.value):i[r.name]=r.value,t&&this.setNextPrev()}}},{key:"setPrev",value:function(e){this.state.prev!==e&&this.setState({prev:e})}},{key:"setNext",value:function(e){this.state.next!==e&&this.setState({next:e})}},{key:"isNextPrevShown",value:function(e){return e?e.next||e.prev:this.state.next||this.state.prev}},{key:"render",value:function(){var e,t,n,r,i=this.state,o=i.next,a=i.prev,u=this.props,c=u.prefixCls,h=u.scrollAnimated,f=u.navWrapper,p=u.prevIcon,d=u.nextIcon,v=a||o,m=l.a.createElement("span",{onClick:a?this.prev:null,unselectable:"unselectable",className:M()((e={},s()(e,c+"-tab-prev",1),s()(e,c+"-tab-btn-disabled",!a),s()(e,c+"-tab-arrow-show",v),e)),onTransitionEnd:this.prevTransitionEnd},p||l.a.createElement("span",{className:c+"-tab-prev-icon"})),g=l.a.createElement("span",{onClick:o?this.next:null,unselectable:"unselectable",className:M()((t={},s()(t,c+"-tab-next",1),s()(t,c+"-tab-btn-disabled",!o),s()(t,c+"-tab-arrow-show",v),t))},d||l.a.createElement("span",{className:c+"-tab-next-icon"})),y=c+"-nav",b=M()((n={},s()(n,y,!0),s()(n,h?y+"-animated":y+"-no-animated",!0),n));return l.a.createElement("div",{className:M()((r={},s()(r,c+"-nav-container",1),s()(r,c+"-nav-container-scrolling",v),r)),key:"container",ref:this.props.saveRef("container")},m,g,l.a.createElement("div",{className:c+"-nav-wrap",ref:this.props.saveRef("navWrap")},l.a.createElement("div",{className:c+"-nav-scroll"},l.a.createElement("div",{className:b,ref:this.props.saveRef("nav")},f(this.props.children)))))}}]),t}(l.a.Component),de=pe;pe.propTypes={activeKey:_.a.string,getRef:_.a.func.isRequired,saveRef:_.a.func.isRequired,tabBarPosition:_.a.oneOf(["left","right","top","bottom"]),prefixCls:_.a.string,scrollAnimated:_.a.bool,onPrevClick:_.a.func,onNextClick:_.a.func,navWrapper:_.a.func,children:_.a.node,prevIcon:_.a.node,nextIcon:_.a.node},pe.defaultProps={tabBarPosition:"left",prefixCls:"",scrollAnimated:!0,onPrevClick:function(){},onNextClick:function(){},navWrapper:function(e){return e}};var ve=function(e){function t(){var e,n,r,l;p()(this,t);for(var i=arguments.length,o=Array(i),a=0;a=0),e),c),w=we({},this.props,{children:null,inkBarAnimated:p,extraContent:a,style:l,prevIcon:g,nextIcon:y,className:b});return t=o?o(w,ye):r.createElement(ye,w),r.cloneElement(t)}}])&&Me(n.prototype,l),i&&Me(n,i),t}();Te.defaultProps={animated:!0,type:"line"};var Ee=n(18),Oe=n(28);function Pe(e){if("undefined"!==typeof window&&window.document&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some(function(e){return e in n.style})}return!1}var Le=Pe(["flex","webkitFlex","Flex","msFlex"]);function Ae(){return(Ae=Object.assign||function(e){for(var t=1;t=0&&("small"===s||"large"===s)),"Tabs","`type=card|editable-card` doesn't have small or large size, it's by design.");var b=l("tabs",o),w=M()(u,(ke(n={},"".concat(b,"-vertical"),"left"===f||"right"===f),ke(n,"".concat(b,"-").concat(s),!!s),ke(n,"".concat(b,"-card"),h.indexOf("card")>=0),ke(n,"".concat(b,"-").concat(h),!0),ke(n,"".concat(b,"-no-animation"),!y),n)),_=[];"editable-card"===h&&(_=[],r.Children.forEach(p,function(t,n){var l=t.props.closable,i=(l="undefined"===typeof l||l)?r.createElement(be.a,{type:"close",className:"".concat(b,"-close-x"),onClick:function(n){return e.removeTab(t.key,n)}}):null;_.push(r.cloneElement(t,{tab:r.createElement("div",{className:l?void 0:"".concat(b,"-tab-unclosable")},t.props.tab,i),key:t.key||n}))}),m||(g=r.createElement("span",null,r.createElement(be.a,{type:"plus",className:"".concat(b,"-new-tab"),onClick:e.createNewTab}),g))),g=g?r.createElement("div",{className:"".concat(b,"-extra-content")},g):null;var x=e.props,S=(x.className,De(x,["className"])),C=M()("".concat(b,"-").concat(f,"-content"),h.indexOf("card")>=0&&"".concat(b,"-card-content"));return r.createElement(ee,Ae({},e.props,{prefixCls:b,className:w,tabBarPosition:f,renderTabBar:function(){return r.createElement(Te,Ae({},S,{tabBarExtraContent:g}))},renderTabContent:function(){return r.createElement($,{className:C,animated:y,animatedWithMargin:!0})},onChange:e.handleChange}),_.length>0?_:p)},e}var n,l,o;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ne(e,t)}(t,r["Component"]),n=t,(l=[{key:"componentDidMount",value:function(){var e=i.findDOMNode(this);e&&!Le&&-1===e.className.indexOf(" no-flex")&&(e.className+=" no-flex")}},{key:"render",value:function(){return r.createElement(Ee.a,null,this.renderTabs)}}])&&Ie(n.prototype,l),o&&Ie(n,o),t}();je.TabPane=Y,je.defaultProps={hideAdd:!1,tabPosition:"top"}},function(e,t,n){var r=n(391);e.exports={TextEncoder:r.TextEncoder,TextDecoder:r.TextDecoder}},function(e,t,n){var r=n(114);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,l){return e.call(t,n,r,l)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(137);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports={}},function(e,t,n){"use strict";n(31),n(340)},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var r=n(313);t.__esModule=!0,t.default=function(e){if((!l&&0!==l||e)&&i.default){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),l=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return l};var l,i=r(n(314));e.exports=t.default},function(e,t,n){"use strict";t.a={placeholder:"Select time"}},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;u.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),h=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),M="undefined"!==typeof WeakMap?new WeakMap:new n,S=function(){return function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new x(t,n,this);M.set(this,r)}}();["observe","unobserve","disconnect"].forEach(function(e){S.prototype[e]=function(){var t;return(t=M.get(this))[e].apply(t,arguments)}});var C="undefined"!==typeof l.ResizeObserver?l.ResizeObserver:S;t.a=C}).call(this,n(60))},function(e,t,n){"use strict";e.exports=n(486)},function(e,t,n){"use strict";var r=n(0),l=n.n(r),i=n(24),o=n(2),a=n.n(o),u=n(6),s=n.n(u),c=n(12),h=n.n(c),f=n(8),p=n.n(f),d=n(9),v=n.n(d),m=n(1),g=n.n(m),y=n(16),b=n.n(y),w=n(3),_=n.n(w);function x(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}function M(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).map(function(t){n.append(t,e.data[t])}),n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){if(t.status<200||t.status>=300)return e.onError(function(e,t){var n="cannot post "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method="post",r.url=e.action,r}(e,t),x(t));e.onSuccess(x(t),t)},t.open("post",e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};for(var l in null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),r)r.hasOwnProperty(l)&&null!==r[l]&&t.setRequestHeader(l,r[l]);return t.send(n),{abort:function(){t.abort()}}}var S=+new Date,C=0;function z(){return"rc-upload-"+S+"-"+ ++C}var T=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",l=e.type||"",i=l.replace(/\/.*$/,"");return n.some(function(e){var t,n,o=e.trim();return"."===o.charAt(0)?(t=r.toLowerCase(),n=o.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(o)?i===o.replace(/\/.*$/,""):l===o})}return!0};var E=function(e,t,n){var r=function e(r,l){l=l||"",r.isFile?r.file(function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))}):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries(function(n){var l=Array.prototype.slice.apply(n);r=r.concat(l),l.length?e():t(r)})}()}(r,function(t){t.forEach(function(t){e(t,""+l+r.name+"/")})})},l=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(l=(a=u.next()).done);l=!0)r(a.value.webkitGetAsEntry())}catch(s){i=!0,o=s}finally{try{!l&&u.return&&u.return()}finally{if(i)throw o}}},O=function(e){function t(){var e,n,r,l;s()(this,t);for(var i=arguments.length,o=Array(i),a=0;a',n=''}return'\n \n \n \n \n \n '+t+'\n \n \n
\n \n '+n+'\n \n
\n \n \n '}},{key:"initIframeSrc",value:function(){this.domain&&(this.getIframeNode().src="javascript:void((function(){\n var d = document;\n d.open();\n d.domain='"+this.domain+"';\n d.write('');\n d.close();\n })())")}},{key:"initIframe",value:function(){var e=this.getIframeNode(),t=e.contentWindow,n=void 0;this.domain=this.domain||"",this.initIframeSrc();try{n=t.document}catch(r){this.domain=document.domain,this.initIframeSrc(),n=(t=e.contentWindow).document}n.open("text/html","replace"),n.write(this.getIframeHTML(this.domain)),n.close(),this.getFormInputNode().onchange=this.onChange}},{key:"endUpload",value:function(){this.state.uploading&&(this.file={},this.state.uploading=!1,this.setState({uploading:!1}),this.initIframe())}},{key:"startUpload",value:function(){this.state.uploading||(this.state.uploading=!0,this.setState({uploading:!0}))}},{key:"updateIframeWH",value:function(){var e=A.a.findDOMNode(this),t=this.getIframeNode();t.style.height=e.offsetHeight+"px",t.style.width=e.offsetWidth+"px"}},{key:"abort",value:function(e){if(e){var t=e;e&&e.uid&&(t=e.uid),t===this.file.uid&&this.endUpload()}else this.endUpload()}},{key:"post",value:function(e){var t=this,n=this.getFormNode(),r=this.getFormDataNode(),l=this.props.data,i=this.props.onStart;"function"===typeof l&&(l=l(e));var o=document.createDocumentFragment();for(var a in l)if(l.hasOwnProperty(a)){var u=document.createElement("input");u.setAttribute("name",a),u.value=l[a],o.appendChild(u)}r.appendChild(o),new Promise(function(n){var r=t.props.action;if("function"===typeof r)return n(r(e));n(r)}).then(function(t){n.setAttribute("action",t),n.submit(),r.innerHTML="",i(e)})}},{key:"render",value:function(){var e,t=this.props,n=t.component,r=t.disabled,i=t.className,o=t.prefixCls,u=t.children,s=t.style,c=a()({},I,{display:this.state.uploading||r?"none":""}),h=_()((e={},b()(e,o,!0),b()(e,o+"-disabled",r),b()(e,i,i),e));return l.a.createElement(n,{className:h,style:a()({position:"relative",zIndex:0},s)},l.a.createElement("iframe",{ref:this.saveIframe,onLoad:this.onLoad,style:c}),u)}}]),t}(r.Component);V.propTypes={component:g.a.string,style:g.a.object,disabled:g.a.bool,prefixCls:g.a.string,className:g.a.string,accept:g.a.string,onStart:g.a.func,multiple:g.a.bool,children:g.a.any,data:g.a.oneOfType([g.a.object,g.a.func]),action:g.a.oneOfType([g.a.string,g.a.func]),name:g.a.string};var H=V;function N(){}var D=function(e){function t(){var e,n,r,l;s()(this,t);for(var i=arguments.length,o=Array(i),a=0;a100?100:e}function re(){return(re=Object.assign||function(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}function be(e,t){for(var n=0;n=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}function Te(e,t){for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:0,i=50-r/2,o=0,a=-i,u=0,s=-2*i;switch(arguments.length>5?arguments[5]:void 0){case"left":o=-i,a=0,u=2*i,s=0;break;case"right":o=i,a=0,u=-2*i,s=0;break;case"bottom":a=i,s=2*i}var c="M 50,50 m ".concat(o,",").concat(a,"\n a ").concat(i,",").concat(i," 0 1 1 ").concat(u,",").concat(-s,"\n a ").concat(i,",").concat(i," 0 1 1 ").concat(-u,",").concat(s),h=2*Math.PI*i;return{pathString:c,pathStyle:{stroke:n,strokeDasharray:"".concat(t/100*(h-l),"px ").concat(h,"px"),strokeDashoffset:"-".concat(l/2+e/100*(h-l),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"}}}var ke=function(e){function t(){var e,n,r,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,o=new Array(i),a=0;a=100?"success":e||"normal"}},{key:"renderProcessInfo",value:function(e,t){var n,l=this.props,i=l.showInfo,o=l.format,a=l.type,u=l.percent,s=l.successPercent;if(!i)return null;var c="circle"===a||"dashboard"===a?"":"-circle";return o||"exception"!==t&&"success"!==t?n=(o||function(e){return"".concat(e,"%")})(ne(u),ne(s)):"exception"===t?n=r.createElement(Q.a,{type:"close".concat(c),theme:"line"===a?"filled":"outlined"}):"success"===t&&(n=r.createElement(Q.a,{type:"check".concat(c),theme:"line"===a?"filled":"outlined"})),r.createElement("span",{className:"".concat(e,"-text"),title:"string"===typeof n?n:void 0},n)}},{key:"render",value:function(){return r.createElement(ee.a,null,this.renderProgress)}}])&&Fe(n.prototype,l),i&&Fe(n,i),t}();Ke.defaultProps={type:"line",percent:0,showInfo:!0,trailColor:"#f3f3f3",size:"default",gapDegree:0,strokeLinecap:"round"},Ke.propTypes={status:m.oneOf(Ye),type:m.oneOf(qe),showInfo:m.bool,percent:m.number,width:m.number,strokeWidth:m.number,strokeLinecap:m.oneOf(["round","square"]),strokeColor:m.oneOfType([m.string,m.object]),trailColor:m.string,format:m.func,gapDegree:m.number};var Xe=Ke;function Ze(e){return(Ze="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})(e)}function Je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qe(){return(Qe=Object.assign||function(e){for(var t=1;t=.98?n:(n+=e,(e-=.01)<.001&&(e=.001),n)}}(),l=0;this.clearProgressTimer(),this.progressTimer=setInterval(function(){l=r(l),n.onProgress({percent:100*l},t)},200)}},{key:"handleRemove",value:function(e){var t=this,n=this.props.onRemove,r=e.status;e.status="removed",Promise.resolve("function"===typeof n?n(e):n).then(function(n){if(!1!==n){var l=function(e,t){var n=void 0!==e.uid?"uid":"name",r=t.filter(function(t){return t[n]!==e[n]});return r.length===t.length?null:r}(e,t.state.fileList);l&&t.onChange({file:e,fileList:l})}else e.status=r})}},{key:"clearProgressTimer",value:function(){clearInterval(this.progressTimer)}},{key:"render",value:function(){return r.createElement(ee.a,null,this.renderUpload)}}])&&st(n.prototype,l),i&&st(n,i),t}();pt.defaultProps={type:"select",multiple:!1,action:"",data:{},accept:"",beforeUpload:function(){return!0},showUploadList:!0,listType:"text",className:"",disabled:!1,supportServerRender:!0},Object(i.polyfill)(pt);var dt=pt;function vt(e){return(vt="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})(e)}function mt(){return(mt=Object.assign||function(e){for(var t=1;t=0||l.indexOf("Bottom")>=0?o.top="".concat(i.height-t.offset[1],"px"):(l.indexOf("Top")>=0||l.indexOf("bottom")>=0)&&(o.top="".concat(-t.offset[1],"px")),l.indexOf("left")>=0||l.indexOf("Right")>=0?o.left="".concat(i.width-t.offset[0],"px"):(l.indexOf("right")>=0||l.indexOf("Left")>=0)&&(o.left="".concat(-t.offset[0],"px")),e.style.transformOrigin="".concat(o.left," ").concat(o.top)}},n.saveTooltip=function(e){n.tooltip=e},n.renderTooltip=function(e){var t=e.getPopupContainer,l=e.getPrefixCls,i=H(n),o=i.props,a=i.state,u=o.prefixCls,s=o.title,c=o.overlay,h=o.openClassName,f=o.getPopupContainer,p=o.getTooltipContainer,d=o.children,v=l("tooltip",u),m=a.visible;"visible"in o||!n.isNoTitle()||(m=!1);var g,y,b,w=n.getDisabledCompatibleChildren(r.isValidElement(d)?d:r.createElement("span",null,d)),_=w.props,x=T()(_.className,(g={},y=h||"".concat(v,"-open"),b=!0,y in g?Object.defineProperty(g,y,{value:b,enumerable:!0,configurable:!0,writable:!0}):g[y]=b,g));return r.createElement(C,D({},n.props,{prefixCls:v,getTooltipContainer:f||p||t,ref:n.saveTooltip,builtinPlacements:n.getPlacements(),overlay:c||s||"",visible:m,onVisibleChange:n.onVisibleChange,onPopupAlign:n.onPopupAlign}),m?Object(r.cloneElement)(w,{className:x}):w)},n.state={visible:!!e.visible||!!e.defaultVisible},n}var n,l,i;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&N(e,t)}(t,r["Component"]),n=t,i=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:null}}],(l=[{key:"getPopupDomNode",value:function(){return this.tooltip.getPopupDomNode()}},{key:"getPlacements",value:function(){var e=this.props,t=e.builtinPlacements,n=e.arrowPointAtCenter,r=e.autoAdjustOverflow;return t||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.arrowWidth,n=void 0===t?5:t,r=e.horizontalArrowShift,l=void 0===r?16:r,i=e.verticalArrowShift,o=void 0===i?12:i,a=e.autoAdjustOverflow,u=void 0===a||a,s={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(l+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(o+n)]},topRight:{points:["br","tc"],offset:[l+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(o+n)]},bottomRight:{points:["tr","bc"],offset:[l+n,4]},rightBottom:{points:["bl","cr"],offset:[4,o+n]},bottomLeft:{points:["tl","bc"],offset:[-(l+n),4]},leftBottom:{points:["br","cl"],offset:[-4,o+n]}};return Object.keys(s).forEach(function(t){s[t]=e.arrowPointAtCenter?E({},s[t],{overflow:A(u),targetOffset:L}):E({},_[t],{overflow:A(u)}),s[t].ignoreShake=!0}),s}({arrowPointAtCenter:n,verticalArrowShift:8,autoAdjustOverflow:r})}},{key:"getDisabledCompatibleChildren",value:function(e){var t=e.type;if((t.__ANT_BUTTON||t.__ANT_SWITCH||"button"===e.type)&&e.props.disabled){var n=function(e,t){var n={},r=D({},e);return t.forEach(function(t){e&&t in e&&(n[t]=e[t],delete r[t])}),{picked:n,omitted:r}}(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),l=n.picked,i=n.omitted,o=D({display:"inline-block"},l,{cursor:"not-allowed",width:e.props.block?"100%":null}),a=D({},i,{pointerEvents:"none"}),u=Object(r.cloneElement)(e,{style:a,className:null});return r.createElement("span",{style:o,className:e.props.className},u)}return e}},{key:"isNoTitle",value:function(){var e=this.props,t=e.title,n=e.overlay;return!t&&!n}},{key:"render",value:function(){return r.createElement(k.a,null,this.renderTooltip)}}])&&I(n.prototype,l),i&&I(n,i),t}();j.defaultProps={placement:"top",transitionName:"zoom-big-fast",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0},Object(i.polyfill)(j);t.a=j},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(35),l=n.n(r),i=0,o={};function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=i++,r=t;return o[n]=l()(function t(){(r-=1)<=0?(e(),delete o[n]):o[n]=l()(t)}),n}a.cancel=function(e){void 0!==e&&(l.a.cancel(o[e]),delete o[e])},a.ids=o},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(170),l=n(142);e.exports=Object.keys||function(e){return r(e,l)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t,n){"use strict";var r=n(277)(!0);n(174)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(120),l=n(378),i=n(379),o="[object Null]",a="[object Undefined]",u=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?a:o:u&&u in Object(e)?l(e):i(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(119),l=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-l?"-0":t}},function(e,t,n){e.exports={default:n(316),__esModule:!0}},function(e,t){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,n){e.exports={default:n(266),__esModule:!0}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},function(e,t,n){(function(e,r){var l;(function(){var i,o=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",s="__lodash_hash_undefined__",c=500,h="__lodash_placeholder__",f=1,p=2,d=4,v=1,m=2,g=1,y=2,b=4,w=8,_=16,x=32,M=64,S=128,C=256,z=512,T=30,E="...",O=800,P=16,L=1,A=2,k=1/0,R=9007199254740991,I=1.7976931348623157e308,V=NaN,H=4294967295,N=H-1,D=H>>>1,j=[["ary",S],["bind",g],["bindKey",y],["curry",w],["curryRight",_],["flip",z],["partial",x],["partialRight",M],["rearg",C]],F="[object Arguments]",B="[object Array]",U="[object AsyncFunction]",G="[object Boolean]",W="[object Date]",q="[object DOMException]",Y="[object Error]",K="[object Function]",X="[object GeneratorFunction]",Z="[object Map]",J="[object Number]",Q="[object Null]",$="[object Object]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",le="[object Symbol]",ie="[object Undefined]",oe="[object WeakMap]",ae="[object WeakSet]",ue="[object ArrayBuffer]",se="[object DataView]",ce="[object Float32Array]",he="[object Float64Array]",fe="[object Int8Array]",pe="[object Int16Array]",de="[object Int32Array]",ve="[object Uint8Array]",me="[object Uint8ClampedArray]",ge="[object Uint16Array]",ye="[object Uint32Array]",be=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,_e=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xe=/&(?:amp|lt|gt|quot|#39);/g,Me=/[&<>"']/g,Se=RegExp(xe.source),Ce=RegExp(Me.source),ze=/<%-([\s\S]+?)%>/g,Te=/<%([\s\S]+?)%>/g,Ee=/<%=([\s\S]+?)%>/g,Oe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/,Le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ae=/[\\^$.*+?()[\]{}|]/g,ke=RegExp(Ae.source),Re=/^\s+|\s+$/g,Ie=/^\s+/,Ve=/\s+$/,He=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ne=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,je=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/\\(\\)?/g,Be=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ue=/\w*$/,Ge=/^[-+]0x[0-9a-f]+$/i,We=/^0b[01]+$/i,qe=/^\[object .+?Constructor\]$/,Ye=/^0o[0-7]+$/i,Ke=/^(?:0|[1-9]\d*)$/,Xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Qe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",et="[\\ud800-\\udfff]",tt="["+$e+"]",nt="["+Qe+"]",rt="\\d+",lt="[\\u2700-\\u27bf]",it="[a-z\\xdf-\\xf6\\xf8-\\xff]",ot="[^\\ud800-\\udfff"+$e+rt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",at="\\ud83c[\\udffb-\\udfff]",ut="[^\\ud800-\\udfff]",st="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",ht="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ft="(?:"+it+"|"+ot+")",pt="(?:"+ht+"|"+ot+")",dt="(?:"+nt+"|"+at+")"+"?",vt="[\\ufe0e\\ufe0f]?"+dt+("(?:\\u200d(?:"+[ut,st,ct].join("|")+")[\\ufe0e\\ufe0f]?"+dt+")*"),mt="(?:"+[lt,st,ct].join("|")+")"+vt,gt="(?:"+[ut+nt+"?",nt,st,ct,et].join("|")+")",yt=RegExp("['\u2019]","g"),bt=RegExp(nt,"g"),wt=RegExp(at+"(?="+at+")|"+gt+vt,"g"),_t=RegExp([ht+"?"+it+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[tt,ht,"$"].join("|")+")",pt+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[tt,ht+ft,"$"].join("|")+")",ht+"?"+ft+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",ht+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rt,mt].join("|"),"g"),xt=RegExp("[\\u200d\\ud800-\\udfff"+Qe+"\\ufe0e\\ufe0f]"),Mt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,St=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ct=-1,zt={};zt[ce]=zt[he]=zt[fe]=zt[pe]=zt[de]=zt[ve]=zt[me]=zt[ge]=zt[ye]=!0,zt[F]=zt[B]=zt[ue]=zt[G]=zt[se]=zt[W]=zt[Y]=zt[K]=zt[Z]=zt[J]=zt[$]=zt[te]=zt[ne]=zt[re]=zt[oe]=!1;var Tt={};Tt[F]=Tt[B]=Tt[ue]=Tt[se]=Tt[G]=Tt[W]=Tt[ce]=Tt[he]=Tt[fe]=Tt[pe]=Tt[de]=Tt[Z]=Tt[J]=Tt[$]=Tt[te]=Tt[ne]=Tt[re]=Tt[le]=Tt[ve]=Tt[me]=Tt[ge]=Tt[ye]=!0,Tt[Y]=Tt[K]=Tt[oe]=!1;var Et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ot=parseFloat,Pt=parseInt,Lt="object"==typeof e&&e&&e.Object===Object&&e,At="object"==typeof self&&self&&self.Object===Object&&self,kt=Lt||At||Function("return this")(),Rt=t&&!t.nodeType&&t,It=Rt&&"object"==typeof r&&r&&!r.nodeType&&r,Vt=It&&It.exports===Rt,Ht=Vt&&Lt.process,Nt=function(){try{var e=It&&It.require&&It.require("util").types;return e||Ht&&Ht.binding&&Ht.binding("util")}catch(t){}}(),Dt=Nt&&Nt.isArrayBuffer,jt=Nt&&Nt.isDate,Ft=Nt&&Nt.isMap,Bt=Nt&&Nt.isRegExp,Ut=Nt&&Nt.isSet,Gt=Nt&&Nt.isTypedArray;function Wt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function qt(e,t,n,r){for(var l=-1,i=null==e?0:e.length;++l-1}function Qt(e,t,n){for(var r=-1,l=null==e?0:e.length;++r-1;);return n}function _n(e,t){for(var n=e.length;n--&&un(t,e[n],0)>-1;);return n}var xn=pn({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Mn=pn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Sn(e){return"\\"+Et[e]}function Cn(e){return xt.test(e)}function zn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Tn(e,t){return function(n){return e(t(n))}}function En(e,t){for(var n=-1,r=e.length,l=0,i=[];++n",""":'"',"'":"'"});var Rn=function e(t){var n=(t=null==t?kt:Rn.defaults(kt.Object(),t,Rn.pick(kt,St))).Array,r=t.Date,l=t.Error,Qe=t.Function,$e=t.Math,et=t.Object,tt=t.RegExp,nt=t.String,rt=t.TypeError,lt=n.prototype,it=Qe.prototype,ot=et.prototype,at=t["__core-js_shared__"],ut=it.toString,st=ot.hasOwnProperty,ct=0,ht=function(){var e=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ft=ot.toString,pt=ut.call(et),dt=kt._,vt=tt("^"+ut.call(st).replace(Ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=Vt?t.Buffer:i,gt=t.Symbol,wt=t.Uint8Array,xt=mt?mt.allocUnsafe:i,Et=Tn(et.getPrototypeOf,et),Lt=et.create,At=ot.propertyIsEnumerable,Rt=lt.splice,It=gt?gt.isConcatSpreadable:i,Ht=gt?gt.iterator:i,Nt=gt?gt.toStringTag:i,ln=function(){try{var e=Hi(et,"defineProperty");return e({},"",{}),e}catch(t){}}(),pn=t.clearTimeout!==kt.clearTimeout&&t.clearTimeout,In=r&&r.now!==kt.Date.now&&r.now,Vn=t.setTimeout!==kt.setTimeout&&t.setTimeout,Hn=$e.ceil,Nn=$e.floor,Dn=et.getOwnPropertySymbols,jn=mt?mt.isBuffer:i,Fn=t.isFinite,Bn=lt.join,Un=Tn(et.keys,et),Gn=$e.max,Wn=$e.min,qn=r.now,Yn=t.parseInt,Kn=$e.random,Xn=lt.reverse,Zn=Hi(t,"DataView"),Jn=Hi(t,"Map"),Qn=Hi(t,"Promise"),$n=Hi(t,"Set"),er=Hi(t,"WeakMap"),tr=Hi(et,"create"),nr=er&&new er,rr={},lr=so(Zn),ir=so(Jn),or=so(Qn),ar=so($n),ur=so(er),sr=gt?gt.prototype:i,cr=sr?sr.valueOf:i,hr=sr?sr.toString:i;function fr(e){if(Ta(e)&&!ma(e)&&!(e instanceof mr)){if(e instanceof vr)return e;if(st.call(e,"__wrapped__"))return co(e)}return new vr(e)}var pr=function(){function e(){}return function(t){if(!za(t))return{};if(Lt)return Lt(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function dr(){}function vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function mr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=H,this.__views__=[]}function gr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Rr(e,t,n,r,l,o){var a,u=t&f,s=t&p,c=t&d;if(n&&(a=l?n(e,r,l,o):n(e)),a!==i)return a;if(!za(e))return e;var h=ma(e);if(h){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&st.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return ti(e,a)}else{var v=ji(e),m=v==K||v==X;if(wa(e))return Xl(e,u);if(v==$||v==F||m&&!l){if(a=s||m?{}:Bi(e),!u)return s?function(e,t){return ni(e,Di(e),t)}(e,function(e,t){return e&&ni(t,lu(t),e)}(a,e)):function(e,t){return ni(e,Ni(e),t)}(e,Pr(a,e))}else{if(!Tt[v])return l?e:{};a=function(e,t,n){var r,l=e.constructor;switch(t){case ue:return Zl(e);case G:case W:return new l(+e);case se:return function(e,t){var n=t?Zl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case ce:case he:case fe:case pe:case de:case ve:case me:case ge:case ye:return Jl(e,n);case Z:return new l;case J:case re:return new l(e);case te:return function(e){var t=new e.constructor(e.source,Ue.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ne:return new l;case le:return r=e,cr?et(cr.call(r)):{}}}(e,v,u)}}o||(o=new _r);var g=o.get(e);if(g)return g;o.set(e,a),Aa(e)?e.forEach(function(r){a.add(Rr(r,t,n,r,e,o))}):Ea(e)&&e.forEach(function(r,l){a.set(l,Rr(r,t,n,l,e,o))});var y=h?i:(c?s?Pi:Oi:s?lu:ru)(e);return Yt(y||e,function(r,l){y&&(r=e[l=r]),Tr(a,l,Rr(r,t,n,l,e,o))}),a}function Ir(e,t,n){var r=n.length;if(null==e)return!r;for(e=et(e);r--;){var l=n[r],o=t[l],a=e[l];if(a===i&&!(l in e)||!o(a))return!1}return!0}function Vr(e,t,n){if("function"!=typeof e)throw new rt(u);return no(function(){e.apply(i,n)},t)}function Hr(e,t,n,r){var l=-1,i=Jt,a=!0,u=e.length,s=[],c=t.length;if(!u)return s;n&&(t=$t(t,gn(n))),r?(i=Qt,a=!1):t.length>=o&&(i=bn,a=!1,t=new wr(t));e:for(;++l-1},yr.prototype.set=function(e,t){var n=this.__data__,r=Er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},br.prototype.clear=function(){this.size=0,this.__data__={hash:new gr,map:new(Jn||yr),string:new gr}},br.prototype.delete=function(e){var t=Ii(this,e).delete(e);return this.size-=t?1:0,t},br.prototype.get=function(e){return Ii(this,e).get(e)},br.prototype.has=function(e){return Ii(this,e).has(e)},br.prototype.set=function(e,t){var n=Ii(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(e){return this.__data__.set(e,s),this},wr.prototype.has=function(e){return this.__data__.has(e)},_r.prototype.clear=function(){this.__data__=new yr,this.size=0},_r.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_r.prototype.get=function(e){return this.__data__.get(e)},_r.prototype.has=function(e){return this.__data__.has(e)},_r.prototype.set=function(e,t){var n=this.__data__;if(n instanceof yr){var r=n.__data__;if(!Jn||r.length0&&n(a)?t>1?Ur(a,t-1,n,r,l):en(l,a):r||(l[l.length]=a)}return l}var Gr=oi(),Wr=oi(!0);function qr(e,t){return e&&Gr(e,t,ru)}function Yr(e,t){return e&&Wr(e,t,ru)}function Kr(e,t){return Zt(t,function(t){return Ma(e[t])})}function Xr(e,t){for(var n=0,r=(t=Wl(t,e)).length;null!=e&&nt}function $r(e,t){return null!=e&&st.call(e,t)}function el(e,t){return null!=e&&t in et(e)}function tl(e,t,r){for(var l=r?Qt:Jt,o=e[0].length,a=e.length,u=a,s=n(a),c=1/0,h=[];u--;){var f=e[u];u&&t&&(f=$t(f,gn(t))),c=Wn(f.length,c),s[u]=!r&&(t||o>=120&&f.length>=120)?new wr(u&&f):i}f=e[0];var p=-1,d=s[0];e:for(;++p=a)return u;var s=n[r];return u*("desc"==s?-1:1)}}return e.index-t.index}(e,t,n)})}function gl(e,t,n){for(var r=-1,l=t.length,i={};++r-1;)a!==e&&Rt.call(a,u,1),Rt.call(e,u,1);return e}function bl(e,t){for(var n=e?t.length:0,r=n-1;n--;){var l=t[n];if(n==r||l!==i){var i=l;Gi(l)?Rt.call(e,l,1):Hl(e,l)}}return e}function wl(e,t){return e+Nn(Kn()*(t-e+1))}function _l(e,t){var n="";if(!e||t<1||t>R)return n;do{t%2&&(n+=e),(t=Nn(t/2))&&(e+=e)}while(t);return n}function xl(e,t){return ro(Qi(e,t,Ou),e+"")}function Ml(e){return Mr(fu(e))}function Sl(e,t){var n=fu(e);return oo(n,kr(t,0,n.length))}function Cl(e,t,n,r){if(!za(e))return e;for(var l=-1,o=(t=Wl(t,e)).length,a=o-1,u=e;null!=u&&++li?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=n(i);++l>>1,o=e[i];null!==o&&!Ra(o)&&(n?o<=t:o=o){var c=t?null:_i(e);if(c)return On(c);a=!1,l=bn,s=new wr}else s=t?[]:u;e:for(;++r=r?e:Ol(e,t,n)}var Kl=pn||function(e){return kt.clearTimeout(e)};function Xl(e,t){if(t)return e.slice();var n=e.length,r=xt?xt(n):new e.constructor(n);return e.copy(r),r}function Zl(e){var t=new e.constructor(e.byteLength);return new wt(t).set(new wt(e)),t}function Jl(e,t){var n=t?Zl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ql(e,t){if(e!==t){var n=e!==i,r=null===e,l=e===e,o=Ra(e),a=t!==i,u=null===t,s=t===t,c=Ra(t);if(!u&&!c&&!o&&e>t||o&&a&&s&&!u&&!c||r&&a&&s||!n&&s||!l)return 1;if(!r&&!o&&!c&&e1?n[l-1]:i,a=l>2?n[2]:i;for(o=e.length>3&&"function"==typeof o?(l--,o):i,a&&Wi(n[0],n[1],a)&&(o=l<3?i:o,l=1),t=et(t);++r-1?l[o?t[a]:a]:i}}function hi(e){return Ei(function(t){var n=t.length,r=n,l=vr.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new rt(u);if(l&&!a&&"wrapper"==Ai(o))var a=new vr([],!0)}for(r=a?r:n;++r1&&w.reverse(),f&&cu))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var h=-1,f=!0,p=n&m?new wr:i;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(He,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Yt(j,function(n){var r="_."+n[0];t&n[1]&&!Jt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(Ne);return t?t[1].split(De):[]}(r),n)))}function io(e){var t=0,n=0;return function(){var r=qn(),l=P-(r-n);if(n=r,l>0){if(++t>=O)return arguments[0]}else t=0;return e.apply(i,arguments)}}function oo(e,t){var n=-1,r=e.length,l=r-1;for(t=t===i?r:t;++n1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,Lo(e,n)});function No(e){var t=fr(e);return t.__chain__=!0,t}function Do(e,t){return t(e)}var jo=Ei(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,l=function(t){return Ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof mr&&Gi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:Do,args:[l],thisArg:i}),new vr(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(l)});var Fo=ri(function(e,t,n){st.call(e,n)?++e[n]:Lr(e,n,1)});var Bo=ci(vo),Uo=ci(mo);function Go(e,t){return(ma(e)?Yt:Nr)(e,Ri(t,3))}function Wo(e,t){return(ma(e)?Kt:Dr)(e,Ri(t,3))}var qo=ri(function(e,t,n){st.call(e,n)?e[n].push(t):Lr(e,n,[t])});var Yo=xl(function(e,t,r){var l=-1,i="function"==typeof t,o=ya(e)?n(e.length):[];return Nr(e,function(e){o[++l]=i?Wt(t,e,r):nl(e,t,r)}),o}),Ko=ri(function(e,t,n){Lr(e,n,t)});function Xo(e,t){return(ma(e)?$t:hl)(e,Ri(t,3))}var Zo=ri(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Jo=xl(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Wi(e,t[0],t[1])?t=[]:n>2&&Wi(t[0],t[1],t[2])&&(t=[t[0]]),ml(e,Ur(t,1),[])}),Qo=In||function(){return kt.Date.now()};function $o(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Mi(e,S,i,i,i,i,t)}function ea(e,t){var n;if("function"!=typeof t)throw new rt(u);return e=ja(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var ta=xl(function(e,t,n){var r=g;if(n.length){var l=En(n,ki(ta));r|=x}return Mi(e,r,t,n,l)}),na=xl(function(e,t,n){var r=g|y;if(n.length){var l=En(n,ki(na));r|=x}return Mi(t,r,e,n,l)});function ra(e,t,n){var r,l,o,a,s,c,h=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new rt(u);function v(t){var n=r,o=l;return r=l=i,h=t,a=e.apply(o,n)}function m(e){var n=e-c;return c===i||n>=t||n<0||p&&e-h>=o}function g(){var e=Qo();if(m(e))return y(e);s=no(g,function(e){var n=t-(e-c);return p?Wn(n,o-(e-h)):n}(e))}function y(e){return s=i,d&&r?v(e):(r=l=i,a)}function b(){var e=Qo(),n=m(e);if(r=arguments,l=this,c=e,n){if(s===i)return function(e){return h=e,s=no(g,t),f?v(e):a}(c);if(p)return Kl(s),s=no(g,t),v(c)}return s===i&&(s=no(g,t)),a}return t=Ba(t)||0,za(n)&&(f=!!n.leading,o=(p="maxWait"in n)?Gn(Ba(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),b.cancel=function(){s!==i&&Kl(s),h=0,r=c=l=s=i},b.flush=function(){return s===i?a:y(Qo())},b}var la=xl(function(e,t){return Vr(e,1,t)}),ia=xl(function(e,t,n){return Vr(e,Ba(t)||0,n)});function oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new rt(u);var n=function n(){var r=arguments,l=t?t.apply(this,r):r[0],i=n.cache;if(i.has(l))return i.get(l);var o=e.apply(this,r);return n.cache=i.set(l,o)||i,o};return n.cache=new(oa.Cache||br),n}function aa(e){if("function"!=typeof e)throw new rt(u);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}oa.Cache=br;var ua=ql(function(e,t){var n=(t=1==t.length&&ma(t[0])?$t(t[0],gn(Ri())):$t(Ur(t,1),gn(Ri()))).length;return xl(function(r){for(var l=-1,i=Wn(r.length,n);++l=t}),va=rl(function(){return arguments}())?rl:function(e){return Ta(e)&&st.call(e,"callee")&&!At.call(e,"callee")},ma=n.isArray,ga=Dt?gn(Dt):function(e){return Ta(e)&&Jr(e)==ue};function ya(e){return null!=e&&Ca(e.length)&&!Ma(e)}function ba(e){return Ta(e)&&ya(e)}var wa=jn||Bu,_a=jt?gn(jt):function(e){return Ta(e)&&Jr(e)==W};function xa(e){if(!Ta(e))return!1;var t=Jr(e);return t==Y||t==q||"string"==typeof e.message&&"string"==typeof e.name&&!Pa(e)}function Ma(e){if(!za(e))return!1;var t=Jr(e);return t==K||t==X||t==U||t==ee}function Sa(e){return"number"==typeof e&&e==ja(e)}function Ca(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=R}function za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ta(e){return null!=e&&"object"==typeof e}var Ea=Ft?gn(Ft):function(e){return Ta(e)&&ji(e)==Z};function Oa(e){return"number"==typeof e||Ta(e)&&Jr(e)==J}function Pa(e){if(!Ta(e)||Jr(e)!=$)return!1;var t=Et(e);if(null===t)return!0;var n=st.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ut.call(n)==pt}var La=Bt?gn(Bt):function(e){return Ta(e)&&Jr(e)==te};var Aa=Ut?gn(Ut):function(e){return Ta(e)&&ji(e)==ne};function ka(e){return"string"==typeof e||!ma(e)&&Ta(e)&&Jr(e)==re}function Ra(e){return"symbol"==typeof e||Ta(e)&&Jr(e)==le}var Ia=Gt?gn(Gt):function(e){return Ta(e)&&Ca(e.length)&&!!zt[Jr(e)]};var Va=yi(cl),Ha=yi(function(e,t){return e<=t});function Na(e){if(!e)return[];if(ya(e))return ka(e)?An(e):ti(e);if(Ht&&e[Ht])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ht]());var t=ji(e);return(t==Z?zn:t==ne?On:fu)(e)}function Da(e){return e?(e=Ba(e))===k||e===-k?(e<0?-1:1)*I:e===e?e:0:0===e?e:0}function ja(e){var t=Da(e),n=t%1;return t===t?n?t-n:t:0}function Fa(e){return e?kr(ja(e),0,H):0}function Ba(e){if("number"==typeof e)return e;if(Ra(e))return V;if(za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Re,"");var n=We.test(e);return n||Ye.test(e)?Pt(e.slice(2),n?2:8):Ge.test(e)?V:+e}function Ua(e){return ni(e,lu(e))}function Ga(e){return null==e?"":Il(e)}var Wa=li(function(e,t){if(Xi(t)||ya(t))ni(t,ru(t),e);else for(var n in t)st.call(t,n)&&Tr(e,n,t[n])}),qa=li(function(e,t){ni(t,lu(t),e)}),Ya=li(function(e,t,n,r){ni(t,lu(t),e,r)}),Ka=li(function(e,t,n,r){ni(t,ru(t),e,r)}),Xa=Ei(Ar);var Za=xl(function(e,t){e=et(e);var n=-1,r=t.length,l=r>2?t[2]:i;for(l&&Wi(t[0],t[1],l)&&(r=1);++n1),t}),ni(e,Pi(e),n),r&&(n=Rr(n,f|p|d,zi));for(var l=t.length;l--;)Hl(n,t[l]);return n});var uu=Ei(function(e,t){return null==e?{}:function(e,t){return gl(e,t,function(t,n){return $a(e,n)})}(e,t)});function su(e,t){if(null==e)return{};var n=$t(Pi(e),function(e){return[e]});return t=Ri(t),gl(e,n,function(e,n){return t(e,n[0])})}var cu=xi(ru),hu=xi(lu);function fu(e){return null==e?[]:yn(e,ru(e))}var pu=ui(function(e,t,n){return t=t.toLowerCase(),e+(n?du(t):t)});function du(e){return xu(Ga(e).toLowerCase())}function vu(e){return(e=Ga(e))&&e.replace(Xe,xn).replace(bt,"")}var mu=ui(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),gu=ui(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),yu=ai("toLowerCase");var bu=ui(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var wu=ui(function(e,t,n){return e+(n?" ":"")+xu(t)});var _u=ui(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),xu=ai("toUpperCase");function Mu(e,t,n){return e=Ga(e),(t=n?i:t)===i?function(e){return Mt.test(e)}(e)?function(e){return e.match(_t)||[]}(e):function(e){return e.match(je)||[]}(e):e.match(t)||[]}var Su=xl(function(e,t){try{return Wt(e,i,t)}catch(n){return xa(n)?n:new l(n)}}),Cu=Ei(function(e,t){return Yt(t,function(t){t=uo(t),Lr(e,t,ta(e[t],e))}),e});function zu(e){return function(){return e}}var Tu=hi(),Eu=hi(!0);function Ou(e){return e}function Pu(e){return al("function"==typeof e?e:Rr(e,f))}var Lu=xl(function(e,t){return function(n){return nl(n,e,t)}}),Au=xl(function(e,t){return function(n){return nl(e,n,t)}});function ku(e,t,n){var r=ru(t),l=Kr(t,r);null!=n||za(t)&&(l.length||!r.length)||(n=t,t=e,e=this,l=Kr(t,ru(t)));var i=!(za(n)&&"chain"in n)||!!n.chain,o=Ma(e);return Yt(l,function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=ti(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,en([this.value()],arguments))})}),e}function Ru(){}var Iu=vi($t),Vu=vi(Xt),Hu=vi(rn);function Nu(e){return qi(e)?fn(uo(e)):function(e){return function(t){return Xr(t,e)}}(e)}var Du=gi(),ju=gi(!0);function Fu(){return[]}function Bu(){return!1}var Uu=di(function(e,t){return e+t},0),Gu=wi("ceil"),Wu=di(function(e,t){return e/t},1),qu=wi("floor");var Yu=di(function(e,t){return e*t},1),Ku=wi("round"),Xu=di(function(e,t){return e-t},0);return fr.after=function(e,t){if("function"!=typeof t)throw new rt(u);return e=ja(e),function(){if(--e<1)return t.apply(this,arguments)}},fr.ary=$o,fr.assign=Wa,fr.assignIn=qa,fr.assignInWith=Ya,fr.assignWith=Ka,fr.at=Xa,fr.before=ea,fr.bind=ta,fr.bindAll=Cu,fr.bindKey=na,fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ma(e)?e:[e]},fr.chain=No,fr.chunk=function(e,t,r){t=(r?Wi(e,t,r):t===i)?1:Gn(ja(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var o=0,a=0,u=n(Hn(l/t));ol?0:l+n),(r=r===i||r>l?l:ja(r))<0&&(r+=l),r=n>r?0:Fa(r);n>>0)?(e=Ga(e))&&("string"==typeof t||null!=t&&!La(t))&&!(t=Il(t))&&Cn(e)?Yl(An(e),0,n):e.split(t,n):[]},fr.spread=function(e,t){if("function"!=typeof e)throw new rt(u);return t=null==t?0:Gn(ja(t),0),xl(function(n){var r=n[t],l=Yl(n,0,t);return r&&en(l,r),Wt(e,this,l)})},fr.tail=function(e){var t=null==e?0:e.length;return t?Ol(e,1,t):[]},fr.take=function(e,t,n){return e&&e.length?Ol(e,0,(t=n||t===i?1:ja(t))<0?0:t):[]},fr.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Ol(e,(t=r-(t=n||t===i?1:ja(t)))<0?0:t,r):[]},fr.takeRightWhile=function(e,t){return e&&e.length?Dl(e,Ri(t,3),!1,!0):[]},fr.takeWhile=function(e,t){return e&&e.length?Dl(e,Ri(t,3)):[]},fr.tap=function(e,t){return t(e),e},fr.throttle=function(e,t,n){var r=!0,l=!0;if("function"!=typeof e)throw new rt(u);return za(n)&&(r="leading"in n?!!n.leading:r,l="trailing"in n?!!n.trailing:l),ra(e,t,{leading:r,maxWait:t,trailing:l})},fr.thru=Do,fr.toArray=Na,fr.toPairs=cu,fr.toPairsIn=hu,fr.toPath=function(e){return ma(e)?$t(e,uo):Ra(e)?[e]:ti(ao(Ga(e)))},fr.toPlainObject=Ua,fr.transform=function(e,t,n){var r=ma(e),l=r||wa(e)||Ia(e);if(t=Ri(t,4),null==n){var i=e&&e.constructor;n=l?r?new i:[]:za(e)&&Ma(i)?pr(Et(e)):{}}return(l?Yt:qr)(e,function(e,r,l){return t(n,e,r,l)}),n},fr.unary=function(e){return $o(e,1)},fr.union=To,fr.unionBy=Eo,fr.unionWith=Oo,fr.uniq=function(e){return e&&e.length?Vl(e):[]},fr.uniqBy=function(e,t){return e&&e.length?Vl(e,Ri(t,2)):[]},fr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?Vl(e,i,t):[]},fr.unset=function(e,t){return null==e||Hl(e,t)},fr.unzip=Po,fr.unzipWith=Lo,fr.update=function(e,t,n){return null==e?e:Nl(e,t,Gl(n))},fr.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Nl(e,t,Gl(n),r)},fr.values=fu,fr.valuesIn=function(e){return null==e?[]:yn(e,lu(e))},fr.without=Ao,fr.words=Mu,fr.wrap=function(e,t){return sa(Gl(t),e)},fr.xor=ko,fr.xorBy=Ro,fr.xorWith=Io,fr.zip=Vo,fr.zipObject=function(e,t){return Bl(e||[],t||[],Tr)},fr.zipObjectDeep=function(e,t){return Bl(e||[],t||[],Cl)},fr.zipWith=Ho,fr.entries=cu,fr.entriesIn=hu,fr.extend=qa,fr.extendWith=Ya,ku(fr,fr),fr.add=Uu,fr.attempt=Su,fr.camelCase=pu,fr.capitalize=du,fr.ceil=Gu,fr.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=Ba(n))===n?n:0),t!==i&&(t=(t=Ba(t))===t?t:0),kr(Ba(e),t,n)},fr.clone=function(e){return Rr(e,d)},fr.cloneDeep=function(e){return Rr(e,f|d)},fr.cloneDeepWith=function(e,t){return Rr(e,f|d,t="function"==typeof t?t:i)},fr.cloneWith=function(e,t){return Rr(e,d,t="function"==typeof t?t:i)},fr.conformsTo=function(e,t){return null==t||Ir(e,t,ru(t))},fr.deburr=vu,fr.defaultTo=function(e,t){return null==e||e!==e?t:e},fr.divide=Wu,fr.endsWith=function(e,t,n){e=Ga(e),t=Il(t);var r=e.length,l=n=n===i?r:kr(ja(n),0,r);return(n-=t.length)>=0&&e.slice(n,l)==t},fr.eq=fa,fr.escape=function(e){return(e=Ga(e))&&Ce.test(e)?e.replace(Me,Mn):e},fr.escapeRegExp=function(e){return(e=Ga(e))&&ke.test(e)?e.replace(Ae,"\\$&"):e},fr.every=function(e,t,n){var r=ma(e)?Xt:jr;return n&&Wi(e,t,n)&&(t=i),r(e,Ri(t,3))},fr.find=Bo,fr.findIndex=vo,fr.findKey=function(e,t){return on(e,Ri(t,3),qr)},fr.findLast=Uo,fr.findLastIndex=mo,fr.findLastKey=function(e,t){return on(e,Ri(t,3),Yr)},fr.floor=qu,fr.forEach=Go,fr.forEachRight=Wo,fr.forIn=function(e,t){return null==e?e:Gr(e,Ri(t,3),lu)},fr.forInRight=function(e,t){return null==e?e:Wr(e,Ri(t,3),lu)},fr.forOwn=function(e,t){return e&&qr(e,Ri(t,3))},fr.forOwnRight=function(e,t){return e&&Yr(e,Ri(t,3))},fr.get=Qa,fr.gt=pa,fr.gte=da,fr.has=function(e,t){return null!=e&&Fi(e,t,$r)},fr.hasIn=$a,fr.head=yo,fr.identity=Ou,fr.includes=function(e,t,n,r){e=ya(e)?e:fu(e),n=n&&!r?ja(n):0;var l=e.length;return n<0&&(n=Gn(l+n,0)),ka(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&un(e,t,n)>-1},fr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var l=null==n?0:ja(n);return l<0&&(l=Gn(r+l,0)),un(e,t,l)},fr.inRange=function(e,t,n){return t=Da(t),n===i?(n=t,t=0):n=Da(n),function(e,t,n){return e>=Wn(t,n)&&e=-R&&e<=R},fr.isSet=Aa,fr.isString=ka,fr.isSymbol=Ra,fr.isTypedArray=Ia,fr.isUndefined=function(e){return e===i},fr.isWeakMap=function(e){return Ta(e)&&ji(e)==oe},fr.isWeakSet=function(e){return Ta(e)&&Jr(e)==ae},fr.join=function(e,t){return null==e?"":Bn.call(e,t)},fr.kebabCase=mu,fr.last=xo,fr.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var l=r;return n!==i&&(l=(l=ja(n))<0?Gn(r+l,0):Wn(l,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,l):an(e,cn,l,!0)},fr.lowerCase=gu,fr.lowerFirst=yu,fr.lt=Va,fr.lte=Ha,fr.max=function(e){return e&&e.length?Fr(e,Ou,Qr):i},fr.maxBy=function(e,t){return e&&e.length?Fr(e,Ri(t,2),Qr):i},fr.mean=function(e){return hn(e,Ou)},fr.meanBy=function(e,t){return hn(e,Ri(t,2))},fr.min=function(e){return e&&e.length?Fr(e,Ou,cl):i},fr.minBy=function(e,t){return e&&e.length?Fr(e,Ri(t,2),cl):i},fr.stubArray=Fu,fr.stubFalse=Bu,fr.stubObject=function(){return{}},fr.stubString=function(){return""},fr.stubTrue=function(){return!0},fr.multiply=Yu,fr.nth=function(e,t){return e&&e.length?vl(e,ja(t)):i},fr.noConflict=function(){return kt._===this&&(kt._=dt),this},fr.noop=Ru,fr.now=Qo,fr.pad=function(e,t,n){e=Ga(e);var r=(t=ja(t))?Ln(e):0;if(!t||r>=t)return e;var l=(t-r)/2;return mi(Nn(l),n)+e+mi(Hn(l),n)},fr.padEnd=function(e,t,n){e=Ga(e);var r=(t=ja(t))?Ln(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var l=Kn();return Wn(e+l*(t-e+Ot("1e-"+((l+"").length-1))),t)}return wl(e,t)},fr.reduce=function(e,t,n){var r=ma(e)?tn:dn,l=arguments.length<3;return r(e,Ri(t,4),n,l,Nr)},fr.reduceRight=function(e,t,n){var r=ma(e)?nn:dn,l=arguments.length<3;return r(e,Ri(t,4),n,l,Dr)},fr.repeat=function(e,t,n){return t=(n?Wi(e,t,n):t===i)?1:ja(t),_l(Ga(e),t)},fr.replace=function(){var e=arguments,t=Ga(e[0]);return e.length<3?t:t.replace(e[1],e[2])},fr.result=function(e,t,n){var r=-1,l=(t=Wl(t,e)).length;for(l||(l=1,e=i);++rR)return[];var n=H,r=Wn(e,H);t=Ri(t),e-=H;for(var l=mn(r,t);++n=o)return e;var u=n-Ln(r);if(u<1)return r;var s=a?Yl(a,0,u).join(""):e.slice(0,u);if(l===i)return s+r;if(a&&(u+=s.length-u),La(l)){if(e.slice(u).search(l)){var c,h=s;for(l.global||(l=tt(l.source,Ga(Ue.exec(l))+"g")),l.lastIndex=0;c=l.exec(h);)var f=c.index;s=s.slice(0,f===i?u:f)}}else if(e.indexOf(Il(l),u)!=u){var p=s.lastIndexOf(l);p>-1&&(s=s.slice(0,p))}return s+r},fr.unescape=function(e){return(e=Ga(e))&&Se.test(e)?e.replace(xe,kn):e},fr.uniqueId=function(e){var t=++ct;return Ga(e)+t},fr.upperCase=_u,fr.upperFirst=xu,fr.each=Go,fr.eachRight=Wo,fr.first=yo,ku(fr,function(){var e={};return qr(fr,function(t,n){st.call(fr.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),fr.VERSION="4.17.14",Yt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){fr[e].placeholder=fr}),Yt(["drop","take"],function(e,t){mr.prototype[e]=function(n){n=n===i?1:Gn(ja(n),0);var r=this.__filtered__&&!t?new mr(this):this.clone();return r.__filtered__?r.__takeCount__=Wn(n,r.__takeCount__):r.__views__.push({size:Wn(n,H),type:e+(r.__dir__<0?"Right":"")}),r},mr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Yt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==L||3==n;mr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ri(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Yt(["head","last"],function(e,t){var n="take"+(t?"Right":"");mr.prototype[e]=function(){return this[n](1).value()[0]}}),Yt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");mr.prototype[e]=function(){return this.__filtered__?new mr(this):this[n](1)}}),mr.prototype.compact=function(){return this.filter(Ou)},mr.prototype.find=function(e){return this.filter(e).head()},mr.prototype.findLast=function(e){return this.reverse().find(e)},mr.prototype.invokeMap=xl(function(e,t){return"function"==typeof e?new mr(this):this.map(function(n){return nl(n,e,t)})}),mr.prototype.reject=function(e){return this.filter(aa(Ri(e)))},mr.prototype.slice=function(e,t){e=ja(e);var n=this;return n.__filtered__&&(e>0||t<0)?new mr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ja(t))<0?n.dropRight(-t):n.take(t-e)),n)},mr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},mr.prototype.toArray=function(){return this.take(H)},qr(mr.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),l=fr[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);l&&(fr.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,u=t instanceof mr,s=a[0],c=u||ma(t),h=function(e){var t=l.apply(fr,en([e],a));return r&&f?t[0]:t};c&&n&&"function"==typeof s&&1!=s.length&&(u=c=!1);var f=this.__chain__,p=!!this.__actions__.length,d=o&&!f,v=u&&!p;if(!o&&c){t=v?t:new mr(this);var m=e.apply(t,a);return m.__actions__.push({func:Do,args:[h],thisArg:i}),new vr(m,f)}return d&&v?e.apply(this,a):(m=this.thru(h),d?r?m.value()[0]:m.value():m)})}),Yt(["pop","push","shift","sort","splice","unshift"],function(e){var t=lt[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);fr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var l=this.value();return t.apply(ma(l)?l:[],e)}return this[n](function(n){return t.apply(ma(n)?n:[],e)})}}),qr(mr.prototype,function(e,t){var n=fr[t];if(n){var r=n.name+"";st.call(rr,r)||(rr[r]=[]),rr[r].push({name:t,func:n})}}),rr[fi(i,y).name]=[{name:"wrapper",func:i}],mr.prototype.clone=function(){var e=new mr(this.__wrapped__);return e.__actions__=ti(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ti(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ti(this.__views__),e},mr.prototype.reverse=function(){if(this.__filtered__){var e=new mr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},mr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=ma(e),r=t<0,l=n?e.length:0,i=function(e,t,n){for(var r=-1,l=n.length;++r=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},fr.prototype.plant=function(e){for(var t,n=this;n instanceof dr;){var r=co(n);r.__index__=0,r.__values__=i,t?l.__wrapped__=r:t=r;var l=r;n=n.__wrapped__}return l.__wrapped__=e,t},fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof mr){var t=e;return this.__actions__.length&&(t=new mr(this)),(t=t.reverse()).__actions__.push({func:Do,args:[zo],thisArg:i}),new vr(t,this.__chain__)}return this.thru(zo)},fr.prototype.toJSON=fr.prototype.valueOf=fr.prototype.value=function(){return jl(this.__wrapped__,this.__actions__)},fr.prototype.first=fr.prototype.head,Ht&&(fr.prototype[Ht]=function(){return this}),fr}();kt._=Rn,(l=function(){return Rn}.call(t,n,t,r))===i||(r.exports=l)}).call(this)}).call(this,n(60),n(113)(e))},function(e,t,n){"use strict";n.d(t,"b",function(){return u});var r=n(69),l=n.n(r),i=n(56),o=n(108),a=n.n(o),u=0!==i.a.endEvents.length,s=["Webkit","Moz","O","ms"],c=["-webkit-","-moz-","-o-","ms-",""];function h(e,t){for(var n=window.getComputedStyle(e,null),r="",l=0;l0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e));return r.createElement(A.Provider,{value:{siderHook:this.getSiderHook()}},r.createElement(c,M({className:f},h),a))}}]),t}(),V=k({suffixCls:"layout",tagName:"section"})(I),H=k({suffixCls:"layout-header",tagName:"header"})(R),N=k({suffixCls:"layout-footer",tagName:"footer"})(R),D=k({suffixCls:"layout-content",tagName:"main"})(R);V.Header=H,V.Footer=N,V.Content=D;var j=n(24),F=n(15),B=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};function U(e){return(U="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})(e)}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(){return(W=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return e+=1,"".concat(t).concat(e)}}(),re=function(e){function t(e){var n,l,i;return q(this,t),(n=X(this,Z(t).call(this,e))).responsiveHandler=function(e){n.setState({below:e.matches});var t=n.props.onBreakpoint;t&&t(e.matches),n.state.collapsed!==e.matches&&n.setCollapsed(e.matches,"responsive")},n.setCollapsed=function(e,t){"collapsed"in n.props||n.setState({collapsed:e});var r=n.props.onCollapse;r&&r(e,t)},n.toggle=function(){var e=!n.state.collapsed;n.setCollapsed(e,"clickTrigger")},n.belowShowChange=function(){n.setState({belowShow:!n.state.belowShow})},n.renderSider=function(e){var t,l=e.getPrefixCls,i=n.props,o=i.prefixCls,a=i.className,c=i.theme,h=i.collapsible,f=i.reverseArrow,p=i.trigger,d=i.style,v=i.width,m=i.collapsedWidth,g=$(i,["prefixCls","className","theme","collapsible","reverseArrow","trigger","style","width","collapsedWidth"]),y=l("layout-sider",o),b=Object(s.a)(g,["collapsed","defaultCollapsed","onCollapse","breakpoint","onBreakpoint","siderHook"]),w=n.state.collapsed?m:v,_=B(w)?"".concat(w,"px"):String(w),x=0===parseFloat(String(m||0))?r.createElement("span",{onClick:n.toggle,className:"".concat(y,"-zero-width-trigger ").concat(y,"-zero-width-trigger-").concat(f?"right":"left")},r.createElement(F.a,{type:"bars"})):null,M={expanded:f?r.createElement(F.a,{type:"right"}):r.createElement(F.a,{type:"left"}),collapsed:f?r.createElement(F.a,{type:"left"}):r.createElement(F.a,{type:"right"})}[n.state.collapsed?"collapsed":"expanded"],S=null!==p?x||r.createElement("div",{className:"".concat(y,"-trigger"),onClick:n.toggle,style:{width:_}},p||M):null,C=W({},d,{flex:"0 0 ".concat(_),maxWidth:_,minWidth:_,width:_}),z=u()(a,y,"".concat(y,"-").concat(c),(G(t={},"".concat(y,"-collapsed"),!!n.state.collapsed),G(t,"".concat(y,"-has-trigger"),h&&null!==p&&!x),G(t,"".concat(y,"-below"),!!n.state.below),G(t,"".concat(y,"-zero-width"),0===parseFloat(_)),t));return r.createElement("aside",W({className:z},b,{style:C}),r.createElement("div",{className:"".concat(y,"-children")},n.props.children),h||n.state.below&&x?S:null)},n.uniqueId=ne("ant-sider-"),"undefined"!==typeof window&&(l=window.matchMedia),l&&e.breakpoint&&e.breakpoint in ee&&(n.mql=l("(max-width: ".concat(ee[e.breakpoint],")"))),i="collapsed"in e?e.collapsed:e.defaultCollapsed,n.state={collapsed:i,below:!1},n}return J(t,r["Component"]),K(t,[{key:"componentDidMount",value:function(){this.mql&&(this.mql.addListener(this.responsiveHandler),this.responsiveHandler(this.mql)),this.props.siderHook&&this.props.siderHook.addSider(this.uniqueId)}},{key:"componentWillUnmount",value:function(){this.mql&&this.mql.removeListener(this.responsiveHandler),this.props.siderHook&&this.props.siderHook.removeSider(this.uniqueId)}},{key:"render",value:function(){var e=this.state.collapsed,t=this.props.collapsedWidth;return r.createElement(te.Provider,{value:{siderCollapsed:e,collapsedWidth:t}},r.createElement(w.a,null,this.renderSider))}}],[{key:"getDerivedStateFromProps",value:function(e){return"collapsed"in e?{collapsed:e.collapsed}:null}}]),t}();re.defaultProps={collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80,style:{},theme:"dark"},Object(j.polyfill)(re);function le(e){return(le="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})(e)}function ie(){return(ie=Object.assign||function(e){for(var t=1;t=0;(t||i)&&n.restoreModeVerticalFromInline()},n.handleClick=function(e){n.handleOpenChange([]);var t=n.props.onClick;t&&t(e)},n.handleOpenChange=function(e){n.setOpenKeys(e);var t=n.props.onOpenChange;t&&t(e)},n.renderMenu=function(e){var t,i,o,a=e.getPopupContainer,c=e.getPrefixCls,h=n.state.mounted,f=n.props,p=f.prefixCls,d=f.className,v=f.theme,m=f.collapsedWidth,g=Object(s.a)(n.props,["collapsedWidth","siderCollapsed"]),y=n.getRealMenuMode(),b=n.getMenuOpenAnimation(y),w=c("menu",p),_=u()(d,"".concat(w,"-").concat(v),(t={},i="".concat(w,"-inline-collapsed"),o=n.getInlineCollapsed(),i in t?Object.defineProperty(t,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[i]=o,t)),x={openKeys:n.state.openKeys,onOpenChange:n.handleOpenChange,className:_,mode:y};return"inline"!==y?(x.onClick=n.handleClick,x.openTransitionName=h?b:""):x.openAnimation=h?b:{},!n.getInlineCollapsed()||0!==m&&"0"!==m&&"0px"!==m?r.createElement(l.e,we({getPopupContainer:a},g,x,{prefixCls:w,onTransitionEnd:n.handleTransitionEnd,onMouseEnter:n.handleMouseEnter})):null},Object(ge.a)(!("onOpen"in e||"onClose"in e),"Menu","`onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),Object(ge.a)(!("inlineCollapsed"in e&&"inline"!==e.mode),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),Object(ge.a)(!(void 0!==e.siderCollapsed&&"inlineCollapsed"in e),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead."),"openKeys"in e?i=e.openKeys:"defaultOpenKeys"in e&&(i=e.defaultOpenKeys),n.state={openKeys:i||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:e,mounted:!1},n}return ze(t,r["Component"]),Me(t,[{key:"componentDidMount",value:function(){var e=this;this.mountRafId=Object(ye.a)(function(){e.setState({mounted:!0})},10)}},{key:"componentWillUnmount",value:function(){ye.a.cancel(this.mountRafId)}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"setOpenKeys",value:function(e){"openKeys"in this.props||this.setState({openKeys:e})}},{key:"getRealMenuMode",value:function(){var e=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&e)return"inline";var t=this.props.mode;return e?"vertical":t}},{key:"getInlineCollapsed",value:function(){var e=this.props.inlineCollapsed;return void 0!==this.props.siderCollapsed?this.props.siderCollapsed:e}},{key:"getMenuOpenAnimation",value:function(e){var t=this.props,n=t.openAnimation,r=t.openTransitionName,l=n||r;return void 0===n&&void 0===r&&("horizontal"===e?l="slide-up":"inline"===e?l=me:this.state.switchingModeFromInline?(l="",this.setState({switchingModeFromInline:!1})):l="zoom-big"),l}},{key:"render",value:function(){return r.createElement(Ee.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1,antdMenuTheme:this.props.theme}},r.createElement(w.a,null,this.renderMenu))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(r.switchingModeFromInline=!0),"openKeys"in e?r.openKeys=e.openKeys:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(r.switchingModeFromInline=!0,r.inlineOpenKeys=t.openKeys,r.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(r.openKeys=t.inlineOpenKeys,r.inlineOpenKeys=[])),r}}]),t}();Oe.defaultProps={className:"",theme:"light",focusable:!1},Object(j.polyfill)(Oe);var Pe=function(e){function t(){return _e(this,t),Se(this,Ce(t).apply(this,arguments))}return ze(t,r["Component"]),Me(t,[{key:"render",value:function(){var e=this;return r.createElement(te.Consumer,null,function(t){return r.createElement(Oe,we({},e.props,t))})}}]),t}();Pe.Divider=l.a,Pe.Item=he,Pe.SubMenu=y,Pe.ItemGroup=l.c},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(l){return!1}}()?Object.assign:function(e,t){for(var n,o,a=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=e.head||e.getElementsByTagName("head")[0],l=e.createElement("style");l.id="detectElementResize",l.type="text/css",null!=t&&l.setAttribute("nonce",t),l.styleSheet?l.styleSheet.cssText=n:l.appendChild(e.createTextNode(n)),r.appendChild(l)}}(i),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=i.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='
',e.appendChild(e.__resizeTriggers__),o(e),e.addEventListener("scroll",a,!0),c&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==v&&o(e)},e.__resizeTriggers__.addEventListener(c,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(l)}},removeResizeListener:function(e,t){if(r)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",a,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(c,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}n.d(t,"a",function(){return r})}).call(this,n(60))},function(e,t,n){"use strict";n.d(t,"a",function(){return v});var r,l=n(0),i=n(13),o=n(56),a=n(93),u=n(18);function s(e){return(s="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})(e)}function c(e,t){for(var n=0;n=0)){var l=e.props.insertExtraNode;e.extraNode=document.createElement("div");var i=e.extraNode;i.className="ant-click-animating-node";var a=e.getAttributeName();t.setAttribute(a,"true"),r=r||document.createElement("style"),n&&"#ffffff"!==n&&"rgb(255, 255, 255)"!==n&&e.isNotGrey(n)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(n)&&"transparent"!==n&&(e.csp&&e.csp.nonce&&(r.nonce=e.csp.nonce),i.style.borderColor=n,r.innerHTML="html body { --antd-wave-shadow-color: ".concat(n,"; }"),document.body.contains(r)||document.body.appendChild(r)),l&&t.appendChild(i),o.a.addStartEventListener(t,e.onTransitionStart),o.a.addEndEventListener(t,e.onTransitionEnd)}},e.bindAnimationEvent=function(t){if(t&&t.getAttribute&&!t.getAttribute("disabled")&&!(t.className.indexOf("disabled")>=0)){var n=function(n){if("INPUT"!==n.target.tagName&&!d(n.target)){e.resetEffect(t);var r=getComputedStyle(t).getPropertyValue("border-top-color")||getComputedStyle(t).getPropertyValue("border-color")||getComputedStyle(t).getPropertyValue("background-color");e.clickWaveTimeoutId=window.setTimeout(function(){return e.onClick(t,r)},0),a.a.cancel(e.animationStartId),e.animationStart=!0,e.animationStartId=Object(a.a)(function(){e.animationStart=!1},10)}};return t.addEventListener("click",n,!0),{cancel:function(){t.removeEventListener("click",n,!0)}}}},e.onTransitionStart=function(t){if(!e.destroy){var n=Object(i.findDOMNode)(f(e));t&&t.target===n&&(e.animationStart||e.resetEffect(n))}},e.onTransitionEnd=function(t){t&&"fadeEffect"===t.animationName&&e.resetEffect(t.target)},e.renderWave=function(t){var n=t.csp,r=e.props.children;return e.csp=n,r},e}var n,v,m;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,l["Component"]),n=t,(v=[{key:"isNotGrey",value:function(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);return!(t&&t[1]&&t[2]&&t[3])||!(t[1]===t[2]&&t[2]===t[3])}},{key:"getAttributeName",value:function(){return this.props.insertExtraNode?"ant-click-animating":"ant-click-animating-without-extra-node"}},{key:"resetEffect",value:function(e){if(e&&e!==this.extraNode&&e instanceof Element){var t=this.props.insertExtraNode,n=this.getAttributeName();e.setAttribute(n,"false"),this.removeExtraStyleNode(),t&&this.extraNode&&e.contains(this.extraNode)&&e.removeChild(this.extraNode),o.a.removeStartEventListener(e,this.onTransitionStart),o.a.removeEndEventListener(e,this.onTransitionEnd)}}},{key:"removeExtraStyleNode",value:function(){r&&(r.innerHTML="")}},{key:"componentDidMount",value:function(){var e=Object(i.findDOMNode)(this);e&&1===e.nodeType&&(this.instance=this.bindAnimationEvent(e))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroy=!0}},{key:"render",value:function(){return l.createElement(u.a,null,this.renderWave)}}])&&c(n.prototype,v),m&&c(n,m),t}()},function(e,t,n){"use strict";var r=n(6),l=n.n(r),i=n(12),o=n.n(i),a=n(8),u=n.n(a),s=n(9),c=n.n(s),h=n(0),f=n.n(h),p=n(13),d=n.n(p),v=n(1),m=n.n(v),g=function(e){function t(){var e,n,r,i;l()(this,t);for(var o=arguments.length,a=Array(o),s=0;s=t||n<0||g&&e-v>=h}function _(){var e=l();if(w(e))return x(e);p=setTimeout(_,function(e){var n=t-(e-d);return g?u(n,h-(e-v)):n}(e))}function x(e){return p=void 0,y&&s?b(e):(s=c=void 0,f)}function M(){var e=l(),n=w(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return v=e,p=setTimeout(_,t),m?b(e):f}(d);if(g)return clearTimeout(p),p=setTimeout(_,t),b(d)}return void 0===p&&(p=setTimeout(_,t)),f}return t=i(t)||0,r(n)&&(m=!!n.leading,h=(g="maxWait"in n)?a(i(n.maxWait)||0,t):h,y="trailing"in n?!!n.trailing:y),M.cancel=function(){void 0!==p&&clearTimeout(p),v=0,s=d=c=p=void 0},M.flush=function(){return void 0===p?f:x(l())},M}},function(e,t,n){"use strict";var r=n(50),l=n.n(r)()({});t.a=l},function(e,t,n){"use strict";var r=n(0),l=n.n(r),i=n(1),o=n.n(i),a=n(3),u=n.n(a),s=n(18),c=n(37),h=n(130),f=n.n(h),p=n(33);function d(e){return(d="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})(e)}function v(){return(v=Object.assign||function(e){for(var t=1;t0?y-1:0,_=y+1=2*m&&3!==y&&(s[0]=l.a.cloneElement(s[0],{className:t+"-item-after-jump-prev"}),s.unshift(c)),a-y>=2*m&&y!==a-2&&(s[s.length-1]=l.a.cloneElement(s[s.length-1],{className:t+"-item-before-jump-next"}),s.push(h)),1!==A&&s.unshift(f),k!==a&&s.push(p)}var V=null;i.showTotal&&(V=l.a.createElement("li",{className:t+"-total-text"},i.showTotal(i.total,[0===i.total?0:(y-1)*b+1,y*b>i.total?i.total:y*b])));var H=!this.hasPrev()||!a,N=!this.hasNext()||!a;return l.a.createElement("ul",O()({className:u()(t,n,T()({},t+"-disabled",r)),style:i.style,unselectable:"unselectable",ref:this.savePaginationNode},x),V,l.a.createElement("li",{title:i.showTitle?o.prev_page:null,onClick:this.prev,tabIndex:H?null:0,onKeyPress:this.runIfEnterPrev,className:(H?t+"-disabled":"")+" "+t+"-prev","aria-disabled":H},i.itemRender(w,"prev",this.getItemIcon(i.prevIcon))),s,l.a.createElement("li",{title:i.showTitle?o.next_page:null,onClick:this.next,tabIndex:N?null:0,onKeyPress:this.runIfEnterNext,className:(N?t+"-disabled":"")+" "+t+"-next","aria-disabled":N},i.itemRender(_,"next",this.getItemIcon(i.nextIcon))),l.a.createElement(B,{disabled:r,locale:i.locale,rootPrefixCls:t,selectComponentClass:i.selectComponentClass,selectPrefixCls:i.selectPrefixCls,changeSize:this.props.showSizeChanger?this.changePageSize:null,current:this.state.current,pageSize:this.state.pageSize,pageSizeOptions:this.props.pageSizeOptions,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:v}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,l=W(e.pageSize,t,e);r=r>l?l:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),t}(l.a.Component);q.propTypes={disabled:o.a.bool,prefixCls:o.a.string,className:o.a.string,current:o.a.number,defaultCurrent:o.a.number,total:o.a.number,pageSize:o.a.number,defaultPageSize:o.a.number,onChange:o.a.func,hideOnSinglePage:o.a.bool,showSizeChanger:o.a.bool,showLessItems:o.a.bool,onShowSizeChange:o.a.func,selectComponentClass:o.a.func,showPrevNextJumpers:o.a.bool,showQuickJumper:o.a.oneOfType([o.a.bool,o.a.object]),showTitle:o.a.bool,pageSizeOptions:o.a.arrayOf(o.a.string),showTotal:o.a.func,locale:o.a.object,style:o.a.object,itemRender:o.a.func,prevIcon:o.a.oneOfType([o.a.func,o.a.node]),nextIcon:o.a.oneOfType([o.a.func,o.a.node]),jumpPrevIcon:o.a.oneOfType([o.a.func,o.a.node]),jumpNextIcon:o.a.oneOfType([o.a.func,o.a.node])},q.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:G,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showSizeChanger:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:G,locale:{items_per_page:"\u6761/\u9875",jump_to:"\u8df3\u81f3",jump_to_confirm:"\u786e\u5b9a",page:"\u9875",prev_page:"\u4e0a\u4e00\u9875",next_page:"\u4e0b\u4e00\u9875",prev_5:"\u5411\u524d 5 \u9875",next_5:"\u5411\u540e 5 \u9875",prev_3:"\u5411\u524d 3 \u9875",next_3:"\u5411\u540e 3 \u9875"},style:{},itemRender:function(e,t,n){return n}};var Y=function(){var e=this;this.getJumpPrevPage=function(){return Math.max(1,e.state.current-(e.props.showLessItems?3:5))},this.getJumpNextPage=function(){return Math.min(W(void 0,e.state,e.props),e.state.current+(e.props.showLessItems?3:5))},this.getItemIcon=function(t){var n=e.props.prefixCls,r=t||l.a.createElement("a",{className:n+"-item-link"});return"function"===typeof t&&(r=l.a.createElement(t,O()({},e.props))),r},this.savePaginationNode=function(t){e.paginationNode=t},this.isValid=function(t){return"number"===typeof(n=t)&&isFinite(n)&&Math.floor(n)===n&&t>=1&&t!==e.state.current;var n},this.shouldDisplayQuickJumper=function(){var t=e.props,n=t.showQuickJumper,r=t.pageSize;return!(t.total<=r)&&n},this.handleKeyDown=function(e){e.keyCode!==j.ARROW_UP&&e.keyCode!==j.ARROW_DOWN||e.preventDefault()},this.handleKeyUp=function(t){var n=t.target.value,r=e.state.currentInputValue,l=void 0;(l=""===n?n:isNaN(Number(n))?r:Number(n))!==r&&e.setState({currentInputValue:l}),t.keyCode===j.ENTER?e.handleChange(l):t.keyCode===j.ARROW_UP?e.handleChange(l-1):t.keyCode===j.ARROW_DOWN&&e.handleChange(l+1)},this.changePageSize=function(t){var n=e.state.current,r=W(t,e.state,e.props);n=n>r?r:n,0===r&&(n=e.state.current),"number"===typeof t&&("pageSize"in e.props||e.setState({pageSize:t}),"current"in e.props||e.setState({current:n,currentInputValue:n})),e.props.onShowSizeChange(n,t)},this.handleChange=function(t){var n=e.props.disabled,r=t;if(e.isValid(r)&&!n){var l=W(void 0,e.state,e.props);r>l&&(r=l),"current"in e.props||e.setState({current:r,currentInputValue:r});var i=e.state.pageSize;return e.props.onChange(r,i),r}return e.state.current},this.prev=function(){e.hasPrev()&&e.handleChange(e.state.current-1)},this.next=function(){e.hasNext()&&e.handleChange(e.state.current+1)},this.jumpPrev=function(){e.handleChange(e.getJumpPrevPage())},this.jumpNext=function(){e.handleChange(e.getJumpNextPage())},this.hasPrev=function(){return e.state.current>1},this.hasNext=function(){return e.state.current2?n-2:0),l=2;l1?t-1:0),l=1;l0&&r.createElement("ul",{className:"".concat(y,"-item-action"),key:"actions"},d.map(function(e,t){return r.createElement("li",{key:"".concat(y,"-item-action-").concat(t)},e,t!==d.length-1&&r.createElement("em",{className:"".concat(y,"-item-action-split")}))})),w=s?"div":"li",_=r.createElement(w,xe({},g,{className:u()("".concat(y,"-item"),m,(n={},l="".concat(y,"-item-no-flex"),i=!e.isFlexMode(),l in n?Object.defineProperty(n,l,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[l]=i,n))}),"vertical"===c&&v?[r.createElement("div",{className:"".concat(y,"-item-main"),key:"content"},p,b),r.createElement("div",{className:"".concat(y,"-item-extra"),key:"extra"},v)]:[p,b,me(v,{key:"extra"})]);return s?r.createElement(ve.a,{span:Se(s,"column"),xs:Se(s,"xs"),sm:Se(s,"sm"),md:Se(s,"md"),lg:Se(s,"lg"),xl:Se(s,"xl"),xxl:Se(s,"xxl")},_):_},e}var n,l,i;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}(t,r["Component"]),n=t,(l=[{key:"isItemContainsTextNode",value:function(){var e,t=this.props.children;return r.Children.forEach(t,function(t){"string"===typeof t&&(e=!0)}),e}},{key:"isFlexMode",value:function(){var e=this.props.extra;return"vertical"===this.context.itemLayout?!!e:!this.isItemContainsTextNode()}},{key:"render",value:function(){return r.createElement(s.a,null,this.renderItem)}}])&&ye(n.prototype,l),i&&ye(n,i),t}();function ze(e){return(ze="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})(e)}function Te(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);tR&&(k.current=R);var I,V=y?r.createElement("div",{className:"".concat(E,"-pagination")},r.createElement(pe,Ee({},k,{onChange:n.onPaginationChange,onShowSizeChange:n.onPaginationShowSizeChange}))):null,H=Te(_);if(y&&_.length>(k.current-1)*k.pageSize&&(H=Te(_).splice((k.current-1)*k.pageSize,k.pageSize)),I=P&&r.createElement("div",{style:{minHeight:53}}),H.length>0){var N=H.map(function(e,t){return n.renderItem(e,t)}),D=[];r.Children.forEach(N,function(e,t){D.push(r.cloneElement(e,{key:n.keys[t]}))}),I=b?r.createElement(de.a,{gutter:b.gutter},D):r.createElement("ul",{className:"".concat(E,"-items")},D)}else v||P||(I=n.renderEmpty(E,i));var j=k.position||"bottom";return r.createElement("div",Ee({className:A},T),("top"===j||"both"===j)&&V,M&&r.createElement("div",{className:"".concat(E,"-header")},M),r.createElement(C,O,I,v),S&&r.createElement("div",{className:"".concat(E,"-footer")},S),g||("bottom"===j||"both"===j)&&V)};var l=e.pagination,i=l&&"object"===ze(l)?l:{};return n.state={paginationCurrent:i.defaultCurrent||1,paginationSize:i.defaultPageSize||10},n}var n,l,i;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ke(e,t)}(t,r["Component"]),n=t,(l=[{key:"getChildContext",value:function(){return{grid:this.props.grid,itemLayout:this.props.itemLayout}}},{key:"triggerPaginationEvent",value:function(e){var t=this;return function(n,r){var l=t.props.pagination;t.setState({paginationCurrent:n,paginationSize:r}),l&&l[e]&&l[e](n,r)}}},{key:"isSomethingAfterLastItem",value:function(){var e=this.props,t=e.loadMore,n=e.pagination,r=e.footer;return!!(t||n||r)}},{key:"render",value:function(){return r.createElement(s.a,null,this.renderList)}}])&&Pe(n.prototype,l),i&&Pe(n,i),t}();Ie.Item=Ce,Ie.childContextTypes={grid:i.any,itemLayout:i.string},Ie.defaultProps={dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}},function(e,t,n){"use strict";n(31),n(251),n(167)},function(e,t){var n,r,l=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u,s=[],c=!1,h=-1;function f(){c&&u&&(c=!1,u.length?s=u.concat(s):h=-1,s.length&&p())}function p(){if(!c){var e=a(f);c=!0;for(var t=s.length;t;){for(u=s,s=[];++h1)for(var n=1;n0?l(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(141)("keys"),l=n(115);e.exports=function(e){return r[e]||(r[e]=l(e))}},function(e,t,n){var r=n(32),l=n(43),i=l["__core-js_shared__"]||(l["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(97)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(52),l=n(32),i=n(82);e.exports=function(e,t){var n=(l.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",o)}},function(e,t,n){var r=n(57),l=n(279),i=n(142),o=n(140)("IE_PROTO"),a=function(){},u=function(){var e,t=n(135)("iframe"),r=i.length;for(t.style.display="none",n(176).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("